Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -209,6 +209,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
||||||
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
|
||||||
PluggingUnpluggingMachineDeviceDriver pluggingUnpluggingMachineDeviceDriver;
|
PluggingUnpluggingMachineDeviceDriver pluggingUnpluggingMachineDeviceDriver;
|
||||||
|
SiemensWeightConveyorDeviceDriver siemensWeightConveyorDeviceDriver;
|
||||||
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
||||||
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
|
||||||
hongXiangStationDeviceDriver.writing(code, value);
|
hongXiangStationDeviceDriver.writing(code, value);
|
||||||
@@ -225,7 +226,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
pluggingUnpluggingMachineDeviceDriver = (PluggingUnpluggingMachineDeviceDriver) device.getDeviceDriver();
|
pluggingUnpluggingMachineDeviceDriver = (PluggingUnpluggingMachineDeviceDriver) device.getDeviceDriver();
|
||||||
pluggingUnpluggingMachineDeviceDriver.writing(code, value);
|
pluggingUnpluggingMachineDeviceDriver.writing(code, value);
|
||||||
}
|
}
|
||||||
|
if (device.getDeviceDriver() instanceof SiemensWeightConveyorDeviceDriver) {
|
||||||
|
siemensWeightConveyorDeviceDriver = (SiemensWeightConveyorDeviceDriver) device.getDeviceDriver();
|
||||||
|
siemensWeightConveyorDeviceDriver.writing(code, value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
response.setStatus(200);
|
response.setStatus(200);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.nl.wms.stat.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -23,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Liuxy
|
* @author Liuxy
|
||||||
@@ -114,7 +116,28 @@ public class OutBillQueryServiceImpl implements OutBillQueryService {
|
|||||||
|
|
||||||
JSONObject json = WQL.getWO("ST_IVT_OUTBILLQUERY").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time DESC,dis.box_no");
|
JSONObject json = WQL.getWO("ST_IVT_OUTBILLQUERY").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time DESC,dis.box_no");
|
||||||
// 查询此子卷转单之前的销售订单号
|
// 查询此子卷转单之前的销售订单号
|
||||||
|
List<JSONObject> content = json.getJSONArray("content").toJavaList(JSONObject.class);
|
||||||
|
|
||||||
|
String pcsn_in = content.stream()
|
||||||
|
.map(row -> row.getString("pcsn"))
|
||||||
|
.collect(Collectors.joining("','"));
|
||||||
|
|
||||||
|
List<JSONObject> subList = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord")
|
||||||
|
.query("container_name IN ('" + pcsn_in + "') AND io_type = '0' ORDER BY insert_time")
|
||||||
|
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
|
|
||||||
|
// 查询所有子卷最早的入库时间
|
||||||
|
for (JSONObject item : content) {
|
||||||
|
|
||||||
|
JSONObject jsonSub = subList.stream()
|
||||||
|
.filter(row -> row.getString("container_name").equals(item.getString("pcsn")))
|
||||||
|
.min(Comparator.comparing(row -> row.getString("insert_time")))
|
||||||
|
.orElse(null);
|
||||||
|
|
||||||
|
item.put("old_sale_order_name", ObjectUtil.isEmpty(jsonSub) ? item.getString("sale_order_name") : jsonSub.getString("sale_order_name"));
|
||||||
|
}
|
||||||
|
|
||||||
|
json.put("content", content);
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,6 +304,11 @@ public class OutBillQueryServiceImpl implements OutBillQueryService {
|
|||||||
JSONObject json = resultJSONArray.getJSONObject(i);
|
JSONObject json = resultJSONArray.getJSONObject(i);
|
||||||
Map<String, Object> mp = new LinkedHashMap<>();
|
Map<String, Object> mp = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
// 查询第一次入库的源销售订单
|
||||||
|
JSONObject jsonSub = WQLObject.getWQLObject("pdm_bi_subpackagerelationrecord")
|
||||||
|
.query("container_name = '" + json.getString("pcsn") + "' AND io_type = '0' ORDER BY insert_time")
|
||||||
|
.uniqueResult(0);
|
||||||
|
|
||||||
mp.put("仓库", json.getString("stor_name"));
|
mp.put("仓库", json.getString("stor_name"));
|
||||||
if (ObjectUtil.isNotEmpty(bill_type) && "1004".equals(bill_type)) {
|
if (ObjectUtil.isNotEmpty(bill_type) && "1004".equals(bill_type)) {
|
||||||
mp.put("移入仓库", json.getString("in_stor_name"));
|
mp.put("移入仓库", json.getString("in_stor_name"));
|
||||||
@@ -312,6 +340,15 @@ public class OutBillQueryServiceImpl implements OutBillQueryService {
|
|||||||
mp.put("销售订单", json.getString("sale_order_name"));
|
mp.put("销售订单", json.getString("sale_order_name"));
|
||||||
mp.put("行号", "");
|
mp.put("行号", "");
|
||||||
}
|
}
|
||||||
|
// 原销售订单
|
||||||
|
try {
|
||||||
|
mp.put("原销售订单", jsonSub.getString("sale_order_name").substring(0, jsonSub.getString("sale_order_name").indexOf("-")));
|
||||||
|
mp.put("原行号", jsonSub.getString("sale_order_name").substring(jsonSub.getString("sale_order_name").indexOf("-") + 1, jsonSub.getString("sale_order_name").length()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
mp.put("原销售订单", jsonSub.getString("sale_order_name"));
|
||||||
|
mp.put("原行号", "");
|
||||||
|
}
|
||||||
|
|
||||||
mp.put("业务员", json.getString("sales_owner"));
|
mp.put("业务员", json.getString("sales_owner"));
|
||||||
mp.put("出库日期", json.getString("input_time"));
|
mp.put("出库日期", json.getString("input_time"));
|
||||||
mp.put("产品规格", String.format("%.0f", json.getDoubleValue("width")));
|
mp.put("产品规格", String.format("%.0f", json.getDoubleValue("width")));
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" :min-width="flexWidth('bill_type',crud.data,'业务类型')" />
|
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" :min-width="flexWidth('bill_type',crud.data,'业务类型')" />
|
||||||
<el-table-column show-overflow-tooltip prop="vbeln" label="交货单号" :min-width="flexWidth('vbeln',crud.data,'交货单号')" />
|
<el-table-column show-overflow-tooltip prop="vbeln" label="交货单号" :min-width="flexWidth('vbeln',crud.data,'交货单号')" />
|
||||||
<el-table-column show-overflow-tooltip prop="cust_name" label="物流公司" :min-width="flexWidth('cust_name',crud.data,'物流公司')" />
|
<el-table-column show-overflow-tooltip prop="cust_name" label="物流公司" :min-width="flexWidth('cust_name',crud.data,'物流公司')" />
|
||||||
<el-table-column show-overflow-tooltip prop="estimated_freight" label="运费" :formatter="crud.formatNum2" :min-width="flexWidth('estimated_freight',crud.data,'运费')" />
|
<el-table-column show-overflow-tooltip prop="estimatedd_freight" label="运费" :formatter="crud.formatNum2" :min-width="flexWidth('estimated_freight',crud.data,'运费')" />
|
||||||
<el-table-column show-overflow-tooltip prop="box_no" label="木箱号" :min-width="flexWidth('box_no',crud.data,'木箱号')" />
|
<el-table-column show-overflow-tooltip prop="box_no" label="木箱号" :min-width="flexWidth('box_no',crud.data,'木箱号')" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||||
@@ -127,6 +127,7 @@
|
|||||||
<el-table-column show-overflow-tooltip prop="customer_description" label="发货客户名称" :min-width="flexWidth('customer_description',crud.data,'客户名称')" />
|
<el-table-column show-overflow-tooltip prop="customer_description" label="发货客户名称" :min-width="flexWidth('customer_description',crud.data,'客户名称')" />
|
||||||
<el-table-column show-overflow-tooltip prop="sales_owner" label="业务员" :min-width="flexWidth('sales_owner',crud.data,'业务员')" />
|
<el-table-column show-overflow-tooltip prop="sales_owner" label="业务员" :min-width="flexWidth('sales_owner',crud.data,'业务员')" />
|
||||||
<el-table-column show-overflow-tooltip prop="sale_order_name" label="销售订单" :min-width="flexWidth('sale_order_name',crud.data,'销售订单')" />
|
<el-table-column show-overflow-tooltip prop="sale_order_name" label="销售订单" :min-width="flexWidth('sale_order_name',crud.data,'销售订单')" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="old_sale_order_name" label="原销售订单" :min-width="flexWidth('old_sale_order_name',crud.data,'原销售订单')" />
|
||||||
<el-table-column show-overflow-tooltip prop="confirm_time" label="出库日期" :min-width="flexWidth('confirm_time',crud.data,'出库日期')" />
|
<el-table-column show-overflow-tooltip prop="confirm_time" label="出库日期" :min-width="flexWidth('confirm_time',crud.data,'出库日期')" />
|
||||||
<el-table-column show-overflow-tooltip prop="width" label="产品规格" :formatter="crud.formatNum0" :min-width="flexWidth('width',crud.data,'产品规格')" />
|
<el-table-column show-overflow-tooltip prop="width" label="产品规格" :formatter="crud.formatNum0" :min-width="flexWidth('width',crud.data,'产品规格')" />
|
||||||
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" :min-width="flexWidth('thickness',crud.data,'产品厚度')" />
|
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" :min-width="flexWidth('thickness',crud.data,'产品厚度')" />
|
||||||
|
|||||||
Reference in New Issue
Block a user