package com.ycl.domain.form; import com.ycl.common.group.Update; import com.ycl.common.group.Add; import com.ycl.system.domain.base.AbsForm; import com.ycl.domain.entity.ProjectInvestmentFunding; import org.springframework.beans.BeanUtils; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import org.springframework.lang.NonNull; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; /** * 项目投资及资金来源情况表表单 * * @author flq * @since 2024-11-27 */ @Data @ApiModel(value = "ProjectInvestmentFunding表单", description = "项目投资及资金来源情况表表单") public class ProjectInvestmentFundingForm extends AbsForm { @NotNull(message = "项目id不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("项目id") private Long projectId; @NotBlank(message = "项目总投资额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("项目总投资额") private String totalInvestment; @NotBlank(message = "项目本金不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("项目本金") private String principal; @NotBlank(message = "政府投资总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("政府投资总额") private String governmentInvestmentTotal; @NotBlank(message = "中央投资总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("中央投资总额") private String centralInvestmentTotal; @NotBlank(message = "中央预算投资不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("中央预算投资") private String centralBudgetInvestment; @NotBlank(message = "中央财政不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("中央财政") private String centralFiscalInvestment; @NotBlank(message = "中央专项债券筹集的专项建设资金不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("中央专项债券筹集的专项建设资金") private String centralSpecialBondInvestment; @NotBlank(message = "中央专项建设基金不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("中央专项建设基金") private String centralSpecialFundInvestment; @NotBlank(message = "省级投资总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("省级投资总额") private String provincialInvestmentTotal; @NotBlank(message = "省预算内投资不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("省预算内投资") private String provincialBudgetInvestment; @NotBlank(message = "省财政性建设投资不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("省财政性建设投资") private String provincialFiscalInvestment; @NotBlank(message = "省专项建设资金不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("省专项建设资金") private String provincialSpecialFundInvestment; @NotBlank(message = "市(州)投资总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("市(州)投资总额") private String cityInvestmentTotal; @NotBlank(message = "市(州)预算内投资不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("市(州)预算内投资") private String cityBudgetInvestment; @NotBlank(message = "市(州)财政性投资不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("市(州)财政性投资") private String cityFiscalInvestment; @NotBlank(message = "市(州)专项资金不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("市(州)专项资金") private String citySpecialFundInvestment; @NotBlank(message = "县(市、区)投资总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("县(市、区)投资总额") private String countyInvestmentTotal; @NotBlank(message = "县(市、区)预算内投资不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("县(市、区)预算内投资") private String countyBudgetInvestment; @NotBlank(message = "县(市、区)财政性建设资金不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("县(市、区)财政性建设资金") private String countyFiscalInvestment; @NotBlank(message = "县(市、区)专项资金不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("县(市、区)专项资金") private String countySpecialFundInvestment; @NotBlank(message = "国内贷款总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("国内贷款总额") private String domesticLoanTotal; @NotBlank(message = "银行贷款不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("银行贷款") private String bankLoan; @NotBlank(message = "外商投资总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("外商投资总额") private String foreignInvestmentTotal; @NotBlank(message = "企业自筹总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("企业自筹总额") private String enterpriseSelfRaisedTotal; @NotBlank(message = "其他投资总额不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("其他投资总额") private String otherInvestmentTotal; @NotNull(message = "创建时间不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("创建时间") private Date gmtCreateTime; @NotNull(message = "创建人不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("创建人") private Long createBy; @NotNull(message = "更新时间不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("更新时间") private Date gmtUpdateTime; @NotNull(message = "更新人不能为空", groups = {Add.class, Update.class}) @ApiModelProperty("更新人") private Long updateBy; public static ProjectInvestmentFunding getEntityByForm(@NonNull ProjectInvestmentFundingForm form, ProjectInvestmentFunding entity) { if(entity == null) { entity = new ProjectInvestmentFunding(); } BeanUtils.copyProperties(form, entity); return entity; } }