wip:PLM匹配,生成替换关系
This commit is contained in:
parent
c8cda50b5b
commit
1e074f37ae
@ -8,6 +8,7 @@ import kd.bos.exception.KDException;
|
||||
import kd.bos.schedule.executor.AbstractTask;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.yem.em.task.MatchingPLMChangeUpdateTaskEdit.queryPLMChange;
|
||||
@ -32,7 +33,9 @@ public class GenerateReplaceRelationshipTaskEdit extends AbstractTask {
|
||||
DynamicObjectCollection collection = plmObj.getDynamicObjectCollection("yem_change_detail");
|
||||
DynamicObjectCollection enabled = new DynamicObjectCollection();
|
||||
for (DynamicObject plm : collection) {
|
||||
Date starttime = plm.getDate("yem_starttime");
|
||||
// if (替换件启用停用状态 = "启用") {}
|
||||
|
||||
enabled.add(plm);
|
||||
}
|
||||
DynamicObject bomChange = createBOMChange(plmObj, enabled);
|
||||
|
@ -12,6 +12,7 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -54,10 +55,16 @@ public class MatchingPLMChangeUpdateTaskEdit extends AbstractTask {
|
||||
if (eq(plm_billno, bom_billno) && eq(plm_parent, bom_parent) && eq(plm_child, bom_child) && eq(plm_qty, bom_qty)) {
|
||||
String enablesta = bom.getString("yem_enablesta");//启用停用状态
|
||||
if ("A".equals(enablesta)) {//启用
|
||||
|
||||
Date starttime = plm.getDate("yem_starttime");
|
||||
if (starttime == null) {
|
||||
plm.set("yem_starttime", new Date());
|
||||
}
|
||||
}
|
||||
if ("B".equals(enablesta)) {//停用
|
||||
|
||||
Date stoptime = plm.getDate("yem_stoptime");
|
||||
if (stoptime == null) {
|
||||
plm.set("yem_stoptime", new Date());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user