| | |
| | | customer.setTjNumber(tjOrder.getTjNumber()); |
| | | customer.setTjStatus(Long.valueOf(tjOrder.getCheckStatus())); |
| | | customer.setOrderId(tjOrder.getOrderId()); |
| | | customer.setTjTime(tjOrder.getFinishTime()); |
| | | customer.setTjTime(tjOrder.getCreateTime()); |
| | | customer.setFinishTime(tjOrder.getFinishTime()); |
| | | customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); |
| | | customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | |
| | | vo.setZhupdateTime(remark.getUpdateTime()); |
| | | list.add(vo); |
| | | } |
| | | |
| | | Collections.sort(list, new Comparator<CsProVo>() { |
| | | @Override |
| | | public int compare(CsProVo o1, CsProVo o2) { |
| | | return o1.getType()-o2.getType(); |
| | | } |
| | | }); |
| | | } |
| | | return AjaxResult.success(list); |
| | | } |
| | |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | /*private boolean getAjaxResult(@RequestParam(defaultValue = "1") @ApiParam("页码数(默认1)") Integer page, |
| | | @RequestParam(defaultValue = "10") @ApiParam("显示条数(默认10)") Integer pageSize, |
| | | List<TjOrder> orderList, |
| | | List<TjCustomer> customerList, |
| | | Map<String, Object> map) { |
| | | if (null != orderList && orderList.size() > 0) { |
| | | for (TjOrder tjOrder : orderList) { |
| | | TjCustomer customer = customerService.selectTjCustomerByCusId(tjOrder.getUserId()); |
| | | if (null == customer) { |
| | | continue; |
| | | } |
| | | customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); |
| | | customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | | customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); |
| | | customer.setTjNumber(tjOrder.getTjNumber()); |
| | | customer.setTjStatus(Long.valueOf(tjOrder.getCheckStatus())); |
| | | customer.setOrderId(tjOrder.getOrderId()); |
| | | customer.setTjTime(tjOrder.getCreateTime()); |
| | | customer.setFinishTime(tjOrder.getFinishTime()); |
| | | if (tjOrder.getFirmId() == null || tjOrder.getFirmId().equals("0")) { |
| | | customer.setTjCompName("无"); |
| | | } else { |
| | | customer.setTjCompName(compService.getById(tjOrder.getFirmId()).getCnName()); |
| | | } |
| | | customerList.add(customer); |
| | | } |
| | | List<TjCustomer> customers = customerList.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | map.put("customers", customers); |
| | | map.put("total", customerList.size()); |
| | | return true; |
| | | } |
| | | return false; |
| | | }*/ |
| | | } |
| | |
| | | @Resource |
| | | private ITjRulesService rulesService; |
| | | |
| | | @Autowired |
| | | private ITjAskMedicalHistoryService tjAskMedicalHistoryService; |
| | | |
| | | |
| | | /** |
| | | * 查询体检记录列表 |
| | |
| | | |
| | | //个人 |
| | | if ("2".equals(tjOrder.getTjType())) { |
| | | // asyncService.extracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater); |
| | | |
| | | asyncService.newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater); |
| | | // asyncService.newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater); |
| | | newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater); |
| | | } |
| | | return AjaxResult.success(tjNumber); |
| | | } |
| | |
| | | } else { |
| | | tbTransitionList = redisCache.getCacheList(cusId); |
| | | } |
| | | //套餐 |
| | | if (null != packId && !packId.equals("")) { |
| | | Long pacId = Long.valueOf(packId.toString()); |
| | | List<TbTransition> list = transitionService.getTbTransitionListByCusIdAndPac(cusId, String.valueOf(pacId)); |
| | |
| | | List<TjPackageProject> ppList = tjPackageProjectService.getTjPackageProjectListByPacId(String.valueOf(pacId)); |
| | | if (null != ppList && ppList.size() > 0) { |
| | | //异步保存数据库 |
| | | asyncService.addRedisTransitionPac(cusId, pacId, ppList); |
| | | // asyncService.addRedisTransitionPac(cusId, pacId, ppList); |
| | | asyncService.saveRedisTransitionByPacId(cusId, pacId,proIds); |
| | | for (TjPackageProject tjPackageProject : ppList) { |
| | | TjProject project = projectService.getTjProjectById(String.valueOf(tjPackageProject.getProId())); |
| | | if (null != project) { |
| | | BigDecimal divide = tjPackageProject.getPriceNow().divide(project.getProPrice(), 5, RoundingMode.DOWN); |
| | | BigDecimal divide = tjPackageProject.getPriceNow().divide(project.getProPrice(), 5, RoundingMode.HALF_DOWN); |
| | | List<TjProject> tjProSonList = projectService.getTjProjectListBySoneId(String.valueOf(project.getProId())); |
| | | if (null != tjProSonList && tjProSonList.size() > 0) { |
| | | //addRedisTransitionPac(cusId, tbTransitionList, pacId, tjPackageProject, project, divide, tjProSonList); |
| | |
| | | TbTransition tbTransition = new TbTransition(); |
| | | tbTransition.setCusId(cusId); |
| | | tbTransition.setPacId(pacId); |
| | | // if (null != tjProject.getProPrice()) { |
| | | // tbTransition.setOrdPrice(tjProject.getProPrice()); |
| | | // } else { |
| | | // tbTransition.setOrdPrice(BigDecimal.valueOf(0.00)); |
| | | // } |
| | | if (null != tjPackageProject.getPriceNow() && divide.compareTo(BigDecimal.valueOf(0)) > 0) { |
| | | tbTransition.setNowPrice(tjProject.getProPrice().multiply(divide).setScale(2, RoundingMode.HALF_DOWN)); |
| | | tbTransition.setOrdPrice(tjProject.getProPrice().multiply(divide).setScale(2, RoundingMode.HALF_DOWN)); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //单项 |
| | | if (null != proIds && proIds.size() > 0) { |
| | | asyncService.addRedisTransitionPro(cusId, proIds); |
| | | //异步保存数据库表 |
| | | // asyncService.addRedisTransitionPro(cusId, proIds); |
| | | asyncService.saveRedisTransitionByPacId(cusId,null,proIds); |
| | | |
| | | for (Long proId : proIds) { |
| | | List<TbTransition> transitions = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(proId)); |
| | | if (null != transitions && transitions.size() > 0) { |
| | |
| | | if (null != project) { |
| | | List<TjProject> tjProSonList = projectService.getTjProjectListBySoneId(String.valueOf(project.getProId())); |
| | | if (null != tjProSonList && tjProSonList.size() > 0) { |
| | | //异步保存数据库表 |
| | | for (TjProject tjProject : tjProSonList) { |
| | | List<TbTransition> transitionss = transitionService.getTbTransitionListByCusIdAndPacIdAndProId(cusId, String.valueOf(tjProject.getProId())); |
| | | if (null != transitionss && transitionss.size() > 0) { |
| | |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (Map.Entry<Long, List<TbTransition>> entry : collect.entrySet()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | LambdaQueryWrapper<TbTransition> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TbTransition::getCusId, cusId); |
| | | wq.eq(TbTransition::getParentProId, entry.getKey()); |
| | | Long pacId = entry.getValue().get(0).getPacId(); |
| | | if (null != pacId) { |
| | | TjPackage aPackage = tjPackageService.getById(entry.getValue().get(0).getPacId()); |
| | |
| | | for (TbTransition tbTransition : tbTransitionList) { |
| | | money1 = money1.add(tbTransition.getOrdPrice()); |
| | | money2 = money2.add(tbTransition.getNowPrice()); |
| | | if (tbTransition.getOrdPrice().compareTo(BigDecimal.valueOf(0)) == 0 || tbTransition.getNowPrice().compareTo(BigDecimal.valueOf(0)) == 0) { |
| | | tbTransition.setDiscount("0"); |
| | | } else { |
| | | tbTransition.setDiscount((tbTransition.getNowPrice()).divide(tbTransition.getOrdPrice(), BigDecimal.ROUND_CEILING).toString()); |
| | | } |
| | | if (null != tbTransition.getPacId()) { |
| | | tbTransition.setPacPrice(tjPackageService.getById(tbTransition.getPacId()).getPrice()); |
| | | } |
| | | if (null != tbTransition.getParentProId()) { |
| | | tbTransition.setPacPrice(projectService.getTjProjectById(String.valueOf(tbTransition.getParentProId())).getProPrice()); |
| | | } |
| | | // if (tbTransition.getOrdPrice().compareTo(BigDecimal.valueOf(0)) == 0 || tbTransition.getNowPrice().compareTo(BigDecimal.valueOf(0)) == 0) { |
| | | // tbTransition.setDiscount("0"); |
| | | // } else { |
| | | // tbTransition.setDiscount((tbTransition.getNowPrice()).divide(tbTransition.getOrdPrice(), BigDecimal.ROUND_CEILING).toString()); |
| | | // } |
| | | // if (null != tbTransition.getPacId()) { |
| | | // tbTransition.setPacPrice(tjPackageService.getById(tbTransition.getPacId()).getPrice()); |
| | | // } |
| | | // if (null != tbTransition.getParentProId()) { |
| | | // tbTransition.setPacPrice(projectService.getTjProjectById(String.valueOf(tbTransition.getParentProId())).getProPrice()); |
| | | // } |
| | | } |
| | | // map.put("ordPrice", money1.setScale(Integer.parseInt(configService.selectConfigByKey("sys.price.save")), Integer.parseInt(configService.selectConfigByKey("sys.price")))); |
| | | // map.put("nowPrice", money2.setScale(Integer.parseInt(configService.selectConfigByKey("sys.price.save")), Integer.parseInt(configService.selectConfigByKey("sys.price")))); |
| | | |
| | | map.put("ordPrice", money1); |
| | | map.put("nowPrice", money2); |
| | | } |
| | |
| | | wq.eq(TbTransition::getCusId,cusId); |
| | | return AjaxResult.success(transitionService.remove(wq)); |
| | | } |
| | | |
| | | public void newSaveextracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater) { |
| | | long l = System.currentTimeMillis(); |
| | | |
| | | |
| | | tjAskMedicalHistoryService.updateTjAskMedicalHistoryByCusId(tjOrder.getTjNumber(),sysUser.getNickName(),String.valueOf(sysUser.getUserId()), String.valueOf(tjCustomer.getCusId())); |
| | | |
| | | tjOrderDetailService.saveTjOrderDetailsByCusId(tjCustomer.getCusIdcard(),String.valueOf(tjOrder.getOrderId()),sysUser.getNickName(),String.valueOf(sysUser.getUserId())); |
| | | //修改每项的原价现价 |
| | | transitionService.updateTbTransitionPriceByCusId(tjCustomer.getCusIdcard(),discount); |
| | | |
| | | //添加remark表数据 |
| | | remarkService.saveTjOrderRemarkByOrderId(tjOrder.getTjNumber(),sysUser.getNickName(),String.valueOf(sysUser.getUserId()), String.valueOf(tjOrder.getOrderId())); |
| | | |
| | | //判断是否交钱 |
| | | if ("1".equals(tjOrder.getTjType())) { |
| | | if (null != tjReservation && tjReservation.getPayType() == 1) { |
| | | tjOrderDetailService.updateTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId()), |
| | | sysUser.getNickName(), String.valueOf(sysUser.getUserId()),String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | } |
| | | if (tjFlowingWater.getPayStasus() == 1) { |
| | | tjOrderDetailService.updateTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId()), |
| | | sysUser.getNickName(), String.valueOf(sysUser.getUserId()),String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | |
| | | System.out.println("这段代码时间"+( l - (System.currentTimeMillis()) )); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.ltkj.LtkjApplication; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.service.*; |
| | |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | import org.yaml.snakeyaml.events.Event; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | |
| | | private ITjOrderRemarkService remarkService; |
| | | @Test |
| | | public void test() { |
| | | // List<TjOrder> list = tjOrderService.list(); |
| | | // for (TjOrder order : list) { |
| | | // if(null !=order.getConfirmStatus()){ |
| | | // if(order.getConfirmStatus().equals("0")){ |
| | | // if(order.getCheckStatus()==0){ |
| | | // order.setStatus(301); |
| | | // }else { |
| | | // order.setStatus(401); |
| | | // } |
| | | // }else { |
| | | // order.setStatus(299); |
| | | // } |
| | | // }else { |
| | | // if(order.getCheckStatus()==0){ |
| | | // order.setStatus(288); |
| | | // }else { |
| | | // order.setStatus(401); |
| | | // } |
| | | // } |
| | | // tjOrderService.updateById(order); |
| | | // } |
| | | log.info("嘿嘿!!!"); |
| | | } |
| | | |
| | |
| | | |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "客户id") |
| | | private String cusId; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.TbTransition; |
| | | 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 org.apache.ibatis.annotations.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | |
| | | |
| | | @Select("SELECT MAX(a.create_time) FROM tb_transition a WHERE a.cus_id=#{cusId} ") |
| | | Date getTbTransitionCreateTimeByCusId(String cusId); |
| | | |
| | | |
| | | @Update("UPDATE tb_transition a SET \n" + |
| | | "a.ord_price=a.now_price,\n" + |
| | | "a.now_price=a.ord_price*#{discount}" + |
| | | " WHERE a.cus_id=#{cusId} ") |
| | | boolean updateTbTransitionPriceByCusId(@Param("cusId")String cusId,@Param("discount")BigDecimal discount); |
| | | |
| | | |
| | | @Insert("INSERT INTO tb_transition(\n" + |
| | | " cus_id,\n" + |
| | | " pac_id,\n" + |
| | | " pac_name,\n" + |
| | | " pro_id,\n" + |
| | | " pro_name,\n" + |
| | | " parent_pro_id,\n" + |
| | | " parent_pro_name,\n" + |
| | | " ord_price,\n" + |
| | | " now_price,\n" + |
| | | " create_time,\n" + |
| | | " pro_check_method,\n" + |
| | | " pro_type\n" + |
| | | ")\n" + |
| | | "SELECT\n" + |
| | | "\t#{cusId},\n" + |
| | | "\ta.pac_id,\n" + |
| | | "\td.pac_name,\n" + |
| | | "\tc.pro_id,\n" + |
| | | "\tc.pro_name,\n" + |
| | | "\tb.pro_id,\n" + |
| | | "\tb.pro_name,\n" + |
| | | "\tTRUNCATE(c.pro_price * (TRUNCATE ( a.price_now / b.pro_price, 5 )),2),\n" + |
| | | "\tTRUNCATE(c.pro_price * (TRUNCATE ( a.price_now / b.pro_price, 5 )),2),\n" + |
| | | "\tSYSDATE(),\n" + |
| | | "\tc.pro_check_method,\n" + |
| | | "\tIFNULL(c.pro_type,'')\n" + |
| | | "FROM\n" + |
| | | "\ttj_package_project a\n" + |
| | | "\tLEFT JOIN tj_project b ON a.pro_id = b.pro_id\n" + |
| | | "\tLEFT JOIN tj_project c ON b.pro_id = c.pro_parent_id\n" + |
| | | "\tLEFT JOIN tj_package d ON a.pac_id=d.pac_id\n" + |
| | | "\t\n" + |
| | | "\tWHERE a.pac_id=#{pacId}") |
| | | void saveRedisTransitionByPacId(@Param("cusId") String cusId,@Param("pacId") Long pacId); |
| | | |
| | | |
| | | @Insert("INSERT INTO tb_transition(\n" + |
| | | " cus_id,\n" + |
| | | " pro_id,\n" + |
| | | " pro_name,\n" + |
| | | " parent_pro_id,\n" + |
| | | " parent_pro_name,\n" + |
| | | " ord_price,\n" + |
| | | " now_price,\n" + |
| | | " create_time,\n" + |
| | | " pro_check_method,\n" + |
| | | " pro_type\n" + |
| | | ")\n" + |
| | | "SELECT\n" + |
| | | "\t#{cusId},\n" + |
| | | "\tb.pro_id,\n" + |
| | | "\tb.pro_name,\n" + |
| | | "\ta.pro_id,\n" + |
| | | "\ta.pro_name,\n" + |
| | | "\tb.pro_price,\n" + |
| | | "\tb.pro_price,\n" + |
| | | "\tSYSDATE(),\n" + |
| | | "\tb.pro_check_method,\n" + |
| | | "\tIFNULL(b.pro_type,'')\n" + |
| | | "FROM\n" + |
| | | "\ttj_project a\n" + |
| | | "\tLEFT JOIN tj_project b ON b.pro_parent_id = a.pro_id \n" + |
| | | "WHERE\n" + |
| | | "\ta.pro_id = #{proId} ") |
| | | void saveRedisTransitionByProId(@Param("cusId")String cusId,@Param("proId") Long proId); |
| | | } |
| | |
| | | import com.ltkj.hosp.domain.TjAskHistorys; |
| | | import com.ltkj.hosp.domain.TjCatering; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | /** |
| | | * 问诊Mapper接口 |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTjAskHistorysByAskId(Long askId); |
| | | |
| | | @Update("UPDATE tj_ask_medical_history a SET \n" + |
| | | "\n" + |
| | | "a.tj_num=#{tjNum},\n" + |
| | | "a.update_time=SYSDATE(),\n" + |
| | | "a.update_by=#{userName},\n" + |
| | | "a.update_id=#{userId}\n" + |
| | | |
| | | "WHERE" + |
| | | |
| | | " a.cus_id=#{cusId} \n" + |
| | | "AND ISNULL(a.tj_num)") |
| | | boolean updateTjAskMedicalHistoryByCusId(@Param("tjNum") String tjNum,@Param("userName") String userName,@Param("userId") String userId,@Param("cusId") String cusId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.TjGroupingPro; |
| | | import com.ltkj.hosp.vodomain.AddNewReservationConfirm; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | |
| | | |
| | | @Select("DELETE FROM tj_grouping_pro a WHERE a.grouping_id =#{groupingId}") |
| | | void deletedTjGroupingProByGroupingId(String groupingId); |
| | | // |
| | | // @Insert("") |
| | | // boolean saveTjOrderDetailsByGroupId(@Param("groupingId") String groupingId,@Param("userName") String userName,@Param("userId") String userId,@Param("orderId")String orderId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.TjOrderDetail; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | /** |
| | | * 体检项目明细Mapper接口 |
| | |
| | | List<TjOrderDetail> getTjOrderDetailList(@Param("startDate") String startDate,@Param("endDate") String endDate); |
| | | |
| | | |
| | | @Select("\tINSERT INTO tj_order_detail(\n" + |
| | | @Insert("\tINSERT INTO tj_order_detail(\n" + |
| | | "\torder_detail_id,\n" + |
| | | " order_id,\n" + |
| | | " pro_id,\n" + |
| | |
| | | "\tUNION\n" + |
| | | " \n" + |
| | | "\tSELECT DISTINCT a.parent_pro_id,#{orderId},a.parent_pro_id,IFNULL(b.pro_default,''),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) FROM tb_transition a LEFT JOIN tj_project b ON a.parent_pro_id=b.pro_id WHERE a.cus_id=#{cusId}") |
| | | List<TjOrderDetail> saveTjOrderDetailsByCusId(@Param("cusId")String cusId,@Param("orderId")String orderId,@Param("userName")String userName,@Param("userId") String userId); |
| | | boolean saveTjOrderDetailsByCusId(@Param("cusId")String cusId,@Param("orderId")String orderId,@Param("userName")String userName,@Param("userId") String userId); |
| | | |
| | | |
| | | @Update("UPDATE tj_order_detail a SET\n" + |
| | | "a.flowing_water_id=#{ls} ,\n" + |
| | | "a.update_time=SYSDATE(),\n" + |
| | | "a.update_by=#{userName},\n" + |
| | | "a.update_id=#{userId}\n" + |
| | | "WHERE a.order_id=#{orderId}") |
| | | boolean updateTjOrderDetailsByOrderId(@Param("orderId")String orderId,@Param("userName")String userName,@Param("userId") String userId,@Param("ls")String ls); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.TjOrderRemark; |
| | | 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 org.apache.ibatis.annotations.*; |
| | | |
| | | /** |
| | | * 医生备注Mapper接口 |
| | |
| | | |
| | | @Select("SELECT GROUP_CONCAT(pro_id ORDER BY pro_id) AS names FROM tj_order_remark WHERE tj_number=#{tjNumber} AND type=3 AND deleted='0' ") |
| | | String getTjOrderRemarkProIdList(String tjNumber); |
| | | |
| | | |
| | | |
| | | @Insert("INSERT INTO tj_order_remark(\n" + |
| | | "pro_id,\n" + |
| | | "dept_id,\n" + |
| | | "create_time,\n" + |
| | | "create_by,\n" + |
| | | "create_id,\n" + |
| | | "tj_number,\n" + |
| | | "update_by,\n" + |
| | | "update_time,\n" + |
| | | "update_id\n" + |
| | | ")\n" + |
| | | "\n" + |
| | | "SELECT b.pro_id,b.dept_id,SYSDATE(),#{userName},#{userId},#{tjNumber},#{userName},SYSDATE(),#{userId} FROM tj_order_detail a " + |
| | | "LEFT JOIN tj_project b ON a.pro_id=b.pro_id WHERE a.order_id=#{orderId} AND\n" + |
| | | "b.pro_parent_id=0") |
| | | boolean saveTjOrderRemarkByOrderId(@Param("tjNumber")String tjNumber,@Param("userName") String userName,@Param("userId") String userId,@Param("orderId")String orderId); |
| | | } |
| | |
| | | |
| | | //根据身份证号获取最大时间 |
| | | public Date getTbTransitionCreateTimeByCusId(String cusId); |
| | | |
| | | |
| | | //根据身份证号修改临时表中的现价和原价 |
| | | public boolean updateTbTransitionPriceByCusId(String cusId,BigDecimal discount); |
| | | |
| | | void saveRedisTransitionByPacId(String cusId, Long pacId); |
| | | |
| | | void saveRedisTransitionByProId(String cusId, Long proId); |
| | | } |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTjAskMedicalHistoryByAskId(Long askId); |
| | | |
| | | boolean updateTjAskMedicalHistoryByCusId(String tjNum,String userName, String userId,String cusId); |
| | | } |
| | |
| | | |
| | | |
| | | void deletedTjGroupingProByGroupingId(String groupingId); |
| | | |
| | | // boolean saveTjOrderDetailsByGroupId(String groupingId,String userName, String userId,String orderId); |
| | | } |
| | |
| | | |
| | | List<TjOrderDetail> getTjOrderDetailList(String startDate,String endDate); |
| | | |
| | | List<TjOrderDetail> saveTjOrderDetailsByCusId(String cusId,String orderId,String userName, String userId); |
| | | boolean saveTjOrderDetailsByCusId(String cusId,String orderId,String userName, String userId); |
| | | |
| | | boolean updateTjOrderDetailsByOrderId(String orderId,String userName, String userId,String ls); |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ltkj.hosp.domain.TjOrderDetail; |
| | | import com.ltkj.hosp.domain.TjOrderRemark; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | String getTjOrderRemarkProIdList(String tjNumber); |
| | | |
| | | |
| | | boolean saveTjOrderRemarkByOrderId(String tjNumber, String userName, String userId,String orderId); |
| | | } |
| | |
| | | */ |
| | | public interface TjAsyncService { |
| | | |
| | | //个人登记时异步处理 |
| | | void extracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater); |
| | | |
| | | //个人登记时异步处理 |
| | | void newSaveextracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater); |
| | | |
| | |
| | | //添加临时表套餐 |
| | | void addRedisTransitionPac(String cusId, Long pacId, List<TjPackageProject> ppList); |
| | | |
| | | |
| | | void saveRedisTransitionByPacId(String cusId, Long pacId,List<Long> proIds); |
| | | |
| | | //添加临时表单项 |
| | | void addRedisTransitionPro(String cusId, List<Long> proIds); |
| | | |
| | |
| | | public Date getTbTransitionCreateTimeByCusId(String cusId) { |
| | | return tbTransitionMapper.getTbTransitionCreateTimeByCusId(cusId); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateTbTransitionPriceByCusId(String cusId,BigDecimal discount) { |
| | | return tbTransitionMapper.updateTbTransitionPriceByCusId(cusId,discount); |
| | | } |
| | | |
| | | @Override |
| | | public void saveRedisTransitionByPacId(String cusId, Long pacId) { |
| | | tbTransitionMapper.saveRedisTransitionByPacId(cusId,pacId); |
| | | } |
| | | |
| | | @Override |
| | | public void saveRedisTransitionByProId(String cusId, Long proId) { |
| | | tbTransitionMapper.saveRedisTransitionByProId(cusId,proId); |
| | | } |
| | | } |
| | |
| | | return tjAskMedicalHistoryMapper.deleteTjAskMedicalHistoryByAskId(askId); |
| | | } |
| | | |
| | | /** |
| | | @Override |
| | | public boolean updateTjAskMedicalHistoryByCusId(String tjNum, String userName, String userId,String cusId) { |
| | | return tjAskMedicalHistoryMapper.updateTjAskMedicalHistoryByCusId(tjNum,userName,userId,cusId); |
| | | } |
| | | |
| | | /** |
| | | * 新增${subTable.functionName}信息 |
| | | * |
| | | * @param tjAskMedicalHistory 问诊对象 |
| | |
| | | private ITjGroupingProService groupingProService; |
| | | |
| | | @Override |
| | | @Async("async") |
| | | public void extracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater) { |
| | | |
| | | long l = System.currentTimeMillis(); |
| | | |
| | | LambdaQueryWrapper<TjAskMedicalHistory> wq=new LambdaQueryWrapper<>(); |
| | | wq.eq(TjAskMedicalHistory::getCusId,tjCustomer.getCusId()); |
| | | wq.isNull(TjAskMedicalHistory::getTjNum); |
| | | TjAskMedicalHistory history = tjAskMedicalHistoryService.getOne(wq); |
| | | if(null !=history){ |
| | | history.setTjNum(tjOrder.getTjNumber()); |
| | | tjAskMedicalHistoryService.updateById(history); |
| | | } |
| | | |
| | | List<TbTransition> tbTransitionList =null; |
| | | if (redisCache.hasKey(tjCustomer.getCusIdcard())) { |
| | | tbTransitionList = redisCache.getCacheList(tjCustomer.getCusIdcard()); |
| | | redisCache.deleteObject(tjCustomer.getCusIdcard()); |
| | | }else { |
| | | LambdaQueryWrapper<TbTransition> wqq = new LambdaQueryWrapper<>(); |
| | | wqq.eq(TbTransition::getCusId, tjCustomer.getCusIdcard()); |
| | | tbTransitionList = transitionService.list(wqq); |
| | | } |
| | | if (redisCache.hasKey(tjCustomer.getCusIdcard() + "cusId")) |
| | | redisCache.deleteObject(tjCustomer.getCusIdcard() + "cusId"); |
| | | if (null != tbTransitionList && tbTransitionList.size() > 0) { |
| | | //所有子项 |
| | | for (TbTransition transition : tbTransitionList) { |
| | | TjOrderDetail detail = new TjOrderDetail(); |
| | | detail.setOrderId(tjOrder.getOrderId()); |
| | | detail.setProId(transition.getProId()); |
| | | detail.setTjStatus(0L); |
| | | detail.setCreateBy(sysUser.getNickName()); |
| | | detail.setCreateTime(new Date()); |
| | | detail.setUpdateBy(sysUser.getNickName()); |
| | | detail.setUpdateTime(new Date()); |
| | | detail.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | //获取该项目的默认值赋值给结果 |
| | | TjProject tjProject = projectService.selectTjProjectByProId(transition.getProId()); |
| | | if(null !=tjProject){ |
| | | if(null !=tjProject.getProDefault()){ |
| | | detail.setProResult(tjProject.getProDefault()); |
| | | }else { |
| | | detail.setProResult(null); |
| | | } |
| | | detail.setIsSampling(String.valueOf(tjProject.getIsSampling())); |
| | | } |
| | | if (null != transition.getPacId()) { |
| | | detail.setProType(String.valueOf(transition.getPacId())); |
| | | } |
| | | tjOrderDetailService.save(detail); |
| | | transition.setOrdPrice(transition.getNowPrice()); |
| | | transition.setNowPrice(transition.getNowPrice().multiply(discount)); |
| | | transitionService.updateById(transition); |
| | | |
| | | } |
| | | //父项 |
| | | ArrayList<TbTransition> collect = tbTransitionList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TbTransition::getParentProId))), ArrayList::new)); |
| | | for (TbTransition transition : collect) { |
| | | TjOrderDetail detail = new TjOrderDetail(); |
| | | if (null != transition.getPacId()) { |
| | | detail.setProType(String.valueOf(transition.getPacId())); |
| | | } |
| | | TjProject tjProject = projectService.selectTjProjectByProId(transition.getParentProId()); |
| | | detail.setIsSampling(String.valueOf(tjProject.getIsSampling())); |
| | | detail.setOrderId(tjOrder.getOrderId()); |
| | | detail.setProId(transition.getParentProId()); |
| | | detail.setTjStatus(0L); |
| | | detail.setCreateBy(sysUser.getNickName()); |
| | | detail.setCreateTime(new Date()); |
| | | detail.setUpdateBy(sysUser.getNickName()); |
| | | detail.setUpdateTime(new Date()); |
| | | detail.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderDetailService.save(detail); |
| | | } |
| | | } |
| | | LambdaQueryWrapper<TjOrderDetail> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TjOrderDetail::getOrderId, tjOrder.getOrderId()); |
| | | List<TjOrderDetail> list = tjOrderDetailService.list(wrapper1); |
| | | if (list != null && list.size()>0) { |
| | | for (TjOrderDetail tjOrderDetail : list) { |
| | | TjProject tjProject = projectService.getById(tjOrderDetail.getProId()); |
| | | if(tjProject==null){ |
| | | continue; |
| | | } |
| | | tjOrderDetail.setProject(tjProject); |
| | | if (tjProject.getProParentId() == 0) { |
| | | TjOrderRemark tjOrderRemark = new TjOrderRemark(); |
| | | tjOrderRemark.setProId(tjProject.getProId()); |
| | | tjOrderRemark.setProName(tjProject.getProName()); |
| | | tjOrderRemark.setDeptId(tjProject.getDeptId()); |
| | | tjOrderRemark.setTjNumber(tjOrder.getTjNumber()); |
| | | tjOrderRemark.setCreateBy(sysUser.getNickName()); |
| | | tjOrderRemark.setCreateTime(new Date()); |
| | | tjOrderRemark.setUpdateBy(sysUser.getNickName()); |
| | | tjOrderRemark.setUpdateTime(new Date()); |
| | | tjOrderRemark.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderRemark.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | orderRemarkService.save(tjOrderRemark); |
| | | } |
| | | if ("1".equals(tjOrder.getTjType())) { |
| | | if (null != tjReservation && tjReservation.getPayType() == 1) { |
| | | tjOrderDetail.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | } |
| | | if(tjFlowingWater.getPayStasus()==1){ |
| | | tjOrderDetail.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | tjOrderDetailService.updateById(tjOrderDetail); |
| | | } |
| | | } |
| | | System.out.println("这段代码时间"+(l-System.currentTimeMillis())); |
| | | } |
| | | |
| | | @Override |
| | | public void newSaveextracted(TjOrder tjOrder, TjCustomer tjCustomer, BigDecimal discount, SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater) { |
| | | long l = System.currentTimeMillis(); |
| | | |
| | |
| | | @Override |
| | | @Async("async") |
| | | public void ttextracted(TjOrder tjOrder, TjCustomer tjCustomer,SysUser sysUser, TjReservation tjReservation, TjFlowingWater tjFlowingWater) { |
| | | LambdaQueryWrapper<TjAskMedicalHistory> wq=new LambdaQueryWrapper<>(); |
| | | wq.eq(TjAskMedicalHistory::getCusId,tjCustomer.getCusId()); |
| | | wq.isNull(TjAskMedicalHistory::getTjNum); |
| | | TjAskMedicalHistory history = tjAskMedicalHistoryService.getOne(wq); |
| | | if(null !=history){ |
| | | history.setTjNum(tjOrder.getTjNumber()); |
| | | tjAskMedicalHistoryService.updateById(history); |
| | | } |
| | | |
| | | List<TbTransition> tbTransitionList =null; |
| | | if (redisCache.hasKey(tjCustomer.getCusIdcard())) { |
| | | tbTransitionList = redisCache.getCacheList(tjCustomer.getCusIdcard()); |
| | | redisCache.deleteObject(tjCustomer.getCusIdcard()); |
| | | }else { |
| | | LambdaQueryWrapper<TbTransition> wqq = new LambdaQueryWrapper<>(); |
| | | wqq.eq(TbTransition::getCusId, tjCustomer.getCusIdcard()); |
| | | tbTransitionList = transitionService.list(wqq); |
| | | } |
| | | if (redisCache.hasKey(tjCustomer.getCusIdcard() + "cusId")) |
| | | redisCache.deleteObject(tjCustomer.getCusIdcard() + "cusId"); |
| | | if (null != tbTransitionList && tbTransitionList.size() > 0) { |
| | | //所有子项 |
| | | for (TbTransition transition : tbTransitionList) { |
| | | TjOrderDetail detail = new TjOrderDetail(); |
| | | detail.setOrderId(tjOrder.getOrderId()); |
| | | detail.setProId(transition.getProId()); |
| | | detail.setTjStatus(0L); |
| | | detail.setCreateBy(sysUser.getNickName()); |
| | | detail.setCreateTime(new Date()); |
| | | detail.setUpdateBy(sysUser.getNickName()); |
| | | detail.setUpdateTime(new Date()); |
| | | detail.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | //获取该项目的默认值赋值给结果 |
| | | TjProject tjProject = projectService.getById(transition.getProId()); |
| | | if(null !=tjProject){ |
| | | if(null !=tjProject.getProDefault()){ |
| | | detail.setProResult(tjProject.getProDefault()); |
| | | }else { |
| | | detail.setProResult(null); |
| | | } |
| | | detail.setIsSampling(String.valueOf(tjProject.getIsSampling())); |
| | | } |
| | | if (null != transition.getPacId()) { |
| | | detail.setProType(String.valueOf(transition.getPacId())); |
| | | } |
| | | tjOrderDetailService.save(detail); |
| | | } |
| | | //父项 |
| | | ArrayList<TbTransition> collect = tbTransitionList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> |
| | | new TreeSet<>(Comparator.comparing(TbTransition::getParentProId))), ArrayList::new)); |
| | | for (TbTransition transition : collect) { |
| | | TjOrderDetail detail = new TjOrderDetail(); |
| | | if (null != transition.getPacId()) { |
| | | detail.setProType(String.valueOf(transition.getPacId())); |
| | | } |
| | | TjProject tjProject = projectService.selectTjProjectByProId(transition.getParentProId()); |
| | | detail.setIsSampling(String.valueOf(tjProject.getIsSampling())); |
| | | detail.setOrderId(tjOrder.getOrderId()); |
| | | detail.setProId(transition.getParentProId()); |
| | | detail.setTjStatus(0L); |
| | | detail.setCreateBy(sysUser.getNickName()); |
| | | detail.setCreateTime(new Date()); |
| | | detail.setUpdateBy(sysUser.getNickName()); |
| | | detail.setUpdateTime(new Date()); |
| | | detail.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | detail.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderDetailService.save(detail); |
| | | } |
| | | }else { |
| | | tjAskMedicalHistoryService.updateTjAskMedicalHistoryByCusId(tjOrder.getTjNumber(),sysUser.getNickName(),String.valueOf(sysUser.getUserId()), String.valueOf(tjCustomer.getCusId())); |
| | | |
| | | boolean b = tjOrderDetailService.saveTjOrderDetailsByCusId(tjCustomer.getCusIdcard(), String.valueOf(tjOrder.getOrderId()), sysUser.getNickName(), String.valueOf(sysUser.getUserId())); |
| | | if (!b){ |
| | | List<TjGroupingPro> proList = groupingProService.list(new LambdaQueryWrapper<TjGroupingPro>().eq(TjGroupingPro::getGroupingId,tjOrder.getGroupId())); |
| | | if(null !=proList && proList.size()>0){ |
| | | for (TjGroupingPro groupingPro : proList) { |
| | |
| | | } |
| | | } |
| | | |
| | | List<TjOrderDetail> list = tjOrderDetailService.getTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId())); |
| | | if (list != null) { |
| | | for (TjOrderDetail tjOrderDetail : list) { |
| | | TjProject tjProject = projectService.getById(tjOrderDetail.getProId()); |
| | | if(tjProject==null){ |
| | | continue; |
| | | } |
| | | tjOrderDetail.setProject(tjProject); |
| | | if (tjProject.getProParentId() == 0) { |
| | | TjOrderRemark tjOrderRemark = new TjOrderRemark(); |
| | | tjOrderRemark.setProId(tjProject.getProId()); |
| | | tjOrderRemark.setProName(tjProject.getProName()); |
| | | tjOrderRemark.setDeptId(tjProject.getDeptId()); |
| | | tjOrderRemark.setTjNumber(tjOrder.getTjNumber()); |
| | | tjOrderRemark.setCreateBy(sysUser.getNickName()); |
| | | tjOrderRemark.setCreateTime(new Date()); |
| | | tjOrderRemark.setUpdateBy(sysUser.getNickName()); |
| | | tjOrderRemark.setUpdateTime(new Date()); |
| | | tjOrderRemark.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | tjOrderRemark.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | orderRemarkService.save(tjOrderRemark); |
| | | } |
| | | if ("1".equals(tjOrder.getTjType())) { |
| | | if (null != tjReservation && tjReservation.getPayType() == 1) { |
| | | tjOrderDetail.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | } |
| | | if(tjFlowingWater.getPayStasus()==1){ |
| | | tjOrderDetail.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | tjOrderDetailService.updateById(tjOrderDetail); |
| | | //添加remark表数据 |
| | | orderRemarkService.saveTjOrderRemarkByOrderId(tjOrder.getTjNumber(),sysUser.getNickName(),String.valueOf(sysUser.getUserId()), String.valueOf(tjOrder.getOrderId())); |
| | | |
| | | //判断是否交钱 |
| | | if ("1".equals(tjOrder.getTjType())) { |
| | | if (null != tjReservation && tjReservation.getPayType() == 1) { |
| | | tjOrderDetailService.updateTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId()), |
| | | sysUser.getNickName(), String.valueOf(sysUser.getUserId()),String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | } |
| | | if (tjFlowingWater.getPayStasus() == 1) { |
| | | tjOrderDetailService.updateTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId()), |
| | | sysUser.getNickName(), String.valueOf(sysUser.getUserId()),String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | } |
| | | |
| | | // List<TjOrderDetail> list = tjOrderDetailService.getTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId())); |
| | | // if (list != null) { |
| | | // for (TjOrderDetail tjOrderDetail : list) { |
| | | // TjProject tjProject = projectService.getById(tjOrderDetail.getProId()); |
| | | // if(tjProject==null){ |
| | | // continue; |
| | | // } |
| | | // tjOrderDetail.setProject(tjProject); |
| | | // if (tjProject.getProParentId() == 0) { |
| | | // TjOrderRemark tjOrderRemark = new TjOrderRemark(); |
| | | // tjOrderRemark.setProId(tjProject.getProId()); |
| | | // tjOrderRemark.setProName(tjProject.getProName()); |
| | | // tjOrderRemark.setDeptId(tjProject.getDeptId()); |
| | | // tjOrderRemark.setTjNumber(tjOrder.getTjNumber()); |
| | | // tjOrderRemark.setCreateBy(sysUser.getNickName()); |
| | | // tjOrderRemark.setCreateTime(new Date()); |
| | | // tjOrderRemark.setUpdateBy(sysUser.getNickName()); |
| | | // tjOrderRemark.setUpdateTime(new Date()); |
| | | // tjOrderRemark.setCreateId(String.valueOf(sysUser.getUserId())); |
| | | // tjOrderRemark.setUpdateId(String.valueOf(sysUser.getUserId())); |
| | | // orderRemarkService.save(tjOrderRemark); |
| | | // } |
| | | // if ("1".equals(tjOrder.getTjType())) { |
| | | // if (null != tjReservation && tjReservation.getPayType() == 1) { |
| | | // tjOrderDetail.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | // } |
| | | // } |
| | | // if(tjFlowingWater.getPayStasus()==1){ |
| | | // tjOrderDetail.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | // } |
| | | // tjOrderDetailService.updateById(tjOrderDetail); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | @Override |
| | |
| | | TbTransition tbTransition = new TbTransition(); |
| | | tbTransition.setCusId(cusId); |
| | | tbTransition.setPacId(pacId); |
| | | // if (null != tjProject.getProPrice()) { |
| | | // tbTransition.setOrdPrice(tjProject.getProPrice()); |
| | | // } else { |
| | | // tbTransition.setOrdPrice(BigDecimal.valueOf(0.00)); |
| | | // } |
| | | |
| | | if (null != tjPackageProject.getPriceNow() && divide.compareTo(BigDecimal.valueOf(0)) > 0) { |
| | | tbTransition.setNowPrice(tjProject.getProPrice().multiply(divide).setScale(2,RoundingMode.HALF_DOWN)); |
| | | tbTransition.setOrdPrice(tjProject.getProPrice().multiply(divide).setScale(2,RoundingMode.HALF_DOWN)); |
| | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Async("async") |
| | | public void saveRedisTransitionByPacId(String cusId, Long pacId,List<Long> proIds) { |
| | | if(null != pacId){ |
| | | transitionService.saveRedisTransitionByPacId(cusId,pacId); |
| | | } |
| | | if(null != proIds && proIds.size() > 0){ |
| | | saveRedisTransitionByProId(cusId,proIds); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | return cusName; |
| | | } |
| | | |
| | | |
| | | //临时表添加单项 |
| | | 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) { |
| | | continue; |
| | | } |
| | | transitionService.saveRedisTransitionByProId(cusId,proId); |
| | | } |
| | | } |
| | | } |
| | |
| | | public void deletedTjGroupingProByGroupingId(String groupingId) { |
| | | tjGroupingProMapper.deletedTjGroupingProByGroupingId(groupingId); |
| | | } |
| | | |
| | | // @Override |
| | | // public boolean saveTjOrderDetailsByGroupId(String groupingId, String userName, String userId,String orderId) { |
| | | // return tjGroupingProMapper.saveTjOrderDetailsByGroupId(groupingId,userName,userId,orderId); |
| | | // } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TjOrderDetail> saveTjOrderDetailsByCusId(String cusId,String orderId, String userName, String userId) { |
| | | public boolean saveTjOrderDetailsByCusId(String cusId,String orderId, String userName, String userId) { |
| | | return tjOrderDetailMapper.saveTjOrderDetailsByCusId(cusId,orderId,userName,userId); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateTjOrderDetailsByOrderId(String orderId, String userName, String userId,String ls) { |
| | | return tjOrderDetailMapper.updateTjOrderDetailsByOrderId(orderId,userName,userId,ls); |
| | | } |
| | | |
| | | } |
| | |
| | | public String getTjOrderRemarkProIdList(String tjNumber) { |
| | | return mapper.getTjOrderRemarkProIdList(tjNumber); |
| | | } |
| | | |
| | | @Override |
| | | public boolean saveTjOrderRemarkByOrderId(String tjNumber, String userName, String userId,String orderId) { |
| | | return mapper.saveTjOrderRemarkByOrderId(tjNumber,userName,userId,orderId); |
| | | } |
| | | } |