进度计划、施工产值逻辑修改;合同
This commit is contained in:
		| @ -3,6 +3,7 @@ package org.dromara.test; | |||||||
| import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||||
| import cn.hutool.core.io.FileUtil; | import cn.hutool.core.io.FileUtil; | ||||||
| import cn.hutool.core.util.IdcardUtil; | import cn.hutool.core.util.IdcardUtil; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
| import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||||||
| import com.baomidou.mybatisplus.core.toolkit.StringUtils; | import com.baomidou.mybatisplus.core.toolkit.StringUtils; | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
| @ -18,9 +19,12 @@ import org.dromara.facility.service.IFacMatrixService; | |||||||
| import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; | import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; | ||||||
| import org.dromara.facility.service.IFacPhotovoltaicPanelService; | import org.dromara.facility.service.IFacPhotovoltaicPanelService; | ||||||
| import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult; | import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult; | ||||||
|  | import org.dromara.progress.domain.PgsProgressCategory; | ||||||
|  | import org.dromara.progress.domain.dto.progresscategory.PgsProgressCategoryCreateReq; | ||||||
| import org.dromara.progress.service.IPgsProgressCategoryService; | import org.dromara.progress.service.IPgsProgressCategoryService; | ||||||
| import org.dromara.progress.service.IPgsProgressCategoryTemplateService; | import org.dromara.progress.service.IPgsProgressCategoryTemplateService; | ||||||
| import org.dromara.progress.service.IPgsProgressPlanDetailService; | import org.dromara.progress.service.IPgsProgressPlanDetailService; | ||||||
|  | import org.dromara.project.domain.BusProject; | ||||||
| import org.dromara.project.service.IBusProjectService; | import org.dromara.project.service.IBusProjectService; | ||||||
| import org.dromara.system.service.ISysDeptService; | import org.dromara.system.service.ISysDeptService; | ||||||
| import org.dromara.tender.service.impl.TenderSupplierInputServiceImpl; | import org.dromara.tender.service.impl.TenderSupplierInputServiceImpl; | ||||||
| @ -28,9 +32,16 @@ import org.junit.jupiter.api.Test; | |||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.boot.test.context.SpringBootTest; | import org.springframework.boot.test.context.SpringBootTest; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.math.RoundingMode; | ||||||
|  | import java.time.DayOfWeek; | ||||||
| import java.time.LocalDate; | import java.time.LocalDate; | ||||||
|  | import java.time.temporal.TemporalAdjusters; | ||||||
| import java.util.Date; | import java.util.Date; | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | import java.util.function.Function; | ||||||
|  | import java.util.stream.Collectors; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @author lilemy |  * @author lilemy | ||||||
| @ -80,7 +91,15 @@ public class DemoTest { | |||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|     void testConstructionValue() { |     void testConstructionValue() { | ||||||
|         progressPlanDetailService.syncPlanDetail2ConstructionValue(LocalDate.now().minusDays(1), null); |         LocalDate today = LocalDate.now(); | ||||||
|  |         // 找到本周一 | ||||||
|  |         LocalDate thisMonday = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); | ||||||
|  |         // 上周一 = 本周一 - 1 周 | ||||||
|  |         LocalDate lastMonday = thisMonday.minusWeeks(1); | ||||||
|  |         // 上周日 = 上周一 + 6 天 | ||||||
|  |         LocalDate lastSunday = lastMonday.plusDays(6); | ||||||
|  |         log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday); | ||||||
|  |         Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
| @ -176,9 +195,135 @@ public class DemoTest { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Test |     @Test | ||||||
|     void testImport(){ |     void testImport() { | ||||||
|         photovoltaicPanelService.updateFinishNumberByCoordinate(List.of(1968510961294921730L), |         photovoltaicPanelService.updateFinishNumberByCoordinate(List.of(1968510961294921730L), | ||||||
|             List.of(new RecognizeConvertCoordinateResult("107.124334530","23.830557974"))); |             List.of(new RecognizeConvertCoordinateResult("107.124334530", "23.830557974"))); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Test | ||||||
|  |     void testRemove() { | ||||||
|  |         List<Long> projectIds = List.of( | ||||||
|  |             1968510961294921730L, | ||||||
|  |             1968511074637598722L, | ||||||
|  |             1968511192354934785L, | ||||||
|  |             1968514103508094977L, | ||||||
|  |             1968514270462365697L, | ||||||
|  |             1968515178185248770L, | ||||||
|  |             1968515232044306434L, | ||||||
|  |             1968515275153362945L, | ||||||
|  |             1968515323392053250L, | ||||||
|  |             1968515384058466306L, | ||||||
|  |             1968515428077686785L, | ||||||
|  |             1968515467575447554L, | ||||||
|  |             1968515518674653186L | ||||||
|  |         ); | ||||||
|  |         for (Long projectId : projectIds) { | ||||||
|  |             PgsProgressCategory p = progressCategoryService.lambdaQuery() | ||||||
|  |                 .eq(PgsProgressCategory::getProjectId, projectId) | ||||||
|  |                 .eq(PgsProgressCategory::getMatrixId, "0") | ||||||
|  |                 .eq(PgsProgressCategory::getName, "地埋电缆") | ||||||
|  |                 .one(); | ||||||
|  |             progressCategoryService.remove(new LambdaQueryWrapper<>(PgsProgressCategory.class) | ||||||
|  |                 .eq(PgsProgressCategory::getParentId, p.getId())); | ||||||
|  |             progressCategoryService.removeById(p); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Test | ||||||
|  |     void testProject1() { | ||||||
|  |         List<BusProject> projects = projectService.lambdaQuery() | ||||||
|  |             .eq(BusProject::getPId, 1897160897167638529L) | ||||||
|  |             .list(); | ||||||
|  |         List<Long> projectIds = projects.stream().map(BusProject::getId).toList(); | ||||||
|  |         List<PgsProgressCategory> t10101 = progressCategoryService.lambdaQuery() | ||||||
|  |             .in(PgsProgressCategory::getProjectId, projectIds) | ||||||
|  |             .ne(PgsProgressCategory::getMatrixId, "0") | ||||||
|  |             .eq(PgsProgressCategory::getMatrixName, "T10101") | ||||||
|  |             .list(); | ||||||
|  |         log.info("t10101: {}", t10101); | ||||||
|  |         Map<String, PgsProgressCategory> name = t10101.stream() | ||||||
|  |             .collect(Collectors.toMap(PgsProgressCategory::getName, Function.identity())); | ||||||
|  |         List<PgsProgressCategory> other = progressCategoryService.lambdaQuery() | ||||||
|  |             .in(PgsProgressCategory::getProjectId, projectIds) | ||||||
|  |             .ne(PgsProgressCategory::getMatrixId, "0") | ||||||
|  |             .ne(PgsProgressCategory::getMatrixName, "T10101") | ||||||
|  |             .ne(PgsProgressCategory::getParentId, 0) | ||||||
|  |             .list(); | ||||||
|  |         log.info("other: {}", other); | ||||||
|  |         other.forEach(o -> { | ||||||
|  |             o.setId(o.getId()); | ||||||
|  |             PgsProgressCategory category = name.get(o.getName()); | ||||||
|  |             if (StringUtils.isBlank(o.getWorkType())) { | ||||||
|  |                 o.setTotal(category.getTotal()); | ||||||
|  |             } | ||||||
|  |             o.setUnit(category.getUnit()); | ||||||
|  |             o.setUnitType(category.getUnitType()); | ||||||
|  |             BigDecimal ownerPrice = category.getOwnerPrice(); | ||||||
|  |             o.setOwnerPrice(ownerPrice); | ||||||
|  |             BigDecimal constructionPrice = category.getConstructionPrice(); | ||||||
|  |             o.setConstructionPrice(constructionPrice); | ||||||
|  |             // 计算产值 | ||||||
|  |             try { | ||||||
|  |                 BigDecimal multiply = o.getOwnerPrice().multiply(o.getTotal()); | ||||||
|  |                 o.setOwnerOutputValue(multiply.setScale(4, RoundingMode.HALF_UP)); | ||||||
|  |                 BigDecimal multiply1 = o.getConstructionPrice().multiply(o.getTotal()); | ||||||
|  |                 o.setConstructionOutputValue(multiply1.setScale(4, RoundingMode.HALF_UP)); | ||||||
|  |             } catch (Exception e) { | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|  |         progressCategoryService.updateBatchById(other); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Test | ||||||
|  |     void testProject2() { | ||||||
|  |         PgsProgressCategory p1 = progressCategoryService.lambdaQuery() | ||||||
|  |             .eq(PgsProgressCategory::getProjectId, 1968510858786131970L) | ||||||
|  |             .eq(PgsProgressCategory::getMatrixId, "0") | ||||||
|  |             .eq(PgsProgressCategory::getName, "其他工程") | ||||||
|  |             .one(); | ||||||
|  |         List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery() | ||||||
|  |             .eq(PgsProgressCategory::getProjectId, 1968510858786131970L) | ||||||
|  |             .eq(PgsProgressCategory::getMatrixId, "0") | ||||||
|  |             .eq(PgsProgressCategory::getParentId, p1.getId()) | ||||||
|  |             .list(); | ||||||
|  |         List<Long> projectIds = List.of( | ||||||
|  |             1968510961294921730L, | ||||||
|  |             1968511074637598722L, | ||||||
|  |             1968511192354934785L, | ||||||
|  |             1968514103508094977L, | ||||||
|  |             1968514270462365697L, | ||||||
|  |             1968515178185248770L, | ||||||
|  |             1968515232044306434L, | ||||||
|  |             1968515275153362945L, | ||||||
|  |             1968515323392053250L, | ||||||
|  |             1968515384058466306L, | ||||||
|  |             1968515428077686785L, | ||||||
|  |             1968515467575447554L, | ||||||
|  |             1968515518674653186L | ||||||
|  |         ); | ||||||
|  |         for (Long projectId : projectIds) { | ||||||
|  |             PgsProgressCategory p = progressCategoryService.lambdaQuery() | ||||||
|  |                 .eq(PgsProgressCategory::getProjectId, projectId) | ||||||
|  |                 .eq(PgsProgressCategory::getMatrixId, "0") | ||||||
|  |                 .eq(PgsProgressCategory::getName, "其他工程") | ||||||
|  |                 .one(); | ||||||
|  |             progressCategoryService.remove(new LambdaQueryWrapper<>(PgsProgressCategory.class) | ||||||
|  |                 .eq(PgsProgressCategory::getParentId, p.getId())); | ||||||
|  |             for (PgsProgressCategory category : progressCategoryList) { | ||||||
|  |                 PgsProgressCategoryCreateReq req = new PgsProgressCategoryCreateReq(); | ||||||
|  |                 req.setParentId(p.getId()); | ||||||
|  |                 req.setProjectId(p.getProjectId()); | ||||||
|  |                 req.setMatrixId(p.getMatrixId()); | ||||||
|  |                 req.setName(category.getName()); | ||||||
|  |                 req.setUnitType(category.getUnitType()); | ||||||
|  |                 req.setUnit(category.getUnit()); | ||||||
|  |                 req.setOwnerPrice(category.getOwnerPrice()); | ||||||
|  |                 req.setConstructionPrice(category.getConstructionPrice()); | ||||||
|  |                 req.setTotal(category.getTotal()); | ||||||
|  |  | ||||||
|  |                 progressCategoryService.insertByReq(req); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -8,22 +8,13 @@ import org.dromara.bigscreen.service.EnterpriseBigScreenService; | |||||||
| import org.dromara.common.core.enums.BusinessStatusEnum; | import org.dromara.common.core.enums.BusinessStatusEnum; | ||||||
| import org.dromara.common.core.utils.DateUtils; | import org.dromara.common.core.utils.DateUtils; | ||||||
| import org.dromara.common.utils.BigDecimalUtil; | import org.dromara.common.utils.BigDecimalUtil; | ||||||
| import org.dromara.ctr.service.ICtrExpensesContractService; |  | ||||||
| import org.dromara.ctr.service.ICtrIncomeContractService; |  | ||||||
| import org.dromara.manager.weathermanager.WeatherConstant; | import org.dromara.manager.weathermanager.WeatherConstant; | ||||||
| import org.dromara.manager.weathermanager.WeatherManager; | import org.dromara.manager.weathermanager.WeatherManager; | ||||||
| import org.dromara.manager.weathermanager.vo.WeatherVo; | import org.dromara.manager.weathermanager.vo.WeatherVo; | ||||||
| import org.dromara.out.domain.BusProcurement; | import org.dromara.out.domain.*; | ||||||
| import org.dromara.out.domain.OutConstructionValue; | import org.dromara.out.service.*; | ||||||
| import org.dromara.out.domain.OutMonthPlanAudit; |  | ||||||
| import org.dromara.out.domain.OutValueAllocation; |  | ||||||
| import org.dromara.out.service.IBusProcurementService; |  | ||||||
| import org.dromara.out.service.IOutConstructionValueService; |  | ||||||
| import org.dromara.out.service.IOutMonthPlanAuditService; |  | ||||||
| import org.dromara.out.service.IOutValueAllocationService; |  | ||||||
| import org.dromara.progress.domain.PgsProgressCategory; | import org.dromara.progress.domain.PgsProgressCategory; | ||||||
| import org.dromara.progress.service.IPgsProgressCategoryService; | import org.dromara.progress.service.IPgsProgressCategoryService; | ||||||
| import org.dromara.progress.service.IPgsProgressPlanDetailService; |  | ||||||
| import org.dromara.project.domain.BusProject; | import org.dromara.project.domain.BusProject; | ||||||
| import org.dromara.project.service.IBusProjectService; | import org.dromara.project.service.IBusProjectService; | ||||||
| import org.dromara.safety.domain.HseRecognizeRecord; | import org.dromara.safety.domain.HseRecognizeRecord; | ||||||
| @ -55,15 +46,6 @@ public class EnterpriseBigScreenServiceImpl implements EnterpriseBigScreenServic | |||||||
|     @Resource |     @Resource | ||||||
|     private IPgsProgressCategoryService progressCategoryService; |     private IPgsProgressCategoryService progressCategoryService; | ||||||
|  |  | ||||||
|     @Resource |  | ||||||
|     private IPgsProgressPlanDetailService progressPlanDetailService; |  | ||||||
|  |  | ||||||
|     @Resource |  | ||||||
|     private ICtrIncomeContractService incomeContractService; |  | ||||||
|  |  | ||||||
|     @Resource |  | ||||||
|     private ICtrExpensesContractService expensesContractService; |  | ||||||
|  |  | ||||||
|     @Resource |     @Resource | ||||||
|     private IOutValueAllocationService outValueAllocationService; |     private IOutValueAllocationService outValueAllocationService; | ||||||
|  |  | ||||||
| @ -73,6 +55,9 @@ public class EnterpriseBigScreenServiceImpl implements EnterpriseBigScreenServic | |||||||
|     @Resource |     @Resource | ||||||
|     private IOutConstructionValueService outConstructionValueService; |     private IOutConstructionValueService outConstructionValueService; | ||||||
|  |  | ||||||
|  |     @Resource | ||||||
|  |     private IOutConstructionValueRangeService outConstructionValueRangeService; | ||||||
|  |  | ||||||
|     @Resource |     @Resource | ||||||
|     private IHseViolationRecordService hseViolationRecordService; |     private IHseViolationRecordService hseViolationRecordService; | ||||||
|  |  | ||||||
| @ -240,9 +225,9 @@ public class EnterpriseBigScreenServiceImpl implements EnterpriseBigScreenServic | |||||||
|             .collect(Collectors.toMap(OutValueAllocation::getProjectId, OutValueAllocation::getOwnerTotalValue)); |             .collect(Collectors.toMap(OutValueAllocation::getProjectId, OutValueAllocation::getOwnerTotalValue)); | ||||||
|         // 实际产值 |         // 实际产值 | ||||||
|         // 施工产值 |         // 施工产值 | ||||||
|         List<OutConstructionValue> constructionValueList = outConstructionValueService.lambdaQuery() |         List<OutConstructionValueRange> constructionValueRangeList = outConstructionValueRangeService.lambdaQuery() | ||||||
|             .select(OutConstructionValue::getProjectId, OutConstructionValue::getOwnerValue) |             .select(OutConstructionValueRange::getProjectId, OutConstructionValueRange::getOwnerValue) | ||||||
|             .eq(OutConstructionValue::getAuditStatus, BusinessStatusEnum.FINISH.getStatus()) |             .eq(OutConstructionValueRange::getAuditStatus, BusinessStatusEnum.FINISH.getStatus()) | ||||||
|             .list(); |             .list(); | ||||||
|         // 采购产值 |         // 采购产值 | ||||||
|         List<BusProcurement> purchaseValueList = busProcurementService.lambdaQuery() |         List<BusProcurement> purchaseValueList = busProcurementService.lambdaQuery() | ||||||
| @ -272,13 +257,13 @@ public class EnterpriseBigScreenServiceImpl implements EnterpriseBigScreenServic | |||||||
|                     actualValue = actualValue.add(dValue); |                     actualValue = actualValue.add(dValue); | ||||||
|                 } |                 } | ||||||
|                 // 施工产值 |                 // 施工产值 | ||||||
|                 List<OutConstructionValue> constructionValue = constructionValueList.stream() |                 List<OutConstructionValueRange> constructionValue = constructionValueRangeList.stream() | ||||||
|                     .filter(construction -> construction.getProjectId().equals(project.getId())) |                     .filter(construction -> construction.getProjectId().equals(project.getId())) | ||||||
|                     .toList(); |                     .toList(); | ||||||
|                 if (CollUtil.isNotEmpty(constructionValue)) { |                 if (CollUtil.isNotEmpty(constructionValue)) { | ||||||
|                     BigDecimal cValue = constructionValue.stream() |                     BigDecimal cValue = constructionValue.stream() | ||||||
|                         .filter(Objects::nonNull) |                         .filter(Objects::nonNull) | ||||||
|                         .map(OutConstructionValue::getOwnerValue) |                         .map(OutConstructionValueRange::getOwnerValue) | ||||||
|                         .reduce(BigDecimal.ZERO, BigDecimal::add); |                         .reduce(BigDecimal.ZERO, BigDecimal::add); | ||||||
|                     actualValue = actualValue.add(cValue); |                     actualValue = actualValue.add(cValue); | ||||||
|                 } |                 } | ||||||
|  | |||||||
| @ -0,0 +1,106 @@ | |||||||
|  | package org.dromara.ctr.controller; | ||||||
|  |  | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.NotEmpty; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.ctr.domain.bo.ContractPaymentClauseBo; | ||||||
|  | import org.dromara.ctr.domain.vo.ContractPaymentClauseVo; | ||||||
|  | import org.dromara.ctr.service.IContractPaymentClauseService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 支付条款 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ctr/paymentClause") | ||||||
|  | public class ContractPaymentClauseController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IContractPaymentClauseService contractPaymentClauseService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询支付条款列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:paymentClause:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<ContractPaymentClauseVo> list(ContractPaymentClauseBo bo, PageQuery pageQuery) { | ||||||
|  |         return contractPaymentClauseService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出支付条款列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:paymentClause:export") | ||||||
|  |     @Log(title = "支付条款", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(ContractPaymentClauseBo bo, HttpServletResponse response) { | ||||||
|  |         List<ContractPaymentClauseVo> list = contractPaymentClauseService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "支付条款", ContractPaymentClauseVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取支付条款详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:paymentClause:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<ContractPaymentClauseVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                               @PathVariable Long id) { | ||||||
|  |         return R.ok(contractPaymentClauseService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增支付条款 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:paymentClause:add") | ||||||
|  |     @Log(title = "支付条款", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody ContractPaymentClauseBo bo) { | ||||||
|  |         return toAjax(contractPaymentClauseService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改支付条款 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:paymentClause:edit") | ||||||
|  |     @Log(title = "支付条款", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody ContractPaymentClauseBo bo) { | ||||||
|  |         return toAjax(contractPaymentClauseService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除支付条款 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:paymentClause:remove") | ||||||
|  |     @Log(title = "支付条款", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(contractPaymentClauseService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,106 @@ | |||||||
|  | package org.dromara.ctr.controller; | ||||||
|  |  | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.NotEmpty; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractAppointBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractAppointVo; | ||||||
|  | import org.dromara.ctr.service.ICtrContractAppointService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-主要条款约定 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ctr/contractAppoint") | ||||||
|  | public class CtrContractAppointController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final ICtrContractAppointService ctrContractAppointService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-主要条款约定列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractAppoint:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<CtrContractAppointVo> list(CtrContractAppointBo bo, PageQuery pageQuery) { | ||||||
|  |         return ctrContractAppointService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出承包合同-主要条款约定列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractAppoint:export") | ||||||
|  |     @Log(title = "承包合同-主要条款约定", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(CtrContractAppointBo bo, HttpServletResponse response) { | ||||||
|  |         List<CtrContractAppointVo> list = ctrContractAppointService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "承包合同-主要条款约定", CtrContractAppointVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取承包合同-主要条款约定详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractAppoint:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<CtrContractAppointVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                            @PathVariable Long id) { | ||||||
|  |         return R.ok(ctrContractAppointService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-主要条款约定 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractAppoint:add") | ||||||
|  |     @Log(title = "承包合同-主要条款约定", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrContractAppointBo bo) { | ||||||
|  |         return toAjax(ctrContractAppointService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-主要条款约定 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractAppoint:edit") | ||||||
|  |     @Log(title = "承包合同-主要条款约定", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrContractAppointBo bo) { | ||||||
|  |         return toAjax(ctrContractAppointService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除承包合同-主要条款约定 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractAppoint:remove") | ||||||
|  |     @Log(title = "承包合同-主要条款约定", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(ctrContractAppointService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,105 @@ | |||||||
|  | package org.dromara.ctr.controller; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractBillItemVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractBillItemBo; | ||||||
|  | import org.dromara.ctr.service.ICtrContractBillItemService; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-工程量清单 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ctr/contractBillItem") | ||||||
|  | public class CtrContractBillItemController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final ICtrContractBillItemService ctrContractBillItemService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-工程量清单列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractBillItem:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<CtrContractBillItemVo> list(CtrContractBillItemBo bo, PageQuery pageQuery) { | ||||||
|  |         return ctrContractBillItemService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出承包合同-工程量清单列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractBillItem:export") | ||||||
|  |     @Log(title = "承包合同-工程量清单", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(CtrContractBillItemBo bo, HttpServletResponse response) { | ||||||
|  |         List<CtrContractBillItemVo> list = ctrContractBillItemService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "承包合同-工程量清单", CtrContractBillItemVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取承包合同-工程量清单详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractBillItem:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<CtrContractBillItemVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable Long id) { | ||||||
|  |         return R.ok(ctrContractBillItemService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-工程量清单 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractBillItem:add") | ||||||
|  |     @Log(title = "承包合同-工程量清单", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrContractBillItemBo bo) { | ||||||
|  |         return toAjax(ctrContractBillItemService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-工程量清单 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractBillItem:edit") | ||||||
|  |     @Log(title = "承包合同-工程量清单", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrContractBillItemBo bo) { | ||||||
|  |         return toAjax(ctrContractBillItemService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除承包合同-工程量清单 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractBillItem:remove") | ||||||
|  |     @Log(title = "承包合同-工程量清单", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(ctrContractBillItemService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,105 @@ | |||||||
|  | package org.dromara.ctr.controller; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractMainVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractMainBo; | ||||||
|  | import org.dromara.ctr.service.ICtrContractMainService; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-基本信息 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ctr/contractMain") | ||||||
|  | public class CtrContractMainController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final ICtrContractMainService ctrContractMainService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-基本信息列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractMain:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<CtrContractMainVo> list(CtrContractMainBo bo, PageQuery pageQuery) { | ||||||
|  |         return ctrContractMainService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出承包合同-基本信息列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractMain:export") | ||||||
|  |     @Log(title = "承包合同-基本信息", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(CtrContractMainBo bo, HttpServletResponse response) { | ||||||
|  |         List<CtrContractMainVo> list = ctrContractMainService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "承包合同-基本信息", CtrContractMainVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取承包合同-基本信息详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractMain:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<CtrContractMainVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable Long id) { | ||||||
|  |         return R.ok(ctrContractMainService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-基本信息 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractMain:add") | ||||||
|  |     @Log(title = "承包合同-基本信息", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrContractMainBo bo) { | ||||||
|  |         return toAjax(ctrContractMainService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-基本信息 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractMain:edit") | ||||||
|  |     @Log(title = "承包合同-基本信息", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrContractMainBo bo) { | ||||||
|  |         return toAjax(ctrContractMainService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除承包合同-基本信息 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:contractMain:remove") | ||||||
|  |     @Log(title = "承包合同-基本信息", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(ctrContractMainService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,105 @@ | |||||||
|  | package org.dromara.ctr.controller; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrCooperationAgreementVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrCooperationAgreementBo; | ||||||
|  | import org.dromara.ctr.service.ICtrCooperationAgreementService; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 合作协议 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ctr/cooperationAgreement") | ||||||
|  | public class CtrCooperationAgreementController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final ICtrCooperationAgreementService ctrCooperationAgreementService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询合作协议列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:cooperationAgreement:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<CtrCooperationAgreementVo> list(CtrCooperationAgreementBo bo, PageQuery pageQuery) { | ||||||
|  |         return ctrCooperationAgreementService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出合作协议列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:cooperationAgreement:export") | ||||||
|  |     @Log(title = "合作协议", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(CtrCooperationAgreementBo bo, HttpServletResponse response) { | ||||||
|  |         List<CtrCooperationAgreementVo> list = ctrCooperationAgreementService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "合作协议", CtrCooperationAgreementVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取合作协议详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:cooperationAgreement:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<CtrCooperationAgreementVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable Long id) { | ||||||
|  |         return R.ok(ctrCooperationAgreementService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增合作协议 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:cooperationAgreement:add") | ||||||
|  |     @Log(title = "合作协议", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrCooperationAgreementBo bo) { | ||||||
|  |         return toAjax(ctrCooperationAgreementService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改合作协议 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:cooperationAgreement:edit") | ||||||
|  |     @Log(title = "合作协议", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrCooperationAgreementBo bo) { | ||||||
|  |         return toAjax(ctrCooperationAgreementService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除合作协议 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:cooperationAgreement:remove") | ||||||
|  |     @Log(title = "合作协议", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(ctrCooperationAgreementService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,106 @@ | |||||||
|  | package org.dromara.ctr.controller; | ||||||
|  |  | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.NotEmpty; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrSubcontractMainBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractMainVo; | ||||||
|  | import org.dromara.ctr.service.ICtrSubcontractMainService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主要信息 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ctr/subcontractMain") | ||||||
|  | public class CtrSubcontractMainController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final ICtrSubcontractMainService ctrSubcontractMainService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询主要信息列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractMain:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<CtrSubcontractMainVo> list(CtrSubcontractMainBo bo, PageQuery pageQuery) { | ||||||
|  |         return ctrSubcontractMainService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出主要信息列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractMain:export") | ||||||
|  |     @Log(title = "主要信息", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(CtrSubcontractMainBo bo, HttpServletResponse response) { | ||||||
|  |         List<CtrSubcontractMainVo> list = ctrSubcontractMainService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "主要信息", CtrSubcontractMainVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取主要信息详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractMain:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<CtrSubcontractMainVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                            @PathVariable Long id) { | ||||||
|  |         return R.ok(ctrSubcontractMainService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增主要信息 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractMain:add") | ||||||
|  |     @Log(title = "主要信息", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrSubcontractMainBo bo) { | ||||||
|  |         return toAjax(ctrSubcontractMainService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改主要信息 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractMain:edit") | ||||||
|  |     @Log(title = "主要信息", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrSubcontractMainBo bo) { | ||||||
|  |         return toAjax(ctrSubcontractMainService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除主要信息 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractMain:remove") | ||||||
|  |     @Log(title = "主要信息", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(ctrSubcontractMainService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,106 @@ | |||||||
|  | package org.dromara.ctr.controller; | ||||||
|  |  | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.NotEmpty; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrSubcontractSealBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractSealVo; | ||||||
|  | import org.dromara.ctr.service.ICtrSubcontractSealService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 印章信息 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/ctr/subcontractSeal") | ||||||
|  | public class CtrSubcontractSealController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final ICtrSubcontractSealService ctrSubcontractSealService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询印章信息列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractSeal:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<CtrSubcontractSealVo> list(CtrSubcontractSealBo bo, PageQuery pageQuery) { | ||||||
|  |         return ctrSubcontractSealService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出印章信息列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractSeal:export") | ||||||
|  |     @Log(title = "印章信息", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(CtrSubcontractSealBo bo, HttpServletResponse response) { | ||||||
|  |         List<CtrSubcontractSealVo> list = ctrSubcontractSealService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "印章信息", CtrSubcontractSealVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取印章信息详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractSeal:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<CtrSubcontractSealVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                            @PathVariable Long id) { | ||||||
|  |         return R.ok(ctrSubcontractSealService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增印章信息 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractSeal:add") | ||||||
|  |     @Log(title = "印章信息", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody CtrSubcontractSealBo bo) { | ||||||
|  |         return toAjax(ctrSubcontractSealService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改印章信息 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractSeal:edit") | ||||||
|  |     @Log(title = "印章信息", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CtrSubcontractSealBo bo) { | ||||||
|  |         return toAjax(ctrSubcontractSealService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除印章信息 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("ctr:subcontractSeal:remove") | ||||||
|  |     @Log(title = "印章信息", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(ctrSubcontractSealService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,93 @@ | |||||||
|  | package org.dromara.ctr.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 支付条款对象 contract_payment_clause | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("contract_payment_clause") | ||||||
|  | public class ContractPaymentClause extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 类型 | ||||||
|  |      */ | ||||||
|  |     private String clauseType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结算周期 | ||||||
|  |      */ | ||||||
|  |     private String settlementCycle; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结算账龄(天) | ||||||
|  |      */ | ||||||
|  |     private Integer settlementAgeDays; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 里程碑节点 | ||||||
|  |      */ | ||||||
|  |     private String milestone; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 选择值 | ||||||
|  |      */ | ||||||
|  |     private String selectValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 比较符 | ||||||
|  |      */ | ||||||
|  |     private String comparator; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 比较值 | ||||||
|  |      */ | ||||||
|  |     private String compareValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款账龄(天) | ||||||
|  |      */ | ||||||
|  |     private Integer receiptAgeDays; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款基数 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal receiptBase; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal receiptRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注/补充说明 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,93 @@ | |||||||
|  | package org.dromara.ctr.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-主要条款约定对象 ctr_contract_appoint | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ctr_contract_appoint") | ||||||
|  | public class CtrContractAppoint extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金形式 | ||||||
|  |      */ | ||||||
|  |     private String performanceBondType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal performanceBondRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金金额(元) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal performanceBondAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 是否有预收款(0否 1 是) | ||||||
|  |      */ | ||||||
|  |     private String advancePaymentFlag; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预收款比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal advancePaymentRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预收款金额(元) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal advancePaymentAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金形式 | ||||||
|  |      */ | ||||||
|  |     private String qualityBondType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal qualityBondRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金金额(元) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal qualityBondAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,77 @@ | |||||||
|  | package org.dromara.ctr.domain; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-工程量清单对象 ctr_contract_bill_item | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ctr_contract_bill_item") | ||||||
|  | public class CtrContractBillItem extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 编码 | ||||||
|  |      */ | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同清单名称 | ||||||
|  |      */ | ||||||
|  |     private String itemName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计量单位 | ||||||
|  |      */ | ||||||
|  |     private String unit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 数量 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal quantity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 含税单价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal unitPriceTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 价税合计 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalPriceTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 不含税金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal amountExclTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 税率(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal taxRate; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,164 @@ | |||||||
|  | package org.dromara.ctr.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-基本信息对象 ctr_contract_main | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ctr_contract_main") | ||||||
|  | public class CtrContractMain extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同模式 | ||||||
|  |      */ | ||||||
|  |     private String contractMode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 客户性质 | ||||||
|  |      */ | ||||||
|  |     private String customerType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal contractAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开票单位 | ||||||
|  |      */ | ||||||
|  |     private String invoiceCompany; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总投资额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalInvest; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预算分类 | ||||||
|  |      */ | ||||||
|  |     private String budgetCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收票单位 | ||||||
|  |      */ | ||||||
|  |     private String receiptCompany; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 归档日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate archiveDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付方式 | ||||||
|  |      */ | ||||||
|  |     private String paymentMethod; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 工程规模 | ||||||
|  |      */ | ||||||
|  |     private String projectScale; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 印章名称 | ||||||
|  |      */ | ||||||
|  |     private String sealName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 大写合同价税合计 | ||||||
|  |      */ | ||||||
|  |     private String amountUpper; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签约组织 | ||||||
|  |      */ | ||||||
|  |     private String signOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目类型 | ||||||
|  |      */ | ||||||
|  |     private String projectType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目大类 | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,118 @@ | |||||||
|  | package org.dromara.ctr.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 合作协议对象 ctr_cooperation_agreement | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ctr_cooperation_agreement") | ||||||
|  | public class CtrCooperationAgreement extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 公司名称 | ||||||
|  |      */ | ||||||
|  |     private String companyName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同含税金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal amount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 协议类型 | ||||||
|  |      */ | ||||||
|  |     private String agreementType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目经理 | ||||||
|  |      */ | ||||||
|  |     private String projectManager; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开始日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate startDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结束日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate endDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,204 @@ | |||||||
|  | package org.dromara.ctr.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主要信息对象 ctr_subcontract_main | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ctr_subcontract_main") | ||||||
|  | public class CtrSubcontractMain extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同类型 | ||||||
|  |      */ | ||||||
|  |     private String contractType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经营模式 | ||||||
|  |      */ | ||||||
|  |     private String businessMode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 原合同造价 | ||||||
|  |      */ | ||||||
|  |     private Long originalAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 含税合同金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal amountInclTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同状态 | ||||||
|  |      */ | ||||||
|  |     private String contractStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 累计变更金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal cumulativeChangeAmt; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 管理组织 | ||||||
|  |      */ | ||||||
|  |     private String manageOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 执行项目经理 | ||||||
|  |      */ | ||||||
|  |     private String executiveManager; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开票单位 | ||||||
|  |      */ | ||||||
|  |     private String invoiceUnit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收票单位 | ||||||
|  |      */ | ||||||
|  |     private String receiptUnit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 归档日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate archiveDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 目标成本 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal targetCost; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 可用目标成本 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal availableTargetCost; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 是否用印(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     private String hasSeal; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 警示 | ||||||
|  |      */ | ||||||
|  |     private String warning; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 大写合同价税合计 | ||||||
|  |      */ | ||||||
|  |     private String amountInWords; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签约组织 | ||||||
|  |      */ | ||||||
|  |     private String signOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目类型 | ||||||
|  |      */ | ||||||
|  |     private String projectType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目大项 | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款额不能超合同额(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     private String limitPay; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预结算/结算额不能超合同额(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     private String limitSettlement; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款额不能超合同额比例 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal limitPayRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预结算/结算额不能超合同额比例 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal limitSettlementRatio; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,52 @@ | |||||||
|  | package org.dromara.ctr.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 印章信息对象 ctr_subcontract_seal | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("ctr_subcontract_seal") | ||||||
|  | public class CtrSubcontractSeal extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分包合同id | ||||||
|  |      */ | ||||||
|  |     private Long subcontractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 印章名称 | ||||||
|  |      */ | ||||||
|  |     private String sealName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用印次数 | ||||||
|  |      */ | ||||||
|  |     private Integer sealCount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,93 @@ | |||||||
|  | package org.dromara.ctr.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.ctr.domain.ContractPaymentClause; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 支付条款业务对象 contract_payment_clause | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = ContractPaymentClause.class, reverseConvertGenerate = false) | ||||||
|  | public class ContractPaymentClauseBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键id不能为空", groups = {EditGroup.class}) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "合同id不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 类型 | ||||||
|  |      */ | ||||||
|  |     private String clauseType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结算周期 | ||||||
|  |      */ | ||||||
|  |     private String settlementCycle; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结算账龄(天) | ||||||
|  |      */ | ||||||
|  |     private Integer settlementAgeDays; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 里程碑节点 | ||||||
|  |      */ | ||||||
|  |     private String milestone; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 选择值 | ||||||
|  |      */ | ||||||
|  |     private String selectValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 比较符 | ||||||
|  |      */ | ||||||
|  |     private String comparator; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 比较值 | ||||||
|  |      */ | ||||||
|  |     private String compareValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款账龄(天) | ||||||
|  |      */ | ||||||
|  |     private Integer receiptAgeDays; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款基数 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal receiptBase; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal receiptRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注/补充说明 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,97 @@ | |||||||
|  | package org.dromara.ctr.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.ctr.domain.CtrContractAppoint; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-主要条款约定业务对象 ctr_contract_appoint | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = CtrContractAppoint.class, reverseConvertGenerate = false) | ||||||
|  | public class CtrContractAppointBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键id不能为空", groups = {EditGroup.class}) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "合同id不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金形式 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "履约保证金形式不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String performanceBondType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal performanceBondRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金金额(元) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal performanceBondAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 是否有预收款(0否 1 是) | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "是否有预收款(0否 1 是)不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String advancePaymentFlag; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预收款比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal advancePaymentRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预收款金额(元) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal advancePaymentAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金形式 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "质量保证金形式不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String qualityBondType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金比例(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal qualityBondRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金金额(元) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal qualityBondAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,80 @@ | |||||||
|  | package org.dromara.ctr.domain.bo; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.CtrContractBillItem; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import jakarta.validation.constraints.*; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-工程量清单业务对象 ctr_contract_bill_item | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = CtrContractBillItem.class, reverseConvertGenerate = false) | ||||||
|  | public class CtrContractBillItemBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键id不能为空", groups = { EditGroup.class }) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 编码 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "编码不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "合同id不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同清单名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同清单名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String itemName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计量单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "计量单位不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String unit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 数量 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal quantity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 含税单价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal unitPriceTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 价税合计 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalPriceTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 不含税金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal amountExclTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 税率(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal taxRate; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,181 @@ | |||||||
|  | package org.dromara.ctr.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.ctr.domain.CtrContractMain; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-基本信息业务对象 ctr_contract_main | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = CtrContractMain.class, reverseConvertGenerate = false) | ||||||
|  | public class CtrContractMainBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键id不能为空", groups = {EditGroup.class}) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同编码不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同名称不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "单据日期不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同模式 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同模式不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractMode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "签订日期不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 客户性质 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "客户性质不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String customerType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "甲方单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal contractAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开票单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "开票单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String invoiceCompany; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "乙方单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总投资额 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "总投资额不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private BigDecimal totalInvest; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预算分类 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "预算分类不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String budgetCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收票单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "收票单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String receiptCompany; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 归档日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate archiveDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付方式 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "支付方式不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String paymentMethod; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 工程规模 | ||||||
|  |      */ | ||||||
|  |     private String projectScale; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "状态不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 印章名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "印章名称不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String sealName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 大写合同价税合计 | ||||||
|  |      */ | ||||||
|  |     private String amountUpper; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签约组织 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "签约组织不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String signOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目类型 | ||||||
|  |      */ | ||||||
|  |     private String projectType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目大类 | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,127 @@ | |||||||
|  | package org.dromara.ctr.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.ctr.domain.CtrCooperationAgreement; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 合作协议业务对象 ctr_cooperation_agreement | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = CtrCooperationAgreement.class, reverseConvertGenerate = false) | ||||||
|  | public class CtrCooperationAgreementBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键id不能为空", groups = {EditGroup.class}) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同编码不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同名称不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "单据日期不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "甲方单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "乙方单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 公司名称 | ||||||
|  |      */ | ||||||
|  |     private String companyName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "签订日期不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同含税金额 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "合同含税金额不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private BigDecimal amount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 协议类型 | ||||||
|  |      */ | ||||||
|  |     private String agreementType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目经理 | ||||||
|  |      */ | ||||||
|  |     private String projectManager; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开始日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate startDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结束日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate endDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,214 @@ | |||||||
|  | package org.dromara.ctr.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractMain; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主要信息业务对象 ctr_subcontract_main | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = CtrSubcontractMain.class, reverseConvertGenerate = false) | ||||||
|  | public class CtrSubcontractMainBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键id不能为空", groups = {EditGroup.class}) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "项目id不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同编码不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同名称不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "单据日期不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同类型 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "合同类型不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String contractType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经营模式 | ||||||
|  |      */ | ||||||
|  |     private String businessMode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 原合同造价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal originalAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "甲方单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "乙方单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 含税合同金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal amountInclTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同状态 | ||||||
|  |      */ | ||||||
|  |     private String contractStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 累计变更金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal cumulativeChangeAmt; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 管理组织 | ||||||
|  |      */ | ||||||
|  |     private String manageOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 执行项目经理 | ||||||
|  |      */ | ||||||
|  |     private String executiveManager; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开票单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "开票单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String invoiceUnit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收票单位 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "收票单位不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String receiptUnit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 归档日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate archiveDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 目标成本 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal targetCost; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 可用目标成本 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal availableTargetCost; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 是否用印(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     private String hasSeal; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 警示 | ||||||
|  |      */ | ||||||
|  |     private String warning; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 大写合同价税合计 | ||||||
|  |      */ | ||||||
|  |     private String amountInWords; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签约组织 | ||||||
|  |      */ | ||||||
|  |     private String signOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目类型 | ||||||
|  |      */ | ||||||
|  |     private String projectType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目大项 | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款额不能超合同额(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     private String limitPay; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预结算/结算额不能超合同额(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     private String limitSettlement; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款额不能超合同额比例 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal limitPayRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预结算/结算额不能超合同额比例 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal limitSettlementRatio; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,54 @@ | |||||||
|  | package org.dromara.ctr.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotBlank; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractSeal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 印章信息业务对象 ctr_subcontract_seal | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = CtrSubcontractSeal.class, reverseConvertGenerate = false) | ||||||
|  | public class CtrSubcontractSealBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键id不能为空", groups = {EditGroup.class}) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分包合同id | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "分包合同id不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Long subcontractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 印章名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "印章名称不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private String sealName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用印次数 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "用印次数不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Integer sealCount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,112 @@ | |||||||
|  | package org.dromara.ctr.domain.vo; | ||||||
|  |  | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import org.dromara.ctr.domain.ContractPaymentClause; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 支付条款视图对象 contract_payment_clause | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = ContractPaymentClause.class) | ||||||
|  | public class ContractPaymentClauseVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "主键id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同id") | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "类型") | ||||||
|  |     private String clauseType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结算周期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "结算周期") | ||||||
|  |     private String settlementCycle; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结算账龄(天) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "结算账龄", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "天=") | ||||||
|  |     private Integer settlementAgeDays; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 里程碑节点 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "里程碑节点") | ||||||
|  |     private String milestone; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 选择值 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "选择值") | ||||||
|  |     private String selectValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 比较符 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "比较符") | ||||||
|  |     private String comparator; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 比较值 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "比较值") | ||||||
|  |     private String compareValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款账龄(天) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "收款账龄", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "天=") | ||||||
|  |     private Integer receiptAgeDays; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款基数 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "收款基数") | ||||||
|  |     private BigDecimal receiptBase; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收款比例(%) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "收款比例", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "%=") | ||||||
|  |     private BigDecimal receiptRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注/补充说明 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "备注/补充说明") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,107 @@ | |||||||
|  | package org.dromara.ctr.domain.vo; | ||||||
|  |  | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.ctr.domain.CtrContractAppoint; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-主要条款约定视图对象 ctr_contract_appoint | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = CtrContractAppoint.class) | ||||||
|  | public class CtrContractAppointVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "主键id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同id") | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金形式 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "履约保证金形式") | ||||||
|  |     private String performanceBondType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金比例(%) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "履约保证金比例(%)") | ||||||
|  |     private BigDecimal performanceBondRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 履约保证金金额(元) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "履约保证金金额(元)") | ||||||
|  |     private BigDecimal performanceBondAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 是否有预收款(0否 1 是) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "是否有预收款(0否 1 是)") | ||||||
|  |     private String advancePaymentFlag; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预收款比例(%) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "预收款比例(%)") | ||||||
|  |     private BigDecimal advancePaymentRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预收款金额(元) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "预收款金额(元)") | ||||||
|  |     private BigDecimal advancePaymentAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金形式 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "质量保证金形式") | ||||||
|  |     private String qualityBondType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金比例(%) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "质量保证金比例(%)") | ||||||
|  |     private BigDecimal qualityBondRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 质量保证金金额(元) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "质量保证金金额(元)") | ||||||
|  |     private BigDecimal qualityBondAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "文件id") | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "状态") | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,75 @@ | |||||||
|  | package org.dromara.ctr.domain.vo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.ctr.domain.CtrContractBillItem; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-工程量清单视图对象 ctr_contract_bill_item | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @AutoMapper(target = CtrContractBillItem.class) | ||||||
|  | public class CtrContractBillItemVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 编码 | ||||||
|  |      */ | ||||||
|  |     private String code; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同id | ||||||
|  |      */ | ||||||
|  |     private Long contractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同清单名称 | ||||||
|  |      */ | ||||||
|  |     private String itemName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计量单位 | ||||||
|  |      */ | ||||||
|  |     private String unit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 数量 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal quantity; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 含税单价 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal unitPriceTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 价税合计 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalPriceTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 不含税金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal amountExclTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 税率(%) | ||||||
|  |      */ | ||||||
|  |     private BigDecimal taxRate; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,163 @@ | |||||||
|  | package org.dromara.ctr.domain.vo; | ||||||
|  |  | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.ctr.domain.CtrContractMain; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-基本信息视图对象 ctr_contract_main | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = CtrContractMain.class) | ||||||
|  | public class CtrContractMainVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同模式 | ||||||
|  |      */ | ||||||
|  |     private String contractMode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 客户性质 | ||||||
|  |      */ | ||||||
|  |     private String customerType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal contractAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开票单位 | ||||||
|  |      */ | ||||||
|  |     private String invoiceCompany; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总投资额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal totalInvest; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预算分类 | ||||||
|  |      */ | ||||||
|  |     private String budgetCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收票单位 | ||||||
|  |      */ | ||||||
|  |     private String receiptCompany; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 归档日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate archiveDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付方式 | ||||||
|  |      */ | ||||||
|  |     private String paymentMethod; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 工程规模 | ||||||
|  |      */ | ||||||
|  |     private String projectScale; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 印章名称 | ||||||
|  |      */ | ||||||
|  |     private String sealName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 大写合同价税合计 | ||||||
|  |      */ | ||||||
|  |     private String amountUpper; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签约组织 | ||||||
|  |      */ | ||||||
|  |     private String signOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目类型 | ||||||
|  |      */ | ||||||
|  |     private String projectType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目大类 | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,131 @@ | |||||||
|  | package org.dromara.ctr.domain.vo; | ||||||
|  |  | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.translation.annotation.Translation; | ||||||
|  | import org.dromara.common.translation.constant.TransConstant; | ||||||
|  | import org.dromara.ctr.domain.CtrCooperationAgreement; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 合作协议视图对象 ctr_cooperation_agreement | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = CtrCooperationAgreement.class) | ||||||
|  | public class CtrCooperationAgreementVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 公司名称 | ||||||
|  |      */ | ||||||
|  |     private String companyName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同含税金额 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal amount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 协议类型 | ||||||
|  |      */ | ||||||
|  |     private String agreementType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目经理 | ||||||
|  |      */ | ||||||
|  |     private String projectManager; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开始日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate startDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结束日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate endDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 创建者 | ||||||
|  |      */ | ||||||
|  |     private Long createBy; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 创建者姓名 | ||||||
|  |      */ | ||||||
|  |     @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy") | ||||||
|  |     private String createByName; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,246 @@ | |||||||
|  | package org.dromara.ctr.domain.vo; | ||||||
|  |  | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractMain; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主要信息视图对象 ctr_subcontract_main | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = CtrSubcontractMain.class) | ||||||
|  | public class CtrSubcontractMainVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "主键id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目id") | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同编码 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同编码") | ||||||
|  |     private String contractCode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同名称") | ||||||
|  |     private String contractName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 单据日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单据日期") | ||||||
|  |     private LocalDate documentDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同类型") | ||||||
|  |     private String contractType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 经营模式 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "经营模式") | ||||||
|  |     private String businessMode; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 原合同造价 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "原合同造价") | ||||||
|  |     private BigDecimal originalAmount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签订日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "签订日期") | ||||||
|  |     private LocalDate signDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 甲方单位 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "甲方单位") | ||||||
|  |     private String partyA; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 乙方单位 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "乙方单位") | ||||||
|  |     private String partyB; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 含税合同金额 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "含税合同金额") | ||||||
|  |     private BigDecimal amountInclTax; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 合同状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "合同状态") | ||||||
|  |     private String contractStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 累计变更金额 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "累计变更金额") | ||||||
|  |     private BigDecimal cumulativeChangeAmt; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 管理组织 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "管理组织") | ||||||
|  |     private String manageOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 执行项目经理 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "执行项目经理") | ||||||
|  |     private String executiveManager; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开票单位 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "开票单位") | ||||||
|  |     private String invoiceUnit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 收票单位 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "收票单位") | ||||||
|  |     private String receiptUnit; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 归档日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "归档日期") | ||||||
|  |     private LocalDate archiveDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 目标成本 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "目标成本") | ||||||
|  |     private BigDecimal targetCost; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 可用目标成本 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "可用目标成本") | ||||||
|  |     private BigDecimal availableTargetCost; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 是否用印(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "是否用印", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "0=-否,1-是") | ||||||
|  |     private String hasSeal; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 警示 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "警示") | ||||||
|  |     private String warning; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 支付条款 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "支付条款") | ||||||
|  |     private String paymentTerms; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 文件id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "文件id") | ||||||
|  |     private String fileId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(dictType = "wf_business_status") | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 大写合同价税合计 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "大写合同价税合计") | ||||||
|  |     private String amountInWords; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 签约组织 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "签约组织") | ||||||
|  |     private String signOrg; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目类型 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目类型") | ||||||
|  |     private String projectType; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目大项 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目大项") | ||||||
|  |     private String projectCategory; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款额不能超合同额(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "付款额不能超合同额", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "0=-否,1-是") | ||||||
|  |     private String limitPay; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预结算/结算额不能超合同额(0-否,1-是) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "预结算/结算额不能超合同额", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(readConverterExp = "0=-否,1-是") | ||||||
|  |     private String limitSettlement; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 付款额不能超合同额比例 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "付款额不能超合同额比例") | ||||||
|  |     private BigDecimal limitPayRatio; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预结算/结算额不能超合同额比例 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "预结算/结算额不能超合同额比例") | ||||||
|  |     private BigDecimal limitSettlementRatio; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,58 @@ | |||||||
|  | package org.dromara.ctr.domain.vo; | ||||||
|  |  | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractSeal; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 印章信息视图对象 ctr_subcontract_seal | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = CtrSubcontractSeal.class) | ||||||
|  | public class CtrSubcontractSealVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "主键id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分包合同id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "分包合同id") | ||||||
|  |     private Long subcontractId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 印章名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "印章名称") | ||||||
|  |     private String sealName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 用印次数 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "用印次数") | ||||||
|  |     private Integer sealCount; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "备注") | ||||||
|  |     private String remark; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.ctr.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.ContractPaymentClause; | ||||||
|  | import org.dromara.ctr.domain.vo.ContractPaymentClauseVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 支付条款Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface ContractPaymentClauseMapper extends BaseMapperPlus<ContractPaymentClause, ContractPaymentClauseVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.ctr.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.CtrContractAppoint; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractAppointVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-主要条款约定Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface CtrContractAppointMapper extends BaseMapperPlus<CtrContractAppoint, CtrContractAppointVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.ctr.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.CtrContractBillItem; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractBillItemVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-工程量清单Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface CtrContractBillItemMapper extends BaseMapperPlus<CtrContractBillItem, CtrContractBillItemVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.ctr.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  | import org.dromara.ctr.domain.CtrContractMain; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractMainVo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-基本信息Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface CtrContractMainMapper extends BaseMapperPlus<CtrContractMain, CtrContractMainVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.ctr.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  | import org.dromara.ctr.domain.CtrCooperationAgreement; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrCooperationAgreementVo; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 合作协议Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface CtrCooperationAgreementMapper extends BaseMapperPlus<CtrCooperationAgreement, CtrCooperationAgreementVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.ctr.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractMain; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractMainVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主要信息Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface CtrSubcontractMainMapper extends BaseMapperPlus<CtrSubcontractMain, CtrSubcontractMainVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.ctr.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractSeal; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractSealVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 印章信息Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface CtrSubcontractSealMapper extends BaseMapperPlus<CtrSubcontractSeal, CtrSubcontractSealVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.ctr.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.ContractPaymentClause; | ||||||
|  | import org.dromara.ctr.domain.bo.ContractPaymentClauseBo; | ||||||
|  | import org.dromara.ctr.domain.vo.ContractPaymentClauseVo; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 支付条款Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface IContractPaymentClauseService extends IService<ContractPaymentClause> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询支付条款 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 支付条款 | ||||||
|  |      */ | ||||||
|  |     ContractPaymentClauseVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询支付条款列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 支付条款分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<ContractPaymentClauseVo> queryPageList(ContractPaymentClauseBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的支付条款列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 支付条款列表 | ||||||
|  |      */ | ||||||
|  |     List<ContractPaymentClauseVo> queryList(ContractPaymentClauseBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增支付条款 | ||||||
|  |      * | ||||||
|  |      * @param bo 支付条款 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(ContractPaymentClauseBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改支付条款 | ||||||
|  |      * | ||||||
|  |      * @param bo 支付条款 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(ContractPaymentClauseBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除支付条款信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.ctr.service; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractAppointVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractAppointBo; | ||||||
|  | import org.dromara.ctr.domain.CtrContractAppoint; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-主要条款约定Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface ICtrContractAppointService extends IService<CtrContractAppoint>{ | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-主要条款约定 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 承包合同-主要条款约定 | ||||||
|  |      */ | ||||||
|  |     CtrContractAppointVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询承包合同-主要条款约定列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 承包合同-主要条款约定分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<CtrContractAppointVo> queryPageList(CtrContractAppointBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的承包合同-主要条款约定列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 承包合同-主要条款约定列表 | ||||||
|  |      */ | ||||||
|  |     List<CtrContractAppointVo> queryList(CtrContractAppointBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-主要条款约定 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-主要条款约定 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(CtrContractAppointBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-主要条款约定 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-主要条款约定 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(CtrContractAppointBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除承包合同-主要条款约定信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.ctr.service; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractBillItemVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractBillItemBo; | ||||||
|  | import org.dromara.ctr.domain.CtrContractBillItem; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-工程量清单Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface ICtrContractBillItemService extends IService<CtrContractBillItem>{ | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-工程量清单 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 承包合同-工程量清单 | ||||||
|  |      */ | ||||||
|  |     CtrContractBillItemVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询承包合同-工程量清单列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 承包合同-工程量清单分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<CtrContractBillItemVo> queryPageList(CtrContractBillItemBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的承包合同-工程量清单列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 承包合同-工程量清单列表 | ||||||
|  |      */ | ||||||
|  |     List<CtrContractBillItemVo> queryList(CtrContractBillItemBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-工程量清单 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-工程量清单 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(CtrContractBillItemBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-工程量清单 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-工程量清单 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(CtrContractBillItemBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除承包合同-工程量清单信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.ctr.service; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractMainVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractMainBo; | ||||||
|  | import org.dromara.ctr.domain.CtrContractMain; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-基本信息Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface ICtrContractMainService extends IService<CtrContractMain>{ | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-基本信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 承包合同-基本信息 | ||||||
|  |      */ | ||||||
|  |     CtrContractMainVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询承包合同-基本信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 承包合同-基本信息分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<CtrContractMainVo> queryPageList(CtrContractMainBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的承包合同-基本信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 承包合同-基本信息列表 | ||||||
|  |      */ | ||||||
|  |     List<CtrContractMainVo> queryList(CtrContractMainBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-基本信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-基本信息 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(CtrContractMainBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-基本信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-基本信息 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(CtrContractMainBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除承包合同-基本信息信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.ctr.service; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.vo.CtrCooperationAgreementVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrCooperationAgreementBo; | ||||||
|  | import org.dromara.ctr.domain.CtrCooperationAgreement; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 合作协议Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | public interface ICtrCooperationAgreementService extends IService<CtrCooperationAgreement>{ | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询合作协议 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 合作协议 | ||||||
|  |      */ | ||||||
|  |     CtrCooperationAgreementVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询合作协议列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 合作协议分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<CtrCooperationAgreementVo> queryPageList(CtrCooperationAgreementBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的合作协议列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 合作协议列表 | ||||||
|  |      */ | ||||||
|  |     List<CtrCooperationAgreementVo> queryList(CtrCooperationAgreementBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增合作协议 | ||||||
|  |      * | ||||||
|  |      * @param bo 合作协议 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(CtrCooperationAgreementBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改合作协议 | ||||||
|  |      * | ||||||
|  |      * @param bo 合作协议 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(CtrCooperationAgreementBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除合作协议信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.ctr.service; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractMainVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrSubcontractMainBo; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractMain; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主要信息Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface ICtrSubcontractMainService extends IService<CtrSubcontractMain>{ | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询主要信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 主要信息 | ||||||
|  |      */ | ||||||
|  |     CtrSubcontractMainVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询主要信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 主要信息分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<CtrSubcontractMainVo> queryPageList(CtrSubcontractMainBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的主要信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 主要信息列表 | ||||||
|  |      */ | ||||||
|  |     List<CtrSubcontractMainVo> queryList(CtrSubcontractMainBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增主要信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 主要信息 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(CtrSubcontractMainBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改主要信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 主要信息 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(CtrSubcontractMainBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除主要信息信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,70 @@ | |||||||
|  | package org.dromara.ctr.service; | ||||||
|  |  | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractSealVo; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrSubcontractSealBo; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractSeal; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 印章信息Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | public interface ICtrSubcontractSealService extends IService<CtrSubcontractSeal>{ | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询印章信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 印章信息 | ||||||
|  |      */ | ||||||
|  |     CtrSubcontractSealVo queryById(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询印章信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 印章信息分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<CtrSubcontractSealVo> queryPageList(CtrSubcontractSealBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的印章信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 印章信息列表 | ||||||
|  |      */ | ||||||
|  |     List<CtrSubcontractSealVo> queryList(CtrSubcontractSealBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增印章信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 印章信息 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(CtrSubcontractSealBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改印章信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 印章信息 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(CtrSubcontractSealBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除印章信息信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,140 @@ | |||||||
|  | package org.dromara.ctr.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.ContractPaymentClause; | ||||||
|  | import org.dromara.ctr.domain.bo.ContractPaymentClauseBo; | ||||||
|  | import org.dromara.ctr.domain.vo.ContractPaymentClauseVo; | ||||||
|  | import org.dromara.ctr.mapper.ContractPaymentClauseMapper; | ||||||
|  | import org.dromara.ctr.service.IContractPaymentClauseService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 支付条款Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class ContractPaymentClauseServiceImpl extends ServiceImpl<ContractPaymentClauseMapper, ContractPaymentClause> | ||||||
|  |     implements IContractPaymentClauseService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询支付条款 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 支付条款 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public ContractPaymentClauseVo queryById(Long id) { | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询支付条款列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 支付条款分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<ContractPaymentClauseVo> queryPageList(ContractPaymentClauseBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<ContractPaymentClause> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<ContractPaymentClauseVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的支付条款列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 支付条款列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<ContractPaymentClauseVo> queryList(ContractPaymentClauseBo bo) { | ||||||
|  |         LambdaQueryWrapper<ContractPaymentClause> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<ContractPaymentClause> buildQueryWrapper(ContractPaymentClauseBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<ContractPaymentClause> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(ContractPaymentClause::getId); | ||||||
|  |         lqw.eq(bo.getContractId() != null, ContractPaymentClause::getContractId, bo.getContractId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getClauseType()), ContractPaymentClause::getClauseType, bo.getClauseType()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getSettlementCycle()), ContractPaymentClause::getSettlementCycle, bo.getSettlementCycle()); | ||||||
|  |         lqw.eq(bo.getSettlementAgeDays() != null, ContractPaymentClause::getSettlementAgeDays, bo.getSettlementAgeDays()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getMilestone()), ContractPaymentClause::getMilestone, bo.getMilestone()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getSelectValue()), ContractPaymentClause::getSelectValue, bo.getSelectValue()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getComparator()), ContractPaymentClause::getComparator, bo.getComparator()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getCompareValue()), ContractPaymentClause::getCompareValue, bo.getCompareValue()); | ||||||
|  |         lqw.eq(bo.getReceiptAgeDays() != null, ContractPaymentClause::getReceiptAgeDays, bo.getReceiptAgeDays()); | ||||||
|  |         lqw.eq(bo.getReceiptBase() != null, ContractPaymentClause::getReceiptBase, bo.getReceiptBase()); | ||||||
|  |         lqw.eq(bo.getReceiptRatio() != null, ContractPaymentClause::getReceiptRatio, bo.getReceiptRatio()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增支付条款 | ||||||
|  |      * | ||||||
|  |      * @param bo 支付条款 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(ContractPaymentClauseBo bo) { | ||||||
|  |         ContractPaymentClause add = MapstructUtils.convert(bo, ContractPaymentClause.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改支付条款 | ||||||
|  |      * | ||||||
|  |      * @param bo 支付条款 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(ContractPaymentClauseBo bo) { | ||||||
|  |         ContractPaymentClause update = MapstructUtils.convert(bo, ContractPaymentClause.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(ContractPaymentClause entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除支付条款信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,141 @@ | |||||||
|  | package org.dromara.ctr.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.CtrContractAppoint; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractAppointBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractAppointVo; | ||||||
|  | import org.dromara.ctr.mapper.CtrContractAppointMapper; | ||||||
|  | import org.dromara.ctr.service.ICtrContractAppointService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-主要条款约定Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class CtrContractAppointServiceImpl extends ServiceImpl<CtrContractAppointMapper, CtrContractAppoint> | ||||||
|  |     implements ICtrContractAppointService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-主要条款约定 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 承包合同-主要条款约定 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public CtrContractAppointVo queryById(Long id) { | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询承包合同-主要条款约定列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 承包合同-主要条款约定分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<CtrContractAppointVo> queryPageList(CtrContractAppointBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<CtrContractAppoint> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<CtrContractAppointVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的承包合同-主要条款约定列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 承包合同-主要条款约定列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<CtrContractAppointVo> queryList(CtrContractAppointBo bo) { | ||||||
|  |         LambdaQueryWrapper<CtrContractAppoint> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<CtrContractAppoint> buildQueryWrapper(CtrContractAppointBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<CtrContractAppoint> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(CtrContractAppoint::getId); | ||||||
|  |         lqw.eq(bo.getContractId() != null, CtrContractAppoint::getContractId, bo.getContractId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPerformanceBondType()), CtrContractAppoint::getPerformanceBondType, bo.getPerformanceBondType()); | ||||||
|  |         lqw.eq(bo.getPerformanceBondRatio() != null, CtrContractAppoint::getPerformanceBondRatio, bo.getPerformanceBondRatio()); | ||||||
|  |         lqw.eq(bo.getPerformanceBondAmount() != null, CtrContractAppoint::getPerformanceBondAmount, bo.getPerformanceBondAmount()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getAdvancePaymentFlag()), CtrContractAppoint::getAdvancePaymentFlag, bo.getAdvancePaymentFlag()); | ||||||
|  |         lqw.eq(bo.getAdvancePaymentRatio() != null, CtrContractAppoint::getAdvancePaymentRatio, bo.getAdvancePaymentRatio()); | ||||||
|  |         lqw.eq(bo.getAdvancePaymentAmount() != null, CtrContractAppoint::getAdvancePaymentAmount, bo.getAdvancePaymentAmount()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getQualityBondType()), CtrContractAppoint::getQualityBondType, bo.getQualityBondType()); | ||||||
|  |         lqw.eq(bo.getQualityBondRatio() != null, CtrContractAppoint::getQualityBondRatio, bo.getQualityBondRatio()); | ||||||
|  |         lqw.eq(bo.getQualityBondAmount() != null, CtrContractAppoint::getQualityBondAmount, bo.getQualityBondAmount()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getFileId()), CtrContractAppoint::getFileId, bo.getFileId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CtrContractAppoint::getStatus, bo.getStatus()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-主要条款约定 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-主要条款约定 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(CtrContractAppointBo bo) { | ||||||
|  |         CtrContractAppoint add = MapstructUtils.convert(bo, CtrContractAppoint.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-主要条款约定 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-主要条款约定 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(CtrContractAppointBo bo) { | ||||||
|  |         CtrContractAppoint update = MapstructUtils.convert(bo, CtrContractAppoint.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(CtrContractAppoint entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除承包合同-主要条款约定信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,138 @@ | |||||||
|  | package org.dromara.ctr.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.CtrContractBillItem; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractBillItemBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractBillItemVo; | ||||||
|  | import org.dromara.ctr.mapper.CtrContractBillItemMapper; | ||||||
|  | import org.dromara.ctr.service.ICtrContractBillItemService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-工程量清单Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class CtrContractBillItemServiceImpl extends ServiceImpl<CtrContractBillItemMapper, CtrContractBillItem> | ||||||
|  |     implements ICtrContractBillItemService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-工程量清单 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 承包合同-工程量清单 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public CtrContractBillItemVo queryById(Long id) { | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询承包合同-工程量清单列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 承包合同-工程量清单分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<CtrContractBillItemVo> queryPageList(CtrContractBillItemBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<CtrContractBillItem> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<CtrContractBillItemVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的承包合同-工程量清单列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 承包合同-工程量清单列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<CtrContractBillItemVo> queryList(CtrContractBillItemBo bo) { | ||||||
|  |         LambdaQueryWrapper<CtrContractBillItem> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<CtrContractBillItem> buildQueryWrapper(CtrContractBillItemBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<CtrContractBillItem> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(CtrContractBillItem::getId); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getCode()), CtrContractBillItem::getCode, bo.getCode()); | ||||||
|  |         lqw.eq(bo.getContractId() != null, CtrContractBillItem::getContractId, bo.getContractId()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getItemName()), CtrContractBillItem::getItemName, bo.getItemName()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CtrContractBillItem::getUnit, bo.getUnit()); | ||||||
|  |         lqw.eq(bo.getQuantity() != null, CtrContractBillItem::getQuantity, bo.getQuantity()); | ||||||
|  |         lqw.eq(bo.getUnitPriceTax() != null, CtrContractBillItem::getUnitPriceTax, bo.getUnitPriceTax()); | ||||||
|  |         lqw.eq(bo.getTotalPriceTax() != null, CtrContractBillItem::getTotalPriceTax, bo.getTotalPriceTax()); | ||||||
|  |         lqw.eq(bo.getAmountExclTax() != null, CtrContractBillItem::getAmountExclTax, bo.getAmountExclTax()); | ||||||
|  |         lqw.eq(bo.getTaxRate() != null, CtrContractBillItem::getTaxRate, bo.getTaxRate()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-工程量清单 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-工程量清单 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(CtrContractBillItemBo bo) { | ||||||
|  |         CtrContractBillItem add = MapstructUtils.convert(bo, CtrContractBillItem.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-工程量清单 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-工程量清单 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(CtrContractBillItemBo bo) { | ||||||
|  |         CtrContractBillItem update = MapstructUtils.convert(bo, CtrContractBillItem.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(CtrContractBillItem entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除承包合同-工程量清单信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,137 @@ | |||||||
|  | package org.dromara.ctr.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.CtrContractMain; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrContractMainBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrContractMainVo; | ||||||
|  | import org.dromara.ctr.mapper.CtrContractMainMapper; | ||||||
|  | import org.dromara.ctr.service.ICtrContractMainService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 承包合同-基本信息Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class CtrContractMainServiceImpl extends ServiceImpl<CtrContractMainMapper, CtrContractMain> | ||||||
|  |     implements ICtrContractMainService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询承包合同-基本信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 承包合同-基本信息 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public CtrContractMainVo queryById(Long id) { | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询承包合同-基本信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 承包合同-基本信息分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<CtrContractMainVo> queryPageList(CtrContractMainBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<CtrContractMain> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<CtrContractMainVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的承包合同-基本信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 承包合同-基本信息列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<CtrContractMainVo> queryList(CtrContractMainBo bo) { | ||||||
|  |         LambdaQueryWrapper<CtrContractMain> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<CtrContractMain> buildQueryWrapper(CtrContractMainBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<CtrContractMain> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(CtrContractMain::getId); | ||||||
|  |         lqw.eq(bo.getProjectId() != null, CtrContractMain::getProjectId, bo.getProjectId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), CtrContractMain::getContractCode, bo.getContractCode()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getContractName()), CtrContractMain::getContractName, bo.getContractName()); | ||||||
|  |         lqw.eq(bo.getDocumentDate() != null, CtrContractMain::getDocumentDate, bo.getDocumentDate()); | ||||||
|  |         lqw.eq(bo.getSignDate() != null, CtrContractMain::getSignDate, bo.getSignDate()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPartyA()), CtrContractMain::getPartyA, bo.getPartyA()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPartyB()), CtrContractMain::getPartyB, bo.getPartyB()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CtrContractMain::getStatus, bo.getStatus()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增承包合同-基本信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-基本信息 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(CtrContractMainBo bo) { | ||||||
|  |         CtrContractMain add = MapstructUtils.convert(bo, CtrContractMain.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改承包合同-基本信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 承包合同-基本信息 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(CtrContractMainBo bo) { | ||||||
|  |         CtrContractMain update = MapstructUtils.convert(bo, CtrContractMain.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(CtrContractMain entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除承包合同-基本信息信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,144 @@ | |||||||
|  | package org.dromara.ctr.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.CtrCooperationAgreement; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrCooperationAgreementBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrCooperationAgreementVo; | ||||||
|  | import org.dromara.ctr.mapper.CtrCooperationAgreementMapper; | ||||||
|  | import org.dromara.ctr.service.ICtrCooperationAgreementService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 合作协议Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-23 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class CtrCooperationAgreementServiceImpl extends ServiceImpl<CtrCooperationAgreementMapper, CtrCooperationAgreement> | ||||||
|  |     implements ICtrCooperationAgreementService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询合作协议 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 合作协议 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public CtrCooperationAgreementVo queryById(Long id) { | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询合作协议列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 合作协议分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<CtrCooperationAgreementVo> queryPageList(CtrCooperationAgreementBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<CtrCooperationAgreement> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<CtrCooperationAgreementVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的合作协议列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 合作协议列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<CtrCooperationAgreementVo> queryList(CtrCooperationAgreementBo bo) { | ||||||
|  |         LambdaQueryWrapper<CtrCooperationAgreement> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<CtrCooperationAgreement> buildQueryWrapper(CtrCooperationAgreementBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<CtrCooperationAgreement> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(CtrCooperationAgreement::getId); | ||||||
|  |         lqw.eq(bo.getProjectId() != null, CtrCooperationAgreement::getProjectId, bo.getProjectId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), CtrCooperationAgreement::getContractCode, bo.getContractCode()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getContractName()), CtrCooperationAgreement::getContractName, bo.getContractName()); | ||||||
|  |         lqw.eq(bo.getDocumentDate() != null, CtrCooperationAgreement::getDocumentDate, bo.getDocumentDate()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPartyA()), CtrCooperationAgreement::getPartyA, bo.getPartyA()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPartyB()), CtrCooperationAgreement::getPartyB, bo.getPartyB()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getCompanyName()), CtrCooperationAgreement::getCompanyName, bo.getCompanyName()); | ||||||
|  |         lqw.eq(bo.getSignDate() != null, CtrCooperationAgreement::getSignDate, bo.getSignDate()); | ||||||
|  |         lqw.eq(bo.getAmount() != null, CtrCooperationAgreement::getAmount, bo.getAmount()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getAgreementType()), CtrCooperationAgreement::getAgreementType, bo.getAgreementType()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getProjectManager()), CtrCooperationAgreement::getProjectManager, bo.getProjectManager()); | ||||||
|  |         lqw.eq(bo.getStartDate() != null, CtrCooperationAgreement::getStartDate, bo.getStartDate()); | ||||||
|  |         lqw.eq(bo.getEndDate() != null, CtrCooperationAgreement::getEndDate, bo.getEndDate()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), CtrCooperationAgreement::getPaymentTerms, bo.getPaymentTerms()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CtrCooperationAgreement::getStatus, bo.getStatus()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增合作协议 | ||||||
|  |      * | ||||||
|  |      * @param bo 合作协议 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(CtrCooperationAgreementBo bo) { | ||||||
|  |         CtrCooperationAgreement add = MapstructUtils.convert(bo, CtrCooperationAgreement.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改合作协议 | ||||||
|  |      * | ||||||
|  |      * @param bo 合作协议 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(CtrCooperationAgreementBo bo) { | ||||||
|  |         CtrCooperationAgreement update = MapstructUtils.convert(bo, CtrCooperationAgreement.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(CtrCooperationAgreement entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除合作协议信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,162 @@ | |||||||
|  | package org.dromara.ctr.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractMain; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrSubcontractMainBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractMainVo; | ||||||
|  | import org.dromara.ctr.mapper.CtrSubcontractMainMapper; | ||||||
|  | import org.dromara.ctr.service.ICtrSubcontractMainService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 主要信息Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class CtrSubcontractMainServiceImpl extends ServiceImpl<CtrSubcontractMainMapper, CtrSubcontractMain> | ||||||
|  |     implements ICtrSubcontractMainService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询主要信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 主要信息 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public CtrSubcontractMainVo queryById(Long id) { | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询主要信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 主要信息分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<CtrSubcontractMainVo> queryPageList(CtrSubcontractMainBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<CtrSubcontractMain> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<CtrSubcontractMainVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的主要信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 主要信息列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<CtrSubcontractMainVo> queryList(CtrSubcontractMainBo bo) { | ||||||
|  |         LambdaQueryWrapper<CtrSubcontractMain> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<CtrSubcontractMain> buildQueryWrapper(CtrSubcontractMainBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<CtrSubcontractMain> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(CtrSubcontractMain::getId); | ||||||
|  |         lqw.eq(bo.getProjectId() != null, CtrSubcontractMain::getProjectId, bo.getProjectId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), CtrSubcontractMain::getContractCode, bo.getContractCode()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getContractName()), CtrSubcontractMain::getContractName, bo.getContractName()); | ||||||
|  |         lqw.eq(bo.getDocumentDate() != null, CtrSubcontractMain::getDocumentDate, bo.getDocumentDate()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getContractType()), CtrSubcontractMain::getContractType, bo.getContractType()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getBusinessMode()), CtrSubcontractMain::getBusinessMode, bo.getBusinessMode()); | ||||||
|  |         lqw.eq(bo.getOriginalAmount() != null, CtrSubcontractMain::getOriginalAmount, bo.getOriginalAmount()); | ||||||
|  |         lqw.eq(bo.getSignDate() != null, CtrSubcontractMain::getSignDate, bo.getSignDate()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPartyA()), CtrSubcontractMain::getPartyA, bo.getPartyA()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPartyB()), CtrSubcontractMain::getPartyB, bo.getPartyB()); | ||||||
|  |         lqw.eq(bo.getAmountInclTax() != null, CtrSubcontractMain::getAmountInclTax, bo.getAmountInclTax()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getContractStatus()), CtrSubcontractMain::getContractStatus, bo.getContractStatus()); | ||||||
|  |         lqw.eq(bo.getCumulativeChangeAmt() != null, CtrSubcontractMain::getCumulativeChangeAmt, bo.getCumulativeChangeAmt()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getManageOrg()), CtrSubcontractMain::getManageOrg, bo.getManageOrg()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getExecutiveManager()), CtrSubcontractMain::getExecutiveManager, bo.getExecutiveManager()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getInvoiceUnit()), CtrSubcontractMain::getInvoiceUnit, bo.getInvoiceUnit()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getReceiptUnit()), CtrSubcontractMain::getReceiptUnit, bo.getReceiptUnit()); | ||||||
|  |         lqw.eq(bo.getArchiveDate() != null, CtrSubcontractMain::getArchiveDate, bo.getArchiveDate()); | ||||||
|  |         lqw.eq(bo.getTargetCost() != null, CtrSubcontractMain::getTargetCost, bo.getTargetCost()); | ||||||
|  |         lqw.eq(bo.getAvailableTargetCost() != null, CtrSubcontractMain::getAvailableTargetCost, bo.getAvailableTargetCost()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getHasSeal()), CtrSubcontractMain::getHasSeal, bo.getHasSeal()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getWarning()), CtrSubcontractMain::getWarning, bo.getWarning()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), CtrSubcontractMain::getPaymentTerms, bo.getPaymentTerms()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getFileId()), CtrSubcontractMain::getFileId, bo.getFileId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CtrSubcontractMain::getStatus, bo.getStatus()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getAmountInWords()), CtrSubcontractMain::getAmountInWords, bo.getAmountInWords()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getSignOrg()), CtrSubcontractMain::getSignOrg, bo.getSignOrg()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), CtrSubcontractMain::getProjectType, bo.getProjectType()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), CtrSubcontractMain::getProjectCategory, bo.getProjectCategory()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getLimitPay()), CtrSubcontractMain::getLimitPay, bo.getLimitPay()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getLimitSettlement()), CtrSubcontractMain::getLimitSettlement, bo.getLimitSettlement()); | ||||||
|  |         lqw.eq(bo.getLimitPayRatio() != null, CtrSubcontractMain::getLimitPayRatio, bo.getLimitPayRatio()); | ||||||
|  |         lqw.eq(bo.getLimitSettlementRatio() != null, CtrSubcontractMain::getLimitSettlementRatio, bo.getLimitSettlementRatio()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增主要信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 主要信息 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(CtrSubcontractMainBo bo) { | ||||||
|  |         CtrSubcontractMain add = MapstructUtils.convert(bo, CtrSubcontractMain.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改主要信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 主要信息 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(CtrSubcontractMainBo bo) { | ||||||
|  |         CtrSubcontractMain update = MapstructUtils.convert(bo, CtrSubcontractMain.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(CtrSubcontractMain entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除主要信息信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,132 @@ | |||||||
|  | package org.dromara.ctr.service.impl; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.ctr.domain.CtrSubcontractSeal; | ||||||
|  | import org.dromara.ctr.domain.bo.CtrSubcontractSealBo; | ||||||
|  | import org.dromara.ctr.domain.vo.CtrSubcontractSealVo; | ||||||
|  | import org.dromara.ctr.mapper.CtrSubcontractSealMapper; | ||||||
|  | import org.dromara.ctr.service.ICtrSubcontractSealService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 印章信息Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class CtrSubcontractSealServiceImpl extends ServiceImpl<CtrSubcontractSealMapper, CtrSubcontractSeal> | ||||||
|  |     implements ICtrSubcontractSealService { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询印章信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 印章信息 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public CtrSubcontractSealVo queryById(Long id) { | ||||||
|  |         return baseMapper.selectVoById(id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询印章信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 印章信息分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<CtrSubcontractSealVo> queryPageList(CtrSubcontractSealBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<CtrSubcontractSeal> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<CtrSubcontractSealVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的印章信息列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 印章信息列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<CtrSubcontractSealVo> queryList(CtrSubcontractSealBo bo) { | ||||||
|  |         LambdaQueryWrapper<CtrSubcontractSeal> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<CtrSubcontractSeal> buildQueryWrapper(CtrSubcontractSealBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<CtrSubcontractSeal> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(CtrSubcontractSeal::getId); | ||||||
|  |         lqw.eq(bo.getSubcontractId() != null, CtrSubcontractSeal::getSubcontractId, bo.getSubcontractId()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getSealName()), CtrSubcontractSeal::getSealName, bo.getSealName()); | ||||||
|  |         lqw.eq(bo.getSealCount() != null, CtrSubcontractSeal::getSealCount, bo.getSealCount()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增印章信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 印章信息 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(CtrSubcontractSealBo bo) { | ||||||
|  |         CtrSubcontractSeal add = MapstructUtils.convert(bo, CtrSubcontractSeal.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改印章信息 | ||||||
|  |      * | ||||||
|  |      * @param bo 印章信息 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(CtrSubcontractSealBo bo) { | ||||||
|  |         CtrSubcontractSeal update = MapstructUtils.convert(bo, CtrSubcontractSeal.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(CtrSubcontractSeal entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除印章信息信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -6,7 +6,9 @@ import org.dromara.progress.service.IPgsProgressPlanDetailService; | |||||||
| import org.springframework.scheduling.annotation.Scheduled; | import org.springframework.scheduling.annotation.Scheduled; | ||||||
| import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||||
|  |  | ||||||
|  | import java.time.DayOfWeek; | ||||||
| import java.time.LocalDate; | import java.time.LocalDate; | ||||||
|  | import java.time.temporal.TemporalAdjusters; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 同步计划详情到施工产值 |  * 同步计划详情到施工产值 | ||||||
| @ -24,11 +26,17 @@ public class IncSyncPlanDetail2ConstructionValue { | |||||||
|     /** |     /** | ||||||
|      * 同步计划详情到施工产值(每天 1 点执行) |      * 同步计划详情到施工产值(每天 1 点执行) | ||||||
|      */ |      */ | ||||||
|     @Scheduled(cron = "0 0 1 * * ?") |     @Scheduled(cron = "0 0 2 ? * MON") | ||||||
|     public void run() { |     public void run() { | ||||||
|         LocalDate yesterday = LocalDate.now().minusWeeks(1); |         LocalDate today = LocalDate.now(); | ||||||
|         log.info("执行定时任务:同步 {} 计划详情到施工产值", yesterday); |         // 找到本周一 | ||||||
|         Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(yesterday, null); |         LocalDate thisMonday = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)); | ||||||
|  |         // 上周一 = 本周一 - 1 周 | ||||||
|  |         LocalDate lastMonday = thisMonday.minusWeeks(1); | ||||||
|  |         // 上周日 = 上周一 + 6 天 | ||||||
|  |         LocalDate lastSunday = lastMonday.plusDays(6); | ||||||
|  |         log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday); | ||||||
|  |         Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null); | ||||||
|         if (synced) { |         if (synced) { | ||||||
|             log.info("同步计划详情到施工产值成功"); |             log.info("同步计划详情到施工产值成功"); | ||||||
|         } else { |         } else { | ||||||
|  | |||||||
| @ -0,0 +1,119 @@ | |||||||
|  | package org.dromara.out.controller; | ||||||
|  |  | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import jakarta.servlet.http.HttpServletResponse; | ||||||
|  | import jakarta.validation.constraints.NotEmpty; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.dromara.common.core.domain.R; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.excel.utils.ExcelUtil; | ||||||
|  | import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||||
|  | import org.dromara.common.log.annotation.Log; | ||||||
|  | import org.dromara.common.log.enums.BusinessType; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.common.web.core.BaseController; | ||||||
|  | import org.dromara.out.domain.bo.OutConstructionValueRangeBo; | ||||||
|  | import org.dromara.out.domain.vo.OutConstructionValueRangeVo; | ||||||
|  | import org.dromara.out.service.IOutConstructionValueRangeService; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 施工产值范围 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/out/constructionValueRange") | ||||||
|  | public class OutConstructionValueRangeController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IOutConstructionValueRangeService outConstructionValueRangeService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询施工产值范围列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("out:constructionValueRange:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<OutConstructionValueRangeVo> list(OutConstructionValueRangeBo bo, PageQuery pageQuery) { | ||||||
|  |         return outConstructionValueRangeService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 导出施工产值范围列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("out:constructionValueRange:export") | ||||||
|  |     @Log(title = "施工产值范围", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(OutConstructionValueRangeBo bo, HttpServletResponse response) { | ||||||
|  |         List<OutConstructionValueRangeVo> list = outConstructionValueRangeService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "施工产值范围", OutConstructionValueRangeVo.class, response); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取施工产值范围详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("out:constructionValueRange:query") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public R<OutConstructionValueRangeVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                                   @PathVariable Long id) { | ||||||
|  |         return R.ok(outConstructionValueRangeService.queryById(id, false)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取施工产值范围详细信息 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("out:constructionValueRange:query") | ||||||
|  |     @GetMapping("/detail/{id}") | ||||||
|  |     public R<OutConstructionValueRangeVo> getDetailInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                                         @PathVariable Long id) { | ||||||
|  |         return R.ok(outConstructionValueRangeService.queryById(id, true)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增施工产值范围 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("out:constructionValueRange:add") | ||||||
|  |     @Log(title = "施工产值范围", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody OutConstructionValueRangeBo bo) { | ||||||
|  |         return toAjax(outConstructionValueRangeService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改施工产值范围 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("out:constructionValueRange:edit") | ||||||
|  |     @Log(title = "施工产值范围", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody OutConstructionValueRangeBo bo) { | ||||||
|  |         return toAjax(outConstructionValueRangeService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 删除施工产值范围 | ||||||
|  |      * | ||||||
|  |      * @param ids 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("out:constructionValueRange:remove") | ||||||
|  |     @Log(title = "施工产值范围", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{ids}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] ids) { | ||||||
|  |         return toAjax(outConstructionValueRangeService.deleteWithValidByIds(List.of(ids), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,9 +1,9 @@ | |||||||
| package org.dromara.out.controller; | package org.dromara.out.controller; | ||||||
|  |  | ||||||
|  | import cn.hutool.core.collection.CollUtil; | ||||||
| import cn.hutool.http.HttpStatus; | import cn.hutool.http.HttpStatus; | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
| import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||||
| import org.dromara.cailiaoshebei.service.IBusMaterialsorderService; |  | ||||||
| import org.dromara.common.core.enums.BusinessStatusEnum; | import org.dromara.common.core.enums.BusinessStatusEnum; | ||||||
| import org.dromara.common.core.enums.FormatsType; | import org.dromara.common.core.enums.FormatsType; | ||||||
| import org.dromara.common.core.utils.DateUtils; | import org.dromara.common.core.utils.DateUtils; | ||||||
| @ -16,13 +16,13 @@ import org.dromara.out.domain.bo.OutTableBo; | |||||||
| import org.dromara.out.domain.bo.PurchaseValueAReq; | import org.dromara.out.domain.bo.PurchaseValueAReq; | ||||||
| import org.dromara.out.domain.vo.*; | import org.dromara.out.domain.vo.*; | ||||||
| import org.dromara.out.service.*; | import org.dromara.out.service.*; | ||||||
| import org.dromara.progress.service.IPgsProgressCategoryService; |  | ||||||
| import org.dromara.progress.service.IPgsProgressPlanDetailService; |  | ||||||
| import org.dromara.project.domain.dto.project.BusProjectQueryReq; | import org.dromara.project.domain.dto.project.BusProjectQueryReq; | ||||||
| import org.dromara.project.domain.vo.project.BusProjectVo; | import org.dromara.project.domain.vo.project.BusProjectVo; | ||||||
| import org.dromara.project.service.IBusProjectService; | import org.dromara.project.service.IBusProjectService; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.GetMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  |  | ||||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||||
| import java.math.RoundingMode; | import java.math.RoundingMode; | ||||||
| @ -48,12 +48,10 @@ public class OutTableController extends BaseController { | |||||||
|  |  | ||||||
|     private final IOutConstructionValueService constructionValueService; |     private final IOutConstructionValueService constructionValueService; | ||||||
|  |  | ||||||
|  |     private final IOutConstructionValueRangeService constructionValueRangeService; | ||||||
|  |  | ||||||
|     private final IBusProjectService projectService; |     private final IBusProjectService projectService; | ||||||
|  |  | ||||||
|     private final IPgsProgressPlanDetailService progressPlanDetailService; |  | ||||||
|  |  | ||||||
|     private final IPgsProgressCategoryService progressCategoryService; |  | ||||||
|  |  | ||||||
|     private final IOutMonthPlanAuditService outMonthPlanAuditService; |     private final IOutMonthPlanAuditService outMonthPlanAuditService; | ||||||
|  |  | ||||||
|     private final IOutMonthPlanService monthPlanService; |     private final IOutMonthPlanService monthPlanService; | ||||||
| @ -62,8 +60,6 @@ public class OutTableController extends BaseController { | |||||||
|  |  | ||||||
|     private final IOutSettlementValueOwnerService settlementValueOwnerService; |     private final IOutSettlementValueOwnerService settlementValueOwnerService; | ||||||
|  |  | ||||||
|     private final IBusMaterialsorderService busMaterialsorderService; |  | ||||||
|  |  | ||||||
|     private final IOutValueAllocationService valueAllocationService; |     private final IOutValueAllocationService valueAllocationService; | ||||||
|  |  | ||||||
|     private final IOutMonthPlanService outMonthPlanService; |     private final IOutMonthPlanService outMonthPlanService; | ||||||
| @ -112,7 +108,7 @@ public class OutTableController extends BaseController { | |||||||
|         List<OutMonthlyConstructionVo> outMonthlyConstructionVos = new ArrayList<>(); |         List<OutMonthlyConstructionVo> outMonthlyConstructionVos = new ArrayList<>(); | ||||||
|  |  | ||||||
|  |  | ||||||
|         for (BusProjectVo busProjectVo : rows){ |         for (BusProjectVo busProjectVo : rows) { | ||||||
|             OutMonthlyConstructionVo vo = new OutMonthlyConstructionVo(); |             OutMonthlyConstructionVo vo = new OutMonthlyConstructionVo(); | ||||||
|             vo.setProjectName(busProjectVo.getProjectName()); |             vo.setProjectName(busProjectVo.getProjectName()); | ||||||
|  |  | ||||||
| @ -123,26 +119,31 @@ public class OutTableController extends BaseController { | |||||||
|             for (OutMonthPlanAudit planAudit : planAudits) { |             for (OutMonthPlanAudit planAudit : planAudits) { | ||||||
| //                totalValue = totalValue.add(planAudit.getConstructionValue()); | //                totalValue = totalValue.add(planAudit.getConstructionValue()); | ||||||
|                 YearMonth planMonth = YearMonth.parse(planAudit.getPlanMonth(), formatter); |                 YearMonth planMonth = YearMonth.parse(planAudit.getPlanMonth(), formatter); | ||||||
|                 if(!planMonth.isAfter(yearMonth)){ |                 if (!planMonth.isAfter(yearMonth)) { | ||||||
|                     estimatedTotalValue=estimatedTotalValue.add(planAudit.getConstructionValue()); |                     estimatedTotalValue = estimatedTotalValue.add(planAudit.getConstructionValue()); | ||||||
|                 } |                 } | ||||||
|                 if(planMonth.equals(paramMonth)){ |                 if (planMonth.equals(paramMonth)) { | ||||||
|                     monthlyEstimatedValue = planAudit.getConstructionValue(); |                     monthlyEstimatedValue = planAudit.getConstructionValue(); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             //转化单位为万元 查询总值 |             //转化单位为万元 查询总值 | ||||||
|             BigDecimal totalValue =  getTotal(type,busProjectVo.getId()); |             BigDecimal totalValue = getTotal(type, busProjectVo.getId()); | ||||||
|             vo.setTotalValue(totalValue.divide(parseUnit)); |             vo.setTotalValue(totalValue.divide(parseUnit)); | ||||||
|             vo.setEstimatedAccumulatedValue(estimatedTotalValue.divide(parseUnit)); |             vo.setEstimatedAccumulatedValue(estimatedTotalValue.divide(parseUnit)); | ||||||
|             vo.setMonthlyEstimatedValue(monthlyEstimatedValue.divide(parseUnit)); |             vo.setMonthlyEstimatedValue(monthlyEstimatedValue.divide(parseUnit)); | ||||||
|  |  | ||||||
|             //查询项目的审核通过的施工详细表 1.累计完成产值 2.完成产值月合计 3.各周完成产值 |             //查询项目的审核通过的施工详细表 1.累计完成产值 2.完成产值月合计 3.各周完成产值 | ||||||
|             List<OutConstructionValue> outConstructionValues = constructionValueService.lambdaQuery() |             List<OutConstructionValue> outConstructionValues = new ArrayList<>(); | ||||||
|                 .eq(OutConstructionValue::getProjectId, busProjectVo.getId()) |             List<OutConstructionValueRange> list = constructionValueRangeService.lambdaQuery() | ||||||
|                 .eq(OutConstructionValue::getAuditStatus, BusinessStatusEnum.FINISH.getStatus()) |                 .eq(OutConstructionValueRange::getProjectId, busProjectVo.getId()) | ||||||
|  |                 .eq(OutConstructionValueRange::getAuditStatus, BusinessStatusEnum.FINISH.getStatus()) | ||||||
|                 .list(); |                 .list(); | ||||||
|  |             if (CollUtil.isNotEmpty(list)) { | ||||||
|  |                 outConstructionValues = constructionValueService.lambdaQuery() | ||||||
|  |                     .in(OutConstructionValue::getRangeId, list.stream().map(OutConstructionValueRange::getId).toList()) | ||||||
|  |                     .list(); | ||||||
|  |             } | ||||||
|             BigDecimal accumulatedCompletionValue = BigDecimal.ZERO; |             BigDecimal accumulatedCompletionValue = BigDecimal.ZERO; | ||||||
|  |  | ||||||
|             BigDecimal firstWeekCompletionValue = BigDecimal.ZERO; |             BigDecimal firstWeekCompletionValue = BigDecimal.ZERO; | ||||||
| @ -230,7 +231,6 @@ public class OutTableController extends BaseController { | |||||||
|         List<BusProjectVo> rows = busProjectVoTableDataInfo.getRows(); |         List<BusProjectVo> rows = busProjectVoTableDataInfo.getRows(); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|         List<OutComparisonOfCompletionAndSettlementVo> outComparisonOfCompletionAndSettlementVos = new ArrayList<>(); |         List<OutComparisonOfCompletionAndSettlementVo> outComparisonOfCompletionAndSettlementVos = new ArrayList<>(); | ||||||
|  |  | ||||||
|         for (BusProjectVo projectVo : rows) { |         for (BusProjectVo projectVo : rows) { | ||||||
| @ -242,15 +242,15 @@ public class OutTableController extends BaseController { | |||||||
|             vo.setProjectId(projectVoId); |             vo.setProjectId(projectVoId); | ||||||
|  |  | ||||||
| //            BigDecimal bigDecimal = busMaterialsorderService.grossOutput(projectVoId, null); | //            BigDecimal bigDecimal = busMaterialsorderService.grossOutput(projectVoId, null); | ||||||
|             if("1".equals(bo.getValueType())){ |             if ("1".equals(bo.getValueType())) { | ||||||
|                 //设计完工产值 |                 //设计完工产值 | ||||||
|                 BigDecimal designValue = monthPlanService.getDesignValueByProjectId(projectVoId,null,bo.getType()); |                 BigDecimal designValue = monthPlanService.getDesignValueByProjectId(projectVoId, null, bo.getType()); | ||||||
|                 vo.setTotalCompletionOutputValue( designValue); |                 vo.setTotalCompletionOutputValue(designValue); | ||||||
|             } else if ("2".equals(bo.getValueType())) { |             } else if ("2".equals(bo.getValueType())) { | ||||||
|                 //施工完工产值 |                 //施工完工产值 | ||||||
|                 BigDecimal constructionValue = constructionValueService.getCompleteValue(projectVoId,null,bo.getType()); |                 BigDecimal constructionValue = constructionValueService.getCompleteValue(projectVoId, null, bo.getType()); | ||||||
|                 vo.setTotalCompletionOutputValue(constructionValue); |                 vo.setTotalCompletionOutputValue(constructionValue); | ||||||
|             }else if ("3".equals(bo.getValueType())) { |             } else if ("3".equals(bo.getValueType())) { | ||||||
|                 //采购完工产值 |                 //采购完工产值 | ||||||
|                 PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); |                 PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); | ||||||
|                 purchaseValueAReq.setProjectId(projectVoId); |                 purchaseValueAReq.setProjectId(projectVoId); | ||||||
| @ -258,7 +258,7 @@ public class OutTableController extends BaseController { | |||||||
|                 List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); |                 List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); | ||||||
|                 BigDecimal purchaseValue = BigDecimal.ZERO; |                 BigDecimal purchaseValue = BigDecimal.ZERO; | ||||||
|                 for (BusProcurement busProcurement : busProcurements) { |                 for (BusProcurement busProcurement : busProcurements) { | ||||||
|                     if(busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null){ |                     if (busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null) { | ||||||
|                         purchaseValue = purchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); |                         purchaseValue = purchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
| @ -268,11 +268,11 @@ public class OutTableController extends BaseController { | |||||||
|  |  | ||||||
|             //结算产值 |             //结算产值 | ||||||
|             BigDecimal settlementValue; |             BigDecimal settlementValue; | ||||||
|             if("1".equals(bo.getType())){ |             if ("1".equals(bo.getType())) { | ||||||
|                 //业主结算产值 |                 //业主结算产值 | ||||||
|                 settlementValue = settlementValueOwnerService.getValueByProjectId(projectVoId,bo.getValueType(),null); |                 settlementValue = settlementValueOwnerService.getValueByProjectId(projectVoId, bo.getValueType(), null); | ||||||
|             }else { |             } else { | ||||||
|                 settlementValue = settlementValueSubcontractService.getValueByProjectId(projectVoId,bo.getValueType(),null); |                 settlementValue = settlementValueSubcontractService.getValueByProjectId(projectVoId, bo.getValueType(), null); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             vo.setTotalSettlementOutputValue(settlementValue); |             vo.setTotalSettlementOutputValue(settlementValue); | ||||||
| @ -301,7 +301,7 @@ public class OutTableController extends BaseController { | |||||||
|      */ |      */ | ||||||
| //    @SaCheckPermission("out:table:list") | //    @SaCheckPermission("out:table:list") | ||||||
|     @GetMapping("/comparisonOfOwnerAndSub") |     @GetMapping("/comparisonOfOwnerAndSub") | ||||||
|     public TableDataInfo<OutComparisonOfOwnerAndSubVo> comparisonOfOwnerAndSub(OutTableBo bo, PageQuery pageQuery){ |     public TableDataInfo<OutComparisonOfOwnerAndSubVo> comparisonOfOwnerAndSub(OutTableBo bo, PageQuery pageQuery) { | ||||||
|         //分页查询所有父项目 |         //分页查询所有父项目 | ||||||
|         BusProjectQueryReq busProjectQueryReq = new BusProjectQueryReq(); |         BusProjectQueryReq busProjectQueryReq = new BusProjectQueryReq(); | ||||||
|         busProjectQueryReq.setPId(0L); |         busProjectQueryReq.setPId(0L); | ||||||
| @ -319,9 +319,9 @@ public class OutTableController extends BaseController { | |||||||
|             vo.setProjectId(projectVoId); |             vo.setProjectId(projectVoId); | ||||||
|  |  | ||||||
|             //设计完工产值 |             //设计完工产值 | ||||||
|             BigDecimal designValue = monthPlanService.getDesignValueByProjectId(projectVoId,bo.getMonth(),bo.getType()); |             BigDecimal designValue = monthPlanService.getDesignValueByProjectId(projectVoId, bo.getMonth(), bo.getType()); | ||||||
|             //施工完工产值 |             //施工完工产值 | ||||||
|             BigDecimal constructionValue = constructionValueService.getCompleteValue(projectVoId,bo.getMonth(),bo.getType()); |             BigDecimal constructionValue = constructionValueService.getCompleteValue(projectVoId, bo.getMonth(), bo.getType()); | ||||||
|             //采购完工产值 |             //采购完工产值 | ||||||
|             PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); |             PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); | ||||||
|             purchaseValueAReq.setProjectId(projectVoId); |             purchaseValueAReq.setProjectId(projectVoId); | ||||||
| @ -330,27 +330,27 @@ public class OutTableController extends BaseController { | |||||||
|             List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); |             List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); | ||||||
|             BigDecimal purchaseValue = BigDecimal.ZERO; |             BigDecimal purchaseValue = BigDecimal.ZERO; | ||||||
|             for (BusProcurement busProcurement : busProcurements) { |             for (BusProcurement busProcurement : busProcurements) { | ||||||
|                 if(busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null){ |                 if (busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null) { | ||||||
|                     purchaseValue = purchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); |                     purchaseValue = purchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|             } |             } | ||||||
|             vo.setTotalCompletionOutputValue( designValue.add(constructionValue).add(purchaseValue)); |             vo.setTotalCompletionOutputValue(designValue.add(constructionValue).add(purchaseValue)); | ||||||
|  |  | ||||||
|             //分包结算产值 |             //分包结算产值 | ||||||
|             BigDecimal settlementValue = settlementValueSubcontractService.getValueByProjectId(projectVoId,null,bo.getMonth()); |             BigDecimal settlementValue = settlementValueSubcontractService.getValueByProjectId(projectVoId, null, bo.getMonth()); | ||||||
|             vo.setSubTotalSettlementOutputValue(settlementValue); |             vo.setSubTotalSettlementOutputValue(settlementValue); | ||||||
|  |  | ||||||
|             //业主结算产值 |             //业主结算产值 | ||||||
|             BigDecimal ownerSettlementValue = settlementValueOwnerService.getValueByProjectId(projectVoId,null,bo.getMonth()); |             BigDecimal ownerSettlementValue = settlementValueOwnerService.getValueByProjectId(projectVoId, null, bo.getMonth()); | ||||||
|             vo.setOwnerTotalSettlementOutputValue(ownerSettlementValue); |             vo.setOwnerTotalSettlementOutputValue(ownerSettlementValue); | ||||||
|  |  | ||||||
|  |  | ||||||
|             //转换成万元 |             //转换成万元 | ||||||
|             vo.setOwnerTotalSettlementOutputValue( ownerSettlementValue.divide(parseUnit)); |             vo.setOwnerTotalSettlementOutputValue(ownerSettlementValue.divide(parseUnit)); | ||||||
|             vo.setSubTotalSettlementOutputValue( settlementValue.divide(parseUnit)); |             vo.setSubTotalSettlementOutputValue(settlementValue.divide(parseUnit)); | ||||||
|             vo.setTotalCompletionOutputValue( vo.getTotalCompletionOutputValue().divide(parseUnit)); |             vo.setTotalCompletionOutputValue(vo.getTotalCompletionOutputValue().divide(parseUnit)); | ||||||
|             vo.setDifferenceValue(vo.getOwnerTotalSettlementOutputValue().subtract(vo.getSubTotalSettlementOutputValue()) ); |             vo.setDifferenceValue(vo.getOwnerTotalSettlementOutputValue().subtract(vo.getSubTotalSettlementOutputValue())); | ||||||
|  |  | ||||||
|             vos.add(vo); |             vos.add(vo); | ||||||
|         } |         } | ||||||
| @ -370,7 +370,7 @@ public class OutTableController extends BaseController { | |||||||
|      */ |      */ | ||||||
| //    @SaCheckPermission("out:table:list") | //    @SaCheckPermission("out:table:list") | ||||||
|     @GetMapping("/monthlyPurchase") |     @GetMapping("/monthlyPurchase") | ||||||
|     public TableDataInfo<OutDesignAndPurchaseValueVo> monthlyPurchase(OutTableBo bo, PageQuery pageQuery){ |     public TableDataInfo<OutDesignAndPurchaseValueVo> monthlyPurchase(OutTableBo bo, PageQuery pageQuery) { | ||||||
|  |  | ||||||
|         //分页查询所有父项目 |         //分页查询所有父项目 | ||||||
|         BusProjectQueryReq busProjectQueryReq = new BusProjectQueryReq(); |         BusProjectQueryReq busProjectQueryReq = new BusProjectQueryReq(); | ||||||
| @ -411,7 +411,7 @@ public class OutTableController extends BaseController { | |||||||
|                     .eq(OutMonthPlan::getPlanMonth, bo.getMonth()) |                     .eq(OutMonthPlan::getPlanMonth, bo.getMonth()) | ||||||
|                     .eq(OutMonthPlan::getValueType, bo.getValueType()) |                     .eq(OutMonthPlan::getValueType, bo.getValueType()) | ||||||
|                     .eq(OutMonthPlan::getPlanAuditStatus, BusinessStatusEnum.FINISH.getStatus()) |                     .eq(OutMonthPlan::getPlanAuditStatus, BusinessStatusEnum.FINISH.getStatus()) | ||||||
|                     .eq(OutMonthPlan::getType,bo.getType()) |                     .eq(OutMonthPlan::getType, bo.getType()) | ||||||
|             ); |             ); | ||||||
| //            List<OutMonthPlan> matchedPlans = list.stream() | //            List<OutMonthPlan> matchedPlans = list.stream() | ||||||
| //                .filter(plan -> plan.getPlanMonth() != null | //                .filter(plan -> plan.getPlanMonth() != null | ||||||
| @ -419,10 +419,10 @@ public class OutTableController extends BaseController { | |||||||
| //                    && plan.getPlanMonth().compareTo(bo.getMonth()) <= 0) | //                    && plan.getPlanMonth().compareTo(bo.getMonth()) <= 0) | ||||||
| //                .toList(); | //                .toList(); | ||||||
|  |  | ||||||
|             vo.setMonthEstimatedValue(plan == null? BigDecimal.ZERO :plan.getPlanValue()); |             vo.setMonthEstimatedValue(plan == null ? BigDecimal.ZERO : plan.getPlanValue()); | ||||||
|  |  | ||||||
|             if("1".equals(bo.getValueType())){ |             if ("1".equals(bo.getValueType())) { | ||||||
|                 vo.setMonthCompletionValue(complete == null? BigDecimal.ZERO :complete.getCompleteValue()); |                 vo.setMonthCompletionValue(complete == null ? BigDecimal.ZERO : complete.getCompleteValue()); | ||||||
|  |  | ||||||
|                 // 计算累计完成值 |                 // 计算累计完成值 | ||||||
|                 BigDecimal accumulatedCompleteValue = list.stream() |                 BigDecimal accumulatedCompleteValue = list.stream() | ||||||
| @ -431,7 +431,7 @@ public class OutTableController extends BaseController { | |||||||
|                     .reduce(BigDecimal.ZERO, BigDecimal::add); |                     .reduce(BigDecimal.ZERO, BigDecimal::add); | ||||||
|                 vo.setAccumulatedCompletionValue(accumulatedCompleteValue); |                 vo.setAccumulatedCompletionValue(accumulatedCompleteValue); | ||||||
|  |  | ||||||
|             }else if("2".equals(bo.getValueType())){ |             } else if ("2".equals(bo.getValueType())) { | ||||||
|                 //采购完工产值 |                 //采购完工产值 | ||||||
|                 PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); |                 PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); | ||||||
|                 purchaseValueAReq.setProjectId(projectVo.getId()); |                 purchaseValueAReq.setProjectId(projectVo.getId()); | ||||||
| @ -439,7 +439,7 @@ public class OutTableController extends BaseController { | |||||||
|                 List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); |                 List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); | ||||||
|                 BigDecimal accumulatedCompletionValue = BigDecimal.ZERO; |                 BigDecimal accumulatedCompletionValue = BigDecimal.ZERO; | ||||||
|                 for (BusProcurement busProcurement : busProcurements) { |                 for (BusProcurement busProcurement : busProcurements) { | ||||||
|                     if(busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null){ |                     if (busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null) { | ||||||
|                         accumulatedCompletionValue = accumulatedCompletionValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); |                         accumulatedCompletionValue = accumulatedCompletionValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
| @ -447,8 +447,6 @@ public class OutTableController extends BaseController { | |||||||
|                 vo.setAccumulatedCompletionValue(accumulatedCompletionValue); |                 vo.setAccumulatedCompletionValue(accumulatedCompletionValue); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|                 purchaseValueAReq.setPlanMonth(bo.getMonth()); |                 purchaseValueAReq.setPlanMonth(bo.getMonth()); | ||||||
|                 List<BusProcurement> busProcurements1 = outMonthPlanService.purchaseValueA(purchaseValueAReq); |                 List<BusProcurement> busProcurements1 = outMonthPlanService.purchaseValueA(purchaseValueAReq); | ||||||
|  |  | ||||||
| @ -482,10 +480,10 @@ public class OutTableController extends BaseController { | |||||||
|         return rspData; |         return rspData; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public BigDecimal getTotal(String type,Long projectId){ |     public BigDecimal getTotal(String type, Long projectId) { | ||||||
|         OutValueAllocation one = valueAllocationService.getOne(Wrappers.lambdaQuery(OutValueAllocation.class) |         OutValueAllocation one = valueAllocationService.getOne(Wrappers.lambdaQuery(OutValueAllocation.class) | ||||||
|             .eq(OutValueAllocation::getProjectId,projectId)); |             .eq(OutValueAllocation::getProjectId, projectId)); | ||||||
|         if("1".equals(type)){ |         if ("1".equals(type)) { | ||||||
|             return one == null ? BigDecimal.ZERO : one.getOwnerTotalValue(); |             return one == null ? BigDecimal.ZERO : one.getOwnerTotalValue(); | ||||||
|         } |         } | ||||||
|         return one == null ? BigDecimal.ZERO : one.getSubTotalValue(); |         return one == null ? BigDecimal.ZERO : one.getSubTotalValue(); | ||||||
| @ -497,7 +495,7 @@ public class OutTableController extends BaseController { | |||||||
|      */ |      */ | ||||||
| //    @SaCheckPermission("out:table:list") | //    @SaCheckPermission("out:table:list") | ||||||
|     @GetMapping("/outCompare") |     @GetMapping("/outCompare") | ||||||
|     public TableDataInfo<OutCompareVo> outCompare(OutTableBo bo, PageQuery pageQuery){ |     public TableDataInfo<OutCompareVo> outCompare(OutTableBo bo, PageQuery pageQuery) { | ||||||
|  |  | ||||||
|         //分页查询所有父项目 |         //分页查询所有父项目 | ||||||
|         BusProjectQueryReq busProjectQueryReq = new BusProjectQueryReq(); |         BusProjectQueryReq busProjectQueryReq = new BusProjectQueryReq(); | ||||||
| @ -521,7 +519,7 @@ public class OutTableController extends BaseController { | |||||||
|             List<OutMonthPlanAudit> ownerPlan = outMonthPlanAuditService.queryListByProjectIdAndMonth(projectVo.getId(), bo.getMonth(), "1"); |             List<OutMonthPlanAudit> ownerPlan = outMonthPlanAuditService.queryListByProjectIdAndMonth(projectVo.getId(), bo.getMonth(), "1"); | ||||||
|  |  | ||||||
|             BigDecimal ownerPlanTotal = BigDecimal.ZERO; |             BigDecimal ownerPlanTotal = BigDecimal.ZERO; | ||||||
|             if(ownerPlan != null && !ownerPlan.isEmpty()){ |             if (ownerPlan != null && !ownerPlan.isEmpty()) { | ||||||
|                 ownerPlanTotal = ownerPlan.stream().map(OutMonthPlanAudit::getTotalValue).reduce(BigDecimal.ZERO, BigDecimal::add); |                 ownerPlanTotal = ownerPlan.stream().map(OutMonthPlanAudit::getTotalValue).reduce(BigDecimal.ZERO, BigDecimal::add); | ||||||
|             } |             } | ||||||
|             vo.setOwnerPlanTotal(ownerPlanTotal.divide(parseUnit)); |             vo.setOwnerPlanTotal(ownerPlanTotal.divide(parseUnit)); | ||||||
| @ -530,15 +528,15 @@ public class OutTableController extends BaseController { | |||||||
|             List<OutMonthPlanAudit> subPlan = outMonthPlanAuditService.queryListByProjectIdAndMonth(projectVo.getId(), bo.getMonth(), "2"); |             List<OutMonthPlanAudit> subPlan = outMonthPlanAuditService.queryListByProjectIdAndMonth(projectVo.getId(), bo.getMonth(), "2"); | ||||||
|  |  | ||||||
|             BigDecimal subPlanTotal = BigDecimal.ZERO; |             BigDecimal subPlanTotal = BigDecimal.ZERO; | ||||||
|             if(subPlan != null && !subPlan.isEmpty()){ |             if (subPlan != null && !subPlan.isEmpty()) { | ||||||
|                 subPlanTotal = subPlan.stream().map(OutMonthPlanAudit::getTotalValue).reduce(BigDecimal.ZERO, BigDecimal::add); |                 subPlanTotal = subPlan.stream().map(OutMonthPlanAudit::getTotalValue).reduce(BigDecimal.ZERO, BigDecimal::add); | ||||||
|             } |             } | ||||||
|             vo.setSubPlanTotal(subPlanTotal.divide(parseUnit)); |             vo.setSubPlanTotal(subPlanTotal.divide(parseUnit)); | ||||||
|  |  | ||||||
|             //设计完工产值 |             //设计完工产值 | ||||||
|             BigDecimal designValue = monthPlanService.getDesignValueByProjectId(projectVo.getId(),bo.getMonth(),"1"); |             BigDecimal designValue = monthPlanService.getDesignValueByProjectId(projectVo.getId(), bo.getMonth(), "1"); | ||||||
|             //施工完工产值 |             //施工完工产值 | ||||||
|             BigDecimal constructionValue = constructionValueService.getCompleteValue(projectVo.getId(),bo.getMonth(),"1"); |             BigDecimal constructionValue = constructionValueService.getCompleteValue(projectVo.getId(), bo.getMonth(), "1"); | ||||||
|             //采购完工产值 |             //采购完工产值 | ||||||
|             PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); |             PurchaseValueAReq purchaseValueAReq = new PurchaseValueAReq(); | ||||||
|             purchaseValueAReq.setProjectId(projectVo.getId()); |             purchaseValueAReq.setProjectId(projectVo.getId()); | ||||||
| @ -547,28 +545,28 @@ public class OutTableController extends BaseController { | |||||||
|             List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); |             List<BusProcurement> busProcurements = outMonthPlanService.purchaseValueA(purchaseValueAReq); | ||||||
|             BigDecimal purchaseValue = BigDecimal.ZERO; |             BigDecimal purchaseValue = BigDecimal.ZERO; | ||||||
|             for (BusProcurement busProcurement : busProcurements) { |             for (BusProcurement busProcurement : busProcurements) { | ||||||
|                 if(busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null){ |                 if (busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null) { | ||||||
|                     purchaseValue = purchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); |                     purchaseValue = purchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|             } |             } | ||||||
|             vo.setOwnerActualTotal( designValue.add(constructionValue).add(purchaseValue).divide(parseUnit)); |             vo.setOwnerActualTotal(designValue.add(constructionValue).add(purchaseValue).divide(parseUnit)); | ||||||
|  |  | ||||||
|             //设计完工产值 |             //设计完工产值 | ||||||
|             BigDecimal subDesignValue = monthPlanService.getDesignValueByProjectId(projectVo.getId(),bo.getMonth(),"2"); |             BigDecimal subDesignValue = monthPlanService.getDesignValueByProjectId(projectVo.getId(), bo.getMonth(), "2"); | ||||||
|             //施工完工产值 |             //施工完工产值 | ||||||
|             BigDecimal subConstructionValue = constructionValueService.getCompleteValue(projectVo.getId(),bo.getMonth(),"2"); |             BigDecimal subConstructionValue = constructionValueService.getCompleteValue(projectVo.getId(), bo.getMonth(), "2"); | ||||||
|             //采购完工产值 |             //采购完工产值 | ||||||
|             purchaseValueAReq.setType("2"); |             purchaseValueAReq.setType("2"); | ||||||
|             List<BusProcurement> busProcurements1 = outMonthPlanService.purchaseValueA(purchaseValueAReq); |             List<BusProcurement> busProcurements1 = outMonthPlanService.purchaseValueA(purchaseValueAReq); | ||||||
|             BigDecimal subPurchaseValue = BigDecimal.ZERO; |             BigDecimal subPurchaseValue = BigDecimal.ZERO; | ||||||
|             for (BusProcurement busProcurement : busProcurements1) { |             for (BusProcurement busProcurement : busProcurements1) { | ||||||
|                 if(busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null){ |                 if (busProcurement != null && busProcurement.getAcceptedQuantity() != null && busProcurement.getUnitPrice() != null) { | ||||||
|                     subPurchaseValue = subPurchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); |                     subPurchaseValue = subPurchaseValue.add(busProcurement.getAcceptedQuantity().multiply(busProcurement.getUnitPrice()).setScale(4, RoundingMode.HALF_UP)); | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|             } |             } | ||||||
|             vo.setSubActualTotal( subDesignValue.add(subConstructionValue).add(subPurchaseValue).divide(parseUnit)); |             vo.setSubActualTotal(subDesignValue.add(subConstructionValue).add(subPurchaseValue).divide(parseUnit)); | ||||||
|  |  | ||||||
|             vos.add(vo); |             vos.add(vo); | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -30,6 +30,11 @@ public class OutConstructionValue extends BaseEntity { | |||||||
|     @TableId(value = "id") |     @TableId(value = "id") | ||||||
|     private Long id; |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 范围ID | ||||||
|  |      */ | ||||||
|  |     private Long rangeId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 项目ID |      * 项目ID | ||||||
|      */ |      */ | ||||||
| @ -45,6 +50,11 @@ public class OutConstructionValue extends BaseEntity { | |||||||
|      */ |      */ | ||||||
|     private Long progressCategoryId; |     private Long progressCategoryId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划详情id | ||||||
|  |      */ | ||||||
|  |     private Long detailId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 人工填报数量 |      * 人工填报数量 | ||||||
|      */ |      */ | ||||||
| @ -80,11 +90,6 @@ public class OutConstructionValue extends BaseEntity { | |||||||
|      */ |      */ | ||||||
|     private LocalDate planDate; |     private LocalDate planDate; | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * 审核状态 |  | ||||||
|      */ |  | ||||||
|     private String auditStatus; |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 对甲产值 |      * 对甲产值 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -0,0 +1,64 @@ | |||||||
|  | package org.dromara.out.domain; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableName; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 施工产值范围对象 out_construction_value_range | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("out_construction_value_range") | ||||||
|  | public class OutConstructionValueRange extends BaseEntity { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键ID | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "id") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目ID | ||||||
|  |      */ | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开始日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate startDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结束日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate endDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 対乙产值 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal outValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 对甲产值 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal ownerValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     private String auditStatus; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -29,6 +29,11 @@ public class OutConstructionValueBo extends BaseEntity { | |||||||
|     @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) |     @NotNull(message = "主键ID不能为空", groups = { EditGroup.class }) | ||||||
|     private Long id; |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 范围ID | ||||||
|  |      */ | ||||||
|  |     private Long rangeId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 项目ID |      * 项目ID | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -0,0 +1,71 @@ | |||||||
|  | package org.dromara.out.domain.bo; | ||||||
|  |  | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import jakarta.validation.constraints.NotNull; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import org.dromara.common.core.validate.AddGroup; | ||||||
|  | import org.dromara.common.core.validate.EditGroup; | ||||||
|  | import org.dromara.common.mybatis.core.domain.BaseEntity; | ||||||
|  | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 施工产值范围业务对象 out_construction_value_range | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @AutoMapper(target = OutConstructionValueRange.class, reverseConvertGenerate = false) | ||||||
|  | public class OutConstructionValueRangeBo extends BaseEntity { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键ID | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "主键ID不能为空", groups = {EditGroup.class}) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目ID | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "项目ID不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开始日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "开始日期不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private LocalDate startDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结束日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "结束日期不能为空", groups = {AddGroup.class, EditGroup.class}) | ||||||
|  |     private LocalDate endDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 日期 | ||||||
|  |      */ | ||||||
|  |     private LocalDate date; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 対乙产值 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal outValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 对甲产值 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal ownerValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     private String auditStatus; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,80 @@ | |||||||
|  | package org.dromara.out.domain.vo; | ||||||
|  |  | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import io.github.linpeilie.annotations.AutoMapper; | ||||||
|  | import lombok.Data; | ||||||
|  | import org.dromara.common.excel.annotation.ExcelDictFormat; | ||||||
|  | import org.dromara.common.excel.convert.ExcelDictConvert; | ||||||
|  | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
|  |  | ||||||
|  | import java.io.Serial; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 施工产值范围视图对象 out_construction_value_range | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | @AutoMapper(target = OutConstructionValueRange.class) | ||||||
|  | public class OutConstructionValueRangeVo implements Serializable { | ||||||
|  |  | ||||||
|  |     @Serial | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键ID | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "主键ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 项目ID | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目ID") | ||||||
|  |     private Long projectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 开始日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "开始日期") | ||||||
|  |     private LocalDate startDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 结束日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "结束日期") | ||||||
|  |     private LocalDate endDate; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 対乙产值 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "対乙产值") | ||||||
|  |     private BigDecimal outValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 对甲产值 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "对甲产值") | ||||||
|  |     private BigDecimal ownerValue; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 审核状态 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "审核状态", converter = ExcelDictConvert.class) | ||||||
|  |     @ExcelDictFormat(dictType = "wf_business_status") | ||||||
|  |     private String auditStatus; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 子项列表 | ||||||
|  |      */ | ||||||
|  |     private List<OutConstructionValueVo> constructionValueVoList; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,23 +1,17 @@ | |||||||
| package org.dromara.out.domain.vo; | package org.dromara.out.domain.vo; | ||||||
|  |  | ||||||
| import java.math.BigDecimal; | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
| import java.time.LocalDate; | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
| import java.util.Date; | import io.github.linpeilie.annotations.AutoMapper; | ||||||
| import com.fasterxml.jackson.annotation.JsonFormat; | import lombok.Data; | ||||||
| import org.dromara.common.translation.annotation.Translation; | import org.dromara.common.translation.annotation.Translation; | ||||||
| import org.dromara.common.translation.constant.TransConstant; | import org.dromara.common.translation.constant.TransConstant; | ||||||
| import org.dromara.out.domain.OutConstructionValue; | import org.dromara.out.domain.OutConstructionValue; | ||||||
| import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |  | ||||||
| import com.alibaba.excel.annotation.ExcelProperty; |  | ||||||
| import org.dromara.common.excel.annotation.ExcelDictFormat; |  | ||||||
| import org.dromara.common.excel.convert.ExcelDictConvert; |  | ||||||
| import io.github.linpeilie.annotations.AutoMapper; |  | ||||||
| import lombok.Data; |  | ||||||
|  |  | ||||||
| import java.io.Serial; | import java.io.Serial; | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.util.Date; | import java.math.BigDecimal; | ||||||
|  | import java.time.LocalDate; | ||||||
|  |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @ -40,6 +34,11 @@ public class OutConstructionValueVo implements Serializable { | |||||||
|     @ExcelProperty(value = "主键ID") |     @ExcelProperty(value = "主键ID") | ||||||
|     private Long id; |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 范围ID | ||||||
|  |      */ | ||||||
|  |     private Long rangeId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 项目ID |      * 项目ID | ||||||
|      */ |      */ | ||||||
| @ -100,6 +99,11 @@ public class OutConstructionValueVo implements Serializable { | |||||||
|     @ExcelProperty(value = "分项工程名称") |     @ExcelProperty(value = "分项工程名称") | ||||||
|     private String progressCategoryName; |     private String progressCategoryName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 计划详情id | ||||||
|  |      */ | ||||||
|  |     private Long detailId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 人工填报数量 |      * 人工填报数量 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package org.dromara.out.mapper; | ||||||
|  |  | ||||||
|  | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
|  | import org.dromara.out.domain.vo.OutConstructionValueRangeVo; | ||||||
|  | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 施工产值范围Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | public interface OutConstructionValueRangeMapper extends BaseMapperPlus<OutConstructionValueRange, OutConstructionValueRangeVo> { | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,71 @@ | |||||||
|  | package org.dromara.out.service; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
|  | import org.dromara.out.domain.bo.OutConstructionValueRangeBo; | ||||||
|  | import org.dromara.out.domain.vo.OutConstructionValueRangeVo; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 施工产值范围Service接口 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | public interface IOutConstructionValueRangeService extends IService<OutConstructionValueRange> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询施工产值范围 | ||||||
|  |      * | ||||||
|  |      * @param id        主键 | ||||||
|  |      * @param hasDetail 是否包含详情 | ||||||
|  |      * @return 施工产值范围 | ||||||
|  |      */ | ||||||
|  |     OutConstructionValueRangeVo queryById(Long id, Boolean hasDetail); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询施工产值范围列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 施工产值范围分页列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<OutConstructionValueRangeVo> queryPageList(OutConstructionValueRangeBo bo, PageQuery pageQuery); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的施工产值范围列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 施工产值范围列表 | ||||||
|  |      */ | ||||||
|  |     List<OutConstructionValueRangeVo> queryList(OutConstructionValueRangeBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增施工产值范围 | ||||||
|  |      * | ||||||
|  |      * @param bo 施工产值范围 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(OutConstructionValueRangeBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改施工产值范围 | ||||||
|  |      * | ||||||
|  |      * @param bo 施工产值范围 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(OutConstructionValueRangeBo bo); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除施工产值范围信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | } | ||||||
| @ -0,0 +1,228 @@ | |||||||
|  | package org.dromara.out.service.impl; | ||||||
|  |  | ||||||
|  | import cn.hutool.core.collection.CollUtil; | ||||||
|  | import cn.hutool.core.convert.Convert; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import jakarta.annotation.Resource; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||||
|  | import org.dromara.common.core.domain.event.ProcessEvent; | ||||||
|  | import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||||
|  | import org.dromara.common.core.enums.BusinessStatusEnum; | ||||||
|  | import org.dromara.common.core.utils.MapstructUtils; | ||||||
|  | import org.dromara.common.core.utils.StringUtils; | ||||||
|  | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
|  | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
|  | import org.dromara.out.domain.OutConstructionValue; | ||||||
|  | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
|  | import org.dromara.out.domain.bo.OutConstructionValueBo; | ||||||
|  | import org.dromara.out.domain.bo.OutConstructionValueRangeBo; | ||||||
|  | import org.dromara.out.domain.vo.OutConstructionValueRangeVo; | ||||||
|  | import org.dromara.out.mapper.OutConstructionValueRangeMapper; | ||||||
|  | import org.dromara.out.service.IOutConstructionValueRangeService; | ||||||
|  | import org.dromara.out.service.IOutConstructionValueService; | ||||||
|  | import org.dromara.progress.domain.PgsProgressPlanDetail; | ||||||
|  | import org.dromara.progress.service.IPgsProgressPlanDetailService; | ||||||
|  | import org.springframework.context.annotation.Lazy; | ||||||
|  | import org.springframework.context.event.EventListener; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 施工产值范围Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-25 | ||||||
|  |  */ | ||||||
|  | @Slf4j | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class OutConstructionValueRangeServiceImpl extends ServiceImpl<OutConstructionValueRangeMapper, OutConstructionValueRange> | ||||||
|  |     implements IOutConstructionValueRangeService { | ||||||
|  |  | ||||||
|  |     @Lazy | ||||||
|  |     @Resource | ||||||
|  |     private IOutConstructionValueService constructionValueService; | ||||||
|  |  | ||||||
|  |     @Lazy | ||||||
|  |     @Resource | ||||||
|  |     private IPgsProgressPlanDetailService progressPlanDetailService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询施工产值范围 | ||||||
|  |      * | ||||||
|  |      * @param id 主键 | ||||||
|  |      * @return 施工产值范围 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public OutConstructionValueRangeVo queryById(Long id, Boolean hasDetail) { | ||||||
|  |         OutConstructionValueRangeVo vo = baseMapper.selectVoById(id); | ||||||
|  |         OutConstructionValueBo bo = new OutConstructionValueBo(); | ||||||
|  |         bo.setRangeId(id); | ||||||
|  |         vo.setConstructionValueVoList(constructionValueService.queryList(bo)); | ||||||
|  |         return vo; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 分页查询施工产值范围列表 | ||||||
|  |      * | ||||||
|  |      * @param bo        查询条件 | ||||||
|  |      * @param pageQuery 分页参数 | ||||||
|  |      * @return 施工产值范围分页列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<OutConstructionValueRangeVo> queryPageList(OutConstructionValueRangeBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<OutConstructionValueRange> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<OutConstructionValueRangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 查询符合条件的施工产值范围列表 | ||||||
|  |      * | ||||||
|  |      * @param bo 查询条件 | ||||||
|  |      * @return 施工产值范围列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<OutConstructionValueRangeVo> queryList(OutConstructionValueRangeBo bo) { | ||||||
|  |         LambdaQueryWrapper<OutConstructionValueRange> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private LambdaQueryWrapper<OutConstructionValueRange> buildQueryWrapper(OutConstructionValueRangeBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<OutConstructionValueRange> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.orderByDesc(OutConstructionValueRange::getId); | ||||||
|  |         lqw.eq(bo.getProjectId() != null, OutConstructionValueRange::getProjectId, bo.getProjectId()); | ||||||
|  |         // 日期范围过滤 | ||||||
|  |         if (bo.getDate() != null) { | ||||||
|  |             lqw.le(OutConstructionValueRange::getStartDate, bo.getDate()) // 开始时间 <= date | ||||||
|  |                 .ge(OutConstructionValueRange::getEndDate, bo.getDate());  // 结束时间 >= date | ||||||
|  |         } | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), OutConstructionValueRange::getAuditStatus, bo.getAuditStatus()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 新增施工产值范围 | ||||||
|  |      * | ||||||
|  |      * @param bo 施工产值范围 | ||||||
|  |      * @return 是否新增成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(OutConstructionValueRangeBo bo) { | ||||||
|  |         OutConstructionValueRange add = MapstructUtils.convert(bo, OutConstructionValueRange.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setId(add.getId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 修改施工产值范围 | ||||||
|  |      * | ||||||
|  |      * @param bo 施工产值范围 | ||||||
|  |      * @return 是否修改成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(OutConstructionValueRangeBo bo) { | ||||||
|  |         OutConstructionValueRange update = MapstructUtils.convert(bo, OutConstructionValueRange.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(OutConstructionValueRange entity) { | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除施工产值范围信息 | ||||||
|  |      * | ||||||
|  |      * @param ids     待删除的主键集合 | ||||||
|  |      * @param isValid 是否进行有效性校验 | ||||||
|  |      * @return 是否删除成功 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if (isValid) { | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteByIds(ids) > 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) | ||||||
|  |      * 正常使用只需#processEvent.flowCode=='leave1' | ||||||
|  |      * 示例为了方便则使用startsWith匹配了全部示例key | ||||||
|  |      * | ||||||
|  |      * @param processEvent 参数 | ||||||
|  |      */ | ||||||
|  |     @EventListener(condition = "#processEvent.flowCode.endsWith('constructionValue')") | ||||||
|  |     public void processHandler(ProcessEvent processEvent) { | ||||||
|  |         log.info("施工产值审核任务执行了{}", processEvent.toString()); | ||||||
|  |         OutConstructionValueRange byId = this.getById(Convert.toLong(processEvent.getBusinessId())); | ||||||
|  |         byId.setAuditStatus(processEvent.getStatus()); | ||||||
|  |         if (processEvent.getSubmit()) { | ||||||
|  |             byId.setAuditStatus(BusinessStatusEnum.WAITING.getStatus()); | ||||||
|  |         } | ||||||
|  |         // 如果为完成状态,则锁定对应进度计划详情 | ||||||
|  |         if (BusinessStatusEnum.FINISH.getStatus().equals(byId.getAuditStatus())) { | ||||||
|  |             List<OutConstructionValue> valueList = constructionValueService.lambdaQuery() | ||||||
|  |                 .eq(OutConstructionValue::getRangeId, byId.getId()) | ||||||
|  |                 .list(); | ||||||
|  |             if (CollUtil.isNotEmpty(valueList)) { | ||||||
|  |                 List<Long> details = valueList.stream().map(OutConstructionValue::getDetailId).distinct().toList(); | ||||||
|  |                 progressPlanDetailService.lambdaUpdate() | ||||||
|  |                     .in(PgsProgressPlanDetail::getId, details) | ||||||
|  |                     .set(PgsProgressPlanDetail::getStatus, "3") | ||||||
|  |                     .update(); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         this.updateById(byId); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 执行任务创建监听 | ||||||
|  |      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 | ||||||
|  |      * 在方法中判断流程节点key | ||||||
|  |      * if ("xxx".equals(processTaskEvent.getNodeCode())) { | ||||||
|  |      * //执行业务逻辑 | ||||||
|  |      * } | ||||||
|  |      * | ||||||
|  |      * @param processTaskEvent 参数 | ||||||
|  |      */ | ||||||
|  |     @EventListener(condition = "#processTaskEvent.flowCode.endsWith('constructionValue')") | ||||||
|  |     public void processTaskHandler(ProcessTaskEvent processTaskEvent) { | ||||||
|  |         log.info("施工产值审核任务创建了{}", processTaskEvent.toString()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 监听删除流程事件 | ||||||
|  |      * 正常使用只需#processDeleteEvent.flowCode=='leave1' | ||||||
|  |      * 示例为了方便则使用startsWith匹配了全部示例key | ||||||
|  |      * | ||||||
|  |      * @param processDeleteEvent 参数 | ||||||
|  |      */ | ||||||
|  |     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('constructionValue')") | ||||||
|  |     public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) { | ||||||
|  |         log.info("监听删除流程事件,施工产值审核任务执行了{}", processDeleteEvent.toString()); | ||||||
|  | //        OutMonthPlan plan =  this.getById(Convert.toLong(processDeleteEvent.getBusinessId())); | ||||||
|  | //        if (ObjectUtil.isNull(plan)) { | ||||||
|  | //            return; | ||||||
|  | //        } | ||||||
|  | //        this.removeById(plan.getId()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,27 +1,25 @@ | |||||||
| package org.dromara.out.service.impl; | package org.dromara.out.service.impl; | ||||||
|  |  | ||||||
| import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||||
| import cn.hutool.core.convert.Convert; |  | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
| import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | import org.dromara.common.core.constant.HttpStatus; | ||||||
| import org.dromara.common.core.domain.event.ProcessEvent; | import org.dromara.common.core.exception.ServiceException; | ||||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; |  | ||||||
| import org.dromara.common.core.enums.BusinessStatusEnum; |  | ||||||
| import org.dromara.common.core.utils.MapstructUtils; | import org.dromara.common.core.utils.MapstructUtils; | ||||||
| import org.dromara.common.core.utils.StringUtils; |  | ||||||
| import org.dromara.common.mybatis.core.page.PageQuery; | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
| import org.dromara.common.mybatis.core.page.TableDataInfo; | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
| import org.dromara.facility.domain.FacMatrix; | import org.dromara.facility.domain.FacMatrix; | ||||||
| import org.dromara.facility.service.IFacMatrixService; | import org.dromara.facility.service.IFacMatrixService; | ||||||
| import org.dromara.out.domain.OutConstructionValue; | import org.dromara.out.domain.OutConstructionValue; | ||||||
|  | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
| import org.dromara.out.domain.bo.OutConstructionValueBo; | import org.dromara.out.domain.bo.OutConstructionValueBo; | ||||||
| import org.dromara.out.domain.vo.OutConstructionValueVo; | import org.dromara.out.domain.vo.OutConstructionValueVo; | ||||||
| import org.dromara.out.mapper.OutConstructionValueMapper; | import org.dromara.out.mapper.OutConstructionValueMapper; | ||||||
|  | import org.dromara.out.service.IOutConstructionValueRangeService; | ||||||
| import org.dromara.out.service.IOutConstructionValueService; | import org.dromara.out.service.IOutConstructionValueService; | ||||||
| import org.dromara.progress.domain.PgsProgressCategory; | import org.dromara.progress.domain.PgsProgressCategory; | ||||||
| import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryVo; | import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryVo; | ||||||
| @ -29,7 +27,6 @@ import org.dromara.progress.service.IPgsProgressCategoryService; | |||||||
| import org.dromara.project.domain.BusProject; | import org.dromara.project.domain.BusProject; | ||||||
| import org.dromara.project.domain.vo.project.BusProjectVo; | import org.dromara.project.domain.vo.project.BusProjectVo; | ||||||
| import org.dromara.project.service.IBusProjectService; | import org.dromara.project.service.IBusProjectService; | ||||||
| import org.springframework.context.event.EventListener; |  | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||||
| @ -48,9 +45,8 @@ import java.util.Map; | |||||||
| @RequiredArgsConstructor | @RequiredArgsConstructor | ||||||
| @Service | @Service | ||||||
| @Slf4j | @Slf4j | ||||||
| public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstructionValueMapper, OutConstructionValue> implements IOutConstructionValueService { | public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstructionValueMapper, OutConstructionValue> | ||||||
|  |     implements IOutConstructionValueService { | ||||||
|     private final OutConstructionValueMapper baseMapper; |  | ||||||
|  |  | ||||||
|     private final IBusProjectService busProjectService; |     private final IBusProjectService busProjectService; | ||||||
|  |  | ||||||
| @ -60,6 +56,8 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction | |||||||
|  |  | ||||||
|     private final IBusProjectService projectService; |     private final IBusProjectService projectService; | ||||||
|  |  | ||||||
|  |     private final IOutConstructionValueRangeService constructionValueRangeService; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询施工产值 |      * 查询施工产值 | ||||||
|      * |      * | ||||||
| @ -121,13 +119,13 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         lqw.eq(bo.getMatrixId() != null, OutConstructionValue::getMatrixId, bo.getMatrixId()); |         lqw.eq(bo.getMatrixId() != null, OutConstructionValue::getMatrixId, bo.getMatrixId()); | ||||||
|  |         lqw.eq(bo.getRangeId() != null, OutConstructionValue::getRangeId, bo.getRangeId()); | ||||||
|         lqw.eq(bo.getProgressCategoryId() != null, OutConstructionValue::getProgressCategoryId, bo.getProgressCategoryId()); |         lqw.eq(bo.getProgressCategoryId() != null, OutConstructionValue::getProgressCategoryId, bo.getProgressCategoryId()); | ||||||
|         lqw.eq(bo.getArtificialNum() != null, OutConstructionValue::getArtificialNum, bo.getArtificialNum()); |         lqw.eq(bo.getArtificialNum() != null, OutConstructionValue::getArtificialNum, bo.getArtificialNum()); | ||||||
|         lqw.eq(bo.getUavNum() != null, OutConstructionValue::getUavNum, bo.getUavNum()); |         lqw.eq(bo.getUavNum() != null, OutConstructionValue::getUavNum, bo.getUavNum()); | ||||||
|         lqw.eq(bo.getConfirmNum() != null, OutConstructionValue::getConfirmNum, bo.getConfirmNum()); |         lqw.eq(bo.getConfirmNum() != null, OutConstructionValue::getConfirmNum, bo.getConfirmNum()); | ||||||
|         lqw.eq(bo.getOutValue() != null, OutConstructionValue::getOutValue, bo.getOutValue()); |         lqw.eq(bo.getOutValue() != null, OutConstructionValue::getOutValue, bo.getOutValue()); | ||||||
|         lqw.eq(bo.getReportDate() != null, OutConstructionValue::getReportDate, bo.getReportDate()); |         lqw.eq(bo.getReportDate() != null, OutConstructionValue::getReportDate, bo.getReportDate()); | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), OutConstructionValue::getAuditStatus, bo.getAuditStatus()); |  | ||||||
|         lqw.eq(bo.getCreateBy() != null, OutConstructionValue::getCreateBy, bo.getCreateBy()); |         lqw.eq(bo.getCreateBy() != null, OutConstructionValue::getCreateBy, bo.getCreateBy()); | ||||||
|         return lqw; |         return lqw; | ||||||
|     } |     } | ||||||
| @ -145,13 +143,8 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction | |||||||
|         //计算产值 |         //计算产值 | ||||||
|         PgsProgressCategory progressCategory = pgsProgressCategoryService.getById(bo.getProgressCategoryId()); |         PgsProgressCategory progressCategory = pgsProgressCategoryService.getById(bo.getProgressCategoryId()); | ||||||
|         if (progressCategory != null) { |         if (progressCategory != null) { | ||||||
|             if ("1".equals(progressCategory.getUnitType())) { |  | ||||||
|             add.setOutValue(progressCategory.getConstructionPrice().multiply(BigDecimal.valueOf(bo.getArtificialNum())).setScale(4, RoundingMode.HALF_UP)); |             add.setOutValue(progressCategory.getConstructionPrice().multiply(BigDecimal.valueOf(bo.getArtificialNum())).setScale(4, RoundingMode.HALF_UP)); | ||||||
|             add.setOwnerValue(progressCategory.getOwnerPrice().multiply(BigDecimal.valueOf(bo.getArtificialNum())).setScale(4, RoundingMode.HALF_UP)); |             add.setOwnerValue(progressCategory.getOwnerPrice().multiply(BigDecimal.valueOf(bo.getArtificialNum())).setScale(4, RoundingMode.HALF_UP)); | ||||||
|             } else if ("2".equals(progressCategory.getUnitType())) { |  | ||||||
|                 add.setOwnerValue(progressCategory.getOwnerPrice().multiply(BigDecimal.valueOf(bo.getUavNum()).divide(new BigDecimal("100"))).setScale(4, RoundingMode.HALF_UP)); |  | ||||||
|                 add.setOutValue(progressCategory.getConstructionPrice().multiply(BigDecimal.valueOf(bo.getUavNum()).divide(new BigDecimal("100"))).setScale(4, RoundingMode.HALF_UP)); |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         boolean flag = baseMapper.insert(add) > 0; |         boolean flag = baseMapper.insert(add) > 0; | ||||||
| @ -169,8 +162,27 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction | |||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public Boolean updateByBo(OutConstructionValueBo bo) { |     public Boolean updateByBo(OutConstructionValueBo bo) { | ||||||
|  |         // 获取老数据 | ||||||
|  |         OutConstructionValue old = baseMapper.selectById(bo.getId()); | ||||||
|  |         if (old == null) { | ||||||
|  |             throw new ServiceException("数据不存在", HttpStatus.NOT_FOUND); | ||||||
|  |         } | ||||||
|         OutConstructionValue update = MapstructUtils.convert(bo, OutConstructionValue.class); |         OutConstructionValue update = MapstructUtils.convert(bo, OutConstructionValue.class); | ||||||
|         validEntityBeforeSave(update); |         validEntityBeforeSave(update); | ||||||
|  |         //计算产值 | ||||||
|  |         PgsProgressCategory progressCategory = pgsProgressCategoryService.getById(bo.getProgressCategoryId()); | ||||||
|  |         if (progressCategory != null) { | ||||||
|  |             BigDecimal outValue = progressCategory.getConstructionPrice().multiply(BigDecimal.valueOf(bo.getConfirmNum())).setScale(4, RoundingMode.HALF_UP); | ||||||
|  |             update.setOutValue(outValue); | ||||||
|  |             BigDecimal ownerValue = progressCategory.getOwnerPrice().multiply(BigDecimal.valueOf(bo.getConfirmNum())).setScale(4, RoundingMode.HALF_UP); | ||||||
|  |             update.setOwnerValue(ownerValue); | ||||||
|  |             OutConstructionValueRange range = constructionValueRangeService.getById(old.getRangeId()); | ||||||
|  |             BigDecimal allOutValue = range.getOutValue(); | ||||||
|  |             BigDecimal allOwnerValue = range.getOwnerValue(); | ||||||
|  |             range.setOutValue(allOutValue.subtract(old.getOutValue()).add(outValue).setScale(4, RoundingMode.HALF_UP)); | ||||||
|  |             range.setOwnerValue(allOwnerValue.subtract(old.getOwnerValue()).add(ownerValue).setScale(4, RoundingMode.HALF_UP)); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         return baseMapper.updateById(update) > 0; |         return baseMapper.updateById(update) > 0; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -243,54 +255,4 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction | |||||||
|         vo.setSubProjectName(busProjectVo1.getProjectName()); |         vo.setSubProjectName(busProjectVo1.getProjectName()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等) |  | ||||||
|      * 正常使用只需#processEvent.flowCode=='leave1' |  | ||||||
|      * 示例为了方便则使用startsWith匹配了全部示例key |  | ||||||
|      * |  | ||||||
|      * @param processEvent 参数 |  | ||||||
|      */ |  | ||||||
|     @EventListener(condition = "#processEvent.flowCode.endsWith('constructionValue')") |  | ||||||
|     public void processHandler(ProcessEvent processEvent) { |  | ||||||
|         log.info("施工产值审核任务执行了{}", processEvent.toString()); |  | ||||||
|         OutConstructionValue byId = this.getById(Convert.toLong(processEvent.getBusinessId())); |  | ||||||
|         byId.setAuditStatus(processEvent.getStatus()); |  | ||||||
|         if (processEvent.getSubmit()) { |  | ||||||
|             byId.setAuditStatus(BusinessStatusEnum.WAITING.getStatus()); |  | ||||||
|         } |  | ||||||
|         this.updateById(byId); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * 执行任务创建监听 |  | ||||||
|      * 示例:也可通过  @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断 |  | ||||||
|      * 在方法中判断流程节点key |  | ||||||
|      * if ("xxx".equals(processTaskEvent.getNodeCode())) { |  | ||||||
|      * //执行业务逻辑 |  | ||||||
|      * } |  | ||||||
|      * |  | ||||||
|      * @param processTaskEvent 参数 |  | ||||||
|      */ |  | ||||||
|     @EventListener(condition = "#processTaskEvent.flowCode.endsWith('constructionValue')") |  | ||||||
|     public void processTaskHandler(ProcessTaskEvent processTaskEvent) { |  | ||||||
|         log.info("施工产值审核任务创建了{}", processTaskEvent.toString()); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * 监听删除流程事件 |  | ||||||
|      * 正常使用只需#processDeleteEvent.flowCode=='leave1' |  | ||||||
|      * 示例为了方便则使用startsWith匹配了全部示例key |  | ||||||
|      * |  | ||||||
|      * @param processDeleteEvent 参数 |  | ||||||
|      */ |  | ||||||
|     @EventListener(condition = "#processDeleteEvent.flowCode.endsWith('constructionValue')") |  | ||||||
|     public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) { |  | ||||||
|         log.info("监听删除流程事件,施工产值审核任务执行了{}", processDeleteEvent.toString()); |  | ||||||
| //        OutMonthPlan plan =  this.getById(Convert.toLong(processDeleteEvent.getBusinessId())); |  | ||||||
| //        if (ObjectUtil.isNull(plan)) { |  | ||||||
| //            return; |  | ||||||
| //        } |  | ||||||
| //        this.removeById(plan.getId()); |  | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,9 +1,12 @@ | |||||||
| package org.dromara.out.service.impl; | package org.dromara.out.service.impl; | ||||||
|  |  | ||||||
| import cn.hutool.core.convert.Convert; | import cn.hutool.core.convert.Convert; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||||
| import org.dromara.cailiaoshebei.service.IBusMaterialsorderService; |  | ||||||
| import org.dromara.common.core.domain.event.ProcessDeleteEvent; | import org.dromara.common.core.domain.event.ProcessDeleteEvent; | ||||||
| import org.dromara.common.core.domain.event.ProcessEvent; | import org.dromara.common.core.domain.event.ProcessEvent; | ||||||
| import org.dromara.common.core.domain.event.ProcessTaskEvent; | import org.dromara.common.core.domain.event.ProcessTaskEvent; | ||||||
| @ -13,29 +16,20 @@ import org.dromara.common.core.exception.ServiceException; | |||||||
| import org.dromara.common.core.utils.DateUtils; | import org.dromara.common.core.utils.DateUtils; | ||||||
| import org.dromara.common.core.utils.MapstructUtils; | import org.dromara.common.core.utils.MapstructUtils; | ||||||
| import org.dromara.common.core.utils.StringUtils; | import org.dromara.common.core.utils.StringUtils; | ||||||
| import org.dromara.common.mybatis.core.page.TableDataInfo; |  | ||||||
| import org.dromara.common.mybatis.core.page.PageQuery; | import org.dromara.common.mybatis.core.page.PageQuery; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |  | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; |  | ||||||
| import lombok.RequiredArgsConstructor; |  | ||||||
| import org.dromara.out.domain.BusProcurement; | import org.dromara.out.domain.BusProcurement; | ||||||
| import org.dromara.out.domain.OutConstructionValue; | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
|  | import org.dromara.out.domain.OutMonthPlan; | ||||||
| import org.dromara.out.domain.OutMonthPlanAudit; | import org.dromara.out.domain.OutMonthPlanAudit; | ||||||
|  | import org.dromara.out.domain.bo.OutMonthPlanBo; | ||||||
| import org.dromara.out.domain.bo.PurchaseValueAReq; | import org.dromara.out.domain.bo.PurchaseValueAReq; | ||||||
| import org.dromara.out.domain.bo.PurchaseValueAupReq; | import org.dromara.out.domain.bo.PurchaseValueAupReq; | ||||||
| import org.dromara.out.domain.vo.PurchaseValueARes; | import org.dromara.out.domain.vo.OutMonthPlanVo; | ||||||
| import org.dromara.out.service.IBusProcurementService; | import org.dromara.out.mapper.OutMonthPlanMapper; | ||||||
| import org.dromara.out.service.IOutConstructionValueService; | import org.dromara.out.service.*; | ||||||
| import org.dromara.out.service.IOutMonthPlanAuditService; |  | ||||||
| import org.jetbrains.annotations.NotNull; |  | ||||||
| import org.springframework.context.event.EventListener; | import org.springframework.context.event.EventListener; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
| import org.dromara.out.domain.bo.OutMonthPlanBo; |  | ||||||
| import org.dromara.out.domain.vo.OutMonthPlanVo; |  | ||||||
| import org.dromara.out.domain.OutMonthPlan; |  | ||||||
| import org.dromara.out.mapper.OutMonthPlanMapper; |  | ||||||
| import org.dromara.out.service.IOutMonthPlanService; |  | ||||||
|  |  | ||||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||||
| import java.math.RoundingMode; | import java.math.RoundingMode; | ||||||
| @ -61,11 +55,10 @@ public class OutMonthPlanServiceImpl extends ServiceImpl<OutMonthPlanMapper, Out | |||||||
|  |  | ||||||
|     private final IOutConstructionValueService constructionValueService; |     private final IOutConstructionValueService constructionValueService; | ||||||
|  |  | ||||||
|  |     private final IOutConstructionValueRangeService constructionValueRangeService; | ||||||
|  |  | ||||||
|     private final IBusProcurementService busProcurementService; |     private final IBusProcurementService busProcurementService; | ||||||
|  |  | ||||||
|  |  | ||||||
|     private final IBusMaterialsorderService busMaterialsorderService; |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询月度产值计划 |      * 查询月度产值计划 | ||||||
|      * |      * | ||||||
| @ -385,13 +378,13 @@ public class OutMonthPlanServiceImpl extends ServiceImpl<OutMonthPlanMapper, Out | |||||||
|                 outMonthPlan.setCompleteValue(purchaseValue); |                 outMonthPlan.setCompleteValue(purchaseValue); | ||||||
|             } else if ("3".equals(outMonthPlan.getValueType())) { //施工产值 |             } else if ("3".equals(outMonthPlan.getValueType())) { //施工产值 | ||||||
|                 //查询项目的审核通过的施工详细表 1.累计完成产值 2.完成产值月合计 3.各周完成产值 |                 //查询项目的审核通过的施工详细表 1.累计完成产值 2.完成产值月合计 3.各周完成产值 | ||||||
|                 List<OutConstructionValue> outConstructionValues = constructionValueService.lambdaQuery() |                 List<OutConstructionValueRange> list = constructionValueRangeService.lambdaQuery() | ||||||
|                     .eq(OutConstructionValue::getProjectId, outMonthPlan.getProjectId()) |                     .eq(OutConstructionValueRange::getProjectId, outMonthPlan.getProjectId()) | ||||||
|                     .between(OutConstructionValue::getReportDate, firstDay, lastDay) |                     .between(OutConstructionValueRange::getStartDate, firstDay, lastDay) | ||||||
|                     .eq(OutConstructionValue::getAuditStatus, BusinessStatusEnum.FINISH.getStatus()) |                     .eq(OutConstructionValueRange::getAuditStatus, BusinessStatusEnum.FINISH.getStatus()) | ||||||
|                     .list(); |                     .list(); | ||||||
|                 // 计算完成值 |                 // 计算完成值 | ||||||
|                 BigDecimal reduce = outConstructionValues.stream().map(OutConstructionValue::getOutValue) |                 BigDecimal reduce = list.stream().map(OutConstructionValueRange::getOutValue) | ||||||
|                     .reduce(BigDecimal.ZERO, BigDecimal::add); |                     .reduce(BigDecimal.ZERO, BigDecimal::add); | ||||||
|                 outMonthPlan.setCompleteValue(reduce); |                 outMonthPlan.setCompleteValue(reduce); | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -6,11 +6,13 @@ import com.alibaba.excel.EasyExcel; | |||||||
| import com.alibaba.excel.ExcelReader; | import com.alibaba.excel.ExcelReader; | ||||||
| import com.alibaba.excel.read.metadata.ReadSheet; | import com.alibaba.excel.read.metadata.ReadSheet; | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||||
| import jakarta.annotation.Resource; | import jakarta.annotation.Resource; | ||||||
| import jakarta.servlet.http.HttpServletResponse; | import jakarta.servlet.http.HttpServletResponse; | ||||||
| import jakarta.validation.constraints.NotEmpty; | import jakarta.validation.constraints.NotEmpty; | ||||||
| import jakarta.validation.constraints.NotNull; | import jakarta.validation.constraints.NotNull; | ||||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.dromara.common.core.constant.HttpStatus; | ||||||
| import org.dromara.common.core.domain.R; | import org.dromara.common.core.domain.R; | ||||||
| import org.dromara.common.core.exception.ServiceException; | import org.dromara.common.core.exception.ServiceException; | ||||||
| import org.dromara.common.excel.core.DefaultExcelListener; | import org.dromara.common.excel.core.DefaultExcelListener; | ||||||
| @ -21,6 +23,7 @@ import org.dromara.common.log.enums.BusinessType; | |||||||
| import org.dromara.common.web.core.BaseController; | import org.dromara.common.web.core.BaseController; | ||||||
| import org.dromara.progress.domain.PgsProgressCategory; | import org.dromara.progress.domain.PgsProgressCategory; | ||||||
| import org.dromara.progress.domain.dto.progresscategory.*; | import org.dromara.progress.domain.dto.progresscategory.*; | ||||||
|  | import org.dromara.progress.domain.enums.PgsRelevancyStructureEnum; | ||||||
| import org.dromara.progress.domain.vo.progresscategory.*; | import org.dromara.progress.domain.vo.progresscategory.*; | ||||||
| import org.dromara.progress.service.IPgsProgressCategoryService; | import org.dromara.progress.service.IPgsProgressCategoryService; | ||||||
| import org.dromara.project.domain.BusProject; | import org.dromara.project.domain.BusProject; | ||||||
| @ -36,6 +39,7 @@ import java.math.RoundingMode; | |||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  | import java.util.stream.Collectors; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 进度类别 |  * 进度类别 | ||||||
| @ -76,13 +80,13 @@ public class PgsProgressCategoryController extends BaseController { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 根据子项目获取进度类别模版顶级目录列表 |      * 根据项目获取进度类别模版顶级目录列表 | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("progress:progressCategory:listTopBySubProjectId") |     @SaCheckPermission("progress:progressCategory:listTopByProjectId") | ||||||
|     @GetMapping("/listTopBySubProjectId/{subProjectId}") |     @GetMapping("/listTopByProjectId/{projectId}") | ||||||
|     public R<List<PgsProgressCategoryTopVo>> listTopBySubProjectId(@NotNull(message = "项目id不能为空") |     public R<List<PgsProgressCategoryTopVo>> listTopByProjectId(@NotNull(message = "项目id不能为空") | ||||||
|                                                                    @PathVariable Long subProjectId) { |                                                                 @PathVariable Long projectId) { | ||||||
|         List<PgsProgressCategoryTopVo> list = pgsProgressCategoryService.getTopListByProjectId(subProjectId); |         List<PgsProgressCategoryTopVo> list = pgsProgressCategoryService.getTopListByProjectId(projectId); | ||||||
|         return R.ok(list); |         return R.ok(list); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -93,41 +97,67 @@ public class PgsProgressCategoryController extends BaseController { | |||||||
|     @Log(title = "进度类别", businessType = BusinessType.EXPORT) |     @Log(title = "进度类别", businessType = BusinessType.EXPORT) | ||||||
|     @Transactional |     @Transactional | ||||||
|     @PostMapping("/export") |     @PostMapping("/export") | ||||||
|     public void export(@RequestBody Map<String, String> projectId, HttpServletResponse response) { |     public void export(@RequestBody PgsProgressCategoryQueryReq req, HttpServletResponse response) { | ||||||
|  |         LambdaQueryWrapper<PgsProgressCategory> lqw = new LambdaQueryWrapper<>(); | ||||||
|         LambdaQueryWrapper<PgsProgressCategory> queryWrapper = new LambdaQueryWrapper<>(); |  | ||||||
|         //根据projectid拿到整个数据 |  | ||||||
|         queryWrapper.eq(PgsProgressCategory::getProjectId, projectId.get("projectId")); |  | ||||||
|         List<PgsProgressCategory> list = pgsProgressCategoryService.list(queryWrapper); |  | ||||||
|         List<Long> ids = new ArrayList<>(); |  | ||||||
|         for (PgsProgressCategory pgsProgressCategory : list) { |  | ||||||
|             ids.add(pgsProgressCategory.getId()); |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         //要导出的整个sheet所需要的names |         //要导出的整个sheet所需要的names | ||||||
|         List<String> names = new ArrayList<>(); |         List<String> names = new ArrayList<>(); | ||||||
|         //要导出的list |         //要导出的list | ||||||
|         List<List<PgsProgressCategoryVo>> listValues = new ArrayList<>(); |         List<List<PgsProgressCategoryVo>> listValues = new ArrayList<>(); | ||||||
|  |         Long parentId = req.getParentId(); | ||||||
|  |         String relevancyStructure = req.getRelevancyStructure(); | ||||||
|  |         if (relevancyStructure.equals("2")) { | ||||||
|  |             // 父类id不为空,导出父类对应的子类 | ||||||
|  |             PgsProgressCategory category = pgsProgressCategoryService.getById(parentId); | ||||||
|  |             if (category == null) { | ||||||
|  |                 throw new ServiceException("父进度类别不存在", HttpStatus.NOT_FOUND); | ||||||
|  |             } | ||||||
|  |             names.add(category.getName()); | ||||||
|  |             QueryWrapper<PgsProgressCategory> queryWrapper = new QueryWrapper<>(); | ||||||
|  |             queryWrapper.apply("FIND_IN_SET({0}, ancestors)", parentId); | ||||||
|  |             List<PgsProgressCategoryVo> voList = pgsProgressCategoryService.getVoList(pgsProgressCategoryService.list(queryWrapper)); | ||||||
|  |             listValues.add(voList); | ||||||
|  |         } else { | ||||||
|  |             BusProject project = projectService.getById(req.getProjectId()); | ||||||
|  |             if (project == null) { | ||||||
|  |                 throw new ServiceException("项目不存在", HttpStatus.NOT_FOUND); | ||||||
|  |             } | ||||||
|  |             List<BusProject> projects; | ||||||
|  |             if (project.getPId().equals(0L)) { | ||||||
|  |                 projects = projectService.lambdaQuery() | ||||||
|  |                     .eq(BusProject::getPId, req.getProjectId()) | ||||||
|  |                     .list(); | ||||||
|  |                 projects.add(project); | ||||||
|  |                 List<Long> ids = projects.stream().map(BusProject::getId).toList(); | ||||||
|  |                 lqw.in(CollUtil.isNotEmpty(ids), PgsProgressCategory::getProjectId, ids); | ||||||
|  |             } else { | ||||||
|  |                 projects = List.of(project); | ||||||
|  |                 lqw.eq(req.getProjectId() != null, PgsProgressCategory::getProjectId, req.getProjectId()); | ||||||
|  |             } | ||||||
|  |             lqw.eq(req.getMatrixId() != null, PgsProgressCategory::getMatrixId, req.getMatrixId()); | ||||||
|  |             // 查询数据 | ||||||
|  |             lqw.eq(PgsProgressCategory::getParentId, 0L); | ||||||
|  |             List<PgsProgressCategory> list = pgsProgressCategoryService.list(lqw); | ||||||
|  |  | ||||||
|         //获取非方阵类别name 非方阵类别有多级 暂定只有2级 也有可能没有父子关系 |             Map<Long, String> projectNameMap = projects.stream() | ||||||
|         queryWrapper = new LambdaQueryWrapper<>(); |                 .collect(Collectors.toMap(BusProject::getId, BusProject::getProjectName)); | ||||||
|         queryWrapper.eq(PgsProgressCategory::getParentId, 0).eq(PgsProgressCategory::getMatrixId, 0).in(PgsProgressCategory::getId, ids); |             // 获取非方阵类别name 非方阵类别有多级 暂定只有2级 也有可能没有父子关系 | ||||||
|         List<PgsProgressCategory> unMatrixList = pgsProgressCategoryService.list(queryWrapper); |             List<PgsProgressCategory> unMatrixList = list.stream().filter(category -> | ||||||
|  |                 !category.getRelevancyStructure().equals(PgsRelevancyStructureEnum.MATRIX.getValue())).toList(); | ||||||
|             if (!unMatrixList.isEmpty()) { |             if (!unMatrixList.isEmpty()) { | ||||||
|                 for (PgsProgressCategory unMatrix : unMatrixList) { |                 for (PgsProgressCategory unMatrix : unMatrixList) { | ||||||
|                     //所有非方阵顶类名 |                     //所有非方阵顶类名 | ||||||
|                 names.add(unMatrix.getName()); |                     names.add(unMatrix.getName() + "-" + projectNameMap.get(unMatrix.getProjectId())); | ||||||
|                     //寻找子类 |                     //寻找子类 | ||||||
|                 queryWrapper = new LambdaQueryWrapper<>(); |                     lqw = new LambdaQueryWrapper<>(); | ||||||
|                 queryWrapper.eq(PgsProgressCategory::getParentId, unMatrix.getId()); |                     lqw.eq(PgsProgressCategory::getParentId, unMatrix.getId()); | ||||||
|                 List<PgsProgressCategoryVo> children = pgsProgressCategoryService.getVoList(pgsProgressCategoryService.list(queryWrapper)); |                     List<PgsProgressCategoryVo> children = pgsProgressCategoryService.getVoList(pgsProgressCategoryService.list(lqw)); | ||||||
|                     if (!children.isEmpty()) { |                     if (!children.isEmpty()) { | ||||||
|                         //寻找孙类 然后添加 |                         //寻找孙类 然后添加 | ||||||
|                         List<PgsProgressCategoryVo> grandson = new ArrayList<>(); |                         List<PgsProgressCategoryVo> grandson = new ArrayList<>(); | ||||||
|                         for (PgsProgressCategoryVo childrenCategory : children) { |                         for (PgsProgressCategoryVo childrenCategory : children) { | ||||||
|                         queryWrapper = new LambdaQueryWrapper<>(); |                             lqw = new LambdaQueryWrapper<>(); | ||||||
|                         queryWrapper.eq(PgsProgressCategory::getParentId, childrenCategory.getId()); |                             lqw.eq(PgsProgressCategory::getParentId, childrenCategory.getId()); | ||||||
|                         List<PgsProgressCategoryVo> grandsonCategory = pgsProgressCategoryService.getVoList(pgsProgressCategoryService.list(queryWrapper)); |                             List<PgsProgressCategoryVo> grandsonCategory = pgsProgressCategoryService.getVoList(pgsProgressCategoryService.list(lqw)); | ||||||
|                             if (!grandsonCategory.isEmpty()) { |                             if (!grandsonCategory.isEmpty()) { | ||||||
|                                 grandson.addAll(grandsonCategory); |                                 grandson.addAll(grandsonCategory); | ||||||
|                             } else { |                             } else { | ||||||
| @ -140,17 +170,17 @@ public class PgsProgressCategoryController extends BaseController { | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             //获取矩阵类别name |             //获取矩阵类别name | ||||||
|         queryWrapper = new LambdaQueryWrapper<>(); |             List<PgsProgressCategory> matrixList = list.stream().filter(category -> | ||||||
|         queryWrapper.eq(PgsProgressCategory::getParentId, 0).ne(PgsProgressCategory::getMatrixId, 0).in(PgsProgressCategory::getId, ids); |                 category.getRelevancyStructure().equals(PgsRelevancyStructureEnum.MATRIX.getValue())).toList(); | ||||||
|         List<PgsProgressCategory> matrixList = pgsProgressCategoryService.list(queryWrapper); |  | ||||||
|             if (!matrixList.isEmpty()) { |             if (!matrixList.isEmpty()) { | ||||||
|                 for (PgsProgressCategory pgsProgressCategory : matrixList) { |                 for (PgsProgressCategory pgsProgressCategory : matrixList) { | ||||||
|                     //增加矩阵名 |                     //增加矩阵名 | ||||||
|                     names.add(pgsProgressCategory.getName() + "-" + pgsProgressCategory.getMatrixName()); |                     names.add(pgsProgressCategory.getName() + "-" + pgsProgressCategory.getMatrixName()); | ||||||
|                     //找到该矩阵下的列表 |                     //找到该矩阵下的列表 | ||||||
|                 queryWrapper = new LambdaQueryWrapper<>(); |                     lqw = new LambdaQueryWrapper<>(); | ||||||
|                 queryWrapper.eq(PgsProgressCategory::getMatrixId, pgsProgressCategory.getMatrixId()); |                     lqw.eq(PgsProgressCategory::getMatrixId, pgsProgressCategory.getMatrixId()); | ||||||
|                 listValues.add(pgsProgressCategoryService.getVoList(pgsProgressCategoryService.list(queryWrapper))); |                     listValues.add(pgsProgressCategoryService.getVoList(pgsProgressCategoryService.list(lqw))); | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
| @ -183,12 +213,6 @@ public class PgsProgressCategoryController extends BaseController { | |||||||
|             return R.fail("文件名不能为空"); |             return R.fail("文件名不能为空"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // 获取项目 |  | ||||||
|         List<BusProject> projects = projectService.lambdaQuery() |  | ||||||
|             .eq(BusProject::getPId, 1897160897167638529L) |  | ||||||
|             .list(); |  | ||||||
|         List<Long> ids = projects.stream().map(BusProject::getId).toList(); |  | ||||||
|  |  | ||||||
|         try { |         try { | ||||||
|             // 使用EasyExcel读取所有sheet |             // 使用EasyExcel读取所有sheet | ||||||
|             List<PgsProgressCategoryVo> allData = new ArrayList<>(); |             List<PgsProgressCategoryVo> allData = new ArrayList<>(); | ||||||
|  | |||||||
| @ -115,7 +115,7 @@ public class PgsProgressCategory extends BaseEntity { | |||||||
|     private String ancestors; |     private String ancestors; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -48,7 +48,7 @@ public class PgsProgressCategoryTemplate implements Serializable { | |||||||
|     private String workType; |     private String workType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -70,4 +70,9 @@ public class PgsProgressPlanDetail extends BaseEntity { | |||||||
|      */ |      */ | ||||||
|     private BigDecimal aiFill; |     private BigDecimal aiFill; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态(1未上报 2已上报 3已审核) | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -25,9 +25,9 @@ public class PgsProgressCategoryCreateReq implements Serializable { | |||||||
|     private Long parentId; |     private Long parentId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 子项目id |      * 项目id | ||||||
|      */ |      */ | ||||||
|     @NotNull(message = "子项目id不能为空") |     @NotNull(message = "项目id不能为空") | ||||||
|     private Long projectId; |     private Long projectId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @ -44,7 +44,6 @@ public class PgsProgressCategoryCreateReq implements Serializable { | |||||||
|     /** |     /** | ||||||
|      * 计量方式(0无 1数量 2百分比) |      * 计量方式(0无 1数量 2百分比) | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "计量方式不能为空") |  | ||||||
|     private String unitType; |     private String unitType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @ -66,7 +65,7 @@ public class PgsProgressCategoryCreateReq implements Serializable { | |||||||
|     private BigDecimal constructionPrice; |     private BigDecimal constructionPrice; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ public class PgsProgressCategoryQueryReq { | |||||||
|     private Long parentId; |     private Long parentId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -39,7 +39,7 @@ public class PgsProgressCategoryUpdateReq { | |||||||
|     private BigDecimal total; |     private BigDecimal total; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -52,7 +52,7 @@ public class PgsProgressCategoryTemplateCreateReq implements Serializable { | |||||||
|     private String constructionType; |     private String constructionType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "关联结构不能为空") |     @NotBlank(message = "关联结构不能为空") | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  | |||||||
| @ -40,7 +40,7 @@ public class PgsProgressCategoryTemplateQueryReq implements Serializable { | |||||||
|     private String constructionType; |     private String constructionType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -55,7 +55,7 @@ public class PgsProgressCategoryTemplateUpdateReq implements Serializable { | |||||||
|     private String constructionType; |     private String constructionType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -10,7 +10,8 @@ import lombok.Getter; | |||||||
| public enum PgsRelevancyStructureEnum { | public enum PgsRelevancyStructureEnum { | ||||||
|  |  | ||||||
|     SUB_PROJECT("子项目", "1"), |     SUB_PROJECT("子项目", "1"), | ||||||
|     MATRIX("方阵", "2"); |     MATRIX("方阵", "2"), | ||||||
|  |     PROJECT("项目", "3"); | ||||||
|  |  | ||||||
|     private final String text; |     private final String text; | ||||||
|  |  | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ import lombok.NoArgsConstructor; | |||||||
| public class PgsProgressCategoryMatrixStructureTopVo { | public class PgsProgressCategoryMatrixStructureTopVo { | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
| @ -28,6 +28,11 @@ public class PgsProgressCategoryMatrixStructureTopVo { | |||||||
|      */ |      */ | ||||||
|     private String name; |     private String name; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 子项目id | ||||||
|  |      */ | ||||||
|  |     private Long subProjectId; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 方阵id |      * 方阵id | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -16,7 +16,7 @@ public class PgsProgressCategorySecondVo implements Serializable { | |||||||
|     private static final long serialVersionUID = 5297363236416903392L; |     private static final long serialVersionUID = 5297363236416903392L; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -0,0 +1,51 @@ | |||||||
|  | package org.dromara.progress.domain.vo.progresscategory; | ||||||
|  |  | ||||||
|  | import lombok.AllArgsConstructor; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  | import org.dromara.common.translation.annotation.Translation; | ||||||
|  | import org.dromara.common.translation.constant.TransConstant; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * @author lilemy | ||||||
|  |  * @date 2025-09-24 16:21 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @AllArgsConstructor | ||||||
|  | public class PgsProgressCategorySubProjectStructureTopVo { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|  |      */ | ||||||
|  |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 主键id | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 类别名称 | ||||||
|  |      */ | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 子项目id | ||||||
|  |      */ | ||||||
|  |     private Long subProjectId; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 子项目名称 | ||||||
|  |      */ | ||||||
|  |     @Translation(type = TransConstant.PROJECT_ID_TO_NAME, mapper = "subProjectId") | ||||||
|  |     private String subProjectName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 关联方阵结构列表 | ||||||
|  |      */ | ||||||
|  |     private List<PgsProgressCategoryMatrixStructureTopVo> matrixStructureList; | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -18,7 +18,7 @@ public class PgsProgressCategoryTopVo implements Serializable { | |||||||
|     private static final long serialVersionUID = -8638109773596974231L; |     private static final long serialVersionUID = -8638109773596974231L; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
| @ -53,9 +53,9 @@ public class PgsProgressCategoryTopVo implements Serializable { | |||||||
|     private Long sort; |     private Long sort; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联方阵结构列表 |      * 关联子项目结构列表 | ||||||
|      */ |      */ | ||||||
|     private List<PgsProgressCategoryMatrixStructureTopVo> matrixStructureList; |     private List<PgsProgressCategorySubProjectStructureTopVo> subProjectStructureList; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 子类别列表 |      * 子类别列表 | ||||||
|  | |||||||
| @ -140,7 +140,7 @@ public class PgsProgressCategoryVo implements Serializable { | |||||||
|     private BigDecimal constructionOutputValue; |     private BigDecimal constructionOutputValue; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -47,7 +47,7 @@ public class PgsProgressCategoryTemplateVo implements Serializable { | |||||||
|     private String workType; |     private String workType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -107,7 +107,7 @@ public class PgsProgressPlanVo implements Serializable { | |||||||
|     private String workType; |     private String workType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -52,7 +52,7 @@ public class PgsProgressPlanDetailNumVo { | |||||||
|     private String workType; |     private String workType; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 关联结构(1子项目 2方阵) |      * 关联结构(1子项目 2方阵 3项目) | ||||||
|      */ |      */ | ||||||
|     private String relevancyStructure; |     private String relevancyStructure; | ||||||
|  |  | ||||||
|  | |||||||
| @ -68,4 +68,9 @@ public class PgsProgressPlanDetailVo implements Serializable { | |||||||
|     @ExcelProperty(value = "AI填入数量") |     @ExcelProperty(value = "AI填入数量") | ||||||
|     private BigDecimal aiFill; |     private BigDecimal aiFill; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态(1未上报 2已上报 3已审核) | ||||||
|  |      */ | ||||||
|  |     private String status; | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -53,12 +53,12 @@ public interface IPgsProgressCategoryService extends IService<PgsProgressCategor | |||||||
|     PgsProgressCategoryLastTimeVo queryLastTimeById(Long id); |     PgsProgressCategoryLastTimeVo queryLastTimeById(Long id); | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 根据子项目id获取顶级进度类别模版 |      * 根据项目id获取顶级进度类别模版 | ||||||
|      * |      * | ||||||
|      * @param subProjectId 子项目id |      * @param projectId 项目id | ||||||
|      * @return 顶级进度类别模版 |      * @return 顶级进度类别模版 | ||||||
|      */ |      */ | ||||||
|     List<PgsProgressCategoryTopVo> getTopListByProjectId(Long subProjectId); |     List<PgsProgressCategoryTopVo> getTopListByProjectId(Long projectId); | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 新增进度类别 |      * 新增进度类别 | ||||||
|  | |||||||
| @ -114,11 +114,12 @@ public interface IPgsProgressPlanDetailService extends IService<PgsProgressPlanD | |||||||
|     /** |     /** | ||||||
|      * 同步计划详情到施工产值 |      * 同步计划详情到施工产值 | ||||||
|      * |      * | ||||||
|      * @param localDate 计划日期 |      * @param startDate 开始日期 | ||||||
|  |      * @param endDate   结束日期 | ||||||
|      * @param projectId 项目id,为空同步所有项目进度计划详情 |      * @param projectId 项目id,为空同步所有项目进度计划详情 | ||||||
|      * @return 是否成功 |      * @return 是否成功 | ||||||
|      */ |      */ | ||||||
|     Boolean syncPlanDetail2ConstructionValue(LocalDate localDate, Long projectId); |     Boolean syncPlanDetail2ConstructionValue(LocalDate startDate, LocalDate endDate, Long projectId); | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 查询计划详情设施数量 |      * 查询计划详情设施数量 | ||||||
|  | |||||||
| @ -189,16 +189,25 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 根据子项目id获取顶级进度类别模版 |      * 根据项目id获取顶级进度类别模版 | ||||||
|      * |      * | ||||||
|      * @param subProjectId 子项目id |      * @param projectId 项目id | ||||||
|      * @return 顶级进度类别模版列表 |      * @return 顶级进度类别模版列表 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public List<PgsProgressCategoryTopVo> getTopListByProjectId(Long subProjectId) { |     public List<PgsProgressCategoryTopVo> getTopListByProjectId(Long projectId) { | ||||||
|  |         // 获取当前项目的所有子项目 | ||||||
|  |         List<Long> projectIds = new ArrayList<>(projectService.lambdaQuery() | ||||||
|  |             .select(BusProject::getId) | ||||||
|  |             .eq(BusProject::getPId, projectId) | ||||||
|  |             .list() | ||||||
|  |             .stream() | ||||||
|  |             .map(BusProject::getId) | ||||||
|  |             .toList()); | ||||||
|  |         projectIds.add(projectId); | ||||||
|         // 查询该子项目下的顶级进度类别(父ID为0) |         // 查询该子项目下的顶级进度类别(父ID为0) | ||||||
|         List<PgsProgressCategory> list = this.lambdaQuery() |         List<PgsProgressCategory> list = this.lambdaQuery() | ||||||
|             .eq(PgsProgressCategory::getProjectId, subProjectId) |             .in(PgsProgressCategory::getProjectId, projectIds) | ||||||
|             .eq(PgsProgressCategory::getParentId, PgsProgressCategoryConstant.TOP_PARENT_ID) |             .eq(PgsProgressCategory::getParentId, PgsProgressCategoryConstant.TOP_PARENT_ID) | ||||||
|             .list(); |             .list(); | ||||||
|         // 如果没有查询到顶级进度类别,直接返回空集合 |         // 如果没有查询到顶级进度类别,直接返回空集合 | ||||||
| @ -216,8 +225,169 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg | |||||||
|                 category.getRelevancyStructure().equals(PgsRelevancyStructureEnum.SUB_PROJECT.getValue())) |                 category.getRelevancyStructure().equals(PgsRelevancyStructureEnum.SUB_PROJECT.getValue())) | ||||||
|             .toList(); |             .toList(); | ||||||
|         if (CollUtil.isNotEmpty(subList)) { |         if (CollUtil.isNotEmpty(subList)) { | ||||||
|  |             // 按名称分组(同名的放在一起) | ||||||
|  |             Map<String, List<PgsProgressCategory>> subMap = subList.stream() | ||||||
|  |                 .collect(Collectors.groupingBy(PgsProgressCategory::getName)); | ||||||
|  |             for (Map.Entry<String, List<PgsProgressCategory>> entry : subMap.entrySet()) { | ||||||
|  |                 PgsProgressCategoryTopVo topVo = new PgsProgressCategoryTopVo(); | ||||||
|  |                 topVo.setName(entry.getKey()); | ||||||
|  |                 topVo.setRelevancyStructure(PgsRelevancyStructureEnum.SUB_PROJECT.getValue()); | ||||||
|  |                 // 取分组中的第一条记录的排序字段作为当前VO的排序值 | ||||||
|  |                 List<PgsProgressCategory> value = entry.getValue(); | ||||||
|  |                 PgsProgressCategory first = value.getFirst(); | ||||||
|  |                 topVo.setId(first.getId()); | ||||||
|  |                 topVo.setSort(first.getSort()); | ||||||
|  |                 // 转换为子项目结构的VO列表 | ||||||
|  |                 List<PgsProgressCategorySubProjectStructureTopVo> subProjectVoList = value.stream().map(category -> { | ||||||
|  |                     PgsProgressCategorySubProjectStructureTopVo vo = new PgsProgressCategorySubProjectStructureTopVo(); | ||||||
|  |                     BeanUtils.copyProperties(category, vo); | ||||||
|  |                     vo.setSubProjectId(category.getProjectId()); | ||||||
|  |                     return vo; | ||||||
|  |                 }).toList(); | ||||||
|  |                 topVo.setSubProjectStructureList(subProjectVoList); | ||||||
|  |                 // 统计深度 | ||||||
|  |                 AtomicInteger count = new AtomicInteger(1); | ||||||
|  |                 // 获取这些类别下的所有叶子节点 | ||||||
|  |                 List<Long> topIds = value.stream().map(PgsProgressCategory::getId).distinct().toList(); | ||||||
|  |                 List<PgsProgressCategory> leafNodesByTopIds = childrenNodes.stream() | ||||||
|  |                     .filter(node -> { | ||||||
|  |                         Set<Long> ancestorSet = Arrays.stream(node.getAncestors().split(",")) | ||||||
|  |                             .map(Long::parseLong) | ||||||
|  |                             .collect(Collectors.toSet()); | ||||||
|  |                         boolean result = topIds.stream().anyMatch(ancestorSet::contains); | ||||||
|  |                         if (result) { | ||||||
|  |                             count.set(Math.max(ancestorSet.size(), count.get())); | ||||||
|  |                         } | ||||||
|  |                         return result; | ||||||
|  |                     }).toList(); | ||||||
|  |                 // 如果有叶子节点,统计进度和状态;否则初始化为未完成 | ||||||
|  |                 if (CollUtil.isNotEmpty(leafNodesByTopIds)) { | ||||||
|  |                     topVo.setProgressTotal(this.getCompletedPercentage(leafNodesByTopIds)); | ||||||
|  |                     topVo.setStatus(this.getParentStatus(leafNodesByTopIds)); | ||||||
|  |                     if (count.get() == 2) { | ||||||
|  |                         topVo.setType("3"); | ||||||
|  |                     } else if (count.get() == 3) { | ||||||
|  |                         topVo.setType("4"); | ||||||
|  |                         List<PgsProgressCategorySecondVo> second = leafNodesByTopIds.stream() | ||||||
|  |                             .filter(node -> { | ||||||
|  |                                 Set<Long> ancestorSet = Arrays.stream(node.getAncestors().split(",")) | ||||||
|  |                                     .map(Long::parseLong) | ||||||
|  |                                     .collect(Collectors.toSet()); | ||||||
|  |                                 return ancestorSet.size() == 2; | ||||||
|  |                             }).map(node -> { | ||||||
|  |                                 PgsProgressCategorySecondVo vo = new PgsProgressCategorySecondVo(); | ||||||
|  |                                 BeanUtils.copyProperties(node, vo); | ||||||
|  |                                 return vo; | ||||||
|  |                             }) | ||||||
|  |                             .toList(); | ||||||
|  |                         topVo.setCategorySecondList(second); | ||||||
|  |                     } | ||||||
|  |                 } else { | ||||||
|  |                     topVo.setProgressTotal(BigDecimal.ZERO); | ||||||
|  |                     topVo.setStatus(PgsFinishStatusEnum.UNFINISH.getValue()); | ||||||
|  |                     topVo.setType("3"); | ||||||
|  |                 } | ||||||
|  |                 // 加入结果集 | ||||||
|  |                 topList.add(topVo); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         // ============================= 处理关联方阵的数据 ============================= | ||||||
|  |         // 筛选出关联方阵的顶级类别 | ||||||
|  |         List<PgsProgressCategory> matrixList = list.stream() | ||||||
|  |             .filter(category -> | ||||||
|  |                 category.getRelevancyStructure().equals(PgsRelevancyStructureEnum.MATRIX.getValue())) | ||||||
|  |             .toList(); | ||||||
|  |         if (CollUtil.isNotEmpty(matrixList)) { | ||||||
|  |             // 按名称分组(同名的放在一起) | ||||||
|  |             Map<String, List<PgsProgressCategory>> matrixMap = matrixList.stream() | ||||||
|  |                 .collect(Collectors.groupingBy(PgsProgressCategory::getName)); | ||||||
|  |             for (Map.Entry<String, List<PgsProgressCategory>> entry : matrixMap.entrySet()) { | ||||||
|  |                 PgsProgressCategoryTopVo topVo = new PgsProgressCategoryTopVo(); | ||||||
|  |                 topVo.setName(entry.getKey()); | ||||||
|  |                 topVo.setRelevancyStructure(PgsRelevancyStructureEnum.MATRIX.getValue()); | ||||||
|  |                 // 取分组中的第一条记录的排序字段作为当前VO的排序值 | ||||||
|  |                 List<PgsProgressCategory> value = entry.getValue(); | ||||||
|  |                 PgsProgressCategory first = value.getFirst(); | ||||||
|  |                 topVo.setId(first.getId()); | ||||||
|  |                 topVo.setSort(first.getSort()); | ||||||
|  |                 // 转换为方阵结构的VO列表 | ||||||
|  |                 List<PgsProgressCategoryMatrixStructureTopVo> matrixVoList = value.stream().map(category -> { | ||||||
|  |                     PgsProgressCategoryMatrixStructureTopVo vo = new PgsProgressCategoryMatrixStructureTopVo(); | ||||||
|  |                     BeanUtils.copyProperties(category, vo); | ||||||
|  |                     vo.setSubProjectId(category.getProjectId()); | ||||||
|  |                     return vo; | ||||||
|  |                 }).toList(); | ||||||
|  |                 // 根据子项目进行分类 | ||||||
|  |                 Map<Long, List<PgsProgressCategoryMatrixStructureTopVo>> subProjectMap = matrixVoList.stream() | ||||||
|  |                     .collect(Collectors.groupingBy(PgsProgressCategoryMatrixStructureTopVo::getSubProjectId)); | ||||||
|  |                 List<PgsProgressCategorySubProjectStructureTopVo> subProjects = new ArrayList<>(); | ||||||
|  |                 for (Map.Entry<Long, List<PgsProgressCategoryMatrixStructureTopVo>> subEntry : subProjectMap.entrySet()) { | ||||||
|  |                     List<PgsProgressCategoryMatrixStructureTopVo> subValue = subEntry.getValue(); | ||||||
|  |                     PgsProgressCategorySubProjectStructureTopVo vo = new PgsProgressCategorySubProjectStructureTopVo(); | ||||||
|  |                     PgsProgressCategoryMatrixStructureTopVo subFirst = subValue.getFirst(); | ||||||
|  |                     vo.setRelevancyStructure(subFirst.getRelevancyStructure()); | ||||||
|  |                     vo.setId(subFirst.getId()); | ||||||
|  |                     vo.setName(subFirst.getName()); | ||||||
|  |                     vo.setSubProjectId(subFirst.getSubProjectId()); | ||||||
|  |                     vo.setMatrixStructureList(subValue); | ||||||
|  |                     subProjects.add(vo); | ||||||
|  |                 } | ||||||
|  |                 topVo.setSubProjectStructureList(subProjects); | ||||||
|  |                 // 统计深度 | ||||||
|  |                 AtomicInteger count = new AtomicInteger(1); | ||||||
|  |                 // 获取这些类别下的所有叶子节点 | ||||||
|  |                 List<Long> topIds = value.stream().map(PgsProgressCategory::getId).distinct().toList(); | ||||||
|  |                 List<PgsProgressCategory> leafNodesByTopIds = childrenNodes.stream() | ||||||
|  |                     .filter(node -> { | ||||||
|  |                         Set<Long> ancestorSet = Arrays.stream(node.getAncestors().split(",")) | ||||||
|  |                             .map(Long::parseLong) | ||||||
|  |                             .collect(Collectors.toSet()); | ||||||
|  |                         boolean result = topIds.stream().anyMatch(ancestorSet::contains); | ||||||
|  |                         if (result) { | ||||||
|  |                             count.set(Math.max(ancestorSet.size(), count.get())); | ||||||
|  |                         } | ||||||
|  |                         return result; | ||||||
|  |                     }).toList(); | ||||||
|  |                 // 如果有叶子节点,统计进度和状态;否则初始化为未完成 | ||||||
|  |                 if (CollUtil.isNotEmpty(leafNodesByTopIds)) { | ||||||
|  |                     topVo.setProgressTotal(this.getCompletedPercentage(leafNodesByTopIds)); | ||||||
|  |                     topVo.setStatus(this.getParentStatus(leafNodesByTopIds)); | ||||||
|  |                     if (count.get() == 2) { | ||||||
|  |                         topVo.setType("3"); | ||||||
|  |                     } else if (count.get() == 3) { | ||||||
|  |                         topVo.setType("4"); | ||||||
|  |                         List<PgsProgressCategorySecondVo> second = leafNodesByTopIds.stream() | ||||||
|  |                             .filter(node -> { | ||||||
|  |                                 Set<Long> ancestorSet = Arrays.stream(node.getAncestors().split(",")) | ||||||
|  |                                     .map(Long::parseLong) | ||||||
|  |                                     .collect(Collectors.toSet()); | ||||||
|  |                                 return ancestorSet.size() == 2; | ||||||
|  |                             }).map(node -> { | ||||||
|  |                                 PgsProgressCategorySecondVo vo = new PgsProgressCategorySecondVo(); | ||||||
|  |                                 BeanUtils.copyProperties(node, vo); | ||||||
|  |                                 return vo; | ||||||
|  |                             }) | ||||||
|  |                             .toList(); | ||||||
|  |                         topVo.setCategorySecondList(second); | ||||||
|  |                     } | ||||||
|  |                 } else { | ||||||
|  |                     topVo.setProgressTotal(BigDecimal.ZERO); | ||||||
|  |                     topVo.setStatus(PgsFinishStatusEnum.UNFINISH.getValue()); | ||||||
|  |                     topVo.setType("3"); | ||||||
|  |                 } | ||||||
|  |                 // 加入结果集 | ||||||
|  |                 topList.add(topVo); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         // ============================= 处理关联子项目的数据 ============================= | ||||||
|  |         // 筛选出关联项目的顶级类别 | ||||||
|  |         List<PgsProgressCategory> pList = list.stream() | ||||||
|  |             .filter(category -> | ||||||
|  |                 category.getRelevancyStructure().equals(PgsRelevancyStructureEnum.PROJECT.getValue())) | ||||||
|  |             .toList(); | ||||||
|  |         if (CollUtil.isNotEmpty(pList)) { | ||||||
|             // 将子项目类别转换为VO对象 |             // 将子项目类别转换为VO对象 | ||||||
|             List<PgsProgressCategoryTopVo> subVoList = subList.stream().map(category -> { |             List<PgsProgressCategoryTopVo> pVoList = pList.stream().map(category -> { | ||||||
|                 PgsProgressCategoryTopVo topVo = new PgsProgressCategoryTopVo(); |                 PgsProgressCategoryTopVo topVo = new PgsProgressCategoryTopVo(); | ||||||
|                 // 属性拷贝 |                 // 属性拷贝 | ||||||
|                 BeanUtils.copyProperties(category, topVo); |                 BeanUtils.copyProperties(category, topVo); | ||||||
| @ -265,77 +435,7 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg | |||||||
|                 return topVo; |                 return topVo; | ||||||
|             }).toList(); |             }).toList(); | ||||||
|             // 将处理好的子项目VO加入结果集 |             // 将处理好的子项目VO加入结果集 | ||||||
|             topList.addAll(subVoList); |             topList.addAll(pVoList); | ||||||
|         } |  | ||||||
|         // ============================= 处理关联方阵的数据 ============================= |  | ||||||
|         // 筛选出关联方阵的顶级类别 |  | ||||||
|         List<PgsProgressCategory> matrixList = list.stream() |  | ||||||
|             .filter(category -> |  | ||||||
|                 category.getRelevancyStructure().equals(PgsRelevancyStructureEnum.MATRIX.getValue())) |  | ||||||
|             .toList(); |  | ||||||
|         if (CollUtil.isNotEmpty(matrixList)) { |  | ||||||
|             // 按名称分组(同名的放在一起) |  | ||||||
|             Map<String, List<PgsProgressCategory>> matrixMap = matrixList.stream() |  | ||||||
|                 .collect(Collectors.groupingBy(PgsProgressCategory::getName)); |  | ||||||
|             for (Map.Entry<String, List<PgsProgressCategory>> entry : matrixMap.entrySet()) { |  | ||||||
|                 PgsProgressCategoryTopVo topVo = new PgsProgressCategoryTopVo(); |  | ||||||
|                 topVo.setName(entry.getKey()); |  | ||||||
|                 topVo.setRelevancyStructure(PgsRelevancyStructureEnum.MATRIX.getValue()); |  | ||||||
|                 // 取分组中的第一条记录的排序字段作为当前VO的排序值 |  | ||||||
|                 List<PgsProgressCategory> value = entry.getValue(); |  | ||||||
|                 topVo.setSort(value.getFirst().getSort()); |  | ||||||
|                 // 转换为方阵结构的VO列表 |  | ||||||
|                 List<PgsProgressCategoryMatrixStructureTopVo> matrixVoList = value.stream().map(category -> { |  | ||||||
|                     PgsProgressCategoryMatrixStructureTopVo vo = new PgsProgressCategoryMatrixStructureTopVo(); |  | ||||||
|                     BeanUtils.copyProperties(category, vo); |  | ||||||
|                     return vo; |  | ||||||
|                 }).toList(); |  | ||||||
|                 topVo.setMatrixStructureList(matrixVoList); |  | ||||||
|                 // 统计深度 |  | ||||||
|                 AtomicInteger count = new AtomicInteger(1); |  | ||||||
|                 // 获取这些类别下的所有叶子节点 |  | ||||||
|                 List<Long> topIds = value.stream().map(PgsProgressCategory::getId).distinct().toList(); |  | ||||||
|                 List<PgsProgressCategory> leafNodesByTopIds = childrenNodes.stream() |  | ||||||
|                     .filter(node -> { |  | ||||||
|                         Set<Long> ancestorSet = Arrays.stream(node.getAncestors().split(",")) |  | ||||||
|                             .map(Long::parseLong) |  | ||||||
|                             .collect(Collectors.toSet()); |  | ||||||
|                         boolean result = topIds.stream().anyMatch(ancestorSet::contains); |  | ||||||
|                         if (result) { |  | ||||||
|                             count.set(Math.max(ancestorSet.size(), count.get())); |  | ||||||
|                         } |  | ||||||
|                         return result; |  | ||||||
|                     }).toList(); |  | ||||||
|                 // 如果有叶子节点,统计进度和状态;否则初始化为未完成 |  | ||||||
|                 if (CollUtil.isNotEmpty(leafNodesByTopIds)) { |  | ||||||
|                     topVo.setProgressTotal(this.getCompletedPercentage(leafNodesByTopIds)); |  | ||||||
|                     topVo.setStatus(this.getParentStatus(leafNodesByTopIds)); |  | ||||||
|                     if (count.get() == 2) { |  | ||||||
|                         topVo.setType("3"); |  | ||||||
|                     } else if (count.get() == 3) { |  | ||||||
|                         topVo.setType("4"); |  | ||||||
|                         List<PgsProgressCategorySecondVo> second = leafNodesByTopIds.stream() |  | ||||||
|                             .filter(node -> { |  | ||||||
|                                 Set<Long> ancestorSet = Arrays.stream(node.getAncestors().split(",")) |  | ||||||
|                                     .map(Long::parseLong) |  | ||||||
|                                     .collect(Collectors.toSet()); |  | ||||||
|                                 return ancestorSet.size() == 2; |  | ||||||
|                             }).map(node -> { |  | ||||||
|                                 PgsProgressCategorySecondVo vo = new PgsProgressCategorySecondVo(); |  | ||||||
|                                 BeanUtils.copyProperties(node, vo); |  | ||||||
|                                 return vo; |  | ||||||
|                             }) |  | ||||||
|                             .toList(); |  | ||||||
|                         topVo.setCategorySecondList(second); |  | ||||||
|                     } |  | ||||||
|                 } else { |  | ||||||
|                     topVo.setProgressTotal(BigDecimal.ZERO); |  | ||||||
|                     topVo.setStatus(PgsFinishStatusEnum.UNFINISH.getValue()); |  | ||||||
|                     topVo.setType("3"); |  | ||||||
|                 } |  | ||||||
|                 // 加入结果集 |  | ||||||
|                 topList.add(topVo); |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|         // ============================= 排序 & 返回结果 ============================= |         // ============================= 排序 & 返回结果 ============================= | ||||||
|         // 按 sort 字段升序排序 |         // 按 sort 字段升序排序 | ||||||
| @ -398,6 +498,7 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg | |||||||
|                 .max() |                 .max() | ||||||
|                 .orElse(0); |                 .orElse(0); | ||||||
|             progressCategory.setWorkType(workType + "_" + (maxNum + 1)); |             progressCategory.setWorkType(workType + "_" + (maxNum + 1)); | ||||||
|  |             progressCategory.setUnitType(PgsProgressUnitTypeEnum.NUMBER.getValue()); | ||||||
|             // 保存新添加的进度类别 |             // 保存新添加的进度类别 | ||||||
|             boolean save = this.save(progressCategory); |             boolean save = this.save(progressCategory); | ||||||
|             if (!save) { |             if (!save) { | ||||||
|  | |||||||
| @ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; | |||||||
| import cn.hutool.json.JSONUtil; | import cn.hutool.json.JSONUtil; | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
| import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.IdWorker; | ||||||
| import com.baomidou.mybatisplus.core.toolkit.support.SFunction; | import com.baomidou.mybatisplus.core.toolkit.support.SFunction; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
| @ -33,6 +34,8 @@ import org.dromara.manager.recognizermanager.vo.RecognizeImageStreamResult; | |||||||
| import org.dromara.manager.recognizermanager.vo.RecognizeTargetVo; | import org.dromara.manager.recognizermanager.vo.RecognizeTargetVo; | ||||||
| import org.dromara.manager.recognizermanager.vo.RecognizeVo; | import org.dromara.manager.recognizermanager.vo.RecognizeVo; | ||||||
| import org.dromara.out.domain.OutConstructionValue; | import org.dromara.out.domain.OutConstructionValue; | ||||||
|  | import org.dromara.out.domain.OutConstructionValueRange; | ||||||
|  | import org.dromara.out.service.IOutConstructionValueRangeService; | ||||||
| import org.dromara.out.service.IOutConstructionValueService; | import org.dromara.out.service.IOutConstructionValueService; | ||||||
| import org.dromara.progress.constant.PgsProgressCategoryConstant; | import org.dromara.progress.constant.PgsProgressCategoryConstant; | ||||||
| import org.dromara.progress.domain.PgsProgressCategory; | import org.dromara.progress.domain.PgsProgressCategory; | ||||||
| @ -126,6 +129,9 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla | |||||||
|     @Resource |     @Resource | ||||||
|     private DroneProperties droneBigImageProperties; |     private DroneProperties droneBigImageProperties; | ||||||
|  |  | ||||||
|  |     @Resource | ||||||
|  |     private IOutConstructionValueRangeService constructionValueRangeService; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 分页查询进度计划详情列表 |      * 分页查询进度计划详情列表 | ||||||
|      * |      * | ||||||
| @ -158,6 +164,10 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla | |||||||
|         if (progressPlanDetail == null) { |         if (progressPlanDetail == null) { | ||||||
|             throw new ServiceException("进度计划详情信息不存在", HttpStatus.NOT_FOUND); |             throw new ServiceException("进度计划详情信息不存在", HttpStatus.NOT_FOUND); | ||||||
|         } |         } | ||||||
|  |         // 判断当前详情是否已提交 | ||||||
|  |         if (progressPlanDetail.getStatus().equals("3")) { | ||||||
|  |             throw new ServiceException("当前详情已在施工产值中提交,无法提交", HttpStatus.BAD_REQUEST); | ||||||
|  |         } | ||||||
|         Long progressPlanId = progressPlanDetail.getProgressPlanId(); |         Long progressPlanId = progressPlanDetail.getProgressPlanId(); | ||||||
|         PgsProgressPlan progressPlan = progressPlanService.getById(progressPlanId); |         PgsProgressPlan progressPlan = progressPlanService.getById(progressPlanId); | ||||||
|         if (progressPlan == null) { |         if (progressPlan == null) { | ||||||
| @ -356,6 +366,10 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla | |||||||
|         if (date.isAfter(LocalDate.now())) { |         if (date.isAfter(LocalDate.now())) { | ||||||
|             throw new ServiceException("完成时间不能大于当前时间", HttpStatus.BAD_REQUEST); |             throw new ServiceException("完成时间不能大于当前时间", HttpStatus.BAD_REQUEST); | ||||||
|         } |         } | ||||||
|  |         // 判断当前详情是否已提交 | ||||||
|  |         if (progressPlanDetail.getStatus().equals("3")) { | ||||||
|  |             throw new ServiceException("当前详情已在施工产值中提交,无法提交", HttpStatus.BAD_REQUEST); | ||||||
|  |         } | ||||||
|         Long progressPlanId = progressPlanDetail.getProgressPlanId(); |         Long progressPlanId = progressPlanDetail.getProgressPlanId(); | ||||||
|         PgsProgressPlan progressPlan = progressPlanService.getById(progressPlanId); |         PgsProgressPlan progressPlan = progressPlanService.getById(progressPlanId); | ||||||
|         if (progressPlan == null) { |         if (progressPlan == null) { | ||||||
| @ -833,16 +847,21 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla | |||||||
|     /** |     /** | ||||||
|      * 同步计划详情到施工产值 |      * 同步计划详情到施工产值 | ||||||
|      * |      * | ||||||
|      * @param localDate 计划日期 |      * @param startDate 开始日期 | ||||||
|  |      * @param endDate   结束日期 | ||||||
|      * @param projectId 项目id,为空同步所有项目进度计划详情 |      * @param projectId 项目id,为空同步所有项目进度计划详情 | ||||||
|      * @return 是否成功 |      * @return 是否成功 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public Boolean syncPlanDetail2ConstructionValue(LocalDate localDate, Long projectId) { |     @Transactional(rollbackFor = Exception.class) | ||||||
|         // 获取当天的计划详情 |     public Boolean syncPlanDetail2ConstructionValue(LocalDate startDate, LocalDate endDate, Long projectId) { | ||||||
|  |         // 获取范围时间内的计划详情 | ||||||
|         List<PgsProgressPlanDetail> planDetailList = this.lambdaQuery() |         List<PgsProgressPlanDetail> planDetailList = this.lambdaQuery() | ||||||
|             .eq(ObjectUtils.isNotEmpty(projectId), PgsProgressPlanDetail::getProjectId, projectId) |             .eq(ObjectUtils.isNotEmpty(projectId), PgsProgressPlanDetail::getProjectId, projectId) | ||||||
|             .eq(PgsProgressPlanDetail::getDate, localDate) |             .ge(PgsProgressPlanDetail::getDate, startDate) | ||||||
|  |             .le(PgsProgressPlanDetail::getDate, endDate) | ||||||
|  |             .ne(PgsProgressPlanDetail::getFinishedNumber, BigDecimal.ZERO) | ||||||
|  |             .eq(PgsProgressPlanDetail::getStatus, "1") | ||||||
|             .list(); |             .list(); | ||||||
|         if (CollUtil.isEmpty(planDetailList)) { |         if (CollUtil.isEmpty(planDetailList)) { | ||||||
|             return false; |             return false; | ||||||
| @ -861,44 +880,118 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla | |||||||
|                     Function.identity(), |                     Function.identity(), | ||||||
|                     (v1, v2) -> v1) |                     (v1, v2) -> v1) | ||||||
|             ); |             ); | ||||||
|  |         // 为每一个项目创建一个施工产值范围 | ||||||
|  |         Set<Long> projectIds = planDetailList.stream() | ||||||
|  |             .map(PgsProgressPlanDetail::getProjectId).collect(Collectors.toSet()); | ||||||
|  |         // 获取所有父级项目 | ||||||
|  |         List<BusProject> projectList = projectService.listByIds(projectIds); | ||||||
|  |         List<Long> allProjectIds = projectList | ||||||
|  |             .stream().map(project -> { | ||||||
|  |                 if (project.getPId() != 0L) { | ||||||
|  |                     return project.getPId(); | ||||||
|  |                 } else { | ||||||
|  |                     return project.getId(); | ||||||
|  |                 } | ||||||
|  |             }).distinct().toList(); | ||||||
|  |         // 根据项目区分 | ||||||
|  |         Map<Long, List<PgsProgressPlanDetail>> detailMap = planDetailList.stream() | ||||||
|  |             .collect(Collectors.groupingBy(PgsProgressPlanDetail::getProjectId)); | ||||||
|         List<OutConstructionValue> saveList = new ArrayList<>(); |         List<OutConstructionValue> saveList = new ArrayList<>(); | ||||||
|         for (PgsProgressPlanDetail planDetail : planDetailList) { |         LocalDate now = LocalDate.now(); | ||||||
|  |         List<PgsProgressPlanDetail> allUpdateList = new ArrayList<>(); | ||||||
|  |         List<OutConstructionValueRange> ranges = allProjectIds.stream().map(id -> { | ||||||
|  |             OutConstructionValueRange range = new OutConstructionValueRange(); | ||||||
|  |             long rangeId = IdWorker.getId(range); | ||||||
|  |             range.setId(rangeId); | ||||||
|  |             range.setProjectId(id); | ||||||
|  |             range.setStartDate(startDate); | ||||||
|  |             range.setEndDate(endDate); | ||||||
|  |             // 获取所有子项目 | ||||||
|  |             List<Long> subProject = new ArrayList<>(projectList.stream() | ||||||
|  |                 .filter(project -> Objects.equals(project.getPId(), id)) | ||||||
|  |                 .map(BusProject::getId) | ||||||
|  |                 .distinct() | ||||||
|  |                 .toList()); | ||||||
|  |             subProject.add(id); | ||||||
|  |             List<PgsProgressPlanDetail> detailList = new ArrayList<>(); | ||||||
|  |             for (Long p : subProject) { | ||||||
|  |                 List<PgsProgressPlanDetail> details = detailMap.getOrDefault(p, List.of()); | ||||||
|  |                 detailList.addAll(details); | ||||||
|  |             } | ||||||
|  |             if (CollUtil.isEmpty(detailList)) { | ||||||
|  |                 return null; | ||||||
|  |             } | ||||||
|  |             BigDecimal allConstructionValue = BigDecimal.ZERO; | ||||||
|  |             BigDecimal allOwnerValue = BigDecimal.ZERO; | ||||||
|  |             List<PgsProgressPlanDetail> updateList = new ArrayList<>(); | ||||||
|  |             for (PgsProgressPlanDetail planDetail : detailList) { | ||||||
|                 OutConstructionValue value = new OutConstructionValue(); |                 OutConstructionValue value = new OutConstructionValue(); | ||||||
|                 Long progressCategoryId = planDetail.getProgressCategoryId(); |                 Long progressCategoryId = planDetail.getProgressCategoryId(); | ||||||
|                 PgsProgressCategory category = categoryMap.get(progressCategoryId); |                 PgsProgressCategory category = categoryMap.get(progressCategoryId); | ||||||
|                 if (category == null) { |                 if (category == null) { | ||||||
|                     continue; |                     continue; | ||||||
|                 } |                 } | ||||||
|             value.setProjectId(planDetail.getProjectId()); |                 value.setProjectId(id); | ||||||
|  |                 value.setRangeId(rangeId); | ||||||
|                 value.setMatrixId(category.getMatrixId()); |                 value.setMatrixId(category.getMatrixId()); | ||||||
|                 value.setProgressCategoryId(progressCategoryId); |                 value.setProgressCategoryId(progressCategoryId); | ||||||
|  |                 value.setDetailId(planDetail.getId()); | ||||||
|                 BigDecimal finishedNumber = planDetail.getFinishedNumber(); |                 BigDecimal finishedNumber = planDetail.getFinishedNumber(); | ||||||
|                 BigDecimal aiFill = planDetail.getAiFill(); |                 BigDecimal aiFill = planDetail.getAiFill(); | ||||||
|                 // 如果完成数量为0, 则不保存 |                 // 如果完成数量为0, 则不保存 | ||||||
|             if (finishedNumber.compareTo(BigDecimal.ZERO) == 0 && aiFill.compareTo(BigDecimal.ZERO) == 0) { |                 if (finishedNumber.compareTo(BigDecimal.ZERO) == 0) { | ||||||
|                     continue; |                     continue; | ||||||
|                 } |                 } | ||||||
|             int artificialNum = finishedNumber.intValue(); |                 value.setArtificialNum(finishedNumber.subtract(aiFill).intValue()); | ||||||
|             value.setArtificialNum(artificialNum); |                 value.setUavNum(aiFill.intValue()); | ||||||
|             int uavNum = aiFill.intValue(); |  | ||||||
|             value.setUavNum(uavNum); |  | ||||||
|                 value.setPlanNum(planDetail.getPlanNumber().intValue()); |                 value.setPlanNum(planDetail.getPlanNumber().intValue()); | ||||||
|             value.setReportDate(LocalDate.now()); |                 value.setReportDate(now); | ||||||
|                 value.setPlanDate(planDetail.getDate()); |                 value.setPlanDate(planDetail.getDate()); | ||||||
|                 // 计算产值 |                 // 计算产值 | ||||||
|                 BigDecimal constructionPrice = category.getConstructionPrice(); |                 BigDecimal constructionPrice = category.getConstructionPrice(); | ||||||
|                 BigDecimal ownerPrice = category.getOwnerPrice(); |                 BigDecimal ownerPrice = category.getOwnerPrice(); | ||||||
|             value.setOutValue(constructionPrice.multiply(BigDecimal.valueOf(artificialNum)).setScale(4, RoundingMode.HALF_UP).add(constructionPrice.multiply(BigDecimal.valueOf(uavNum)).setScale(4, RoundingMode.HALF_UP))); |                 BigDecimal constructionValue = constructionPrice.multiply(finishedNumber).setScale(4, RoundingMode.HALF_UP); | ||||||
|             value.setOwnerValue(ownerPrice.multiply(BigDecimal.valueOf(artificialNum)).setScale(4, RoundingMode.HALF_UP).add(ownerPrice.multiply(BigDecimal.valueOf(uavNum)).setScale(4, RoundingMode.HALF_UP))); |                 BigDecimal ownerValue = ownerPrice.multiply(finishedNumber).setScale(4, RoundingMode.HALF_UP); | ||||||
|  |                 value.setOutValue(constructionValue); | ||||||
|  |                 value.setOwnerValue(ownerValue); | ||||||
|  |                 // 统计总产值 | ||||||
|  |                 allConstructionValue = allConstructionValue.add(constructionValue).setScale(4, RoundingMode.HALF_UP); | ||||||
|  |                 allOwnerValue = allOwnerValue.add(ownerValue).setScale(4, RoundingMode.HALF_UP); | ||||||
|  |                 // 添加需要修改状态的计划详情 | ||||||
|  |                 PgsProgressPlanDetail update = new PgsProgressPlanDetail(); | ||||||
|  |                 update.setId(planDetail.getId()); | ||||||
|  |                 update.setStatus("2"); | ||||||
|  |                 updateList.add(update); | ||||||
|                 saveList.add(value); |                 saveList.add(value); | ||||||
|             } |             } | ||||||
|  |             range.setOutValue(allConstructionValue); | ||||||
|  |             range.setOwnerValue(allOwnerValue); | ||||||
|  |             // 如果产值都为0,则不保存 | ||||||
|  |             if (allConstructionValue.compareTo(BigDecimal.ZERO) == 0 && allOwnerValue.compareTo(BigDecimal.ZERO) == 0) { | ||||||
|  |                 return null; | ||||||
|  |             } | ||||||
|  |             allUpdateList.addAll(updateList); | ||||||
|  |             return range; | ||||||
|  |         }).filter(Objects::nonNull).toList(); | ||||||
|         // 保存数据 |         // 保存数据 | ||||||
|  |         if (CollUtil.isNotEmpty(ranges)) { | ||||||
|  |             boolean saveBatch = constructionValueRangeService.saveBatch(ranges); | ||||||
|  |             if (!saveBatch) { | ||||||
|  |                 throw new ServiceException("同步计划详情到施工产值失败,数据库异常", HttpStatus.ERROR); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|         if (CollUtil.isNotEmpty(saveList)) { |         if (CollUtil.isNotEmpty(saveList)) { | ||||||
|             boolean saved = constructionValueService.saveBatch(saveList); |             boolean saved = constructionValueService.saveBatch(saveList); | ||||||
|             if (!saved) { |             if (!saved) { | ||||||
|                 throw new ServiceException("同步计划详情到施工产值失败,数据库异常", HttpStatus.ERROR); |                 throw new ServiceException("同步计划详情到施工产值失败,数据库异常", HttpStatus.ERROR); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |         if (CollUtil.isNotEmpty(allUpdateList)) { | ||||||
|  |             boolean updateBatch = this.updateBatchById(allUpdateList); | ||||||
|  |             if (!updateBatch) { | ||||||
|  |                 throw new ServiceException("同步计划详情到施工产值失败,数据库异常", HttpStatus.ERROR); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|         return true; |         return true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @ -925,10 +1018,8 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla | |||||||
|     public Boolean insertNumberDetailByAI(PgsProgressPlanDetailAINumberReq req) { |     public Boolean insertNumberDetailByAI(PgsProgressPlanDetailAINumberReq req) { | ||||||
|         String file = req.getFile(); |         String file = req.getFile(); | ||||||
|         String tif = req.getTif(); |         String tif = req.getTif(); | ||||||
| //        String fileUrl = droneBigImageProperties.getUrl() + file; |         String fileUrl = droneBigImageProperties.getUrl() + file; | ||||||
| //        String tifUrl = droneBigImageProperties.getUrl() + tif; |         String tifUrl = droneBigImageProperties.getUrl() + tif; | ||||||
|         String fileUrl = file; |  | ||||||
|         String tifUrl = tif; |  | ||||||
|         Long projectId = req.getProjectId(); |         Long projectId = req.getProjectId(); | ||||||
|         // 获取所有子项 |         // 获取所有子项 | ||||||
|         List<BusProject> projects = projectService.lambdaQuery() |         List<BusProject> projects = projectService.lambdaQuery() | ||||||
|  | |||||||
| @ -505,9 +505,6 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj | |||||||
|         } |         } | ||||||
|         // 数据校验 |         // 数据校验 | ||||||
|         validEntityBeforeSave(project, false); |         validEntityBeforeSave(project, false); | ||||||
|         // 权限校验 |  | ||||||
|         Long userId = LoginHelper.getUserId(); |  | ||||||
|         validAuth(project.getId(), userId); |  | ||||||
|         // 判断是否存在 |         // 判断是否存在 | ||||||
|         BusProject oldProject = this.getById(project.getId()); |         BusProject oldProject = this.getById(project.getId()); | ||||||
|         if (oldProject == null) { |         if (oldProject == null) { | ||||||
|  | |||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.ctr.mapper.ContractPaymentClauseMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.ctr.mapper.CtrContractAppointMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.ctr.mapper.CtrContractBillItemMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.ctr.mapper.CtrContractMainMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.ctr.mapper.CtrCooperationAgreementMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.ctr.mapper.CtrSubcontractMainMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.ctr.mapper.CtrSubcontractSealMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
| @ -0,0 +1,7 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="org.dromara.out.mapper.OutConstructionValueRangeMapper"> | ||||||
|  |  | ||||||
|  | </mapper> | ||||||
							
								
								
									
										421
									
								
								xinnengyuan/script/sql/xzd.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										421
									
								
								xinnengyuan/script/sql/xzd.sql
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,421 @@ | |||||||
|  | use xinnengyuandev; | ||||||
|  |  | ||||||
|  | drop table if exists ctr_cooperation_agreement; | ||||||
|  | create table ctr_cooperation_agreement | ||||||
|  | ( | ||||||
|  |     `id`              bigint                                   not null auto_increment comment '主键id', | ||||||
|  |     `project_id`      bigint                                   not null comment '项目id', | ||||||
|  |     `contract_code`   varchar(100)                             not null comment '合同编码', | ||||||
|  |     `contract_name`   varchar(512)                             not null comment '合同名称', | ||||||
|  |     `document_date`   date                                     not null comment '单据日期', | ||||||
|  |     `party_a`         varchar(255)                             null comment '甲方单位', | ||||||
|  |     `party_b`         varchar(255)                             null comment '乙方单位', | ||||||
|  |     `company_name`    varchar(255)                             not null comment '公司名称', | ||||||
|  |     `sign_date`       date                                     null comment '签订日期', | ||||||
|  |     `amount`          decimal(20, 4) default 0.0000            null comment '合同含税金额', | ||||||
|  |     `agreement_type`  varchar(100)                             not null comment '协议类型', | ||||||
|  |     `project_manager` varchar(100)                             null comment '项目经理', | ||||||
|  |     `start_date`      date                                     null comment '开始日期', | ||||||
|  |     `end_date`        date                                     null comment '结束日期', | ||||||
|  |     `payment_terms`   varchar(512)                             null comment '支付条款', | ||||||
|  |     `file_id`         varchar(512)                             null comment '文件id', | ||||||
|  |     `status`          varchar(16)    default 'draft'           not null comment '状态', | ||||||
|  |     `remark`          varchar(512)                             null comment '备注', | ||||||
|  |     `create_by`       bigint                                   null comment '创建者', | ||||||
|  |     `update_by`       bigint                                   null comment '更新者', | ||||||
|  |     `create_dept`     bigint                                   null comment '创建部门', | ||||||
|  |     `create_time`     datetime       default CURRENT_TIMESTAMP null comment '创建时间', | ||||||
|  |     `update_time`     datetime       default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', | ||||||
|  |     primary key (`id`) using btree, | ||||||
|  |     index `idx_project_id` (`project_id` asc) using btree comment '项目ID', | ||||||
|  |     index `idx_contract_code` (`contract_code` asc) using btree comment '合同编码' | ||||||
|  | ) comment ='合作协议'; | ||||||
|  |  | ||||||
|  | -- 菜单 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970331683156451329, '合作协议', '1958086953051795457', '1', 'cooperationAgreement', | ||||||
|  |         'ctr/cooperationAgreement/index', 1, 0, 'C', '0', '0', 'ctr:cooperationAgreement:list', '#', 103, 1, sysdate(), | ||||||
|  |         null, null, '合作协议菜单'); | ||||||
|  |  | ||||||
|  | -- 按钮 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970331683156451330, '合作协议查询', 1970331683156451329, '1', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:cooperationAgreement:query', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970331683156451331, '合作协议新增', 1970331683156451329, '2', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:cooperationAgreement:add', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970331683156451332, '合作协议修改', 1970331683156451329, '3', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:cooperationAgreement:edit', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970331683156451333, '合作协议删除', 1970331683156451329, '4', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:cooperationAgreement:remove', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970331683156451334, '合作协议导出', 1970331683156451329, '5', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:cooperationAgreement:export', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | drop table if exists ctr_contract_main; | ||||||
|  | create table ctr_contract_main | ||||||
|  | ( | ||||||
|  |     `id`               bigint                                   not null auto_increment comment '主键id', | ||||||
|  |     `project_id`       bigint                                   not null comment '项目id', | ||||||
|  |     `contract_code`    varchar(128)                             not null comment '合同编码', | ||||||
|  |     `contract_name`    varchar(255)                             not null comment '合同名称', | ||||||
|  |     `document_date`    date                                     not null comment '单据日期', | ||||||
|  |     `contract_mode`    varchar(128)                             not null comment '合同模式', | ||||||
|  |     `sign_date`        date                                     not null comment '签订日期', | ||||||
|  |     `customer_type`    varchar(128)                             not null comment '客户性质', | ||||||
|  |     `party_a`          varchar(255)                             not null comment '甲方单位', | ||||||
|  |     `contract_amount`  decimal(20, 4) default 0.0000            null comment '合同金额', | ||||||
|  |     `invoice_company`  varchar(255)                             not null comment '开票单位', | ||||||
|  |     `party_b`          varchar(255)                             not null comment '乙方单位', | ||||||
|  |     `total_invest`     decimal(20, 4) default 0.0000            not null comment '总投资额', | ||||||
|  |     `budget_category`  varchar(128)                             not null comment '预算分类', | ||||||
|  |     `receipt_company`  varchar(255)                             not null comment '收票单位', | ||||||
|  |     `archive_date`     date                                     null comment '归档日期', | ||||||
|  |     `payment_method`   varchar(128)                             not null comment '支付方式', | ||||||
|  |     `payment_terms`    varchar(512)                             null comment '支付条款', | ||||||
|  |     `project_scale`    varchar(512)                             null comment '工程规模', | ||||||
|  |     `file_id`          varchar(512)                             null comment '文件id', | ||||||
|  |     `status`           varchar(16)    default 'draft'           not null comment '状态', | ||||||
|  |     `remark`           varchar(512)                             null comment '备注', | ||||||
|  |     `seal_name`        varchar(255)                             not null comment '印章名称', | ||||||
|  |     `amount_upper`     varchar(512)                             null comment '大写合同价税合计', | ||||||
|  |     `sign_org`         varchar(255)                             not null comment '签约组织', | ||||||
|  |     `project_type`     varchar(128)                             null comment '项目类型', | ||||||
|  |     `project_category` varchar(128)                             null comment '项目大类', | ||||||
|  |     `create_by`        bigint                                   null comment '创建者', | ||||||
|  |     `update_by`        bigint                                   null comment '更新者', | ||||||
|  |     `create_dept`      bigint                                   null comment '创建部门', | ||||||
|  |     `create_time`      datetime       default CURRENT_TIMESTAMP null comment '创建时间', | ||||||
|  |     `update_time`      datetime       default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', | ||||||
|  |     primary key (`id`) using btree, | ||||||
|  |     unique key `uk_contract_code` (`contract_code`) comment '合同编码唯一', | ||||||
|  |     index `idx_project_id` (`project_id` asc) using btree comment '项目ID' | ||||||
|  | ) comment ='承包合同-基本信息表'; | ||||||
|  |  | ||||||
|  | drop table if exists ctr_contract_bill_item; | ||||||
|  | create table ctr_contract_bill_item | ||||||
|  | ( | ||||||
|  |     `id`              bigint                                   not null auto_increment comment '主键id', | ||||||
|  |     `code`            varchar(128)                             not null comment '编码', | ||||||
|  |     `contract_id`     bigint                                   not null comment '合同id', | ||||||
|  |     `item_name`       varchar(255)                             not null comment '合同清单名称', | ||||||
|  |     `unit`            varchar(50)                              not null comment '计量单位', | ||||||
|  |     `quantity`        decimal(20)    default 0                 null comment '数量', | ||||||
|  |     `unit_price_tax`  decimal(20, 4) default 0.0000            null comment '含税单价', | ||||||
|  |     `total_price_tax` decimal(20, 4) default 0.0000            null comment '价税合计', | ||||||
|  |     `amount_excl_tax` decimal(20, 4) default 0.0000            null comment '不含税金额', | ||||||
|  |     `tax_rate`        decimal(5, 2)  default 0.00              null comment '税率(%)', | ||||||
|  |     `create_by`       bigint                                   null comment '创建者', | ||||||
|  |     `update_by`       bigint                                   null comment '更新者', | ||||||
|  |     `create_dept`     bigint                                   null comment '创建部门', | ||||||
|  |     `create_time`     datetime       default CURRENT_TIMESTAMP null comment '创建时间', | ||||||
|  |     `update_time`     datetime       default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', | ||||||
|  |     primary key (`id`) using btree, | ||||||
|  |     index `idx_contract_id` (`contract_id` asc) using btree comment '合同ID' | ||||||
|  | ) comment ='承包合同-工程量清单表'; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | -- 菜单 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970377875752017921, '基本信息', '1970373019079335938', '1', 'contractMain', 'ctr/contractMain/index', 1, 0, | ||||||
|  |         'C', '0', '0', 'ctr:contractMain:list', '#', 103, 1, sysdate(), null, null, '承包合同-基本信息菜单'); | ||||||
|  |  | ||||||
|  | -- 按钮 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970377875752017922, '承包合同-基本信息查询', 1970377875752017921, '1', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractMain:query', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970377875752017923, '承包合同-基本信息新增', 1970377875752017921, '2', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractMain:add', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970377875752017924, '承包合同-基本信息修改', 1970377875752017921, '3', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractMain:edit', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970377875752017925, '承包合同-基本信息删除', 1970377875752017921, '4', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractMain:remove', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970377875752017926, '承包合同-基本信息导出', 1970377875752017921, '5', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractMain:export', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | -- 菜单 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970378640130367489, '承包合同-工程量清单', '1970377875752017921', '1', 'contractBillItem', | ||||||
|  |         'ctr/contractBillItem/index', 1, 0, 'C', '0', '0', 'ctr:contractBillItem:list', '#', 103, 1, sysdate(), null, | ||||||
|  |         null, '承包合同-工程量清单菜单'); | ||||||
|  |  | ||||||
|  | -- 按钮 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970378640130367490, '承包合同-工程量清单查询', 1970378640130367489, '1', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractBillItem:query', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970378640130367491, '承包合同-工程量清单新增', 1970378640130367489, '2', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractBillItem:add', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970378640130367492, '承包合同-工程量清单修改', 1970378640130367489, '3', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractBillItem:edit', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970378640130367493, '承包合同-工程量清单删除', 1970378640130367489, '4', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractBillItem:remove', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970378640130367494, '承包合同-工程量清单导出', 1970378640130367489, '5', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractBillItem:export', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | drop table if exists ctr_contract_appoint; | ||||||
|  | create table ctr_contract_appoint | ||||||
|  | ( | ||||||
|  |     `id`                      bigint                                   not null auto_increment comment '主键id', | ||||||
|  |     `contract_id`             bigint                                   not null comment '合同id', | ||||||
|  |     `performance_bond_type`   varchar(100)                             not null comment '履约保证金形式', | ||||||
|  |     `performance_bond_ratio`  decimal(5, 2)  default 0.00              null comment '履约保证金比例(%)', | ||||||
|  |     `performance_bond_amount` decimal(20, 4) default 0.0000            null comment '履约保证金金额(元)', | ||||||
|  |     `advance_payment_flag`    char(1)        default '0'               not null comment '是否有预收款(0否 1 是)', | ||||||
|  |     `advance_payment_ratio`   decimal(5, 2)  default 0.00              null comment '预收款比例(%)', | ||||||
|  |     `advance_payment_amount`  decimal(20, 4) default 0.0000            null comment '预收款金额(元)', | ||||||
|  |     `quality_bond_type`       varchar(100)                             not null comment '质量保证金形式', | ||||||
|  |     `quality_bond_ratio`      decimal(5, 2)  default 0.00              null comment '质量保证金比例(%)', | ||||||
|  |     `quality_bond_amount`     decimal(20, 4) default 0.0000            null comment '质量保证金金额(元)', | ||||||
|  |     `file_id`                 varchar(512)                             null comment '文件id', | ||||||
|  |     `status`                  varchar(16)    default 'draft'           not null comment '状态', | ||||||
|  |     `create_by`               bigint                                   null comment '创建者', | ||||||
|  |     `update_by`               bigint                                   null comment '更新者', | ||||||
|  |     `create_dept`             bigint                                   null comment '创建部门', | ||||||
|  |     `create_time`             datetime       default CURRENT_TIMESTAMP null comment '创建时间', | ||||||
|  |     `update_time`             datetime       default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', | ||||||
|  |     primary key (`id`) using btree, | ||||||
|  |     index `idx_contract_id` (`contract_id` asc) using btree comment '合同ID' | ||||||
|  | ) comment ='承包合同-主要条款约定'; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | -- 菜单 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970395180686131201, '承包合同-主要条款约定', '1970373019079335938', '1', 'contractAppoint', | ||||||
|  |         'ctr/contractAppoint/index', 1, 0, 'C', '0', '0', 'ctr:contractAppoint:list', '#', 103, 1, sysdate(), null, | ||||||
|  |         null, '承包合同-主要条款约定菜单'); | ||||||
|  |  | ||||||
|  | -- 按钮 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970395180686131202, '承包合同-主要条款约定查询', 1970395180686131201, '1', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractAppoint:query', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970395180686131203, '承包合同-主要条款约定新增', 1970395180686131201, '2', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractAppoint:add', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970395180686131204, '承包合同-主要条款约定修改', 1970395180686131201, '3', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractAppoint:edit', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970395180686131205, '承包合同-主要条款约定删除', 1970395180686131201, '4', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractAppoint:remove', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970395180686131206, '承包合同-主要条款约定导出', 1970395180686131201, '5', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:contractAppoint:export', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | drop table if exists contract_payment_clause; | ||||||
|  | create table contract_payment_clause | ||||||
|  | ( | ||||||
|  |     `id`                  bigint                                   not null auto_increment comment '主键id', | ||||||
|  |     `contract_id`         bigint                                   not null comment '合同id', | ||||||
|  |     `clause_type`         varchar(128)                             null comment '类型', | ||||||
|  |     `settlement_cycle`    varchar(128)                             null comment '结算周期', | ||||||
|  |     `settlement_age_days` int                                      null comment '结算账龄(天)', | ||||||
|  |     `milestone`           varchar(1024)                            null comment '里程碑节点', | ||||||
|  |     `select_value`        varchar(255)                             null comment '选择值', | ||||||
|  |     `comparator`          varchar(50)                              null comment '比较符', | ||||||
|  |     `compare_value`       varchar(255)                             null comment '比较值', | ||||||
|  |     `receipt_age_days`    int                                      null comment '收款账龄(天)', | ||||||
|  |     `receipt_base`        decimal(20, 4) default 0.0000            null comment '收款基数', | ||||||
|  |     `receipt_ratio`       decimal(5, 2)  default 0.00              null comment '收款比例(%)', | ||||||
|  |     `file_id`             varchar(512)                             null comment '文件id', | ||||||
|  |     `status`              varchar(16)    default 'draft'           not null comment '状态', | ||||||
|  |     `remark`              varchar(512)                             null comment '备注/补充说明', | ||||||
|  |     `create_by`           bigint                                   null comment '创建者', | ||||||
|  |     `update_by`           bigint                                   null comment '更新者', | ||||||
|  |     `create_dept`         bigint                                   null comment '创建部门', | ||||||
|  |     `create_time`         datetime       default CURRENT_TIMESTAMP null comment '创建时间', | ||||||
|  |     `update_time`         datetime       default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', | ||||||
|  |     primary key (`id`) using btree, | ||||||
|  |     index `idx_contract_id` (`contract_id` asc) using btree comment '合同ID索引' | ||||||
|  | ) comment ='承包合同-支付条款'; | ||||||
|  |  | ||||||
|  | -- 菜单 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970681637725093889, '支付条款', '1970373019079335938', '1', 'paymentClause', 'ctr/paymentClause/index', 1, 0, | ||||||
|  |         'C', '0', '0', 'ctr:paymentClause:list', '#', 103, 1, sysdate(), null, null, '支付条款菜单'); | ||||||
|  |  | ||||||
|  | -- 按钮 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970681637725093890, '支付条款查询', 1970681637725093889, '1', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:paymentClause:query', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970681637725093891, '支付条款新增', 1970681637725093889, '2', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:paymentClause:add', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970681637725093892, '支付条款修改', 1970681637725093889, '3', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:paymentClause:edit', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970681637725093893, '支付条款删除', 1970681637725093889, '4', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:paymentClause:remove', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, | ||||||
|  |                       status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values (1970681637725093894, '支付条款导出', 1970681637725093889, '5', '#', '', 1, 0, 'F', '0', '0', | ||||||
|  |         'ctr:paymentClause:export', '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | drop table if exists ctr_subcontract_main; | ||||||
|  | create table ctr_subcontract_main | ||||||
|  | ( | ||||||
|  |     `id`                     bigint                                   not null auto_increment comment '主键id', | ||||||
|  |     `project_id`             bigint                                   not null comment '项目id', | ||||||
|  |     `contract_code`          varchar(100)                             not null comment '合同编码', | ||||||
|  |     `contract_name`          varchar(255)                             not null comment '合同名称', | ||||||
|  |     `document_date`          date                                     not null comment '单据日期', | ||||||
|  |     `contract_type`          varchar(100)                             not null comment '合同类型', | ||||||
|  |     `business_mode`          varchar(100)                             null comment '经营模式', | ||||||
|  |     `original_amount`        decimal(20, 4) default 0.0000            null comment '原合同造价', | ||||||
|  |     `sign_date`              date                                     null comment '签订日期', | ||||||
|  |     `party_a`                varchar(255)                             not null comment '甲方单位', | ||||||
|  |     `party_b`                varchar(255)                             not null comment '乙方单位', | ||||||
|  |     `amount_incl_tax`        decimal(20, 4) default 0.0000            null comment '含税合同金额', | ||||||
|  |     `contract_status`        varchar(100)                             null comment '合同状态', | ||||||
|  |     `cumulative_change_amt`  decimal(20, 4) default 0.0000            null comment '累计变更金额', | ||||||
|  |     `manage_org`             varchar(255)                             null comment '管理组织', | ||||||
|  |     `executive_manager`      varchar(100)                             null comment '执行项目经理', | ||||||
|  |     `invoice_unit`           varchar(255)                             not null comment '开票单位', | ||||||
|  |     `receipt_unit`           varchar(255)                             not null comment '收票单位', | ||||||
|  |     `archive_date`           date                                     null comment '归档日期', | ||||||
|  |     `target_cost`            decimal(20, 4) default 0.0000            null comment '目标成本', | ||||||
|  |     `available_target_cost`  decimal(20, 4) default 0.0000            null comment '可用目标成本', | ||||||
|  |     `has_seal`               char(1)        default '0'               null comment '是否用印(0-否,1-是)', | ||||||
|  |     `warning`                varchar(512)                             null comment '警示', | ||||||
|  |     `payment_terms`          text                                     null comment '支付条款', | ||||||
|  |     `file_id`                varchar(512)                             null comment '文件id', | ||||||
|  |     `status`                 varchar(16)    default 'draft'           not null comment '状态', | ||||||
|  |     `remark`                 varchar(512)                             null comment '备注', | ||||||
|  |     `amount_in_words`        varchar(500)                             null comment '大写合同价税合计', | ||||||
|  |     `sign_org`               varchar(255)                             null comment '签约组织', | ||||||
|  |     `project_type`           varchar(100)                             null comment '项目类型', | ||||||
|  |     `project_category`       varchar(100)                             null comment '项目大项', | ||||||
|  |     `limit_pay`              char(1)        default '0'               null comment '付款额不能超合同额(0-否,1-是)', | ||||||
|  |     `limit_settlement`       char(1)        default '0'               null comment '预结算/结算额不能超合同额(0-否,1-是)', | ||||||
|  |     `limit_pay_ratio`        decimal(5, 2)  default 0.00              null comment '付款额不能超合同额比例', | ||||||
|  |     `limit_settlement_ratio` decimal(5, 2)  default 0.00              null comment '预结算/结算额不能超合同额比例', | ||||||
|  |     `create_by`              bigint                                   null comment '创建者', | ||||||
|  |     `update_by`              bigint                                   null comment '更新者', | ||||||
|  |     `create_dept`            bigint                                   null comment '创建部门', | ||||||
|  |     `create_time`            datetime       default CURRENT_TIMESTAMP null comment '创建时间', | ||||||
|  |     `update_time`            datetime       default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', | ||||||
|  |     primary key (`id`) using btree, | ||||||
|  |     index `idx_project_id` (`project_id` asc) using btree comment '项目ID索引' | ||||||
|  | ) comment ='分包合同-主要信息'; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | drop table if exists ctr_subcontract_seal; | ||||||
|  | create table ctr_subcontract_seal | ||||||
|  | ( | ||||||
|  |     `id`             bigint                                not null auto_increment comment '主键id', | ||||||
|  |     `subcontract_id` bigint                                not null comment '分包合同id', | ||||||
|  |     `seal_name`      varchar(512)                          not null comment '印章名称', | ||||||
|  |     `seal_count`     int         default 0                 not null comment '用印次数', | ||||||
|  |     `file_id`        varchar(512)                          null comment '文件id', | ||||||
|  |     `status`         varchar(16) default 'draft'           not null comment '状态', | ||||||
|  |     `remark`         varchar(512)                          null comment '备注', | ||||||
|  |     `create_by`      bigint                                null comment '创建者', | ||||||
|  |     `update_by`      bigint                                null comment '更新者', | ||||||
|  |     `create_dept`    bigint                                null comment '创建部门', | ||||||
|  |     `create_time`    datetime    default CURRENT_TIMESTAMP null comment '创建时间', | ||||||
|  |     `update_time`    datetime    default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间', | ||||||
|  |     primary key (`id`) using btree, | ||||||
|  |     index `idx_subcontract_id` (`subcontract_id` asc) using btree comment '分包合同ID索引' | ||||||
|  | ) comment ='分包合同-印章信息'; | ||||||
|  |  | ||||||
|  | -- 菜单 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692582274809858, '主要信息', '1970690857740615681', '1', 'subcontractMain', 'ctr/subcontractMain/index', 1, 0, 'C', '0', '0', 'ctr:subcontractMain:list', '#', 103, 1, sysdate(), null, null, '主要信息菜单'); | ||||||
|  |  | ||||||
|  | -- 按钮 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692582274809859, '主要信息查询', 1970692582274809858, '1',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractMain:query',        '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692582274809860, '主要信息新增', 1970692582274809858, '2',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractMain:add',          '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692582274809861, '主要信息修改', 1970692582274809858, '3',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractMain:edit',         '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692582274809862, '主要信息删除', 1970692582274809858, '4',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractMain:remove',       '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692582274809863, '主要信息导出', 1970692582274809858, '5',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractMain:export',       '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | -- 菜单 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692923594686465, '印章信息', '1970692582274809858', '1', 'subcontractSeal', 'ctr/subcontractSeal/index', 1, 0, 'C', '0', '0', 'ctr:subcontractSeal:list', '#', 103, 1, sysdate(), null, null, '印章信息菜单'); | ||||||
|  |  | ||||||
|  | -- 按钮 SQL | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692923594686466, '印章信息查询', 1970692923594686465, '1',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractSeal:query',        '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692923594686467, '印章信息新增', 1970692923594686465, '2',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractSeal:add',          '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692923594686468, '印章信息修改', 1970692923594686465, '3',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractSeal:edit',         '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692923594686469, '印章信息删除', 1970692923594686465, '4',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractSeal:remove',       '#', 103, 1, sysdate(), null, null, ''); | ||||||
|  |  | ||||||
|  | insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) | ||||||
|  | values(1970692923594686470, '印章信息导出', 1970692923594686465, '5',  '#', '', 1, 0, 'F', '0', '0', 'ctr:subcontractSeal:export',       '#', 103, 1, sysdate(), null, null, ''); | ||||||
		Reference in New Issue
	
	Block a user