package com.ltkj.web.controller.lis; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.hosp.domain.TbTransition; import com.ltkj.hosp.domain.TjCustomer; import com.ltkj.hosp.domain.TjOrder; import com.ltkj.hosp.service.*; import com.ltkj.system.service.ISysDeptService; import com.ltkj.web.controller.pacs.PacsApiMethodService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; /** * @Company: 西安路泰科技有限公司 * @Author: zhaowenxuan * @Date: 2024/10/10 16:59 */ @RestController @RequestMapping("lis") public class LisController { @Autowired private ITbTransitionService tbTransitionService; @Autowired private LisApiMethod lisApiMethod; @Autowired private ITjOrderService orderService; @Autowired private ITjCustomerService customerService; @Autowired private PacsApiMethodService pacsApiMethodService; @PostMapping("test") public AjaxResult test(@RequestBody String json){ JSONObject parseObj = JSONUtil.parseObj(json); String cusId = parseObj.getStr("cusId"); String cardId = parseObj.getStr("cardId"); // 检验保存 List detailList = tbTransitionService.getTbTransitionListByCusId(cusId,cardId); TjOrder tjOrder = orderService.getOrderByTjNum(detailList.get(0).getTjNum()); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(TjCustomer::getCusIdcard,cusId); TjCustomer customer = customerService.getOne(wrapper); // lisApiMethod.save(tjOrder,customer,detailList); // 检验作废 lisApiMethod.cancel("",tjOrder.getCardId(),customer.getCusName()); // 检查保存 // pacsApiMethodService.save(tjOrder,customer,detailList); // 检查作废 pacsApiMethodService.updatePacsApply("","",customer.getCusName()); return AjaxResult.success(); } }