Merge remote-tracking branch 'origin/dev_20230831_problem' into dev_20230831_problem

This commit is contained in:
zyx.net
2023-09-06 11:47:10 +08:00
6 changed files with 62 additions and 34 deletions
@@ -5,8 +5,8 @@ package com.jero.modules.project.enums;
*/ */
public enum ColourEnum { public enum ColourEnum {
RED("","1"), // 未完成 RED("","1"), // 未完成
YELLOW("","2"), // 已完成 YELLOW("","2"), // 已完成
GREEN("绿色","3"), // 展示数据 GREEN("绿色","3"), // 展示数据
BLUE("蓝色","4") // 展示数据 BLUE("蓝色","4") // 展示数据
; ;
@@ -323,35 +323,14 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
if(trackVOListTemp.size() != 0){ if(trackVOListTemp.size() != 0){
//旧数据处理 //旧数据处理
for (NcrTrackVO trackVO : trackVOListTemp) { oldData(ncrTrackVO, trackVOListTemp);
String problemType = trackVO.getProblemType();
trackVO.setTitle(trackVO.getFlowType()+problemType);
trackVO.setCreateBy(trackVO.getDuty());
if(ComplianceFlowStatusEnum.INCONFORMITY.getCnName().equals(problemType)
|| ComplianceFlowStatusEnum.INCONFORMITY.getEnName().equals(problemType)){
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getCnName());
}else{
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getEnName());
}
trackVO.setProblemType(ColourEnum.RED.getName());
}
if(ComplianceFlowStatusEnum.TO_TRACK.getCnName().equals(problemType)
||ComplianceFlowStatusEnum.TO_TRACK.getEnName().equals(problemType)){
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_TO_TRACK.getCnName());
}else{
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_TO_TRACK.getEnName());
}
trackVO.setProblemType(ColourEnum.YELLOW.getName());
}
}
if(!ncrTrackVOList.isEmpty()){ if(!ncrTrackVOList.isEmpty()){
trackVOListTemp.addAll(ncrTrackVOList); trackVOListTemp.addAll(ncrTrackVOList);
} }
return trackVOListTemp; return trackVOListTemp;
}else{ }else{
//旧数据处理
oldData(ncrTrackVO, trackVOList);
if(!ncrTrackVOList.isEmpty()){ if(!ncrTrackVOList.isEmpty()){
trackVOList.addAll(ncrTrackVOList); trackVOList.addAll(ncrTrackVOList);
} }
@@ -359,6 +338,33 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
} }
} }
private void oldData(NcrTrackVO ncrTrackVO, List<NcrTrackVO> trackVOListTemp) {
for (NcrTrackVO trackVO : trackVOListTemp) {
String problemType = trackVO.getProblemType();
trackVO.setTitle(trackVO.getTitle()+problemType);
trackVO.setCreateBy(trackVO.getDuty());
trackVO.setLawsName(trackVO.getSerialNumber());
if(ComplianceFlowStatusEnum.INCONFORMITY.getCnName().equals(problemType)
|| ComplianceFlowStatusEnum.INCONFORMITY.getEnName().equals(problemType)){
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getCnName());
}else{
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_INCONFORMITY.getEnName());
}
trackVO.setProblemState(ColourEnum.RED.getName());
}
if(ComplianceFlowStatusEnum.TO_TRACK.getCnName().equals(problemType)
||ComplianceFlowStatusEnum.TO_TRACK.getEnName().equals(problemType)){
if(CutEnum.CN.getValue().equals(ncrTrackVO.getCut())){
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_TO_TRACK.getCnName());
}else{
trackVO.setProblemType(ComplianceFlowStatusEnum.LAWS_TO_TRACK.getEnName());
}
trackVO.setProblemState(ColourEnum.YELLOW.getName());
}
}
}
@NotNull @NotNull
private List<NcrTrackVO> getProblemManagementData(List<NcrTrackVO> ncrTrackVOListTemp,String cut) { private List<NcrTrackVO> getProblemManagementData(List<NcrTrackVO> ncrTrackVOListTemp,String cut) {
List<String> idList = new ArrayList<>(); List<String> idList = new ArrayList<>();
@@ -451,18 +457,13 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
}else{ }else{
projectVersion = projectLibraryBase.getProjectVersion(); projectVersion = projectLibraryBase.getProjectVersion();
} }
if(com.jero.modules.system.util.StringUtils.isNotBlank(projectLibraryBase.getYearName())){
projectLibraryBase.setProjectName(projectLibraryBase.getProjectName()
+ "-" + projectLibraryBase.getYearName()
+ "-" + targetMarket);
}
projectNameList.add(projectLibraryBase.getProjectName() projectNameList.add(projectLibraryBase.getProjectName()
+ "-" + projectLibraryBase.getYearName() + "-" + projectLibraryBase.getYearName()
+ "-" + targetMarket + "-" + targetMarket
+"-"+projectVersion); +"-"+projectVersion);
} }
if(!projectNameList.isEmpty()){ if(!projectNameList.isEmpty()){
problemManagementEO.setProjectName(com.jero.modules.system.util.StringUtils.join(projectNameList,",")); problemManagementEO.setProjectName(StringUtils.join(projectNameList,","));
} }
} }
@@ -40,6 +40,11 @@ public class NcrTrackVO implements Serializable {
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "修改日期")
private java.util.Date updateTime;
//中英文切换 //中英文切换
private String cut; private String cut;
@@ -519,6 +519,15 @@ export default {
if(this.formInline.problemState == null){ if(this.formInline.problemState == null){
this.formInline.problemState = undefined this.formInline.problemState = undefined
} }
if(this.formInline.progressTrackingList == null){
this.formInline.progressTrackingList = [{}]
}
if(this.formInline.approvalEvidenceLinkList == null){
this.formInline.approvalEvidenceLinkList = [{}]
}
if(this.formInline.fileLinkList == null){
this.formInline.fileLinkList = [{}]
}
if(this.formInline.projectId != null){ if(this.formInline.projectId != null){
this.formInline.projectId = this.formInline.projectId.split(',') this.formInline.projectId = this.formInline.projectId.split(',')
}else{ }else{
@@ -152,6 +152,9 @@
{{result.problemState ? result.problemState : ''}} {{result.problemState ? result.problemState : ''}}
</span> </span>
</div> </div>
<span slot="problemType" slot-scope="text,result">
<span>{{result.flag== 'NEW'?result.problemType_dictText:result.problemType}}</span>
</span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" <a class="text-operation"
@click="detil(record)"> @click="detil(record)">
@@ -249,7 +252,8 @@
dataIndex: 'problemType_dictText', dataIndex: 'problemType_dictText',
width: 170, width: 170,
sorter:true, sorter:true,
ellipsis: true ellipsis: true,
scopedSlots: { customRender: 'problemType' }
}, },
{ {
title: this.$t('statisticalNodes'), title: this.$t('statisticalNodes'),
@@ -262,7 +266,7 @@
{ {
title: this.$t('creator'), title: this.$t('creator'),
align: 'left', align: 'left',
dataIndex: 'creator', dataIndex: 'createBy',
width: 100, width: 100,
sorter:true, sorter:true,
ellipsis: true ellipsis: true
@@ -519,6 +519,15 @@ export default {
if(this.formInline.problemState == null){ if(this.formInline.problemState == null){
this.formInline.problemState = undefined this.formInline.problemState = undefined
} }
if(this.formInline.progressTrackingList == null){
this.formInline.progressTrackingList = [{}]
}
if(this.formInline.approvalEvidenceLinkList == null){
this.formInline.approvalEvidenceLinkList = [{}]
}
if(this.formInline.fileLinkList == null){
this.formInline.fileLinkList = [{}]
}
if(this.formInline.projectId != null){ if(this.formInline.projectId != null){
this.formInline.projectId = this.formInline.projectId.split(',') this.formInline.projectId = this.formInline.projectId.split(',')
}else{ }else{