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