From 690a1b6765451b65002544cffab232fd0748912a Mon Sep 17 00:00:00 2001 From: lige <bestlige@outlook.com> Date: 星期二, 24 十月 2023 17:19:40 +0800 Subject: [PATCH] 登记时回显 --- ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java | 83 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 78 insertions(+), 5 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java index f241401..f92c423 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java @@ -7,6 +7,7 @@ import com.ltkj.common.core.domain.entity.SysUser; import com.ltkj.common.core.redis.RedisCache; import com.ltkj.common.utils.StringUtils; +import com.ltkj.framework.config.MatchUtils; import com.ltkj.hosp.domain.*; import com.ltkj.hosp.service.*; import com.ltkj.hosp.vodomain.AddNewReservationConfirm; @@ -81,6 +82,14 @@ private ITjAdviceService tjAdviceService; @Resource private ISysUserService userService; + @Resource + private IJimuOnlineReportService reportService; + @Resource + private ITjDwDeptService dwDeptService; + @Resource + private ITjPrintOrderService printOrderService; + @Resource + private IDictSfxmService dictSfxmService; @Override @@ -905,12 +914,75 @@ @Override @Async("async") - public void addRedis(List<TjCustomer> customers) { - for (TjCustomer customer : customers) { - redisCache.setCacheMapValue("updateCheckType"+customer.getTjNumber(),customer.getTjNumber(),getAjaxResult(customer.getTjNumber())); - } + public void getPrintOrderList(List<TjOrder> list) { + + redisCache.setCacheMapValue("getPrintOrderList","0",extracted(0, list)); + redisCache.setCacheMapValue("getPrintOrderList","1",extracted(1, list)); + } + @Override + @Async("async") + public void getDictSfxms() { + List<DictSfxm> dictSfxm = getDictSfxm(); + redisCache.setCacheObject("getDictSfxms",dictSfxm); + } + + private List<DictSfxm> getDictSfxm() { + List<DictSfxm> dictSfxms = dictSfxmService.getYjDictSfxmList(); + if (null != dictSfxms && dictSfxms.size() > 0) { + for (DictSfxm dictSfxm : dictSfxms) { + List<DictSfxm> sfxms = dictSfxmService.getEjDictSfxmList(dictSfxm.getId()); + if (null != sfxms && sfxms.size() > 0) { + for (DictSfxm sfxm : sfxms) { + List<DictSfxm> sfx = dictSfxmService.getSjDictSfxmList(dictSfxm.getId()); + sfxm.setDictSfxms(sfx); + } + } + dictSfxm.setDictSfxms(sfxms); + } + } + return dictSfxms; + } + private List<TjOrder> extracted(Integer type, List<TjOrder> list) { + List<TjOrder> list1=new ArrayList<>(); + for (TjOrder order : list) { + TjCustomer tjCustomer = tjCustomerService.selectTjCustomerByCusId(order.getUserId()); + if (null != tjCustomer) { + order.setTjCustomerSex(tjCustomer.getCusSex()); + order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday())); + order.setGrMoBanId(reportService.getGrMoBanIds()); + order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); + if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); + if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); + } + String firmId = order.getFirmId(); + if (firmId != null && null != compService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId()))) { + order.setDictCompName(compService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId())).getCnName()); + } + 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()); + } + } + //浠庢墦鍗拌褰曟煡鍑烘渶鏂版墦鍗版椂闂� + TjPrintOrder one = printOrderService.getTjPrintOrderByTjNum(order.getTjNumber()); + if (null != type && type == 1 && one != null) { + order.setPrintTime(one.getCreateTime()); + order.setPrintName(one.getCreateBy()); + order.setType(1); + list1.add(order); + } + if (null != type && type == 0 && one == null) { + order.setType(0); + list1.add(order); + } + } + return list1; + } private void getTjPackageListsByMan(List<TjPackage> tjPackageList) { if (null != tjPackageList && tjPackageList.size() > 0) { for (TjPackage aPackage : tjPackageList) { @@ -1414,7 +1486,8 @@ //涓存椂琛ㄦ坊鍔犲崟椤� public void saveRedisTransitionByProId(String cusId, List<Long> proIds) { for (Long proId : proIds) { - if (null != transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)) && transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)).size() > 0) { + if (null != transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)) && + transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)).size() > 0) { continue; } transitionService.saveRedisTransitionByProId(cusId,proId); -- Gitblit v1.8.0