| | |
| | | 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 AgvWrkMastLogService agvWrkMastLogService; |
| | | |
| | | @Autowired |
| | | private AgvLocMastService agvLocMastService; |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | |
| | | return; |
| | | } |
| | | |
| | | List<String> docNames = new ArrayList<>(Arrays.asList("银座采购入库单", "银座委外材料出库单", "银座生产材料出库单")); |
| | | List<String> docNames = new ArrayList<>(Arrays.asList("银座采购入库单")); |
| | | //List<String> docNames = new ArrayList<>(Arrays.asList("银座采购入库单", "银座委外材料出库单", "银座生产材料出库单")); |
| | | |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (docNames.contains(docType.getDocName())) { |
| | |
| | | } |
| | | } |
| | | if (Cools.isEmpty(order.getPltType())) { |
| | | return; |
| | | List<AgvWrkDetlLog> agvWrkDetlLogs = agvWrkDetlLogService.selectList(new EntityWrapper<AgvWrkDetlLog>().eq("order_no", order.getOrderNo()).orderBy("appe_time", false)); |
| | | if (!Cools.isEmpty(agvWrkDetlLogs)) { |
| | | AgvWrkDetlLog agvWrkDetlLog = agvWrkDetlLogs.get(0); |
| | | List<AgvWrkMastLog> agvWrkMastLogs = agvWrkMastLogService.selectList(new EntityWrapper<AgvWrkMastLog>().eq("wrk_no", agvWrkDetlLog.getWrkNo()).eq("io_type", 1).orderBy("appe_time", false)); |
| | | if (!Cools.isEmpty(agvWrkMastLogs)) { |
| | | AgvLocMast agvLocMast = agvLocMastService.selectById(agvWrkMastLogs.get(0).getLocNo()); |
| | | if (agvLocMast != null) { |
| | | log.info("补充逻辑生效:{}", order.getOrderNo()); |
| | | order.setPltType(agvLocMast.getPltType()); |
| | | } |
| | | } |
| | | } |
| | | if (Cools.isEmpty(order.getPltType())) { |
| | | return; |
| | | } |
| | | } |
| | | if (Cools.isEmpty(order.getInTime())) { |
| | | order.setInTime(DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss_F)); |