|
@@ -266,35 +266,36 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
pr_code = rs.getString("bar_prodcode");
|
|
|
bar_remain = rs.getDouble("bar_remain");
|
|
|
}else{
|
|
|
- rs = baseDao.queryForRowSet("select psl_baseqty,psl_prodcode,psl_repcode,psl_feeder,psl_id from productsmtlocation "
|
|
|
- +" where psl_psid=? and psl_location=? and psl_table=? and (psl_prodcode=? or psl_repcode=?)",map.get("PS_ID"),location,map.get("DL_TABLE"),bar_code,bar_code);
|
|
|
- if(rs.next()){
|
|
|
- pr_code = (String) bar_code;
|
|
|
- type= "product";
|
|
|
- }else{
|
|
|
- rs = baseDao.queryForRowSet("select psl_prodcode,wm_concat(psl_repcode)repcode from productsmtlocation where psl_psid=? and psl_location=? and psl_table=? group by psl_prodcode",map.get("PS_ID"),location,map.get("DL_TABLE"));
|
|
|
- if(rs.next()){
|
|
|
- if(bar_code.toString().contains(rs.getString("psl_prodcode"))){
|
|
|
- pr_code = rs.getString("psl_prodcode");
|
|
|
- }else{
|
|
|
- String [] stringArr= rs.getString("repcode").split(",");
|
|
|
- for (String s : stringArr) {
|
|
|
- if (bar_code.toString().contains(s)) {
|
|
|
- pr_code = s;
|
|
|
- }
|
|
|
- }
|
|
|
- if(pr_code == null || ("").equals(pr_code)){
|
|
|
- showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
- }
|
|
|
- }
|
|
|
- rs = baseDao.queryForRowSet("select nvl(pr_zxbzs,0) pr_zxbzs from product where pr_code = ?",pr_code);
|
|
|
- if(rs.next()){
|
|
|
- bar_remain = rs.getDouble("pr_zxbzs");
|
|
|
- }
|
|
|
- }else{
|
|
|
- showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
}
|
|
|
|
|
|
baseDao.updateByCondition("feeder","fe_location='"+location+"'","fe_code='"+fe_code+"'");
|
|
@@ -671,35 +672,36 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
showSmtError(APIErrorCode.BUSINESS_FAILED,"料卷["+bar_code+"]已被单据["+rs1.getString("bar_place")+"]使用",handleType,linecode,location,ps_prodcode,"料卷"+bar_code,bool,table);
|
|
|
}
|
|
|
}else{
|
|
|
- rs = baseDao.queryForRowSet("select psl_baseqty,psl_prodcode,psl_repcode,psl_feeder,psl_id from productsmtlocation"
|
|
|
- +" where psl_psid =? and psl_location=? and psl_table=? and (psl_prodcode=? or psl_repcode=?)",map.get("PS_ID"),location,map.get("DL_TABLE"),bar_code,bar_code);
|
|
|
- if(rs.next()){
|
|
|
- pr_code = (String)bar_code;
|
|
|
- type = "product";
|
|
|
- }else{
|
|
|
- rs = baseDao.queryForRowSet("select psl_prodcode,wm_concat(psl_repcode)repcode from productsmtlocation where psl_psid=? and psl_location=? and psl_table=? group by psl_prodcode",map.get("PS_ID"),location,map.get("DL_TABLE"));
|
|
|
- if(rs.next()){
|
|
|
- if(bar_code.toString().contains(rs.getString("psl_prodcode"))){
|
|
|
- pr_code = rs.getString("psl_prodcode");
|
|
|
- }else{
|
|
|
- String [] stringArr= rs.getString("repcode").split(",");
|
|
|
- for (String s : stringArr) {
|
|
|
- if (bar_code.toString().contains(s)) {
|
|
|
- pr_code = s;
|
|
|
- }
|
|
|
- }
|
|
|
- if(pr_code == null || ("").equals(pr_code)){
|
|
|
- showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
- }
|
|
|
- }
|
|
|
- rs = baseDao.queryForRowSet("select nvl(pr_zxbzs,0) pr_zxbzs from product where pr_code = ?",pr_code);
|
|
|
- if(rs.next()){
|
|
|
- bar_remain = rs.getDouble("pr_zxbzs");
|
|
|
- }
|
|
|
- }else{
|
|
|
- showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
}
|
|
|
|
|
|
* @author wuyx
|
|
@@ -829,35 +831,36 @@ public class PdaSMTServiceImpl implements PdaSMTService {
|
|
|
showSmtError(APIErrorCode.BUSINESS_FAILED,"料卷已被单据["+rs2.getString("bar_place")+"]使用",handleType,linecode,location,ps_prodcode,"料卷"+bar_code,bool,table);
|
|
|
}
|
|
|
}else{
|
|
|
- rs2 = baseDao.queryForRowSet("select psl_baseqty,psl_prodcode,psl_repcode,psl_feeder from productsmtlocation"
|
|
|
- +" where psl_psid =? and psl_location=? and psl_table=? and (psl_prodcode=? or psl_repcode=?)",map.get("PS_ID"),location,map.get("DL_TABLE"),bar_code,bar_code);
|
|
|
- if(rs2.next()){
|
|
|
- pr_code = (String) bar_code;
|
|
|
- type = "product";
|
|
|
- }else{
|
|
|
- rs = baseDao.queryForRowSet("select psl_prodcode,wm_concat(psl_repcode)repcode from productsmtlocation where psl_psid=? and psl_location=? and psl_table=? group by psl_prodcode",map.get("PS_ID"),location,map.get("DL_TABLE"));
|
|
|
- if(rs.next()){
|
|
|
- if(bar_code.toString().contains(rs.getString("psl_prodcode"))){
|
|
|
- pr_code = rs.getString("psl_prodcode");
|
|
|
- }else{
|
|
|
- String [] stringArr= rs.getString("repcode").split(",");
|
|
|
- for (String s : stringArr) {
|
|
|
- if (bar_code.toString().contains(s)) {
|
|
|
- pr_code = s;
|
|
|
- }
|
|
|
- }
|
|
|
- if(pr_code == null || ("").equals(pr_code)){
|
|
|
- showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
- }
|
|
|
- }
|
|
|
- rs = baseDao.queryForRowSet("select nvl(pr_zxbzs,0) pr_zxbzs from product where pr_code = ?",pr_code);
|
|
|
- if(rs.next()){
|
|
|
- bar_remain = rs.getDouble("pr_zxbzs");
|
|
|
- }
|
|
|
- }else{
|
|
|
- showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ showSmtError(APIErrorCode.DATA_NOT_FOUND,"物料["+bar_code+"]不是该站位需要上料的物料",handleType,linecode,location,ps_prodcode,"料号"+bar_code,bool,table);
|
|
|
}
|
|
|
|
|
|
* @author wuyx
|