opt:优化备货区管芯接口
This commit is contained in:
@@ -269,6 +269,9 @@ public class SlitterTaskUtil {
|
||||
String[] material_codes = new String[paperList.size()];
|
||||
String[] material_specs = new String[paperList.size()];
|
||||
int[] qtys = new int[paperList.size()];
|
||||
String[] material_codes1 = {null,null,null,null,null};
|
||||
String[] material_specs1 = {null,null,null,null,null};
|
||||
int[] qtys1 = {0,0,0,0,0};
|
||||
for (int i = 0; i < paperList.size(); i++) {
|
||||
MdPbPapervehicle vehicle = paperList.get(i);
|
||||
String materialCode = vehicle.getMaterial_code();
|
||||
@@ -282,14 +285,28 @@ public class SlitterTaskUtil {
|
||||
material_specs[i] = spec;
|
||||
qtys[i] = qty;
|
||||
}
|
||||
//新规格数据处理
|
||||
int row_num = Integer.parseInt(vehicle.getRow_num());
|
||||
String spec = getComposePaperTubeInformation(vehicle.getMaterial_name(), vehicle.getMaterial_code().startsWith("4") ? "1" : "2");
|
||||
material_codes1[row_num-1] = materialCode;
|
||||
material_specs1[row_num-1] = spec;
|
||||
qtys1[row_num-1] = qty;
|
||||
}
|
||||
// 转成String
|
||||
String[] qtysStr = Arrays.stream(qtys)
|
||||
.mapToObj(String::valueOf)
|
||||
.toArray(String[]::new);
|
||||
// 转成String
|
||||
String[] qtysStr1 = Arrays.stream(qtys1)
|
||||
.mapToObj(String::valueOf)
|
||||
.toArray(String[]::new);
|
||||
param.put("to_material", String.join(",", material_codes));
|
||||
param.put("to_spec", String.join(",", material_specs));
|
||||
param.put("to_qty", String.join(",", qtysStr));
|
||||
|
||||
param.put("to_material1", String.join(",", material_codes1));
|
||||
param.put("to_spec1", String.join(",", material_specs1));
|
||||
param.put("to_qty1", String.join(",", qtysStr1));
|
||||
param.put("device_code", material_specs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user