|
@@ -0,0 +1,102 @@
|
|
|
+package com.abi.qms.platform.service.impl;
|
|
|
+
|
|
|
+import com.abi.qms.platform.dto.req.GetBoxCodeReq;
|
|
|
+import com.abi.qms.platform.dto.res.GetBoxCodeRes;
|
|
|
+import com.abi.qms.platform.service.FlowQueryService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.LinkedList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 箱码垛码查询 Service业务层处理
|
|
|
+ *
|
|
|
+ * @author WeiganCai
|
|
|
+ * @date 2021-08-02
|
|
|
+ */
|
|
|
+@Service
|
|
|
+@Slf4j
|
|
|
+public class FlowQueryServiceImpl implements FlowQueryService {
|
|
|
+ /**
|
|
|
+ * 箱码查询
|
|
|
+ * TODO 测试使用,待流向查询接口完成后,根据实际情况调整结构
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public GetBoxCodeRes boxCode(GetBoxCodeReq getBoxCodeReq) {
|
|
|
+ GetBoxCodeRes res = new GetBoxCodeRes();
|
|
|
+
|
|
|
+ GetBoxCodeRes.SkuBean sku = new GetBoxCodeRes.SkuBean()
|
|
|
+ .setBrandName("百威")
|
|
|
+ .setSkuId(30859L)
|
|
|
+ .setSkuName("百威9.7度500ML1X18纸箱听装-温州版")
|
|
|
+ .setProductionBatch("20210512CB0631HN-30")
|
|
|
+ .setProductionTime(LocalDateTime.of(2021, 5, 21, 13, 0, 0));
|
|
|
+
|
|
|
+ GetBoxCodeRes.InspectionCaseBean inspectionCase = new GetBoxCodeRes.InspectionCaseBean()
|
|
|
+ .setCaseNumber("江苏省南京市#1")
|
|
|
+ .setCaseName("模拟接口稽查案件");
|
|
|
+
|
|
|
+ List flowList = new LinkedList();
|
|
|
+ GetBoxCodeRes.FlowBean flow = new GetBoxCodeRes.FlowBean()
|
|
|
+ .setNodeName("CNA9-百威英博大富豪(盐城)啤酒有限公司")
|
|
|
+ .setNodeStatus(1)
|
|
|
+ .setIsSplit(0)
|
|
|
+ .setOutStorageTime(LocalDateTime.of(2020, 12, 20, 9, 31, 33));
|
|
|
+ flowList.add(flow);
|
|
|
+
|
|
|
+ flow = new GetBoxCodeRes.FlowBean()
|
|
|
+ .setNodeName("上海吴泾DC")
|
|
|
+ .setNodeStatus(1)
|
|
|
+ .setIsSplit(1)
|
|
|
+ .setSplitStackCode("275612348457ADB2")
|
|
|
+ .setInStorageTime(LocalDateTime.of(2020, 12, 24, 11, 12, 38))
|
|
|
+ .setOutStorageTime(LocalDateTime.of(2020, 12, 24, 15, 12, 33));
|
|
|
+ flowList.add(flow);
|
|
|
+
|
|
|
+ flow = new GetBoxCodeRes.FlowBean()
|
|
|
+ .setNodeName("一级经销商")
|
|
|
+ .setNodeStatus(1)
|
|
|
+ .setIsSplit(0)
|
|
|
+ .setInStorageTime(LocalDateTime.of(2020, 12, 25, 11, 12, 38))
|
|
|
+ .setOutStorageTime(LocalDateTime.of(2020, 12, 25, 15, 12, 33));
|
|
|
+ flowList.add(flow);
|
|
|
+
|
|
|
+ flow = new GetBoxCodeRes.FlowBean()
|
|
|
+ .setNodeName("二级经销商")
|
|
|
+ .setNodeStatus(0)
|
|
|
+ .setIsSplit(1)
|
|
|
+ .setSplitStackCode("200712348457ADB2")
|
|
|
+ .setInStorageTime(LocalDateTime.of(2020, 12, 26, 11, 12, 38))
|
|
|
+ .setOutStorageTime(LocalDateTime.of(2020, 12, 26, 15, 12, 33));
|
|
|
+ flowList.add(flow);
|
|
|
+
|
|
|
+ flow = new GetBoxCodeRes.FlowBean()
|
|
|
+ .setNodeName("杭州市延海百利超市(新华小区店)")
|
|
|
+ .setNodeStatus(0)
|
|
|
+ .setIsSplit(0)
|
|
|
+ .setInStorageTime(LocalDateTime.of(2020, 12, 27, 11, 12, 38));
|
|
|
+ flowList.add(flow);
|
|
|
+ Collections.reverse(flowList);
|
|
|
+
|
|
|
+ GetBoxCodeRes.BoxStackBean boxStack = new GetBoxCodeRes.BoxStackBean()
|
|
|
+ .setBoxCode("abikcsy6fp47p10")
|
|
|
+ .setInvisibleCode("adb25416313")
|
|
|
+ .setOriginalStackCode("200700048457ADB2")
|
|
|
+ .setOriginalStackTime(LocalDateTime.of(2020, 12, 26, 11, 12, 38))
|
|
|
+ .setNewestStackCode("100733348457ADB2")
|
|
|
+ .setNewestStackTime(LocalDateTime.of(2021, 1, 1, 11, 12, 38));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ res.setSku(sku);
|
|
|
+ res.setInspectionCase(inspectionCase);
|
|
|
+ res.setFlowList(flowList);
|
|
|
+ res.setBoxStack(boxStack);
|
|
|
+
|
|
|
+
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+}
|