| | |
| | | @PostMapping("/lis/getList") |
| | | public AjaxResult getLisList(@RequestBody String json) { |
| | | // log.info("lis接口参数->{}",JSONUtil.toJsonStr(json)); |
| | | cn.hutool.json.JSONObject parseObj = JSONUtil.parseObj(json); |
| | | String tjNum = StrUtil.isBlank(parseObj.getStr("tjNum")) ? null : parseObj.getStr("tjNum"); |
| | | String name = StrUtil.isBlank(parseObj.getStr("name")) ? null : parseObj.getStr("name"); |
| | | String start = StrUtil.isBlank(parseObj.getStr("start")) ? null : parseObj.getStr("start"); |
| | | String end = StrUtil.isBlank(parseObj.getStr("end")) ? null : parseObj.getStr("end"); |
| | | String mzh = null; |
| | | if (tjNum == null && name == null) { |
| | | return AjaxResult.error("体检号和名字不能都为空"); |
| | | } |
| | | if (tjNum != null) { |
| | | LambdaQueryWrapper<TjOrder> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjOrder::getTjNumber, tjNum); |
| | | TjOrder order = tjOrderService.getOne(wrapper); |
| | | mzh = order.getCardId(); |
| | | LambdaQueryWrapper<TjCustomer> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TjCustomer::getCusId, order.getUserId()); |
| | | TjCustomer tjCustomer = tjCustomerService.getOne(wrapper1); |
| | | name = tjCustomer.getCusName(); |
| | | } |
| | | List<Map<String, Object>> jcList = testMapper.getLisJyList(name, mzh, start, end); |
| | | return AjaxResult.success(jcList); |
| | | // String json1 = "[{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四1\",\"patientAge\":\"20\",\"mzh\":\"810001246120745\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\",\"conclusion\":\"异常\",\"tjStandardGtValue\":\"1 - 5\",\"company\":\"毫克\",\"checkDoctorName\":\"检测医师\",\"jcxmid\":\"123\",\"shys\":\"审核医师\"},{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四2\",\"patientAge\":\"20\",\"mzh\":\"201474534\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\"},{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四3\",\"patientAge\":\"20\",\"mzh\":\"201474534\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\"},{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四3\",\"patientAge\":\"20\",\"mzh\":\"201474534\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\"},{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四3\",\"patientAge\":\"20\",\"mzh\":\"201474534\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\"},{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四3\",\"patientAge\":\"20\",\"mzh\":\"201474534\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\"},{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四3\",\"patientAge\":\"20\",\"mzh\":\"201474534\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\"},{\"deptName\":\"科室\",\"gender\":\"男\",\"brid\":\"sqd445314589914\",\"checkParts\":\"血液\",\"project\":\"1.0-2.0\",\"examinationDate\":\"2025-02-11 05:12:23\",\"proResult\":\"1.0\",\"name\":\"赵四3\",\"patientAge\":\"20\",\"mzh\":\"201474534\",\"reportDoctorName\":\"医师\",\"proName\":\"血液分析\"}]"; |
| | | // return AjaxResult.success(JSONUtil.parseArray(json1)); |
| | | // cn.hutool.json.JSONObject parseObj = JSONUtil.parseObj(json); |
| | | // String tjNum = StrUtil.isBlank(parseObj.getStr("tjNum")) ? null : parseObj.getStr("tjNum"); |
| | | // String name = StrUtil.isBlank(parseObj.getStr("name")) ? null : parseObj.getStr("name"); |
| | | // String start = StrUtil.isBlank(parseObj.getStr("start")) ? null : parseObj.getStr("start"); |
| | | // String end = StrUtil.isBlank(parseObj.getStr("end")) ? null : parseObj.getStr("end"); |
| | | // String mzh = null; |
| | | // if (tjNum == null && name == null) { |
| | | // return AjaxResult.error("体检号和名字不能都为空"); |
| | | // } |
| | | // if (tjNum != null) { |
| | | // LambdaQueryWrapper<TjOrder> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(TjOrder::getTjNumber, tjNum); |
| | | // TjOrder order = tjOrderService.getOne(wrapper); |
| | | // mzh = order.getCardId(); |
| | | // LambdaQueryWrapper<TjCustomer> wrapper1 = new LambdaQueryWrapper<>(); |
| | | // wrapper1.eq(TjCustomer::getCusId, order.getUserId()); |
| | | // TjCustomer tjCustomer = tjCustomerService.getOne(wrapper1); |
| | | // name = tjCustomer.getCusName(); |
| | | // } |
| | | // List<Map<String, Object>> jcList = testMapper.getLisJyList(name, mzh, start, end); |
| | | // return AjaxResult.success(jcList); |
| | | String json1 = "[{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0103\",\"diagnosis\":0,\"project\":\"0-0.20\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"checkParts\":\"项目1\",\"proResult\":\"0.0000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"*巨大未成熟细胞\",\"tjStandardGtValue\":\"0-0.20\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000070 \",\"checkParts\":\"项目2\",\"jcxmid\":\"0104\",\"diagnosis\":0,\"project\":\"0-2.50\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.1000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"*巨大未成熟细胞百分比\",\"tjStandardGtValue\":\"0-2.50\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0101\",\"diagnosis\":0,\"project\":\"0-0.20\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.0000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"*异形淋巴细胞\",\"tjStandardGtValue\":\"0-0.20\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0102\",\"diagnosis\":0,\"project\":\"0-2.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.0000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"*异形淋巴细胞百分比\",\"tjStandardGtValue\":\"0-2.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0001\",\"diagnosis\":0,\"project\":\"4.00-10.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"5.4500\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"◆白细胞\",\"tjStandardGtValue\":\"4.00-10.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0012\",\"diagnosis\":0,\"project\":\"3.50-5.50\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"4.4400\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^12/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"◆红细胞\",\"tjStandardGtValue\":\"3.50-5.50\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0014\",\"diagnosis\":0,\"project\":\"37.00-54.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"42.0000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"◆红细胞压积\",\"tjStandardGtValue\":\"37.00-54.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0013\",\"diagnosis\":0,\"project\":\"110.00-160.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"135.0000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"g/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"◆血红蛋白\",\"tjStandardGtValue\":\"110.00-160.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0020\",\"diagnosis\":0,\"project\":\"100.00-300.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"154.0000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"◆血小板\",\"tjStandardGtValue\":\"100.00-300.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0023\",\"diagnosis\":0,\"project\":\"0.10-0.50\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.1700\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"◆血小板压积\",\"tjStandardGtValue\":\"0.10-0.50\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0006\",\"diagnosis\":0,\"project\":\"0.10-0.80\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.2900\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"单核细胞\",\"tjStandardGtValue\":\"0.10-0.80\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0007\",\"diagnosis\":0,\"project\":\"3.00-8.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"5.3000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"单核细胞百分比\",\"tjStandardGtValue\":\"3.00-8.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0019\",\"diagnosis\":0,\"project\":\"10.00-15.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"13.7000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"红细胞分布宽度变异系数\",\"tjStandardGtValue\":\"10.00-15.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0018\",\"diagnosis\":0,\"project\":\"30.00-57.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"47.7000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"fL\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"红细胞分布宽度标准差\",\"tjStandardGtValue\":\"30.00-57.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0004\",\"diagnosis\":0,\"project\":\"0.80-4.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"2.1100\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"淋巴细胞\",\"tjStandardGtValue\":\"0.80-4.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0005\",\"diagnosis\":0,\"project\":\"20.00-40.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"38.7000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"淋巴细胞百分比\",\"tjStandardGtValue\":\"20.00-40.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0015\",\"diagnosis\":0,\"project\":\"80.00-100.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"94.6000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"fL\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"平均红细胞体积\",\"tjStandardGtValue\":\"80.00-100.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0016\",\"diagnosis\":0,\"project\":\"27.00-34.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"30.4000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"pg\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"平均红细胞血红蛋白含量\",\"tjStandardGtValue\":\"27.00-34.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0017\",\"diagnosis\":0,\"project\":\"320.00-360.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"321.0000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"g/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"平均红细胞血红蛋白浓度\",\"tjStandardGtValue\":\"320.00-360.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0022\",\"diagnosis\":0,\"project\":\"6.00-14.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"11.3000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"fL\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"平均血小板体积\",\"tjStandardGtValue\":\"6.00-14.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0010\",\"diagnosis\":0,\"project\":\"0-0.10\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.0100\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"嗜碱粒细胞\",\"tjStandardGtValue\":\"0-0.10\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0011\",\"diagnosis\":0,\"project\":\"0-3.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.2000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"嗜碱粒细胞百分比\",\"tjStandardGtValue\":\"0-3.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0008\",\"diagnosis\":0,\"project\":\"0.05-0.35\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.0300\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"嗜酸粒细胞\",\"tjStandardGtValue\":\"0.05-0.35\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0009\",\"diagnosis\":0,\"project\":\"0.50-5.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"0.6000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"嗜酸粒细胞百分比\",\"tjStandardGtValue\":\"0.50-5.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0021\",\"diagnosis\":0,\"project\":\"9.00-18.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"16.4000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"fL\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"血小板分布宽度\",\"tjStandardGtValue\":\"9.00-18.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0002\",\"diagnosis\":0,\"project\":\"2.00-7.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"3.0100\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"10^9/L\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"中性粒细胞\",\"tjStandardGtValue\":\"2.00-7.00\"},{\"deptName\":\"内儿科 \",\"brid\":\"250512000069 \",\"jcxmid\":\"0003\",\"diagnosis\":0,\"project\":\"52.00-72.00\",\"jyxh\":\"250512000069\",\"examinationDate\":\"2025-05-12 10:11:18\",\"proResult\":\"55.2000\",\"name\":\"苏菲\",\"patientAge\":34,\"mzh\":\"20250512000129 \",\"shys\":\"张钰旋 \",\"company\":\"%\",\"reportDoctorName\":\"张钰旋 \",\"proName\":\"中性粒细胞百分比\",\"tjStandardGtValue\":\"52.00-72.00\"}]"; |
| | | return AjaxResult.success(JSONUtil.parseArray(json1)); |
| | | } |
| | | |
| | | @GetMapping("/getTjList") |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 对之前代码增加总价以及价格计算规则逻辑 |
| | | * @param customer |
| | | * @param date |
| | | * @param cardId |
| | | * @return |
| | | */ |
| | | public AjaxResult tijianshenqing_v2(TjCustomer customer, String date,String cardId) { |
| | | String dept = configService.selectConfigByKey("request_default_dept"); |
| | | String ysbm = configService.selectConfigByKey("request_default_ysbm"); |
| | | String ysmc = configService.selectConfigByKey("request_default_ysmc"); |
| | | |
| | | List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | |
| | | List<TjOutpinmedicXm> outpinmedicXms = tjOutpinmedicXmService.list(); |
| | | |
| | | // his直接单开体检费单项目总价编码 |
| | | String tjfhisxmbm = configService.selectConfigByKey("tjfhisxmbm"); |
| | | // 是否开启his直接单开体检费单项目 N使用明细开单 其他都为单项目开总价 |
| | | String lycdzjhmxj = configService.selectConfigByKey("lycdzjhmxj"); |
| | | // 是否使用his价格传递规则 Y开启 |
| | | String sfsyhisjgrule = configService.selectConfigByKey("sfsyhisjgrule"); |
| | | // his价格传递规则保留得位数 默认2位 |
| | | String sfsyhisjgrulebaoliuweishu = configService.selectConfigByKey("sfsyhisjgrulebaoliuweishu"); |
| | | // his价格传递规则 1四舍五入 2直接舍去 |
| | | String sfsyhisjgrulesconfig = configService.selectConfigByKey("sfsyhisjgrulesconfig"); |
| | | |
| | | if (StrUtil.isNotBlank(lycdzjhmxj) && lycdzjhmxj.equalsIgnoreCase("Y")){ |
| | | // 检验项目 |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | wq.in(TjProject::getDeptId,deptService.getJyDeptIds()); |
| | | List<TjProject> jyxms = projectService.list(wq); |
| | | if (!jyxms.isEmpty()){ |
| | | List<TjProject> notNull = jyxms.stream().filter(i -> i.getSpecimenType() != null).collect(Collectors.toList()); |
| | | List<TjProject> isNull = jyxms.stream().filter(i -> i.getSpecimenType() == null).collect(Collectors.toList()); |
| | | Map<String, List<TjProject>> listMap = notNull.stream().collect(Collectors.groupingBy(TjProject::getSpecimenType)); |
| | | if (!isNull.isEmpty()) |
| | | listMap.put("",isNull); |
| | | for (Map.Entry<String, List<TjProject>> entry : listMap.entrySet()) { |
| | | |
| | | } |
| | | } |
| | | // 检查项目 |
| | | wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | wq.in(TjProject::getDeptId,deptService.getJcDeptIds()); |
| | | List<TjProject> jcxms = projectService.list(wq); |
| | | |
| | | }else { |
| | | |
| | | } |
| | | |
| | | //检验申请 |
| | | List<OutpinmedicapplyDetilsDto> outpinmedicapplyDetilsDtos =new ArrayList<>(); |
| | | if (null != detailList && !detailList.isEmpty()) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | wq.in(TjProject::getDeptId,deptService.getJyDeptIds()); |
| | | List<TjProject> projects = projectService.list(wq); |
| | | if (null != projects && !projects.isEmpty()) { |
| | | List<TjProject> notNull = projects.stream().filter(i -> i.getSpecimenType() != null).collect(Collectors.toList()); |
| | | List<TjProject> isNull = projects.stream().filter(i -> i.getSpecimenType() == null).collect(Collectors.toList()); |
| | | Map<String, List<TjProject>> listMap = notNull.stream().collect(Collectors.groupingBy(TjProject::getSpecimenType)); |
| | | if (!isNull.isEmpty()) |
| | | listMap.put("",isNull); |
| | | |
| | | for (Map.Entry<String, List<TjProject>> entry : listMap.entrySet()) { |
| | | OutpintestapplyDto dto = new OutpintestapplyDto(); |
| | | dto.setHisRegistrationId(cardId); |
| | | dto.setSfzh(customer.getCusIdcard()); |
| | | dto.setSqysbm(ysbm); |
| | | dto.setMzksbm(dept); |
| | | dto.setSjrq(date); |
| | | dto.setCzybm(ysbm); |
| | | dto.setCzyksbm(dept); |
| | | dto.setSfjz("0"); |
| | | List<OutpintestapplyDetailsDto> detailsDtos = new ArrayList<>(); |
| | | List<TjProject> value = entry.getValue(); |
| | | for (TjProject project : value) { |
| | | LambdaQueryWrapper<TjProject> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjProject::getProParentId,project.getProId()); |
| | | List<TjProject> list = projectService.list(wrapper); |
| | | for (TjProject tjProject : list) { |
| | | if (StrUtil.isNotBlank(tjProject.getHisXmbm()) && tjProject.getProPrice().compareTo(BigDecimal.ZERO) != 0) { |
| | | OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); |
| | | detailsDto.setMxfyxmbm(tjProject.getHisXmbm()); |
| | | if (tjProject.getSfzhfy().equals("Y")) { |
| | | detailsDto.setSfzhfy("1"); |
| | | } else { |
| | | detailsDto.setSfzhfy("0"); |
| | | } |
| | | detailsDto.setSl(tjProject.getSl()); |
| | | detailsDto.setProjg(tjProject.getProPrice()); |
| | | detailsDtos.add(detailsDto); |
| | | } |
| | | } |
| | | if (!outpinmedicXms.isEmpty()) { |
| | | outpinmedicXms.stream().filter(i -> i.getProId().equals(project.getProId())).forEach(i -> { |
| | | OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); |
| | | detilsDto.setYpbm(i.getYpbm()); |
| | | detilsDto.setPcbm(i.getPcbm()); |
| | | detilsDto.setSl(i.getSl()); |
| | | detilsDto.setDj(i.getDj()); |
| | | detilsDto.setDcjl(i.getDcjl()); |
| | | detilsDto.setPj(i.getPj()); |
| | | detilsDto.setJj(i.getJj()); |
| | | detilsDto.setJldw(""); |
| | | detilsDto.setTjbm(""); |
| | | detilsDto.setPs(""); |
| | | detilsDto.setPsbm(""); |
| | | detilsDto.setYyts(""); |
| | | detilsDto.setXtph(""); |
| | | detilsDto.setScph(""); |
| | | detilsDto.setYpxq(""); |
| | | detilsDto.setCdbm(""); |
| | | detilsDto.setKfdw(""); |
| | | detilsDto.setYfdw(""); |
| | | detilsDto.setYysm(""); |
| | | detilsDto.setYpmc(i.getYpmc()); |
| | | detilsDto.setFzbl(i.getFzbl()); |
| | | detilsDto.setZh(i.getZh()); |
| | | detilsDto.setCflx(i.getCflx()); |
| | | outpinmedicapplyDetilsDtos.add(detilsDto); |
| | | }); |
| | | } |
| | | } |
| | | if (!detailsDtos.isEmpty()) { |
| | | dto.setDetails(detailsDtos); |
| | | AjaxResult ajaxResult1 = controller.Outpintestapply(dto); |
| | | String result5 = getAjaxResult(ajaxResult1); |
| | | JSONObject object3 = getJSONObject(result5); |
| | | String code3 = object3.getStr("ResultCode"); |
| | | if (code3.equals("0")) { |
| | | List<OutpintestapplyDetailsDto> details = dto.getDetails(); |
| | | for (OutpintestapplyDetailsDto detail : details) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setCardId(dto.getHisRegistrationId()); |
| | | tree.setPationid(customer.getPationId()); |
| | | JSONObject resultData = object3.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("jysqdh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检验"); |
| | | tree.setService("his"); |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | | else wrapper1.eq(LtkjJfzhglmxjfxmzd::getXmdm, mxfyxmbm); |
| | | List<LtkjJfzhglmxjfxmzd> ltkjJfzhglmxjfxmzds = ltkjJfzhglmxjfxmzdService.list(wrapper1); |
| | | if (ltkjJfzhglmxjfxmzds != null && !ltkjJfzhglmxjfxmzds.isEmpty()) { |
| | | String xmdm = ltkjJfzhglmxjfxmzds.get(0).getXmdm(); |
| | | LambdaQueryWrapper<LtkjMxjfxmzd> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(LtkjMxjfxmzd::getXmdm, xmdm); |
| | | LtkjMxjfxmzd mxjfxmzd = ltkjMxjfxmzdService.getOne(wrapper2); |
| | | LambdaQueryWrapper<LtkjEjjfxmzd> wrapper3 = new LambdaQueryWrapper<>(); |
| | | wrapper3.eq(LtkjEjjfxmzd::getEjkmdm, mxjfxmzd.getEjkmdm()); |
| | | LtkjEjjfxmzd ejjfxmzd = ltkjEjjfxmzdService.getOne(wrapper3); |
| | | tree.setXmfl(ejjfxmzd.getYjkmdm()); |
| | | } |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //门诊检查申请 |
| | | if (null != detailList && !detailList.isEmpty()) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | wq.in(TjProject::getDeptId,deptService.getJcDeptIds()); |
| | | List<TjProject> projects = projectService.list(wq); |
| | | List<Long> proIds = projects.stream().map(TjProject::getProId).collect(Collectors.toList()); |
| | | if (!proIds.isEmpty()){ |
| | | QueryWrapper<TjProject> wrapper4 = new QueryWrapper<>(); |
| | | wrapper4.select("sum(sl) as sl","pro_id" |
| | | ,"pro_parent_id","pro_name","his_xmbm","his_xmmc" |
| | | ,"pro_price"); |
| | | wrapper4.in("pro_parent_id",proIds); |
| | | wrapper4.groupBy("his_xmbm"); |
| | | projects = projectService.list(wrapper4); |
| | | if (null != projects && !projects.isEmpty()) { |
| | | List<OutpintestapplyDetailsDto> detailsDtoss = new ArrayList<>(); |
| | | for (TjProject project : projects) { |
| | | if (StrUtil.isNotBlank(project.getHisXmbm()) && project.getProPrice().compareTo(BigDecimal.ZERO) != 0) { |
| | | OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); |
| | | detailsDto.setMxfyxmbm(project.getHisXmbm()); |
| | | detailsDto.setSfzhfy("0"); |
| | | detailsDto.setSl(project.getSl()); |
| | | detailsDto.setProjg(project.getProPrice()); |
| | | detailsDtoss.add(detailsDto); |
| | | } |
| | | } |
| | | List<Long> proParentIds = projects.stream().map(TjProject::getProParentId).distinct().collect(Collectors.toList()); |
| | | if (!outpinmedicXms.isEmpty()) { |
| | | outpinmedicXms.stream().filter(i -> proParentIds.contains(i.getProId())).forEach(i -> { |
| | | OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); |
| | | detilsDto.setYpbm(i.getYpbm()); |
| | | detilsDto.setPcbm(i.getPcbm()); |
| | | detilsDto.setSl(i.getSl()); |
| | | detilsDto.setDj(i.getDj()); |
| | | detilsDto.setDcjl(i.getDcjl()); |
| | | detilsDto.setPj(i.getPj()); |
| | | detilsDto.setJj(i.getJj()); |
| | | detilsDto.setJldw(""); |
| | | detilsDto.setTjbm(""); |
| | | detilsDto.setPs(""); |
| | | detilsDto.setPsbm(""); |
| | | detilsDto.setYyts(""); |
| | | detilsDto.setXtph(""); |
| | | detilsDto.setScph(""); |
| | | detilsDto.setYpxq(""); |
| | | detilsDto.setCdbm(""); |
| | | detilsDto.setKfdw(""); |
| | | detilsDto.setYfdw(""); |
| | | detilsDto.setYysm(""); |
| | | detilsDto.setYpmc(i.getYpmc()); |
| | | detilsDto.setFzbl(i.getFzbl()); |
| | | detilsDto.setZh(i.getZh()); |
| | | detilsDto.setCflx(i.getCflx()); |
| | | outpinmedicapplyDetilsDtos.add(detilsDto); |
| | | }); |
| | | } |
| | | if (!detailsDtoss.isEmpty()) { |
| | | OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); |
| | | outpinexamapplyDto.setHisRegistrationId(cardId); |
| | | outpinexamapplyDto.setSfzh(customer.getCusIdcard()); |
| | | outpinexamapplyDto.setSqysbm(ysbm); |
| | | outpinexamapplyDto.setMzksbm(dept); |
| | | outpinexamapplyDto.setCzybm(ysbm); |
| | | outpinexamapplyDto.setCzyksbm(dept); |
| | | outpinexamapplyDto.setSfjz("0"); |
| | | outpinexamapplyDto.setDetails(detailsDtoss); |
| | | AjaxResult ajaxResult2 = controller.Outpinexamapply(outpinexamapplyDto); |
| | | String result6 = getAjaxResult(ajaxResult2); |
| | | JSONObject object5 = getJSONObject(result6); |
| | | String code4 = object5.getStr("ResultCode"); |
| | | if (code4.equals("0")) { |
| | | List<OutpintestapplyDetailsDto> details = outpinexamapplyDto.getDetails(); |
| | | for (OutpintestapplyDetailsDto detail : details) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setCardId(outpinexamapplyDto.getHisRegistrationId()); |
| | | tree.setPationid(customer.getPationId()); |
| | | JSONObject resultData = object5.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("jcsqdh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("检查"); |
| | | tree.setService("his"); |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | | else wrapper1.eq(LtkjJfzhglmxjfxmzd::getXmdm, mxfyxmbm); |
| | | List<LtkjJfzhglmxjfxmzd> ltkjJfzhglmxjfxmzds = ltkjJfzhglmxjfxmzdService.list(wrapper1); |
| | | if (ltkjJfzhglmxjfxmzds != null && !ltkjJfzhglmxjfxmzds.isEmpty()) { |
| | | String xmdm = ltkjJfzhglmxjfxmzds.get(0).getXmdm(); |
| | | LambdaQueryWrapper<LtkjMxjfxmzd> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(LtkjMxjfxmzd::getXmdm, xmdm); |
| | | LtkjMxjfxmzd mxjfxmzd = ltkjMxjfxmzdService.getOne(wrapper2); |
| | | LambdaQueryWrapper<LtkjEjjfxmzd> wrapper3 = new LambdaQueryWrapper<>(); |
| | | wrapper3.eq(LtkjEjjfxmzd::getEjkmdm, mxjfxmzd.getEjkmdm()); |
| | | LtkjEjjfxmzd ejjfxmzd = ltkjEjjfxmzdService.getOne(wrapper3); |
| | | tree.setXmfl(ejjfxmzd.getYjkmdm()); |
| | | } |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //门诊治疗处置申请 |
| | | OutpintreatapplyDto dao = new OutpintreatapplyDto(); |
| | | dao.setHisRegistrationId(cardId); |
| | | dao.setSfzh(customer.getCusIdcard()); |
| | | dao.setSqysbm(ysbm); |
| | | dao.setMzksbm(dept); |
| | | dao.setSjrq(date); |
| | | dao.setCzybm(ysbm); |
| | | dao.setCzyksbm(dept); |
| | | dao.setSfjz("0"); |
| | | // List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); |
| | | if (null != detailList && !detailList.isEmpty()) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | | wq.in(TjProject::getDeptId,deptService.getCzDeptIds()); |
| | | List<TjProject> projects = projectService.list(wq); |
| | | List<Long> proIds = projects.stream().map(TjProject::getProId).collect(Collectors.toList()); |
| | | if (!proIds.isEmpty()){ |
| | | QueryWrapper<TjProject> wrapper4 = new QueryWrapper<>(); |
| | | wrapper4.select("sum(sl) as sl","pro_id" |
| | | ,"pro_parent_id","pro_name","his_xmbm","his_xmmc" |
| | | ,"pro_price"); |
| | | wrapper4.in("pro_parent_id",proIds); |
| | | wrapper4.groupBy("his_xmbm"); |
| | | projects = projectService.list(wrapper4); |
| | | if (null != projects && !projects.isEmpty()) { |
| | | List<OutpintestapplyDetailsDto> detailDtos = new ArrayList<>(); |
| | | for (TjProject project : projects) { |
| | | if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0) { |
| | | if (StrUtil.isNotBlank(project.getHisXmbm()) && project.getProPrice().compareTo(BigDecimal.ZERO) != 0) { |
| | | OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); |
| | | detailsDto.setMxfyxmbm(project.getHisXmbm()); |
| | | detailsDto.setSfzhfy("0"); |
| | | detailsDto.setSl(project.getSl()); |
| | | detailsDto.setProjg(project.getProPrice()); |
| | | detailDtos.add(detailsDto); |
| | | } |
| | | } |
| | | } |
| | | List<Long> proParentIds = projects.stream().map(TjProject::getProParentId).distinct().collect(Collectors.toList()); |
| | | if (!outpinmedicXms.isEmpty()) { |
| | | outpinmedicXms.stream().filter(i -> proParentIds.contains(i.getProId())).forEach(i -> { |
| | | OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); |
| | | detilsDto.setYpbm(i.getYpbm()); |
| | | detilsDto.setPcbm(i.getPcbm()); |
| | | detilsDto.setSl(i.getSl()); |
| | | detilsDto.setDj(i.getDj()); |
| | | detilsDto.setDcjl(i.getDcjl()); |
| | | detilsDto.setPj(i.getPj()); |
| | | detilsDto.setJj(i.getJj()); |
| | | detilsDto.setJldw(""); |
| | | detilsDto.setTjbm(""); |
| | | detilsDto.setPs(""); |
| | | detilsDto.setPsbm(""); |
| | | detilsDto.setYyts(""); |
| | | detilsDto.setXtph(""); |
| | | detilsDto.setScph(""); |
| | | detilsDto.setYpxq(""); |
| | | detilsDto.setCdbm(""); |
| | | detilsDto.setKfdw(""); |
| | | detilsDto.setYfdw(""); |
| | | detilsDto.setYysm(""); |
| | | detilsDto.setYpmc(i.getYpmc()); |
| | | detilsDto.setFzbl(i.getFzbl()); |
| | | detilsDto.setZh(i.getZh()); |
| | | detilsDto.setCflx(i.getCflx()); |
| | | outpinmedicapplyDetilsDtos.add(detilsDto); |
| | | }); |
| | | } |
| | | if (!detailDtos.isEmpty()) { |
| | | dao.setDetails(detailDtos); |
| | | AjaxResult mzylyzsq1 = controller.Outpintreatapply(dao); |
| | | String mzylyzsq2 = getAjaxResult(mzylyzsq1); |
| | | JSONObject mzylyzsq3 = getJSONObject(mzylyzsq2); |
| | | String code5 = mzylyzsq3.getStr("ResultCode"); |
| | | if (code5.equals("0")) { |
| | | List<OutpintestapplyDetailsDto> details1 = dao.getDetails(); |
| | | for (OutpintestapplyDetailsDto detail : details1) { |
| | | LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); |
| | | tree.setCardId(dao.getHisRegistrationId()); |
| | | tree.setPationid(customer.getPationId()); |
| | | JSONObject resultData = mzylyzsq3.getJSONObject("ResultData"); |
| | | tree.setSqdh(resultData.getStr("zlczh")); |
| | | tree.setFyhj(resultData.getStr("fyhj")); |
| | | String mxfyxmbm = detail.getMxfyxmbm(); |
| | | tree.setHisXmdm(mxfyxmbm); |
| | | tree.setType("处置"); |
| | | tree.setTjPrice(String.valueOf(detail.getProjg())); |
| | | LambdaQueryWrapper<LtkjJfzhglmxjfxmzd> wrapper1 = new LambdaQueryWrapper<>(); |
| | | if (detail.getSfzhfy().equals("1")) |
| | | wrapper1.eq(LtkjJfzhglmxjfxmzd::getZhxmdm, mxfyxmbm); |
| | | else wrapper1.eq(LtkjJfzhglmxjfxmzd::getXmdm, mxfyxmbm); |
| | | List<LtkjJfzhglmxjfxmzd> ltkjJfzhglmxjfxmzds = ltkjJfzhglmxjfxmzdService.list(wrapper1); |
| | | if (ltkjJfzhglmxjfxmzds != null && !ltkjJfzhglmxjfxmzds.isEmpty()) { |
| | | String xmdm = ltkjJfzhglmxjfxmzds.get(0).getXmdm(); |
| | | LambdaQueryWrapper<LtkjMxjfxmzd> wrapper2 = new LambdaQueryWrapper<>(); |
| | | wrapper2.eq(LtkjMxjfxmzd::getXmdm, xmdm); |
| | | LtkjMxjfxmzd mxjfxmzd = ltkjMxjfxmzdService.getOne(wrapper2); |
| | | LambdaQueryWrapper<LtkjEjjfxmzd> wrapper3 = new LambdaQueryWrapper<>(); |
| | | wrapper3.eq(LtkjEjjfxmzd::getEjkmdm, mxjfxmzd.getEjkmdm()); |
| | | LtkjEjjfxmzd ejjfxmzd = ltkjEjjfxmzdService.getOne(wrapper3); |
| | | tree.setXmfl(ejjfxmzd.getYjkmdm()); |
| | | } |
| | | tree.setCreateTime(DateUtil.date()); |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //药品申请 原版 |
| | | // if(!outpinmedicapplyDetilsDtos.isEmpty()){ |
| | | // OutpinmedicapplyDto dto1=new OutpinmedicapplyDto(); |
| | | // dto1.setHisRegistrationId(cardId); |
| | | // dto1.setSfzh(customer.getCusIdcard()); |
| | | // dto1.setSqysbm(ysbm); |
| | | // dto1.setMzksbm(dept); |
| | | // dto1.setSjrq(date); |
| | | // String yfbm = configService.selectConfigByKey("chufang_yfbm"); |
| | | // String mzzd = configService.selectConfigByKey("chufang_mzzd"); |
| | | // String czybm = configService.selectConfigByKey("chufang_czybm"); |
| | | // String czyksbm = configService.selectConfigByKey("chufang_czyksbm"); |
| | | // String cflxbm = configService.selectConfigByKey("chufang_cflxbm"); |
| | | // if (czybm.equalsIgnoreCase("N")) |
| | | // dto1.setCzybm(ysbm); |
| | | // else dto1.setCzybm(czybm); |
| | | // if (czyksbm.equalsIgnoreCase("N")) |
| | | // dto1.setCzyksbm(dept); |
| | | // else dto1.setCzyksbm(czyksbm); |
| | | // dto1.setCflxbm(cflxbm); |
| | | // if (yfbm.equalsIgnoreCase("N")) |
| | | // dto1.setYfbm("1"); |
| | | // else dto1.setYfbm(yfbm); |
| | | // dto1.setFyts("1"); |
| | | // if (mzzd.equalsIgnoreCase("N")) |
| | | // dto1.setMzzd(""); |
| | | // else dto1.setMzzd(mzzd); |
| | | // dto1.setDetails(outpinmedicapplyDetilsDtos); |
| | | // AjaxResult result = controller.Outpinmedicapply(dto1); |
| | | // String result1 = getAjaxResult(result); |
| | | // JSONObject object = getJSONObject(result1); |
| | | // String code = object.getStr("ResultCode"); |
| | | // if(null !=code && code.equals("0")){ |
| | | // JSONObject resultData = object.getJSONObject("ResultData"); |
| | | //// Map<String, Object> resultDatasss = (Map<String, Object>) resultData.get(0); |
| | | // String cfh = resultData.getStr("cfh"); |
| | | // log.info("药品申请后的处方号是: "+cfh+" outpinmedicapplyDetilsDtos 里面的值为: "+outpinmedicapplyDetilsDtos.toString()); |
| | | // for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { |
| | | // TjCf cf=new TjCf(); |
| | | // cf.setCardId(cardId); |
| | | // cf.setSfzh(customer.getCusIdcard()); |
| | | // cf.setCfh(cfh); |
| | | // cf.setSqysbm(ysbm); |
| | | // cf.setSqysxm(ysmc); |
| | | // cf.setMzksbn(dept); |
| | | // cf.setSqrq(date); |
| | | // cf.setCzybm(ysbm); |
| | | // cf.setYpbm(detilsDto.getYpbm()); |
| | | // cf.setYpmc(detilsDto.getYpmc()); |
| | | // cf.setSl(String.valueOf(detilsDto.getSl())); |
| | | // cf.setDj(String.valueOf(detilsDto.getDj())); |
| | | // cf.setDcjl(String.valueOf(detilsDto.getDcjl())); |
| | | // cf.setPj(String.valueOf(detilsDto.getPj())); |
| | | // cf.setJj(String.valueOf(detilsDto.getJj())); |
| | | // cf.setCreateTime(new Date()); |
| | | // cfService.save(cf); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 药品申请 处方类型维护在药品表 |
| | | */ |
| | | if(!outpinmedicapplyDetilsDtos.isEmpty()){ |
| | | String yfbm = configService.selectConfigByKey("chufang_yfbm"); |
| | | String mzzd = configService.selectConfigByKey("chufang_mzzd"); |
| | | String czybm = configService.selectConfigByKey("chufang_czybm"); |
| | | String czyksbm = configService.selectConfigByKey("chufang_czyksbm"); |
| | | // String cflxbm = configService.selectConfigByKey("chufang_cflxbm"); |
| | | Map<String, List<OutpinmedicapplyDetilsDto>> listMap = outpinmedicapplyDetilsDtos.stream().collect(Collectors.groupingBy(OutpinmedicapplyDetilsDto::getCflx)); |
| | | listMap.forEach((cflx, details) -> { |
| | | OutpinmedicapplyDto dto1 = new OutpinmedicapplyDto(); |
| | | dto1.setHisRegistrationId(cardId); |
| | | dto1.setSfzh(customer.getCusIdcard()); |
| | | dto1.setSqysbm(ysbm); |
| | | dto1.setMzksbm(dept); |
| | | dto1.setSjrq(date); |
| | | if (czybm.equalsIgnoreCase("N")) |
| | | dto1.setCzybm(ysbm); |
| | | else dto1.setCzybm(czybm); |
| | | if (czyksbm.equalsIgnoreCase("N")) |
| | | dto1.setCzyksbm(dept); |
| | | else dto1.setCzyksbm(czyksbm); |
| | | dto1.setCflxbm(cflx); |
| | | if (yfbm.equalsIgnoreCase("N")) |
| | | dto1.setYfbm("1"); |
| | | else dto1.setYfbm(yfbm); |
| | | dto1.setFyts("1"); |
| | | if (mzzd.equalsIgnoreCase("N")) |
| | | dto1.setMzzd(""); |
| | | else dto1.setMzzd(mzzd); |
| | | dto1.setDetails(details); |
| | | AjaxResult result = controller.Outpinmedicapply(dto1); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if (null != code && code.equals("0")) { |
| | | JSONObject resultData = object.getJSONObject("ResultData"); |
| | | String cfh = resultData.getStr("cfh"); |
| | | log.info("药品申请后的处方号是: " + cfh + " outpinmedicapplyDetilsDtos 里面的值为: " + outpinmedicapplyDetilsDtos.toString()); |
| | | for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { |
| | | TjCf cf = new TjCf(); |
| | | cf.setCardId(cardId); |
| | | cf.setSfzh(customer.getCusIdcard()); |
| | | cf.setCfh(cfh); |
| | | cf.setSqysbm(ysbm); |
| | | cf.setSqysxm(ysmc); |
| | | cf.setMzksbn(dept); |
| | | cf.setSqrq(date); |
| | | cf.setCzybm(ysbm); |
| | | cf.setYpbm(detilsDto.getYpbm()); |
| | | cf.setYpmc(detilsDto.getYpmc()); |
| | | cf.setSl(String.valueOf(detilsDto.getSl())); |
| | | cf.setDj(String.valueOf(detilsDto.getDj())); |
| | | cf.setDcjl(String.valueOf(detilsDto.getDcjl())); |
| | | cf.setPj(String.valueOf(detilsDto.getPj())); |
| | | cf.setJj(String.valueOf(detilsDto.getJj())); |
| | | cf.setCreateTime(new Date()); |
| | | cfService.save(cf); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | public AjaxResult tijianshenqing(TjCustomer customer, String date, TjOrder tjOrder, SysUser sysUser, AjaxResult result) { |
| | | List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(), tjOrder.getCardId()); |
| | |
| | | } |
| | | |
| | | |
| | | LambdaQueryWrapper<TjXdtgmdjg> wqq=new LambdaQueryWrapper<>(); |
| | | wqq.eq(TjXdtgmdjg::getTjh,tjOrder.getTjNumber()); |
| | | wqq.isNotNull(TjXdtgmdjg::getUrl); |
| | | List<TjXdtgmdjg> xdtgmdjgList = xdtgmdjgService.list(wqq); |
| | | String isPdfFujianPro = sysConfigService.selectConfigByKey("is_pdf_fujian_pro"); |
| | | List<TjXdtgmdjg> xdtgmdjgList; |
| | | if (StrUtil.isNotBlank(isPdfFujianPro) && isPdfFujianPro.equalsIgnoreCase("Y")){ |
| | | xdtgmdjgList = xdtgmdjgService.xdtGlAttProByTjNum(tjOrder.getTjNumber()); |
| | | }else { |
| | | LambdaQueryWrapper<TjXdtgmdjg> wqq=new LambdaQueryWrapper<>(); |
| | | wqq.eq(TjXdtgmdjg::getTjh,tjOrder.getTjNumber()); |
| | | wqq.isNotNull(TjXdtgmdjg::getUrl); |
| | | xdtgmdjgList = xdtgmdjgService.list(wqq); |
| | | } |
| | | |
| | | int index=1; |
| | | for (TjXdtgmdjg xdtgmdjg : xdtgmdjgList) { |
| | |
| | | String resultMsg = ""; |
| | | if (null != baoGaoDans && !baoGaoDans.isEmpty()) { |
| | | Date dates = new Date(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("his_registration_id", order.getCardId()); |
| | | map.put("ksbm", ""); |
| | | map.put("pationid", ""); |
| | | map.put("ksrq", DateUtil.format(DateUtil.beginOfDay(order.getCreateTime()), "yyyy-MM-dd HH:mm:ss")); |
| | | map.put("jsrq", DateUtil.format(DateUtil.endOfDay(dates), "yyyy-MM-dd HH:mm:ss")); |
| | | map.put("pagecount", 10); |
| | | map.put("page", 1); |
| | | AjaxResult result = controller.Getlabreportinfo(map); |
| | | String jytbfs = configService.selectConfigByKey("jytbfs"); |
| | | AjaxResult result; |
| | | if (StrUtil.isNotBlank(jytbfs) && jytbfs.equalsIgnoreCase("Y")){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("his_registration_id", order.getCardId()); |
| | | map.put("ksbm", ""); |
| | | map.put("pationid", ""); |
| | | map.put("ksrq", DateUtil.format(DateUtil.beginOfDay(order.getCreateTime()), "yyyy-MM-dd HH:mm:ss")); |
| | | map.put("jsrq", DateUtil.format(DateUtil.endOfDay(dates), "yyyy-MM-dd HH:mm:ss")); |
| | | map.put("pagecount", 10); |
| | | map.put("page", 1); |
| | | result = controller.Getlabreportinfo(map); |
| | | }else { |
| | | result = ltkjHysqdService.getAsyncDataByPro("体检中心", order.getCardId(), "''", 100, 1, "'1'"); |
| | | } |
| | | log.info("检验项目查询返回值: " + JSONUtil.toJsonStr(result)); |
| | | |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | |
| | | boolean isInsertHysqd = false; |
| | | LtkjHysqd hysqd = new LtkjHysqd(); |
| | | hysqd.setTjh(order.getCardId()); |
| | | hysqd.setTmh(jsonObject.getStr("JYBGID")); |
| | | hysqd.setBbbh(jsonObject.getStr("BBDM")); |
| | | hysqd.setBbmc(jsonObject.getStr("BBMC")); |
| | | hysqd.setXmid(jsonObject.getStr("JYXMDM")); |
| | | hysqd.setXmmc(jsonObject.getStr("JYXMMC")); |
| | | hysqd.setSqsj(jsonObject.getStr("SQRQ")); |
| | | hysqd.setSqys(jsonObject.getStr("SQRBH")); |
| | | hysqd.setJgsj(jsonObject.getStr("JYBGRQ")); |
| | | hysqd.setSqrxm(jsonObject.getStr("SQRXM")); |
| | | hysqd.setSqdh(jsonObject.getStr("SQDBH")); |
| | | hysqd.setShrdm(jsonObject.getStr("JYYSBH")); |
| | | hysqd.setShrxm(jsonObject.getStr("JYYSQM")); |
| | | hysqd.setJybgjg(jsonObject.getStr("JYBGJG")); |
| | | hysqd.setTmh(jsonObject.getStr("JYBGID"));// 检验报告 ID |
| | | hysqd.setBbbh(jsonObject.getStr("BBDM"));// 标本代码 |
| | | hysqd.setBbmc(jsonObject.getStr("BBMC"));// 标本名称 |
| | | hysqd.setXmid(jsonObject.getStr("JYXMDM"));// 检验项目代码 |
| | | hysqd.setXmmc(jsonObject.getStr("JYXMMC"));// 检验项目名称 |
| | | hysqd.setSqsj(jsonObject.getStr("SQRQ"));// 申请时间 |
| | | hysqd.setSqys(jsonObject.getStr("SQRBH"));// 申请医生编号 |
| | | hysqd.setJgsj(jsonObject.getStr("JYBGRQ"));// 报告日期 |
| | | hysqd.setSqrxm(jsonObject.getStr("SQRXM"));// 申请医生姓名 |
| | | hysqd.setSqdh(jsonObject.getStr("SQDBH"));// 申请医生代码,字典代码 |
| | | hysqd.setShrdm(jsonObject.getStr("JYYSBH"));// 审核人员代码,字典代码 |
| | | hysqd.setShrxm(jsonObject.getStr("JYYSQM"));// 审核人员姓名 |
| | | hysqd.setJybgjg(jsonObject.getStr("JYBGJG"));// 检验报告结果 |
| | | hysqd.setCreateTime(new Date()); |
| | | QueryWrapper<LtkjHysqd> queryWrapper = new QueryWrapper<>(hysqd); |
| | | List<LtkjHysqd> list = ltkjHysqdService.list(queryWrapper); |
| | |
| | | results = jcsqdService.getTjJcProByHisCall("体检中心", order.getCardId(), "''", 100, 1, "'1'"); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | } |
| | | log.info("检查项目查询返回值: " + results.toString()); |
| | | log.info("检查项目查询返回值: " + JSONUtil.toJsonStr(results)); |
| | | if (Integer.parseInt(results.get("code").toString()) == 200) { |
| | | List<Map<String, Object>> datas = (List<Map<String, Object>>) results.get("data"); |
| | | if (null != datas && !datas.isEmpty()) { |
| | |
| | | jcbgdService.save(jcbgd); |
| | | } |
| | | jcsqdService.saveLtkjExamJcsqd(order.getCardId()); |
| | | List<LtkjExamJcsqd> jcsqdList = jcsqdService.getLtkjJcsqdByTjh(order.getCardId()); |
| | | jcycxmService.deletedByTjh(order.getTjNumber()); |
| | | if(!jcsqdList.isEmpty()){ |
| | | for (LtkjExamJcsqd jcsqd : jcsqdList) { |
| | | if(StringUtil.isNotBlank(jcsqd.getJgzt())){ |
| | | String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("。|;|;|,|,"); |
| | | for (String jg : split) { |
| | | if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") |
| | | && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见") |
| | | && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")){ |
| | | TjJcycxm jcycxm=new TjJcycxm(); |
| | | jcycxm.setTjh(order.getTjNumber()); |
| | | jcycxm.setYqid("jczyy"); |
| | | String[] split1 = jcsqd.getJcxmid().split(";"); |
| | | jcycxm.setProId(split1[0]); |
| | | jcycxm.setProName(jcsqd.getJcxmmc()); |
| | | jcycxm.setCreateTime(new Date()); |
| | | jcycxm.setJcjg(jg); |
| | | jcycxmService.save(jcycxm); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // List<LtkjExamJcsqd> jcsqdList = jcsqdService.getLtkjJcsqdByTjh(order.getCardId()); |
| | | // jcycxmService.deletedByTjh(order.getTjNumber()); |
| | | // if(!jcsqdList.isEmpty()){ |
| | | // for (LtkjExamJcsqd jcsqd : jcsqdList) { |
| | | // if(StringUtil.isNotBlank(jcsqd.getJgzt())){ |
| | | // String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("。|;|;|,|,"); |
| | | // for (String jg : split) { |
| | | // if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常") |
| | | // && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见") |
| | | // && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")){ |
| | | // TjJcycxm jcycxm=new TjJcycxm(); |
| | | // jcycxm.setTjh(order.getTjNumber()); |
| | | // jcycxm.setYqid("jczyy"); |
| | | // String[] split1 = jcsqd.getJcxmid().split(";"); |
| | | // jcycxm.setProId(split1[0]); |
| | | // jcycxm.setProName(jcsqd.getJcxmmc()); |
| | | // jcycxm.setCreateTime(new Date()); |
| | | // jcycxm.setJcjg(jg); |
| | | // jcycxmService.save(jcycxm); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | configController.tjjcycxm(tjNumber, "0"); |
| | | testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), doctorId); |
| | | } else { |
| | | resultMsg += "\n检查项目暂时未出结果,请稍后同步!!!"; |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Company: 西安路泰科技有限公司 |
| | |
| | | " AND\n" + |
| | | " a.tjh=#{cardId}") |
| | | int getHyYcXmCount(String cardId); |
| | | |
| | | @DataSource(value = DataSourceType.SLAVE_HIS) |
| | | @Qualifier(value = "slaveHisDataSource") |
| | | List<Map<String ,Object>> getAsyncDataByPro(@Param("ksmc") String ksmc, |
| | | @Param("str_in")String strIn, |
| | | @Param("brid")String brid, |
| | | @Param("pagecount")int pagecount, |
| | | @Param("page")int page, |
| | | @Param("status")String status); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ClassName: TjXdtgmdjgMapper <br/> |
| | |
| | | |
| | | @Delete("DELETE FROM tj_xdtgmdjg WHERE tjh=#{tjNumber} and pro_id=#{proId}") |
| | | void deletedByTJhAndProId(@Param("tjNumber") String tjNumber,@Param("proId") String proId); |
| | | |
| | | @Select("call pro_pdf_fujian(#{tjnumber,mode=IN})") |
| | | List<TjXdtgmdjg> xdtGlAttProByTjNum(String tjnumber); |
| | | } |
| | |
| | | package com.ltkj.hosp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.sqlDomain.LtkjHybgd; |
| | |
| | | int getHyYcXmCount(String cardId); |
| | | |
| | | void deletedByTjhAndXmId(String tjh, String xmid); |
| | | |
| | | AjaxResult getAsyncDataByPro(String ksmc,String strIn,String brid,int pagecount,int page,String status); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ltkj.hosp.domain.TjXdtgmdjg; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ClassName: TjXdtgmdjgService <br/> |
| | | * Description: <br/> |
| | |
| | | |
| | | public interface TjXdtgmdjgService extends IService<TjXdtgmdjg> { |
| | | void deletedByTJhAndProId(String tjNumber, String proId); |
| | | |
| | | List<TjXdtgmdjg> xdtGlAttProByTjNum(String tjNum); |
| | | } |
| | |
| | | package com.ltkj.hosp.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.mapper.LtkjExamJcsqdMapper; |
| | |
| | | public void deletedByTjhAndXmId(String tjh, String xmid) { |
| | | mapper.deletedByTjhAndXmId(tjh,xmid); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult getAsyncDataByPro(String ksmc,String strIn,String brid,int pagecount,int page,String status) { |
| | | return AjaxResult.success().put("ResultData",mapper.getAsyncDataByPro(ksmc,strIn,brid,pagecount,page,status)).put("code",0); |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ClassName: TjXdtgmdjgServiceImpl <br/> |
| | | * Description: <br/> |
| | |
| | | public void deletedByTJhAndProId(String tjNumber, String proId) { |
| | | mapper.deletedByTJhAndProId(tjNumber,proId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TjXdtgmdjg> xdtGlAttProByTjNum(String tjNum) { |
| | | return mapper.xdtGlAttProByTjNum(tjNum); |
| | | } |
| | | } |