This commit is contained in:
zj
2026-01-06 15:11:28 +08:00
parent 087cdb0326
commit 33211a70de
4 changed files with 26 additions and 25 deletions

View File

@@ -71,6 +71,7 @@ public class ToErpServiceImpl implements IToErpService {
wipTransferDoc.setOwner_Emp_EMPLOYEE_CODE("EF08G"); wipTransferDoc.setOwner_Emp_EMPLOYEE_CODE("EF08G");
String docNo = requestLogService.getRequestLogDoc(TO_ERP_URL,erpBill, basProduct.getProductId() , "获取工艺单号", "wms", "erp"); String docNo = requestLogService.getRequestLogDoc(TO_ERP_URL,erpBill, basProduct.getProductId() , "获取工艺单号", "wms", "erp");
//String docNo="5147-2512290004";
if("".equals(docNo) || docNo == null) { if("".equals(docNo) || docNo == null) {
return AjaxResult.error(); return AjaxResult.error();
} }
@@ -90,11 +91,6 @@ public class ToErpServiceImpl implements IToErpService {
erpStdData.setParameter(objectErpParameter); erpStdData.setParameter(objectErpParameter);
param.setStd_data(erpStdData); param.setStd_data(erpStdData);
RequestLog requestLog = requestLogService.getRequestLogGd(TO_ERP_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp"); RequestLog requestLog = requestLogService.getRequestLogGd(TO_ERP_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp");
// String post = requestLog.getResponseBody();
// ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
// if ("0".equals(bean.getStd_data().getExecution().getCode())) {
// return AjaxResult.success();
// }
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){ if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
return AjaxResult.success(); return AjaxResult.success();
}else{ }else{

View File

@@ -112,8 +112,8 @@ public class ToWmsServiceImpl implements IToWmsService {
String ph = findFirst(PATTERNS.get("PH"), trayCode); String ph = findFirst(PATTERNS.get("PH"), trayCode);
String nw = findFirst(PATTERNS.get("NW"), trayCode); String nw = findFirst(PATTERNS.get("NW"), trayCode);
String gw = findFirst(PATTERNS.get("GW"), trayCode);; String gw = findFirst(PATTERNS.get("GW"), trayCode);;
// String productId = findFirst(PATTERNS.get("ITEM_CODE"), trayCode); String productId = findFirst(PATTERNS.get("ITEM_CODE"), trayCode);
String productId = "KC01001000327"; //String productId = "KC01001000327";
String bm = findFirst(PATTERNS.get("@"), trayCode); String bm = findFirst(PATTERNS.get("@"), trayCode);
bm=bm.substring(0,bm.length()-1); bm=bm.substring(0,bm.length()-1);
String[] decode = ProcodeUtils.decode(bm); String[] decode = ProcodeUtils.decode(bm);

View File

@@ -126,7 +126,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestUrl(url); requestLog.setRequestUrl(url);
try { try {
String resStr = HttpUtils.sendPost(url, param, "application/json"); String resStr = HttpUtils.sendPost(url, param, "application/json");
System.out.println(param); log.info("调用WCS接口,请求参数:"+param);
log.info("调用WCS接口,返回信息:"+resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获 // 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) { if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象"); throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -164,7 +165,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestUrl(url); requestLog.setRequestUrl(url);
try { try {
String resStr = HttpUtils.sendPostGd(url, param, "application/json"); String resStr = HttpUtils.sendPostGd(url, param, "application/json");
System.out.println(param); log.info("调用ERP创建工艺单,请求参数:"+param);
log.info("调用ERP创建工艺单,接口返回:"+resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获 // 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) { if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象"); throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -208,7 +210,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
requestLog.setRequestUrl(url); requestLog.setRequestUrl(url);
try { try {
String resStr = HttpUtils.sendPostOther(url, param, "application/json"); String resStr = HttpUtils.sendPostOther(url, param, "application/json");
System.out.println(param); log.info("调用ERP创建其他入出库单,请求参数:"+param);
log.info("调用ERP创建其他入出库单,接口返回:"+resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获 // 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) { if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象"); throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -276,7 +279,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
try { try {
String resStr = HttpUtils.sendPostDoc(url, param, "application/json"); String resStr = HttpUtils.sendPostDoc(url, param, "application/json");
System.out.println(param); log.info("调用ERP获取工艺单号,请求参数:"+param);
log.info("调用ERP获取工艺单号,接口返回:"+resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获 // 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) { if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象"); throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -340,7 +344,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
try { try {
String resStr = HttpUtils.sendPostCode(url, param, "application/json"); String resStr = HttpUtils.sendPostCode(url, param, "application/json");
System.out.println(param); log.info("调用ERP获取订单条码,请求参数:"+param);
log.info("调用ERP获取订单条码,接口返回:"+resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获 // 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) { if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象"); throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -371,7 +376,7 @@ public class RequestLogServiceImpl implements IRequestLogService {
basProductCode.setNW(JSONUtil.parseObj(docObj.toString()).get("ITEM_NET_WEIGHT").toString()); basProductCode.setNW(JSONUtil.parseObj(docObj.toString()).get("ITEM_NET_WEIGHT").toString());
basProductCode.setGW(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_003").toString()); basProductCode.setGW(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_003").toString());
basProductCode.setType("1"); basProductCode.setType("1");
basProductCode.setSpare1(JSONUtil.parseObj(docObj.toString()).get("billNo").toString()); basProductCode.setSpare1(billNo);
basProductCode.setSpare2(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_004").toString()); basProductCode.setSpare2(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_004").toString());
basProductCode.setSpare3(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_005").toString()); basProductCode.setSpare3(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_005").toString());
basProductCode.setCreateTime(new Date()); basProductCode.setCreateTime(new Date());

View File

@@ -92,7 +92,7 @@
<vue-qr <vue-qr
:key="`qr-${index}-${item.serial}`" :key="`qr-${index}-${item.serial}`"
:text="item.qrCode" :text="item.qrCode"
:size="100" :size="150"
:margin="0" :margin="0"
:correctLevel="2" :correctLevel="2"
:callback="onQrReady" :callback="onQrReady"
@@ -959,11 +959,11 @@ export default {
} }
.preview-box { .preview-box {
padding: 20px; padding: 5px;
font-family: 'Arial', sans-serif; font-family: 'Arial', sans-serif;
position: relative; position: relative;
background-color: #fff; background-color: #fff;
height: 350px; height: 100%;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -971,7 +971,7 @@ export default {
.preview-row { .preview-row {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 15px; margin-bottom: 21px;
min-height: 0; min-height: 0;
padding-left: 5px; padding-left: 5px;
} }
@@ -981,18 +981,17 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
} }
/*min-width: 10px;*/
.preview-label { .preview-label {
margin-right: 15px; margin-left: -10px;
min-width: 10px; font-size: 25px;
font-size: 15px;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
} }
.preview-value { .preview-value {
flex: 1; flex: 1;
font-size: 15px; font-size: 25px;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
word-break: break-all; word-break: break-all;
@@ -1000,7 +999,8 @@ export default {
.qrcode-label { .qrcode-label {
margin-top: 1px; margin-top: 1px;
font-size: 10px; margin-right: 15px;
font-size: 15px;
font-weight: 600; font-weight: 600;
color: #000000; color: #000000;
text-align: center; text-align: center;
@@ -1055,8 +1055,8 @@ export default {
.qrcode-container { .qrcode-container {
border: none; border: none;
position: absolute !important; position: absolute !important;
top: 10px !important; top: 5px !important;
right: 30px !important; right: -10px !important;
padding: 0; padding: 0;
background-color: transparent; background-color: transparent;
} }