lige
2024-01-24 d8b9f897e40a9640780a64cf7569e306d65b156b
报告
2个文件已修改
90 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/resources/mapper/hosp/TjAskMedicalHistoryMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -460,35 +460,39 @@
                }
                List<TjOrder> collect = null;
                if (list.size() > 0) {
                    for (TjOrder order : list) {
                        TjCustomer tjCustomer = tjCustomerService.getById(order.getUserId());
                        if (null != tjCustomer) {
                            order.setTjCustomerSex(tjCustomer.getCusSex());
                            order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                            order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                            order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                            order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                    for (int i = 0; i < list.size(); i++) {
                        TjCustomer tjCustomer = tjCustomerService.getById(list.get(i).getUserId());
                        if (null == tjCustomer) {
                            list.remove(list.get(i));
                            continue;
                        }
                        String firmId = order.getFirmId();
                        if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) {
                            order.setDictCompName(iDictCompService.getById(String.valueOf(order.getFirmId())).getCnName());
                        list.get(i).setTjCustomerSex(tjCustomer.getCusSex());
                        list.get(i).setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                        list.get(i).setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                        list.get(i).setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                        list.get(i).setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                        String firmId = list.get(i).getFirmId();
                        if (firmId != null && null != iDictCompService.getById(String.valueOf(list.get(i).getFirmId()))) {
                            list.get(i).setDictCompName(iDictCompService.getById(String.valueOf(list.get(i).getFirmId())).getCnName());
                        }
                        if (null != order.getPacId()) {
                            if (null != tjPackageService.getById(order.getPacId())) {
                                order.setPacName(tjPackageService.getById(order.getPacId()).getPacName());
                        if (null != list.get(i).getPacId()) {
                            if (null != tjPackageService.getById(list.get(i).getPacId())) {
                                list.get(i).setPacName(tjPackageService.getById(list.get(i).getPacId()).getPacName());
                            }
                            if (null != dwDeptService.getById(order.getPacId())) {
                                order.setPacName(dwDeptService.getById(order.getPacId()).getDwDeptName());
                            if (null != dwDeptService.getById(list.get(i).getPacId())) {
                                list.get(i).setPacName(dwDeptService.getById(list.get(i).getPacId()).getDwDeptName());
                            }
                        }
                        //从打印记录查出最新打印时间
                        LambdaQueryWrapper<TjReportPrint> wqqq = new LambdaQueryWrapper<>();
                        wqqq.eq(TjReportPrint::getTjNumber, order.getTjNumber());
                        wqqq.eq(TjReportPrint::getTjNumber, list.get(i).getTjNumber());
                        wqqq.orderByDesc(TjReportPrint::getPrintTime);
                        wqqq.last("limit 1");
                        TjReportPrint one = tjReportPrintService.getOne(wqqq);
                        if (one != null) {
                            order.setPrintLastTime(one.getPrintTime());
                            list.get(i).setPrintLastTime(one.getPrintTime());
                        }
                    }
@@ -518,37 +522,40 @@
        Page<TjOrder> page2 = tjOrderService.page(page1, wq);
        List<TjOrder> list = page2.getRecords();
        if (list != null) {
            for (TjOrder order : list) {
                TjCustomer tjCustomer = tjCustomerService.getById(order.getUserId());
                if (null != tjCustomer) {
                    order.setTjCustomerSex(tjCustomer.getCusSex());
                    order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                    order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                    order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
            for (int i = 0; i < list.size(); i++) {
                TjCustomer tjCustomer = tjCustomerService.getById(list.get(i).getUserId());
                if (null == tjCustomer) {
                    list.remove(list.get(i));
                    continue;
                }
                list.get(i).setTjCustomerSex(tjCustomer.getCusSex());
                list.get(i).setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                list.get(i).setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                list.get(i).setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                    if (tjCustomer.getCusIdcard() != null) {
                        order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                    list.get(i).setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                    }
                String firmId = list.get(i).getFirmId();
                if (firmId != null && null != iDictCompService.getById(String.valueOf(list.get(i).getFirmId()))) {
                    list.get(i).setDictCompName(iDictCompService.getById(String.valueOf(list.get(i).getFirmId())).getCnName());
                }
                String firmId = order.getFirmId();
                if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) {
                    order.setDictCompName(iDictCompService.getById(String.valueOf(order.getFirmId())).getCnName());
                if (null != list.get(i).getPacId()) {
                    if (null != tjPackageService.getById(list.get(i).getPacId())) {
                        list.get(i).setPacName(tjPackageService.getById(list.get(i).getPacId()).getPacName());
                }
                if (null != order.getPacId()) {
                    if (null != tjPackageService.getById(order.getPacId())) {
                        order.setPacName(tjPackageService.getById(order.getPacId()).getPacName());
                    }
                    if (null != dwDeptService.getById(order.getPacId())) {
                        order.setPacName(dwDeptService.getById(order.getPacId()).getDwDeptName());
                    if (null != dwDeptService.getById(list.get(i).getPacId())) {
                        list.get(i).setPacName(dwDeptService.getById(list.get(i).getPacId()).getDwDeptName());
                    }
                }
                //从打印记录查出最新打印时间
                LambdaQueryWrapper<TjReportPrint> wqqq = new LambdaQueryWrapper<>();
                wqqq.eq(TjReportPrint::getTjNumber, order.getTjNumber());
                wqqq.eq(TjReportPrint::getTjNumber, list.get(i).getTjNumber());
                wqqq.orderByDesc(TjReportPrint::getPrintTime);
                wqqq.last("limit 1");
                TjReportPrint one = tjReportPrintService.getOne(wqqq);
                if (one != null) {
                    order.setPrintLastTime(one.getPrintTime());
                    list.get(i).setPrintLastTime(one.getPrintTime());
                }
            }
        }
@@ -1070,7 +1077,8 @@
            List<TbTransition> list = transitionService.getTbTransitionListByCusIdAndPac(cusId, String.valueOf(pacId));
            if (null == list || list.size() == 0) {
                transitionService.deletedTbTransitionListByCusIdAndPac(cusId,cardId);
                if (redisCache.hasKey(cardId+cusId + "cusId")) redisCache.deleteCacheMapValue(cardId+cusId + "cusId", cardId+cusId);
                if (redisCache.hasKey(cardId + cusId + "cusId"))
                    redisCache.deleteCacheMapValue(cardId + cusId + "cusId", cardId + cusId);
                if (redisCache.hasKey(cardId+cusId)) {
                    tbTransitionList = new ArrayList<>();
                    redisCache.deleteObject(cardId+cusId);
ltkj-hosp/src/main/resources/mapper/hosp/TjAskMedicalHistoryMapper.xml
@@ -36,6 +36,10 @@
            <result property="deleted" column="deleted"/>
            <result property="fromBy" column="from_by"/>
            <result property="zzsjj" column="zzsjj" typeHandler="com.ltkj.common.mybatis.JsonStringArrayTypeHandler"/>
        <result property="contactPoison" column="contact_poison"/>
        <result property="gongZhong" column="gong_zhong"/>
        <result property="gongLing" column="gong_ling"/>
        <result property="jhgl" column="jhgl"/>
    </resultMap>
        <resultMap id="TjAskMedicalHistoryTjAskHistorysResult" type="TjAskMedicalHistory" extends="TjAskMedicalHistoryResult">
@@ -61,7 +65,7 @@
    <sql id="selectTjAskMedicalHistoryVo">
        select ask_id, cus_id, cus_name, work, work_status, medical_history, chuchao, jingqi, zhouqi, mociage, zinv, liuchan,
               zaochan, sichan, yichangtai, xiyan, xiyanpinlv, xiyanyear, yinjiu, yinjiupinlv, yinjiuyear, qita, remark, create_by,
               create_time, update_by, update_time, deleted,from_by,zzsjj
               create_time, update_by, update_time, deleted,from_by,zzsjj,contact_poison,gong_zhong,gong_ling,jhgl
        from tj_ask_medical_history
    </sql>