| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				 | 
				
					@ -1345,6 +1345,7 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    /**
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					     * ------------------------------------------现场管理医保相关接口方法--------------------------------------------------------------
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					     */
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				 | 
				
					@ -1374,9 +1375,10 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    .or().like(VInsurNationGoodsPhysic::getPSN_NO, key)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            );
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            wrapper.and(StrUtil.isNotEmpty(fromCorpName), t -> t.eq(VInsurNationGoodsPhysic::getPSN_NAME, fromCorpName));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            IPage<VInsurNationGoodsPhysic> page =goodsPhysicMapper.selectGroupedWithPagination(new Page<VInsurNationGoodsPhysic>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            // 拉取处方时,改成拉取v_ypzs_pres_info
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            IPage<VYpzsPresInfo> page = vYpzsPresInfoMapper.selectGroupedWithPagination(new Page<VYpzsPresInfo>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    udiwmsBasicSkPrescribeRequest);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            return this.covertSellOrder(udiwmsBasicSkPrescribeRequest, page);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        } else {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            LambdaQueryWrapper<VInsurNationGoodsReturn> wrapper = new LambdaQueryWrapper<>();
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				 | 
				
					@ -1396,8 +1398,8 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            );
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsReturn::getAPPLY_NO, code));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            wrapper.and(StrUtil.isNotEmpty(fromCorpName), t -> t.eq(VInsurNationGoodsReturn::getPSN_NAME, fromCorpName));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            IPage<VInsurNationGoodsReturn> page =vInsurNationGoodsReturnMapper.selectGroupedWithPagination(new Page<VInsurNationGoodsReturn>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            //拉取处方退货时,改成拉取v_ypzs_pres_info_return
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            IPage<VYpzsPresInfoReturn> page = vYpzsPresInfoReturnMapper.selectGroupedWithPagination(new Page<VYpzsPresInfoReturn>(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    udiwmsBasicSkPrescribeRequest);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            return this.covertReturnOrder(udiwmsBasicSkPrescribeRequest, page);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        }
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				 | 
				
					@ -1523,7 +1525,7 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    VYpzsIoInfo info = value.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    StringBuilder errorMsg = new StringBuilder();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    IoCollectOrder ioCollectOrder = new IoCollectOrder();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    ioCollectOrder.setBillNo(info.getPHYSIC_CODE());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    ioCollectOrder.setBillNo(info.getRECEIPT_NUMBER());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    ioCollectOrder.setFromType("HIS系统");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    ioCollectOrder.setBillTime(DateUtil.parseDate(info.getKEEP_BOOK_TIME()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    ioCollectOrder.setFromCorp(info.getCONSIGNEE());
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				 | 
				
					@ -1632,63 +1634,65 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					     * @param udiwmsBasicSkPrescribeRequest
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					     * @return
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					     */
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    private BaseResponse covertSellOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VInsurNationGoodsPhysic> page) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VInsurNationGoodsPhysic> presInfoEntities = page.getRecords();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VInsurNationGoodsPhysic> vInsurNationGoodsPhysics = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    private BaseResponse covertSellOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VYpzsPresInfo> page) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VYpzsPresInfo> presInfoEntities = page.getRecords();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VYpzsPresInfo> vInsurNationGoodsPhysics = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        if (CollUtil.isNotEmpty(presInfoEntities)) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            List<String> collect = presInfoEntities.stream().map(VInsurNationGoodsPhysic::getRXNO).collect(Collectors.toList());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            LambdaQueryWrapper<VInsurNationGoodsPhysic> wrapper1 = new LambdaQueryWrapper<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            wrapper1.in(VInsurNationGoodsPhysic::getRXNO,collect);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            vInsurNationGoodsPhysics = goodsPhysicMapper.selectList(wrapper1);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            List<String> collect = presInfoEntities.stream().map(VYpzsPresInfo::getPHYSIC_CODE).collect(Collectors.toList());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            LambdaQueryWrapper<VYpzsPresInfo> wrapper1 = new LambdaQueryWrapper<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            wrapper1.in(VYpzsPresInfo::getPHYSIC_CODE, collect);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            vInsurNationGoodsPhysics = vYpzsPresInfoMapper.selectList(wrapper1);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        // TODO: 2024/9/19 这边在转换的时候就不能用VInsurNationGoodsPhysic
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        if (CollUtil.isNotEmpty(vInsurNationGoodsPhysics)) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            Map<String, List<VInsurNationGoodsPhysic>> groupedByPrescribeNumber = vInsurNationGoodsPhysics.stream()
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    .collect(Collectors.groupingBy(VInsurNationGoodsPhysic::getRXNO));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            Map<String, List<VYpzsPresInfo>> groupedByPrescribeNumber = vInsurNationGoodsPhysics.stream()
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    .collect(Collectors.groupingBy(VYpzsPresInfo::getPHYSIC_CODE));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            groupedByPrescribeNumber.forEach((key, value) -> {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                VInsurNationGoodsPhysic presInfoEntity = value.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                VYpzsPresInfo presInfoEntity = value.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                StringBuilder errorMsg = new StringBuilder();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                IoCollectOrder ioCollectOrder = new IoCollectOrder();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBillNo(presInfoEntity.getRXNO());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBillNo(presInfoEntity.getPRESCRIBE_NUMBER());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromType("HIS系统");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromCorp(presInfoEntity.getSICK_ID());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setWorkPlaceCode(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromCorpName(presInfoEntity.getPSN_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                Date date = DateUtil.parseDate(presInfoEntity.getSEL_RETN_TIME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromCorpName(presInfoEntity.getSICK_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                Date date = DateUtil.parseDate(presInfoEntity.getLAY_TIME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBillTime(date);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setCreateTime(new Date());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setCreateUser(udiwmsBasicSkPrescribeRequest.getCreateUser());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBackupOrderRemark1(presInfoEntity.getSTOOUT_NO());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBackupOrderRemark2(presInfoEntity.getSICK_ID());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBackupOrderRemark3(presInfoEntity.getPSN_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBackupOrderRemark4(presInfoEntity.getPSN_NO());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                ioCollectOrder.setBackupOrderRemark3(presInfoEntity.getPSN_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                ioCollectOrder.setBackupOrderRemark4(presInfoEntity.getPSN_NO());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setUpdateTime(new Date());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setSplitStatus(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setTagStatus(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                List<IoCollectOrderBiz> bizList = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                value.forEach(entity -> {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getFIXMEDINS_HILIST_ID()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    if (basicUdirelEntity != null) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        collectOrderBiz.setRelId(basicUdirelEntity.getId());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    } else {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        errorMsg.append(entity.getFIXMEDINS_HILIST_NAME()).append("字典未对照").append(";");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        errorMsg.append(entity.getPHYSIC_NAME()).append("字典未对照").append(";");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    List<VYpzsPresInfo> vYpzsPresInfos = vYpzsPresInfoMapper.selectList(new LambdaQueryWrapper<VYpzsPresInfo>().eq(VYpzsPresInfo::getPRESCRIBE_NUMBER, entity.getRXNO()).eq(VYpzsPresInfo::getPHYSIC_CODE, entity.getFIXMEDINS_HILIST_ID()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                    List<VYpzsPresInfo> vYpzsPresInfos = vYpzsPresInfoMapper.selectList(new LambdaQueryWrapper<VYpzsPresInfo>().eq(VYpzsPresInfo::getPRESCRIBE_NUMBER, entity.getPRESCRIBE_NUMBER()).eq(VYpzsPresInfo::getPHYSIC_CODE, entity.getPHYSIC_CODE()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    if (CollUtil.isNotEmpty(vYpzsPresInfos)) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        VYpzsPresInfo vYpzsPresInfo = vYpzsPresInfos.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        collectOrderBiz.setGgxh(vYpzsPresInfo.getPACK_SPEC());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        collectOrderBiz.setMeasureUnit(vYpzsPresInfo.getPHYSIC_UNIT());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCount(entity.getSEL_RETN_CNT());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setThrCode(entity.getFIXMEDINS_HILIST_ID());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCpmctymc(entity.getFIXMEDINS_HILIST_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                    if (CollUtil.isNotEmpty(vYpzsPresInfos)) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                        VYpzsPresInfo vYpzsPresInfo = vYpzsPresInfos.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setGgxh(entity.getPACK_SPEC());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setMeasureUnit(entity.getPHYSIC_UNIT());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCount(IntUtil.value(entity.getLAY_PHYSIC_QUANTITY()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setThrCode(entity.getPHYSIC_CODE());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCpmctymc(entity.getPHYSIC_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setYbbm(entity.getMED_LIST_CODG());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setRemark1(entity.getFINL_TRNS_PRIC() + "");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setYbbm(entity.getCOUNTRY_CODE());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                    collectOrderBiz.setRemark1(entity.get() + "");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setTagStatus(1);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setUnTagCount(0);
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				 | 
				
					@ -1710,31 +1714,31 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    private BaseResponse covertReturnOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VInsurNationGoodsReturn> page) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VInsurNationGoodsReturn> presInfoEntities = page.getRecords();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VInsurNationGoodsReturn> vInsurNationGoodsReturns = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    private BaseResponse covertReturnOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage<VYpzsPresInfoReturn> page) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VYpzsPresInfoReturn> presInfoEntities = page.getRecords();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        List<VYpzsPresInfoReturn> vInsurNationGoodsReturns = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        if (CollUtil.isNotEmpty(presInfoEntities)) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            List<String> collect = presInfoEntities.stream().map(VInsurNationGoodsReturn::getAPPLY_NO).collect(Collectors.toList());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            LambdaQueryWrapper<VInsurNationGoodsReturn> wrapper1 = new LambdaQueryWrapper<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            wrapper1.in(VInsurNationGoodsReturn::getAPPLY_NO, collect);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            vInsurNationGoodsReturns = vInsurNationGoodsReturnMapper.selectList(wrapper1);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            List<String> collect = presInfoEntities.stream().map(VYpzsPresInfoReturn::getAPPLY_NO).collect(Collectors.toList());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            LambdaQueryWrapper<VYpzsPresInfoReturn> wrapper1 = new LambdaQueryWrapper<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            wrapper1.in(VYpzsPresInfoReturn::getAPPLY_NO, collect);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            vInsurNationGoodsReturns = vYpzsPresInfoReturnMapper.selectList(wrapper1);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        // TODO: 2024/9/19 这边在转换的时候就不能用vInsurNationGoodsReturns
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        if (CollUtil.isNotEmpty(vInsurNationGoodsReturns)) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            Map<String, List<VInsurNationGoodsReturn>> groupedByPrescribeNumber = vInsurNationGoodsReturns.stream()
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    .collect(Collectors.groupingBy(VInsurNationGoodsReturn::getAPPLY_NO));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            Map<String, List<VYpzsPresInfoReturn>> groupedByPrescribeNumber = vInsurNationGoodsReturns.stream()
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    .collect(Collectors.groupingBy(VYpzsPresInfoReturn::getAPPLY_NO));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					            groupedByPrescribeNumber.forEach((key, value) -> {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                VInsurNationGoodsReturn presInfoEntity = value.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                VYpzsPresInfoReturn presInfoEntity = value.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                StringBuilder errorMsg = new StringBuilder();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                IoCollectOrder ioCollectOrder = new IoCollectOrder();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBillNo(presInfoEntity.getAPPLY_NO());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromType("HIS系统");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromCorp(presInfoEntity.getSICK_ID());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setWorkPlaceCode(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromCorpName(presInfoEntity.getPSN_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                Date date = DateUtil.parseDate(presInfoEntity.getSEL_RETN_TIME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBillTime(date);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setFromCorpName(presInfoEntity.getSICK_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                Date date = DateUtil.parseDate(presInfoEntity.get());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setBillTime(presInfoEntity.getKEEP_BOOK_TIME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setCreateTime(new Date());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setCreateUser(udiwmsBasicSkPrescribeRequest.getCreateUser());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                ioCollectOrder.setUpdateTime(new Date());
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				 | 
				
					@ -1743,25 +1747,25 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                List<IoCollectOrderBiz> bizList = new ArrayList<>();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                value.forEach(entity -> {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getFIXMEDINS_HILIST_ID()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper<BasicUdirelEntity>().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    if (basicUdirelEntity != null) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        collectOrderBiz.setRelId(basicUdirelEntity.getId());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    } else {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        errorMsg.append(entity.getFIXMEDINS_HILIST_NAME()).append("字典未对照").append(";");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        errorMsg.append(entity.getPHYSIC_NAME()).append("字典未对照").append(";");
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    List<VYpzsPresInfoReturn> vYpzsPresInfoReturns = vYpzsPresInfoReturnMapper.selectList(new LambdaQueryWrapper<VYpzsPresInfoReturn>().eq(VYpzsPresInfoReturn::getAPPLY_NO, entity.getAPPLY_NO()).eq(VYpzsPresInfoReturn::getPHYSIC_CODE, entity.getFIXMEDINS_HILIST_ID()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    List<VYpzsPresInfoReturn> vYpzsPresInfoReturns = vYpzsPresInfoReturnMapper.selectList(new LambdaQueryWrapper<VYpzsPresInfoReturn>().eq(VYpzsPresInfoReturn::getAPPLY_NO, entity.getAPPLY_NO()).eq(VYpzsPresInfoReturn::getPHYSIC_CODE, entity.getPHYSIC_CODE()));
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    if (CollUtil.isNotEmpty(vYpzsPresInfoReturns)) {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        VYpzsPresInfoReturn vYpzsPresInfo = vYpzsPresInfoReturns.get(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        collectOrderBiz.setGgxh(vYpzsPresInfo.getPHYSIC_SPEC());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                        collectOrderBiz.setMeasureUnit(vYpzsPresInfo.getPHYSIC_UNIT());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setThrCode(entity.getFIXMEDINS_HILIST_ID());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCpmctymc(entity.getFIXMEDINS_HILIST_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setThrCode(entity.getPHYSIC_CODE());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCpmctymc(entity.getPHYSIC_NAME());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					//                    collectOrderBiz.setBatchNo(entity.getBATCH_NUMBER());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setYbbm(entity.getMED_LIST_CODG());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCount(entity.getSEL_RETN_CNT());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setYbbm(entity.getFEE_SEQUENCE_NO());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setCount(entity.getQUANTITY());
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setTagStatus(1);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    collectOrderBiz.setUnTagCount(0);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					                    bizList.add(collectOrderBiz);
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				 | 
				
					@ -2004,5 +2008,4 @@ public class YxfyyyClient extends CommonHttpClient {
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        JSONObject dataJson = JSONObject.parseObject(jsonStr);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					        ybClient.ybPost("3506A", dataJson);
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					    }
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				 | 
				
					}
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				 | 
				
					
 
 |