This commit is contained in:
lihao 2025-08-21 16:40:34 +08:00
parent 117812ed26
commit 5596bef445
2 changed files with 24 additions and 9 deletions

View File

@ -198,18 +198,31 @@ public class PickmToBuyingreqAction implements ICommonAction {
// PR=采购件;
if(null != bomcode && "2".equals(bomcode) ){
sql = " select martype from bd_materialstock where pk_material='" + child.getCbmaterialvid() + "' and pk_org='"+child.getPk_org()+"' and dr=0";
String matType = (String) dao.executeQuery(sql, new ColumnProcessor());
if(null == matType || "PR".equals(matType) || "".equals(matType)){
continue;
}
// sql = " select martype from bd_materialstock where pk_material='" + child.getCbmaterialvid() + "' and pk_org='"+child.getPk_org()+"' and dr=0";
// String matType = (String) dao.executeQuery(sql, new ColumnProcessor());
// if(null == matType || "MR".equals(matType) || "".equals(matType)){
// continue;
// }
}else if(null != bomcode && "1".equals(bomcode)){
continue;
}else{
sql = " select martype from bd_materialstock where pk_material='" + child.getCbmaterialvid() + "' and pk_org='"+child.getPk_org()+"' and dr=0";
String matType = (String) dao.executeQuery(sql, new ColumnProcessor());
if(null == matType || "MR".equals(matType) || "".equals(matType)){
continue;
}
}
}else {
String sql="SELECT\n" +
"\n" +
" bd_defdoc.code \n" +
"FROM\n" +
" bd_defdoc where bd_defdoc.bd_defdoc.pk_defdoc='" + materalType + "'";
BaseDAO dao = new BaseDAO();
String bomcode = (String) dao.executeQuery(sql, new ColumnProcessor());
if(null == bomcode || "1".equals(bomcode) || "".equals(bomcode) ){
continue;
}
}else if("2".equals(materalType)){
continue;
}
//只合并项目专用料数据
if(child.getBprojectmaterial().booleanValue()){

View File

@ -245,13 +245,15 @@ public class PickmToPmo implements ICommonAction {
// PR=²É¹º¼þ;
if(null != bomcode && "1".equals(bomcode) ){
}else if(null != bomcode && "2".equals(bomcode)){
continue;
}else{
sql = " select martype from bd_materialstock where pk_material='" + child.getCbmaterialvid() + "' and pk_org='"+child.getPk_org()+"' and dr=0";
String matType = (String) dao.executeQuery(sql, new ColumnProcessor());
if(null == matType || "PR".equals(matType) || "".equals(matType)){
continue;
}
}else if(null != bomcode && "2".equals(bomcode)){
continue;
}
}else {
String sql="SELECT\n" +