|  |  |  | @ -20,6 +20,7 @@ import com.glxp.api.dao.basic.UdiRelevanceDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.inout.IoCodeTempDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.thrsys.ThrInvOrderDetailMapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.thrsys.ThrInvOrderMapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.auth.InvWarehouseEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.auth.WarehouseUserEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.basic.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.inout.IoCodeTempEntity; | 
			
		
	
	
		
			
				
					|  |  |  | @ -40,6 +41,7 @@ import com.glxp.api.res.basic.UdiRelevanceResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.inv.ThrInvResultResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.thrsys.ThrInvOrderResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.CustomerService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.InvWarehouseService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.WarehouseUserService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.basic.IBasicBussinessTypeService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.basic.UdiRelevanceService; | 
			
		
	
	
		
			
				
					|  |  |  | @ -422,6 +424,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     WarehouseUserService warehouseUserService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     InvWarehouseService warehouseService; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |  |      * 普耗收费出入库明细单据生成 | 
			
		
	
	
		
			
				
					|  |  |  | @ -472,6 +476,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setFromCorp(fromCorp); | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setInvCode(thrInvOrder.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setDeptCode(thrInvOrder.getDeptCode()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setFromInvCode(thrInvOrder.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setFromDeptCode(thrInvOrder.getDeptCode()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setAction(generateOrderRequest.getAction()); | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setFromType(ConstantStatus.FROM_WEBNEW);//网页新增
 | 
			
		
	
		
			
				
					|  |  |  |  |             ioOrderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);//草稿
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -1234,6 +1240,8 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
			
				
					|  |  |  |  |                 ioOrderEntity.setFromCorp(thrInvOrder.getFromCorp()); | 
			
		
	
		
			
				
					|  |  |  |  |                 ioOrderEntity.setInvCode(thrInvOrder.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                 ioOrderEntity.setDeptCode(thrInvOrder.getDeptCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                 ioOrderEntity.setFromInvCode(thrInvOrder.getInvCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                 ioOrderEntity.setFromDeptCode(thrInvOrder.getDeptCode()); | 
			
		
	
		
			
				
					|  |  |  |  |                 ioOrderEntity.setAction(thrInvOrder.getBillType()); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 ioOrderEntity.setFromType(ConstantStatus.FROM_WEBNEW);//网页新增
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -1551,8 +1559,19 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { | 
			
		
	
		
			
				
					|  |  |  |  |         thrInvOrder.setChargeTime(DateUtil.formatDate(DateUtil.parse(thrInvResultResponse.getChargeTime(), "yyyyMMdd"))); | 
			
		
	
		
			
				
					|  |  |  |  |         thrInvOrder.setChargeUser(thrInvResultResponse.getChargeUser()); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiService.getOne(new QueryWrapper<ThrSystemBusApiEntity>().eq("code", thrInvOrder.getBillType()).last("limit 1")); | 
			
		
	
		
			
				
					|  |  |  |  |         if (thrSystemBusApiEntity != null)  thrInvOrder.setFromCorp(thrSystemBusApiEntity.getFromCorp()); | 
			
		
	
		
			
				
					|  |  |  |  | //        ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiService.getOne(new QueryWrapper<ThrSystemBusApiEntity>().eq("code", thrInvOrder.getBillType()).last("limit 1"));
 | 
			
		
	
		
			
				
					|  |  |  |  | //        if (thrSystemBusApiEntity != null)  thrInvOrder.setFromCorp(thrSystemBusApiEntity.getFromCorp());
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             String fromCorp1 = thrInvResultResponse.getInvCode(); | 
			
		
	
		
			
				
					|  |  |  |  |             List<InvWarehouseEntity> list = warehouseService.list(new LambdaQueryWrapper<InvWarehouseEntity>().eq(InvWarehouseEntity::getThirdId, fromCorp1)); | 
			
		
	
		
			
				
					|  |  |  |  |             if (CollUtil.isNotEmpty(list)) { | 
			
		
	
		
			
				
					|  |  |  |  |                 String code = list.get(0).getCode(); | 
			
		
	
		
			
				
					|  |  |  |  |                 String parentId = list.get(0).getParentId(); | 
			
		
	
		
			
				
					|  |  |  |  |                 thrInvOrder.setFromCorp(code); | 
			
		
	
		
			
				
					|  |  |  |  |                 thrInvOrder.setInvCode(code); | 
			
		
	
		
			
				
					|  |  |  |  |                 thrInvOrder.setDeptCode(parentId); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         thrInvOrder.setCreateUser("外部系统下载"); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |