优化
This commit is contained in:
@@ -71,6 +71,7 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
wipTransferDoc.setOwner_Emp_EMPLOYEE_CODE("EF08G");
|
||||
|
||||
String docNo = requestLogService.getRequestLogDoc(TO_ERP_URL,erpBill, basProduct.getProductId() , "获取工艺单号", "wms", "erp");
|
||||
//String docNo="5147-2512290004";
|
||||
if("".equals(docNo) || docNo == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
@@ -90,11 +91,6 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
erpStdData.setParameter(objectErpParameter);
|
||||
param.setStd_data(erpStdData);
|
||||
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())){
|
||||
return AjaxResult.success();
|
||||
}else{
|
||||
|
||||
@@ -112,8 +112,8 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
String ph = findFirst(PATTERNS.get("PH"), trayCode);
|
||||
String nw = findFirst(PATTERNS.get("NW"), trayCode);
|
||||
String gw = findFirst(PATTERNS.get("GW"), trayCode);;
|
||||
// String productId = findFirst(PATTERNS.get("ITEM_CODE"), trayCode);
|
||||
String productId = "KC01001000327";
|
||||
String productId = findFirst(PATTERNS.get("ITEM_CODE"), trayCode);
|
||||
//String productId = "KC01001000327";
|
||||
String bm = findFirst(PATTERNS.get("@"), trayCode);
|
||||
bm=bm.substring(0,bm.length()-1);
|
||||
String[] decode = ProcodeUtils.decode(bm);
|
||||
|
||||
@@ -126,7 +126,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
||||
requestLog.setRequestUrl(url);
|
||||
try {
|
||||
String resStr = HttpUtils.sendPost(url, param, "application/json");
|
||||
System.out.println(param);
|
||||
log.info("调用WCS接口,请求参数:"+param);
|
||||
log.info("调用WCS接口,返回信息:"+resStr);
|
||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||
if (!JSONUtil.isJsonObj(resStr)) {
|
||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||
@@ -164,7 +165,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
||||
requestLog.setRequestUrl(url);
|
||||
try {
|
||||
String resStr = HttpUtils.sendPostGd(url, param, "application/json");
|
||||
System.out.println(param);
|
||||
log.info("调用ERP创建工艺单,请求参数:"+param);
|
||||
log.info("调用ERP创建工艺单,接口返回:"+resStr);
|
||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||
if (!JSONUtil.isJsonObj(resStr)) {
|
||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||
@@ -208,7 +210,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
||||
requestLog.setRequestUrl(url);
|
||||
try {
|
||||
String resStr = HttpUtils.sendPostOther(url, param, "application/json");
|
||||
System.out.println(param);
|
||||
log.info("调用ERP创建其他入出库单,请求参数:"+param);
|
||||
log.info("调用ERP创建其他入出库单,接口返回:"+resStr);
|
||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||
if (!JSONUtil.isJsonObj(resStr)) {
|
||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||
@@ -276,7 +279,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
||||
|
||||
try {
|
||||
String resStr = HttpUtils.sendPostDoc(url, param, "application/json");
|
||||
System.out.println(param);
|
||||
log.info("调用ERP获取工艺单号,请求参数:"+param);
|
||||
log.info("调用ERP获取工艺单号,接口返回:"+resStr);
|
||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||
if (!JSONUtil.isJsonObj(resStr)) {
|
||||
throw new RuntimeException("返回结果不是有效的JSON对象");
|
||||
@@ -340,7 +344,8 @@ public class RequestLogServiceImpl implements IRequestLogService {
|
||||
|
||||
try {
|
||||
String resStr = HttpUtils.sendPostCode(url, param, "application/json");
|
||||
System.out.println(param);
|
||||
log.info("调用ERP获取订单条码,请求参数:"+param);
|
||||
log.info("调用ERP获取订单条码,接口返回:"+resStr);
|
||||
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
|
||||
if (!JSONUtil.isJsonObj(resStr)) {
|
||||
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.setGW(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_003").toString());
|
||||
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.setSpare3(JSONUtil.parseObj(docObj.toString()).get("YQueryViewColumnElement_005").toString());
|
||||
basProductCode.setCreateTime(new Date());
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<vue-qr
|
||||
:key="`qr-${index}-${item.serial}`"
|
||||
:text="item.qrCode"
|
||||
:size="100"
|
||||
:size="150"
|
||||
:margin="0"
|
||||
:correctLevel="2"
|
||||
:callback="onQrReady"
|
||||
@@ -959,11 +959,11 @@ export default {
|
||||
}
|
||||
|
||||
.preview-box {
|
||||
padding: 20px;
|
||||
padding: 5px;
|
||||
font-family: 'Arial', sans-serif;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
height: 350px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -971,7 +971,7 @@ export default {
|
||||
.preview-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 21px;
|
||||
min-height: 0;
|
||||
padding-left: 5px;
|
||||
}
|
||||
@@ -981,18 +981,17 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/*min-width: 10px;*/
|
||||
.preview-label {
|
||||
margin-right: 15px;
|
||||
min-width: 10px;
|
||||
font-size: 15px;
|
||||
margin-left: -10px;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.preview-value {
|
||||
flex: 1;
|
||||
font-size: 15px;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
word-break: break-all;
|
||||
@@ -1000,7 +999,8 @@ export default {
|
||||
|
||||
.qrcode-label {
|
||||
margin-top: 1px;
|
||||
font-size: 10px;
|
||||
margin-right: 15px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
@@ -1055,8 +1055,8 @@ export default {
|
||||
.qrcode-container {
|
||||
border: none;
|
||||
position: absolute !important;
|
||||
top: 10px !important;
|
||||
right: 30px !important;
|
||||
top: 5px !important;
|
||||
right: -10px !important;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user