27 lines
939 B
Groovy
27 lines
939 B
Groovy
//import com.alibaba.fastjson.JSONObject
|
|
//
|
|
//def getPoints(List<PdmBiDevice> devices, Map<String, List<PdmBiDevice>> materialCollent, Double inupperlimitQty){
|
|
//
|
|
// PdmBiDevice device = devices.get(0)
|
|
// String materialId = device.getMaterial_id();
|
|
// List<PdmBiDevice> collect = materialCollent.get(materialId);
|
|
// Double qty = 0.0;
|
|
// def list = new ArrayList<>();
|
|
// for (PdmBiDevice o1 : collect) {
|
|
// if (qty>inupperlimitQty){
|
|
// return list;
|
|
// }
|
|
// def item = new JSONObject()
|
|
// item.put("device_code",o1.getDevice_code())
|
|
// item.put("qty",o1.getDeviceinstor_qty());
|
|
// item.put("weight",o1.getDeviceinstor_weight().doubleValue());
|
|
// item.put("material_id",materialId);
|
|
// list.add(item);
|
|
// if (o1.getIs_artificial()){
|
|
// return list;
|
|
// }
|
|
// qty = qty+o1.getDeviceinstor_qty();
|
|
// }
|
|
// return list;
|
|
//}
|