| | |
| | | |
| | | import java.math.BigInteger; |
| | | |
| | | @Configuration |
| | | //@Configuration |
| | | public class JacksonConfig { |
| | | |
| | | /** |
| | |
| | | @Bean |
| | | public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { |
| | | return builder -> builder |
| | | .serializerByType(BigInteger.class, ToStringSerializer.instance) |
| | | // .serializerByType(BigInteger.class, ToStringSerializer.instance) |
| | | .serializerByType(Long.class, ToStringSerializer.instance); |
| | | } |
| | | |
| | |
| | | Map<String, Object> resultDatasss = (Map<String, Object>) resultDatas.get(0); |
| | | String hisRegistrationId = resultDatasss.get("his_registration_id").toString(); |
| | | //保存挂号入参出参 |
| | | resultDatasss.put("cardId", customer.getCardId()); |
| | | resultDatasss.put("cardId",hisRegistrationId); |
| | | JSONObject object4 = JSONUtil.parseObj(resultDatasss); |
| | | LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpinregapply"); |
| | |
| | | |
| | | //门诊医生接诊 |
| | | controller.Outpinconapply(hisRegistrationId, date, "00029"); |
| | | if(null != tjOrder.getTjCategory() && !tjOrder.getTjCategory().equals("13")){ |
| | | customer.setCardId(hisRegistrationId); |
| | | customerService.updateById(customer); |
| | | } |
| | | transitionService.updateCardIdByTjNumAndIdCard(customer.getCusIdcard(), hisRegistrationId, tjOrder.getTjNumber()); |
| | | tjOrder.setCardId(hisRegistrationId); |
| | | orderService.updateById(tjOrder); |
| | |
| | | LambdaQueryWrapper<TjOrderRemark> wqq = new LambdaQueryWrapper<>(); |
| | | wqq.eq(TjOrderRemark::getTjNumber, tjNumber); |
| | | wqq.ne(TjOrderRemark::getDeptId, "241"); |
| | | wqq.in(TjOrderRemark::getDeptId, "269", "270", "253", "254", "255", "257", "271"); |
| | | wqq.in(TjOrderRemark::getDeptId, "269", "270", "253", "254", "255", "257"); |
| | | wqq.notIn(TjOrderRemark::getProId, projectService.getNneedReprotProId()); |
| | | List<TjOrderRemark> tjOrderRemarks = tjOrderRemarkService.list(wqq); |
| | | for (TjOrderRemark tjOrderRemark : tjOrderRemarks) { |
| | |
| | | tjFlowingWaterLambdaQueryWrapper.eq(TjFlowingWater::getIsAddition,"N"); |
| | | TjFlowingWater tjFlowingWater = tjFlowingWaterService.getOne(tjFlowingWaterLambdaQueryWrapper); |
| | | // if (tjFlowingWater1.getPayStasus() != 1){ |
| | | LambdaQueryWrapper<TjCustomer> tjCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | tjCustomerLambdaQueryWrapper.eq(TjCustomer::getCusId,tjOrder.getUserId()); |
| | | TjCustomer tjCustomer = tjCustomerService.getOne(tjCustomerLambdaQueryWrapper); |
| | | // LambdaQueryWrapper<TjCustomer> tjCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | // tjCustomerLambdaQueryWrapper.eq(TjCustomer::getCusId,tjOrder.getUserId()); |
| | | // TjCustomer tjCustomer = tjCustomerService.getOne(tjCustomerLambdaQueryWrapper); |
| | | HashMap<String, Object> hisRequestParams = new HashMap<>(); |
| | | // 不在需要身份证号 |
| | | // hisRequestParams.put("card_no",tjCustomer.getCusIdcard()); |
| | |
| | | Long cusNumber = tjCustomer.getCusNumber(); |
| | | cusNumber += 1; |
| | | tjCustomer.setCusNumber(cusNumber); |
| | | BigDecimal discount = BigDecimal.valueOf(Double.parseDouble(tjOrder.getTjFlowingWater().getDiscount())).divide(BigDecimal.valueOf(10)); |
| | | BigDecimal discount = BigDecimal.valueOf(Double.parseDouble(tjOrder.getTjFlowingWater().getDiscount())); |
| | | TjFlowingWater tjFlowingWater = new TjFlowingWater(); |
| | | tjFlowingWater.setPayStasus(0L); |
| | | if ("1".equals(tjOrder.getTjType())) { |
| | |
| | | tjCustomerService.updateById(customer); |
| | | String configByKey = configService.selectConfigByKey("sfkqdyhis"); |
| | | if (configByKey.equals("Y")) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("cardtype", "4"); |
| | | // map.put("input", order.getCardId()); |
| | | map.put("input", customer.getPationId()); |
| | | LocalDate currentDate = LocalDate.now(); |
| | | LocalDateTime startOfDay = currentDate.atStartOfDay(); |
| | | LocalDateTime nineteenOClock = currentDate.atTime(LocalTime.of(19, 0)); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | String ksrq = startOfDay.format(formatter); |
| | | String jsrq = nineteenOClock.format(formatter); |
| | | map.put("ksrq", ksrq); |
| | | map.put("jsrq", jsrq); |
| | | AjaxResult result = hisApiGetMethodService.getHISDataNew("Getoutpatientcostinfo", map); |
| | | if (Integer.parseInt(String.valueOf(result.get("code"))) == 200) { |
| | | |
| | | HashMap<String, Object> hisRequestParams = new HashMap<>(); |
| | | hisRequestParams.put("patientId", order.getCardId()); |
| | | AjaxResult queryPay = hisApiGetMethodService.getHISDataNew("QueryPay", hisRequestParams); |
| | | if (Integer.parseInt(queryPay.get("code").toString()) == 200) { |
| | | List<Map<String, String>> data = (List<Map<String, String>>) queryPay.get("data"); |
| | | |
| | | BigDecimal cateFeeAll = BigDecimal.ZERO; |
| | | for (Map<String, String> datum : data) { |
| | | BigDecimal cateFee = new BigDecimal(datum.get("CateFee")); |
| | | cateFeeAll = cateFeeAll.add(cateFee); |
| | | } |
| | | if (cateFeeAll.compareTo(BigDecimal.ZERO) != 0) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("撤销失败,该人员已缴费,请先退费!"); |
| | | } else { |
| | | } |
| | | } |
| | | boolean zfHisApiMethods = hisApiMethod.ZfHisApiMethods(null, order); |
| | | if (zfHisApiMethods) { |
| | | return AjaxResult.success("撤销成功", map); |
| | | return AjaxResult.success("撤销成功"); |
| | | } else { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("撤销失败,调用作废出现失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return AjaxResult.success("撤销成功!!!"); |
| | | } |
| | |
| | | "a.ord_price=a.now_price,\n" + |
| | | "a.now_price=a.ord_price*(#{discount}/10)," + |
| | | "a.tj_num=#{tjNum}"+ |
| | | " WHERE a.cus_id=#{cusId} ") |
| | | " WHERE a.cus_id=#{cusId} AND ISNULL(a.tj_num) ") |
| | | boolean updateTbTransitionPriceByCusId(@Param("cusId")String cusId,@Param("discount")BigDecimal discount,@Param("tjNum")String tjNum); |
| | | |
| | | |