feat: 项目新增字段
parent
a64a0041e1
commit
17f0090036
|
|
@ -15,6 +15,7 @@ import org.qinan.safetyeval.client.dto.institution.EvalProjectPageQuery;
|
||||||
import org.qinan.safetyeval.client.dto.institution.EvalProjectProgressPageQuery;
|
import org.qinan.safetyeval.client.dto.institution.EvalProjectProgressPageQuery;
|
||||||
import org.qinan.safetyeval.domain.constant.ChongqingDistrictEnum;
|
import org.qinan.safetyeval.domain.constant.ChongqingDistrictEnum;
|
||||||
import org.qinan.safetyeval.domain.constant.EvalTypeEnum;
|
import org.qinan.safetyeval.domain.constant.EvalTypeEnum;
|
||||||
|
import org.qinan.safetyeval.domain.constant.IndustryEnum;
|
||||||
import org.qinan.safetyeval.domain.entity.EvalProjectEntity;
|
import org.qinan.safetyeval.domain.entity.EvalProjectEntity;
|
||||||
import org.qinan.safetyeval.domain.query.EvalProjectQuery;
|
import org.qinan.safetyeval.domain.query.EvalProjectQuery;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
@ -56,6 +57,7 @@ public interface EvalProjectCmdConvertor {
|
||||||
@Mapping(target = "customerId", expression = "java(entity.getCustomerId() == null ? null : String.valueOf(entity.getCustomerId()))")
|
@Mapping(target = "customerId", expression = "java(entity.getCustomerId() == null ? null : String.valueOf(entity.getCustomerId()))")
|
||||||
@Mapping(target = "evalTypeName", ignore = true)
|
@Mapping(target = "evalTypeName", ignore = true)
|
||||||
@Mapping(target = "districtName", ignore = true)
|
@Mapping(target = "districtName", ignore = true)
|
||||||
|
@Mapping(target = "industryName", ignore = true)
|
||||||
@Mapping(target = "participants", ignore = true)
|
@Mapping(target = "participants", ignore = true)
|
||||||
@Mapping(target = "projectPhaseCode", ignore = true)
|
@Mapping(target = "projectPhaseCode", ignore = true)
|
||||||
@Mapping(target = "projectPhaseName", ignore = true)
|
@Mapping(target = "projectPhaseName", ignore = true)
|
||||||
|
|
@ -76,6 +78,10 @@ public interface EvalProjectCmdConvertor {
|
||||||
if (district != null) {
|
if (district != null) {
|
||||||
co.setDistrictName(district.getValue());
|
co.setDistrictName(district.getValue());
|
||||||
}
|
}
|
||||||
|
IndustryEnum industry = IndustryEnum.ofCode(entity.getIndustryCode());
|
||||||
|
if (industry != null) {
|
||||||
|
co.setIndustryName(industry.getValue());
|
||||||
|
}
|
||||||
co.setParticipants(fromParticipantsJson(entity.getParticipantsJson()));
|
co.setParticipants(fromParticipantsJson(entity.getParticipantsJson()));
|
||||||
fillProjectPhase(entity.getPlanEndDate(), co);
|
fillProjectPhase(entity.getPlanEndDate(), co);
|
||||||
}
|
}
|
||||||
|
|
@ -125,6 +131,9 @@ public interface EvalProjectCmdConvertor {
|
||||||
co.setDistrict(Arrays.stream(ChongqingDistrictEnum.values())
|
co.setDistrict(Arrays.stream(ChongqingDistrictEnum.values())
|
||||||
.map(e -> new EnumOptionCO(e.getCode(), e.getValue()))
|
.map(e -> new EnumOptionCO(e.getCode(), e.getValue()))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
|
co.setIndustry(Arrays.stream(IndustryEnum.values())
|
||||||
|
.map(e -> new EnumOptionCO(e.getCode(), e.getValue()))
|
||||||
|
.collect(Collectors.toList()));
|
||||||
return co;
|
return co;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,12 @@ public class EvalProjectCO {
|
||||||
@ApiModelProperty("项目所在地名称")
|
@ApiModelProperty("项目所在地名称")
|
||||||
private String districtName;
|
private String districtName;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属行业编码")
|
||||||
|
private String industryCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属行业名称")
|
||||||
|
private String industryName;
|
||||||
|
|
||||||
@ApiModelProperty("项目开始时间")
|
@ApiModelProperty("项目开始时间")
|
||||||
private LocalDate planStartDate;
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,7 @@ public class EvalProjectEnumsCO {
|
||||||
|
|
||||||
@ApiModelProperty("项目所在地(重庆市区级)")
|
@ApiModelProperty("项目所在地(重庆市区级)")
|
||||||
private List<EnumOptionCO> district;
|
private List<EnumOptionCO> district;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属行业")
|
||||||
|
private List<EnumOptionCO> industry;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,9 @@ public class EvalProjectAddCmd {
|
||||||
@ApiModelProperty("项目所在地编码(ChongqingDistrictEnum)")
|
@ApiModelProperty("项目所在地编码(ChongqingDistrictEnum)")
|
||||||
private String districtCode;
|
private String districtCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属行业编码(IndustryEnum)")
|
||||||
|
private String industryCode;
|
||||||
|
|
||||||
@ApiModelProperty("项目开始时间")
|
@ApiModelProperty("项目开始时间")
|
||||||
private LocalDate planStartDate;
|
private LocalDate planStartDate;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ public class EvalProjectEntity {
|
||||||
private String customerContactName;
|
private String customerContactName;
|
||||||
private String customerContactPhone;
|
private String customerContactPhone;
|
||||||
private String districtCode;
|
private String districtCode;
|
||||||
|
private String industryCode;
|
||||||
private LocalDate planStartDate;
|
private LocalDate planStartDate;
|
||||||
private LocalDate planEndDate;
|
private LocalDate planEndDate;
|
||||||
private String customerAddress;
|
private String customerAddress;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ public class EvalProjectDO {
|
||||||
private String customerContactName;
|
private String customerContactName;
|
||||||
private String customerContactPhone;
|
private String customerContactPhone;
|
||||||
private String districtCode;
|
private String districtCode;
|
||||||
|
private String industryCode;
|
||||||
private LocalDate planStartDate;
|
private LocalDate planStartDate;
|
||||||
private LocalDate planEndDate;
|
private LocalDate planEndDate;
|
||||||
private String customerAddress;
|
private String customerAddress;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue