|
@@ -1,13 +1,12 @@
|
|
|
package com.ims.eval.component;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ims.eval.entity.DeptAssessmentDeclaration;
|
|
|
import com.ims.eval.service.IDeptAssessmentDeclarationService;
|
|
|
import com.ims.idms.modules.sys.entity.SysUser;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -20,7 +19,7 @@ import java.util.List;
|
|
|
@Slf4j
|
|
|
public class NextApproverImpl {
|
|
|
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private IDeptAssessmentDeclarationService deptAssessmentDeclarationService;
|
|
|
|
|
|
/**
|
|
@@ -30,20 +29,16 @@ public class NextApproverImpl {
|
|
|
*/
|
|
|
public List<SysUser> submitTask1(String id, String a2, String a3) {
|
|
|
List<SysUser> userList = null;
|
|
|
- log.info("用户1 ID"+id);
|
|
|
try {
|
|
|
userList = new ArrayList<>();
|
|
|
DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
|
- if (null != deptAssessmentDeclaration){
|
|
|
+ if (null != deptAssessmentDeclaration) {
|
|
|
SysUser user = new SysUser();
|
|
|
user.setId(deptAssessmentDeclaration.getDeptLeaderId());
|
|
|
user.setNo(deptAssessmentDeclaration.getDeptLeaderNo());
|
|
|
user.setName(deptAssessmentDeclaration.getDeptLeaderName());
|
|
|
userList.add(user);
|
|
|
}
|
|
|
- String listJSONString = JSONObject.toJSONString(userList);
|
|
|
- log.info("用户1 list"+listJSONString);
|
|
|
-
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -56,19 +51,20 @@ public class NextApproverImpl {
|
|
|
* @return 结果
|
|
|
*/
|
|
|
public List<SysUser> submitTask2(String id, String a2, String a3) {
|
|
|
- log.info("用户2 ID"+id);
|
|
|
- List<SysUser> userList = new ArrayList<>();
|
|
|
- DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
|
- if (null != deptAssessmentDeclaration){
|
|
|
- SysUser user = new SysUser();
|
|
|
- user.setId(deptAssessmentDeclaration.getSeconderId());
|
|
|
- user.setNo(deptAssessmentDeclaration.getSeconderNo());
|
|
|
- user.setName(deptAssessmentDeclaration.getSeconderName());
|
|
|
- userList.add(user);
|
|
|
- System.out.println("用户数量2;id="+user.getId());
|
|
|
+ List<SysUser> userList = null;
|
|
|
+ try {
|
|
|
+ userList = new ArrayList<>();
|
|
|
+ DeptAssessmentDeclaration deptAssessmentDeclaration = deptAssessmentDeclarationService.getById(id);
|
|
|
+ if (null != deptAssessmentDeclaration) {
|
|
|
+ SysUser user = new SysUser();
|
|
|
+ user.setId(deptAssessmentDeclaration.getSeconderId());
|
|
|
+ user.setNo(deptAssessmentDeclaration.getSeconderNo());
|
|
|
+ user.setName(deptAssessmentDeclaration.getSeconderName());
|
|
|
+ userList.add(user);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- String listJSONString = JSONObject.toJSONString(userList);
|
|
|
- log.info("用户2 list"+listJSONString);
|
|
|
return userList;
|
|
|
}
|
|
|
}
|