ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -756,19 +756,15 @@ List<TjOrderDetail> detailLists = tjOrderDetailService.getCaiYangDengJiJxbz(order.getOrderId(), jxbz); addCaiYangDengJi(detailLists, !detailLists.isEmpty(), order, sysUser, jxbz); } AjaxResult result = tijianbulushenqing(customer, date, order.getCardId(), jxbz, jianChaProjects, tjFlowingWater.getPayType() == 6L); if (!result.get("code").toString().equals("200")) return false; }else { // tjOrderDetailService.updateTjOrderDetailsFlowingWaterIdByJxbz(order.getOrderId().toString(),jxbz,tjFlowingWater.getTjSerialNumber().toString()); // orderRemarkService.updateTjOrderRemarkSfbzByJxbz(order.getOrderId().toString(),jxbz,tjFlowingWater.getTjSerialNumber().toString()); List<TjOrderDetail> detailLists = tjOrderDetailService.getCaiYangDengJiJxbz(order.getOrderId(), jxbz); addCaiYangDengJiByDiaoYongShiTu(detailLists, !detailLists.isEmpty(), order, sysUser, jxbz); } } if(null !=config && config.equals("Y")){ AjaxResult result = tijianbulushenqing(customer, date, order.getCardId(), jxbz, jianChaProjects, tjFlowingWater.getPayType() == 6L); if (!result.get("code").toString().equals("200")) return false; } return true; } @@ -2097,7 +2093,8 @@ @Override public void run() { try { transitionService.saveTemoTransitionByGroupingId(reservation.getIdCard(), reservation.getGroupingId()); // transitionService.saveTemoTransitionByGroupingId(reservation.getIdCard(), reservation.getGroupingId()); transitionService.ttsaveTemoTransitionByGroupingId(reservation.getIdCard(),"0",reservation.getGroupingId()); threadPool.shutdown(); } catch (Exception e) { ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -218,7 +218,7 @@ } String key = sysConfigService.selectConfigByKey("sfkqdyhis"); String s = sysConfigService.selectConfigByKey("is_request_common_his_api"); LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>(); wq.eq(TjReservation::getIdCard, cusIdcard); wq.eq(TjReservation::getIsExpire, 2); @@ -293,8 +293,8 @@ tjCustomer.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),"")); // if(null !=tjReservation.getCompanyId())tjCustomer.setDictCompId(Long.valueOf(tjReservation.getCompanyId())); // if(null !=tjReservation.getCompany())tjCustomer.setCompName(tjReservation.getCompany()); if (null != key && key.equals("Y")) { if (null != key && key.equals("Y")) { AjaxResult result = controller.Outpincreateapply(tjCustomer); String result1 = getAjaxResult(result); JSONObject object = getJSONObject(result1); @@ -316,6 +316,11 @@ hisApiGetMethodService.save(object4, "Outpincreateapply", hisApiConfig, JSONUtil.toJsonStr(BeanUtil.beanToMap(tjCustomer))); } } } } else if(null != s && s.equalsIgnoreCase("Y")) { TjCustomer requestCommonHisApi = isRequestCommonHisApi(tjCustomer); if (null !=requestCommonHisApi){ tjCustomerService.save(requestCommonHisApi); } }else { tjCustomerService.save(tjCustomer); @@ -522,6 +527,22 @@ } else { String s = sysConfigService.selectConfigByKey("is_request_common_his_api"); if (null != s && s.equals("Y")){ TjCustomer requestCommonHisApi = isRequestCommonHisApi(tjCustomer); if (null !=requestCommonHisApi){ if (tjCustomerService.save(requestCommonHisApi)) { return AjaxResult.success(requestCommonHisApi); } } }else { if (tjCustomerService.save(tjCustomer)) { return AjaxResult.success(tjCustomer); } } } return AjaxResult.error(); } private TjCustomer isRequestCommonHisApi(TjCustomer tjCustomer) { String apiUrl = sysConfigService.selectConfigByKey("common_api_url"); String hospbm = sysConfigService.selectConfigByKey("common_api_service_hospbm"); HashMap<String, Object> isjd = new HashMap<>(); @@ -534,9 +555,7 @@ tjCustomer.setPationId(data.getStr("pationId")); tjCustomer.setCardId(data.getStr("cardId")); tjCustomer.setHisJzkh(data.getStr("cardId")); if (tjCustomerService.save(tjCustomer)) { return AjaxResult.success(tjCustomer); } return tjCustomer; }else { HashMap<String, Object> map = new HashMap<>(); map.put("cardId",""); @@ -555,18 +574,10 @@ tjCustomer.setPationId(data.getStr("pationId")); tjCustomer.setCardId(data.getStr("cardId")); tjCustomer.setHisJzkh(data.getStr("cardId")); if (tjCustomerService.save(tjCustomer)) { return AjaxResult.success(tjCustomer); } }else return AjaxResult.error(); } }else { if (tjCustomerService.save(tjCustomer)) { return AjaxResult.success(tjCustomer); return tjCustomer; } } } return AjaxResult.error(); return null; } private AjaxResult suijieHisXinXi(TjCustomer tjCustomer, String date) { ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjFlowingWaterController.java
@@ -242,6 +242,11 @@ if (null != tjFlowingWater.getTjProIds() && tjFlowingWater.getTjProIds().length > 0) { tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(customer.getCusName(), "").toUpperCase() +SecurityUtils.getUsername() + DateUtil.format(new Date(), "yyMMddHHmmssSSS")); tjFlowingWater.setIsAddition("Y"); if(tjFlowingWater.getPayStasus().toString().equals("0")){ tjFlowingWater.setPayStasus(0L); }else { tjFlowingWater.setPayStasus(1L); } if (tjFlowingWaterService.save(tjFlowingWater)) { Date dates = new Date(); @@ -253,8 +258,11 @@ return AjaxResult.error(); } if(tjFlowingWater.getPayStasus().equals(1L)){ detailService.updateTjOrderDetailsFlowingWaterIdByJxbz(order.getOrderId().toString(), jxbz, tjFlowingWater.getTjSerialNumber().toString()); remarkService.updateTjOrderRemarkSfbzByJxbz(order.getOrderId().toString(), jxbz, tjFlowingWater.getTjSerialNumber().toString()); }else { String s = configService.selectConfigByKey("is_request_common_his_api"); // if (null != s && s.equals("Y") && order.getTjType().equals("2")) { if (null != s && s.equals("Y")) { String apiUrl = configService.selectConfigByKey("common_api_url"); String hospbm = configService.selectConfigByKey("common_api_service_hospbm"); @@ -320,10 +328,7 @@ return AjaxResult.error(); } } // if(!b){ // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); // } //extracted(tjFlowingWater, order, customer); } Map<String, Object> map = new HashMap<>(); map.put("waterId", tjFlowingWater.getWaterId()); map.put("mobanId", reportService.getMoBanIds()); ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjPackageController.java
@@ -22,6 +22,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import jodd.util.StringUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -56,16 +57,8 @@ private ITjConsumablesService tjConsumablesService; @Resource private ISysConfigService configService; @Resource private TjAsyncService asyncService; @Resource private RedisCache redisCache; @Autowired private IMallKeywordService mallKeywordService; @Autowired private IMallCategoryService mallCategoryService; @@ -75,7 +68,7 @@ public TableDataInfo getPacList(@ApiParam(value = "体检套餐对象") TjPackage tjPackage) { startPage(); List<TjPackage> list = tjPackageService.selectTjPackageList(tjPackage); if (null != list && list.size() > 0) { if (null != list && !list.isEmpty()) { for (TjPackage aPackage : list) { aPackage.setAllProName(tjPackageService.getTjPacProNames(String.valueOf(aPackage.getPacId()))); final String keywords = aPackage.getKeywords(); @@ -139,7 +132,7 @@ public TableDataInfo list(@ApiParam(value = "体检套餐对象") TjPackage tjPackage) { startPage(); List<TjPackage> list = tjPackageService.selectTjPackageList(tjPackage); if (null != list && list.size() > 0) { if (null != list && !list.isEmpty()) { for (TjPackage aPackage : list) { StringBuilder allProName = new StringBuilder(); StringBuilder allSonName = new StringBuilder(); @@ -398,7 +391,7 @@ tjPackage.setPym(PinyinUtil.getFirstLetter(tjPackage.getPacName(),"")); if (tjPackageService.save(tjPackage)) { List<TjProject> tjProjectList = tjPackage.getTjProjectList(); if (null != tjProjectList && tjProjectList.size() > 0) { if (null != tjProjectList && !tjProjectList.isEmpty()) { BigDecimal money = new BigDecimal("0.00"); for (TjProject tjProject : tjProjectList) { TjPackageProject tjpp = new TjPackageProject(); @@ -442,7 +435,7 @@ tjPackage.setPym(PinyinUtil.getFirstLetter(tjPackage.getPacName(),"")); if (tjPackageService.updateById(tjPackage)) { List<TjProject> tjProjectList = tjPackage.getTjProjectList(); if (null != tjProjectList && tjProjectList.size() > 0) { if (null != tjProjectList && !tjProjectList.isEmpty()) { LambdaQueryWrapper<TjPackageProject> wq = new LambdaQueryWrapper<>(); wq.eq(TjPackageProject::getPacId, tjPackage.getPacId()); ppservice.remove(wq); @@ -569,7 +562,7 @@ LambdaQueryWrapper<TjPackage> wq0 = new LambdaQueryWrapper<>(); wq0.like(TjPackage::getPacName, name); List<TjPackage> packageList = tjPackageService.list(wq0); if (null != packageList && packageList.size() > 0) { if (null != packageList && !packageList.isEmpty()) { for (TjPackage aPackage : packageList) { List<TjProject> tjProjectList = new ArrayList<>(); LambdaQueryWrapper<TjPackageProject> wq = new LambdaQueryWrapper<>(); @@ -610,7 +603,7 @@ } List<TjPackage> tjPackageList = tjPackageService.list(); if (null != tjPackageList && tjPackageList.size() > 0) { if (null != tjPackageList && !tjPackageList.isEmpty()) { List<TjPackage> lisi = new ArrayList<>(); for (TjPackage aPackage : tjPackageList) { String pinyin = PinyinUtil.getFirstLetter(aPackage.getPacName(), ""); @@ -658,4 +651,27 @@ } return AjaxResult.error("请输入你要查询的内容"); } @PostMapping("/saveOreditTjPacNew") @ApiOperation(value = "体检套餐新增修改接口") public AjaxResult saveOreditTjPacNew(@RequestBody @ApiParam(value = "体检套餐对象") TjPackage tjPackage) { tjPackage.setPym(PinyinUtil.getFirstLetter(tjPackage.getPacName(),"")); if (tjPackageService.saveOrUpdate(tjPackage)) { List<TjPackageProject> projectList = tjPackage.getPackageProjects(); if (null != projectList && !projectList.isEmpty()) { if(StringUtil.isNotBlank(tjPackage.getPacId())){ if (ppservice.deleteTjPackageProjectByPacId(tjPackage.getPacId())) { for (TjPackageProject project : projectList) { project.setPacId(tjPackage.getPacId()); ppservice.save(project); } } } } return AjaxResult.success(); } return AjaxResult.error(); } } ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjPackageProjectController.java
@@ -82,7 +82,7 @@ if (proIds.length > 0) { for (Long proId : proIds) { TjPackageProject tjPackageProject = new TjPackageProject(); tjPackageProject.setPacId(pacId); tjPackageProject.setPacId(pacId.toString()); tjPackageProject.setProId(proId); tjPackageProjectService.save(tjPackageProject); } ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictSfxm.java
@@ -146,7 +146,7 @@ */ @Excel(name = "参考单价") @ApiModelProperty(value = "参考单价") private Long ckdj; private String ckdj; /** * 顺序号 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjPackage.java
@@ -35,8 +35,8 @@ */ @ApiModelProperty(value = "套餐id") @TableId @JsonSerialize(using = ToStringSerializer.class) private Long pacId; // @JsonSerialize(using = ToStringSerializer.class) private String pacId; /** @@ -70,6 +70,12 @@ @Excel(name = "价格") @ApiModelProperty(value = "价格") private BigDecimal price; @ApiModelProperty(value = "折扣") private String limits; @ApiModelProperty(value = "优惠价格") private BigDecimal newPrice; /** * 套餐描述 @@ -201,18 +207,7 @@ @ApiModelProperty("体检类别") private String tjCategory; @TableField(exist = false) private List<TjPackageProject> packageProjects; @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("pacId", getPacId()) .append("pacName", getPacName()) .append("pacRemark", getPacRemark()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("deleted", getDeleted()) .toString(); } } ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjPackageProject.java
@@ -37,8 +37,8 @@ * 套餐id */ @Excel(name = "套餐") @JsonSerialize(using = ToStringSerializer.class) private Long pacId; // @JsonSerialize(using = ToStringSerializer.class) private String pacId; /** @@ -47,15 +47,13 @@ @Excel(name = "项目现价") private BigDecimal priceNow; private String limits; private BigDecimal priceOrd; @TableField(exist = false) private String proName; @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("proId", getProId()) .append("pacId", getPacId()) .toString(); } } ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java
@@ -259,7 +259,7 @@ " \n" + "FROM\n" + " vi_his_patientinfo a\n" + "WHERE a.HOSPITALID='chkwyy' AND a.PATIENTTYPE=3 AND a.GH_PATIENTNO =#{tjNum}") "WHERE a.PATIENTTYPE=3 AND a.GH_PATIENTNO =#{tjNum}") List<LtkjHysqd> getCcXZxYyLtkjHysqdByLisVi(String tjNum); @@ -284,7 +284,7 @@ " SYSDATE() create_time\n" + "FROM\n" + " vi_his_patientresult a JOIN vi_his_patientinfo b ON b.SAMPLEID=a.SAMPLEID\n" + "WHERE b.HOSPITALID='chkwyy' AND b.PATIENTTYPE=3 AND\n" + "WHERE b.PATIENTTYPE=3 AND\n" + " a.SAMPLEID = #{tmh}") List<LtkjHybgd> getCcXZxYyLtkjHybgdByLisVi(String tmh); ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjPackageProjectMapper.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ltkj.hosp.domain.TjPackageProject; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -70,4 +71,8 @@ @Select("SELECT a.price_now FROM tj_package_project a WHERE a.pro_id=#{proId} AND a.pac_id=#{pacId}") BigDecimal getPacProPriceByPacIdAndPro(@Param("proId") Long proId,@Param("pacId") String pacId); @Delete("delete from tj_package_project where pac_id = #{pacId}") boolean deleteTjPackageProjectByPacId(String pacId); } ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjPackageProjectService.java
@@ -64,4 +64,6 @@ List<TjPackageProject> getTjPackageProjectListByPacId(String pacId); BigDecimal getPacProPriceByPacIdAndPro(Long proId,String pacId); boolean deleteTjPackageProjectByPacId(String pacId); } ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjPackageProjectServiceImpl.java
@@ -96,4 +96,9 @@ public BigDecimal getPacProPriceByPacIdAndPro(Long proId, String pacId) { return tjPackageProjectMapper.getPacProPriceByPacIdAndPro(proId,pacId); } @Override public boolean deleteTjPackageProjectByPacId(String pacId) { return tjPackageProjectMapper.deleteTjPackageProjectByPacId(pacId); } }