update
This commit is contained in:
+1
-1
@@ -237,7 +237,7 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
||||
@ApiOperation(value="项目库-法规清单表-通过id与操作类型查询", notes="项目库-法规清单表-通过id与操作类型查询")
|
||||
@GetMapping(value = "/queryProjectLawsInventoryInfoById")
|
||||
public Result<?> queryProjectLawsInventoryInfoById(@RequestParam Map<String,Object> params) {
|
||||
JSONObject result = projectLawsInventoryEOService.queryProjectLawsInventoryInfoById(params);
|
||||
ProjectLawsInventoryEO result = projectLawsInventoryEOService.queryProjectLawsInventoryInfoById(params);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* 设计符合性确认流程状态枚举类
|
||||
*/
|
||||
public enum DesignComplianceStatusEnum {
|
||||
TO_SUBMIT("待提交","to submit"),
|
||||
TO_REVIEW("待审查","to review"),
|
||||
REVIEW_COMPLETED("审查完成","review completed"),
|
||||
;
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private DesignComplianceStatusEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
DesignComplianceStatusEnum[] values = values();
|
||||
for (DesignComplianceStatusEnum designComplianceStatusEnum : values) {
|
||||
if (designComplianceStatusEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return designComplianceStatusEnum.name;
|
||||
}else {
|
||||
return designComplianceStatusEnum.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
|
||||
/**
|
||||
* 审查结果枚举类
|
||||
*/
|
||||
public enum ReviewResultEnum {
|
||||
TO_BE_CONFIRMED("待确认","to be confirmed"),
|
||||
CONFORMITY("符合","conformity"),
|
||||
INCONFORMITY("不符合","inconformity"),
|
||||
TO_TRACK("待追踪","to track"),
|
||||
UNINVOLVED("不涉及","uninvolved"),
|
||||
TERMINATION_OF_TASK("任务终止","termination of task")
|
||||
;
|
||||
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private ReviewResultEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
ReviewResultEnum[] values = values();
|
||||
for (ReviewResultEnum reviewResultEnum : values) {
|
||||
if (reviewResultEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return reviewResultEnum.name;
|
||||
}else {
|
||||
return reviewResultEnum.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -89,7 +89,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
|
||||
JSONObject queryProjectLawsInventoryInfoById(Map<String, Object> params);
|
||||
ProjectLawsInventoryEO queryProjectLawsInventoryInfoById(Map<String, Object> params);
|
||||
|
||||
|
||||
void copyInfoByIds(String ids);
|
||||
|
||||
+5
-6
@@ -1121,9 +1121,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryProjectLawsInventoryInfoById(Map<String, Object> params) {
|
||||
public ProjectLawsInventoryEO queryProjectLawsInventoryInfoById(Map<String, Object> params) {
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
String id = (String) params.get("id");
|
||||
if(StringUtils.isEmpty(id)){
|
||||
throw new JeroBootException("id不能为空");
|
||||
@@ -1139,8 +1138,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
int isProjectRole = checkUserRole(byId.getProjectLibraryId(), currentUser.getId(), id);
|
||||
dataDispose(projectLawsInventoryEOList,currentUser,isProjectRole,cut);
|
||||
|
||||
result.put("projectLawsInventory",projectLawsInventoryEOList.get(0));
|
||||
if (StringUtils.equals(operatorType, OperatorTypeEnum.TASK_AFFIRM_QUERY.getValue())) {
|
||||
//result.put("projectLawsInventory",projectLawsInventoryEOList.get(0));
|
||||
/*if (StringUtils.equals(operatorType, OperatorTypeEnum.TASK_AFFIRM_QUERY.getValue())) {
|
||||
//设计符合性
|
||||
Map<String,Object> designMap = new HashMap<>();
|
||||
designMap.put("designDeliverableType",projectLawsInventoryEOList.get(0).getDesignDeliverableType());
|
||||
@@ -1165,11 +1164,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
verifyMap.put("verifyDutyName",projectLawsInventoryEOList.get(0).getVerifyDutyName());
|
||||
verifyMap.put("verifyDueDate",projectLawsInventoryEOList.get(0).getVerifyDueDate());
|
||||
result.put("verify",verifyMap);
|
||||
}
|
||||
}*/
|
||||
}else {
|
||||
throw new JeroBootException("未找到该法规清单信息!");
|
||||
}
|
||||
return result;
|
||||
return projectLawsInventoryEOList.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+41
-1
@@ -172,7 +172,9 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
result = createTaskInventoryEOList(projectTaskInventoryEOList,projectTaskInventoryDetailEOList,isProjectRole,currentUser);
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(result)){
|
||||
disposeData(result,projectTaskInventoryEO.getCut());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -454,4 +456,42 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
SendMessageUtils.sendMessage(msgContentEN,userIdList,id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param result
|
||||
* @param cut 中英文切换标识
|
||||
*/
|
||||
public void disposeData(List<ProjectTaskInventoryEO> result,String cut){
|
||||
if(CollectionUtils.isNotEmpty(result)){
|
||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : result) {
|
||||
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getDesignStatus())){
|
||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(projectTaskInventoryEO.getDesignStatus(), cut);
|
||||
projectTaskInventoryEO.setDesignStatus(textByValue);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getDesignFlowTaskStatus())){
|
||||
String textByValue = ReviewResultEnum.getTextByValue(projectTaskInventoryEO.getDesignFlowTaskStatus(), cut);
|
||||
projectTaskInventoryEO.setDesignFlowTaskStatus(textByValue);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getPrehomoStatus())){
|
||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(projectTaskInventoryEO.getPrehomoStatus(), cut);
|
||||
projectTaskInventoryEO.setPrehomoStatus(textByValue);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getPrehomoFlowTaskStatus())){
|
||||
String textByValue = ReviewResultEnum.getTextByValue(projectTaskInventoryEO.getPrehomoFlowTaskStatus(), cut);
|
||||
projectTaskInventoryEO.setPrehomoFlowTaskStatus(textByValue);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getVerifyStatus())){
|
||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(projectTaskInventoryEO.getVerifyStatus(), cut);
|
||||
projectTaskInventoryEO.setVerifyStatus(textByValue);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectTaskInventoryEO.getVerifyFlowTaskStatus())){
|
||||
String textByValue = ReviewResultEnum.getTextByValue(projectTaskInventoryEO.getVerifyFlowTaskStatus(), cut);
|
||||
projectTaskInventoryEO.setVerifyFlowTaskStatus(textByValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user