This commit is contained in:
USER-20220102CG\noblelift
2023-08-09 17:52:27 +08:00
20 changed files with 314 additions and 29 deletions

View File

@@ -72,6 +72,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
int angle = 0; //角度
int electric_qty = 0; //电量
int status = 0; //三色灯状态
int last_status = 0; //三色灯状态
int error = 0;
int last_error = 0;
String error_message = "";
@@ -442,6 +443,12 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
dto.setError_code(String.valueOf(error_code));
dto.setError_info(error_message);
deviceErrorLogService.create(dto);
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", this.getError_message());
acsToWmsService.sendDeviceStatus(param);
}
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
last_error = error;
@@ -460,6 +467,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else if (phase == 0x74) {
//三色灯状态
status = ikey;
if (status != last_status) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", status);
acsToWmsService.sendDeviceStatus(param);
}
last_status = status;
}
if (!ObjectUtil.isEmpty(data)) {
phase = 0;

View File

@@ -80,6 +80,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
int angle = 0; //角度
int electric_qty = 0; //电量
int status = 0; //三色灯状态
int last_status = 0; //三色灯状态
String error_message = "";
String error_type = "agv_error_type";
private Instruction instruction;
@@ -685,6 +686,12 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
dto.setError_code(String.valueOf(error_code));
dto.setError_info(error_message);
deviceErrorLogService.create(dto);
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", this.getError_message());
acsToWmsService.sendDeviceStatus(param);
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
last_error = error;
@@ -703,6 +710,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} else if (phase == 0x74) {
//三色灯状态
status = ikey;
if (status != last_status) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", status);
acsToWmsService.sendDeviceStatus(param);
}
last_status = status;
}
//进入区域phase值
else if (phase == 0x50) {

View File

@@ -76,6 +76,7 @@ public class DeviceStatusDeviceDriver extends AbstractOpcDeviceDriver implements
String task_id = "";
Boolean iserror = false;
Boolean last_iserror = false;
Boolean hasGoods = false;
@Override
@@ -115,4 +116,15 @@ public class DeviceStatusDeviceDriver extends AbstractOpcDeviceDriver implements
jo.put("hasGoods", this.getHasGoods());
return jo;
}
public void setIserror(Boolean iserror) {
this.iserror = iserror;
if (this.iserror != this.last_iserror && this.iserror && device_id.startsWith("RGV")) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_id);
param.put("error", alarm);
param.put("error_msg", ErrorUtil.getDictDetail("ssx_error_type", alarm));
acsToWmsService.sendDeviceStatus(param);
}
this.last_iserror = iserror;
}
}

View File

@@ -177,6 +177,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_task" + last_to_task + "->" + to_task);
}
if (mode != last_mode) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", mode);
acsToWmsService.sendDeviceStatus(param);
if (mode == 2) {
logServer.deviceExecuteLog(this.device_code, "", "", "信号复位前requireSuccess" + requireSucess);
this.setRequireSucess(false);
@@ -208,8 +213,15 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
DeviceErrorLogDto dto = new DeviceErrorLogDto();
dto.setDevice_code(device_code);
dto.setError_code(String.valueOf(error));
dto.setError_info(ErrorUtil.getDictDetail("hxhj_error_type", String.valueOf(error)));
String errorInfo = ErrorUtil.getDictDetail("hxhj_error_type", String.valueOf(error));
dto.setError_info(errorInfo);
deviceErrorLogService.create(dto);
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", errorInfo);
acsToWmsService.sendDeviceStatus(param);
}
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);

View File

@@ -228,6 +228,14 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
requireSucess = false;
requireEmptyInSuccess = false;
}
if ("true".equals(this.device.getExtraValue().get("sendDeviceStatus"))) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", mode);
acsToWmsService.sendDeviceStatus(param);
}
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode + "复位请求标记:" + requireSucess);
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode);
}
@@ -258,8 +266,17 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
DeviceErrorLogDto dto = new DeviceErrorLogDto();
dto.setDevice_code(device_code);
dto.setError_code(String.valueOf(error));
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
String errorInfo = ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error));
dto.setError_info(errorInfo);
deviceErrorLogService.create(dto);
if ("true".equals(this.device.getExtraValue().get("sendDeviceStatus"))) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", errorInfo);
acsToWmsService.sendDeviceStatus(param);
}
}
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);

View File

@@ -187,6 +187,12 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
requireEmptyOutSuccess = false;
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode + "复位请求标记");
}
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", mode);
acsToWmsService.sendDeviceStatus(param);
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode);
}
@@ -216,8 +222,15 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
DeviceErrorLogDto dto = new DeviceErrorLogDto();
dto.setDevice_code(device_code);
dto.setError_code(String.valueOf(error));
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
String errorInfo = ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error));
dto.setError_info(errorInfo);
deviceErrorLogService.create(dto);
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", errorInfo);
acsToWmsService.sendDeviceStatus(param);
}
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);

View File

@@ -170,6 +170,12 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
requireEmptyOutSuccess = false;
logServer.deviceExecuteLog(this.device_code, "", "", "复位请求标记成功!");
}
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", mode);
acsToWmsService.sendDeviceStatus(param);
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode);
}
@@ -194,8 +200,15 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
DeviceErrorLogDto dto = new DeviceErrorLogDto();
dto.setDevice_code(device_code);
dto.setError_code(String.valueOf(error));
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
String errorInfo = ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error));
dto.setError_info(errorInfo);
deviceErrorLogService.create(dto);
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", errorInfo);
acsToWmsService.sendDeviceStatus(param);
}
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(

View File

@@ -161,6 +161,12 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri
to_command = this.itemProtocol.getTo_command();
to_target = this.itemProtocol.getTo_target();
to_task = this.itemProtocol.getTo_task();
if (last_mode != mode) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", mode);
acsToWmsService.sendDeviceStatus(param);
}
if (to_command != last_to_command) {
logServer.deviceExecuteLog(this.device_code, "", "", "信号to_command" + last_to_command + "->" + to_command);
}
@@ -175,8 +181,15 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri
DeviceErrorLogDto dto = new DeviceErrorLogDto();
dto.setDevice_code(device_code);
dto.setError_code(String.valueOf(error));
dto.setError_info(ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
String errorInfo = ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error));
dto.setError_info(errorInfo);
deviceErrorLogService.create(dto);
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", errorInfo);
acsToWmsService.sendDeviceStatus(param);
}
}
} catch (Exception var17) {

View File

@@ -230,6 +230,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
// logServer.deviceExecuteLog(this.device_code, "", "", "heartbeat" + last_heartbeat + "->" + heartbeat);
// }
if (mode != last_mode) {
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("mode", mode);
acsToWmsService.sendDeviceStatus(param);
inst_type = null;
cache_inst = null;
if (mode == 2) {
@@ -252,8 +257,15 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
DeviceErrorLogDto dto = new DeviceErrorLogDto();
dto.setDevice_code(device_code);
dto.setError_code(String.valueOf(error));
dto.setError_info(ErrorUtil.getDictDetail("fqhj_error_type", String.valueOf(error)));
String errorInfo = ErrorUtil.getDictDetail("fqhj_error_type", String.valueOf(error));
dto.setError_info(errorInfo);
deviceErrorLogService.create(dto);
JSONObject param = new JSONObject();
param.put("device_code", this.device_code);
param.put("error", error);
param.put("error_msg", errorInfo);
acsToWmsService.sendDeviceStatus(param);
}
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);

View File

@@ -104,4 +104,6 @@ public interface AcsToWmsService {
// 输送线有货变成无货时向lms请求
HttpResponse shipDeviceUpdate(JSONObject param);
void sendDeviceStatus(JSONObject param);
}

View File

@@ -538,4 +538,28 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
}
return null;
}
@Override
public void sendDeviceStatus(JSONObject param) {
try {
MDC.put(log_file_type, log_type);
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
AddressDto addressDto = addressService.findByCode("sendDeviceStatus");
String methods_url = addressDto.getMethods_url();
String url = wmsUrl + methods_url;
// log.info("sendDeviceStatus - 请求参数 {}", param);
HttpRequest
.post(url)
.body(param.toString())
.execute();
// log.info("sendDeviceStatus - 返回参数 {}", response.body());
}
} catch (Throwable ignored) {
} finally {
MDC.remove(log_file_type);
}
}
}

View File

@@ -2,7 +2,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: prod
active: dev
jackson:
time-zone: GMT+8
data:

View File

@@ -147,6 +147,11 @@
<el-switch v-model="form.special_flag" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="反馈设备状态" label-width="150px">
<el-switch v-model="form.sendDeviceStatus" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
@@ -320,7 +325,8 @@ export default {
is_release: true,
link_device_code: [],
ship_device_update: true,
special_flag: true
special_flag: true,
sendDeviceStatus: true
},
rules: {}
}

View File

@@ -21,9 +21,12 @@ import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
import org.nl.wms.st.inbill.service.OutChargeService;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author Liuxy
@@ -73,10 +76,12 @@ public class OutChargeServiceImpl implements OutChargeService {
}
@Override
@Transactional
public void charge(Map whereJson) {
WQLObject dtl_wql = WQLObject.getWQLObject("st_ivt_iostorinvdtl");
WQLObject mst_wql = WQLObject.getWQLObject("ST_IVT_IOStorInv");
WQLObject dis_wql = WQLObject.getWQLObject("ST_IVT_IOStorInvDis");
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structivt");
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
@@ -128,10 +133,19 @@ public class OutChargeServiceImpl implements OutChargeService {
whereJson.put("upload_sap", "");
mst_wql.insert(whereJson);
ArrayList<String> ivtList = new ArrayList<>(); // 存在库存的集合
for (int i = 0; i < dis_rows.size(); i++) {
//插入明细表
String iostorinvdtl_id = IdUtil.getSnowflake(1, 1).nextId() + "";
JSONObject dis_row = dis_rows.getJSONObject(i);
// 校验是否存在库存
JSONObject jsonIvt = ivtTab.query("pcsn = '" + dis_row.getString("pcsn") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonIvt)) {
ivtList.add(jsonIvt.getString("pcsn"));
}
//查询对应的出库单明细
JSONObject dtl_row = dtl_wql.query("iostorinvdtl_id = '" + dis_row.getString("iostorinvdtl_id") + "'").uniqueResult(0);
dis_row.put("iostorinvdtl_id", iostorinvdtl_id);
@@ -174,6 +188,13 @@ public class OutChargeServiceImpl implements OutChargeService {
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis_row.getString("box_no") + "'");
}
}
// 判断是否存在库存
if (ivtList.size() > 0) {
String msg = String.join(",", ivtList);
throw new BadRequestException("此子卷已存在库存:"+msg);
}
}
}

View File

@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
/**
* PC端出入库新增
@@ -64,7 +65,27 @@ public class CheckServiceImpl implements CheckService {
JSONObject jo = WQL.getWO("QST_IVT_CHECK").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "check_code desc");
JSONArray content = jo.getJSONArray("content");
// 拼接主表id
String check_id = content.stream()
.map(row -> (JSONObject) row)
.map(row -> row.getString("check_id"))
.collect(Collectors.joining(","));
JSONArray resultJSONArray = WQL.getWO("QST_IVT_CHECK").addParam("flag", "13").addParam("check_id_in", "(" + check_id + ")").process().getResultJSONArray(0);
for (int i = 0; i < content.size(); i++) {
JSONObject json = content.getJSONObject(i);
// 匹配相同check_id的数据条数
int pcsn_num = (int) resultJSONArray.stream()
.map(row -> (JSONObject) row)
.filter(row -> row.getString("check_id").equals(json.getString("check_id")))
.count();
json.put("pcsn_num",pcsn_num);
}
/* for (int i = 0; i < content.size(); i++) {
int pcsn_num = 0;
JSONObject jsonObject = content.getJSONObject(i);
@@ -77,7 +98,7 @@ public class CheckServiceImpl implements CheckService {
pcsn_num += boxNum.size();
}
jsonObject.put("pcsn_num",pcsn_num);
}
}*/
return jo;
}

View File

@@ -42,6 +42,7 @@
输入.box_no TYPEAS s_string
输入.deptIds TYPEAS f_string
输入.in_stor_id TYPEAS f_string
输入.check_id_in TYPEAS f_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
@@ -567,3 +568,22 @@
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "13"
QUERY
SELECT
sub.*,
dtl.check_id
FROM
pdm_bi_subpackagerelation sub
LEFT JOIN st_ivt_checkdtl dtl ON sub.package_box_sn = dtl.storagevehicle_code
WHERE
1 = 1
OPTION 输入.check_id_in <> ""
dtl.check_id in 输入.check_id_in
ENDOPTION
ENDSELECT
ENDQUERY
ENDIF

View File

@@ -5005,7 +5005,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
order_no = jsonSub.getString("sale_order_name");
// 规格: 厚度*幅宽
String material_spec = jsonSub.getString("thickness_request") + "*" + jsonSub.getString("width");
String material_spec = jsonSub.getString("thickness_request") + "*" + jsonSub.getString("width_standard");
// 箱号
String box_no = json.getString("box_no");
String sub_box_no = "";
@@ -5064,7 +5064,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
order_no = jsonSub.getString("sale_order_name");
// 规格: 厚度*幅宽
String material_spec = jsonSub.getString("thickness_request") + "*" + jsonSub.getString("width");
String material_spec = jsonSub.getString("thickness_request") + "*" + jsonSub.getString("width_standard");
// 箱号
String box_no = json.getString("box_no");
String sub_box_no = "";

View File

@@ -532,22 +532,24 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 调拨入库
if (StrUtil.equals(bill_type, "0004")) {
// 回传sap
JSONObject param = new JSONObject();
JSONArray paramSapMstArr = new JSONArray();
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
JSONObject jsonDtl = wo_dtl.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").uniqueResult(0);
param.put("ZDBSQD",jsonDtl.getString("vbeln"));
param.put("LGORT2", jo_mst.getString("stor_code"));
JSONObject jsonStorOut = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("stor_id = '" + jo_mst.getString("out_stor_id") + "'").uniqueResult(0);
param.put("LGORT1", jsonStorOut.getString("stor_code"));
for (int j = 0; j < disArr.size(); j++) {
JSONObject jsonDis = disArr.getJSONObject(j);
JSONObject paramDis = new JSONObject();
paramDis.put("ZDBSQD", jsonDtl.getString("vbeln"));
paramDis.put("ZVBELN", jsonDtl.getString("source_bill_code"));
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
paramDis.put("MATNR", jsonMater.getString("material_code"));
paramDis.put("LGORT2", jo_mst.getString("stor_code"));
JSONObject jsonStorOut = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("stor_id = '" + jo_mst.getString("out_stor_id") + "'").uniqueResult(0);
paramDis.put("LGORT1", jsonStorOut.getString("stor_code"));
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "'").uniqueResult(0);
paramDis.put("ZHL02", jsonSub.getString("width"));
@@ -557,8 +559,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramDis.put("WERKS", "2460");
paramSapMstArr.add(paramDis);
}
JSONObject param = new JSONObject();
param.put("HEAD", paramSapMstArr);
param.put("ITEM", paramSapMstArr);
System.out.println(param.toString());
// 调用接口回传
@@ -879,22 +880,24 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
// 调拨入库
if (StrUtil.equals(bill_type, "0004")) {
// 回传sap
JSONObject param = new JSONObject();
JSONArray paramSapMstArr = new JSONArray();
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
JSONObject jsonDtl = wo_dtl.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").uniqueResult(0);
param.put("ZDBSQD",jsonDtl.getString("vbeln"));
param.put("LGORT2", jo_mst.getString("stor_code"));
JSONObject jsonStorOut = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("stor_id = '" + jo_mst.getString("out_stor_id") + "'").uniqueResult(0);
param.put("LGORT1", jsonStorOut.getString("stor_code"));
for (int j = 0; j < disArr.size(); j++) {
JSONObject jsonDis = disArr.getJSONObject(j);
JSONObject paramDis = new JSONObject();
paramDis.put("ZDBSQD", jsonDtl.getString("vbeln"));
paramDis.put("ZVBELN", jsonDtl.getString("source_bill_code"));
JSONObject jsonMater = materTab.query("material_id = '" + jsonDis.getString("material_id") + "'").uniqueResult(0);
paramDis.put("MATNR", jsonMater.getString("material_code"));
paramDis.put("LGORT2", jo_mst.getString("stor_code"));
JSONObject jsonStorOut = WQLObject.getWQLObject("st_ivt_bsrealstorattr").query("stor_id = '" + jo_mst.getString("out_stor_id") + "'").uniqueResult(0);
paramDis.put("LGORT1", jsonStorOut.getString("stor_code"));
JSONObject jsonSub = subTab.query("container_name = '" + jsonDis.getString("pcsn") + "'").uniqueResult(0);
paramDis.put("ZHL02", jsonSub.getString("width"));
@@ -904,8 +907,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
paramDis.put("WERKS", "2460");
paramSapMstArr.add(paramDis);
}
JSONObject param = new JSONObject();
param.put("HEAD", paramSapMstArr);
param.put("ITEM", paramSapMstArr);
System.out.println(param.toString());
// 调用接口回传

View File

@@ -96,7 +96,23 @@
END AS confirm_time_class
FROM
st_ivt_iostorinvdis dis
(
SELECT
pcsn,
MAX(iostorinv_id) AS iostorinv_id,
MAX(sect_id) AS sect_id,
MAX(material_id) AS material_id,
MAX(box_no) AS box_no,
MAX(sect_name) AS sect_name,
MAX(struct_code) AS struct_code,
MAX(struct_name) AS struct_name,
MAX(qty_unit_name) AS qty_unit_name
FROM
st_ivt_iostorinvdis
WHERE
1 = 1
GROUP BY pcsn
) AS dis
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
@@ -194,7 +210,23 @@
END AS confirm_time_class
FROM
st_ivt_iostorinvdis dis
(
SELECT
pcsn,
MAX(iostorinv_id) AS iostorinv_id,
MAX(sect_id) AS sect_id,
MAX(material_id) AS material_id,
MAX(box_no) AS box_no,
MAX(sect_name) AS sect_name,
MAX(struct_code) AS struct_code,
MAX(struct_name) AS struct_name,
MAX(qty_unit_name) AS qty_unit_name
FROM
st_ivt_iostorinvdis
WHERE
1 = 1
GROUP BY pcsn
) AS dis
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
@@ -304,7 +336,23 @@
END AS confirm_time_class
FROM
st_ivt_iostorinvdis dis
(
SELECT
pcsn,
MAX(iostorinv_id) AS iostorinv_id,
MAX(sect_id) AS sect_id,
MAX(material_id) AS material_id,
MAX(box_no) AS box_no,
MAX(sect_name) AS sect_name,
MAX(struct_code) AS struct_code,
MAX(struct_name) AS struct_name,
MAX(qty_unit_name) AS qty_unit_name
FROM
st_ivt_iostorinvdis
WHERE
1 = 1
GROUP BY pcsn
) AS dis
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
@@ -404,7 +452,23 @@
END AS confirm_time_class
FROM
st_ivt_iostorinvdis dis
(
SELECT
pcsn,
MAX(iostorinv_id) AS iostorinv_id,
MAX(sect_id) AS sect_id,
MAX(material_id) AS material_id,
MAX(box_no) AS box_no,
MAX(sect_name) AS sect_name,
MAX(struct_code) AS struct_code,
MAX(struct_name) AS struct_name,
MAX(qty_unit_name) AS qty_unit_name
FROM
st_ivt_iostorinvdis
WHERE
1 = 1
GROUP BY pcsn
) AS dis
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id

View File

@@ -398,6 +398,7 @@
:min-width="flexWidth('product_description',crud.data,'产品描述')"/>
<el-table-column sortable prop="sap_pcsn" label="sap批次" :min-width="flexWidth('sap_pcsn',crud.data,'SAP批次')"/>
<el-table-column prop="width" label="产品规格(幅宽)" :min-width="flexWidth('width',crud.data,'产品规格(幅宽)')"/>
<el-table-column prop="width_standard" label="客户要求幅宽" :min-width="flexWidth('width_standard',crud.data,'客户要求幅宽')"/>
<el-table-column prop="thickness" label="产品厚度" :min-width="flexWidth('thickness',crud.data,'产品厚度')"/>
<el-table-column prop="mass_per_unit_area" label="单位面积质量" :formatter="crud.formatNum3"
:min-width="flexWidth('mass_per_unit_area',crud.data,'单位面积质量')"/>