|
@@ -26,6 +26,7 @@ import com.qmth.teachcloud.common.enums.TaskResultEnum;
|
|
|
import com.qmth.teachcloud.common.enums.TaskStatusEnum;
|
|
|
import com.qmth.teachcloud.common.service.BasicAttachmentService;
|
|
|
import com.qmth.teachcloud.common.service.SysConfigService;
|
|
|
+import com.qmth.teachcloud.common.service.SysUserService;
|
|
|
import com.qmth.teachcloud.common.service.TeachcloudCommonService;
|
|
|
import com.qmth.teachcloud.common.sync.StmmsUtils;
|
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
@@ -56,9 +57,6 @@ public class DataSyncServiceImpl implements DataSyncService {
|
|
|
@Autowired
|
|
|
private TBSyncTaskService tbSyncTaskService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private DictionaryConfig dictionaryConfig;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ExamStudentService examStudentService;
|
|
|
|
|
@@ -80,6 +78,9 @@ public class DataSyncServiceImpl implements DataSyncService {
|
|
|
@Autowired
|
|
|
private BasicAttachmentService basicAttachmentService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysUserService sysUserService;
|
|
|
+
|
|
|
@Autowired
|
|
|
StmmsUtils stmmsUtils;
|
|
|
|
|
@@ -250,22 +251,6 @@ public class DataSyncServiceImpl implements DataSyncService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public Map<String, Object> markerLoginInfo() {
|
|
|
- SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- long time = System.currentTimeMillis();
|
|
|
- String rootUrl = dictionaryConfig.syncDataDomain().getHostUrl();
|
|
|
- String markLoginUrl = dictionaryConfig.syncDataDomain().getMarkLoginUrl();
|
|
|
- map.put("redirectUrl", rootUrl + markLoginUrl);
|
|
|
- String account = "M_" + sysUser.getLoginName();
|
|
|
- map.put("account", account);
|
|
|
- map.put("name", sysUser.getLoginName());
|
|
|
- map.put("time", time);
|
|
|
- map.put("authorization", stmmsUtils.createSign(time, markLoginUrl));
|
|
|
- return map;
|
|
|
- }
|
|
|
-
|
|
|
private TimerTask syncData(ExamPrintPlan examPrintPlan, Long thirdRelateId, String thirdRelateName) {
|
|
|
return new TimerTask() {
|
|
|
@Override
|
|
@@ -427,6 +412,27 @@ public class DataSyncServiceImpl implements DataSyncService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> markerLoginInfo() {
|
|
|
+ try {
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+
|
|
|
+ return stmmsUtils.markLogin(sysUser);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("评卷员登录失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> markerLeaderLoginInfo() {
|
|
|
+ try {
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+ return stmmsUtils.markLeaderLogin(sysUser);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("科组长登录失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private String getTempDir(SyncFileTypeEnum type) {
|
|
|
return SystemConstant.TEMP_FILES_DIR + File.separator + "upload-temp" + File.separator + type.name().toLowerCase() + File.separator + System.currentTimeMillis();
|
|
|
}
|