|
@@ -1071,15 +1071,31 @@ public class SyPackingListFabricController implements Job {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void execute(JobExecutionContext context) throws JobExecutionException {
|
|
public void execute(JobExecutionContext context) throws JobExecutionException {
|
|
- QueryWrapper queryWrapper=new QueryWrapper();
|
|
|
|
- queryWrapper.eq("push_State","3");//推送中
|
|
|
|
- queryWrapper.or();
|
|
|
|
- queryWrapper.like("recording_Error","超时");//超时
|
|
|
|
|
|
+
|
|
|
|
+ QueryWrapper<SyPackingListFabric> queryWrapper=new QueryWrapper();
|
|
|
|
+ queryWrapper.nested(i->i.ne("recording_Status","1").nested(s->s.eq("push_State","3").or().eq("recording_Error","超时"))) ;//推送中
|
|
|
|
+ //queryWrapper.or();
|
|
|
|
+ //queryWrapper.like();//超时
|
|
List<SyPackingListFabric> syPackingListFabrics=syPackingListFabricService.list(queryWrapper);//修改调整
|
|
List<SyPackingListFabric> syPackingListFabrics=syPackingListFabricService.list(queryWrapper);//修改调整
|
|
|
|
+
|
|
|
|
+ List<String> ids=new ArrayList<>();
|
|
|
|
+ for (SyPackingListFabric syPackingListFabric : syPackingListFabrics){
|
|
|
|
+ ids.add(syPackingListFabric.getId());
|
|
|
|
+ }
|
|
|
|
+ // RedisUtil redisUtil
|
|
|
|
+
|
|
|
|
+ if(syPackingListFabrics.size()<=0){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ UpdateWrapper updateWrapper=new UpdateWrapper();
|
|
|
|
+ updateWrapper.set("recording_Status",1);//推送中
|
|
|
|
+ updateWrapper.in("id",ids);
|
|
|
|
+ syPackingListFabricService.update(updateWrapper);
|
|
|
|
+
|
|
String message2="";
|
|
String message2="";
|
|
for (int i=0; i<syPackingListFabrics.size();i++){
|
|
for (int i=0; i<syPackingListFabrics.size();i++){
|
|
try {
|
|
try {
|
|
- String id=syPackingListFabrics.get(0).getId();
|
|
|
|
|
|
+ String id=syPackingListFabrics.get(i).getId();
|
|
Map<String,Object> map=new HashMap<>();
|
|
Map<String,Object> map=new HashMap<>();
|
|
SyPackingListFabric main=syPackingListFabricService.getById(id);
|
|
SyPackingListFabric main=syPackingListFabricService.getById(id);
|
|
if(main.getIsReference()==0){
|
|
if(main.getIsReference()==0){
|
|
@@ -1209,7 +1225,7 @@ public class SyPackingListFabricController implements Job {
|
|
}
|
|
}
|
|
UpdateWrapper updateWrapper=new UpdateWrapper();
|
|
UpdateWrapper updateWrapper=new UpdateWrapper();
|
|
updateWrapper.set("push_State","3");
|
|
updateWrapper.set("push_State","3");
|
|
- updateWrapper.set("recording_Status",1);//推送中
|
|
|
|
|
|
+ //updateWrapper.set("recording_Status",1);//推送中
|
|
updateWrapper.ne("push_State","4");//不等于4
|
|
updateWrapper.ne("push_State","4");//不等于4
|
|
updateWrapper.in("id",ids);
|
|
updateWrapper.in("id",ids);
|
|
syPackingListFabricService.update(updateWrapper);
|
|
syPackingListFabricService.update(updateWrapper);
|