From b431c00a3e736e27599cd34793c65369fdb7b8cd Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 04 Jan 2024 15:50:50 +0800
Subject: [PATCH] 模拟成绩查询修改
---
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java | 45 +++++++++++++++++++++++++--------------------
1 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java b/src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java
index a55d7bb..02c434d 100644
--- a/src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java
+++ b/src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java
@@ -21,18 +21,16 @@
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
-
import javax.validation.Valid;
-
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.FTP.FtpUtil;
import org.springblade.modules.dispatcher.entity.DispatcherUnit;
import org.springblade.modules.dispatcher.service.IDispatcherUnitService;
+import org.springblade.modules.dispatcher.vo.DispatcherStatistics;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.system.service.MyAsyncService;
@@ -165,7 +163,7 @@
"update blade_user set dispatch = " + "'" + user.getDispatch() + "'" +
" " + "where id = " + "'" + user.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
return R.status(status);
}
@@ -205,8 +203,7 @@
"'" + dispatcher.getStatus() + "'" + ");" +
"update blade_user set dispatch = " + "'" + user.getDispatch() + "'" +
" " + "where id = " + "'" + user.getId() + "'";
- //FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
dispatcher.setUpdateTime(new Date());
@@ -255,7 +252,7 @@
"update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" +
" " + "where id = " + "'" + user1.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
//没有修改保安员,只修改了派遣时间等信息
@@ -274,7 +271,7 @@
",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
" " + "where id = " + "'" + dispatcher.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
}
}
@@ -336,8 +333,7 @@
"'" + dispatcher.getStatus() + "'" + ");" +
"update blade_user set dispatch = " + "'" + user.getDispatch() + "'" +
" " + "where id = " + "'" + user.getId() + "'";
- //FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
User user = new User();
@@ -363,7 +359,7 @@
"update blade_user set dispatch = " + "'" + user.getDispatch() + "'" +
" " + "where id = " + "'" + user.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
User user = new User();
@@ -388,8 +384,7 @@
"'" + dispatcher.getStatus() + "'" + ");" +
"update blade_user set dispatch = " + "'" + user.getDispatch() + "'" +
" " + "where id = " + "'" + user.getId() + "'";
- //FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
});
@@ -466,7 +461,7 @@
"update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" +
" " + "where id = " + "'" + user1.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
//修改原保安人员的派遣状态
@@ -511,7 +506,7 @@
"update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" +
" " + "where id = " + "'" + user1.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
//修改原保安人员的派遣状态
@@ -556,7 +551,7 @@
"update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" +
" " + "where id = " + "'" + user1.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
if (null != dispatcherUnit.getDistrict() && !dispatcherUnit.getDistrict().equals("") && !dispatcherUnit.getDistrict().equals(-1)) {
@@ -585,7 +580,7 @@
",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
" " + "where id = " + "'" + dispatcher.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
//没有修改保安员,只修改了派遣时间等信息
@@ -604,7 +599,7 @@
",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
" " + "where id = " + "'" + dispatcher.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
} else {
//没有修改保安员,只修改了派遣时间等信息
@@ -623,7 +618,7 @@
",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
" " + "where id = " + "'" + dispatcher.getId() + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
}
}
return R.status(status);
@@ -643,10 +638,20 @@
//内网同步
String s1 = "delete from sys_dispatcher where id = " + "'" + id + "'";
//FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
+ myAsyncService.dataSync(s1);
});
return R.status(dispatcherService.removeByIds(Func.toLongList(ids)));
}
+ /**
+ * 派遣服务单位统计
+ * @return
+ */
+ @GetMapping("/getStatistics")
+ public R getStatistics(DispatcherStatistics dispatcherStatistics){
+ List<DispatcherStatistics> list = dispatcherService.getDispatcherStatisticsList(dispatcherStatistics);
+ return R.data(list);
+ }
+
}
--
Gitblit v1.9.3