lige
2023-12-13 fd1f0a356eb828503bec075a471f8860b601cd0b
更改初审审核状态时
4个文件已修改
86 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java
@@ -161,6 +161,22 @@
        return AjaxResult.success(one);
    }
    @GetMapping("/test")
    public AjaxResult getHysqdByTmh(String id) {
        List<LtkjHysqd> one = testMapper.getHysqdByTmh(id);
        DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
        ltkjHysqdService.saveBatch(one);
        DynamicDataSourceContextHolder.clearDataSourceType();
        for (LtkjHysqd ltkjHysqd : one) {
            List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(ltkjHysqd.getTmh());
            DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
            ltkjHybgdService.saveBatch(one1);
            DynamicDataSourceContextHolder.clearDataSourceType();
        }
        return AjaxResult.success();
    }
}
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
@@ -96,7 +96,6 @@
    private LtkjHysqdService ltkjHysqdService;
    @GetMapping("/getOperationPermissionsByTjNum")
    @ApiOperation(value = "(初审页面  和 医生页面)根据体检号获取是否可操作权限接口  true可操作  反之不可")
    public AjaxResult getOperationPermissionsByTjNum(@ApiParam(value = "体检号") @RequestParam String tjNumber) {
@@ -275,6 +274,8 @@
                    confirmLog.setTjNum(tjNumber);
                    confirmLog.setStatus(status);
                    confirmLogService.save(confirmLog);
                    asyncService.wCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, 0, null, null, null));
                    asyncService.yCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, 1, null, null, null));
                    return AjaxResult.success("操作成功");
                }
                return AjaxResult.error("操作失败");
@@ -286,45 +287,45 @@
    /**
     * 同步数据接口
     * 同步sql server数据到本地数据库数据接口
     */
    @GetMapping("/dataSynchronization")
    @ApiOperation(value = "同步数据接口")
    @Transactional
    public AjaxResult dataSynchronization(@RequestParam String tjNumber){
    @ApiOperation(value = "同步sql server数据到本地数据库数据接口")
    public AjaxResult dataSynchronization(@RequestParam String tjNumber) {
        List<LtkjHysqd> one = testMapper.getHysqdByTmh(tjNumber);
        DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
        for (LtkjHysqd hysqd : one) {
            ltkjHysqdService.save(hysqd);
            List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(hysqd.getTmh());
        if (one!=null){
            DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
            for (LtkjHybgd hybgd : one1) {
                ltkjHybgdService.save(hybgd);
            }
            ltkjHysqdService.saveBatch(one);
            DynamicDataSourceContextHolder.clearDataSourceType();
            for (LtkjHysqd ltkjHysqd : one) {
                List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(ltkjHysqd.getTmh());
                if (one1!=null){
                    DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
                    ltkjHybgdService.saveBatch(one1);
                    DynamicDataSourceContextHolder.clearDataSourceType();
                }
            }
        }
        DynamicDataSourceContextHolder.clearDataSourceType();
        List<LtkjExamJcsqd> one2 = testMapper.getExamJcsqdTmh(tjNumber);
        DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
        for (LtkjExamJcsqd examJcsqd : one2) {
            ltkjExamJcsqdService.save(examJcsqd);
            List<LtkjExamJcbgd> one3 = testMapper.getExamJcbgdByTjh(examJcsqd.getTmh());
        if (one2!=null){
            DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
            for (LtkjExamJcbgd examJcbgd : one3) {
                ltkjExamJcbgdService.save(examJcbgd);
            }
            ltkjExamJcsqdService.saveBatch(one2);
            DynamicDataSourceContextHolder.clearDataSourceType();
            for (LtkjExamJcsqd ltkjExamJcsqd : one2) {
                List<LtkjExamJcbgd> one3 = testMapper.getExamJcbgdByTjh(ltkjExamJcsqd.getTmh());
                if (one3!=null){
                    DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name());
                    ltkjExamJcbgdService.saveBatch(one3);
                    DynamicDataSourceContextHolder.clearDataSourceType();
                }
            }
        }
        DynamicDataSourceContextHolder.clearDataSourceType();
        return AjaxResult.success();
        return AjaxResult.success("同步成功");
    }
    /**
     * 查询体检记录客户列表
@@ -493,7 +494,7 @@
    @GetMapping("/updateCheckType")
    @ApiOperation(value = "总检点击体检信息详情")
    public AjaxResult updateCheckType(@ApiParam(value = "客户体检号") @RequestParam String tjNumber) {
        if(redisCache.hasKey("updateCheckType"+tjNumber)) {
        if (redisCache.hasKey("updateCheckType" + tjNumber)) {
            List<Map<String, Object>> cacheMapValue = redisCache.getCacheMapValue("updateCheckType" + tjNumber, tjNumber);
            return AjaxResult.success(cacheMapValue);
        }
@@ -526,9 +527,9 @@
                if (null != tjOrderDetails && tjOrderDetails.size() > 0) {
                    for (TjOrderDetail tjOrderDetail : tjOrderDetails) {
                        final TjProject byId = projectService.selectTjProjectByProId(tjOrderDetail.getProId());
                        if(null==byId){
                        if (null == byId) {
                            detailService.removeById(tjOrderDetail.getOrderDetailId());
                        }else {
                        } else {
                            tjOrderDetail.setProject(byId);
                        }
                        List<TjStandard> list2 = tjStandardService.getTjStandardListByProId(String.valueOf(tjOrderDetail.getProId()));
@@ -538,13 +539,13 @@
                            tjOrderDetail.setStandard(list2.get(0));
                        } else {
                            final int ageType = StringUtils.getAgeType(DateUtil.ageOfNow(customer.getCusBrithday()));
                            TjStandard tjStandard1=tjStandardService.getListBySexAndType(customer.getCusSex(),ageType, String.valueOf(tjOrderDetail.getProId()));
                            TjStandard tjStandard1 = tjStandardService.getListBySexAndType(customer.getCusSex(), ageType, String.valueOf(tjOrderDetail.getProId()));
                            tjOrderDetail.setStandard(tjStandard1);
                        }
                    }
                    String summary = remark.getSummary();
                    if (null != summary) {
                          String[] split = summary.split(";");
                        String[] split = summary.split(";");
//                        List<Long> longList = new ArrayList<>();
//                        for (String str : split) {
//                            if(!"".equals(str)){
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -791,7 +791,7 @@
     */
    @PostMapping
    @ApiOperation(value = "体检签到登记接口")
    @Transactional
    //@Transactional  (切换数据库出错,所以注释)
    public AjaxResult addOrderAndDetail(@RequestBody TjOrder tjOrder) throws Exception {
        Long userId = Long.valueOf(SecurityUtils.getLoginUser().getUserId());
        SysUser sysUser = userService.getById(userId);
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java
@@ -100,10 +100,11 @@
    public List<LtkjMiddleDetail> getMiddleDetailByHeadId(String id);
    //根据体检号  对应的   化验项目    +“血清”标本
    //根据体检号  对应的   化验项目    +标本
    @DataSource(value = DataSourceType.SLAVE_HIS)
    @Select("SELECT * FROM histjv_Ltkj_hysqd where tjh=#{id}")
    public List<LtkjHysqd> getHysqdByTmh(String id);
    //化验项目下的子项    传上面的接口的tmh
    @DataSource(value = DataSourceType.SLAVE_HIS)
    @Select("SELECT * FROM histjv_Ltkj_hybgd where tmh=#{id}")