zss
2024-08-23 8a9505bd7845d50e83fae7adf4846931979c1419
检验下单+检验任务+报告编制批准选择印章修改
已修改27个文件
5031 ■■■■ 文件已修改
cnas-server/src/main/java/com/yuanchu/mom/controller/DepartmentController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/controller/SealController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/service/DepartmentLimsService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/service/DepartmentService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/service/impl/DepartmentLimsServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/resources/mapper/SealMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderPlanController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/dto/ReportPageDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/mapper/InsOrderMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrder.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrderState.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsSampleUser.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/InsOrderService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/InsReportService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java 4470 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java 350 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsOrderMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsProductMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsReportMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsSampleMapper.xml 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/static/report-template.docx 补丁 | 查看 | 原始文档 | blame | 历史
system-run/src/main/resources/application-dev.yml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user-server/src/main/resources/mapper/UserMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/java/com/yuanchu/mom/controller/DepartmentController.java
@@ -76,4 +76,11 @@
    public Result selectDepartmentEnum() {
        return Result.success(departmentService.selectDepartmentEnum());
    }
    @ValueAuth
    @ApiOperation(value = "获取用户管理组织架构枚举")
    @GetMapping("/selectDepartmentLimsEnum")
    public Result selectDepartmentLimsEnum() {
        return Result.success(departmentLimsService.selectDepartmentLimsEnum());
    }
}
cnas-server/src/main/java/com/yuanchu/mom/controller/SealController.java
@@ -48,4 +48,11 @@
        Seal seal = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Seal.class);
        return Result.success(sealService.selectSeal(page,seal));
    }
    @ValueClassify("场所或设施")
    @ApiOperation(value="删除印章")
    @PostMapping("/delectSeal")
    public  Result delectSeal(@RequestBody Seal seal) {
        return Result.success(sealService.removeById(seal));
    }
}
cnas-server/src/main/java/com/yuanchu/mom/service/DepartmentLimsService.java
@@ -22,4 +22,5 @@
    //删除部门
    boolean delDepartment(Integer id);
    List<DepartmentLims> selectDepartmentLimsEnum();
}
cnas-server/src/main/java/com/yuanchu/mom/service/DepartmentService.java
@@ -26,4 +26,5 @@
    boolean delDepartment(Integer id);
    List<Department> selectDepartmentEnum();
}
cnas-server/src/main/java/com/yuanchu/mom/service/impl/DepartmentLimsServiceImpl.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.dto.DepartmentDto;
import com.yuanchu.mom.mapper.DepartmentLimsMapper;
import com.yuanchu.mom.pojo.Department;
import com.yuanchu.mom.pojo.DepartmentLims;
import com.yuanchu.mom.service.DepartmentLimsService;
import lombok.AllArgsConstructor;
@@ -64,6 +65,11 @@
        return removeBatchByIds(department);
    }
    @Override
    public List<DepartmentLims> selectDepartmentLimsEnum() {
        return baseMapper.selectList(Wrappers.<DepartmentLims>lambdaQuery().isNotNull(DepartmentLims::getFatherId).select(DepartmentLims::getId,DepartmentLims::getName));
    }
    //判断是否有子类,直到没有为止
    public List<DepartmentLims> getDepartment(Integer id) {
        List<DepartmentLims> list = new ArrayList<>();
cnas-server/src/main/resources/mapper/SealMapper.xml
@@ -4,7 +4,7 @@
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.SealMapper">
    <select id="selectSeal" resultType="com.yuanchu.mom.pojo.Seal">
        select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time
        select s.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time
        from seal s  LEFT JOIN laboratory l  on s.lab_id=l.id
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderController.java
@@ -93,7 +93,8 @@
    public Result<?> getInsOrder(Integer orderId) {
        return Result.success(insOrderService.getInsOrder(orderId));
    }
    @ValueClassify("检验下单")
    @ValueAuth
    @ApiOperation(value = "审核检验单进行状态修改")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "检验单id", dataTypeClass = Integer.class),
@@ -103,6 +104,18 @@
    public Result<?> upInsOrderOfState(@RequestBody InsOrder insOrder) {
        return Result.success(insOrderService.upInsOrderOfState(insOrder));
    }
    @ValueClassify("检验下单")
    @ApiOperation(value = "检测中心主任审核/研发部经理审核/技术负责人审核")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "检验单id", dataTypeClass = Integer.class),
            @ApiImplicitParam(name = "state", value = "审核结果 1:通过 2:不通过", dataTypeClass = Integer.class)
    })
    @PostMapping("/upInsOrderOfState2")
    public Result<?> upInsOrderOfState2(@RequestBody InsOrder insOrder) {
        return Result.success(insOrderService.upInsOrderOfState2(insOrder));
    }
    @ValueClassify("检验下单")
    @ApiOperation(value = "添加检验单模板")
    @PostMapping("/addInsOrderTemplate")
inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderPlanController.java
@@ -116,7 +116,7 @@
    @ValueClassify("检验任务")
    @ApiOperation(value = "检验任务提交")
    @PostMapping("/submitPlan")
    public Result<?> submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode) {
    public Result<?> submitPlan(Integer orderId,String laboratory, Integer verifyUser, String entrustCode) {
        int num = insOrderPlanService.submitPlan(orderId, laboratory, verifyUser, entrustCode);
        return num == 1 ? Result.success() : Result.fail("提交失败,部分项目还未进行检验");
    }
inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java
@@ -101,8 +101,8 @@
    @ValueClassify("报告编制")
    @ApiOperation(value = "批准")
    @PostMapping("/ratifyReport")
    public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell) {
        return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell));
    public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell,String sealUrl) {
        return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell,sealUrl));
    }
    @RequestMapping("/onlyOffice/save")
inspect-server/src/main/java/com/yuanchu/mom/dto/ReportPageDto.java
@@ -22,4 +22,7 @@
    @ValueTableShow(value = 6,name = "审核人")
    private String examineUser;
    //实验室id
    private Integer labId;
}
inspect-server/src/main/java/com/yuanchu/mom/mapper/InsOrderMapper.java
@@ -53,4 +53,6 @@
    List<Map<Integer, Object>> selectReportModelByOrderId(@Param("id") Integer id, @Param("laboratory") String laboratory);
    String seldepLimsId(int depLimsId);
    InsOrder selectById2(Integer id);
}
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrder.java
@@ -215,11 +215,33 @@
    @ValueTableShow(value = 15, name = "委托人")
    private String prepareUser;
    @TableField(exist = false,select = false)
    private Integer prepareUserId;
    @ApiModelProperty("是否审核撤销")
    private Integer isRevocation;
    @ApiModelProperty("审核撤销的项目id")
    private String revocationInsProductIds;
    @ApiModelProperty("通信:下发至部门,关联的部门id")
    private Integer departmentLimsId;
    @ApiModelProperty("通信:下发至部门")
    private String departmentLims;
    @ApiModelProperty("通信:检测中心主任审核人")
    private Integer checkState1User;
    @ApiModelProperty("通信:检测中心主任审核结果2:不通过;1:通过")
    private Integer checkState1;
    @ApiModelProperty("通信:研发部经理审核人")
    private Integer checkState2User;
    @ApiModelProperty("通信:研发部经理审核结果2:不通过;1:通过")
    private Integer checkState2;
    @ApiModelProperty("通信:技术负责人审核人")
    private Integer checkState3User;
    @ApiModelProperty("通信:技术负责人审核结果2:不通过;1:通过")
    private Integer checkState3;
}
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsOrderState.java
@@ -9,6 +9,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
/**
 * 
@@ -30,13 +31,13 @@
    private Integer insOrderId;
    /**
     * å®žéªŒå®¤
     * è¯•验室son
     */
    @TableField(value = "laboratory")
    private String laboratory;
    /**
     * æ£€éªŒçŠ¶æ€(0:待检验1:检验中 2:已检验3:待复核4:复核未通过 5:复核通过)
     * æ£€éªŒçŠ¶æ€(0:待检验1:检验中 2:已检验3:待复核4:复核再次试验 5:复核结束试验 6:复核继续试验)
     */
    @TableField(value = "ins_state")
    private Integer insState;
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsSampleUser.java
@@ -27,7 +27,7 @@
    private Integer id;
    /**
     * å¤–键:检验样品ins_sample表id
     * å¤–键:检验样品ins_sample表id(实际关联ins_order_state表id)
     */
    private Integer insSampleId;
inspect-server/src/main/java/com/yuanchu/mom/service/InsOrderService.java
@@ -31,6 +31,8 @@
    int upInsOrderOfState(InsOrder insOrder);
    int upInsOrderOfState2(InsOrder insOrder);
    Map<String, Object> getInsOrderAndSample(Integer id, String laboratory);
    Map<String, Object> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto);
inspect-server/src/main/java/com/yuanchu/mom/service/InsReportService.java
@@ -31,7 +31,7 @@
    int examineReport(Integer id, Integer isExamine, String examineTell);
    //批准
    int ratifyReport(Integer id, Integer isRatify, String ratifyTell);
    int ratifyReport(Integer id, Integer isRatify, String ratifyTell,String sealUrl);
    int wordInsertUrl(Map<String, Object> map, String url);
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
ÎļþÌ«´ó
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java
@@ -47,10 +47,13 @@
 */
@Service
@AllArgsConstructor
@Transactional(rollbackFor = Exception.class)
public class InsOrderServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder>
        implements InsOrderService {
    private GetLook getLook;
    private RoleMapper roleMapper;
    private InsOrderMapper insOrderMapper;
@@ -89,9 +92,9 @@
        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectInsOrderParameter");
        User user = userMapper.selectById(map1.get("userId"));//当前登录的人
        Integer roleId = user.getRoleId();
        //获取当前人所属实验室id
        String departLimsId = user.getDepartLimsId();
        String laboratory = null;
        //获取当前人所属实验室id
        /*String departLimsId = user.getDepartLimsId();
        if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) {
            String[] split = departLimsId.split(",");
            //查询对应架构名称(通信实验室,电力实验室,检测办)
@@ -99,7 +102,7 @@
            if (departLims.contains("实验室")) {
                laboratory = departLims;
            }
        }
        }*/
        //判断是否是全部权限
        Power power = powerMapper.selectOne(Wrappers.<Power>lambdaQuery().eq(Power::getRoleId, roleId).eq(Power::getMenuMethod, "selectAllInsOrderParameter"));
        if (ObjectUtils.isEmpty(power)) {
@@ -134,25 +137,13 @@
        insOrder.setAppointed(LocalDate.parse(appointed));
        insOrder.setSendTime(LocalDateTime.now());
        insOrderMapper.updateById(insOrder);
        List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId));
        List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
        List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                .in(InsProduct::getInsSampleId, ids)
                .eq(InsProduct::getState, 1)
//                .isNull(InsProduct::getInsFibersId)
//                .isNull(InsProduct::getInsFiberId)
                .select(InsProduct::getSonLaboratory).groupBy(InsProduct::getSonLaboratory));
        for (InsProduct insProduct : insProducts) {
            InsOrderState insOrderState = new InsOrderState();
            insOrderState.setInsOrderId(orderId);
            try {
                insOrderState.setLaboratory(insProduct.getSonLaboratory());
            } catch (NullPointerException e) {
                throw new ErrorException("该检验单有未维护实验室的检验项目");
            }
            insOrderState.setInsState(0);
            insOrderStateMapper.insert(insOrderState);
        }
        //修改成只给当前选择的试验室下发单子
        InsOrderState insOrderState = new InsOrderState();
        insOrderState.setInsOrderId(orderId);
        insOrderState.setLaboratory(sonLaboratory);
        insOrderState.setInsState(0);
        insOrderStateMapper.insert(insOrderState);
        //这里是在给分配的指定的人和试验室下发检验人
        if (userId != null) {
            InsSampleUser insSampleUser = new InsSampleUser();
            insSampleUser.setState(0);
@@ -171,22 +162,22 @@
        //判断选择的委托单位与制单人的委托单位是否一致
        Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId");
        String company = userMapper.selectById(userId).getCompany();
        if (!company.equals(insOrder.getCompanyId()+"")) {
        if (!company.equals(insOrder.getCompanyId() + "")) {
            //如果不一致那么委托人字段必填
            if (ObjectUtils.isEmpty(insOrder.getPrepareUser())){
            if (ObjectUtils.isEmpty(insOrder.getPrepareUser())) {
                throw new ErrorException("委托人不能为空");
            }
        }else {
        } else {
            //如果一致,那么制单人就是委托人
            insOrder.setPrepareUser(insOrder.getCustom());
        }
        //客户代号
        Custom custom = customMapper.selectById(insOrder.getCompanyId());
        String code = custom.getCode2();
        if (!custom.getCompany().equals(insOrder.getCompany())){
        if (!custom.getCompany().equals(insOrder.getCompany())) {
            Custom one = customMapper.selectOne(Wrappers.<Custom>lambdaQuery().eq(Custom::getCompany, insOrder.getCompany()));
            insOrder.setCompanyId(one.getId());
            code=one.getCode2();
            code = one.getCode2();
        }
        //实验室编号
        String code2 = baseMapper.selLaboratoryCode(insOrder.getLaboratory());
@@ -203,65 +194,11 @@
            a.setId(null);
            a.setInsOrderId(insOrder.getId());
            if (StrUtil.isEmpty(a.getSampleCode())) {
                a.setSampleCode(giveCode.split("-")[2] + "-" + count.get());
                a.setSampleCode("TX(WYQJ)-" + giveCode.split("-")[2] + "-" + count.get());
            }
            insSampleMapper.insert(a);
            if (ObjectUtil.isNotEmpty(a.getInsProduct())) {
                addInsProductMethod(a.getId(), a.getInsProduct(), null, 0, false);
                if (ObjectUtil.isNotEmpty(a.getBushing())) {
                    for (BushingDto bushingDto : a.getBushing()) {
                        bushingDto.setInsSampleId(a.getId());
                        insBushingMapper.insert(bushingDto);
                        //光纤不为空
                        if (bushingDto.getFiber().size() != 0) {
                            for (FiberDto fiberDto : bushingDto.getFiber()) {
                                fiberDto.setInsBushingId(bushingDto.getId());
                                insFiberMapper.insert(fiberDto);
                                addInsProductMethod(a.getId(), a.getInsProduct(), fiberDto.getId(), 2, true);
                                addInsProductMethod(a.getId(), fiberDto.getProductList(), fiberDto.getId(), 2, false);
                            }
                        }
                        //光纤带不为空
                        else if ( bushingDto.getFibers().size()!=0){
                            for (FibersDto fibersDto : bushingDto.getFibers()) {
                                fibersDto.setInsBushingId(bushingDto.getId());
                                fibersDto.setCode(this.giveCode.giveCode("", "ins_fibers", "", "yyMMdd"));
                                insFibersMapper.insert(fibersDto);
                                for (FiberDto fiberDto : fibersDto.getFiber()) {
                                    fiberDto.setInsFibersId(fibersDto.getId());
                                    insFiberMapper.insert(fiberDto);
                                    addInsProductMethod(a.getId(), a.getInsProduct(), fiberDto.getId(), 2, true);
                                    addInsProductMethod(a.getId(), fiberDto.getProductList(), fiberDto.getId(), 2, false);
                                }
                                //addInsProductMethod(a.getId(), a.getInsProduct(), fibersDto.getId(), 1);
                                addInsProductMethod(a.getId(), fibersDto.getProductList(), fibersDto.getId(), 1, false);
                            }
                        }
                        //都为空 åªé…ç½®äº†å¥—管 è¿™ç§æƒ…况只限于项目是含有松套管的
                        else {
                            String collect = a.getInsProduct().stream().map(InsProduct::getInspectionItem).distinct().collect(Collectors.joining(","));
                            if (collect.contains("松套管")){
                                //获取检验项目中包含松套管的检验项目
                                List<InsProduct> products = a.getInsProduct().stream().filter(insProduct -> insProduct.getInspectionItem().contains("松套管")).collect(Collectors.toList());
                                for (InsProduct product : products) {
                                    product.setInsBushId(bushingDto.getId());
                                    product.setId(null);
                                    product.setCreateTime(null);
                                    product.setCreateUser(null);
                                    product.setUpdateTime(null);
                                    product.setUpdateUser(null);
                                    product.setInsSampleId(a.getId());
                                    if (product.getInspectionItemSubclass() == null) {
                                        product.setInspectionItemSubclass("");
                                    }
                                    insProductMapper.insert(product);
                                }
                            }else {
                                throw new ErrorException("样品的光纤配置信息里面没有配置光纤带信息也没有光纤信息,请重新配置保存再提交下单!!!");
                            }
                        }
                    }
                }
            }
            if (ObjectUtil.isNotEmpty(a.getInsulating())) {
                List<InsProduct> ip2 = new ArrayList<>();
@@ -336,6 +273,11 @@
            } catch (Exception e) {
            }
        }
        //通信:如果是C类订单无需审核直接通过
        if (insOrder.getOrderType().equals("C")) {
            insOrder.setState(1);
            upInsOrderOfState(insOrder);
        }
        return insOrder.getId();
    }
@@ -343,150 +285,33 @@
        InsOrder insOrder = insOrderMapper.selectById(insSampleMapper.selectById(sampleId).getInsOrderId());
        String name = insSampleMapper.selMethodById(sampleId);
        for (InsProduct product : productList) {
            if (product.getInspectionItem().contains("松套管")){
                continue;
            }
            if (product.getState() == 1 && !product.getInspectionItem().equals("光纤接头损耗")) {
                //判断光缆的温度循环项目添加
                if (insOrder.getSampleType().equals("光缆") && product.getInspectionItem().equals("温度循环") && type != 0) {
                    //判断选择的标准方法是委托要求还是其他标准方法
                    if (!name.equals("委托要求")) {
                        //判断标准方法的温度循环的要求描述是否有填写
                        if (ObjectUtils.isEmpty(product.getTell()) || product.getTell().equals("")) {
                            throw new ErrorException("光缆的温度循环的要求描述为空,需要在标准库配置要求描述!!!");
                        } else {
                            //解析(温度范围:20℃,-40℃,65℃;保温时间:12h; å¾ªçŽ¯æ¬¡æ•°ï¼š2次; å…‰çº¤ï¼ˆ1310nm,1550nm)附加衰减不大于0.03dB/km)
                            String tell = product.getTell().replace(")", ")")
                                    .replace("(", "(")
                                    .replace(")", ")")
                                    .replace(",", ",")
                                    .replace(":", ":")
                                    .replace(";", ";")
                                    .replace("不大于", "≤")
                                    .replace("不小于", "≥")
                                    .replace("大于", ">")
                                    .replace("小于", "<")
                                    .replace("等于", "=");
                            String[] message=null;
                            String[] nm=null;
                            String ask=null;
                            String count=null;
                            try {
                                String[] strings = tell.split(";");
                                //温度
                                String temperature = strings[0];
                                String[] split = temperature.split(":");
                                 message = split[1].split(",");
                                //循环次数
                                 count = strings[2].split(":")[1].split("次")[0];
                                //光纤项目和要求值
                                String string = strings[3];
                                 nm = string.split("(")[1].split(")")[0].split(",");
                                 ask = string.split("衰减")[1].split("dB")[0];
                            }catch (Exception e){
                                throw new ErrorException("温度循环的要求描述格式异常,请参照温度范围:20℃,-40℃,65℃;保温时间:12h; å¾ªçŽ¯æ¬¡æ•°ï¼š2次; å…‰çº¤ï¼ˆ1310nm,1550nm)附加衰减不大于0.03dB/km");
                            }
                            //拼接
                            String s="";
                            for (int i = 0; i < nm.length; i++) {
                                 s+= "20℃(常温)," + nm[i] + ",null;";
                                for (int j = 0; j < message.length; j++) {
                                    s+= message[j] + "," + nm[i] + "," + ask + ";" ;
                                }
                            }
                            s+=count;
                            product.setAsk(s);
                            insProductMapper.updateById(product);
                            dealWithTemperatureLoop(type,id,sampleId,product);
                        }
                if (!is) {
                    switch (type) {
                        case 1:
                            product.setInsFibersId(id);
                            break;
                        case 2:
                            product.setInsFiberId(id);
                            break;
                    }
                    else {
                        //20℃(常温),1310nm,null;-40℃,1310nm,≤0.2;75℃,1310nm,<0.3;20℃,1310nm,≤0.1;20℃(常温),1550nm,null;-40℃,1550nm,≤0.2;75℃,1550nm,<0.3;20℃,1550nm,≤0.1;3
                        dealWithTemperatureLoop(type,id,sampleId,product);
                    }
                }
                //判断热循环项目的添加和温升试验项目的添加
                else if (product.getInspectionItem().equals("热循环") || product.getInspectionItem().equals("温升试验")) {
                    List<InsProduct> insProductess = new ArrayList<>();
                    product.setId(null);
                    product.setCreateTime(null);
                    product.setCreateUser(null);
                    product.setUpdateTime(null);
                    product.setUpdateUser(null);
                    product.setInsSampleId(sampleId);
                    insProductess.add(product);
                    List<InsProduct> insProductes = new ArrayList<>();
                    List<InsProduct> insProducts = new ArrayList<>();
                    String[] strings = product.getAsk().split(";");
                    //循环次数
                    int count = Integer.parseInt(strings[strings.length - 1]);
                    for (int i = 0; i < strings.length - 1; i++) {
                        String[] split = strings[i].split(",");
                        InsProduct insProduct = new InsProduct();
                        insProduct.setInspectionItem("1");//检验父项--循环次数
                        insProduct.setInspectionItemSubclass(split[0]);//检验子项--环境温度/导线温度/耐张温度/接续温度
                        insProduct.setInspectionItemSubclassEn(split[1]);//检验子项英文--环境温度/导线温度/耐张温度/接续温度
                        insProduct.setAsk(null);//检验要求
                        insProduct.setTell(null);//检验描述
                        insProduct.setInsSampleId(sampleId);
                        insProduct.setState(1);
                        insProduct.setFactory(product.getFactory());
                        insProduct.setLaboratory(product.getLaboratory());
                        insProduct.setSampleType(product.getSampleType());
                        insProduct.setSample(product.getSample());
                        insProduct.setModel(product.getModel());
                        insProduct.setSonLaboratory(product.getSonLaboratory());
                        insProduct.setUnit("℃");//单位
                        insProduct.setManHourGroup(product.getManHourGroup());
                        insProduct.setInspectionItemType("0");
                        insProduct.setInspectionValueType("1");
                        if (product.getInspectionItem().equals("热循环")) {
                            insProduct.setInspectionItemClass("直流电阻");//检验子子项--直流电阻
                            insProduct.setInspectionItemClassEn("DC resistance");//检验子子项英文--直流电阻
                            insProduct.setUnit("Ω/km");//单位
                        }
                        insProducts.add(insProduct);
                        insProductes.add(insProduct);
                        insProductess.add(insProduct);
                    if (product.getInspectionItemSubclass() == null) {
                        product.setInspectionItemSubclass("");
                    }
                    //热循环才有多次循环次数
                    if (count > 1) {
                        //循环超过1次
                        for (int j = 2; j <= count; j++) {
                            for (InsProduct insProduct : insProductes) {
                                InsProduct insProduct1 = new InsProduct();
                                BeanUtils.copyProperties(insProduct, insProduct1);
                                insProduct1.setInspectionItem(j + "");//循环次数
                                insProductess.add(insProduct1);
                            }
                        }
                    }
                    insProductService.saveBatch(insProductess);
                }
                else {
                    if (!is) {
                        switch (type) {
                            case 1:
                                product.setInsFibersId(id);
                                break;
                            case 2:
                                product.setInsFiberId(id);
                                break;
                        }
                        product.setId(null);
                        product.setCreateTime(null);
                        product.setCreateUser(null);
                        product.setUpdateTime(null);
                        product.setUpdateUser(null);
                        product.setInsSampleId(sampleId);
                        if (product.getInspectionItemSubclass() == null) {
                            product.setInspectionItemSubclass("");
                        }
                        insProductMapper.insert(product);
                    }
                    insProductMapper.insert(product);
                }
            }
        }
    }
    //温度循环的处理
    private void dealWithTemperatureLoop(Integer type, Integer id,Integer sampleId,InsProduct product) {
    private void dealWithTemperatureLoop(Integer type, Integer id, Integer sampleId, InsProduct product) {
        List<InsProduct> insProductes = new ArrayList<>();
        List<InsProduct> insProducts = new ArrayList<>();
        String[] strings = product.getAsk().split(";");
@@ -568,23 +393,102 @@
                code = "";
            }
            Custom custom = customMapper.selectById(order.getCompanyId());
            System.out.println("============="+custom.getCompany());
            System.out.println("-------------"+order.getCompany());
            System.out.println("=============" + custom.getCompany());
            System.out.println("-------------" + order.getCompany());
            String code2 = custom.getCode2();
            if (!custom.getCompany().equals(order.getCompany())){
            if (!custom.getCompany().equals(order.getCompany())) {
                Custom one = customMapper.selectOne(Wrappers.<Custom>lambdaQuery().eq(Custom::getCompany, order.getCompany()));
                insOrder.setCompanyId(one.getId());
                code2=one.getCode2();
                code2 = one.getCode2();
            }
            insOrder.setEntrustCode(giveCode.giveCode2("JCZX/" + code + "-" + code2 + "-", insOrder.getCompanyId(), insOrder.getLaboratory(), "ins_order", "", "yyMM"));
            /*审核通过之后还需要判断该样品是否在库*/
            //如果在库,系统查询站点任务分布情况,将检验任务下发至最少的站台
            List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery()
                    .eq(InsSample::getInsOrderId, insOrder.getId()).select(InsSample::getId));
            List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
            List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
                            .eq(InsProduct::getState, 1)
                            .in(InsProduct::getInsSampleId, ids));
            List<String> collect = insProducts.stream().map(InsProduct::getSonLaboratory).distinct().collect(Collectors.toList());
            //要判断剩余试验室中哪个最空闲就安排给哪个
            Map<String, Long> dataCounts = new HashMap<>();
            for (String sonLaboratory : collect) {
                Long count = insOrderStateMapper.selectCount(Wrappers.<InsOrderState>lambdaQuery()
                        .eq(InsOrderState::getLaboratory, sonLaboratory)
                        .ne(InsOrderState::getInsState, 4)
                        .ne(InsOrderState::getInsState, 5)
                        .ne(InsOrderState::getInsState, 6));
                dataCounts.put(sonLaboratory, count);
            }
            // æŸ¥æ‰¾æ•°æ®é‡æœ€å°‘的元素
            String minElement = null;
            Long minCount = Long.MAX_VALUE;
            for (Map.Entry<String, Long> entry : dataCounts.entrySet()) {
                if (entry.getValue() < minCount) {
                    minCount = entry.getValue();
                    minElement = entry.getKey();
                }
            }
            int day = insProductService.selectOrderManDay(insOrder.getId());//预计完成时间
            upInsOrder(insOrder.getId(),null,LocalDateTime.now().plusHours(day).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),null,minElement);
            //如果不在库,暂不下发
        }
        return insOrderMapper.updateById(insOrder);
    }
    @Override
    public int upInsOrderOfState2(InsOrder insOrder) {
        InsOrder order = insOrderMapper.selectById(insOrder.getId());
        //获取当前人
        Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId");
        //获取当前人的角色
        String roleName = roleMapper.selectById(userMapper.selectById(userId).getRoleId()).getName();
        //判断是检测中心主任/研发部经理/技术负责人
        switch (roleName) {
            case "检测中心主任":
                order.setCheckState1(insOrder.getState());
                order.setCheckState1User(userId);
                break;
            case "研发部经理":
                order.setCheckState2(insOrder.getState());
                order.setCheckState2User(userId);
                break;
            case "技术负责人":
                order.setCheckState3(insOrder.getState());
                order.setCheckState3User(userId);
                break;
            default:
                throw new ErrorException("当前登录用户的角色不是检测中心主任/研发部经理/技术负责人,无法进行审核");
        }
        insOrderMapper.updateById(order);
        //查询该订单是A类还是Bç±»
        if (order.getOrderType().equals("A")) {
            //如果是Aç±»,1和2和3都审核通过这个单子就审核通过
            if (order.getCheckState1() == 1 && order.getCheckState2() == 1 && order.getCheckState3() == 1) {
                order.setState(1);
                upInsOrderOfState(order);
            } else if (order.getCheckState1() == 2 || order.getCheckState2() == 2 || order.getCheckState3() == 2){
                order.setState(2);
                upInsOrderOfState(order);
            }
        } else if (order.getOrderType().equals("B")) {
            //如果是Bç±»,1和2审核通过后这个单子就审核通过
            if (order.getCheckState1() == 1 && order.getCheckState2() == 1 ) {
                order.setState(1);
                upInsOrderOfState(order);
            } else if (order.getCheckState1() == 2 || order.getCheckState2() == 2 ){
                order.setState(2);
                upInsOrderOfState(order);
            }
        }
        return 1;
    }
    @Override
    public Map<String, Object> getInsOrderAndSample(Integer id, String laboratory) {
        Map<String, Object> map = new HashMap<>();
        InsOrder insOrder = insOrderMapper.selectById(id);
        InsOrder insOrder = insOrderMapper.selectById2(id);
        List<SampleProductDto> list = insSampleMapper.getInsOrderAndSample(id, laboratory);
        for (SampleProductDto sampleProductDto : list) {
            List<Integer> ids = sampleProductDto.getInsProduct().stream().map(InsProduct::getId).collect(Collectors.toList());
@@ -608,19 +512,19 @@
    public Map<String, Object> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto) {
        Map<String, Object> map = new HashMap<>();
        map.put("head", PrintChina.printChina(SampleProductDto2.class));
        IPage<SampleProductDto2> productDto2IPage = insOrderMapper.selectSampleAndProductByOrderId(page, QueryWrappers.queryWrappers(sampleProductDto).orderByAsc("inspection_item"),sampleProductDto.getId());
        IPage<SampleProductDto2> productDto2IPage = insOrderMapper.selectSampleAndProductByOrderId(page, QueryWrappers.queryWrappers(sampleProductDto).orderByAsc("inspection_item"), sampleProductDto.getId());
        for (SampleProductDto2 record : productDto2IPage.getRecords()) {
            InsProductUser insProductUser = insProductUserMapper.selectOne(Wrappers.<InsProductUser>lambdaQuery()
                    .eq(InsProductUser::getInsProductId, record.getInsProductId())
                    .orderByDesc(InsProductUser::getCreateTime)
                    .last("limit 1"));
            if (ObjectUtils.isNotEmpty(insProductUser)){
            if (ObjectUtils.isNotEmpty(insProductUser)) {
                record.setCheckName(userMapper.selectById(insProductUser.getCreateUser()).getName());
                DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
                record.setCheckTime(insProductUser.getCreateTime().format(formatter));
            }
        }
        map.put("body",productDto2IPage);
        map.put("body", productDto2IPage);
        return map;
    }
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
@@ -171,7 +171,7 @@
    //批准
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) {
    public int ratifyReport(Integer id, Integer isRatify, String ratifyTell,String sealUrl) {
        InsReport insReport = insReportMapper.selectById(id);
        insReport.setIsRatify(isRatify);
        if (ObjectUtils.isNotEmpty(ratifyTell)) {
@@ -192,14 +192,14 @@
            throw new ErrorException("找不到批准人的签名");
        }
        //获取场所的报告专用章
        String sealUrl;
       /* String sealUrl;
        try {
            String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory();
            sealUrl = insReportMapper.getLaboratoryByName(laboratory);
        } catch (Exception e) {
            throw new ErrorException("找不到报告专用章");
        }
        if (sealUrl == null) throw new ErrorException("找不到报告专用章");
        if (sealUrl == null) throw new ErrorException("找不到报告专用章");*/
        //系统生成报告地址
        String url = insReport.getUrl();
        //手动上传报告地址
inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java
@@ -48,4 +48,6 @@
    private Integer verifyUser;
    private Integer orderStateId;
}
inspect-server/src/main/resources/mapper/InsOrderMapper.xml
@@ -19,8 +19,8 @@
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateUser" column="update_user" jdbcType="INTEGER"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <result property="revocationInsProductIds" column="revocation_ins_product_ids" />
        <result property="isRevocation" column="is_revocation" />
        <result property="revocationInsProductIds" column="revocation_ins_product_ids"/>
        <result property="isRevocation" column="is_revocation"/>
    </resultMap>
    <resultMap id="OrderThingDto" type="com.yuanchu.mom.dto.OrderThingDto">
@@ -69,7 +69,8 @@
        ir.url,
        ir.url_s,
        sample_counts.sample_num,
        CONCAT(ROUND(approved_product_counts.approved_count / total_product_counts.total_count * 100, 2), '%') AS insProgress,
        CONCAT(ROUND(approved_product_counts.approved_count / total_product_counts.total_count * 100, 2), '%') AS
        insProgress,
        GROUP_CONCAT(DISTINCT isa.sample_code SEPARATOR ',') AS sample_code,
        GROUP_CONCAT(DISTINCT isa.sample SEPARATOR ' ') AS sample_name,
        GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model,
@@ -81,13 +82,15 @@
        LEFT JOIN
        ins_sample_user isau ON isau.ins_sample_id = io.id
        LEFT JOIN
        (SELECT id, ins_order_id, is_ratify, url, url_s FROM ins_report WHERE is_ratify = 1) ir ON io.id = ir.ins_order_id
        (SELECT id, ins_order_id, is_ratify, url, url_s FROM ins_report WHERE is_ratify = 1) ir ON io.id =
        ir.ins_order_id
        LEFT JOIN
        user u ON io.create_user = u.id
        LEFT JOIN
        (SELECT ins_order_id, COUNT(*) AS sample_num
        FROM ins_sample
        WHERE id in(select id1 from (select is2.id id1 ,ip.id from ins_sample is2 left join ins_product ip on is2.id = ip.ins_sample_id where ip.id is not null)s )
        WHERE id in(select id1 from (select is2.id id1 ,ip.id from ins_sample is2 left join ins_product ip on is2.id =
        ip.ins_sample_id where ip.id is not null)s )
        GROUP BY ins_order_id) sample_counts ON io.id = sample_counts.ins_order_id
        LEFT JOIN
        (SELECT ins_sample.ins_order_id, COUNT(*) AS total_count
@@ -153,7 +156,8 @@
        select *
        from (
        select
        i.id,isa.sample_code,isa.sample,isa.model,isa.ins_state,ip.id insProductId,ip.state,ip.unit,ip.inspection_item,ip.inspection_item_subclass,
        i.id,isa.sample_code,isa.sample,isa.model,isa.ins_state,ip.id
        insProductId,ip.state,ip.unit,ip.inspection_item,ip.inspection_item_subclass,
        ip.son_laboratory,ip.inspection_item_type,ip.inspection_value_type,ip.tell,ip.`last_value`,ip.ins_result,ipr.equip_value
        from ins_sample isa
        left join ins_order i on isa.ins_order_id = i.id
@@ -228,9 +232,10 @@
        GROUP_CONCAT(b.inspection_item2
        SEPARATOR ',')
        inspection_item from (select * ,
        GROUP_CONCAT(CONCAT(inspection_item,'@',inspection_item_subclass) SEPARATOR ',')inspection_item2 from ins_product where state = 1 and template_id IS NOT NULL GROUP BY ins_sample_id,man_hour_group) b GROUP
        GROUP_CONCAT(CONCAT(inspection_item,'@',inspection_item_subclass) SEPARATOR ',')inspection_item2 from
        ins_product where state = 1 and template_id IS NOT NULL GROUP BY ins_sample_id,man_hour_group) b GROUP
        BY b.ins_sample_id) c ON c.ins_sample_id = isa.id
        where (i.state = 1 or i.state = 3 or i.state = 4) and c.ins_sample_id IS not  NULL)A
        where (i.state = 1 or i.state = 3 or i.state = 4) and c.ins_sample_id IS not NULL)A
        GROUP BY
        A.id,
        A.entrust_code,
@@ -443,9 +448,10 @@
        GROUP_CONCAT(b.inspection_item2
        SEPARATOR ',')
        inspection_item from (select * ,
        GROUP_CONCAT(CONCAT(inspection_item,'@',inspection_item_subclass) SEPARATOR ',')inspection_item2 from ins_product where state = 1 and template_id IS NOT NULL GROUP BY ins_sample_id,man_hour_group) b GROUP
        GROUP_CONCAT(CONCAT(inspection_item,'@',inspection_item_subclass) SEPARATOR ',')inspection_item2 from
        ins_product where state = 1 and template_id IS NOT NULL GROUP BY ins_sample_id,man_hour_group) b GROUP
        BY b.ins_sample_id) c ON c.ins_sample_id = isa.id
        where (i.state = 1 or i.state = 3 or i.state = 4) and c.ins_sample_id IS not  NULL)A
        where (i.state = 1 or i.state = 3 or i.state = 4) and c.ins_sample_id IS not NULL)A
        GROUP BY
        A.id,
        A.entrust_code,
@@ -478,4 +484,11 @@
        from department_lims
        where id = #{depLimsId}
    </select>
    <select id="selectById2" resultType="com.yuanchu.mom.pojo.InsOrder">
        select ins_order.*, user.id prepareUserId
        from ins_order
                 join user on prepare_user = name
        where ins_order.id = #{id}
    </select>
</mapper>
inspect-server/src/main/resources/mapper/InsProductMapper.xml
@@ -84,7 +84,7 @@
                 left join ins_order io on io.id = isa.ins_order_id
                 left join user u on u.id = ipr.update_user
        where ip.ins_sample_id = #{sampleId}
          and ip.ins_result is not null
          and template_id is not null
    </select>
    <select id="selectFiberInsProduct" resultType="com.yuanchu.mom.pojo.InsProduct">
inspect-server/src/main/resources/mapper/InsReportMapper.xml
@@ -23,12 +23,13 @@
        select *
        from (
        select
        ir.*,io.entrust_code,u.name write_user_name,u1.name ratify_user,u2.name examine_user,io.laboratory
        ir.*,io.entrust_code,u.name write_user_name,u1.name ratify_user,u2.name examine_user,io.laboratory,l.id labId
        from ins_report ir
        left join ins_order io on io.id = ir.ins_order_id
        left join user u on u.id = ir.write_user_id
        left join user u1 on u1.id = ir.ratify_user_id
        left join user u2 on u2.id = ir.examine_user_id
        left join laboratory l on io.laboratory=laboratory_name
        where 1=1
        <if test="laboratory!=null and laboratory!=''">
           and  laboratory=#{laboratory}
inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -25,75 +25,9 @@
    </resultMap>
    <select id="findInsSampleAndOrder" resultType="com.yuanchu.mom.vo.InsOrderPlanVO">
        <!--SELECT  *
        FROM (
        SELECT  *
        FROM (
        SELECT
        io.id,
        io.entrust_code,
        io.type,
        io.appointed,
        io.send_time,
        GROUP_CONCAT(DISTINCT isa.sample SEPARATOR ' ') AS sample,
        isu.userName,
        isu2.checkName,
        ip.son_laboratory,
        io.ins_time,
        io.laboratory,
        ios.ins_state,
        ios.verify_tell,
        ios.verify_user
        FROM
        ins_order io
        LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id
        LEFT JOIN (
        SELECT
        ins_sample_id,
        GROUP_CONCAT(DISTINCT uu.name SEPARATOR ',') AS userName
        FROM
        ins_sample_user u
        LEFT JOIN user uu ON u.user_id = uu.id
        WHERE
        son_laboratory = #{sonLaboratory} AND u.state = 0
        GROUP BY
        ins_sample_id
        ) isu ON isu.ins_sample_id = io.id
        LEFT JOIN (
        SELECT
        ins_sample_id,
        uu.name AS checkName
        FROM
        ins_sample_user u
        LEFT JOIN user uu ON u.user_id = uu.id
        WHERE
        son_laboratory = #{sonLaboratory} AND u.state = 1
        GROUP BY
        ins_sample_id
        ) isu2 ON isu2.ins_sample_id = io.id
        LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id
        LEFT JOIN ins_order_state ios ON ios.ins_order_id = io.id AND ios.laboratory = ip.son_laboratory
        WHERE
        io.state = 1
        AND io.send_time IS NOT NULL
        AND (ip.son_laboratory = #{sonLaboratory} OR isu.userName IS NULL OR isu2.checkName IS NULL)
        <if test="userName != null and userName != ''">
            AND (isu.userName LIKE CONCAT('%', #{userName}, '%') OR isu2.checkName LIKE CONCAT('%', #{userName}, '%'))
        </if>
        GROUP BY
        io.id, ip.son_laboratory
        ORDER BY
        io.type DESC, io.id
        ) a
        WHERE
        a.ins_state IS NOT NULL
        <if test="laboratory != null and laboratory != ''">
            AND a.laboratory = #{laboratory}
        </if>
        ) b-->
        select * from(select * from(
        SELECT
        a.*,ios.ins_state,ios.verify_tell,verify_user
        a.*,ios.ins_state,ios.verify_tell,verify_user,ios.id orderStateId
        FROM
        (
        SELECT
@@ -119,7 +53,6 @@
        GROUP BY ins_sample_id
        ORDER BY ins_sample_id
        ) isu ON isu.ins_sample_id = io.id
        LEFT JOIN (
        SELECT ins_sample_id,uu.name checkName
        FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id
inspect-server/src/main/resources/static/report-template.docx
Binary files differ
system-run/src/main/resources/application-dev.yml
@@ -41,14 +41,14 @@
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/11?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#    url: jdbc:mysql://localhost:3306/11?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#    url: jdbc:mysql://10.1.200.86:3306/center-lims?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#    url: jdbc:mysql://10.16.173.59:3306/center-lims?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#    url: jdbc:mysql://10.1.13.77:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
    url: jdbc:mysql://10.1.13.77:3306/center-lims?useSSL=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#    url: jdbc:mysql://114.132.189.42:9004/center-lims?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#    username: remote_user
    username: root
    password: 123456
    username: remote_user
#    username: root
    password: zttZTT123!
    druid:
      #   Druid数据源配置
      initialSize: 5 # åˆå§‹è¿žæŽ¥æ•°
user-server/src/main/resources/mapper/UserMapper.xml
@@ -45,6 +45,7 @@
        where u.id = #{userId}
    </select>
    <select id="getUser" resultType="com.yuanchu.mom.pojo.User">
        select * from user where  depart_lims_id=FIND_IN_SET(depart_lims_id, (select  GROUP_CONCAT(id SEPARATOR ',') from department_lims where department_lims.name like '%实验室'))
        select * from user
        # where  depart_lims_id=FIND_IN_SET(depart_lims_id, (select  GROUP_CONCAT(id SEPARATOR ',') from department_lims where department_lims.name like '%实验室'))
    </select>
</mapper>