|  |  | 
 |  |  | import cn.hutool.core.util.NumberUtil; | 
 |  |  | import com.alibaba.fastjson.JSON; | 
 |  |  | import com.alibaba.fastjson.JSONObject; | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.core.common.Cools; | 
 |  |  | import com.core.common.DateUtils; | 
 |  |  | import com.core.exception.CoolException; | 
 |  |  | import com.zy.asrs.entity.DocType; | 
 |  |  | import com.zy.asrs.entity.Order; | 
 |  |  | import com.zy.asrs.entity.OrderDetl; | 
 |  |  | import com.zy.asrs.entity.*; | 
 |  |  | import com.zy.asrs.entity.param.ReportErpParam; | 
 |  |  | import com.zy.asrs.service.ApiLogService; | 
 |  |  | import com.zy.asrs.service.DocTypeService; | 
 |  |  | import com.zy.asrs.service.OrderDetlService; | 
 |  |  | import com.zy.asrs.service.OrderService; | 
 |  |  | import com.zy.asrs.service.*; | 
 |  |  | import com.zy.asrs.task.AbstractHandler; | 
 |  |  | import com.zy.asrs.task.core.ReturnT; | 
 |  |  | import com.zy.common.utils.HttpHandler; | 
 |  |  | 
 |  |  |     private ApiLogService apiLogService; | 
 |  |  |     @Autowired | 
 |  |  |     private DocTypeService docTypeService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private AgvWrkDetlLogService agvWrkDetlLogService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private AgvWrkMastService agvWrkMastService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private AgvLocMastService agvLocMastService; | 
 |  |  |  | 
 |  |  |     @Value("${spring.profiles.active}") | 
 |  |  |     private String active; | 
 |  |  | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             if (Cools.isEmpty(order.getPltType())) { | 
 |  |  |                 return; | 
 |  |  |                 List<AgvWrkDetlLog> agvWrkDetlLogs = agvWrkDetlLogService.selectList(new EntityWrapper<AgvWrkDetlLog>().eq("order_no", order.getOrderNo()).eq("io_type", 1)); | 
 |  |  |                 if (!Cools.isEmpty(agvWrkDetlLogs)) { | 
 |  |  |                     AgvWrkMast agvWrkMast = agvWrkMastService.selectById(agvWrkDetlLogs.get(0).getWrkNo()); | 
 |  |  |                     if (agvWrkMast != null) { | 
 |  |  |                         AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMast.getLocNo()); | 
 |  |  |                         if (agvLocMast != null) { | 
 |  |  |                             order.setPltType(agvLocMast.getPltType()); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 if (Cools.isEmpty(order.getPltType())) { | 
 |  |  |                     return; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             if (Cools.isEmpty(order.getInTime())) { | 
 |  |  |                 order.setInTime(DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F)); |