update 新料号标签打印,标签模板格式修改
This commit is contained in:
parent
f3e73f6c25
commit
0fda0aecb3
@ -1854,6 +1854,7 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
pr.setPrintRequestID(UUID.randomUUID().toString());
|
pr.setPrintRequestID(UUID.randomUUID().toString());
|
||||||
LabelParameterObject obj = new LabelParameterObject();
|
LabelParameterObject obj = new LabelParameterObject();
|
||||||
List<Map<String, Object>> queryForListProduct = new ArrayList<>();
|
List<Map<String, Object>> queryForListProduct = new ArrayList<>();
|
||||||
|
|
||||||
if ("PET标签-电晕.btw".equals(labelAddress) || "PET标签-电晕-兴远泰.btw".equals(labelAddress) || "PET标签-涂布面.btw".equals(labelAddress) || "PET标签-涂布面-兴远泰.btw".equals(labelAddress)) {
|
if ("PET标签-电晕.btw".equals(labelAddress) || "PET标签-电晕-兴远泰.btw".equals(labelAddress) || "PET标签-涂布面.btw".equals(labelAddress) || "PET标签-涂布面-兴远泰.btw".equals(labelAddress)) {
|
||||||
params = new LabelPrintPET().creatLabelPET();
|
params = new LabelPrintPET().creatLabelPET();
|
||||||
labelPath = "C:\\inetpub\\wwwroot\\BarTender\\wwwroot\\Templates\\WMS\\WHRePrint\\" + labelAddress;
|
labelPath = "C:\\inetpub\\wwwroot\\BarTender\\wwwroot\\Templates\\WMS\\WHRePrint\\" + labelAddress;
|
||||||
@ -1868,7 +1869,7 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
" LN.PRACTICALSPEC,\n" +
|
" LN.PRACTICALSPEC,\n" +
|
||||||
" LN.JUMBOROLLBATCH,\n" +
|
" LN.JUMBOROLLBATCH,\n" +
|
||||||
" LN.DEFINEITEM18,\n" +
|
" LN.DEFINEITEM18,\n" +
|
||||||
" MS.OLDMATERIALSPECNAME AS MATERIALCODE,\n" +
|
" MP.MATERIALSPECNAME AS MATERIALCODE,\n" +
|
||||||
" LN.MAINQTY,\n" +
|
" LN.MAINQTY,\n" +
|
||||||
" LN.DEFINEITEM19,\n" +
|
" LN.DEFINEITEM19,\n" +
|
||||||
" LN.PRODUCTDATE,\n" +
|
" LN.PRODUCTDATE,\n" +
|
||||||
@ -1878,11 +1879,14 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
" LN.MAINUOM,\n" +
|
" LN.MAINUOM,\n" +
|
||||||
" LN.DEFINEITEM9,\n" +
|
" LN.DEFINEITEM9,\n" +
|
||||||
" MP.ERPLOCATION,\n" +
|
" MP.ERPLOCATION,\n" +
|
||||||
" MP.LOCATIONNAME" +
|
" CASE \n" +
|
||||||
|
" WHEN MP.LOCATIONNAME IS NULL OR TRIM(MP.LOCATIONNAME) = '' THEN MP.ERPLOCATION\n" +
|
||||||
|
" ELSE MP.LOCATIONNAME\n" +
|
||||||
|
" END AS LOCATIONNAME, " +
|
||||||
|
" LN.MATERIALSPECNAMENC" +
|
||||||
" FROM\n" +
|
" FROM\n" +
|
||||||
" LABELPRINTINFO LN \n" +
|
" LABELPRINTINFO LN \n" +
|
||||||
" LEFT JOIN MATERIALPACKING MP ON LN.BARCODE = MP.MATERIALPACKINGNAME " +
|
" LEFT JOIN MATERIALPACKING MP ON LN.BARCODE = MP.MATERIALPACKINGNAME " +
|
||||||
" LEFT JOIN MATERIALSPEC MS ON LN.MATERIALCODE = MS.MATERIALSPECNAME\n" +
|
|
||||||
" WHERE\n" +
|
" WHERE\n" +
|
||||||
" LN.BARCODE =:MATERIALPACKINGNAME ";
|
" LN.BARCODE =:MATERIALPACKINGNAME ";
|
||||||
}else {
|
}else {
|
||||||
@ -1905,10 +1909,15 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
"LN.MAINUOM,\n" +
|
"LN.MAINUOM,\n" +
|
||||||
"LN.DEFINEITEM9, " +
|
"LN.DEFINEITEM9, " +
|
||||||
" MP.ERPLOCATION,\n" +
|
" MP.ERPLOCATION,\n" +
|
||||||
" MP.LOCATIONNAME" +
|
" CASE \n" +
|
||||||
|
" WHEN MP.LOCATIONNAME IS NULL OR TRIM(MP.LOCATIONNAME) = '' THEN MP.ERPLOCATION\n" +
|
||||||
|
" ELSE MP.LOCATIONNAME\n" +
|
||||||
|
" END AS LOCATIONNAME," +
|
||||||
|
"MS.OLDMATERIALSPECNAME " +
|
||||||
"FROM\n" +
|
"FROM\n" +
|
||||||
"\tLABELPRINTINFO LN \n" +
|
"\tLABELPRINTINFO LN \n" +
|
||||||
" LEFT JOIN MATERIALPACKING MP ON LN.BARCODE = MP.MATERIALPACKINGNAME " +
|
" LEFT JOIN MATERIALPACKING MP ON LN.BARCODE = MP.MATERIALPACKINGNAME " +
|
||||||
|
" LEFT JOIN MATERIALSPEC MS ON LN.MATERIALCODE = MS.MATERIALSPECNAME\n" +
|
||||||
"WHERE\n" +
|
"WHERE\n" +
|
||||||
"\tLN.BARCODE =:MATERIALPACKINGNAME ";
|
"\tLN.BARCODE =:MATERIALPACKINGNAME ";
|
||||||
}
|
}
|
||||||
@ -1950,7 +1959,8 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
//电晕
|
//电晕
|
||||||
labelPrintPET.setCorona(queryForListProduct.get(0).get("DEFINEITEM19") == null ? "" : queryForListProduct.get(0).get("DEFINEITEM19").toString());
|
labelPrintPET.setCorona(queryForListProduct.get(0).get("DEFINEITEM19") == null ? "" : queryForListProduct.get(0).get("DEFINEITEM19").toString());
|
||||||
//分切日期
|
//分切日期
|
||||||
labelPrintPET.setProductDate(queryForListProduct.get(0).get("PRODUCTDATE") == null ? "" : queryForListProduct.get(0).get("PRODUCTDATE").toString());
|
String productDate = queryForListProduct.get(0).get("PRODUCTDATE") == null ? "" : queryForListProduct.get(0).get("PRODUCTDATE").toString();
|
||||||
|
labelPrintPET.setProductDate(formatDateStr(productDate));
|
||||||
//型号
|
//型号
|
||||||
String defineitem16 = queryForListProduct.get(0).get("DEFINEITEM16") == null ? "" : queryForListProduct.get(0).get("DEFINEITEM16").toString();
|
String defineitem16 = queryForListProduct.get(0).get("DEFINEITEM16") == null ? "" : queryForListProduct.get(0).get("DEFINEITEM16").toString();
|
||||||
labelPrintPET.setSpecifications(defineitem16);
|
labelPrintPET.setSpecifications(defineitem16);
|
||||||
@ -1960,10 +1970,11 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
//单位
|
//单位
|
||||||
String mainUom = queryForListProduct.get(0).get("MAINUOM") == null ? "" : queryForListProduct.get(0).get("MAINUOM").toString();
|
String mainUom = queryForListProduct.get(0).get("MAINUOM") == null ? "" : queryForListProduct.get(0).get("MAINUOM").toString();
|
||||||
labelPrintPET.setMainUom(mainUom);
|
labelPrintPET.setMainUom(mainUom);
|
||||||
//仓库编码+空格+货位编码
|
//NC料号编码+'-'+货位编码
|
||||||
String erpLocation = queryForListProduct.get(0).get("ERPLOCATION") == null ? "" : queryForListProduct.get(0).get("ERPLOCATION").toString();
|
String erpLocation = queryForListProduct.get(0).get("ERPLOCATION") == null ? "" : queryForListProduct.get(0).get("ERPLOCATION").toString();
|
||||||
String locationname = queryForListProduct.get(0).get("LOCATIONNAME") == null ? "" : queryForListProduct.get(0).get("LOCATIONNAME").toString();
|
String locationname = queryForListProduct.get(0).get("LOCATIONNAME") == null ? "" : queryForListProduct.get(0).get("LOCATIONNAME").toString();
|
||||||
labelPrintPET.setLocationcode(erpLocation + " " + locationname);
|
String materialSpecNameNc = queryForListProduct.get(0).get("MATERIALSPECNAMENC") == null ? "" : queryForListProduct.get(0).get("MATERIALSPECNAMENC").toString();
|
||||||
|
labelPrintPET.setLocationcode(materialSpecNameNc + "-" + locationname);
|
||||||
labelPrintPET.setWide("");
|
labelPrintPET.setWide("");
|
||||||
labelPrintPET.setLength("");
|
labelPrintPET.setLength("");
|
||||||
labelPrintPET.setLineSpeed("");
|
labelPrintPET.setLineSpeed("");
|
||||||
@ -1983,7 +1994,7 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
if (newMaterialSpecSwitch.equals("Y")){
|
if (newMaterialSpecSwitch.equals("Y")){
|
||||||
qeuryLabelDatasql = " SELECT\n" +
|
qeuryLabelDatasql = " SELECT\n" +
|
||||||
" m.MATERIALPACKINGNAME barcode,m2.materialtype,\n" +
|
" m.MATERIALPACKINGNAME barcode,m2.materialtype,\n" +
|
||||||
" m2.OLDMATERIALSPECNAME partNo,\n" +
|
" m.MATERIALSPECNAME partNo,\n" +
|
||||||
" m.PHASE state,\n" +
|
" m.PHASE state,\n" +
|
||||||
" ss.SPECNAME sdkSpec,\n" +
|
" ss.SPECNAME sdkSpec,\n" +
|
||||||
" m2.DESC_CN partName,m2.description,\n" +
|
" m2.DESC_CN partName,m2.description,\n" +
|
||||||
@ -1994,7 +2005,12 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\n" +
|
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\n" +
|
||||||
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,\n" +
|
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,\n" +
|
||||||
" TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
" TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
||||||
" m.ERPLOCATION,m.LOCATIONNAME \n" +
|
" m.ERPLOCATION,m.LOCATIONNAME," +
|
||||||
|
" CASE " +
|
||||||
|
" WHEN m.LOCATIONNAME IS NULL OR TRIM(m.LOCATIONNAME) = '' THEN m.ERPLOCATION " +
|
||||||
|
" ELSE m.LOCATIONNAME" +
|
||||||
|
" END AS LOCATIONNAME, " +
|
||||||
|
" m.ERPSTATE \n" +
|
||||||
" FROM\n" +
|
" FROM\n" +
|
||||||
" MATERIALPACKING m\n" +
|
" MATERIALPACKING m\n" +
|
||||||
" LEFT JOIN SDK_SPEC ss ON\n" +
|
" LEFT JOIN SDK_SPEC ss ON\n" +
|
||||||
@ -2019,7 +2035,12 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\r\n" +
|
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\r\n" +
|
||||||
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,"
|
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,"
|
||||||
+ "TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
+ "TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
||||||
" m.ERPLOCATION,m.LOCATIONNAME\r\n" +
|
" m.ERPLOCATION," +
|
||||||
|
" CASE " +
|
||||||
|
" WHEN m.LOCATIONNAME IS NULL OR TRIM(m.LOCATIONNAME) = '' THEN m.ERPLOCATION " +
|
||||||
|
" ELSE m.LOCATIONNAME" +
|
||||||
|
" END AS LOCATIONNAME, " +
|
||||||
|
" m2.OLDMATERIALSPECNAME AS ERPSTATE\r\n" +
|
||||||
"FROM\r\n" +
|
"FROM\r\n" +
|
||||||
" MATERIALPACKING m\r\n" +
|
" MATERIALPACKING m\r\n" +
|
||||||
"LEFT JOIN SDK_SPEC ss ON\r\n" +
|
"LEFT JOIN SDK_SPEC ss ON\r\n" +
|
||||||
@ -2062,7 +2083,8 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
obj.setOperater(queryForListProduct.get(0).get("operater") != null ? queryForListProduct.get(0).get("operater").toString() : "");
|
obj.setOperater(queryForListProduct.get(0).get("operater") != null ? queryForListProduct.get(0).get("operater").toString() : "");
|
||||||
// private String operater;
|
// private String operater;
|
||||||
// obj.setOpreater(queryForList.get(0).get("operater") != null ? queryForList.get(0).get("operater").toString() : "");
|
// obj.setOpreater(queryForList.get(0).get("operater") != null ? queryForList.get(0).get("operater").toString() : "");
|
||||||
obj.setJumboRollBatch(queryForListProduct.get(0).get("jumboRollBatch") != null ? queryForListProduct.get(0).get("jumboRollBatch").toString() : "");
|
String jumboRollBatch = queryForListProduct.get(0).get("jumboRollBatch") != null ? queryForListProduct.get(0).get("jumboRollBatch").toString() : "";
|
||||||
|
obj.setJumboRollBatch(formatDateStr(jumboRollBatch));
|
||||||
obj.setSpecifications(queryForListProduct.get(0).get("specifications") != null ? queryForListProduct.get(0).get("specifications").toString() : "");
|
obj.setSpecifications(queryForListProduct.get(0).get("specifications") != null ? queryForListProduct.get(0).get("specifications").toString() : "");
|
||||||
obj.setPracticalSpec(queryForListProduct.get(0).get("PracticalSpec") != null ? queryForListProduct.get(0).get("PracticalSpec").toString() : "");
|
obj.setPracticalSpec(queryForListProduct.get(0).get("PracticalSpec") != null ? queryForListProduct.get(0).get("PracticalSpec").toString() : "");
|
||||||
obj.setCustomNo(queryForListProduct.get(0).get("customNo") != null ? queryForListProduct.get(0).get("customNo").toString() : "");
|
obj.setCustomNo(queryForListProduct.get(0).get("customNo") != null ? queryForListProduct.get(0).get("customNo").toString() : "");
|
||||||
@ -2078,7 +2100,8 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
obj.setDescription(queryForListProduct.get(0).get("description") != null ? queryForListProduct.get(0).get("description").toString() : "");
|
obj.setDescription(queryForListProduct.get(0).get("description") != null ? queryForListProduct.get(0).get("description").toString() : "");
|
||||||
String erpLocation = queryForListProduct.get(0).get("ERPLOCATION") == null ? "" : queryForListProduct.get(0).get("ERPLOCATION").toString();
|
String erpLocation = queryForListProduct.get(0).get("ERPLOCATION") == null ? "" : queryForListProduct.get(0).get("ERPLOCATION").toString();
|
||||||
String locationName = queryForListProduct.get(0).get("LOCATIONNAME") == null ? "" : queryForListProduct.get(0).get("LOCATIONNAME").toString();
|
String locationName = queryForListProduct.get(0).get("LOCATIONNAME") == null ? "" : queryForListProduct.get(0).get("LOCATIONNAME").toString();
|
||||||
obj.setLocationcode(erpLocation + " " + locationName);
|
String erpState = queryForListProduct.get(0).get("ERPSTATE") == null ? "" : queryForListProduct.get(0).get("ERPSTATE").toString();
|
||||||
|
obj.setLocationcode(erpState + "-" + locationName);
|
||||||
log.info("***************************PrintLabel Assign params is : " + params.toString());
|
log.info("***************************PrintLabel Assign params is : " + params.toString());
|
||||||
//labelUrl = labelPrintRabbitMQ(obj, requestUrl, pr, params);
|
//labelUrl = labelPrintRabbitMQ(obj, requestUrl, pr, params);
|
||||||
labelUrl = labelPrint(obj, requestUrl, pr, params);
|
labelUrl = labelPrint(obj, requestUrl, pr, params);
|
||||||
@ -2089,7 +2112,7 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
if (newMaterialSpecSwitch.equals("Y")){
|
if (newMaterialSpecSwitch.equals("Y")){
|
||||||
qeuryLabelDatasql = "SELECT\r\n" +
|
qeuryLabelDatasql = "SELECT\r\n" +
|
||||||
" m.MATERIALPACKINGNAME barcode,m2.materialtype,\r\n" +
|
" m.MATERIALPACKINGNAME barcode,m2.materialtype,\r\n" +
|
||||||
" m2.OLDMATERIALSPECNAME partNo,\r\n" +
|
" m.MATERIALSPECNAME partNo,\r\n" +
|
||||||
" m.PHASE state,\r\n" +
|
" m.PHASE state,\r\n" +
|
||||||
" ss.SPECNAME sdkSpec,\r\n" +
|
" ss.SPECNAME sdkSpec,\r\n" +
|
||||||
" m2.DESC_CN partName,m2.description,\r\n" +
|
" m2.DESC_CN partName,m2.description,\r\n" +
|
||||||
@ -2100,7 +2123,12 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\r\n" +
|
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\r\n" +
|
||||||
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,"
|
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,"
|
||||||
+ "TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
+ "TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
||||||
" m.ERPLOCATION,m.LOCATIONNAME\r\n" +
|
" m.ERPLOCATION," +
|
||||||
|
" CASE " +
|
||||||
|
" WHEN m.LOCATIONNAME IS NULL OR TRIM(m.LOCATIONNAME) = '' THEN m.ERPLOCATION " +
|
||||||
|
" ELSE m.LOCATIONNAME" +
|
||||||
|
" END AS LOCATIONNAME, " +
|
||||||
|
" m.ERPSTATE\r\n" +
|
||||||
"FROM\r\n" +
|
"FROM\r\n" +
|
||||||
" MATERIALPACKING m\r\n" +
|
" MATERIALPACKING m\r\n" +
|
||||||
"LEFT JOIN SDK_SPEC ss ON\r\n" +
|
"LEFT JOIN SDK_SPEC ss ON\r\n" +
|
||||||
@ -2125,7 +2153,12 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\r\n" +
|
" m.CHARGE lotNo,NVL(m.suppliername,'') supplierNo,\r\n" +
|
||||||
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,"
|
" m.REMARK remark,TO_CHAR(m.RECEIVETIME,'YYYYMMDD') jumboRollBatch,"
|
||||||
+ "TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
+ "TO_CHAR(MAKEDATE,'YYYYMMDD') makedate, TO_CHAR(EXPIRINGDATE,'YYYYMMDD') expdate ,m.RECEIVEUSER opreater," +
|
||||||
" m.ERPLOCATION,m.LOCATIONNAME\r\n" +
|
" m.ERPLOCATION," +
|
||||||
|
" CASE " +
|
||||||
|
" WHEN m.LOCATIONNAME IS NULL OR TRIM(m.LOCATIONNAME) = '' THEN m.ERPLOCATION " +
|
||||||
|
" ELSE m.LOCATIONNAME" +
|
||||||
|
" END AS LOCATIONNAME, " +
|
||||||
|
" m2.OLDMATERIALSPECNAME AS ERPSTATE\r\n" +
|
||||||
"FROM\r\n" +
|
"FROM\r\n" +
|
||||||
" MATERIALPACKING m\r\n" +
|
" MATERIALPACKING m\r\n" +
|
||||||
"LEFT JOIN SDK_SPEC ss ON\r\n" +
|
"LEFT JOIN SDK_SPEC ss ON\r\n" +
|
||||||
@ -2168,7 +2201,8 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
obj.setOperater(queryForListProduct.get(0).get("operater") != null ? queryForListProduct.get(0).get("operater").toString() : "");
|
obj.setOperater(queryForListProduct.get(0).get("operater") != null ? queryForListProduct.get(0).get("operater").toString() : "");
|
||||||
// private String operater;
|
// private String operater;
|
||||||
// obj.setOpreater(queryForList.get(0).get("operater") != null ? queryForList.get(0).get("operater").toString() : "");
|
// obj.setOpreater(queryForList.get(0).get("operater") != null ? queryForList.get(0).get("operater").toString() : "");
|
||||||
obj.setJumboRollBatch(queryForListProduct.get(0).get("jumboRollBatch") != null ? queryForListProduct.get(0).get("jumboRollBatch").toString() : "");
|
String jumboRollBatch = queryForListProduct.get(0).get("jumboRollBatch") != null ? queryForListProduct.get(0).get("jumboRollBatch").toString() : "";
|
||||||
|
obj.setJumboRollBatch(formatDateStr(jumboRollBatch));
|
||||||
obj.setSpecifications(queryForListProduct.get(0).get("specifications") != null ? queryForListProduct.get(0).get("specifications").toString() : "");
|
obj.setSpecifications(queryForListProduct.get(0).get("specifications") != null ? queryForListProduct.get(0).get("specifications").toString() : "");
|
||||||
obj.setPracticalSpec(queryForListProduct.get(0).get("PracticalSpec") != null ? queryForListProduct.get(0).get("PracticalSpec").toString() : "");
|
obj.setPracticalSpec(queryForListProduct.get(0).get("PracticalSpec") != null ? queryForListProduct.get(0).get("PracticalSpec").toString() : "");
|
||||||
obj.setCustomNo(queryForListProduct.get(0).get("customNo") != null ? queryForListProduct.get(0).get("customNo").toString() : "");
|
obj.setCustomNo(queryForListProduct.get(0).get("customNo") != null ? queryForListProduct.get(0).get("customNo").toString() : "");
|
||||||
@ -2184,7 +2218,8 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
obj.setDescription(queryForListProduct.get(0).get("description") != null ? queryForListProduct.get(0).get("description").toString() : "");
|
obj.setDescription(queryForListProduct.get(0).get("description") != null ? queryForListProduct.get(0).get("description").toString() : "");
|
||||||
String erpLocation = queryForListProduct.get(0).get("ERPLOCATION") == null ? "" : queryForListProduct.get(0).get("ERPLOCATION").toString();
|
String erpLocation = queryForListProduct.get(0).get("ERPLOCATION") == null ? "" : queryForListProduct.get(0).get("ERPLOCATION").toString();
|
||||||
String locationName = queryForListProduct.get(0).get("LOCATIONNAME") == null ? "" : queryForListProduct.get(0).get("LOCATIONNAME").toString();
|
String locationName = queryForListProduct.get(0).get("LOCATIONNAME") == null ? "" : queryForListProduct.get(0).get("LOCATIONNAME").toString();
|
||||||
obj.setLocationcode(erpLocation + " " + locationName);
|
String erpState = queryForListProduct.get(0).get("ERPSTATE") == null ? "" : queryForListProduct.get(0).get("ERPSTATE").toString();
|
||||||
|
obj.setLocationcode(erpState + " " + locationName);
|
||||||
log.info("***************************PrintLabel Assign params is : " + params.toString());
|
log.info("***************************PrintLabel Assign params is : " + params.toString());
|
||||||
//labelUrl = labelPrintRabbitMQ(obj, requestUrl, pr, params);
|
//labelUrl = labelPrintRabbitMQ(obj, requestUrl, pr, params);
|
||||||
labelUrl = labelPrint(obj, requestUrl, pr, params);
|
labelUrl = labelPrint(obj, requestUrl, pr, params);
|
||||||
@ -2359,4 +2394,19 @@ public class BSLabelServiceImpl extends CommonServiceDAO<BSLabelKey, BSLabel> im
|
|||||||
return bodyinfo;
|
return bodyinfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String formatDateStr(String productDate){
|
||||||
|
// 定义原始日期格式
|
||||||
|
SimpleDateFormat originalFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
// 定义目标日期格式
|
||||||
|
SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy/MM/dd");
|
||||||
|
try {
|
||||||
|
java.util.Date date = originalFormat.parse(productDate);
|
||||||
|
// 格式化为新的字符串格式
|
||||||
|
productDate = targetFormat.format(date);
|
||||||
|
}catch (Exception e){
|
||||||
|
|
||||||
|
}
|
||||||
|
return productDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user