认证清单,认证进度排序。
This commit is contained in:
+4
-1
@@ -188,10 +188,13 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
|||||||
private String productionEnterpriseName;
|
private String productionEnterpriseName;
|
||||||
|
|
||||||
/**认证进度*/
|
/**认证进度*/
|
||||||
|
|
||||||
@ApiModelProperty(value = "认证进度")
|
@ApiModelProperty(value = "认证进度")
|
||||||
private String certificationProgress;
|
private String certificationProgress;
|
||||||
|
|
||||||
|
// 认证进度排序字段
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String certificationProgressNumber;
|
||||||
|
|
||||||
/**认证进度展示名称**/
|
/**认证进度展示名称**/
|
||||||
@Excel(name = "认证进度", width = 20)
|
@Excel(name = "认证进度", width = 20)
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
+29
-9
@@ -7,22 +7,24 @@ import com.jero.common.constant.enums.CutEnum;
|
|||||||
* 认证进度枚举类
|
* 认证进度枚举类
|
||||||
*/
|
*/
|
||||||
public enum CertificationProgressEnum {
|
public enum CertificationProgressEnum {
|
||||||
TEST_PASSED("实验通过","Test passed"),
|
NOT_START("未开始","Not start","1"),
|
||||||
TEST_FAILED("实验失败","Test failed"),
|
IN_PROGRESS("进行中","In progress","2"),
|
||||||
NOT_START("未开始","Not start"),
|
TEST_PASSED("实验通过","Test passed","3"),
|
||||||
IN_PROGRESS("进行中","In progress"),
|
TEST_FAILED("实验失败","Test failed","4"),
|
||||||
// NA("不涉及","NA"),// 04-12弃用,
|
// NA("不涉及","NA"),// 04-12弃用,
|
||||||
COMPONENT_REPORT_NOT_SUBMITTED("部件报告未提交","Component report not submitted"),
|
COMPONENT_REPORT_NOT_SUBMITTED("部件报告未提交","Component report not submitted","5"),
|
||||||
COMPONENT_REPORT_SUBMITTED("部件报告已提交","Component report submitted"),
|
COMPONENT_REPORT_SUBMITTED("部件报告已提交","Component report submitted","6"),
|
||||||
COMPONENT_REPORT_HAS_BEEN_STORED("部件报告已入库","Component report has been stored"),
|
COMPONENT_REPORT_HAS_BEEN_STORED("部件报告已入库","Component report has been stored","7"),
|
||||||
;
|
;
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
String value;
|
String value;
|
||||||
|
String number;
|
||||||
|
|
||||||
private CertificationProgressEnum(String name, String value) {
|
private CertificationProgressEnum(String name, String value,String number) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
this.number = number;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@@ -41,7 +43,15 @@ public enum CertificationProgressEnum {
|
|||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getTextByValue(String value,String cut) {
|
public String getNumber() {
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumber(String number) {
|
||||||
|
this.number = number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getTextByValue(String value, String cut) {
|
||||||
CertificationProgressEnum[] values = values();
|
CertificationProgressEnum[] values = values();
|
||||||
for (CertificationProgressEnum certificationProgressEnum : values) {
|
for (CertificationProgressEnum certificationProgressEnum : values) {
|
||||||
if (certificationProgressEnum.value.equals(value)) {
|
if (certificationProgressEnum.value.equals(value)) {
|
||||||
@@ -54,4 +64,14 @@ public enum CertificationProgressEnum {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getNumberByValue(String value) {
|
||||||
|
CertificationProgressEnum[] values = values();
|
||||||
|
for (CertificationProgressEnum certificationProgressEnum : values) {
|
||||||
|
if (certificationProgressEnum.value.equals(value)) {
|
||||||
|
return certificationProgressEnum.number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+22
@@ -1000,6 +1000,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
String attestationTypeName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getAttestationType(),cut, "ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2");
|
String attestationTypeName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getAttestationType(),cut, "ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2");
|
||||||
data.setAttestationTypeName(attestationTypeName);
|
data.setAttestationTypeName(attestationTypeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(data.getCertificationProgress())){
|
||||||
|
String cpNumber = CertificationProgressEnum.getNumberByValue(data.getCertificationProgress());
|
||||||
|
data.setCertificationProgressNumber(cpNumber);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1575,6 +1580,23 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 认证进度 certificationProgress
|
||||||
|
if(StringUtils.equals("certificationProgress",orderByField)){
|
||||||
|
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(datas,(e1, e2)->{
|
||||||
|
String e1CertificationProgressNumber = (StringUtils.isNotEmpty(e1.getCertificationProgressNumber()) ? e1.getCertificationProgressNumber() : "");
|
||||||
|
String e2CertificationProgressNumber = (StringUtils.isNotEmpty(e2.getCertificationProgressNumber()) ? e2.getCertificationProgressNumber() : "");
|
||||||
|
return comparator.compare(e1CertificationProgressNumber,e2CertificationProgressNumber);
|
||||||
|
});
|
||||||
|
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||||
|
Collections.sort(datas,(e1,e2)->{
|
||||||
|
String e1CertificationProgressNumber = (StringUtils.isNotEmpty(e1.getCertificationProgressNumber()) ? e1.getCertificationProgressNumber() : "");
|
||||||
|
String e2CertificationProgressNumber = (StringUtils.isNotEmpty(e2.getCertificationProgressNumber()) ? e2.getCertificationProgressNumber() : "");
|
||||||
|
return comparator.compare(e2CertificationProgressNumber,e1CertificationProgressNumber);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return datas;
|
return datas;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user