|  |  | @ -7,7 +7,11 @@ import com.glxp.api.common.res.BaseResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.common.util.ResultVOUtils; |  |  |  | import com.glxp.api.common.util.ResultVOUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.constant.Constant; |  |  |  | import com.glxp.api.constant.Constant; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.dao.inv.DeviceInspectOrderDao; |  |  |  | import com.glxp.api.dao.inv.DeviceInspectOrderDao; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.dao.inv.DeviceInspectPlanDao; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.dao.inv.DeviceRepairOrderDao; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.inv.DeviceInspectOrderEntity; |  |  |  | import com.glxp.api.entity.inv.DeviceInspectOrderEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.inv.DeviceInspectPlanEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.inv.DeviceRepairOrderEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.inv.AddDeviceInspectOrderRequest; |  |  |  | import com.glxp.api.req.inv.AddDeviceInspectOrderRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.req.inv.FilterDeviceInspectOrderRequest; |  |  |  | import com.glxp.api.req.inv.FilterDeviceInspectOrderRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.inv.DeviceInspectOrderResponse; |  |  |  | import com.glxp.api.res.inv.DeviceInspectOrderResponse; | 
			
		
	
	
		
		
			
				
					|  |  | @ -35,6 +39,10 @@ public class DeviceInspectOrderServiceImpl implements DeviceInspectOrderService | 
			
		
	
		
		
			
				
					
					|  |  |  |     private CustomerService customerService; |  |  |  |     private CustomerService customerService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     private GennerOrderUtils gennerOrderUtils; |  |  |  |     private GennerOrderUtils gennerOrderUtils; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     private DeviceRepairOrderDao deviceRepairOrderDao; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     private DeviceInspectPlanDao deviceInspectPlanDao; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public List<DeviceInspectOrderResponse> filterList(FilterDeviceInspectOrderRequest deviceInspectOrderRequest) { |  |  |  |     public List<DeviceInspectOrderResponse> filterList(FilterDeviceInspectOrderRequest deviceInspectOrderRequest) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -109,4 +117,42 @@ public class DeviceInspectOrderServiceImpl implements DeviceInspectOrderService | 
			
		
	
		
		
			
				
					
					|  |  |  |         deviceInspectOrderDao.deleteById(id); |  |  |  |         deviceInspectOrderDao.deleteById(id); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.success(); |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public BaseResponse addByRepairOrderId(String repairOrderId) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //查询报修单信息
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         DeviceRepairOrderEntity deviceRepairOrderEntity = deviceRepairOrderDao.selectByOrderId(repairOrderId); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         DeviceInspectOrderEntity orderEntity = new DeviceInspectOrderEntity(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setCode(deviceRepairOrderEntity.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setDeptCode(deviceRepairOrderEntity.getDeptCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setInvCode(deviceRepairOrderEntity.getInvCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setStatus(0); //状态:新增
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setType(1); //维保类型:报修
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setDeviceStatus(1); //设备状态:正常
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setLastOrderId(repairOrderId); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setCreateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setUpdateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setCreateUser(customerService.getUserIdStr()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         deviceInspectOrderDao.insert(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public BaseResponse addByPlanOrderId(String planOrderId) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //查询报修单信息
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         DeviceInspectPlanEntity deviceInspectPlanEntity = deviceInspectPlanDao.selectByOrderId(planOrderId); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         DeviceInspectOrderEntity orderEntity = new DeviceInspectOrderEntity(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setCode(deviceInspectPlanEntity.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setDeptCode(deviceInspectPlanEntity.getDeptCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setInvCode(deviceInspectPlanEntity.getInvCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setStatus(0); //状态:新增
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setType(1); //维保类型:计划
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setDeviceStatus(1); //设备状态:正常
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setLastOrderId(planOrderId); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setCreateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setUpdateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         orderEntity.setCreateUser(customerService.getUserIdStr()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         deviceInspectOrderDao.insert(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |