|  |  | @ -59,9 +59,11 @@ import com.glxp.api.service.inout.impl.IoCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.*; |  |  |  | import com.glxp.api.util.*; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.udi.FilterUdiUtils; |  |  |  | import com.glxp.api.util.udi.FilterUdiUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.udi.UdiCalCountUtil; |  |  |  | import com.glxp.api.util.udi.UdiCalCountUtil; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import net.sf.jasperreports.engine.util.JRStyledText; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.beans.BeanUtils; |  |  |  | import org.springframework.beans.BeanUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.context.annotation.Lazy; |  |  |  | import org.springframework.context.annotation.Lazy; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.stereotype.Service; |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import org.springframework.transaction.annotation.Propagation; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.transaction.annotation.Transactional; |  |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.annotation.Resource; |  |  |  | import javax.annotation.Resource; | 
			
		
	
	
		
		
			
				
					|  |  | @ -526,9 +528,6 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  |         Assert.notNull(collectOrderRequest.getId(), "id不能为空"); |  |  |  |         Assert.notNull(collectOrderRequest.getId(), "id不能为空"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         IoCollectOrder old = this.getById(collectOrderRequest.getId()); |  |  |  |         IoCollectOrder old = this.getById(collectOrderRequest.getId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         Assert.notNull(old, "不存在该库存预警设置"); |  |  |  |         Assert.notNull(old, "不存在该库存预警设置"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         //TODO 新建单据未赋值排序时间
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         //1.获取tagStatus = 1的单据最早orderTime时间,往前移1分钟,
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         //2.在赋值给当前
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         this.lambdaUpdate() |  |  |  |         this.lambdaUpdate() | 
			
		
	
		
		
			
				
					
					|  |  |  |                 .set(IoCollectOrder::getUpdateTime, new Date()) |  |  |  |                 .set(IoCollectOrder::getUpdateTime, new Date()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 .set(collectOrderRequest.getUpdateUser() != null, IoCollectOrder::getUpdateUser, collectOrderRequest.getUpdateUser()) |  |  |  |                 .set(collectOrderRequest.getUpdateUser() != null, IoCollectOrder::getUpdateUser, collectOrderRequest.getUpdateUser()) | 
			
		
	
	
		
		
			
				
					|  |  | @ -619,7 +618,12 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  |             collectOrderList.add(collectOrder); |  |  |  |             collectOrderList.add(collectOrder); | 
			
		
	
		
		
			
				
					
					|  |  |  |             orderRequest.setCollectOrderList(collectOrderList); |  |  |  |             orderRequest.setCollectOrderList(collectOrderList); | 
			
		
	
		
		
			
				
					
					|  |  |  |             BaseResponse<BasicSkPrescribeResponse> baseResponse = erpBasicClient.postOrder(orderRequest); |  |  |  |             BaseResponse<BasicSkPrescribeResponse> baseResponse = erpBasicClient.postOrder(orderRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |             log.trace("单据返回=========" + baseResponse); |  |  |  |             log.debug("单据返回=========" + baseResponse); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if(baseResponse.getCode() == 20000){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 //
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             }else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 throw new JsonException("连接第三方系统接口服务出错"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -646,5 +650,24 @@ public class IoCollectOrderService extends ServiceImpl<IoCollectOrderMapper, IoC | 
			
		
	
		
		
			
				
					
					|  |  |  |         return tempEntity; |  |  |  |         return tempEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     /** | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |      * 上传更新状态 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |      * @param billNo | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |      */ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public void orderUpload(String billNo){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         IoCollectOrder updateOrder = new IoCollectOrder(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         updateOrder.setBillNo(billNo); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             this.generateOrder(billNo); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             updateOrder.setUploadStatus(2); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }catch (Exception e){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             updateOrder.setUploadStatus(3); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             updateOrder.setUploadError(e.getMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //更新状态
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         this.updateByBillNo(updateOrder); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |