|
@@ -28,11 +28,13 @@ import com.winsea.svc.notice.service.INoticeNewsService;
|
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
|
import com.yh.saas.common.support.util.StringUtils;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.ImageCensorConsts;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonReviewComments;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.NewWorkflowStep;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.UnimallMessage;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.view.UserDefinedBean;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonReviewCommentsService;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.ICommonUserService;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.INewWorkflowService;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.util.*;
|
|
@@ -84,6 +86,8 @@ public class CommonUserController {
|
|
|
private INewWorkflowService workflowService;
|
|
|
@Autowired
|
|
|
private ICommonCompanyService companyService;
|
|
|
+ @Autowired
|
|
|
+ private ICommonReviewCommentsService commonReviewCommentsService;
|
|
|
|
|
|
/**
|
|
|
* 图像审核识别Demo
|
|
@@ -185,26 +189,26 @@ public class CommonUserController {
|
|
|
public List<NewWorkflowStep> getHis(String businessKey, String workflowId, String branch) throws ServiceException {
|
|
|
List<WorkflowHistoricTask> workflowHistoricTasks = workflowHistoryService.getInstanceHistories(businessKey);
|
|
|
boolean skipFlag = true;
|
|
|
- if(!CollectionUtils.isEmpty(workflowHistoricTasks)){
|
|
|
+ if (!CollectionUtils.isEmpty(workflowHistoricTasks)) {
|
|
|
List<WorkflowHistoricTask> workflowHistoricTasks1 = new ArrayList<>(workflowHistoricTasks);
|
|
|
Date time = null;
|
|
|
- for(int i=0;i<workflowHistoricTasks.size();i++){
|
|
|
- for(int x=0;x<workflowHistoricTasks1.size();x++){
|
|
|
- if(workflowHistoricTasks.get(i).getTaskName().equals(workflowHistoricTasks.get(x).getTaskName())
|
|
|
- &&workflowHistoricTasks.get(i).getClaimTime().before(workflowHistoricTasks.get(x).getClaimTime())){
|
|
|
+ for (int i = 0; i < workflowHistoricTasks.size(); i++) {
|
|
|
+ for (int x = 0; x < workflowHistoricTasks1.size(); x++) {
|
|
|
+ if (workflowHistoricTasks.get(i).getTaskName().equals(workflowHistoricTasks.get(x).getTaskName())
|
|
|
+ && workflowHistoricTasks.get(i).getClaimTime().before(workflowHistoricTasks.get(x).getClaimTime())) {
|
|
|
time = workflowHistoricTasks.get(x).getClaimTime();
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- if("e6372d40b2904ed7a5de3585038d747e".equals(workflowHistoricTasks.get(i).getOperatorId())||
|
|
|
- "b96299bb5dcf461e916b72b64c6943b0".equals(workflowHistoricTasks.get(i).getOperatorId())){
|
|
|
+ if ("e6372d40b2904ed7a5de3585038d747e".equals(workflowHistoricTasks.get(i).getOperatorId()) ||
|
|
|
+ "b96299bb5dcf461e916b72b64c6943b0".equals(workflowHistoricTasks.get(i).getOperatorId())) {
|
|
|
skipFlag = false;
|
|
|
}
|
|
|
}
|
|
|
- if(time != null){
|
|
|
- for(int i=0;i<workflowHistoricTasks.size();i++){
|
|
|
- if(workflowHistoricTasks.get(i).getClaimTime().before(time)){
|
|
|
+ if (time != null) {
|
|
|
+ for (int i = 0; i < workflowHistoricTasks.size(); i++) {
|
|
|
+ if (workflowHistoricTasks.get(i).getClaimTime().before(time)) {
|
|
|
workflowHistoricTasks.remove(i);
|
|
|
}
|
|
|
}
|
|
@@ -221,22 +225,22 @@ public class CommonUserController {
|
|
|
for (int i = 0; i < workflowSteps.size(); i++) {
|
|
|
if (!StringUtils.isEmpty(branch)) {
|
|
|
if ("zt".equals(branch)) {
|
|
|
- if (workflowSteps.get(i).getBranchNodeLocation()!= null
|
|
|
- &&"BEGIN".equals(workflowSteps.get(i).getBranchNodeLocation().name())
|
|
|
+ if (workflowSteps.get(i).getBranchNodeLocation() != null
|
|
|
+ && "BEGIN".equals(workflowSteps.get(i).getBranchNodeLocation().name())
|
|
|
&& !StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())
|
|
|
- &&workflowSteps.get(i).getBranchExpression().contains("!=")) {
|
|
|
+ && workflowSteps.get(i).getBranchExpression().contains("!=")) {
|
|
|
biaoshi = 1;
|
|
|
}
|
|
|
- if(biaoshi ==1){
|
|
|
+ if (biaoshi == 1) {
|
|
|
//去除内勤审核的显示 (暂行)
|
|
|
- if(workflowSteps.get(i).getAuditRoles() != null
|
|
|
- &&workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")
|
|
|
- &&skipFlag){
|
|
|
+ if (workflowSteps.get(i).getAuditRoles() != null
|
|
|
+ && workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")
|
|
|
+ && skipFlag) {
|
|
|
continue;
|
|
|
}
|
|
|
- if(workflowSteps.get(i).getAuditUsers() != null
|
|
|
- &&workflowSteps.get(i).getAuditUsers().equals("e6372d40b2904ed7a5de3585038d747e")
|
|
|
- &&skipFlag){
|
|
|
+ if (workflowSteps.get(i).getAuditUsers() != null
|
|
|
+ && workflowSteps.get(i).getAuditUsers().equals("e6372d40b2904ed7a5de3585038d747e")
|
|
|
+ && skipFlag) {
|
|
|
continue;
|
|
|
}
|
|
|
NewWorkflowStep newWorkflowStep = new NewWorkflowStep();
|
|
@@ -266,23 +270,30 @@ public class CommonUserController {
|
|
|
|
|
|
}
|
|
|
newWorkflowStep.setCommonStaffs(commonStaffs);
|
|
|
+
|
|
|
}
|
|
|
- if(!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())){
|
|
|
+ if (!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())) {
|
|
|
+ List<CommonReviewComments> commonReviewComments = commonReviewCommentsService.selectList(new EntityWrapper<CommonReviewComments>()
|
|
|
+ .eq("his_id", businessKey)
|
|
|
+ .eq("create_user_id",newWorkflowStep.getAuditUsers())
|
|
|
+ .orderBy("create_date", true));
|
|
|
+ newWorkflowStep.setCommonReviewComments(commonReviewComments);
|
|
|
+ newWorkflowStep.setId(businessKey);
|
|
|
newWorkflowSteps.add(newWorkflowStep);
|
|
|
}
|
|
|
}
|
|
|
- if(workflowSteps.get(i).getBranchNodeLocation()!= null
|
|
|
- &&"END".equals(workflowSteps.get(i).getBranchNodeLocation().name())
|
|
|
+ if (workflowSteps.get(i).getBranchNodeLocation() != null
|
|
|
+ && "END".equals(workflowSteps.get(i).getBranchNodeLocation().name())
|
|
|
&& !StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())
|
|
|
- &&workflowSteps.get(i).getBranchExpression().contains("!=")){
|
|
|
+ && workflowSteps.get(i).getBranchExpression().contains("!=")) {
|
|
|
|
|
|
biaoshi = 0;
|
|
|
}
|
|
|
}
|
|
|
- if (!StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())&&workflowSteps.get(i).getBranchExpression().contains(branch)) {
|
|
|
+ if (!StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression()) && workflowSteps.get(i).getBranchExpression().contains(branch)) {
|
|
|
if (flag == 0) {
|
|
|
|
|
|
- if(i != workflowSteps.size()-1){
|
|
|
+ if (i != workflowSteps.size() - 1) {
|
|
|
workflowSteps.get(i + 1).setBranchExpression(workflowSteps.get(i).getBranchExpression());
|
|
|
}
|
|
|
|
|
@@ -314,18 +325,24 @@ public class CommonUserController {
|
|
|
}
|
|
|
newWorkflowStep.setCommonStaffs(commonStaffs);
|
|
|
}
|
|
|
- if(!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())){
|
|
|
- if(workflowSteps.get(i).getAuditRoles() != null
|
|
|
- &&workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")){
|
|
|
+ if (!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())) {
|
|
|
+ if (workflowSteps.get(i).getAuditRoles() != null
|
|
|
+ && workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")) {
|
|
|
continue;
|
|
|
}
|
|
|
+ List<CommonReviewComments> commonReviewComments = commonReviewCommentsService.selectList(new EntityWrapper<CommonReviewComments>()
|
|
|
+ .eq("his_id", businessKey)
|
|
|
+ .eq("create_user_id",newWorkflowStep.getAuditUsers())
|
|
|
+ .orderBy("create_date", true));
|
|
|
+ newWorkflowStep.setCommonReviewComments(commonReviewComments);
|
|
|
+ newWorkflowStep.setId(businessKey);
|
|
|
newWorkflowSteps.add(newWorkflowStep);
|
|
|
}
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())
|
|
|
- &&workflowSteps.get(i).getBranchExpression().contains(branch)
|
|
|
- &&workflowSteps.get(i).getBranchNodeLocation()!=null
|
|
|
- &&"END".equals(workflowSteps.get(i).getBranchNodeLocation().name())) {
|
|
|
+ && workflowSteps.get(i).getBranchExpression().contains(branch)
|
|
|
+ && workflowSteps.get(i).getBranchNodeLocation() != null
|
|
|
+ && "END".equals(workflowSteps.get(i).getBranchNodeLocation().name())) {
|
|
|
flag = 1;
|
|
|
}
|
|
|
|
|
@@ -360,18 +377,24 @@ public class CommonUserController {
|
|
|
}
|
|
|
newWorkflowStep.setCommonStaffs(commonStaffs);
|
|
|
}
|
|
|
- if(!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())){
|
|
|
- if(workflowSteps.get(i).getAuditRoles() != null
|
|
|
- &&workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")){
|
|
|
+ if (!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())) {
|
|
|
+ if (workflowSteps.get(i).getAuditRoles() != null
|
|
|
+ && workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")) {
|
|
|
continue;
|
|
|
}
|
|
|
+ List<CommonReviewComments> commonReviewComments = commonReviewCommentsService.selectList(new EntityWrapper<CommonReviewComments>()
|
|
|
+ .eq("his_id", businessKey)
|
|
|
+ .eq("create_user_id",newWorkflowStep.getAuditUsers())
|
|
|
+ .orderBy("create_date", true));
|
|
|
+ newWorkflowStep.setCommonReviewComments(commonReviewComments);
|
|
|
+ newWorkflowStep.setId(businessKey);
|
|
|
newWorkflowSteps.add(newWorkflowStep);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- if(newWorkflowSteps.size() == 0){
|
|
|
+ if (newWorkflowSteps.size() == 0) {
|
|
|
|
|
|
for (int i = 0; i < workflowSteps.size(); i++) {
|
|
|
NewWorkflowStep newWorkflowStep = new NewWorkflowStep();
|
|
@@ -402,11 +425,17 @@ public class CommonUserController {
|
|
|
}
|
|
|
newWorkflowStep.setCommonStaffs(commonStaffs);
|
|
|
}
|
|
|
- if(!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())){
|
|
|
- if(workflowSteps.get(i).getAuditRoles() != null
|
|
|
- &&workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")){
|
|
|
+ if (!"_PLACEHOLDER_".equals(newWorkflowStep.getDesc())) {
|
|
|
+ if (workflowSteps.get(i).getAuditRoles() != null
|
|
|
+ && workflowSteps.get(i).getAuditRoles().equals("b96299bb5dcf461e916b72b64c6943b0")) {
|
|
|
continue;
|
|
|
}
|
|
|
+ List<CommonReviewComments> commonReviewComments = commonReviewCommentsService.selectList(new EntityWrapper<CommonReviewComments>()
|
|
|
+ .eq("his_id", businessKey)
|
|
|
+ .eq("create_user_id",newWorkflowStep.getAuditUsers())
|
|
|
+ .orderBy("create_date", true));
|
|
|
+ newWorkflowStep.setCommonReviewComments(commonReviewComments);
|
|
|
+ newWorkflowStep.setId(businessKey);
|
|
|
newWorkflowSteps.add(newWorkflowStep);
|
|
|
}
|
|
|
}
|
|
@@ -449,6 +478,7 @@ public class CommonUserController {
|
|
|
public String editUserInfo(@RequestBody CommonUser commonUser) throws ServiceException {
|
|
|
return commonUserService.editUserInfo(commonUser);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 查看用户信息
|
|
|
*/
|
|
@@ -464,6 +494,7 @@ public class CommonUserController {
|
|
|
public String getReason(@RequestParam String id) {
|
|
|
return commonUserService.getReason(id);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 发送验证码
|
|
|
*
|
|
@@ -502,10 +533,10 @@ public class CommonUserController {
|
|
|
*/
|
|
|
@PostMapping("/getListByUserId")
|
|
|
public List<CommonRoleMenuView> getListByUserId(@RequestBody CommonStaff commonStaff) throws ServiceException {
|
|
|
- CommonStaff commonStaff1 = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
|
|
|
- .eq("comp_id",commonStaff.getCompId())
|
|
|
- .eq("staff_mobile_phone",commonStaff.getStaffMobilePhone())
|
|
|
- .eq("delete_flag",0));
|
|
|
+ CommonStaff commonStaff1 = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
|
|
|
+ .eq("comp_id", commonStaff.getCompId())
|
|
|
+ .eq("staff_mobile_phone", commonStaff.getStaffMobilePhone())
|
|
|
+ .eq("delete_flag", 0));
|
|
|
if (commonStaff1 != null) {
|
|
|
return this.roleMenuService.selectListByUserId(commonStaff1.getStaffId());
|
|
|
}
|
|
@@ -639,6 +670,7 @@ public class CommonUserController {
|
|
|
public Page<NoticeNewsInfo> noticeNewsInfoList(NoticeNewsInfo noticeNewsInfo) {
|
|
|
return commonUserService.noticeNewsInfoList(noticeNewsInfo);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 查验app 账号
|
|
|
*
|
|
@@ -727,7 +759,7 @@ public class CommonUserController {
|
|
|
// messageDO.setCompanyId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
|
|
|
// messageDO.setPath("XXXXX");
|
|
|
// webSocket.sendOneMessage(messageDO);
|
|
|
- workflowService.stopInstance("_1040331392328097792","a0685e1c3b3746448954dc9103adf479","发起人撤回");
|
|
|
+ workflowService.stopInstance("_1040331392328097792", "a0685e1c3b3746448954dc9103adf479", "发起人撤回");
|
|
|
}
|
|
|
}
|
|
|
|