|  |  |  | @ -4,12 +4,14 @@ import cn.hutool.core.collection.CollUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.collection.CollectionUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.exceptions.ExceptionUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.util.StrUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.json.JSONUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import com.alibaba.fastjson2.JSONObject; | 
			
		
	
		
			
				
					|  |  |  |  | import com.alibaba.fastjson2.TypeReference; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.toolkit.StringUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.client.CommonHttpClient; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.client.ptxhyy.entity.HisProductEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.client.ptxhyy.entity.OrderUploadResponse; | 
			
		
	
	
		
			
				
					|  |  |  | @ -37,6 +39,7 @@ import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.entity.basic.BasicCorpEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.entity.basic.BasicSkProjectEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.entity.inout.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.entity.ptxhyy.SickerEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.entity.thrsys.ThrSystemBusApiEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.http.HttpClient; | 
			
		
	
	
		
			
				
					|  |  |  | @ -44,17 +47,20 @@ import com.glxp.mipsdl.req.base.UdiwmsInvProductsRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.req.base.UdiwmsOrderDetailRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.req.base.UdiwmsOrderRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.req.ctqyy.DlThirdProjectRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.req.ctqyy.GetSickRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.req.ptxhyy.PtxhyyInvRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.req.ptxhyy.PtxhyyOrderDetailRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.req.ptxhyy.PtxhyyOrderRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.res.BaseResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.res.PageSimpleResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.res.ptxhyy.PtxhInvResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.res.udiwms.BasicSkSickerResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.res.udiwms.ThrInvResultResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.service.auth.AuthWarehouseService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.service.order.OrderUploadLogService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.service.thrsys.ThrCorpService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.thirddao.ptxhyy.PtxhyySickerMapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.util.*; | 
			
		
	
		
			
				
					|  |  |  |  | import lombok.RequiredArgsConstructor; | 
			
		
	
		
			
				
					|  |  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
	
		
			
				
					|  |  |  | @ -91,13 +97,8 @@ public class PtxhyyClient extends CommonHttpClient { | 
			
		
	
		
			
				
					|  |  |  |  |     private final ThrDeptDao thrDeptDao; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     ThrHslbService thrHslbService; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     BasicSkProjectMapper basicSkProjectMapper; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     UdiRlSupDao udiRlSupDao; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     BasicDestinyRelMapper basicDestinyRelMapper; | 
			
		
	
		
			
				
					|  |  |  |  |     PtxhyySickerMapper ptxhyySickerMapper; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse submitOrders(UdiwmsOrderRequest udiwmsOrderRequest) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -478,10 +479,9 @@ public class PtxhyyClient extends CommonHttpClient { | 
			
		
	
		
			
				
					|  |  |  |  |                     thrInvResultResponse.setBillType("SC71021292871198");       //科室收费出库
 | 
			
		
	
		
			
				
					|  |  |  |  |                     thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     List<ThrInvWarehouseEntity> thrInvWarehouseEntitys = thrInvWarehouseDao.selectList(new QueryWrapper<ThrInvWarehouseEntity>().eq("name", ptxhInvResponse.getZxks())); | 
			
		
	
		
			
				
					|  |  |  |  |                     List<ThrInvWarehouseEntity> thrInvWarehouseEntitys = thrInvWarehouseDao.selectList(new QueryWrapper<ThrInvWarehouseEntity>().eq("code", ptxhInvResponse.getZxksdm())); | 
			
		
	
		
			
				
					|  |  |  |  |                     if (CollUtil.isNotEmpty(thrInvWarehouseEntitys)) { | 
			
		
	
		
			
				
					|  |  |  |  |                         for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrInvWarehouseEntitys) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                             AuthWarehouseEntity authWarehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("thirdId", thrInvWarehouseEntity.getCode()).last("limit 1")); | 
			
		
	
		
			
				
					|  |  |  |  |                             if (authWarehouseEntity != null) { | 
			
		
	
		
			
				
					|  |  |  |  |                                 thrInvResultResponse.setInvCode(authWarehouseEntity.getCode()); | 
			
		
	
	
		
			
				
					|  |  |  | @ -495,6 +495,11 @@ public class PtxhyyClient extends CommonHttpClient { | 
			
		
	
		
			
				
					|  |  |  |  |                                 thrInvResultResponse.setType(ptxhInvResponse.getLb()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 thrInvResultResponse.setOutCount(ptxhInvResponse.getZsl()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 thrInvResultResponse.setReCount(ptxhInvResponse.getZsl()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 thrInvResultResponse.setSickerName(ptxhInvResponse.getBrxm()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 thrInvResultResponse.setSickerCode(ptxhInvResponse.getJzhm()); | 
			
		
	
		
			
				
					|  |  |  |  |                                 if (StrUtil.isNotEmpty(ptxhInvResponse.getRq())) { | 
			
		
	
		
			
				
					|  |  |  |  |                                     thrInvResultResponse.setChargeTime(DateUtil.timeStampToDate(Long.parseLong(ptxhInvResponse.getRq()))); | 
			
		
	
		
			
				
					|  |  |  |  |                                 } | 
			
		
	
		
			
				
					|  |  |  |  |                                 thrInvResultResponses.add(thrInvResultResponse); | 
			
		
	
		
			
				
					|  |  |  |  |                                 if (seenNames.add(ptxhInvResponse.getFyxh())) { | 
			
		
	
		
			
				
					|  |  |  |  |                                     itemData.add(ptxhInvResponse); | 
			
		
	
	
		
			
				
					|  |  |  | @ -612,5 +617,29 @@ public class PtxhyyClient extends CommonHttpClient { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse getSickInfo(GetSickRequest getSickRequest) { | 
			
		
	
		
			
				
					|  |  |  |  |         IPage<SickerEntity> page = new Page<>(getSickRequest.getPage(), getSickRequest.getLimit()); | 
			
		
	
		
			
				
					|  |  |  |  |         IPage<SickerEntity> productEntityIPage = ptxhyySickerMapper.selectPage(page, new QueryWrapper<SickerEntity>() | 
			
		
	
		
			
				
					|  |  |  |  |                 .lambda() | 
			
		
	
		
			
				
					|  |  |  |  |                 .like(StringUtils.isNotBlank(getSickRequest.getCode()), SickerEntity::getZYHM, getSickRequest.getCode()) | 
			
		
	
		
			
				
					|  |  |  |  |                 .like(StringUtils.isNotBlank(getSickRequest.getName()), SickerEntity::getBRXM, getSickRequest.getName())); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         productEntityIPage.getRecords().forEach(sickerEntity -> { | 
			
		
	
		
			
				
					|  |  |  |  |             BasicSkSickerResponse.builder() | 
			
		
	
		
			
				
					|  |  |  |  |                     .sickerId(sickerEntity.getZYH()) | 
			
		
	
		
			
				
					|  |  |  |  |                     .code(sickerEntity.getZYH()) | 
			
		
	
		
			
				
					|  |  |  |  |                     .name(sickerEntity.getBRXM()) | 
			
		
	
		
			
				
					|  |  |  |  |                     .adNum(sickerEntity.getZYHM()) | 
			
		
	
		
			
				
					|  |  |  |  |                     .inHospTime(sickerEntity.getRYRQ()) | 
			
		
	
		
			
				
					|  |  |  |  |                     .outHospTime(sickerEntity.getCYRQ()) | 
			
		
	
		
			
				
					|  |  |  |  |                     .build(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         PageSimpleResponse<SickerEntity> pageSimpleResponse = new PageSimpleResponse<>(); | 
			
		
	
		
			
				
					|  |  |  |  |         pageSimpleResponse.setTotal(productEntityIPage.getTotal()); | 
			
		
	
		
			
				
					|  |  |  |  |         pageSimpleResponse.setList(productEntityIPage.getRecords()); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(pageSimpleResponse); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |