ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
@@ -140,15 +140,7 @@ if (customer != null) { customer.setConnect(tjCustomer.getConnect()); if (customerService.updateById(customer)) { if(null !=key && key.equals("Y")){ AjaxResult xinXi = suijieHisXinXi(tjCustomer); if(!xinXi.get("code").toString().equals("200")){ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return AjaxResult.error("注册失败,请到前台登记!" + xinXi.get("msg").toString()); } } } customerService.updateById(customer); return AjaxResult.success(customer); } String substring = cusIdcard.substring(cusIdcard.length() - 6); @@ -156,7 +148,6 @@ tjCustomer.setCusPassword(substring); tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(cusIdcard), "yyyy-MM-dd")); tjCustomer.setCusSex(Long.valueOf(MatchUtils.getSexByIdCard(cusIdcard))); //tjCustomer.setAddr(MatchUtils.getNativePlace(Integer.parseInt((cusIdcard)))); tjCustomer.setAge(String.valueOf(MatchUtils.getAgeByIdCard(cusIdcard))); tjCustomer.setIdType("1"); tjCustomer.setAgeUnit("0"); @@ -164,17 +155,18 @@ tjCustomer.setCusIntroduce("无"); tjCustomer.setCusNumber(0L); tjCustomer.setCusIsvip("N"); if (customerService.save(tjCustomer)) { if(null !=key && key.equals("Y")){ AjaxResult xinXi = suijieHisXinXi(tjCustomer); if(!xinXi.get("code").toString().equals("200")){ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return AjaxResult.error("注册失败,请到前台登记!" + xinXi.get("msg").toString()); } } } else { customerService.save(tjCustomer); return AjaxResult.success(tjCustomer); } return AjaxResult.error("添加失败"); return AjaxResult.success(tjCustomer); } /** @@ -239,17 +231,20 @@ one.setCusPhone(tjCustomer.getCusPhone()); one.setCusNational(tjCustomer.getCusNational()); one.setCusMarryStatus(tjCustomer.getCusMarryStatus()); if (customerService.updateById(one)) { if(null !=key && key.equals("Y")){ AjaxResult xinXi = suijieHisXinXi(one); if(!xinXi.get("code").toString().equals("200")){ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return AjaxResult.error("添加就诊人信息失败!" + xinXi.get("msg").toString()); return AjaxResult.error("修改就诊人信息失败!" + xinXi.get("msg").toString()); } } else { if (!customerService.updateById(one)) { return AjaxResult.error("修改失败"); } } return AjaxResult.success(one); } return AjaxResult.error("修改失败"); } /** @@ -287,7 +282,6 @@ } //将方法返回值解析成json格式 public JSONObject getJSONObject(String builder) { String Response = JSONUtil.parseObj(builder).getStr("Response"); @@ -311,8 +305,15 @@ if (null != resultData && resultData.size() > 0) { String pationid = resultData.get("PationId").toString(); if (null != pationid) { try { if (tjCustomer.getCusId() == null) { tjCustomer.setPationId(pationid); customerService.updateById(tjCustomer); } customerService.saveOrUpdate(tjCustomer); } catch (Exception e) { e.printStackTrace(); return AjaxResult.error("操作失败!"); } //保存注册入参出参 resultData.put("cardId",pationid); JSONObject object4 = JSONUtil.parseObj(resultData); @@ -323,7 +324,7 @@ } } return AjaxResult.success(); return AjaxResult.success(tjCustomer); } return AjaxResult.error(object.getStr("ResultContent")); } ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java
@@ -12,6 +12,7 @@ import com.ltkj.hosp.hisDto.*; import com.ltkj.hosp.service.*; import com.ltkj.system.service.ISysConfigService; import com.ltkj.system.service.ISysDeptService; import jdk.nashorn.internal.runtime.logging.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -48,7 +49,7 @@ @Autowired private HisApiGetMethodService hisApiGetMethodService; @Resource private ISysConfigService configService; private ISysDeptService deptService; @Resource private ITbTransitionService transitionService; @Autowired @@ -189,7 +190,8 @@ LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); // wq.groupBy(TjProject::getHisXmbm); wq.in(TjProject::getDeptId, "241", "317"); // wq.in(TjProject::getDeptId, "241", "317"); wq.in(TjProject::getDeptId,deptService.getJyDeptIds()); List<TjProject> projects = projectService.list(wq); if (null != projects && projects.size() > 0) { for (TjProject project : projects) { @@ -291,52 +293,7 @@ } } //药品申请 if(outpinmedicapplyDetilsDtos.size()>0){ OutpinmedicapplyDto dto1=new OutpinmedicapplyDto(); dto1.setHisRegistrationId(cardId); dto1.setSfzh(customer.getCusIdcard()); dto1.setSqysbm("00029"); dto1.setMzksbm("0101"); dto1.setSjrq(date); dto1.setCzybm("00029"); dto1.setCzyksbm("0101"); dto1.setCflxbm("A"); dto1.setYfbm("1"); dto1.setFyts("1"); dto1.setMzzd(""); 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("200")){ JSONArray resultData = object.getJSONArray("ResultData"); Map<String, Object> resultDatasss = (Map<String, Object>) resultData.get(0); String cfh = resultDatasss.get("cfh").toString(); for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { TjCf cf=new TjCf(); cf.setCardId(cardId); cf.setSfzh(customer.getCusIdcard()); cf.setCfh(cfh); cf.setSqysbm("00029"); cf.setSqysxm("王健萍"); cf.setMzksbn("0101"); cf.setSqrq(date); cf.setCzybm("00029"); cf.setYpbm(detilsDto.getYpbm()); cf.setYpmc("尿素[14C]呼气试验药盒"); 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); } } } //门诊检查申请 OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); @@ -353,7 +310,8 @@ LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); wq.in(TjProject::getProId, detailLists.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); // wq.groupBy(TjProject::getHisXmbm); wq.in(TjProject::getDeptId, "247", "248", "249", "250", "251", "252", "271", "273", "274", "275", "298"); // wq.in(TjProject::getDeptId, "247", "248", "249", "250", "251", "252", "271", "273", "274", "275", "298"); wq.in(TjProject::getDeptId,deptService.getJcDeptIds()); List<TjProject> projects = projectService.list(wq); if (null != projects && projects.size() > 0) { for (TjProject project : projects) { @@ -370,7 +328,31 @@ detailsDto.setProjg(project.getProPrice()); detailsDtoss.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } } } @@ -459,7 +441,8 @@ LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); wq.in(TjProject::getProId, details.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); // wq.groupBy(TjProject::getHisXmbm); wq.in(TjProject::getDeptId, "100", "240", "253", "254", "255", "257", "258", "259", "269", "270"); // wq.in(TjProject::getDeptId, "100", "240", "253", "254", "255", "257", "258", "259", "269", "270"); wq.in(TjProject::getDeptId,deptService.getCzDeptIds()); // wq.isNull(TjProject::getDeptId); List<TjProject> projects = projectService.list(wq); if (null != projects && projects.size() > 0) { @@ -476,6 +459,31 @@ detailsDto.setSl(project.getSl()); detailsDto.setProjg(project.getProPrice()); detailDtos.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } } @@ -538,6 +546,54 @@ // return AjaxResult.error("处置申请失败!"); // } } //药品申请 if(outpinmedicapplyDetilsDtos.size()>0){ OutpinmedicapplyDto dto1=new OutpinmedicapplyDto(); dto1.setHisRegistrationId(cardId); dto1.setSfzh(customer.getCusIdcard()); dto1.setSqysbm("00029"); dto1.setMzksbm("0101"); dto1.setSjrq(date); dto1.setCzybm("00029"); dto1.setCzyksbm("0101"); dto1.setCflxbm("A"); dto1.setYfbm("1"); dto1.setFyts("1"); dto1.setMzzd(""); 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("200")){ JSONArray resultData = object.getJSONArray("ResultData"); Map<String, Object> resultDatasss = (Map<String, Object>) resultData.get(0); String cfh = resultDatasss.get("cfh").toString(); for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { TjCf cf=new TjCf(); cf.setCardId(cardId); cf.setSfzh(customer.getCusIdcard()); cf.setCfh(cfh); cf.setSqysbm("00029"); cf.setSqysxm("王健萍"); cf.setMzksbn("0101"); cf.setSqrq(date); cf.setCzybm("00029"); cf.setYpbm(detilsDto.getYpbm()); cf.setYpmc("尿素[14C]呼气试验药盒"); 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(); } ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -3,6 +3,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; import cn.hutool.json.JSONArray; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -13,10 +14,7 @@ import com.ltkj.common.utils.StringUtils; import com.ltkj.framework.config.MatchUtils; import com.ltkj.hosp.domain.*; import com.ltkj.hosp.hisDto.OutpinexamapplyDto; import com.ltkj.hosp.hisDto.OutpintestapplyDetailsDto; import com.ltkj.hosp.hisDto.OutpintestapplyDto; import com.ltkj.hosp.hisDto.OutpintreatapplyDto; import com.ltkj.hosp.hisDto.*; import com.ltkj.hosp.service.*; import com.ltkj.hosp.vodomain.AddNewReservationConfirm; import com.ltkj.hosp.vodomain.LineChartsVo; @@ -24,6 +22,7 @@ import com.ltkj.hosp.vodomain.QjDomainVo; import com.ltkj.mall.mallOrderUtils.TjConstants; import com.ltkj.system.service.ISysConfigService; import com.ltkj.system.service.ISysDeptService; import com.ltkj.system.service.ISysUserService; import com.ltkj.web.controller.his.HisApiGetMethodService; import com.ltkj.web.controller.his.HisApiMethodService; @@ -126,6 +125,11 @@ private TjProBlService blService; @Resource private ITjFlowingWaterService tjFlowingWaterService; @Resource private ISysDeptService deptService; @Autowired private TjCfService cfService; @Override public void newSaveextracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater) { long l = System.currentTimeMillis(); @@ -530,6 +534,7 @@ //处置 List<OutpintestapplyDetailsDto> detailDtos = new ArrayList<>(); List<OutpinmedicapplyDetilsDto> outpinmedicapplyDetilsDtos =new ArrayList<>(); List<TjProject> projectList=new ArrayList<>(); @@ -587,7 +592,8 @@ if(null !=config && config.equals("Y")){ //检验 if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 241L || project.getDeptId() == 317L)) { // if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 241L || project.getDeptId() == 317L)) { if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && deptService.getJyDeptIds().contains(project.getDeptId().toString())) { if (null != project.getHisXmbm()) { OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); detailsDto.setMxfyxmbm(project.getHisXmbm()); @@ -599,14 +605,40 @@ detailsDto.setSl(project.getSl()); detailsDtos.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } //检查 if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 247 || project.getDeptId() == 248 || project.getDeptId() == 249 || project.getDeptId() == 250 || project.getDeptId() == 251 || project.getDeptId() == 252 || project.getDeptId() == 271 || project.getDeptId() == 273 || project.getDeptId() == 274 || project.getDeptId() == 275 || project.getDeptId() == 298)) { // if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && // (project.getDeptId() == 247 || project.getDeptId() == 248 || project.getDeptId() == 249 || // project.getDeptId() == 250 || project.getDeptId() == 251 || project.getDeptId() == 252 || // project.getDeptId() == 271 || project.getDeptId() == 273 || project.getDeptId() == 274 || // project.getDeptId() == 275 || project.getDeptId() == 298)) { if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && deptService.getJcDeptIds().contains(project.getDeptId().toString())) { if (null != project.getHisXmbm()) { OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); detailsDto.setMxfyxmbm(project.getHisXmbm()); @@ -618,14 +650,40 @@ detailsDto.setSl(project.getSl()); detailsDtoss.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } //处置 if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 100 || project.getDeptId() == 240 || project.getDeptId() == 253 || project.getDeptId() == 254 || project.getDeptId() == 255 || project.getDeptId() == 257 || project.getDeptId() == 258 || project.getDeptId() == 259 || project.getDeptId() == 269 || project.getDeptId() == 270)) { // if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && // (project.getDeptId() == 100 || project.getDeptId() == 240 || project.getDeptId() == 253 || // project.getDeptId() == 254 || project.getDeptId() == 255 || project.getDeptId() == 257 || // project.getDeptId() == 258 || project.getDeptId() == 259 || project.getDeptId() == 269 || // project.getDeptId() == 270)) { if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && deptService.getCzDeptIds().contains(project.getDeptId().toString())) { if (null != project.getHisXmbm()) { OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); detailsDto.setMxfyxmbm(project.getHisXmbm()); @@ -636,6 +694,31 @@ } detailsDto.setSl(project.getSl()); detailDtos.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } } @@ -759,7 +842,8 @@ tjOrderDetailService.save(detail1); if(null !=config && config.equals("Y")){ //检验 if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 241L || project.getDeptId() == 317L)) { // if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 241L || project.getDeptId() == 317L)) { if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && deptService.getJyDeptIds().contains(project.getDeptId().toString())) { if (null != project.getHisXmbm()) { OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); @@ -773,14 +857,40 @@ detailsDto.setSl(project.getSl()); detailsDtos.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } //检查 if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 247L || project.getDeptId() == 248L || project.getDeptId() == 249L || project.getDeptId() == 250L || project.getDeptId() == 251L || project.getDeptId() == 252L || project.getDeptId() == 271L || project.getDeptId() == 273L || project.getDeptId() == 274L || project.getDeptId() == 275L || project.getDeptId() == 298L)) { // if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && // (project.getDeptId() == 247L || project.getDeptId() == 248L || project.getDeptId() == 249L || // project.getDeptId() == 250L || project.getDeptId() == 251L || project.getDeptId() == 252L || // project.getDeptId() == 271L || project.getDeptId() == 273L || project.getDeptId() == 274L || // project.getDeptId() == 275L || project.getDeptId() == 298L)) { if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && deptService.getJcDeptIds().contains(project.getDeptId().toString())) { if (null != project.getHisXmbm()) { OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); detailsDto.setMxfyxmbm(project.getHisXmbm()); @@ -792,14 +902,40 @@ detailsDto.setSl(project.getSl()); detailsDtoss.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } //处置 if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && (project.getDeptId() == 100L || project.getDeptId() == 240L || project.getDeptId() == 253L || project.getDeptId() == 254L || project.getDeptId() == 255L || project.getDeptId() == 257L || project.getDeptId() == 258L || project.getDeptId() == 259L || project.getDeptId() == 269L || project.getDeptId() == 270L)) { // if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && // (project.getDeptId() == 100L || project.getDeptId() == 240L || project.getDeptId() == 253L || // project.getDeptId() == 254L || project.getDeptId() == 255L || project.getDeptId() == 257L || // project.getDeptId() == 258L || project.getDeptId() == 259L || project.getDeptId() == 269L || // project.getDeptId() == 270L)) { if (project.getProPrice().compareTo(BigDecimal.ZERO) != 0 && deptService.getCzDeptIds().contains(project.getDeptId().toString())) { if (null != project.getHisXmbm()) { OutpintestapplyDetailsDto detailsDto = new OutpintestapplyDetailsDto(); detailsDto.setMxfyxmbm(project.getHisXmbm()); @@ -811,12 +947,38 @@ detailsDto.setSl(project.getSl()); detailDtos.add(detailsDto); } if(project.getProId()==1740177341251154377L){ OutpinmedicapplyDetilsDto detilsDto=new OutpinmedicapplyDetilsDto(); detilsDto.setYpbm("00006670"); detilsDto.setPcbm("06"); detilsDto.setSl("1"); detilsDto.setDj("60"); detilsDto.setDcjl("1"); detilsDto.setPj("60"); detilsDto.setJj("60"); 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.setFzbl("1"); detilsDto.setZh("0"); outpinmedicapplyDetilsDtos.add(detilsDto); } } } } } if(null !=config && config.equals("Y")){ //检验申请 @@ -941,6 +1103,52 @@ } } //药品申请 if(outpinmedicapplyDetilsDtos.size()>0){ OutpinmedicapplyDto dto1=new OutpinmedicapplyDto(); dto1.setHisRegistrationId(order.getCardId()); dto1.setSfzh(customer.getCusIdcard()); dto1.setSqysbm("00029"); dto1.setMzksbm("0101"); dto1.setSjrq(date); dto1.setCzybm("00029"); dto1.setCzyksbm("0101"); dto1.setCflxbm("A"); dto1.setYfbm("1"); dto1.setFyts("1"); dto1.setMzzd(""); 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("200")){ JSONArray resultData = object.getJSONArray("ResultData"); Map<String, Object> resultDatasss = (Map<String, Object>) resultData.get(0); String cfh = resultDatasss.get("cfh").toString(); for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { TjCf cf=new TjCf(); cf.setCardId(order.getCardId()); cf.setSfzh(customer.getCusIdcard()); cf.setCfh(cfh); cf.setSqysbm("00029"); cf.setSqysxm("王健萍"); cf.setMzksbn("0101"); cf.setSqrq(date); cf.setCzybm("00029"); cf.setYpbm(detilsDto.getYpbm()); cf.setYpmc("尿素[14C]呼气试验药盒"); 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(detailDtos.size()>0){ ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -239,7 +239,7 @@ tjCustomer1.setAgeUnit(tjReservation.getAgeUnit()); tjCustomer1.setCareer(tjReservation.getCareer()); tjCustomer1.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),"")); if (null != key && key.equals("Y")) /* if (null != key && key.equals("Y")) { AjaxResult result = controller.Outpincreateapply(tjCustomer1); String result1 = getAjaxResult(result); @@ -251,7 +251,7 @@ if (null != resultData && resultData.size() > 0) { String pationid = resultData.get("PationId").toString(); if (null != pationid) { tjCustomer1.setPationId(pationid); // tjCustomer1.setPationId(pationid); tjCustomerService.updateById(tjCustomer1); //保存注册入参出参 resultData.put("cardId",pationid); @@ -265,7 +265,7 @@ } }else { tjCustomerService.updateById(tjCustomer1); } }*/ tjCustomer1.setTeamNo(tjReservation.getTeamNo()); tjCustomer1.setCompId(tjReservation.getCompanyId()); tjCustomer1.setReservationId(tjReservation.getId()); @@ -509,7 +509,7 @@ String pationid = resultData.get("PationId").toString(); if (null != pationid) { tjCustomer.setPationId(pationid); tjCustomerService.updateById(tjCustomer); // tjCustomerService.updateById(tjCustomer); //保存注册入参出参 resultData.put("cardId",pationid); JSONObject object4 = JSONUtil.parseObj(resultData); @@ -556,7 +556,6 @@ if (tjCustomerService.updateById(tjCustomer)) { String config = sysConfigService.selectConfigByKey("sfkqdyhis"); if (null != config && config.equals("Y")) { tjCustomer.setPationId(customer.getPationId()); AjaxResult result = controller.Outpincreateapply(tjCustomer); String result1 = getAjaxResult(result); JSONObject object = getJSONObject(result1); ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjFlowingWaterController.java
@@ -206,6 +206,11 @@ // tjFlowingWater.setTollCollectorId(String.valueOf(SecurityUtils.getLoginUser().getUserId())); // tjFlowingWater.setPayStasus(1L); TjOrder order = orderService.getById(tjFlowingWater.getOrderId()); if(order.getFinishTime() !=null){ return AjaxResult.error("该人员已签离,不可补录项目!"); } TjCustomer customer = customerService.getById(order.getUserId()); if (null != tjFlowingWater.getTjProIds() && tjFlowingWater.getTjProIds().length > 0) { tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(customer.getCusName(), "").toUpperCase() +SecurityUtils.getUsername() + DateUtil.format(new Date(), "yyMMddHHmmssSSS")); ltkj-common/src/main/java/com/ltkj/common/core/domain/entity/SysDept.java
@@ -87,6 +87,7 @@ /** * 组织类型(PT10.06.17) * 1检验 2 检查 3常规处置 */ private String orgType; ltkj-system/src/main/java/com/ltkj/system/mapper/SysDeptMapper.java
@@ -145,4 +145,14 @@ List<List<?>> getSysDeptHyAndYxYjWjCustomerList13(Map<String,Object> map); List<ResultSet> getSysDeptYjWjCustomerList2(Map<String,Object> map); @Select("SELECT a.dept_id FROM sys_dept a WHERE a.deleted=0 AND a.`status`=0 AND a.org_type=1") List<String> getJyDeptIds(); @Select("SELECT a.dept_id FROM sys_dept a WHERE a.deleted=0 AND a.`status`=0 AND a.org_type=2") List<String> getJcDeptIds(); @Select("SELECT a.dept_id FROM sys_dept a WHERE a.deleted=0 AND a.`status`=0 AND a.org_type=3") List<String> getCzDeptIds(); } ltkj-system/src/main/java/com/ltkj/system/service/ISysDeptService.java
@@ -153,4 +153,11 @@ Map<String,Object> getSysDeptHyAndYxYjWjCustomerList13(String deptid, String tjname, String tjNumber, int type, int page , int pageSize); List<TreeSelect> selectDeptList1(SysDept dept); List<String> getJyDeptIds(); List<String> getJcDeptIds(); List<String> getCzDeptIds(); } ltkj-system/src/main/java/com/ltkj/system/service/impl/SysDeptServiceImpl.java
@@ -434,4 +434,19 @@ List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList111(dept); return buildDeptTreeSelect(depts); } @Override public List<String> getJyDeptIds() { return deptMapper.getJyDeptIds(); } @Override public List<String> getJcDeptIds() { return deptMapper.getJcDeptIds(); } @Override public List<String> getCzDeptIds() { return deptMapper.getCzDeptIds(); } }