更改
This commit is contained in:
@@ -96,11 +96,11 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
if (serviceName.equals("/insertRkd")) {
|
if (serviceName.equals("/insertRkd")) {
|
||||||
String sqlInsertRkd = DB.prepareInsertStmt("cprkd", "ysdh,ysrq,lx,yhm,djbh,ckbh,sflz,scsj,txm");
|
String sqlInsertRkd = DB.prepareInsertStmt("cprkd", "ysdh,ysrq,lx,yhm,djbh,ckbh,sflz,scsj,txm");
|
||||||
String sqlInsertRkdMx = DB.prepareInsertStmt("cprkdmx",
|
String sqlInsertRkdMx = DB.prepareInsertStmt("cprkdmx",
|
||||||
"mxbh,ysdh,cpbh,cpmc,lpxx,ddbh,zlzt,txm,ly,rksl,yapsl,cpgg1,cpgg2,cpgg3,jldw,scrq,bz,scdw,bhgcl");
|
"mxbh,ysdh,cpbh,cpmc,lpxx,ddbh,zlzt,txm,ly,rksl,yapsl,cpgg1,cpgg2,cpgg3,jldw,scrq,bz,scdw");
|
||||||
String sqlInsertRkZl = DB.prepareInsertStmt("cprkzl",
|
String sqlInsertRkZl = DB.prepareInsertStmt("cprkzl",
|
||||||
"jlh,mxbh,ckmc,sl,zt,scsj,tpbh,pzbh,czr,lpxx,piz,maoz,gydw,zlzt,txm,cpbh,scrq,zlbh,tpcrk,modulecode,assetcode,producetime,bhgcl");
|
"jlh,mxbh,ckmc,sl,zt,scsj,tpbh,pzbh,czr,lpxx,piz,maoz,gydw,zlzt,txm,cpbh,scrq,zlbh,tpcrk,modulecode,assetcode,producetime");
|
||||||
String materialsqlInsertRkZl = DB.prepareInsertStmt("cprkzl",
|
String materialsqlInsertRkZl = DB.prepareInsertStmt("cprkzl",
|
||||||
"jlh,mxbh,ckmc,sl,zt,scsj,BoxNo,pzbh,czr,lpxx,piz,maoz,gydw,zlzt,txm,cpbh,scrq,zlbh,tpcrk,modulecode,assetcode,producetime,bhgcl");
|
"jlh,mxbh,ckmc,sl,zt,scsj,BoxNo,pzbh,czr,lpxx,piz,maoz,gydw,zlzt,txm,cpbh,scrq,zlbh,tpcrk,modulecode,assetcode,producetime");
|
||||||
List sqls = new ArrayList();
|
List sqls = new ArrayList();
|
||||||
List values = new ArrayList();
|
List values = new ArrayList();
|
||||||
JSONObject responseMes = new JSONObject();
|
JSONObject responseMes = new JSONObject();
|
||||||
@@ -176,7 +176,6 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
String ProductionTime = ja.getString("ProductionTime");
|
String ProductionTime = ja.getString("ProductionTime");
|
||||||
String gydw = ja.getString("PackType");
|
String gydw = ja.getString("PackType");
|
||||||
String zlzt = ja.getString("CodeState");
|
String zlzt = ja.getString("CodeState");
|
||||||
String bhgcl = ja.getString("Bhgcl");
|
|
||||||
if ("1".equals(db.getSingleField("select dqz from sys_config where id_pzx='if.MESZLZT' ", null))) {
|
if ("1".equals(db.getSingleField("select dqz from sys_config where id_pzx='if.MESZLZT' ", null))) {
|
||||||
zlzt = "0";
|
zlzt = "0";
|
||||||
}
|
}
|
||||||
@@ -185,7 +184,7 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
Object mxbh = SerialNumber.getSerialNumber("cprkmxbh");
|
Object mxbh = SerialNumber.getSerialNumber("cprkmxbh");
|
||||||
sqls.add(sqlInsertRkdMx);
|
sqls.add(sqlInsertRkdMx);
|
||||||
values.add(new Object[] { mxbh, ysdh, cpbh, cpmc, lpxx, newlpxx, zlzt, txm, 0, qty, 0, null, null,
|
values.add(new Object[] { mxbh, ysdh, cpbh, cpmc, lpxx, newlpxx, zlzt, txm, 0, qty, 0, null, null,
|
||||||
null, jldw, getDate(), null, null,bhgcl});
|
null, jldw, getDate(), null, null });
|
||||||
|
|
||||||
Integer jlh = ServerUtil.nextInstNo(db, 1);
|
Integer jlh = ServerUtil.nextInstNo(db, 1);
|
||||||
|
|
||||||
@@ -193,13 +192,13 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
sqls.add(materialsqlInsertRkZl);
|
sqls.add(materialsqlInsertRkZl);
|
||||||
values.add(new Object[] { jlh, mxbh, "LTCK", qty, 0, getTime(), tpbh, ysdh, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", lpxx,
|
values.add(new Object[] { jlh, mxbh, "LTCK", qty, 0, getTime(), tpbh, ysdh, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", lpxx,
|
||||||
newlpxx, boxno, gydw, zlzt, null, cpbh, getDate(), zlbh, null, ModuleCode, AssetCode,
|
newlpxx, boxno, gydw, zlzt, null, cpbh, getDate(), zlbh, null, ModuleCode, AssetCode,
|
||||||
ProductionTime,bhgcl});
|
ProductionTime });
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sqls.add(sqlInsertRkZl);
|
sqls.add(sqlInsertRkZl);
|
||||||
values.add(new Object[] { jlh, mxbh, "LTCK", qty, 0, getTime(), tpbh, ysdh, yhm, lpxx, newlpxx,
|
values.add(new Object[] { jlh, mxbh, "LTCK", qty, 0, getTime(), tpbh, ysdh, yhm, lpxx, newlpxx,
|
||||||
boxno, gydw, zlzt, txm, cpbh, getDate(), zlbh, address, ModuleCode, AssetCode,
|
boxno, gydw, zlzt, txm, cpbh, getDate(), zlbh, address, ModuleCode, AssetCode,
|
||||||
ProductionTime,bhgcl});
|
ProductionTime });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -222,7 +221,7 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
|
|
||||||
String sqlInsertCkd = DB.prepareInsertStmt("ckd", "ckdh,shrq,zt,cklx,yhm,djbh,ckbh,sflz,shsj,<2C><EFBFBD><DEB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
String sqlInsertCkd = DB.prepareInsertStmt("ckd", "ckdh,shrq,zt,cklx,yhm,djbh,ckbh,sflz,shsj,<2C><EFBFBD><DEB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
String sqlInsertCkdMx = DB.prepareInsertStmt("ckdmx",
|
String sqlInsertCkdMx = DB.prepareInsertStmt("ckdmx",
|
||||||
"mxbh,ckdh,cpbh,lpxx,gydw,zlzt,txm,shsl,yapsl,cpmc,cpgg1,cpgg2,cpgg3,jldw,scdw,modulecode,assetcode,producetime,bhgcl");
|
"mxbh,ckdh,cpbh,lpxx,gydw,zlzt,txm,shsl,yapsl,cpmc,cpgg1,cpgg2,cpgg3,jldw,scdw,modulecode,assetcode,producetime");
|
||||||
ArrayList oprObjArrayszs = new ArrayList();
|
ArrayList oprObjArrayszs = new ArrayList();
|
||||||
List sqls = new ArrayList();
|
List sqls = new ArrayList();
|
||||||
List values = new ArrayList();
|
List values = new ArrayList();
|
||||||
@@ -284,7 +283,6 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
|
|
||||||
String gydw = ja.getString("PackType");
|
String gydw = ja.getString("PackType");
|
||||||
String zlzt = ja.getString("CodeState");
|
String zlzt = ja.getString("CodeState");
|
||||||
String bhgcl= ja.getString("Bhgcl");
|
|
||||||
String qty = ja.getInteger("Qty").toString();
|
String qty = ja.getInteger("Qty").toString();
|
||||||
if (!"0".equals(qty)) {
|
if (!"0".equals(qty)) {
|
||||||
String kczs = (String) db.getSingleField(
|
String kczs = (String) db.getSingleField(
|
||||||
@@ -327,7 +325,6 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
lpxx = onecpxx.get("lpxx");
|
lpxx = onecpxx.get("lpxx");
|
||||||
gydw = onecpxx.get("gydw");
|
gydw = onecpxx.get("gydw");
|
||||||
zlzt = onecpxx.get("zlzt");
|
zlzt = onecpxx.get("zlzt");
|
||||||
bhgcl = onecpxx.get("bhgcl");
|
|
||||||
txm = onecpxx.get("txm");
|
txm = onecpxx.get("txm");
|
||||||
cpmc = onecpxx.get("cpmc");
|
cpmc = onecpxx.get("cpmc");
|
||||||
jldw = onecpxx.get("jldw");
|
jldw = onecpxx.get("jldw");
|
||||||
@@ -335,7 +332,7 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
sqls.add(sqlInsertCkdMx);
|
sqls.add(sqlInsertCkdMx);
|
||||||
Object mxbh = SerialNumber.getSerialNumber("cpckmxbh");
|
Object mxbh = SerialNumber.getSerialNumber("cpckmxbh");
|
||||||
values.add(new Object[] { mxbh, ckdh, cpbh, lpxx, gydw, zlzt, txm, qty, 0, cpmc, null,
|
values.add(new Object[] { mxbh, ckdh, cpbh, lpxx, gydw, zlzt, txm, qty, 0, cpmc, null,
|
||||||
null, null, jldw, null, ModuleCode, AssetCode, ProductionTime,bhgcl});
|
null, null, jldw, null, ModuleCode, AssetCode, ProductionTime });
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>ϸ
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>ϸ
|
||||||
oprObjArrayszs.add(new Object[] { ckdh, mxbh, kcjlh, "zd" });
|
oprObjArrayszs.add(new Object[] { ckdh, mxbh, kcjlh, "zd" });
|
||||||
}
|
}
|
||||||
@@ -346,7 +343,7 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
|
|
||||||
sqls.add(sqlInsertCkdMx);
|
sqls.add(sqlInsertCkdMx);
|
||||||
values.add(new Object[] { mxbh, ckdh, cpbh, lpxx, gydw, zlzt, txm, qty, 0, cpmc, null, null,
|
values.add(new Object[] { mxbh, ckdh, cpbh, lpxx, gydw, zlzt, txm, qty, 0, cpmc, null, null,
|
||||||
null, jldw, null, ModuleCode, AssetCode, ProductionTime,bhgcl});
|
null, jldw, null, ModuleCode, AssetCode, ProductionTime });
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>ϸ
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>ϸ
|
||||||
oprObjArrayszs.add(new Object[] { ckdh, mxbh, null, "zd" });
|
oprObjArrayszs.add(new Object[] { ckdh, mxbh, null, "zd" });
|
||||||
}
|
}
|
||||||
@@ -532,8 +529,8 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
meslw.debug(String.format("updateCksl <20><><EFBFBD><EFBFBD>MES<45><53>%s", returnjo));
|
meslw.debug(String.format("updateCksl <20><><EFBFBD><EFBFBD>MES<45><53>%s", returnjo));
|
||||||
|
|
||||||
} else if (serviceName.equals("/updateQCStatus")) {
|
} else if (serviceName.equals("/updateQCStatus")) {
|
||||||
String sqlUpdateCpkcxx1 = "update cpkcxx set zlzt=?,bhgcl=? where cpbh =? and txm is null or txm=? ";
|
String sqlUpdateCpkcxx1 = "update cpkcxx set zlzt=? where cpbh =? and txm is null or txm=? ";
|
||||||
String sqlUpdateCpkcxx2 = "update cpkcxx set zlzt=?,bhgcl=? where cpbh =? and lpxx =? and txm is null or txm=?";
|
String sqlUpdateCpkcxx2 = "update cpkcxx set zlzt=? where cpbh =? and lpxx =? and txm is null or txm=?";
|
||||||
String sqlUpdateKwjbxx = "update kwjbxx set zlzt=? where kwbh =? ";
|
String sqlUpdateKwjbxx = "update kwjbxx set zlzt=? where kwbh =? ";
|
||||||
List sqls = new ArrayList();
|
List sqls = new ArrayList();
|
||||||
List values = new ArrayList();
|
List values = new ArrayList();
|
||||||
@@ -548,7 +545,6 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
String cpbh = ja.getString("Code");
|
String cpbh = ja.getString("Code");
|
||||||
String lpxx = ja.getString("Lpxx");
|
String lpxx = ja.getString("Lpxx");
|
||||||
String zlzt = ja.getString("CodeState");
|
String zlzt = ja.getString("CodeState");
|
||||||
String bhgcl = ja.getString("Bhgcl");
|
|
||||||
if (!db.hasAnyData("select 2 from cpxx where cpbh=? ", new Object[] { cpbh })) {
|
if (!db.hasAnyData("select 2 from cpxx where cpbh=? ", new Object[] { cpbh })) {
|
||||||
pw.write(getOut("updateQCStatus", 1, "WMSϵͳ<EFBFBD>˲<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:" + cpbh, djbh, args));
|
pw.write(getOut("updateQCStatus", 1, "WMSϵͳ<EFBFBD>˲<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:" + cpbh, djbh, args));
|
||||||
return;
|
return;
|
||||||
@@ -563,18 +559,18 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
if (list_mx != null && list_mx.size() > 0) {
|
if (list_mx != null && list_mx.size() > 0) {
|
||||||
for (int k = 0; k < list_mx.size(); k++) {
|
for (int k = 0; k < list_mx.size(); k++) {
|
||||||
Map map = list_mx.get(k);
|
Map map = list_mx.get(k);
|
||||||
db.preparedUpdate("update cprkdmx set zlzt=?,bhgcl=? where mxbh=?",
|
db.preparedUpdate("update cprkdmx set zlzt=? where mxbh=?",
|
||||||
new Object[] { zlzt,bhgcl, map.get("mxbh") }, true);
|
new Object[] { zlzt, map.get("mxbh") }, true);
|
||||||
if (db.hasAnyData("select 2 from cprkzl where mxbh=?", map.get("mxbh"))) {
|
if (db.hasAnyData("select 2 from cprkzl where mxbh=?", map.get("mxbh"))) {
|
||||||
db.preparedUpdate("update cprkzl set zlzt=?,bhgcl=? where mxbh=?",
|
db.preparedUpdate("update cprkzl set zlzt=? where mxbh=?",
|
||||||
new Object[] { zlzt,bhgcl,map.get("mxbh") }, true);
|
new Object[] { zlzt, map.get("mxbh") }, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (db.hasAnyData("select 2 from cpkcxx where cpbh =? and lpxx =? ",
|
if (db.hasAnyData("select 2 from cpkcxx where cpbh =? and lpxx =? ",
|
||||||
new Object[] { cpbh, lpxx })) {
|
new Object[] { cpbh, lpxx })) {
|
||||||
sqls.add("update cpkcxx set zlzt=?,bhgcl=? where cpbh =? and lpxx=? ");
|
sqls.add("update cpkcxx set zlzt=? where cpbh =? and lpxx=? ");
|
||||||
values.add(new Object[] { zlzt,bhgcl,cpbh, lpxx });
|
values.add(new Object[] { zlzt, cpbh, lpxx });
|
||||||
List<Map> list = db.getMappedRowsData("select kwbh from cpkcxx where cpbh=? and lpxx=? ",
|
List<Map> list = db.getMappedRowsData("select kwbh from cpkcxx where cpbh=? and lpxx=? ",
|
||||||
new Object[] { cpbh, lpxx });
|
new Object[] { cpbh, lpxx });
|
||||||
for (int j = 0; i < list.size(); i++) {
|
for (int j = 0; i < list.size(); i++) {
|
||||||
@@ -593,18 +589,18 @@ public class MesServiceManager extends AbstractServiceManager {
|
|||||||
if (list_mx != null && list_mx.size() > 0) {
|
if (list_mx != null && list_mx.size() > 0) {
|
||||||
for (int k = 0; k < list_mx.size(); k++) {
|
for (int k = 0; k < list_mx.size(); k++) {
|
||||||
Map map = list_mx.get(k);
|
Map map = list_mx.get(k);
|
||||||
db.preparedUpdate("update cprkdmx set zlzt=?,bhgcl=? where mxbh=?",
|
db.preparedUpdate("update cprkdmx set zlzt=? where mxbh=?",
|
||||||
new Object[] { zlzt,bhgcl,map.get("mxbh") }, true);
|
new Object[] { zlzt, map.get("mxbh") }, true);
|
||||||
if (db.hasAnyData("select 2 from cprkzl where mxbh=?", map.get("mxbh"))) {
|
if (db.hasAnyData("select 2 from cprkzl where mxbh=?", map.get("mxbh"))) {
|
||||||
db.preparedUpdate("update cprkzl set zlzt=?,bhgcl=? where mxbh=?",
|
db.preparedUpdate("update cprkzl set zlzt=? where mxbh=?",
|
||||||
new Object[] { zlzt,bhgcl,map.get("mxbh") }, true);
|
new Object[] { zlzt, map.get("mxbh") }, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (db.hasAnyData("select 2 from cpkcxx where cpbh =? and lpxx =? and txm =? ",
|
if (db.hasAnyData("select 2 from cpkcxx where cpbh =? and lpxx =? and txm =? ",
|
||||||
new Object[] { cpbh, lpxx, txm })) {
|
new Object[] { cpbh, lpxx, txm })) {
|
||||||
sqls.add("update cpkcxx set zlzt=?,bhgcl=? where cpbh =? and lpxx =? and txm=?");
|
sqls.add("update cpkcxx set zlzt=? where cpbh =? and lpxx =? and txm=?");
|
||||||
values.add(new Object[] { zlzt,bhgcl,cpbh, lpxx, txm });
|
values.add(new Object[] { zlzt, cpbh, lpxx, txm });
|
||||||
List<Map> list = db.getMappedRowsData("select kwbh from cpkcxx where cpbh=? and lpxx=? ",
|
List<Map> list = db.getMappedRowsData("select kwbh from cpkcxx where cpbh=? and lpxx=? ",
|
||||||
new Object[] { cpbh, lpxx });
|
new Object[] { cpbh, lpxx });
|
||||||
for (int j = 0; i < list.size(); i++) {
|
for (int j = 0; i < list.size(); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user