mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-09-08 06:02:08 +08:00
Merge remote-tracking branch 'origin/feature-extContract-7.25-wyw' into feature-merage-7.26-zqc
# Conflicts: # yudao-module-cms/yudao-module-cms-api/src/main/java/cn/iocoder/yudao/module/cms/enums/ErrorCodeConstants.java
This commit is contained in:
55
sql/cms/codegen-cms-contractHistory-sql.sql
Normal file
55
sql/cms/codegen-cms-contractHistory-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'历史合同管理', '', 2, 0, 2758,
|
||||
'contract-history', '', 'cms/contracthistory/index', 0, 'ContractHistory'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同查询', 'cms:contract-history:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同创建', 'cms:contract-history:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同更新', 'cms:contract-history:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同删除', 'cms:contract-history:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同导出', 'cms:contract-history:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
@@ -28,7 +28,7 @@ public class ContractRespVO {
|
||||
|
||||
@Schema(description = "分包合同提示时间")
|
||||
@ExcelProperty("分包合同提示时间")
|
||||
private LocalDateTime subReminderTime;
|
||||
private LocalDateTime ReminderTime;
|
||||
|
||||
@Schema(description = "暂定结算数")
|
||||
@ExcelProperty("暂定结算数")
|
||||
|
@@ -111,10 +111,6 @@ public class ContractSaveReqVO {
|
||||
@NotNull(message = "更新时间不能为空")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否删除不能为空")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "12587")
|
||||
@NotNull(message = "租户编号不能为空")
|
||||
private Long tenantId;
|
||||
|
@@ -0,0 +1,102 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory.ContractHistoryDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.contract.ContractMapper;
|
||||
import cn.iocoder.yudao.module.cms.service.contracthistory.ContractHistoryService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
|
||||
@Tag(name = "管理后台 - 历史合同管理")
|
||||
@RestController
|
||||
@RequestMapping("/cms/contract-history")
|
||||
@Validated
|
||||
public class ContractHistoryController {
|
||||
|
||||
@Resource
|
||||
private ContractHistoryService contractHistoryService;
|
||||
|
||||
@Resource
|
||||
private ContractMapper contractMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建历史合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:create')")
|
||||
public CommonResult<Long> createContractHistory(@Valid @RequestBody ContractHistorySaveReqVO createReqVO) {
|
||||
return success(contractHistoryService.createContractHistory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新历史合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:update')")
|
||||
public CommonResult<Boolean> updateContractHistory(@Valid @RequestBody ContractHistorySaveReqVO updateReqVO) {
|
||||
contractHistoryService.updateContractHistory(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除历史合同")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:delete')")
|
||||
public CommonResult<Boolean> deleteContractHistory(@RequestParam("id") Long id) {
|
||||
contractHistoryService.deleteContractHistory(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得历史合同")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:query')")
|
||||
public CommonResult<ContractHistoryRespVO> getContractHistory(@RequestParam("id") Long id) {
|
||||
ContractHistoryDO contractHistory = contractHistoryService.getContractHistory(id);
|
||||
return success(BeanUtils.toBean(contractHistory, ContractHistoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得历史合同分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:query')")
|
||||
public CommonResult<PageResult<ContractHistoryRespVO>> getContractHistoryPage(@Valid ContractHistoryPageReqVO pageReqVO) {
|
||||
PageResult<ContractHistoryDO> pageResult = contractHistoryService.getContractHistoryPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ContractHistoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出历史合同 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportContractHistoryExcel(@Valid ContractHistoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ContractHistoryDO> list = contractHistoryService.getContractHistoryPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "历史合同.xls", "数据", ContractHistoryRespVO.class,
|
||||
BeanUtils.toBean(list, ContractHistoryRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,129 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 历史合同分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ContractHistoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "流程实体id", example = "12536")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "合同名称", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "合同拟定时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] expectedTime;
|
||||
|
||||
@Schema(description = "合同用印时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] printingTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] archiveTime;
|
||||
|
||||
@Schema(description = "合同状态", example = "1")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "计费方式", example = "2")
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同url", example = "https://www.iocoder.cn")
|
||||
private String contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "优惠", example = "18154")
|
||||
private String discount;
|
||||
|
||||
@Schema(description = "是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "占主合同比例")
|
||||
private String extProportion;
|
||||
|
||||
@Schema(description = "审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
private String reviewFileUrl;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
@Schema(description = "是否删除")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户编号", example = "23584")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
private BigDecimal designAmount;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "测量费")
|
||||
private BigDecimal measurementFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "合同", example = "20704")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,186 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 历史合同 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractHistoryRespVO {
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@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 ReminderTime;
|
||||
|
||||
@Schema(description = "暂定结算数")
|
||||
@ExcelProperty("暂定结算数")
|
||||
private BigDecimal provisionalSettlement;
|
||||
|
||||
@Schema(description = "出图公司", requiredMode = Schema.RequiredMode.REQUIRED,example = "***设计院")
|
||||
@ExcelProperty("出图公司")
|
||||
private String drawingCompany;
|
||||
|
||||
@Schema(description = "预计合同金额", requiredMode = Schema.RequiredMode.REQUIRED,example = "200.0000")
|
||||
@ExcelProperty("预计合同金额")
|
||||
private BigDecimal expectedContractAmount;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "流程实体id", example = "12536")
|
||||
@ExcelProperty("流程实体id")
|
||||
private String processInstanceId;
|
||||
|
||||
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("合同类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "合同拟定时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同拟定时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "合同用印时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同用印时间")
|
||||
private LocalDateTime printingTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("合同状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "计费方式", example = "2")
|
||||
@ExcelProperty("计费方式")
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同url")
|
||||
private String contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty("资金来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "优惠", example = "18154")
|
||||
@ExcelProperty("优惠")
|
||||
private String discount;
|
||||
|
||||
@Schema(description = "是否联合体")
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "占主合同比例")
|
||||
@ExcelProperty("占主合同比例")
|
||||
private String extProportion;
|
||||
|
||||
@Schema(description = "审定金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("审核文件url")
|
||||
private String reviewFileUrl;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
@ExcelProperty("创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
@ExcelProperty("更新者")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否删除")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23584")
|
||||
@ExcelProperty("租户编号")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
@ExcelProperty("签订合同总额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费")
|
||||
@ExcelProperty("前期费")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
@ExcelProperty("设计费")
|
||||
private BigDecimal designAmount;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
@ExcelProperty("勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "测量费")
|
||||
@ExcelProperty("测量费")
|
||||
private BigDecimal measurementFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
@ExcelProperty("其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
@ExcelProperty("流程状态")
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "合同", example = "20704")
|
||||
@ExcelProperty("合同")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
@ExcelProperty("版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,135 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 历史合同新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractHistorySaveReqVO {
|
||||
|
||||
@Schema(description = "历史合同编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "流程实体id", example = "12536")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "合同名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "合同类型不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "合同进展不能为空")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "合同拟定时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "合同拟定时间不能为空")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "合同用印时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "合同用印时间不能为空")
|
||||
private LocalDateTime printingTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "合同状态不能为空")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "计费方式", example = "2")
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同url", example = "https://www.iocoder.cn")
|
||||
private String contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "优惠", example = "18154")
|
||||
private String discount;
|
||||
|
||||
@Schema(description = "是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "占主合同比例")
|
||||
private String extProportion;
|
||||
|
||||
@Schema(description = "审定金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "审定金额不能为空")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
private String reviewFileUrl;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "创建时间不能为空")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "更新时间不能为空")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否删除不能为空")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23584")
|
||||
@NotNull(message = "租户编号不能为空")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
private BigDecimal designAmount;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "测量费")
|
||||
private BigDecimal measurementFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "合同", example = "20704")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -1,95 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import cn.iocoder.yudao.module.cms.service.contractouts.ContractOutsService;
|
||||
|
||||
@Tag(name = "管理后台 - 外包合同关联")
|
||||
@RestController
|
||||
@RequestMapping("/cms/contract-outs")
|
||||
@Validated
|
||||
public class ContractOutsController {
|
||||
|
||||
@Resource
|
||||
private ContractOutsService contractOutsService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建外包合同关联")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:create')")
|
||||
public CommonResult<Long> createContractOuts(@Valid @RequestBody ContractOutsSaveReqVO createReqVO) {
|
||||
return success(contractOutsService.createContractOuts(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新外包合同关联")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:update')")
|
||||
public CommonResult<Boolean> updateContractOuts(@Valid @RequestBody ContractOutsSaveReqVO updateReqVO) {
|
||||
contractOutsService.updateContractOuts(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除外包合同关联")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:delete')")
|
||||
public CommonResult<Boolean> deleteContractOuts(@RequestParam("id") Long id) {
|
||||
contractOutsService.deleteContractOuts(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得外包合同关联")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:query')")
|
||||
public CommonResult<ContractOutsRespVO> getContractOuts(@RequestParam("id") Long id) {
|
||||
ContractOutsDO contractOuts = contractOutsService.getContractOuts(id);
|
||||
return success(BeanUtils.toBean(contractOuts, ContractOutsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得外包合同关联分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:query')")
|
||||
public CommonResult<PageResult<ContractOutsRespVO>> getContractOutsPage(@Valid ContractOutsPageReqVO pageReqVO) {
|
||||
PageResult<ContractOutsDO> pageResult = contractOutsService.getContractOutsPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ContractOutsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出外包合同关联 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportContractOutsExcel(@Valid ContractOutsPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ContractOutsDO> list = contractOutsService.getContractOutsPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "外包合同关联.xls", "数据", ContractOutsRespVO.class,
|
||||
BeanUtils.toBean(list, ContractOutsRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同关联分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ContractOutsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "合同id", example = "16187")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "外包合同id", example = "9277")
|
||||
private Long outsContractId;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] cteateTime;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updator;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updateTime;
|
||||
|
||||
@Schema(description = "是否删除")
|
||||
private Boolean delete;
|
||||
|
||||
@Schema(description = "租户id", example = "15943")
|
||||
private Long tenantId;
|
||||
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同关联 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractOutsRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7688")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16187")
|
||||
@ExcelProperty("合同id")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "外包合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9277")
|
||||
@ExcelProperty("外包合同id")
|
||||
private Long outsContractId;
|
||||
|
||||
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建人")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime cteateTime;
|
||||
|
||||
@Schema(description = "更新人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("更新人")
|
||||
private String updator;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否删除")
|
||||
private Boolean delete;
|
||||
|
||||
@Schema(description = "租户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "15943")
|
||||
@ExcelProperty("租户id")
|
||||
private Long tenantId;
|
||||
|
||||
}
|
@@ -1,47 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同关联新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractOutsSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7688")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16187")
|
||||
@NotNull(message = "合同id不能为空")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "外包合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9277")
|
||||
@NotNull(message = "外包合同id不能为空")
|
||||
private Long outsContractId;
|
||||
|
||||
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "创建人不能为空")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime cteateTime;
|
||||
|
||||
@Schema(description = "更新人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "更新人不能为空")
|
||||
private String updator;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否删除不能为空")
|
||||
private Boolean delete;
|
||||
|
||||
@Schema(description = "租户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "15943")
|
||||
@NotNull(message = "租户id不能为空")
|
||||
private Long tenantId;
|
||||
|
||||
}
|
@@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import cn.iocoder.yudao.module.cms.service.customerCompany.CustomerCompanyService;
|
||||
|
||||
@Tag(name = "管理后台 - 客户公司")
|
||||
@RestController
|
||||
@RequestMapping("/cms/customer-company")
|
||||
@Validated
|
||||
public class CustomerCompanyController {
|
||||
|
||||
@Resource
|
||||
private CustomerCompanyService customerCompanyService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建客户公司")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:create')")
|
||||
public CommonResult<Long> createCustomerCompany(@Valid @RequestBody CustomerCompanySaveReqVO createReqVO) {
|
||||
return success(customerCompanyService.createCustomerCompany(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新客户公司")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:update')")
|
||||
public CommonResult<Boolean> updateCustomerCompany(@Valid @RequestBody CustomerCompanySaveReqVO updateReqVO) {
|
||||
customerCompanyService.updateCustomerCompany(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除客户公司")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:delete')")
|
||||
public CommonResult<Boolean> deleteCustomerCompany(@RequestParam("id") Long id) {
|
||||
customerCompanyService.deleteCustomerCompany(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得客户公司")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:query')")
|
||||
public CommonResult<CustomerCompanyRespVO> getCustomerCompany(@RequestParam("id") Long id) {
|
||||
CustomerCompanyDO customerCompany = customerCompanyService.getCustomerCompany(id);
|
||||
return success(BeanUtils.toBean(customerCompany, CustomerCompanyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得客户公司分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:query')")
|
||||
public CommonResult<PageResult<CustomerCompanyRespVO>> getCustomerCompanyPage(@Valid CustomerCompanyPageReqVO pageReqVO) {
|
||||
PageResult<CustomerCompanyDO> pageResult = customerCompanyService.getCustomerCompanyPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CustomerCompanyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出客户公司 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCustomerCompanyExcel(@Valid CustomerCompanyPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CustomerCompanyDO> list = customerCompanyService.getCustomerCompanyPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "客户公司.xls", "数据", CustomerCompanyRespVO.class,
|
||||
BeanUtils.toBean(list, CustomerCompanyRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 客户公司分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CustomerCompanyPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "联系人", example = "张三")
|
||||
private String contacts;
|
||||
|
||||
@Schema(description = "公司名称", example = "电力公司")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 客户公司 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CustomerCompanyRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14907")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("联系人")
|
||||
private String contacts;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "电力公司")
|
||||
@ExcelProperty("公司名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "电话")
|
||||
@ExcelProperty("电话")
|
||||
private String phone;
|
||||
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 客户公司新增/修改 Request VO")
|
||||
@Data
|
||||
public class CustomerCompanySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14907")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "联系人不能为空")
|
||||
private String contacts;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "电力公司")
|
||||
@NotEmpty(message = "公司名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
|
||||
}
|
@@ -1,9 +1,8 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontract;
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.service.extcontract.ExtContractService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -32,7 +31,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - 外部合同")
|
||||
@RestController
|
||||
@RequestMapping("/cms-ext/ext-contract")
|
||||
@RequestMapping("/cms/ext-contract")
|
||||
@Validated
|
||||
public class ExtContractController {
|
||||
|
||||
@@ -56,7 +55,7 @@ public class ExtContractController {
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除外部合同")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@Parameter(name = "id", description = "外部合同编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:delete')")
|
||||
public CommonResult<Boolean> deleteExtContract(@RequestParam("id") Long id) {
|
||||
extContractService.deleteExtContract(id);
|
||||
@@ -65,7 +64,7 @@ public class ExtContractController {
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得外部合同")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@Parameter(name = "id", description = "外部合同编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:query')")
|
||||
public CommonResult<ExtContractRespVO> getExtContract(@RequestParam("id") Long id) {
|
||||
ExtContractRespVO extContract = extContractService.getExtContract(id);
|
||||
@@ -76,8 +75,8 @@ public class ExtContractController {
|
||||
@Operation(summary = "获得外部合同分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:query')")
|
||||
public CommonResult<PageResult<ExtContractRespVO>> getExtContractPage(@Valid ExtContractPageReqVO pageReqVO) {
|
||||
PageResult<ExtContractDO> pageResult = extContractService.getExtContractPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ExtContractRespVO.class));
|
||||
PageResult<ExtContractRespVO> pageResult = extContractService.getExtContractPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@@ -87,7 +86,7 @@ public class ExtContractController {
|
||||
public void exportExtContractExcel(@Valid ExtContractPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ExtContractDO> list = extContractService.getExtContractPage(pageReqVO).getList();
|
||||
List<ExtContractRespVO> list = extContractService.getExtContractPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "外部合同.xls", "数据", ExtContractRespVO.class,
|
||||
BeanUtils.toBean(list, ExtContractRespVO.class));
|
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo;
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -90,7 +90,7 @@ public class ExtContractPageReqVO extends PageParam {
|
||||
@Schema(description = "联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "合同提示时间")
|
||||
@Schema(description = "分包合同提示时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reminderTime;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo;
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@@ -39,8 +39,8 @@ public class ExtContractRespVO {
|
||||
@ExcelProperty("项目经理")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "合同提示时间")
|
||||
@ExcelProperty("合同提示时间")
|
||||
@Schema(description = "分包合同提示时间")
|
||||
@ExcelProperty("分包合同提示时间")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
@@ -107,9 +107,10 @@ public class ExtContractRespVO {
|
||||
@ExcelProperty("资金来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "分包合同提示时间")
|
||||
@ExcelProperty("分包合同提示时间")
|
||||
private LocalDateTime subReminderTime;
|
||||
|
||||
@Schema(description = "合同提示时间")
|
||||
@ExcelProperty("合同提示时间")
|
||||
private LocalDateTime exReminderTime;
|
||||
|
||||
@Schema(description = "收费标准", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("收费标准")
|
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo;
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
@@ -92,7 +92,7 @@ public class ExtContractSaveReqVO {
|
||||
@Schema(description = "联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "合同提示时间")
|
||||
@Schema(description = "分包合同提示时间")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "审定金额")
|
||||
@@ -118,10 +118,6 @@ public class ExtContractSaveReqVO {
|
||||
@NotNull(message = "更新时间不能为空")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "是否删除", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否删除不能为空")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "租户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "12587")
|
||||
@NotNull(message = "租户编号不能为空")
|
||||
private Long tenantId;
|
@@ -1,95 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontracthistory.OutsContractHistoryDO;
|
||||
import cn.iocoder.yudao.module.cms.service.outscontracthistory.OutsContractHistoryService;
|
||||
|
||||
@Tag(name = "管理后台 - 外包合同历史")
|
||||
@RestController
|
||||
@RequestMapping("/cms/outs-contract-history")
|
||||
@Validated
|
||||
public class OutsContractHistoryController {
|
||||
|
||||
@Resource
|
||||
private OutsContractHistoryService outsContractHistoryService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建外包合同历史")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract-history:create')")
|
||||
public CommonResult<Long> createOutsContractHistory(@Valid @RequestBody OutsContractHistorySaveReqVO createReqVO) {
|
||||
return success(outsContractHistoryService.createOutsContractHistory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新外包合同历史")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract-history:update')")
|
||||
public CommonResult<Boolean> updateOutsContractHistory(@Valid @RequestBody OutsContractHistorySaveReqVO updateReqVO) {
|
||||
outsContractHistoryService.updateOutsContractHistory(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除外包合同历史")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract-history:delete')")
|
||||
public CommonResult<Boolean> deleteOutsContractHistory(@RequestParam("id") Long id) {
|
||||
outsContractHistoryService.deleteOutsContractHistory(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得外包合同历史")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract-history:query')")
|
||||
public CommonResult<OutsContractHistoryRespVO> getOutsContractHistory(@RequestParam("id") Long id) {
|
||||
OutsContractHistoryDO outsContractHistory = outsContractHistoryService.getOutsContractHistory(id);
|
||||
return success(BeanUtils.toBean(outsContractHistory, OutsContractHistoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得外包合同历史分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract-history:query')")
|
||||
public CommonResult<PageResult<OutsContractHistoryRespVO>> getOutsContractHistoryPage(@Valid OutsContractHistoryPageReqVO pageReqVO) {
|
||||
PageResult<OutsContractHistoryDO> pageResult = outsContractHistoryService.getOutsContractHistoryPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, OutsContractHistoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出外包合同历史 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract-history:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportOutsContractHistoryExcel(@Valid OutsContractHistoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<OutsContractHistoryDO> list = outsContractHistoryService.getOutsContractHistoryPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "外包合同历史.xls", "数据", OutsContractHistoryRespVO.class,
|
||||
BeanUtils.toBean(list, OutsContractHistoryRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@@ -1,66 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同历史分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OutsContractHistoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "项目id", example = "31803")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同名称", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "主合同id", example = "19949")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "专业")
|
||||
private String major;
|
||||
|
||||
@Schema(description = "流程实体id", example = "32397")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] signingTime;
|
||||
|
||||
@Schema(description = "结算数")
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
@Schema(description = "合同文件url", example = "https://www.iocoder.cn")
|
||||
private String contractFileUrl;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "外包合同id", example = "24736")
|
||||
private Long outsContractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -1,84 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同历史 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OutsContractHistoryRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16040")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31803")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同名称", example = "芋艿")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "主合同id", example = "19949")
|
||||
@ExcelProperty("主合同id")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
@ExcelProperty(value = "类型", converter = DictConvert.class)
|
||||
@DictFormat("contract_billing_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "合同金额")
|
||||
@ExcelProperty("合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "编号")
|
||||
@ExcelProperty("编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "专业")
|
||||
@ExcelProperty(value = "专业", converter = DictConvert.class)
|
||||
@DictFormat("major") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||
private String major;
|
||||
|
||||
@Schema(description = "流程实体id", example = "32397")
|
||||
@ExcelProperty("流程实体id")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "结算数")
|
||||
@ExcelProperty("结算数")
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
@Schema(description = "合同文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同文件url")
|
||||
private String contractFileUrl;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
@ExcelProperty("流程状态")
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "外包合同id", example = "24736")
|
||||
@ExcelProperty("外包合同id")
|
||||
private Long outsContractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
@ExcelProperty("版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -1,61 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同历史新增/修改 Request VO")
|
||||
@Data
|
||||
public class OutsContractHistorySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16040")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31803")
|
||||
@NotNull(message = "项目id不能为空")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同名称", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "主合同id", example = "19949")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "专业")
|
||||
private String major;
|
||||
|
||||
@Schema(description = "流程实体id", example = "32397")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "结算数")
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
@Schema(description = "合同文件url", example = "https://www.iocoder.cn")
|
||||
private String contractFileUrl;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "外包合同id", example = "24736")
|
||||
private Long outsContractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,152 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 历史合同 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("cms_contract_history")
|
||||
@KeySequence("cms_contract_history_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ContractHistoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 流程实体id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 合同进展
|
||||
*/
|
||||
private String progress;
|
||||
/**
|
||||
* 合同拟定时间
|
||||
*/
|
||||
private LocalDateTime expectedTime;
|
||||
/**
|
||||
* 合同用印时间
|
||||
*/
|
||||
private LocalDateTime printingTime;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
private LocalDateTime archiveTime;
|
||||
/**
|
||||
* 合同状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 计费方式
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 合同url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 建安费
|
||||
*/
|
||||
private BigDecimal constructionCost;
|
||||
/**
|
||||
* 资金来源
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 优惠
|
||||
*/
|
||||
private String discount;
|
||||
/**
|
||||
* 是否联合体
|
||||
*/
|
||||
private Boolean consortium;
|
||||
/**
|
||||
* 联合体单位
|
||||
*/
|
||||
private String consortiumCompany;
|
||||
/**
|
||||
* 占主合同比例
|
||||
*/
|
||||
private String extProportion;
|
||||
/**
|
||||
* 审定金额
|
||||
*/
|
||||
private BigDecimal approvedAmount;
|
||||
/**
|
||||
* 审核文件url
|
||||
*/
|
||||
private String reviewFileUrl;
|
||||
/**
|
||||
* 签订合同总额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 前期费
|
||||
*/
|
||||
private BigDecimal preAmount;
|
||||
/**
|
||||
* 设计费
|
||||
*/
|
||||
private BigDecimal designAmount;
|
||||
/**
|
||||
* 勘测费
|
||||
*/
|
||||
private BigDecimal surveyFees;
|
||||
/**
|
||||
* 测量费
|
||||
*/
|
||||
private BigDecimal measurementFee;
|
||||
/**
|
||||
* 其他费
|
||||
*/
|
||||
private BigDecimal otherFee;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String processStatus;
|
||||
/**
|
||||
* 合同
|
||||
*/
|
||||
private Long contractId;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.contractouts;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 外包合同关联 DO
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@TableName("cms_contract_outs")
|
||||
@KeySequence("cms_contract_outs_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ContractOutsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
private Long contractId;
|
||||
/**
|
||||
* 外包合同id
|
||||
*/
|
||||
private Long outsContractId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime cteateTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updator;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean delete;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany;
|
||||
|
||||
import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 客户公司 DO
|
||||
*
|
||||
* @author hhyykk
|
||||
*/
|
||||
@TableName("cms_customer_company")
|
||||
@KeySequence("cms_customer_company_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CustomerCompanyDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contacts;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
}
|
@@ -1,12 +1,7 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.extcontract;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.extContract;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
@@ -127,10 +122,6 @@ public class ExtContractDO extends BaseDO {
|
||||
*/
|
||||
private String consortiumCompany;
|
||||
|
||||
/**
|
||||
* 分包合同提示时间
|
||||
*/
|
||||
private LocalDateTime subReminderTime;
|
||||
/**
|
||||
* 审定金额
|
||||
*/
|
||||
@@ -145,7 +136,7 @@ public class ExtContractDO extends BaseDO {
|
||||
private Long contractId;
|
||||
|
||||
/**
|
||||
* 合同提示时间
|
||||
* 分包合同提示时间
|
||||
*/
|
||||
private LocalDateTime reminderTime;
|
||||
|
@@ -1,78 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.outscontract;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 外包合同 DO
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@TableName("cms_outs_contract")
|
||||
@KeySequence("cms_outs_contract_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OutsContractDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 主合同id
|
||||
*/
|
||||
private Long contractId;
|
||||
/**
|
||||
* 类型
|
||||
*
|
||||
* 枚举 {@link TODO contract_billing_type 对应的类}
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 专业
|
||||
*
|
||||
* 枚举 {@link TODO major 对应的类}
|
||||
*/
|
||||
private String major;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 结算数
|
||||
*/
|
||||
private BigDecimal settlementAmount;
|
||||
/**
|
||||
* 合同文件url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
|
||||
}
|
@@ -1,94 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.outscontracthistory;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 外包合同历史 DO
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@TableName("cms_outs_contract_history")
|
||||
@KeySequence("cms_outs_contract_history_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OutsContractHistoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 主合同id
|
||||
*/
|
||||
private Long contractId;
|
||||
/**
|
||||
* 类型
|
||||
*
|
||||
* 枚举 {@link TODO contract_billing_type 对应的类}
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 专业
|
||||
*
|
||||
* 枚举 {@link TODO major 对应的类}
|
||||
*/
|
||||
private String major;
|
||||
/**
|
||||
* 流程实体id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 结算数
|
||||
*/
|
||||
private BigDecimal settlementAmount;
|
||||
/**
|
||||
* 合同文件url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String processStatus;
|
||||
/**
|
||||
* 外包合同id
|
||||
*/
|
||||
private Long outsContractId;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.contractHistory;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory.ContractHistoryDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
|
||||
/**
|
||||
* 历史合同 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractHistoryMapper extends BaseMapperX<ContractHistoryDO> {
|
||||
|
||||
default PageResult<ContractHistoryDO> selectPage(ContractHistoryPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ContractHistoryDO>()
|
||||
.eqIfPresent(ContractHistoryDO::getProcessInstanceId, reqVO.getProcessInstanceId())
|
||||
.likeIfPresent(ContractHistoryDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ContractHistoryDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ContractHistoryDO::getProgress, reqVO.getProgress())
|
||||
.betweenIfPresent(ContractHistoryDO::getExpectedTime, reqVO.getExpectedTime())
|
||||
.betweenIfPresent(ContractHistoryDO::getPrintingTime, reqVO.getPrintingTime())
|
||||
.betweenIfPresent(ContractHistoryDO::getSigningTime, reqVO.getSigningTime())
|
||||
.betweenIfPresent(ContractHistoryDO::getArchiveTime, reqVO.getArchiveTime())
|
||||
.eqIfPresent(ContractHistoryDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(ContractHistoryDO::getCountType, reqVO.getCountType())
|
||||
.eqIfPresent(ContractHistoryDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ContractHistoryDO::getContractFileUrl, reqVO.getContractFileUrl())
|
||||
.eqIfPresent(ContractHistoryDO::getConstructionCost, reqVO.getConstructionCost())
|
||||
.eqIfPresent(ContractHistoryDO::getSource, reqVO.getSource())
|
||||
.eqIfPresent(ContractHistoryDO::getDiscount, reqVO.getDiscount())
|
||||
.eqIfPresent(ContractHistoryDO::getConsortium, reqVO.getConsortium())
|
||||
.eqIfPresent(ContractHistoryDO::getConsortiumCompany, reqVO.getConsortiumCompany())
|
||||
.eqIfPresent(ContractHistoryDO::getExtProportion, reqVO.getExtProportion())
|
||||
.eqIfPresent(ContractHistoryDO::getApprovedAmount, reqVO.getApprovedAmount())
|
||||
.eqIfPresent(ContractHistoryDO::getReviewFileUrl, reqVO.getReviewFileUrl())
|
||||
.eqIfPresent(ContractHistoryDO::getCreator, reqVO.getCreator())
|
||||
.betweenIfPresent(ContractHistoryDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ContractHistoryDO::getUpdater, reqVO.getUpdater())
|
||||
.betweenIfPresent(ContractHistoryDO::getUpdateTime, reqVO.getUpdateTime())
|
||||
.eqIfPresent(ContractHistoryDO::getDeleted, reqVO.getDeleted())
|
||||
.eqIfPresent(ContractHistoryDO::getAmount, reqVO.getAmount())
|
||||
.eqIfPresent(ContractHistoryDO::getPreAmount, reqVO.getPreAmount())
|
||||
.eqIfPresent(ContractHistoryDO::getDesignAmount, reqVO.getDesignAmount())
|
||||
.eqIfPresent(ContractHistoryDO::getSurveyFees, reqVO.getSurveyFees())
|
||||
.eqIfPresent(ContractHistoryDO::getMeasurementFee, reqVO.getMeasurementFee())
|
||||
.eqIfPresent(ContractHistoryDO::getOtherFee, reqVO.getOtherFee())
|
||||
.eqIfPresent(ContractHistoryDO::getProcessStatus, reqVO.getProcessStatus())
|
||||
.eqIfPresent(ContractHistoryDO::getContractId, reqVO.getContractId())
|
||||
.eqIfPresent(ContractHistoryDO::getVersion, reqVO.getVersion())
|
||||
.orderByDesc(ContractHistoryDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.contractouts;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.*;
|
||||
|
||||
/**
|
||||
* 外包合同关联 Mapper
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractOutsMapper extends BaseMapperX<ContractOutsDO> {
|
||||
|
||||
default PageResult<ContractOutsDO> selectPage(ContractOutsPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ContractOutsDO>()
|
||||
.eqIfPresent(ContractOutsDO::getContractId, reqVO.getContractId())
|
||||
.eqIfPresent(ContractOutsDO::getOutsContractId, reqVO.getOutsContractId())
|
||||
.eqIfPresent(ContractOutsDO::getCreator, reqVO.getCreator())
|
||||
.betweenIfPresent(ContractOutsDO::getCteateTime, reqVO.getCteateTime())
|
||||
.eqIfPresent(ContractOutsDO::getUpdator, reqVO.getUpdator())
|
||||
.betweenIfPresent(ContractOutsDO::getUpdateTime, reqVO.getUpdateTime())
|
||||
.eqIfPresent(ContractOutsDO::getDelete, reqVO.getDelete())
|
||||
.eqIfPresent(ContractOutsDO::getTenantId, reqVO.getTenantId())
|
||||
.orderByDesc(ContractOutsDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.customerCompany;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
|
||||
/**
|
||||
* 客户公司 Mapper
|
||||
*
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Mapper
|
||||
public interface CustomerCompanyMapper extends BaseMapperX<CustomerCompanyDO> {
|
||||
|
||||
default PageResult<CustomerCompanyDO> selectPage(CustomerCompanyPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<CustomerCompanyDO>()
|
||||
.likeIfPresent(CustomerCompanyDO::getContacts, reqVO.getContacts())
|
||||
.likeIfPresent(CustomerCompanyDO::getName, reqVO.getName())
|
||||
.eqIfPresent(CustomerCompanyDO::getAddress, reqVO.getAddress())
|
||||
.eqIfPresent(CustomerCompanyDO::getPhone, reqVO.getPhone())
|
||||
.orderByDesc(CustomerCompanyDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -1,10 +1,10 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.extcontract;
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.extContract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extContract.ExtContractDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,8 @@ public interface ExtContractMapper extends BaseMapperX<ExtContractDO> {
|
||||
.eqIfPresent(ExtContractDO::getReviewFileUrl, reqVO.getReviewFileUrl())
|
||||
.betweenIfPresent(ExtContractDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ExtContractDO::getContractId, reqVO.getContractId())
|
||||
.orderByDesc(ExtContractDO::getId));
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.outscontract;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontract.OutsContractDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.*;
|
||||
|
||||
/**
|
||||
* 外包合同 Mapper
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Mapper
|
||||
public interface OutsContractMapper extends BaseMapperX<OutsContractDO> {
|
||||
|
||||
default PageResult<OutsContractDO> selectPage(OutsContractPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<OutsContractDO>()
|
||||
.eqIfPresent(OutsContractDO::getProjectId, reqVO.getProjectId())
|
||||
.likeIfPresent(OutsContractDO::getName, reqVO.getName())
|
||||
.eqIfPresent(OutsContractDO::getContractId, reqVO.getContractId())
|
||||
.eqIfPresent(OutsContractDO::getCountType, reqVO.getCountType())
|
||||
.eqIfPresent(OutsContractDO::getAmount, reqVO.getAmount())
|
||||
.eqIfPresent(OutsContractDO::getCode, reqVO.getCode())
|
||||
.eqIfPresent(OutsContractDO::getMajor, reqVO.getMajor())
|
||||
.betweenIfPresent(OutsContractDO::getSigningTime, reqVO.getSigningTime())
|
||||
.eqIfPresent(OutsContractDO::getSettlementAmount, reqVO.getSettlementAmount())
|
||||
.eqIfPresent(OutsContractDO::getContractFileUrl, reqVO.getContractFileUrl())
|
||||
.betweenIfPresent(OutsContractDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(OutsContractDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.outscontracthistory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontracthistory.OutsContractHistoryDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory.vo.*;
|
||||
|
||||
/**
|
||||
* 外包合同历史 Mapper
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Mapper
|
||||
public interface OutsContractHistoryMapper extends BaseMapperX<OutsContractHistoryDO> {
|
||||
|
||||
default PageResult<OutsContractHistoryDO> selectPage(OutsContractHistoryPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<OutsContractHistoryDO>()
|
||||
.eqIfPresent(OutsContractHistoryDO::getProjectId, reqVO.getProjectId())
|
||||
.likeIfPresent(OutsContractHistoryDO::getName, reqVO.getName())
|
||||
.eqIfPresent(OutsContractHistoryDO::getContractId, reqVO.getContractId())
|
||||
.eqIfPresent(OutsContractHistoryDO::getCountType, reqVO.getCountType())
|
||||
.eqIfPresent(OutsContractHistoryDO::getAmount, reqVO.getAmount())
|
||||
.eqIfPresent(OutsContractHistoryDO::getCode, reqVO.getCode())
|
||||
.eqIfPresent(OutsContractHistoryDO::getMajor, reqVO.getMajor())
|
||||
.eqIfPresent(OutsContractHistoryDO::getProcessInstanceId, reqVO.getProcessInstanceId())
|
||||
.betweenIfPresent(OutsContractHistoryDO::getSigningTime, reqVO.getSigningTime())
|
||||
.eqIfPresent(OutsContractHistoryDO::getSettlementAmount, reqVO.getSettlementAmount())
|
||||
.eqIfPresent(OutsContractHistoryDO::getContractFileUrl, reqVO.getContractFileUrl())
|
||||
.betweenIfPresent(OutsContractHistoryDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(OutsContractHistoryDO::getProcessStatus, reqVO.getProcessStatus())
|
||||
.eqIfPresent(OutsContractHistoryDO::getOutsContractId, reqVO.getOutsContractId())
|
||||
.eqIfPresent(OutsContractHistoryDO::getVersion, reqVO.getVersion())
|
||||
.orderByDesc(OutsContractHistoryDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -1,8 +1,7 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contract;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.contract.ContractMapper;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.extcontract.ExtContractMapper;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.extContract.ExtContractMapper;
|
||||
import cn.iocoder.yudao.module.pms.api.ProjectApi;
|
||||
import cn.iocoder.yudao.module.pms.api.project.dto.ProjectDetailRespDTO;
|
||||
import cn.iocoder.yudao.module.pms.api.project.dto.ProjectRespDTO;
|
||||
@@ -18,7 +17,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -100,9 +98,9 @@ public class ContractServiceImpl implements ContractService {
|
||||
contractRespVO.setProjectManager(projectDetail.getProjectManagerName());
|
||||
|
||||
//分包合同商议提示
|
||||
ExtContractDO extContractDO = extContractMapper.selectOne("project_id",projectId);
|
||||
LocalDateTime reminderTime = extContractDO.getSubReminderTime();
|
||||
contractRespVO.setSubReminderTime(reminderTime);
|
||||
// ExtContractDO extContractDO = extContractMapper.selectOne("project_id",projectId);
|
||||
// LocalDateTime reminderTime = extContractDO.getSubReminderTime();
|
||||
// contractRespVO.setSubReminderTime(reminderTime);
|
||||
|
||||
//暂定结算数
|
||||
BigDecimal provisionalSettlement = getProvisionalSettlement(id);
|
||||
@@ -132,7 +130,7 @@ public class ContractServiceImpl implements ContractService {
|
||||
@Override
|
||||
public BigDecimal getProvisionalSettlement(Long id) {
|
||||
ContractDO contractDO = contractMapper.selectById(id);
|
||||
String type = contractDO.getType();
|
||||
String type = contractDO.getCountType();
|
||||
BigDecimal amount = contractDO.getAmount();
|
||||
BigDecimal bigDecimal = new BigDecimal(String.valueOf(amount));
|
||||
BigDecimal mul = new BigDecimal("0.85");
|
||||
|
@@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contracthistory;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory.ContractHistoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 历史合同 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ContractHistoryService {
|
||||
|
||||
/**
|
||||
* 创建历史合同
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createContractHistory(@Valid ContractHistorySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新历史合同
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateContractHistory(@Valid ContractHistorySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除历史合同
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteContractHistory(Long id);
|
||||
|
||||
/**
|
||||
* 获得历史合同
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 历史合同
|
||||
*/
|
||||
ContractHistoryDO getContractHistory(Long id);
|
||||
|
||||
/**
|
||||
* 获得历史合同分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 历史合同分页
|
||||
*/
|
||||
PageResult<ContractHistoryDO> getContractHistoryPage(ContractHistoryPageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -0,0 +1,70 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contracthistory;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory.ContractHistoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.contractHistory.ContractHistoryMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 历史合同 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ContractHistoryServiceImpl implements ContractHistoryService {
|
||||
|
||||
@Resource
|
||||
private ContractHistoryMapper contractHistoryMapper;
|
||||
|
||||
@Override
|
||||
public Long createContractHistory(ContractHistorySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ContractHistoryDO contractHistory = BeanUtils.toBean(createReqVO, ContractHistoryDO.class);
|
||||
contractHistoryMapper.insert(contractHistory);
|
||||
// 返回
|
||||
return contractHistory.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateContractHistory(ContractHistorySaveReqVO updateReqVO) {
|
||||
// 更新
|
||||
ContractHistoryDO updateObj = BeanUtils.toBean(updateReqVO, ContractHistoryDO.class);
|
||||
contractHistoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContractHistory(Long id) {
|
||||
// 校验存在
|
||||
validateContractHistoryExists(id);
|
||||
// 删除
|
||||
contractHistoryMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateContractHistoryExists(Long id) {
|
||||
if (contractHistoryMapper.selectById(id) == null) {
|
||||
throw exception(CONTRACT_HISTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractHistoryDO getContractHistory(Long id) {
|
||||
return contractHistoryMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PageResult<ContractHistoryDO> getContractHistoryPage(ContractHistoryPageReqVO pageReqVO) {
|
||||
return contractHistoryMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contractouts;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 外包合同关联 Service 接口
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
public interface ContractOutsService {
|
||||
|
||||
/**
|
||||
* 创建外包合同关联
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createContractOuts(@Valid ContractOutsSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新外包合同关联
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateContractOuts(@Valid ContractOutsSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除外包合同关联
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteContractOuts(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同关联
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 外包合同关联
|
||||
*/
|
||||
ContractOutsDO getContractOuts(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同关联分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外包合同关联分页
|
||||
*/
|
||||
PageResult<ContractOutsDO> getContractOutsPage(ContractOutsPageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contractouts;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.contractouts.ContractOutsMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 外包合同关联 Service 实现类
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ContractOutsServiceImpl implements ContractOutsService {
|
||||
|
||||
@Resource
|
||||
private ContractOutsMapper contractOutsMapper;
|
||||
|
||||
@Override
|
||||
public Long createContractOuts(ContractOutsSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ContractOutsDO contractOuts = BeanUtils.toBean(createReqVO, ContractOutsDO.class);
|
||||
contractOutsMapper.insert(contractOuts);
|
||||
// 返回
|
||||
return contractOuts.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateContractOuts(ContractOutsSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateContractOutsExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ContractOutsDO updateObj = BeanUtils.toBean(updateReqVO, ContractOutsDO.class);
|
||||
contractOutsMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContractOuts(Long id) {
|
||||
// 校验存在
|
||||
validateContractOutsExists(id);
|
||||
// 删除
|
||||
contractOutsMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateContractOutsExists(Long id) {
|
||||
if (contractOutsMapper.selectById(id) == null) {
|
||||
throw exception(CONTRACT_OUTS_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractOutsDO getContractOuts(Long id) {
|
||||
return contractOutsMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ContractOutsDO> getContractOutsPage(ContractOutsPageReqVO pageReqVO) {
|
||||
return contractOutsMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.cms.service.customerCompany;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 客户公司 Service 接口
|
||||
*
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface CustomerCompanyService {
|
||||
|
||||
/**
|
||||
* 创建客户公司
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createCustomerCompany(@Valid CustomerCompanySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新客户公司
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateCustomerCompany(@Valid CustomerCompanySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除客户公司
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteCustomerCompany(Long id);
|
||||
|
||||
/**
|
||||
* 获得客户公司
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 客户公司
|
||||
*/
|
||||
CustomerCompanyDO getCustomerCompany(Long id);
|
||||
|
||||
/**
|
||||
* 获得客户公司分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 客户公司分页
|
||||
*/
|
||||
PageResult<CustomerCompanyDO> getCustomerCompanyPage(CustomerCompanyPageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.cms.service.customerCompany;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.customerCompany.CustomerCompanyMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 客户公司 Service 实现类
|
||||
*
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class CustomerCompanyServiceImpl implements CustomerCompanyService {
|
||||
|
||||
@Resource
|
||||
private CustomerCompanyMapper customerCompanyMapper;
|
||||
|
||||
@Override
|
||||
public Long createCustomerCompany(CustomerCompanySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
CustomerCompanyDO customerCompany = BeanUtils.toBean(createReqVO, CustomerCompanyDO.class);
|
||||
customerCompanyMapper.insert(customerCompany);
|
||||
// 返回
|
||||
return customerCompany.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCustomerCompany(CustomerCompanySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateCustomerCompanyExists(updateReqVO.getId());
|
||||
// 更新
|
||||
CustomerCompanyDO updateObj = BeanUtils.toBean(updateReqVO, CustomerCompanyDO.class);
|
||||
customerCompanyMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCustomerCompany(Long id) {
|
||||
// 校验存在
|
||||
validateCustomerCompanyExists(id);
|
||||
// 删除
|
||||
customerCompanyMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateCustomerCompanyExists(Long id) {
|
||||
if (customerCompanyMapper.selectById(id) == null) {
|
||||
throw exception(CUSTOMER_COMPANY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomerCompanyDO getCustomerCompany(Long id) {
|
||||
return customerCompanyMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<CustomerCompanyDO> getCustomerCompanyPage(CustomerCompanyPageReqVO pageReqVO) {
|
||||
return customerCompanyMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -1,13 +1,14 @@
|
||||
package cn.iocoder.yudao.module.cms.service.extcontract;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 外部合同 Service 接口
|
||||
*
|
||||
@@ -51,6 +52,12 @@ public interface ExtContractService {
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外部合同分页
|
||||
*/
|
||||
PageResult<ExtContractDO> getExtContractPage(ExtContractPageReqVO pageReqVO);
|
||||
PageResult<ExtContractRespVO> getExtContractPage(ExtContractPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 合同总金额
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
BigDecimal getContractAmount(Long id);
|
||||
}
|
@@ -1,17 +1,25 @@
|
||||
package cn.iocoder.yudao.module.cms.service.extcontract;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.extcontract.ExtContractMapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extContract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.customerCompany.CustomerCompanyMapper;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.extContract.ExtContractMapper;
|
||||
import cn.iocoder.yudao.module.pms.api.ProjectApi;
|
||||
import cn.iocoder.yudao.module.pms.api.project.dto.ProjectDetailRespDTO;
|
||||
import cn.iocoder.yudao.module.pms.api.project.dto.ProjectRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
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;
|
||||
|
||||
@@ -30,6 +38,10 @@ public class ExtContractServiceImpl implements ExtContractService {
|
||||
@Resource
|
||||
private ProjectApi projectApi;
|
||||
|
||||
@Resource
|
||||
private CustomerCompanyMapper customerCompanyMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public Long createExtContract(ExtContractSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
@@ -41,6 +53,9 @@ public class ExtContractServiceImpl implements ExtContractService {
|
||||
|
||||
@Override
|
||||
public void updateExtContract(ExtContractSaveReqVO updateReqVO) {
|
||||
//校验
|
||||
Long id = updateReqVO.getId();
|
||||
validateExtContractExists(id);
|
||||
// 更新
|
||||
ExtContractDO updateObj = BeanUtils.toBean(updateReqVO, ExtContractDO.class);
|
||||
extContractMapper.updateById(updateObj);
|
||||
@@ -61,23 +76,70 @@ public class ExtContractServiceImpl implements ExtContractService {
|
||||
}
|
||||
|
||||
// 需要联表查询
|
||||
// 1.项目编号 pms_project 直接
|
||||
// 2.主控部门(跟踪部门) pms_project找到的是id 需要联表
|
||||
// 3.项目经理 pms_project找到的是id 需要联表
|
||||
// 4.客户名称 pms_project 联表
|
||||
// 5.合同总金额
|
||||
// 1.项目编号 pms_project 直接 √
|
||||
// 2.主控部门(跟踪部门) pms_project找到的是id 需要联表 √
|
||||
// 3.项目经理 pms_project找到的是id 需要联表 √
|
||||
// 4.客户公司名称 pms_project 联表 √
|
||||
// 5.合同总金额 √
|
||||
// 6.合同商议提示(和分包提示不一样)
|
||||
@Override
|
||||
public ExtContractRespVO getExtContract(Long id) {
|
||||
ExtContractDO extContractDO = extContractMapper.selectById(id);
|
||||
Long projectId = extContractDO.getProjectId();
|
||||
Long customerCompanyId = extContractDO.getCustomerCompanyId();
|
||||
ExtContractRespVO extContractRespVO = BeanUtils.toBean(extContractDO, ExtContractRespVO.class);
|
||||
|
||||
return null;
|
||||
|
||||
ProjectRespDTO project = projectApi.getProject(projectId);
|
||||
extContractRespVO.setCode(project.getCode());
|
||||
|
||||
|
||||
ProjectDetailRespDTO projectDetail = projectApi.getProjectDetailById(projectId);
|
||||
extContractRespVO.setTrackingDep(projectDetail.getTrackingDepName());
|
||||
extContractRespVO.setProjectManager(projectDetail.getProjectManagerName());
|
||||
|
||||
//用客户公司id查询
|
||||
CustomerCompanyDO customerCompanyDO = customerCompanyMapper.selectById(customerCompanyId);
|
||||
String name = customerCompanyDO.getName();
|
||||
extContractRespVO.setCustomerCompanyName(name);
|
||||
|
||||
|
||||
//合同总金额
|
||||
BigDecimal contractAmount = getContractAmount(id);
|
||||
extContractRespVO.setAmount(contractAmount);
|
||||
|
||||
|
||||
return extContractRespVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ExtContractDO> getExtContractPage(ExtContractPageReqVO pageReqVO) {
|
||||
return extContractMapper.selectPage(pageReqVO);
|
||||
public PageResult<ExtContractRespVO> getExtContractPage(ExtContractPageReqVO pageReqVO) {
|
||||
|
||||
PageResult<ExtContractDO> extContractDOPageResult = extContractMapper.selectPage(pageReqVO);
|
||||
List<ExtContractDO> excontractDOList = extContractDOPageResult.getList();
|
||||
List<ExtContractRespVO> extContractRespVOList = new ArrayList<>();
|
||||
|
||||
|
||||
for (ExtContractDO extContractDO : excontractDOList) {
|
||||
Long id = extContractDO.getId();
|
||||
ExtContractRespVO extContractRespVO = getExtContract(id);
|
||||
extContractRespVOList.add(extContractRespVO);
|
||||
}
|
||||
PageResult<ExtContractRespVO> pageResult = new PageResult<>();
|
||||
pageResult.setList(extContractRespVOList);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getContractAmount(Long id) {
|
||||
//前期+设计+地勘+其他+检测
|
||||
ExtContractDO extContract = extContractMapper.selectById(id);
|
||||
BigDecimal preAmount = new BigDecimal(String.valueOf(extContract.getPreAmount()));
|
||||
BigDecimal designFee = new BigDecimal(String.valueOf(extContract.getDesignFee()));
|
||||
BigDecimal surveyFees = new BigDecimal(String.valueOf(extContract.getSurveyFees()));
|
||||
BigDecimal testingFee = new BigDecimal(String.valueOf(extContract.getTestingFee()));
|
||||
BigDecimal other = new BigDecimal(extContract.getOtherFee());
|
||||
return preAmount.add(designFee).add(surveyFees).add(testingFee).add(other);
|
||||
}
|
||||
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.outscontract;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontract.OutsContractDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 外包合同 Service 接口
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
public interface OutsContractService {
|
||||
|
||||
/**
|
||||
* 创建外包合同
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createOutsContract(@Valid OutsContractSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新外包合同
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateOutsContract(@Valid OutsContractSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除外包合同
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteOutsContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 外包合同
|
||||
*/
|
||||
OutsContractDO getOutsContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外包合同分页
|
||||
*/
|
||||
PageResult<OutsContractDO> getOutsContractPage(OutsContractPageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.outscontract;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontract.OutsContractDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.outscontract.OutsContractMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 外包合同 Service 实现类
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class OutsContractServiceImpl implements OutsContractService {
|
||||
|
||||
@Resource
|
||||
private OutsContractMapper outsContractMapper;
|
||||
|
||||
@Override
|
||||
public Long createOutsContract(OutsContractSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
OutsContractDO outsContract = BeanUtils.toBean(createReqVO, OutsContractDO.class);
|
||||
outsContractMapper.insert(outsContract);
|
||||
// 返回
|
||||
return outsContract.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOutsContract(OutsContractSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateOutsContractExists(updateReqVO.getId());
|
||||
// 更新
|
||||
OutsContractDO updateObj = BeanUtils.toBean(updateReqVO, OutsContractDO.class);
|
||||
outsContractMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOutsContract(Long id) {
|
||||
// 校验存在
|
||||
validateOutsContractExists(id);
|
||||
// 删除
|
||||
outsContractMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateOutsContractExists(Long id) {
|
||||
if (outsContractMapper.selectById(id) == null) {
|
||||
throw exception(OUTS_CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutsContractDO getOutsContract(Long id) {
|
||||
return outsContractMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<OutsContractDO> getOutsContractPage(OutsContractPageReqVO pageReqVO) {
|
||||
return outsContractMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.outscontracthistory;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontracthistory.OutsContractHistoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 外包合同历史 Service 接口
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
public interface OutsContractHistoryService {
|
||||
|
||||
/**
|
||||
* 创建外包合同历史
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createOutsContractHistory(@Valid OutsContractHistorySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新外包合同历史
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateOutsContractHistory(@Valid OutsContractHistorySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除外包合同历史
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteOutsContractHistory(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同历史
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 外包合同历史
|
||||
*/
|
||||
OutsContractHistoryDO getOutsContractHistory(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同历史分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外包合同历史分页
|
||||
*/
|
||||
PageResult<OutsContractHistoryDO> getOutsContractHistoryPage(OutsContractHistoryPageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.outscontracthistory;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontracthistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontracthistory.OutsContractHistoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.outscontracthistory.OutsContractHistoryMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 外包合同历史 Service 实现类
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class OutsContractHistoryServiceImpl implements OutsContractHistoryService {
|
||||
|
||||
@Resource
|
||||
private OutsContractHistoryMapper outsContractHistoryMapper;
|
||||
|
||||
@Override
|
||||
public Long createOutsContractHistory(OutsContractHistorySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
OutsContractHistoryDO outsContractHistory = BeanUtils.toBean(createReqVO, OutsContractHistoryDO.class);
|
||||
outsContractHistoryMapper.insert(outsContractHistory);
|
||||
// 返回
|
||||
return outsContractHistory.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOutsContractHistory(OutsContractHistorySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateOutsContractHistoryExists(updateReqVO.getId());
|
||||
// 更新
|
||||
OutsContractHistoryDO updateObj = BeanUtils.toBean(updateReqVO, OutsContractHistoryDO.class);
|
||||
outsContractHistoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOutsContractHistory(Long id) {
|
||||
// 校验存在
|
||||
validateOutsContractHistoryExists(id);
|
||||
// 删除
|
||||
outsContractHistoryMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateOutsContractHistoryExists(Long id) {
|
||||
if (outsContractHistoryMapper.selectById(id) == null) {
|
||||
throw exception(OUTS_CONTRACT_HISTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutsContractHistoryDO getOutsContractHistory(Long id) {
|
||||
return outsContractHistoryMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<OutsContractHistoryDO> getOutsContractHistoryPage(OutsContractHistoryPageReqVO pageReqVO) {
|
||||
return outsContractHistoryMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -13,6 +13,7 @@ public class ProjectDetailRespDTO {
|
||||
* 项目经理
|
||||
*/
|
||||
private String projectManagerName;
|
||||
|
||||
/**
|
||||
* 客户公司
|
||||
*/
|
||||
|
@@ -0,0 +1,73 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 历史合同 VO
|
||||
export interface ContractHistoryVO {
|
||||
processInstanceId: string // 流程实体id
|
||||
name: string // 合同名称
|
||||
type: string // 合同类型
|
||||
progress: string // 合同进展
|
||||
expectedTime: Date // 合同拟定时间
|
||||
printingTime: Date // 合同用印时间
|
||||
signingTime: Date // 签订时间
|
||||
archiveTime: Date // 归档时间
|
||||
status: string // 合同状态
|
||||
countType: string // 计费方式
|
||||
remark: string // 备注
|
||||
contractFileUrl: string // 合同url
|
||||
constructionCost: number // 建安费
|
||||
source: string // 资金来源
|
||||
discount: string // 优惠
|
||||
consortium: boolean // 是否联合体
|
||||
consortiumCompany: string // 联合体单位
|
||||
extProportion: string // 占主合同比例
|
||||
approvedAmount: number // 审定金额
|
||||
reviewFileUrl: string // 审核文件url
|
||||
creator: string // 创建者
|
||||
createTime: Date // 创建时间
|
||||
updater: string // 更新者
|
||||
updateTime: Date // 更新时间
|
||||
deleted: boolean // 是否删除
|
||||
tenantId: number // 租户编号
|
||||
amount: number // 签订合同总额
|
||||
preAmount: number // 前期费
|
||||
designAmount: number // 设计费
|
||||
surveyFees: number // 勘测费
|
||||
measurementFee: number // 测量费
|
||||
otherFee: number // 其他费
|
||||
processStatus: string // 流程状态
|
||||
contractId: number // 合同
|
||||
version: string // 版本
|
||||
}
|
||||
|
||||
// 历史合同 API
|
||||
export const ContractHistoryApi = {
|
||||
// 查询历史合同分页
|
||||
getContractHistoryPage: async (params: any) => {
|
||||
return await request.get({ url: `/cms/contract-history/page`, params })
|
||||
},
|
||||
|
||||
// 查询历史合同详情
|
||||
getContractHistory: async (id: number) => {
|
||||
return await request.get({ url: `/cms/contract-history/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增历史合同
|
||||
createContractHistory: async (data: ContractHistoryVO) => {
|
||||
return await request.post({ url: `/cms/contract-history/create`, data })
|
||||
},
|
||||
|
||||
// 修改历史合同
|
||||
updateContractHistory: async (data: ContractHistoryVO) => {
|
||||
return await request.put({ url: `/cms/contract-history/update`, data })
|
||||
},
|
||||
|
||||
// 删除历史合同
|
||||
deleteContractHistory: async (id: number) => {
|
||||
return await request.delete({ url: `/cms/contract-history/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出历史合同 Excel
|
||||
exportContractHistory: async (params) => {
|
||||
return await request.download({ url: `/cms/contract-history/export-excel`, params })
|
||||
},
|
||||
}
|
@@ -0,0 +1,330 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="流程实体id" prop="processInstanceId">
|
||||
<el-input v-model="formData.processInstanceId" placeholder="请输入流程实体id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入合同名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="type">
|
||||
<el-select v-model="formData.type" placeholder="请选择合同类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同进展" prop="progress">
|
||||
<el-input v-model="formData.progress" placeholder="请输入合同进展" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同拟定时间" prop="expectedTime">
|
||||
<el-date-picker
|
||||
v-model="formData.expectedTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择合同拟定时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同用印时间" prop="printingTime">
|
||||
<el-date-picker
|
||||
v-model="formData.printingTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择合同用印时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="签订时间" prop="signingTime">
|
||||
<el-date-picker
|
||||
v-model="formData.signingTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择签订时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="归档时间" prop="archiveTime">
|
||||
<el-date-picker
|
||||
v-model="formData.archiveTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择归档时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同状态" prop="status">
|
||||
<el-select v-model="formData.status" placeholder="请选择合同状态">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计费方式" prop="countType">
|
||||
<el-select v-model="formData.countType" placeholder="请选择计费方式">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_BILLING_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同url" prop="contractFileUrl">
|
||||
<UploadFile v-model="formData.contractFileUrl" />
|
||||
</el-form-item>
|
||||
<el-form-item label="建安费" prop="constructionCost">
|
||||
<el-input v-model="formData.constructionCost" placeholder="请输入建安费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资金来源" prop="source">
|
||||
<el-select v-model="formData.source" placeholder="请选择资金来源">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.FUNDS_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠" prop="discount">
|
||||
<el-input v-model="formData.discount" placeholder="请输入优惠" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否联合体" prop="consortium">
|
||||
<el-radio-group v-model="formData.consortium">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="联合体单位" prop="consortiumCompany">
|
||||
<el-input v-model="formData.consortiumCompany" placeholder="请输入联合体单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="占主合同比例" prop="extProportion">
|
||||
<el-input v-model="formData.extProportion" placeholder="请输入占主合同比例" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审定金额" prop="approvedAmount">
|
||||
<el-input v-model="formData.approvedAmount" placeholder="请输入审定金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审核文件url" prop="reviewFileUrl">
|
||||
<UploadFile v-model="formData.reviewFileUrl" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建者" prop="creator">
|
||||
<el-input v-model="formData.creator" placeholder="请输入创建者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="formData.createTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择创建时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者" prop="updater">
|
||||
<el-input v-model="formData.updater" placeholder="请输入更新者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-date-picker
|
||||
v-model="formData.updateTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择更新时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="deleted">
|
||||
<el-radio-group v-model="formData.deleted">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户编号" prop="tenantId">
|
||||
<el-input v-model="formData.tenantId" placeholder="请输入租户编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签订合同总额" prop="amount">
|
||||
<el-input v-model="formData.amount" placeholder="请输入签订合同总额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="前期费" prop="preAmount">
|
||||
<el-input v-model="formData.preAmount" placeholder="请输入前期费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设计费" prop="designAmount">
|
||||
<el-input v-model="formData.designAmount" placeholder="请输入设计费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="勘测费" prop="surveyFees">
|
||||
<el-input v-model="formData.surveyFees" placeholder="请输入勘测费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测量费" prop="measurementFee">
|
||||
<el-input v-model="formData.measurementFee" placeholder="请输入测量费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="其他费" prop="otherFee">
|
||||
<el-input v-model="formData.otherFee" placeholder="请输入其他费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态" prop="processStatus">
|
||||
<el-radio-group v-model="formData.processStatus">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contractId">
|
||||
<el-input v-model="formData.contractId" placeholder="请输入合同" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本" prop="version">
|
||||
<el-input v-model="formData.version" placeholder="请输入版本" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { ContractHistoryApi, ContractHistoryVO } from '@/api/cms/contracthistory'
|
||||
|
||||
/** 历史合同 表单 */
|
||||
defineOptions({ name: 'ContractHistoryForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
processInstanceId: undefined,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
progress: undefined,
|
||||
expectedTime: undefined,
|
||||
printingTime: undefined,
|
||||
signingTime: undefined,
|
||||
archiveTime: undefined,
|
||||
status: undefined,
|
||||
countType: undefined,
|
||||
remark: undefined,
|
||||
contractFileUrl: undefined,
|
||||
constructionCost: undefined,
|
||||
source: undefined,
|
||||
discount: undefined,
|
||||
consortium: undefined,
|
||||
consortiumCompany: undefined,
|
||||
extProportion: undefined,
|
||||
approvedAmount: undefined,
|
||||
reviewFileUrl: undefined,
|
||||
creator: undefined,
|
||||
createTime: undefined,
|
||||
updater: undefined,
|
||||
updateTime: undefined,
|
||||
deleted: undefined,
|
||||
tenantId: undefined,
|
||||
amount: undefined,
|
||||
preAmount: undefined,
|
||||
designAmount: undefined,
|
||||
surveyFees: undefined,
|
||||
measurementFee: undefined,
|
||||
otherFee: undefined,
|
||||
processStatus: undefined,
|
||||
contractId: undefined,
|
||||
version: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
name: [{ required: true, message: '合同名称不能为空', trigger: 'blur' }],
|
||||
type: [{ required: true, message: '合同类型不能为空', trigger: 'change' }],
|
||||
progress: [{ required: true, message: '合同进展不能为空', trigger: 'blur' }],
|
||||
expectedTime: [{ required: true, message: '合同拟定时间不能为空', trigger: 'blur' }],
|
||||
printingTime: [{ required: true, message: '合同用印时间不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '合同状态不能为空', trigger: 'change' }],
|
||||
approvedAmount: [{ required: true, message: '审定金额不能为空', trigger: 'blur' }],
|
||||
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||
deleted: [{ required: true, message: '是否删除不能为空', trigger: 'blur' }],
|
||||
tenantId: [{ required: true, message: '租户编号不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await ContractHistoryApi.getContractHistory(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as ContractHistoryVO
|
||||
if (formType.value === 'create') {
|
||||
await ContractHistoryApi.createContractHistory(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await ContractHistoryApi.updateContractHistory(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
processInstanceId: undefined,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
progress: undefined,
|
||||
expectedTime: undefined,
|
||||
printingTime: undefined,
|
||||
signingTime: undefined,
|
||||
archiveTime: undefined,
|
||||
status: undefined,
|
||||
countType: undefined,
|
||||
remark: undefined,
|
||||
contractFileUrl: undefined,
|
||||
constructionCost: undefined,
|
||||
source: undefined,
|
||||
discount: undefined,
|
||||
consortium: undefined,
|
||||
consortiumCompany: undefined,
|
||||
extProportion: undefined,
|
||||
approvedAmount: undefined,
|
||||
reviewFileUrl: undefined,
|
||||
creator: undefined,
|
||||
createTime: undefined,
|
||||
updater: undefined,
|
||||
updateTime: undefined,
|
||||
deleted: undefined,
|
||||
tenantId: undefined,
|
||||
amount: undefined,
|
||||
preAmount: undefined,
|
||||
designAmount: undefined,
|
||||
surveyFees: undefined,
|
||||
measurementFee: undefined,
|
||||
otherFee: undefined,
|
||||
processStatus: undefined,
|
||||
contractId: undefined,
|
||||
version: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
@@ -0,0 +1,606 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="流程实体id" prop="processInstanceId">
|
||||
<el-input
|
||||
v-model="queryParams.processInstanceId"
|
||||
placeholder="请输入流程实体id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入合同名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
placeholder="请选择合同类型"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同进展" prop="progress">
|
||||
<el-input
|
||||
v-model="queryParams.progress"
|
||||
placeholder="请输入合同进展"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同拟定时间" prop="expectedTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.expectedTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同用印时间" prop="printingTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.printingTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="签订时间" prop="signingTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.signingTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="归档时间" prop="archiveTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.archiveTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择合同状态"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计费方式" prop="countType">
|
||||
<el-select
|
||||
v-model="queryParams.countType"
|
||||
placeholder="请选择计费方式"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_BILLING_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="建安费" prop="constructionCost">
|
||||
<el-input
|
||||
v-model="queryParams.constructionCost"
|
||||
placeholder="请输入建安费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资金来源" prop="source">
|
||||
<el-select
|
||||
v-model="queryParams.source"
|
||||
placeholder="请选择资金来源"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.FUNDS_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠" prop="discount">
|
||||
<el-input
|
||||
v-model="queryParams.discount"
|
||||
placeholder="请输入优惠"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否联合体" prop="consortium">
|
||||
<el-select
|
||||
v-model="queryParams.consortium"
|
||||
placeholder="请选择是否联合体"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联合体单位" prop="consortiumCompany">
|
||||
<el-input
|
||||
v-model="queryParams.consortiumCompany"
|
||||
placeholder="请输入联合体单位"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="占主合同比例" prop="extProportion">
|
||||
<el-input
|
||||
v-model="queryParams.extProportion"
|
||||
placeholder="请输入占主合同比例"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审定金额" prop="approvedAmount">
|
||||
<el-input
|
||||
v-model="queryParams.approvedAmount"
|
||||
placeholder="请输入审定金额"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建者" prop="creator">
|
||||
<el-input
|
||||
v-model="queryParams.creator"
|
||||
placeholder="请输入创建者"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者" prop="updater">
|
||||
<el-input
|
||||
v-model="queryParams.updater"
|
||||
placeholder="请输入更新者"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.updateTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="deleted">
|
||||
<el-select
|
||||
v-model="queryParams.deleted"
|
||||
placeholder="请选择是否删除"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户编号" prop="tenantId">
|
||||
<el-input
|
||||
v-model="queryParams.tenantId"
|
||||
placeholder="请输入租户编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="签订合同总额" prop="amount">
|
||||
<el-input
|
||||
v-model="queryParams.amount"
|
||||
placeholder="请输入签订合同总额"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="前期费" prop="preAmount">
|
||||
<el-input
|
||||
v-model="queryParams.preAmount"
|
||||
placeholder="请输入前期费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设计费" prop="designAmount">
|
||||
<el-input
|
||||
v-model="queryParams.designAmount"
|
||||
placeholder="请输入设计费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="勘测费" prop="surveyFees">
|
||||
<el-input
|
||||
v-model="queryParams.surveyFees"
|
||||
placeholder="请输入勘测费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测量费" prop="measurementFee">
|
||||
<el-input
|
||||
v-model="queryParams.measurementFee"
|
||||
placeholder="请输入测量费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="其他费" prop="otherFee">
|
||||
<el-input
|
||||
v-model="queryParams.otherFee"
|
||||
placeholder="请输入其他费"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程状态" prop="processStatus">
|
||||
<el-select
|
||||
v-model="queryParams.processStatus"
|
||||
placeholder="请选择流程状态"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同" prop="contractId">
|
||||
<el-input
|
||||
v-model="queryParams.contractId"
|
||||
placeholder="请输入合同"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本" prop="version">
|
||||
<el-input
|
||||
v-model="queryParams.version"
|
||||
placeholder="请输入版本"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['cms:contract-history:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['cms:contract-history:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="流程实体id" align="center" prop="processInstanceId" />
|
||||
<el-table-column label="合同名称" align="center" prop="name" />
|
||||
<el-table-column label="合同类型" align="center" prop="type" />
|
||||
<el-table-column label="合同进展" align="center" prop="progress" />
|
||||
<el-table-column
|
||||
label="合同拟定时间"
|
||||
align="center"
|
||||
prop="expectedTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="合同用印时间"
|
||||
align="center"
|
||||
prop="printingTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="签订时间"
|
||||
align="center"
|
||||
prop="signingTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="归档时间"
|
||||
align="center"
|
||||
prop="archiveTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="合同状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CONTRACT_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计费方式" align="center" prop="countType">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CONTRACT_BILLING_TYPE" :value="scope.row.countType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="合同url" align="center" prop="contractFileUrl" />
|
||||
<el-table-column label="建安费" align="center" prop="constructionCost" />
|
||||
<el-table-column label="资金来源" align="center" prop="source">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.FUNDS_SOURCE" :value="scope.row.source" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="优惠" align="center" prop="discount" />
|
||||
<el-table-column label="是否联合体" align="center" prop="consortium" />
|
||||
<el-table-column label="联合体单位" align="center" prop="consortiumCompany" />
|
||||
<el-table-column label="占主合同比例" align="center" prop="extProportion" />
|
||||
<el-table-column label="审定金额" align="center" prop="approvedAmount" />
|
||||
<el-table-column label="审核文件url" align="center" prop="reviewFileUrl" />
|
||||
<el-table-column label="创建者" align="center" prop="creator" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="更新者" align="center" prop="updater" />
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="是否删除" align="center" prop="deleted" />
|
||||
<el-table-column label="租户编号" align="center" prop="tenantId" />
|
||||
<el-table-column label="签订合同总额" align="center" prop="amount" />
|
||||
<el-table-column label="前期费" align="center" prop="preAmount" />
|
||||
<el-table-column label="设计费" align="center" prop="designAmount" />
|
||||
<el-table-column label="勘测费" align="center" prop="surveyFees" />
|
||||
<el-table-column label="测量费" align="center" prop="measurementFee" />
|
||||
<el-table-column label="其他费" align="center" prop="otherFee" />
|
||||
<el-table-column label="流程状态" align="center" prop="processStatus" />
|
||||
<el-table-column label="合同" align="center" prop="contractId" />
|
||||
<el-table-column label="版本" align="center" prop="version" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['cms:contract-history:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['cms:contract-history:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<ContractHistoryForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { ContractHistoryApi, ContractHistoryVO } from '@/api/cms/contracthistory'
|
||||
import ContractHistoryForm from './ContractHistoryForm.vue'
|
||||
|
||||
/** 历史合同 列表 */
|
||||
defineOptions({ name: 'ContractHistory' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<ContractHistoryVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
processInstanceId: undefined,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
progress: undefined,
|
||||
expectedTime: [],
|
||||
printingTime: [],
|
||||
signingTime: [],
|
||||
archiveTime: [],
|
||||
status: undefined,
|
||||
countType: undefined,
|
||||
remark: undefined,
|
||||
contractFileUrl: undefined,
|
||||
constructionCost: undefined,
|
||||
source: undefined,
|
||||
discount: undefined,
|
||||
consortium: undefined,
|
||||
consortiumCompany: undefined,
|
||||
extProportion: undefined,
|
||||
approvedAmount: undefined,
|
||||
reviewFileUrl: undefined,
|
||||
creator: undefined,
|
||||
createTime: [],
|
||||
updater: undefined,
|
||||
updateTime: [],
|
||||
deleted: undefined,
|
||||
tenantId: undefined,
|
||||
amount: undefined,
|
||||
preAmount: undefined,
|
||||
designAmount: undefined,
|
||||
surveyFees: undefined,
|
||||
measurementFee: undefined,
|
||||
otherFee: undefined,
|
||||
processStatus: undefined,
|
||||
contractId: undefined,
|
||||
version: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await ContractHistoryApi.getContractHistoryPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await ContractHistoryApi.deleteContractHistory(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await ContractHistoryApi.exportContractHistory(queryParams)
|
||||
download.excel(data, '历史合同.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
@@ -2,8 +2,6 @@ import request from '@/config/axios'
|
||||
|
||||
// 外部合同 VO
|
||||
export interface ExtContractVO {
|
||||
id: number // 主键
|
||||
projectId: number // 项目id
|
||||
name: string // 合同名称
|
||||
type: string // 合同类型
|
||||
customerCompanyId: number // 客户公司id
|
||||
@@ -30,6 +28,10 @@ export interface ExtContractVO {
|
||||
reminderTime: Date // 合同提示时间
|
||||
approvedAmount: number // 审定金额
|
||||
reviewFileUrl: string // 审核文件url
|
||||
creator: string // 创建者
|
||||
createTime: Date // 创建时间
|
||||
updater: string // 更新者
|
||||
updateTime: Date // 更新时间
|
||||
contractId: number // 合同id
|
||||
}
|
||||
|
@@ -7,9 +7,6 @@
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="项目id" prop="projectId">
|
||||
<el-input v-model="formData.projectId" placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入合同名称" />
|
||||
</el-form-item>
|
||||
@@ -49,9 +46,14 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
<el-select v-model="formData.status" placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同金额" prop="amount">
|
||||
<el-input v-model="formData.amount" placeholder="请输入合同金额" />
|
||||
@@ -73,23 +75,42 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="计费方式" prop="countType">
|
||||
<el-select v-model="formData.countType" placeholder="请选择计费方式">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_BILLING_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同附件url" prop="contractFileUrl">
|
||||
<el-input v-model="formData.contractFileUrl" placeholder="请输入合同附件url" />
|
||||
<UploadFile v-model="formData.contractFileUrl" />
|
||||
</el-form-item>
|
||||
<el-form-item label="建安费" prop="constructionCost">
|
||||
<el-input v-model="formData.constructionCost" placeholder="请输入建安费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资金来源" prop="source">
|
||||
<el-input v-model="formData.source" placeholder="请输入资金来源" />
|
||||
<el-select v-model="formData.source" placeholder="请选择资金来源">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.FUNDS_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收费标准" prop="chargingStandard">
|
||||
<el-input v-model="formData.chargingStandard" placeholder="请输入收费标准" />
|
||||
<el-select v-model="formData.chargingStandard" placeholder="请选择收费标准">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_FEE_STANDARD)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠" prop="discount">
|
||||
<el-input v-model="formData.discount" placeholder="请输入优惠" />
|
||||
@@ -114,7 +135,29 @@
|
||||
<el-input v-model="formData.approvedAmount" placeholder="请输入审定金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审核文件url" prop="reviewFileUrl">
|
||||
<el-input v-model="formData.reviewFileUrl" placeholder="请输入审核文件url" />
|
||||
<UploadFile v-model="formData.reviewFileUrl" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建者" prop="creator">
|
||||
<el-input v-model="formData.creator" placeholder="请输入创建者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="formData.createTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择创建时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者" prop="updater">
|
||||
<el-input v-model="formData.updater" placeholder="请输入更新者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-date-picker
|
||||
v-model="formData.updateTime"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择更新时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同id" prop="contractId">
|
||||
<el-input v-model="formData.contractId" placeholder="请输入合同id" />
|
||||
@@ -127,6 +170,7 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { ExtContractApi, ExtContractVO } from '@/api/cms-ext/extcontract'
|
||||
|
||||
/** 外部合同 表单 */
|
||||
@@ -140,8 +184,6 @@ const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
customerCompanyId: undefined,
|
||||
@@ -168,15 +210,19 @@ const formData = ref({
|
||||
reminderTime: undefined,
|
||||
approvedAmount: undefined,
|
||||
reviewFileUrl: undefined,
|
||||
creator: undefined,
|
||||
createTime: undefined,
|
||||
updater: undefined,
|
||||
updateTime: undefined,
|
||||
contractId: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
projectId: [{ required: true, message: '项目id不能为空', trigger: 'blur' }],
|
||||
expectedTime: [{ required: true, message: '预计签订时间不能为空', trigger: 'blur' }],
|
||||
amount: [{ required: true, message: '合同金额不能为空', trigger: 'blur' }],
|
||||
countType: [{ required: true, message: '计费方式不能为空', trigger: 'change' }],
|
||||
chargingStandard: [{ required: true, message: '收费标准不能为空', trigger: 'blur' }],
|
||||
chargingStandard: [{ required: true, message: '收费标准不能为空', trigger: 'change' }],
|
||||
consortium: [{ required: true, message: '是否联合体不能为空', trigger: 'blur' }],
|
||||
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
@@ -225,8 +271,6 @@ const submitForm = async () => {
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
customerCompanyId: undefined,
|
||||
@@ -253,6 +297,10 @@ const resetForm = () => {
|
||||
reminderTime: undefined,
|
||||
approvedAmount: undefined,
|
||||
reviewFileUrl: undefined,
|
||||
creator: undefined,
|
||||
createTime: undefined,
|
||||
updater: undefined,
|
||||
updateTime: undefined,
|
||||
contractId: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
@@ -8,15 +8,6 @@
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="项目id" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
@@ -94,7 +85,12 @@
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同金额" prop="amount">
|
||||
@@ -158,7 +154,12 @@
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_BILLING_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
@@ -170,15 +171,6 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同附件url" prop="contractFileUrl">
|
||||
<el-input
|
||||
v-model="queryParams.contractFileUrl"
|
||||
placeholder="请输入合同附件url"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="建安费" prop="constructionCost">
|
||||
<el-input
|
||||
v-model="queryParams.constructionCost"
|
||||
@@ -189,22 +181,34 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资金来源" prop="source">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="queryParams.source"
|
||||
placeholder="请输入资金来源"
|
||||
placeholder="请选择资金来源"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.FUNDS_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收费标准" prop="chargingStandard">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="queryParams.chargingStandard"
|
||||
placeholder="请输入收费标准"
|
||||
placeholder="请选择收费标准"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_FEE_STANDARD)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠" prop="discount">
|
||||
<el-input
|
||||
@@ -254,10 +258,10 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核文件url" prop="reviewFileUrl">
|
||||
<el-form-item label="创建者" prop="creator">
|
||||
<el-input
|
||||
v-model="queryParams.reviewFileUrl"
|
||||
placeholder="请输入审核文件url"
|
||||
v-model="queryParams.creator"
|
||||
placeholder="请输入创建者"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
@@ -274,6 +278,26 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者" prop="updater">
|
||||
<el-input
|
||||
v-model="queryParams.updater"
|
||||
placeholder="请输入更新者"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.updateTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同id" prop="contractId">
|
||||
<el-input
|
||||
v-model="queryParams.contractId"
|
||||
@@ -310,8 +334,6 @@
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="主键" align="center" prop=" id" />
|
||||
<el-table-column label="项目id" align="center" prop="projectId" />
|
||||
<el-table-column label="合同名称" align="center" prop="name" />
|
||||
<el-table-column label="合同类型" align="center" prop="type" />
|
||||
<el-table-column label="客户公司id" align="center" prop="customerCompanyId" />
|
||||
@@ -337,19 +359,35 @@
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="状态" align="center" prop="status" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CONTRACT_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同金额" align="center" prop="amount" />
|
||||
<el-table-column label="前期费用" align="center" prop="preAmount" />
|
||||
<el-table-column label="设计费" align="center" prop="designFee" />
|
||||
<el-table-column label="勘测费" align="center" prop="surveyFees" />
|
||||
<el-table-column label="检测费" align="center" prop="testingFee" />
|
||||
<el-table-column label="其他费" align="center" prop="otherFee" />
|
||||
<el-table-column label="计费方式" align="center" prop="countType" />
|
||||
<el-table-column label="计费方式" align="center" prop="countType">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CONTRACT_BILLING_TYPE" :value="scope.row.countType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="合同附件url" align="center" prop="contractFileUrl" />
|
||||
<el-table-column label="建安费" align="center" prop="constructionCost" />
|
||||
<el-table-column label="资金来源" align="center" prop="source" />
|
||||
<el-table-column label="收费标准" align="center" prop="chargingStandard" />
|
||||
<el-table-column label="资金来源" align="center" prop="source">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.FUNDS_SOURCE" :value="scope.row.source" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收费标准" align="center" prop="chargingStandard">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CONTRACT_FEE_STANDARD" :value="scope.row.chargingStandard" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="优惠" align="center" prop="discount" />
|
||||
<el-table-column label="是否联合体" align="center" prop="consortium" />
|
||||
<el-table-column label="联合体单位" align="center" prop="consortiumCompany" />
|
||||
@@ -362,6 +400,7 @@
|
||||
/>
|
||||
<el-table-column label="审定金额" align="center" prop="approvedAmount" />
|
||||
<el-table-column label="审核文件url" align="center" prop="reviewFileUrl" />
|
||||
<el-table-column label="创建者" align="center" prop="creator" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
@@ -369,6 +408,14 @@
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="更新者" align="center" prop="updater" />
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="合同id" align="center" prop="contractId" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
@@ -405,6 +452,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { ExtContractApi, ExtContractVO } from '@/api/cms-ext/extcontract'
|
||||
@@ -422,7 +470,6 @@ const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
projectId: undefined,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
customerCompanyId: undefined,
|
||||
@@ -449,7 +496,10 @@ const queryParams = reactive({
|
||||
reminderTime: [],
|
||||
approvedAmount: undefined,
|
||||
reviewFileUrl: undefined,
|
||||
creator: undefined,
|
||||
createTime: [],
|
||||
updater: undefined,
|
||||
updateTime: [],
|
||||
contractId: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
@@ -51,26 +51,43 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
<el-select v-model="formData.status" placeholder="请选择合同状态">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计费方式" prop="countType">
|
||||
<el-select v-model="formData.countType" placeholder="请选择计费方式">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_BILLING_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同url" prop="contractFileUrl">
|
||||
<el-input v-model="formData.contractFileUrl" placeholder="请输入合同url" />
|
||||
<UploadFile v-model="formData.contractFileUrl" />
|
||||
</el-form-item>
|
||||
<el-form-item label="建安费" prop="constructionCost">
|
||||
<el-input v-model="formData.constructionCost" placeholder="请输入建安费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资金来源" prop="source">
|
||||
<el-input v-model="formData.source" placeholder="请输入资金来源" />
|
||||
<el-select v-model="formData.source" placeholder="请选择资金来源">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.FUNDS_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠" prop="discount">
|
||||
<el-input v-model="formData.discount" placeholder="请输入优惠" />
|
||||
@@ -148,6 +165,7 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { ContractApi, ContractVO } from '@/api/cms/contract'
|
||||
|
||||
/** 合同 表单 */
|
||||
@@ -199,7 +217,7 @@ const formRules = reactive({
|
||||
progress: [{ required: true, message: '合同进展不能为空', trigger: 'blur' }],
|
||||
expectedTime: [{ required: true, message: '合同拟定时间不能为空', trigger: 'blur' }],
|
||||
printingTime: [{ required: true, message: '合同用印时间不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '合同状态不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '合同状态不能为空', trigger: 'change' }],
|
||||
approvedAmount: [{ required: true, message: '审定金额不能为空', trigger: 'blur' }],
|
||||
createTime: [{ required: true, message: '创建时间不能为空', trigger: 'blur' }],
|
||||
updateTime: [{ required: true, message: '更新时间不能为空', trigger: 'blur' }],
|
@@ -87,7 +87,12 @@
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计费方式" prop="countType">
|
||||
@@ -97,7 +102,12 @@
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CONTRACT_BILLING_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
@@ -109,15 +119,6 @@
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同url" prop="contractFileUrl">
|
||||
<el-input
|
||||
v-model="queryParams.contractFileUrl"
|
||||
placeholder="请输入合同url"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="建安费" prop="constructionCost">
|
||||
<el-input
|
||||
v-model="queryParams.constructionCost"
|
||||
@@ -128,13 +129,19 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资金来源" prop="source">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="queryParams.source"
|
||||
placeholder="请输入资金来源"
|
||||
placeholder="请选择资金来源"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.FUNDS_SOURCE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠" prop="discount">
|
||||
<el-input
|
||||
@@ -353,12 +360,24 @@
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="合同状态" align="center" prop="status" />
|
||||
<el-table-column label="计费方式" align="center" prop="countType" />
|
||||
<el-table-column label="合同状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CONTRACT_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计费方式" align="center" prop="countType">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CONTRACT_BILLING_TYPE" :value="scope.row.countType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="合同url" align="center" prop="contractFileUrl" />
|
||||
<el-table-column label="建安费" align="center" prop="constructionCost" />
|
||||
<el-table-column label="资金来源" align="center" prop="source" />
|
||||
<el-table-column label="资金来源" align="center" prop="source">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.FUNDS_SOURCE" :value="scope.row.source" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="优惠" align="center" prop="discount" />
|
||||
<el-table-column label="是否联合体" align="center" prop="consortium" />
|
||||
<el-table-column label="联合体单位" align="center" prop="consortiumCompany" />
|
||||
@@ -424,6 +443,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { ContractApi, ContractVO } from '@/api/cms/contract'
|
Reference in New Issue
Block a user