rev 分页、下发plc两次

This commit is contained in:
2023-06-13 09:39:26 +08:00
parent 531f9780e1
commit afe0866aed
5 changed files with 17 additions and 16 deletions

View File

@@ -128,12 +128,12 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
return true;
})
.sorted((inst1, inst2) -> (inst1.getInstruction_code().compareTo(inst2.getInstruction_code())))
.skip((currentPageNumber - 1) * pageMaxSize)
.limit(pageMaxSize)
.collect(Collectors.toList());
List<Instruction> skipList = instructionList.stream().skip((currentPageNumber - 1) * pageMaxSize)
.limit(pageMaxSize).collect(Collectors.toList());
JSONObject jo = new JSONObject();
jo.put("content", instructionList);
jo.put("totalElements", this.instructions.size());
jo.put("content", skipList);
jo.put("totalElements", instructionList.size());
return jo;
}

View File

@@ -40,7 +40,7 @@ public class OpcUtl {
Map<Item, Integer> e=null;
try{
e=group.write(requests);
group.write(requests);
//group.write(requests);
}catch (Exception e1){
try{
e= group.write(requests);

View File

@@ -116,9 +116,12 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
.skip((currentPageNumber - 1) * pageMaxSize)
.limit(pageMaxSize)
.collect(Collectors.toList());
List<ProduceshiftorderDto> skipList = orderList.stream().skip((currentPageNumber - 1) * pageMaxSize)
.limit(pageMaxSize)
.collect(Collectors.toList());
JSONObject jo = new JSONObject();
jo.put("content", orderList);
jo.put("totalElements", this.order.size());
jo.put("content", skipList);
jo.put("totalElements", orderList.size());
return jo;
}
@@ -147,7 +150,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
@Override
public ProduceshiftorderDto findByCode(String code) {
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)) {
return null;
}
@@ -450,7 +453,6 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
}
@Override
public void addDeviceIsOnline(String device_code, ProduceshiftorderDto dto) {
WQLObject wo = WQLObject.getWQLObject("acs_deviceisonline");

View File

@@ -171,12 +171,13 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
return true;
})
.sorted((task1, task2) -> DateUtil.compare(DateUtil.parseDate(task1.getCreate_time()), DateUtil.parse(task2.getCreate_time())))
.skip((currentPageNumber - 1) * pageMaxSize)
.limit(pageMaxSize)
.collect(Collectors.toList());
List<TaskDto> skipList = taskList.stream().skip((currentPageNumber - 1) * pageMaxSize)
.limit(pageMaxSize)
.collect(Collectors.toList());
JSONObject jo = new JSONObject();
jo.put("content", taskList);
jo.put("totalElements", this.tasks.size());
jo.put("content", skipList);
jo.put("totalElements", taskList.size());
return jo;
}

View File

@@ -107,9 +107,7 @@ IF 输入.flag = "2"
OR
task.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%')
OR
task.start_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%' )
OR
task.next_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%')
task.put_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
)
ENDOPTION
OPTION 输入.create_time <> ""