fix:
1.订舱通知单,发运明细单 获取整机信息功能增加
This commit is contained in:
parent
25ac523502
commit
0fe98ca955
@ -1,7 +1,9 @@
|
||||
package com.yem.wm.es.storagetrans.form;
|
||||
|
||||
import com.yem.or.utils.OrderApiUtils;
|
||||
import com.yem.wm.es.Util.PlanJobCMMP;
|
||||
import com.yem.wm.es.Util.TotalUtil;
|
||||
import com.yem.wm.es.Util.ViewInterfaceDocking;
|
||||
import com.yem.wm.es.Util.ZJUtils;
|
||||
import com.yem.wm.es.contactbook.op.ContactBookSaveOp;
|
||||
import com.yem.wm.es.salesorder.utils.SalesOrderUtils;
|
||||
@ -645,8 +647,56 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
|
||||
DynamicObject dataEntity = model.getDataEntity(true);
|
||||
IFormView view = this.getView();
|
||||
if (operateKey.equals("getmachine")) {
|
||||
ZJUtils.renewMachineProductInfo(view, model);
|
||||
// ZJUtils.renewMachineProductInfo(view, model);
|
||||
// renewMachineProductInfo();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
Set<String> resourcesCodeSet = new HashSet();
|
||||
Set<String> vehicleNoSet = new HashSet();
|
||||
int machineProductInfoRows = model.getEntryRowCount("yem_es_salesorder_z");
|
||||
for (int i = 0; i < machineProductInfoRows; i++) {
|
||||
DynamicObject resourcesCode = (DynamicObject) model.getValue("yem_resourcescode", i);
|
||||
if (YEM.isNotEmpty(resourcesCode)) {
|
||||
resourcesCodeSet.add(resourcesCode.getString("number"));
|
||||
}
|
||||
String vehicleNo = (String) model.getValue("yem_vehicleno", i);
|
||||
vehicleNoSet.add(vehicleNo);
|
||||
}
|
||||
if (resourcesCodeSet.size() > 0) {
|
||||
map.put(PlanJobCMMP.productCode, resourcesCodeSet);
|
||||
}
|
||||
if (vehicleNoSet.size() > 0) {
|
||||
map.put(PlanJobCMMP.planPin, vehicleNoSet);
|
||||
}
|
||||
int rowIndex = this.getModel().getEntryCurrentRowIndex("yem_es_materialinfo");
|
||||
long productsid = this.getModel().getEntryEntity("yem_es_materialinfo").get(rowIndex).getDynamicObject("yem_products").getLong("id");
|
||||
List<Map> dockings = ViewInterfaceDocking.docking(ViewInterfaceDocking.PLAN_JOB, map, productsid);
|
||||
|
||||
if (YEM.isNotEmpty(dockings)) {
|
||||
dockings.sort(new Comparator<Map>() {
|
||||
@Override
|
||||
public int compare(Map o1, Map o2) {
|
||||
Date date1 = (Date) o1.get(PlanJobCMMP.jobTime);
|
||||
Date date2 = (Date) o1.get(PlanJobCMMP.jobTime);
|
||||
return date1.compareTo(date2);
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < machineProductInfoRows; i++) {
|
||||
DynamicObject resourcesCodeObj = (DynamicObject) model.getValue("yem_resourcescode", i);
|
||||
String resourcesCode = YEM.isNotEmpty(resourcesCodeObj) ? resourcesCodeObj.getString("number") : "";
|
||||
String vehicleNo = (String) model.getValue("yem_vehicleno", i);
|
||||
for (Map docking : dockings) {
|
||||
String planPin = (String) docking.get(PlanJobCMMP.planPin);
|
||||
String productCode = (String) docking.get(PlanJobCMMP.productCode);
|
||||
if (resourcesCode.equals(productCode) && vehicleNo.equals(planPin)) {
|
||||
model.setValue("yem_engineno", docking.get(PlanJobCMMP.stockBatch), i);//发动机号
|
||||
model.setValue("yem_enginemodel", docking.get(PlanJobCMMP.specification), i);//发动机型号
|
||||
model.setValue("yem_enginevendor", docking.get(PlanJobCMMP.supName), i);//发动机厂商
|
||||
ZJUtils.setInstructionValue(model, docking, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
view.invokeOperation("save");
|
||||
}
|
||||
if ("draw".equals(operateKey)) {
|
||||
String creditbackstatus = dataEntity.getString("yem_creditbackstatus");
|
||||
|
Loading…
Reference in New Issue
Block a user