| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.core.domain.entity.SysUser; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.mapper.TjProjectMapper; |
| | | import com.ltkj.hosp.mapper.TjSamplingMapper; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.controller.system.TjOrderController; |
| | | import com.ltkj.web.wxUtils.HttpClientUtils; |
| | | import jodd.util.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private TjProjectMapper tjProjectMapper; |
| | | @Autowired |
| | | private ISysConfigService sysConfigService; |
| | | @Autowired |
| | | private TjOrderController tjOrderController; |
| | | @Autowired |
| | | private ISysUserService userService; |
| | | @Autowired |
| | | private TjOrderYcxmService ycxmService; |
| | | |
| | | /** |
| | | * 收退费回调接口 |
| | |
| | | TjFlowingWater water = tjFlowingWaterService.getOne(wrapper); |
| | | if(null !=water){ |
| | | water.setPayStasus(1L); |
| | | water.setSfjs("1"); |
| | | water.setJsrq(new Date()); |
| | | water.setJsrxm("his回调"); |
| | | water.setJsrdm("999"); |
| | | if (tjFlowingWaterService.updateById(water)) { |
| | | String jxbz = water.getJxbz(); |
| | | if(StringUtil.isNotBlank(jxbz)){ |
| | |
| | | // wrapper1.set(TjSampling::getIsPay,1); |
| | | // tjSamplingService.update(wrapper1); |
| | | } |
| | | SysUser user = null; |
| | | if (water.getCreateId()!= null) |
| | | user = userService.getById(water.getCreateId()); |
| | | else user = userService.getById(1L); |
| | | TjOrder tjOrder = orderService.getById(water.getOrderId()); |
| | | List<TjOrderDetail> detailList = tjOrderDetailService.getCaiYangDengJi(water.getOrderId()); |
| | | tjOrderController.addCaiYangDengJi(detailList, !detailList.isEmpty(), tjOrder, user, null); |
| | | } |
| | | }else { |
| | | return AjaxResult.error("查不到流水号: "+feiYongId); |
| | |
| | | String bldh = water.getJxbz(); |
| | | // lisRevoke(water.getTjNumber(),bldh); |
| | | if (bldh != null){ |
| | | remarkService.deleteTjOrderDetailByjxbz(bldh); |
| | | remarkService.updateTjOrderRemarkSfbzByJxbz(order.getOrderId().toString(),bldh,null); |
| | | /* remarkService.deleteTjOrderDetailByjxbz(bldh); |
| | | tjOrderDetailService.deleteTjOrderDetailByjxbz(bldh); |
| | | tjFlowingWaterService.deleteTjOrderDetailByjxbz(bldh); |
| | | transitionService.deleteTjOrderDetailByjxbz(bldh); |
| | | blService.remove(new LambdaQueryWrapper<TjProBl>().eq(TjProBl::getTjh, order.getTjNumber()).eq(TjProBl::getBldh, bldh)); |
| | | tjSamplingMapper.deleteByTjNumAndCusIdAndJxbzo(order.getTjNumber(), order.getUserId(),bldh); |
| | | tjSamplingMapper.deleteByTjNumAndCusIdAndJxbzo(order.getTjNumber(), order.getUserId(),bldh);*/ |
| | | }else { |
| | | tjOrderService.deleteTjOrderByOrderId(order.getOrderId()); |
| | | /* TjCustomer customer = tjCustomerService.getById(order.getUserId()); |
| | | customer.setCardId("0"); |
| | | tjCustomerService.updateById(customer); |
| | | tjOrderService.removeById(order.getOrderId());*/ |
| | | /* tjOrderService.deleteTjOrderByOrderId(order.getOrderId()); |
| | | tjOrderDetailService.deleteTjOrderDetailByOrderDetailId(String.valueOf(order.getOrderId())); |
| | | remarkService.deletedOrderRemarkByTjNum(order.getTjNumber()); |
| | | tjFlowingWaterService.deleteTjFlowingWaterByOrderId(String.valueOf(order.getOrderId())); |
| | | transitionService.deletedTbTransitionByTjNum(order.getTjNumber()); |
| | | ycxmService.delOrderYcXmJyByTjh(order.getTjNumber()); |
| | | tjSamplingMapper.deleteByTjNumAndCusId(order.getTjNumber(), order.getUserId());*/ |
| | | |
| | | TjCustomer customer = tjCustomerService.getById(order.getUserId()); |
| | | customer.setCardId("0"); |
| | | tjCustomerService.updateById(customer); |
| | | tjSamplingMapper.deleteByTjNumAndCusId(order.getTjNumber(), order.getUserId()); |
| | | remarkService.updateTjOrderRemarkSfbzByJxbzisnull(order.getOrderId().toString(),null); |
| | | |
| | | |
| | | } |
| | | water.setPayStasus(2L); |
| | | water.setRefundPersonId("his回调"); |
| | | water.setRefundTime(new Date()); |
| | | water.setRefundPrice(water.getPaidIn()); |
| | | tjFlowingWaterService.updateById(water); |
| | | } |
| | | } |
| | | } |