mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	[fix] 修复外部合同管理模块,增加校验
This commit is contained in:
		| @@ -17,7 +17,6 @@ public class ExtContractRespVO { | ||||
|     @ExcelProperty("项目编号") | ||||
|     private String code; | ||||
|  | ||||
|  | ||||
|     @Schema(description = "合同名称", example = "芋艿") | ||||
|     @ExcelProperty("合同名称") | ||||
|     private String name; | ||||
| @@ -39,9 +38,10 @@ public class ExtContractRespVO { | ||||
|     @ExcelProperty("项目经理") | ||||
|     private String projectManager; | ||||
|  | ||||
|     @Schema(description = "分包合同提示时间") | ||||
|     @ExcelProperty("分包合同提示时间") | ||||
|     private LocalDateTime reminderTime; | ||||
|     @Schema(description = "合同提示时间") | ||||
|     @ExcelProperty("合同提示时间") | ||||
|     private LocalDateTime exReminderTime; | ||||
|  | ||||
|  | ||||
|     @Schema(description = "合同进展") | ||||
|     @ExcelProperty("合同进展") | ||||
| @@ -107,10 +107,9 @@ public class ExtContractRespVO { | ||||
|     @ExcelProperty("资金来源") | ||||
|     private String source; | ||||
|  | ||||
|  | ||||
|     @Schema(description = "合同提示时间") | ||||
|     @ExcelProperty("合同提示时间") | ||||
|     private LocalDateTime exReminderTime; | ||||
|     @Schema(description = "分包合同提示时间") | ||||
|     @ExcelProperty("分包合同提示时间") | ||||
|     private LocalDateTime reminderTime; | ||||
|  | ||||
|     @Schema(description = "收费标准", requiredMode = Schema.RequiredMode.REQUIRED) | ||||
|     @ExcelProperty("收费标准") | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo; | ||||
|  | ||||
| import com.alibaba.excel.annotation.ExcelProperty; | ||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||
| import lombok.*; | ||||
| import jakarta.validation.constraints.*; | ||||
| @@ -18,15 +19,39 @@ public class ExtContractSaveReqVO { | ||||
|     @NotNull(message = "项目id不能为空") | ||||
|     private Long projectId; | ||||
|  | ||||
|     @Schema(description = "合同名称", example = "芋艿") | ||||
|     private String name; | ||||
|     @Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001") | ||||
|     @ExcelProperty("项目编号") | ||||
|     private String code; | ||||
|  | ||||
|     @Schema(description = "合同类型", example = "1") | ||||
|     private String type; | ||||
|     @Schema(description = "客户名称") | ||||
|     @ExcelProperty("客户名称") | ||||
|     private String customerCompanyName; | ||||
|  | ||||
|     @Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部") | ||||
|     @ExcelProperty("主控部门") | ||||
|     private String trackingDep; | ||||
|  | ||||
|     @Schema(description = "项目经理", requiredMode = Schema.RequiredMode.REQUIRED) | ||||
|     @ExcelProperty("项目经理") | ||||
|     private String projectManager; | ||||
|  | ||||
|     @Schema(description = "合同提示时间") | ||||
|     @ExcelProperty("合同提示时间") | ||||
|     private LocalDateTime exReminderTime; | ||||
|  | ||||
|     @Schema(description = "客户公司id", example = "25191") | ||||
|     private Long customerCompanyId; | ||||
|  | ||||
|  | ||||
|  | ||||
|     @Schema(description = "合同名称", example = "芋艿") | ||||
|     @ExcelProperty("合同名称") | ||||
|     private String name; | ||||
|  | ||||
|     @Schema(description = "合同类型", example = "1") | ||||
|     @ExcelProperty("合同类型") | ||||
|     private String type; | ||||
|  | ||||
|     @Schema(description = "合同进展") | ||||
|     private String progress; | ||||
|  | ||||
|   | ||||
| @@ -15,11 +15,9 @@ import jakarta.annotation.Resource; | ||||
| import org.springframework.validation.annotation.Validated; | ||||
| import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||||
| import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
|  | ||||
| import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||||
| import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.EXT_CONTRACT_NOT_EXISTS; | ||||
|  | ||||
| @@ -44,10 +42,15 @@ public class ExtContractServiceImpl implements ExtContractService { | ||||
|  | ||||
|     @Override | ||||
|     public Long createExtContract(ExtContractSaveReqVO createReqVO) { | ||||
|         // 插入 | ||||
|         Long projectId = createReqVO.getProjectId(); | ||||
|         ExtContractDO extContract = BeanUtils.toBean(createReqVO, ExtContractDO.class); | ||||
|         if (projectId != null) { | ||||
|             updateExtContract(createReqVO); | ||||
|         } else { | ||||
|             // 插入 | ||||
|             extContractMapper.insert(extContract); | ||||
|         // 返回 | ||||
|         } | ||||
|  | ||||
|         return extContract.getId(); | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 wyw
					wyw