rev 分页、下发plc两次
This commit is contained in:
@@ -128,12 +128,12 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.sorted((inst1, inst2) -> (inst1.getInstruction_code().compareTo(inst2.getInstruction_code())))
|
.sorted((inst1, inst2) -> (inst1.getInstruction_code().compareTo(inst2.getInstruction_code())))
|
||||||
.skip((currentPageNumber - 1) * pageMaxSize)
|
|
||||||
.limit(pageMaxSize)
|
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
List<Instruction> skipList = instructionList.stream().skip((currentPageNumber - 1) * pageMaxSize)
|
||||||
|
.limit(pageMaxSize).collect(Collectors.toList());
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("content", instructionList);
|
jo.put("content", skipList);
|
||||||
jo.put("totalElements", this.instructions.size());
|
jo.put("totalElements", instructionList.size());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class OpcUtl {
|
|||||||
Map<Item, Integer> e=null;
|
Map<Item, Integer> e=null;
|
||||||
try{
|
try{
|
||||||
e=group.write(requests);
|
e=group.write(requests);
|
||||||
group.write(requests);
|
//group.write(requests);
|
||||||
}catch (Exception e1){
|
}catch (Exception e1){
|
||||||
try{
|
try{
|
||||||
e= group.write(requests);
|
e= group.write(requests);
|
||||||
|
|||||||
@@ -116,9 +116,12 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
.skip((currentPageNumber - 1) * pageMaxSize)
|
.skip((currentPageNumber - 1) * pageMaxSize)
|
||||||
.limit(pageMaxSize)
|
.limit(pageMaxSize)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
List<ProduceshiftorderDto> skipList = orderList.stream().skip((currentPageNumber - 1) * pageMaxSize)
|
||||||
|
.limit(pageMaxSize)
|
||||||
|
.collect(Collectors.toList());
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("content", orderList);
|
jo.put("content", skipList);
|
||||||
jo.put("totalElements", this.order.size());
|
jo.put("totalElements", orderList.size());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +150,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
@Override
|
@Override
|
||||||
public ProduceshiftorderDto findByCode(String code) {
|
public ProduceshiftorderDto findByCode(String code) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
|
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
|
||||||
JSONObject json = wo.query("order_code ='" + code + "' and is_deleted = '0'","create_time").uniqueResult(0);
|
JSONObject json = wo.query("order_code ='" + code + "' and is_deleted = '0'", "create_time").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(json)) {
|
if (ObjectUtil.isEmpty(json)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -450,7 +453,6 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addDeviceIsOnline(String device_code, ProduceshiftorderDto dto) {
|
public void addDeviceIsOnline(String device_code, ProduceshiftorderDto dto) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_deviceisonline");
|
WQLObject wo = WQLObject.getWQLObject("acs_deviceisonline");
|
||||||
|
|||||||
@@ -171,12 +171,13 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.sorted((task1, task2) -> DateUtil.compare(DateUtil.parseDate(task1.getCreate_time()), DateUtil.parse(task2.getCreate_time())))
|
.sorted((task1, task2) -> DateUtil.compare(DateUtil.parseDate(task1.getCreate_time()), DateUtil.parse(task2.getCreate_time())))
|
||||||
.skip((currentPageNumber - 1) * pageMaxSize)
|
|
||||||
.limit(pageMaxSize)
|
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
List<TaskDto> skipList = taskList.stream().skip((currentPageNumber - 1) * pageMaxSize)
|
||||||
|
.limit(pageMaxSize)
|
||||||
|
.collect(Collectors.toList());
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("content", taskList);
|
jo.put("content", skipList);
|
||||||
jo.put("totalElements", this.tasks.size());
|
jo.put("totalElements", taskList.size());
|
||||||
return jo;
|
return jo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,9 +107,7 @@ IF 输入.flag = "2"
|
|||||||
OR
|
OR
|
||||||
task.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%')
|
task.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%')
|
||||||
OR
|
OR
|
||||||
task.start_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%' )
|
task.put_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
OR
|
|
||||||
task.next_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%')
|
|
||||||
)
|
)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.create_time <> ""
|
OPTION 输入.create_time <> ""
|
||||||
|
|||||||
Reference in New Issue
Block a user