zjh
2025-03-19 a3721222ee4ef79211db6a4c5738205c4a381f7c
zjh20250319
4个文件已修改
500 ■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java 368 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjRules.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
@@ -465,382 +465,14 @@
                                       @ApiParam(value = "姓名)") @RequestParam(required = false) String name,
                                       @ApiParam(value = "页码数(默认1)") @RequestParam(defaultValue = "1") Integer page,
                                       @ApiParam(value = "显示条数(默认10)") @RequestParam(defaultValue = "10") Integer pageSize) {
//        String userId = SecurityUtils.getLoginUser().getUserId();
//        Integer ksId = null;
//        SysUser sysUser = null;
//        if (null != userId) {
//            sysUser = userService.getById(Long.valueOf(userId));
//            if (null != sysUser) {
//                ksId = Math.toIntExact(sysUser.getDeptId());
//            }
//        }
//        if (ksId == null) {
//            return AjaxResult.error("请输入科室id");
//        }
        //A30化验
        //根据当前登陆的人的科室id,获取该科室下的所有项目
//        List<Long> postIds = sysUser.getPostIds();
        List<Long> ksproList = null;
//        if (postIds != null) {
//            for (Long postId : postIds) {
//                LambdaQueryWrapper<SysUserPost> wq111 = new LambdaQueryWrapper<>();
//                wq111.eq(SysUserPost::getPostId, postId);
//                SysUserPost one = userPostService.getOne(wq111);
//                if (one != null) {
//                    SysPost byId = postService.getById(one.getPostId());
//                    if (byId.getPostName().equals("录入员")) {
//                        ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId));
//                    }
//                }
//            }
//        } else {
//            ksproList = projectService.getKsTjProjectIdList();
//        }
//        if(sysUser.getUserName().equals("10001")){
        ksproList = projectService.getHuaYanProId();
//        }
//        else {
//            ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId));
//        }
        if (ksproList == null || ksproList.size() == 0) {
            return AjaxResult.error("请完善科室项目信息");
        }
        //筛选化验的项目。
//        ksproList = ksproList.stream()
//                .filter(element -> element ==1633660948860522629L)
//                .collect(Collectors.toList());
        List<TjCustomer> customerLis = new ArrayList<>();
/*        //根据体检号查
        if (null != tjNumber) {
            List<TjOrder> orderList = orderService.getOrderListByLikeTjNum(tjNumber);
            if (null == orderList) {
                return AjaxResult.success("暂时没有数据");
            }
            for (TjOrder order : orderList) {
                List<TjOrderDetail> list = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
                if (list.size() == 0) {
                    continue;
                }
                LambdaQueryWrapper<TjOrderRemark> wqs = new LambdaQueryWrapper<>();
                wqs.eq(TjOrderRemark::getTjNumber, order.getTjNumber());
                wqs.in(TjOrderRemark::getType, 0,3);
                List<TjOrderRemark> lists = remarkService.list(wqs);
                TjCustomer customer = customerService.getById(order.getUserId());
                //遍历项目 判断是否有重大阳性  标记
                for (TjOrderDetail tjOrderDetail11 : list) {
                    customer.setIsPositive(tjOrderDetail11.getIsPositive());
                    if (tjOrderDetail11.getIsPositive()==1){
                        break;
                    }
                }
                customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
                customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                if (null != lists && lists.size() > 0) {
                    StringBuilder stringBuilder = new StringBuilder();
                    for (TjOrderRemark remark : lists) {
                        TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
                        TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
                        if (one.getFlowingWaterId() != null) {
                            stringBuilder.append(byId.getProName()).append(";");
                        }
                    }
                    customer.setNotCheckeds(String.valueOf(stringBuilder));
                    customer.setTjStatus(0L);
                } else {
                    customer.setTjStatus(1L);
                    customer.setNotCheckeds("无");
                }
                if (order.getTjType().equals("1")) {
                    customer.setTjType("团体");
                }
                if (order.getTjType().equals("2")) {
                    customer.setTjType("个人");
                }
                customer.setTjTime(order.getCreateTime());
                customer.setTjNumber(order.getTjNumber());
                customer.setOrderId(order.getOrderId());
                customer.setIsHz(order.getIsHz());
                customerLis.add(customer);
            }
            if (customerLis.size() > 0) {
                List<TjCustomer> customerList = customerLis.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customerList);
                Map<String, Object> map = new HashMap<>();
                map.put("date", customerList);
                map.put("total", customerLis.size());
                return AjaxResult.success(map);
            } else {
                return AjaxResult.success("暂无数据");
            }
        }
        //根据姓名查询
        if (null != name && !"".equals(name)) {
            LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
            wq.like(TjCustomer::getCusName, name);
            List<TjCustomer> list = customerService.list(wq);
            List<TjCustomer> list11111 = new ArrayList<>();
            if (null != list && list.size() > 0) {
                for (TjCustomer customer : list) {
                    customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
                    customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                    customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                    List<TjOrder> orderList = orderService.getOrderListByCusId(String.valueOf(customer.getCusId()));
                    if (null != orderList && orderList.size() > 0) {
                        for (TjOrder order : orderList) {
                            List<TjOrderDetail> list111 = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
                            if (list111.size() == 0) {
                                continue;
                            }
                            //遍历项目 判断是否有重大阳性  标记
                            for (TjOrderDetail tjOrderDetail11 : list111) {
                                customer.setIsPositive(tjOrderDetail11.getIsPositive());
                                if (tjOrderDetail11.getIsPositive()==1){
                                    break;
                                }
                            }
                            List<TjOrderRemark> lists = remarkService.getTjOrderRemarkListByYjNum(order.getTjNumber());
                            if (null != lists && lists.size() > 0) {
                                StringBuilder stringBuilder = new StringBuilder();
                                for (TjOrderRemark remark : lists) {
                                    TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
                                    TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
                                    if (one.getFlowingWaterId() != null) {
                                        stringBuilder.append(byId.getProName()).append(";");
                                    }
                                }
                                customer.setNotCheckeds(String.valueOf(stringBuilder));
                                if (null == customer.getNotCheckeds()) customer.setNotCheckeds("全部已检");
                                customer.setTjStatus(0L);
                            } else {
                                customer.setNotCheckeds("无");
                                customer.setTjStatus(1L);
                            }
                            if (order.getTjType().equals("1")) {
                                customer.setTjType("团体");
                            }
                            if (order.getTjType().equals("2")) {
                                customer.setTjType("个人");
                            }
                            customer.setTjTime(order.getCreateTime());
                            customer.setTjNumber(order.getTjNumber());
                            customer.setOrderId(order.getOrderId());
                            customer.setIsHz(order.getIsHz());
                            list11111.add(customer);
                        }
                    }
                }
                if (list11111.size() == 0) {
                    return AjaxResult.success("暂无数据");
                }
                Map<String, Object> map = new HashMap<>();
                List<TjCustomer> customers = list11111.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customers);
                map.put("customers", customers);
                map.put("total", list11111.size());
                return AjaxResult.success(map);
            } else {
                return AjaxResult.success("暂无数据");
            }
        }
        List<TjCustomer> customerLists = null;*/
//        //根据体检号查
//        if (null != tjNumber) {
//            List<TjOrder> orderList = orderService.getOrderListByLikeTjNum(tjNumber);
//            if (null == orderList) {
//                return AjaxResult.success("暂时没有数据");
//            }
//            for (TjOrder order : orderList) {
//                List<TjOrderDetail> list = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
//                if (list.size() == 0) {
//                    continue;
//                }
//                LambdaQueryWrapper<TjOrderRemark> wqs = new LambdaQueryWrapper<>();
//                wqs.eq(TjOrderRemark::getTjNumber, order.getTjNumber());
//                wqs.in(TjOrderRemark::getType, 0,3);
//                List<TjOrderRemark> lists = remarkService.list(wqs);
//                TjCustomer customer = customerService.getById(order.getUserId());
//
//                //遍历项目 判断是否有重大阳性  标记
//                for (TjOrderDetail tjOrderDetail11 : list) {
//                    customer.setIsPositive(tjOrderDetail11.getIsPositive());
//                    if (tjOrderDetail11.getIsPositive()==1){
//                        break;
//                    }
//                }
//
//                customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
//                customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
//                customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
//                if (null != lists && lists.size() > 0) {
//                    StringBuilder stringBuilder = new StringBuilder();
//                    for (TjOrderRemark remark : lists) {
//                        TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
//                        TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
//                        if (one.getFlowingWaterId() != null) {
//                            stringBuilder.append(byId.getProName()).append(";");
//                        }
//
//                    }
//                    customer.setNotCheckeds(String.valueOf(stringBuilder));
//                    customer.setTjStatus(0L);
//                } else {
//                    customer.setTjStatus(1L);
//                    customer.setNotCheckeds("无");
//                }
//                if (order.getTjType().equals("1")) {
//                    customer.setTjType("团体");
//                }
//                if (order.getTjType().equals("2")) {
//                    customer.setTjType("个人");
//                }
//                customer.setTjTime(order.getCreateTime());
//                customer.setTjNumber(order.getTjNumber());
//                customer.setOrderId(order.getOrderId());
//                customer.setIsHz(order.getIsHz());
//                customer.setTjCategory(order.getTjCategory());
//                customerLis.add(customer);
//            }
//            if (customerLis.size() > 0) {
//                List<TjCustomer> customerList = customerLis.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//                Collections.reverse(customerList);
//                Map<String, Object> map = new HashMap<>();
//                map.put("date", customerList);
//                map.put("total", customerLis.size());
//                return AjaxResult.success(map);
//            } else {
//                return AjaxResult.success("暂无数据");
//            }
//        }
//
//        //根据姓名查询
//        if (null != name && !"".equals(name)) {
//            LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
//            wq.like(TjCustomer::getCusName, name);
//            List<TjCustomer> list = customerService.list(wq);
//            List<TjCustomer> list11111 = new ArrayList<>();
//            if (null != list && list.size() > 0) {
//                for (TjCustomer customer : list) {
//                    customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
//                    customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
//                    customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
//                    List<TjOrder> orderList = orderService.getOrderListByCusId(String.valueOf(customer.getCusId()));
//                    if (null != orderList && orderList.size() > 0) {
//                        for (TjOrder order : orderList) {
//                            List<TjOrderDetail> list111 = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
//                            if (list111.size() == 0) {
//                                continue;
//                            }
//                            //遍历项目 判断是否有重大阳性  标记
//                            for (TjOrderDetail tjOrderDetail11 : list111) {
//                                customer.setIsPositive(tjOrderDetail11.getIsPositive());
//                                if (tjOrderDetail11.getIsPositive()==1){
//                                    break;
//                                }
//                            }
//                            List<TjOrderRemark> lists = remarkService.getTjOrderRemarkListByYjNum(order.getTjNumber());
//                            if (null != lists && lists.size() > 0) {
//                                StringBuilder stringBuilder = new StringBuilder();
//                                for (TjOrderRemark remark : lists) {
//                                    TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
//                                    TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
//                                    if (one.getFlowingWaterId() != null) {
//                                        stringBuilder.append(byId.getProName()).append(";");
//                                    }
//                                }
//                                customer.setNotCheckeds(String.valueOf(stringBuilder));
//                                if (null == customer.getNotCheckeds()) customer.setNotCheckeds("全部已检");
//                                customer.setTjStatus(0L);
//                            } else {
//                                customer.setNotCheckeds("无");
//                                customer.setTjStatus(1L);
//                            }
//                            if (order.getTjType().equals("1")) {
//                                customer.setTjType("团体");
//                            }
//                            if (order.getTjType().equals("2")) {
//                                customer.setTjType("个人");
//                            }
//                            customer.setTjTime(order.getCreateTime());
//                            customer.setTjNumber(order.getTjNumber());
//                            customer.setOrderId(order.getOrderId());
//                            customer.setIsHz(order.getIsHz());
//                            customer.setTjCategory(order.getTjCategory());
//                            list11111.add(customer);
//                        }
//                    }
//                }
//                if (list11111.size() == 0) {
//                    return AjaxResult.success("暂无数据");
//                }
//                Map<String, Object> map = new HashMap<>();
//                List<TjCustomer> customers = list11111.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//                Collections.reverse(customers);
//                map.put("customers", customers);
//                map.put("total", list11111.size());
//                return AjaxResult.success(map);
//            } else {
//                return AjaxResult.success("暂无数据");
//            }
//        }
//        List<TjCustomer> customerLists = new ArrayList<>();
//        String key="*";
//        if(sysUser.isAdmin()){
//            key="ks"+":*";
//        }else {
//            key="ks:"+ksId+":*";
//        }
//        ScanOptions options = ScanOptions.scanOptions()
//                //这里指定每次扫描key的数量(很多博客瞎说要指定Integer.MAX_VALUE,这样的话跟        keys有什么区别?)
//                .count(10000)
//                .match(key).build();
//        RedisSerializer<String> redisSerializer = (RedisSerializer<String>) redisTemplate.getKeySerializer();
//        0未检,1已检
        Map<String, Object> map = null;
        if (type == 0) {
//            Cursor cursor = redisTemplate.executeWithStickyConnection(redisConnection -> new ConvertingCursor<>(redisConnection.scan(options), redisSerializer::deserialize));
//            List<TjCustomer> customers = new ArrayList<>();
//            while(cursor.hasNext()){
//                String s = cursor.next().toString();
//                TjCustomer wj = redisCache.getCacheMapValue(s,"0");
//                if(null !=wj){
//                    customers.add(wj);
//                }
//            }
////            //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a
//            cursor.close();
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
            map = deptService.getSysDeptHyAndYxYjWjCustomerList13("A30", name, tjNumber, 0, page, pageSize);
//            customerLists = customers;
        }
        if (type == 1) {
//            Cursor cursor = redisTemplate.executeWithStickyConnection(redisConnection -> new ConvertingCursor<>(redisConnection.scan(options), redisSerializer::deserialize));
//            List<TjCustomer> customers = new ArrayList<>();
//            while(cursor.hasNext()){
//                String s = cursor.next().toString();
//                TjCustomer wj = redisCache.getCacheMapValue(s,"1");
//                if(null !=wj){
//                    customers.add(wj);
//                }
//            }
////            //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a
//            cursor.close();
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
            map = deptService.getSysDeptHyAndYxYjWjCustomerList13("A30", name, tjNumber, 1, page, pageSize);
//            customerLists = customers;
        }
//        asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId));
//        AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis);
//        if (map != null) return map;
        return AjaxResult.success(map);
    }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
@@ -815,7 +815,7 @@
                                resultMsg = "化验项目暂时未出结果,请稍后同步!!!";
                            }
                            //同步化验项目
//                            testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), doctorId);
                            testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), doctorId);
                        }
                        /*同步检查 his接口*/
                        if (null != jianChaBaoGaoDan && !jianChaBaoGaoDan.isEmpty()) {
@@ -892,9 +892,9 @@
                        else return AjaxResult.error(resultMsg);
                    }
                    //化验
                    testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), doctorId);
//                    testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), doctorId);
                    //检查
                    jcsqdService.saveLtkjExamJcsqd(order.getCardId());
//                    jcsqdService.saveLtkjExamJcsqd(order.getCardId());
                    return AjaxResult.success("同步成功");
                }
                return AjaxResult.error("未查到该人员体检记录");
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -35,6 +35,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.DigestUtils;
@@ -58,6 +59,7 @@
@RestController
@RequestMapping("/hosp/customer")
@Api(tags = "客户管理接口")
@Slf4j
public class TjCustomerController extends BaseController {
    @Resource
    private ITjCustomerService tjCustomerService;
@@ -628,17 +630,18 @@
    @RepeatSubmit
    public AjaxResult edit(@RequestBody @ApiParam(value = "客户对象") TjCustomer tjCustomer) {
        TjCustomer customer = tjCustomerService.getById(tjCustomer.getCusId());
        if(null==customer){
            return AjaxResult.error("该人员不存在!");
        }
        try {
            TjCustomer customer = tjCustomerService.getById(tjCustomer.getCusId());
            if(null==customer){
                return AjaxResult.error("该人员不存在!");
            }
        String cusPhone = tjCustomer.getCusPhone();
        if (null == cusPhone) {
            return AjaxResult.error("手机号不能为空");
        }
        String sfjysfzh = sysConfigService.selectConfigByKey("sfjysfzh");
        String sfjysjh = sysConfigService.selectConfigByKey("sfjysjh");
            String cusPhone = tjCustomer.getCusPhone();
            if (null == cusPhone) {
                return AjaxResult.error("手机号不能为空");
            }
            String sfjysfzh = sysConfigService.selectConfigByKey("sfjysfzh");
            String sfjysjh = sysConfigService.selectConfigByKey("sfjysjh");
            //判断身份证号格式是否正确
            if(sfjysfzh.equalsIgnoreCase("Y")){
@@ -655,59 +658,64 @@
            }
        //判断身份证号格式是否正确
        if(sfjysjh.equalsIgnoreCase("Y")){
            if (!(MatchUtils.isMobileNO(tjCustomer.getCusPhone())))
                return AjaxResult.error("手机号错误");
        }
            //判断身份证号格式是否正确
            if(sfjysjh.equalsIgnoreCase("Y")){
                if (!(MatchUtils.isMobileNO(tjCustomer.getCusPhone())))
                    return AjaxResult.error("手机号错误");
            }
        tjCustomer.setCusPhone(cusPhone);
        tjCustomer.setPym(PinyinUtil.getFirstLetter(tjCustomer.getCusName(),""));
        if (tjCustomerService.updateById(tjCustomer)) {
            String config = sysConfigService.selectConfigByKey("sfkqdyhis");
            if (null != config && config.equals("Y")) {
                AjaxResult result = controller.Outpincreateapply(tjCustomer);
                String result1 = getAjaxResult(result);
                JSONObject object = getJSONObject(result1);
                String code = object.getStr("ResultCode");
                if (code.equals("0")) {
            tjCustomer.setCusPhone(cusPhone);
            tjCustomer.setPym(PinyinUtil.getFirstLetter(tjCustomer.getCusName(),""));
            tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd"));
            if (tjCustomerService.updateById(tjCustomer)) {
                String config = sysConfigService.selectConfigByKey("sfkqdyhis");
                if (null != config && config.equals("Y")) {
                    AjaxResult result = controller.Outpincreateapply(tjCustomer);
                    String result1 = getAjaxResult(result);
                    JSONObject object = getJSONObject(result1);
                    String code = object.getStr("ResultCode");
                    if (code.equals("0")) {
                        return AjaxResult.success();
                    }
                    return AjaxResult.error(object.getStr("ResultContent"));
                }else {
                    String s = sysConfigService.selectConfigByKey("is_request_common_his_api");
                    if (null != s && s.equals("Y")){
                        String apiUrl = sysConfigService.selectConfigByKey("common_api_url");
                        String hospbm = sysConfigService.selectConfigByKey("common_api_service_hospbm");
                        HashMap<String, Object> map = new HashMap<>();
                        map.put("pationId",tjCustomer.getPationId());
                        map.put("cardId",tjCustomer.getCardId());
                        map.put("cusName",tjCustomer.getCusName());
                        map.put("cusSex",tjCustomer.getCusSex());
                        map.put("cusIdCard",tjCustomer.getCusIdcard());
                        map.put("compId","");
                        map.put("cusBrithday",tjCustomer.getCusBrithday() != null ? DateUtil.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd") : "");
                        map.put("cusAddr",tjCustomer.getCusAddr());
                        map.put("cusPhone",tjCustomer.getCusPhone());
                        map.put("compName","");
                        String isCreat = HttpClientUtils.sendPost(apiUrl+"/api/his/"+hospbm+"/update", map);
                        JSONObject isCreatjsonObject = JSONUtil.parseObj(isCreat);
                        if (isCreatjsonObject.getStr("code").equals("200")){
    //                        JSONObject data = isCreatjsonObject.getJSONObject("data");
    //                        tjCustomer.setPationId(data.getStr("pationId"));
    //                        tjCustomer.setCardId(data.getStr("cardId"));
    //                        tjCustomer.setHisJzkh(data.getStr("cardId"));
    //                        if (tjCustomerService.updateById(tjCustomer)) {
                                return AjaxResult.success(tjCustomer);
    //                        }
                        }else {
                            return AjaxResult.error();
                        }
                    }
                    return AjaxResult.success();
                }
                return AjaxResult.error(object.getStr("ResultContent"));
            }else {
                String s = sysConfigService.selectConfigByKey("is_request_common_his_api");
                if (null != s && s.equals("Y")){
                    String apiUrl = sysConfigService.selectConfigByKey("common_api_url");
                    String hospbm = sysConfigService.selectConfigByKey("common_api_service_hospbm");
                    HashMap<String, Object> map = new HashMap<>();
                    map.put("pationId",tjCustomer.getPationId());
                    map.put("cardId",tjCustomer.getCardId());
                    map.put("cusName",tjCustomer.getCusName());
                    map.put("cusSex",tjCustomer.getCusSex());
                    map.put("cusIdCard",tjCustomer.getCusIdcard());
                    map.put("compId","");
                    map.put("cusBrithday",tjCustomer.getCusBrithday() != null ? DateUtil.format(tjCustomer.getCusBrithday(), "yyyy-MM-dd") : "");
                    map.put("cusAddr",tjCustomer.getCusAddr());
                    map.put("cusPhone",tjCustomer.getCusPhone());
                    map.put("compName","");
                    String isCreat = HttpClientUtils.sendPost(apiUrl+"/api/his/"+hospbm+"/update", map);
                    JSONObject isCreatjsonObject = JSONUtil.parseObj(isCreat);
                    if (isCreatjsonObject.getStr("code").equals("200")){
//                        JSONObject data = isCreatjsonObject.getJSONObject("data");
//                        tjCustomer.setPationId(data.getStr("pationId"));
//                        tjCustomer.setCardId(data.getStr("cardId"));
//                        tjCustomer.setHisJzkh(data.getStr("cardId"));
//                        if (tjCustomerService.updateById(tjCustomer)) {
                            return AjaxResult.success(tjCustomer);
//                        }
                    }else {
                        return AjaxResult.error();
                    }
                }
                return AjaxResult.success();
            }
            return AjaxResult.error();
        } catch (Exception e) {
            log.error(e.toString());
            throw new RuntimeException(e);
        }
       return AjaxResult.error();
    }
    /**
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjRules.java
@@ -158,6 +158,8 @@
    //建议标题
    private String adviceBt;
    private String yxbx;
    @TableField(exist = false)
    private String jm;