备料计划优化

This commit is contained in:
lihao 2025-09-21 19:35:05 +08:00
parent d9d35919a7
commit e76a4f94f4
1 changed files with 7 additions and 4 deletions

View File

@ -220,8 +220,12 @@ public class PickmToBuyingreqAction implements ICommonAction {
continue;
}
}
// 是否转为通用件若为Y不下达请购单
if(null != child.getAttributeValue("vbdef29") && child.getAttributeValue("vbdef29").equals("Y") ){
// 是否转为通用件若为Y不下达请购单
BaseDAO dao = new BaseDAO();
String mrlsql = " select def29 from bd_material where pk_material='" + child.getCbmaterialvid() + "' and dr=0";
String isCommon = (String) dao.executeQuery(mrlsql, new ColumnProcessor());
if(null != isCommon && isCommon.equals("Y") ){
continue;
}
@ -231,7 +235,7 @@ public class PickmToBuyingreqAction implements ICommonAction {
if(!isFromBid) { // 核心修改增加isFromBid判断
if(null == materalType){
String sql = " select cmaterialvid from mm_pickm where cpickmid='" + child.getCpickmid() + "' and dr=0";
BaseDAO dao = new BaseDAO();
String hmateral = (String) dao.executeQuery(sql, new ColumnProcessor());
sql="SELECT bd_defdoc.code FROM bd_bom_b " +
@ -273,7 +277,6 @@ public class PickmToBuyingreqAction implements ICommonAction {
}
}else {
String sql="SELECT bd_defdoc.code FROM bd_defdoc where 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; // 制造件或未知类型过滤