项目库-任务清单-批量设置认证进度和状态
This commit is contained in:
+27
-13
@@ -1,26 +1,28 @@
|
|||||||
package com.jero.modules.project.controller;
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
|
||||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
|
||||||
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||||
|
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
||||||
|
import com.jero.modules.project.vo.ConditionAssessmentVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,4 +183,16 @@ public class ConditionAssessmentEOController extends JeroController<ConditionAss
|
|||||||
return conditionAssessmentEOService.addOrUpdate(conditionAssessmentEO);
|
return conditionAssessmentEOService.addOrUpdate(conditionAssessmentEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量添加或修改
|
||||||
|
*
|
||||||
|
* @param conditionAssessmentVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "任务清单-项目状态评估表-批量添加或修改")
|
||||||
|
@ApiOperation(value="任务清单-项目状态评估表-批量添加或修改", notes="任务清单-项目状态评估表-批量添加或修改")
|
||||||
|
@PostMapping(value = "/addOrUpdateBatch")
|
||||||
|
public Result<?> addOrUpdateConditionAssessmentBatch(@RequestBody ConditionAssessmentVO conditionAssessmentVO) {
|
||||||
|
return conditionAssessmentEOService.addOrUpdateBatch(conditionAssessmentVO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+42
-14
@@ -1,27 +1,27 @@
|
|||||||
package com.jero.modules.project.controller;
|
package com.jero.modules.project.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jero.common.api.vo.Result;
|
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
|
||||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
|
||||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||||
|
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
||||||
|
import com.jero.modules.project.vo.ProjectTaskInventoryVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import io.swagger.annotations.Api;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,4 +203,32 @@ public class ProjectTaskInventoryEOController extends JeroController<ProjectTask
|
|||||||
public Result<?> remindDispose(@RequestBody JSONObject jsonObject){
|
public Result<?> remindDispose(@RequestBody JSONObject jsonObject){
|
||||||
return this.projectTaskInventoryEOService.remindDispose(jsonObject);
|
return this.projectTaskInventoryEOService.remindDispose(jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param projectTaskInventoryVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-任务清单表-批量维护进度")
|
||||||
|
@ApiOperation(value="项目库-任务清单表-批量维护进度", notes="项目库-任务清单表-批量维护进度")
|
||||||
|
@PutMapping(value = "/editBatch")
|
||||||
|
public Result<?> editCertificationProgressBatch(@RequestBody ProjectTaskInventoryVO projectTaskInventoryVO) {
|
||||||
|
projectTaskInventoryEOService.editBatch(projectTaskInventoryVO);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证进度和当前状态修改时,校验角色是否符合
|
||||||
|
*
|
||||||
|
* @param projectTaskInventoryVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-任务清单表-校验角色是否符合")
|
||||||
|
@ApiOperation(value="项目库-任务清单表-校验角色是否符合", notes="项目库-任务清单表-校验角色是否符合")
|
||||||
|
@PutMapping(value = "/verifyRoleCode")
|
||||||
|
public Result<?> verifyRoleCode(@RequestBody ProjectTaskInventoryVO projectTaskInventoryVO) {
|
||||||
|
List<String> msgList = projectTaskInventoryEOService.verifyRoleCode(projectTaskInventoryVO);
|
||||||
|
return Result.OK(msgList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-2
@@ -1,11 +1,11 @@
|
|||||||
package com.jero.modules.project.service;
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||||
import com.jero.modules.project.entity. ConditionAssessmentEO;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||||
|
import com.jero.modules.project.vo.ConditionAssessmentVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -92,4 +92,10 @@ public interface IConditionAssessmentEOService extends IService<ConditionAssessm
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String,Object>> getProjectStatusAssessStatisticsGroupByTerritory(Map<String,Object> params);
|
List<Map<String,Object>> getProjectStatusAssessStatisticsGroupByTerritory(Map<String,Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务清单-项目状态评估表-批量添加或修改
|
||||||
|
* @param conditionAssessmentVO
|
||||||
|
*/
|
||||||
|
Result<?> addOrUpdateBatch(ConditionAssessmentVO conditionAssessmentVO);
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-1
@@ -1,9 +1,10 @@
|
|||||||
package com.jero.modules.project.service;
|
package com.jero.modules.project.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.jero.modules.project.vo.ProjectTaskInventoryVO;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -84,5 +85,21 @@ public interface IProjectTaskInventoryEOService extends IService<ProjectTaskInve
|
|||||||
*/
|
*/
|
||||||
void deleteByProjectLawsInventoryIds(List<String> projectLawsInventoryIds);
|
void deleteByProjectLawsInventoryIds(List<String> projectLawsInventoryIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新认证进度
|
||||||
|
*
|
||||||
|
* @param projectTaskInventoryVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void editBatch(ProjectTaskInventoryVO projectTaskInventoryVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验角色是否符合
|
||||||
|
*
|
||||||
|
* @param projectTaskInventoryVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO);
|
||||||
|
|
||||||
void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectTaskInventoryEO projectTaskInventoryEO);
|
void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectTaskInventoryEO projectTaskInventoryEO);
|
||||||
}
|
}
|
||||||
|
|||||||
+68
-2
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.modules.project.service.impl;
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||||
@@ -8,6 +9,7 @@ import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
|||||||
import com.jero.modules.project.enums.ProjectRoleEnum;
|
import com.jero.modules.project.enums.ProjectRoleEnum;
|
||||||
import com.jero.modules.project.mapper.ConditionAssessmentEOMapper;
|
import com.jero.modules.project.mapper.ConditionAssessmentEOMapper;
|
||||||
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
||||||
|
import com.jero.modules.project.vo.ConditionAssessmentVO;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -16,8 +18,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 任务清单-项目状态评估表
|
* @Description: 任务清单-项目状态评估表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
@@ -251,4 +251,70 @@ public class ConditionAssessmentEOServiceImpl extends ServiceImpl<ConditionAsses
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<?> addOrUpdateBatch(ConditionAssessmentVO conditionAssessmentVO) {
|
||||||
|
List<String> projectLawsInventoryIdList = Arrays.asList(conditionAssessmentVO.getProjectLawsInventoryIds().split(","));
|
||||||
|
List<String> roleCodeListOld = Arrays.asList(conditionAssessmentVO.getRoleCodes().split(","));
|
||||||
|
|
||||||
|
|
||||||
|
for (int i=0; i < projectLawsInventoryIdList.size(); i++) {
|
||||||
|
String projectLawsInventoryId = projectLawsInventoryIdList.get(i);
|
||||||
|
String roleCode = roleCodeListOld.get(i);
|
||||||
|
List<String> roleCodeList = new ArrayList<>();
|
||||||
|
List<ConditionAssessmentEO> list = new ArrayList<>();
|
||||||
|
|
||||||
|
if (StringUtils.equals(roleCode, ProjectRoleEnum.REGULATI_ENGINEER.getValue())) {
|
||||||
|
roleCodeList.add(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||||
|
|
||||||
|
ConditionAssessmentEO regulatiEngineer = new ConditionAssessmentEO();
|
||||||
|
regulatiEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
|
||||||
|
regulatiEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
|
||||||
|
regulatiEngineer.setRemark(conditionAssessmentVO.getRemark());
|
||||||
|
regulatiEngineer.setRoleCode(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||||
|
|
||||||
|
list.add(regulatiEngineer);
|
||||||
|
|
||||||
|
} else if (StringUtils.equals(roleCode, ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())) {
|
||||||
|
roleCodeList.add(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
|
||||||
|
|
||||||
|
ConditionAssessmentEO homologationEngineer = new ConditionAssessmentEO();
|
||||||
|
homologationEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
|
||||||
|
homologationEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
|
||||||
|
homologationEngineer.setRemark(conditionAssessmentVO.getRemark());
|
||||||
|
homologationEngineer.setRoleCode(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
|
||||||
|
|
||||||
|
list.add(homologationEngineer);
|
||||||
|
|
||||||
|
} else if (StringUtils.equals(roleCode, ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue())) {
|
||||||
|
roleCodeList.add(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||||
|
roleCodeList.add(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
|
||||||
|
|
||||||
|
ConditionAssessmentEO regulatiEngineer = new ConditionAssessmentEO();
|
||||||
|
regulatiEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
|
||||||
|
regulatiEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
|
||||||
|
regulatiEngineer.setRemark(conditionAssessmentVO.getRemark());
|
||||||
|
regulatiEngineer.setRoleCode(ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||||
|
|
||||||
|
ConditionAssessmentEO homologationEngineer = new ConditionAssessmentEO();
|
||||||
|
homologationEngineer.setProjectLawsInventoryId(projectLawsInventoryId);
|
||||||
|
homologationEngineer.setConditionAssessment(conditionAssessmentVO.getConditionAssessment());
|
||||||
|
homologationEngineer.setRemark(conditionAssessmentVO.getRemark());
|
||||||
|
homologationEngineer.setRoleCode(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
|
||||||
|
|
||||||
|
list.add(regulatiEngineer);
|
||||||
|
list.add(homologationEngineer);
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isNotEmpty(list)){
|
||||||
|
QueryWrapper<ConditionAssessmentEO> deleteWrapper = new QueryWrapper<>();
|
||||||
|
deleteWrapper.lambda().eq(ConditionAssessmentEO::getProjectLawsInventoryId,projectLawsInventoryId);
|
||||||
|
deleteWrapper.lambda().in(ConditionAssessmentEO::getRoleCode,roleCodeList);
|
||||||
|
this.baseMapper.delete(deleteWrapper);
|
||||||
|
|
||||||
|
saveBatch(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+83
@@ -18,6 +18,7 @@ import com.jero.modules.project.service.IConditionAssessmentEOService;
|
|||||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
||||||
import com.jero.modules.project.util.SendMessageUtils;
|
import com.jero.modules.project.util.SendMessageUtils;
|
||||||
|
import com.jero.modules.project.vo.ProjectTaskInventoryVO;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.entity.SysUser;
|
import com.jero.modules.system.entity.SysUser;
|
||||||
import com.jero.modules.system.mapper.SysUserMapper;
|
import com.jero.modules.system.mapper.SysUserMapper;
|
||||||
@@ -459,6 +460,88 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
this.baseMapper.delete(deleteWrapper);
|
this.baseMapper.delete(deleteWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editBatch(ProjectTaskInventoryVO projectTaskInventoryVO) {
|
||||||
|
List<String> idList = Arrays.asList(projectTaskInventoryVO.getIds().split(","));
|
||||||
|
|
||||||
|
List<ProjectTaskInventoryEO> updateEOList = new ArrayList<>();
|
||||||
|
for (String id : idList) {
|
||||||
|
ProjectTaskInventoryEO updateEO = new ProjectTaskInventoryEO();
|
||||||
|
updateEO.setId(id);
|
||||||
|
updateEO.setCertificationProgress(projectTaskInventoryVO.getCertificationProgress());
|
||||||
|
updateEO.setCertificationProgressRemark(projectTaskInventoryVO.getCertificationProgressRemark());
|
||||||
|
|
||||||
|
Date now = new Date();
|
||||||
|
updateEO.setUpdateTime(now);
|
||||||
|
|
||||||
|
updateEOList.add(updateEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateBatchById(updateEOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO) {
|
||||||
|
List<String> projectLawsInventoryIdList = Arrays.asList(projectTaskInventoryVO.getProjectLawsInventoryIds().split(","));
|
||||||
|
List<String> roleCodeList = Arrays.asList(projectTaskInventoryVO.getRoleCodes().split(","));
|
||||||
|
String cut = projectTaskInventoryVO.getCut();
|
||||||
|
String operation = projectTaskInventoryVO.getOperation();
|
||||||
|
|
||||||
|
List<Map<String, String>> msgMapList = new ArrayList<>();
|
||||||
|
for (int i=0; i < projectLawsInventoryIdList.size(); i++) {
|
||||||
|
String projectLawsInventoryId = projectLawsInventoryIdList.get(i);
|
||||||
|
String roleCode = roleCodeList.get(i);
|
||||||
|
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOService.getById(projectLawsInventoryId);
|
||||||
|
|
||||||
|
Map<String, String> msgMap = new HashMap<>();
|
||||||
|
if ("1".equals(operation)) {
|
||||||
|
if (! ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode)) {
|
||||||
|
msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber());
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if ("2".equals(operation)) {
|
||||||
|
if (!(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode)
|
||||||
|
|| ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue().equals(roleCode)
|
||||||
|
|| ProjectRoleEnum.REGULATI_AND_HOMOLOGATION_ENGINEER.getValue().equals(roleCode))) {
|
||||||
|
msgMap.put("serialNumber", projectLawsInventoryEO.getSerialNumber());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return getMsg(msgMapList, cut, operation);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getMsg(List<Map<String, String>> msgMapList, String cut, String operation) {
|
||||||
|
List<String> msgList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Map<String, String> msgMap : msgMapList) {
|
||||||
|
String serialNumber = msgMap.get("serialNumber");
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
if ("1".equals(operation)) {
|
||||||
|
if (CutEnum.EN.getValue().equals(cut)) {
|
||||||
|
stringBuilder.append("Number ").append("<span style='color: red'>").append(serialNumber).append("</span>").append(", the current user can not maintain homologation progress.");
|
||||||
|
} else {
|
||||||
|
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append(",当前用户没有维护认证进度权限。");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if("2".equals(operation)) {
|
||||||
|
if (CutEnum.EN.getValue().equals(cut)) {
|
||||||
|
stringBuilder.append("Number ").append("<span style='color: red'>").append(serialNumber).append("</span>").append(", the current user can not modify current status.");
|
||||||
|
} else {
|
||||||
|
stringBuilder.append("编号").append("<span style='color: red'>").append(serialNumber).append("</span>").append("当前用户没有修改状态权限。");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
msgList.add(stringBuilder.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return msgList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建任务清单列表数据
|
* 创建任务清单列表数据
|
||||||
* @param projectTaskInventoryEOList
|
* @param projectTaskInventoryEOList
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ConditionAssessmentVO {
|
||||||
|
|
||||||
|
private String cut;
|
||||||
|
|
||||||
|
// 当前状态
|
||||||
|
private String projectLawsInventoryIds;
|
||||||
|
private String roleCodes;
|
||||||
|
private String conditionAssessment;
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.jero.modules.project.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProjectTaskInventoryVO {
|
||||||
|
|
||||||
|
private String cut;
|
||||||
|
|
||||||
|
// 认证进度
|
||||||
|
private String ids;
|
||||||
|
private String projectLawsInventoryIds;
|
||||||
|
private String roleCodes;
|
||||||
|
private String certificationProgress;
|
||||||
|
private String certificationProgressRemark;
|
||||||
|
|
||||||
|
private String operation; // 1-维护进度,2-修改状态
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user