10-15-方案选择帮助,印章帮助,预算分类
This commit is contained in:
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.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.xzd.domain.vo.XzdBudgetClassificationVo;
|
||||
import org.dromara.xzd.domain.bo.XzdBudgetClassificationBo;
|
||||
import org.dromara.xzd.service.IXzdBudgetClassificationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 预算分类
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/budgetClassification")
|
||||
public class XzdBudgetClassificationController extends BaseController {
|
||||
|
||||
private final IXzdBudgetClassificationService xzdBudgetClassificationService;
|
||||
|
||||
/**
|
||||
* 查询预算分类列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:budgetClassification:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdBudgetClassificationVo> list(XzdBudgetClassificationBo bo, PageQuery pageQuery) {
|
||||
return xzdBudgetClassificationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出预算分类列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:budgetClassification:export")
|
||||
@Log(title = "预算分类", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdBudgetClassificationBo bo, HttpServletResponse response) {
|
||||
List<XzdBudgetClassificationVo> list = xzdBudgetClassificationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "预算分类", XzdBudgetClassificationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取预算分类详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xzd:budgetClassification:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdBudgetClassificationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdBudgetClassificationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预算分类
|
||||
*/
|
||||
@SaCheckPermission("xzd:budgetClassification:add")
|
||||
@Log(title = "预算分类", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdBudgetClassificationBo bo) {
|
||||
return toAjax(xzdBudgetClassificationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改预算分类
|
||||
*/
|
||||
@SaCheckPermission("xzd:budgetClassification:edit")
|
||||
@Log(title = "预算分类", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdBudgetClassificationBo bo) {
|
||||
return toAjax(xzdBudgetClassificationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除预算分类
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xzd:budgetClassification:remove")
|
||||
@Log(title = "预算分类", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdBudgetClassificationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.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.xzd.domain.vo.XzdContractProgressSettlementVo;
|
||||
import org.dromara.xzd.domain.bo.XzdContractProgressSettlementBo;
|
||||
import org.dromara.xzd.service.IXzdContractProgressSettlementService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 承包合同进度结算
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/contractProgressSettlement")
|
||||
public class XzdContractProgressSettlementController extends BaseController {
|
||||
|
||||
private final IXzdContractProgressSettlementService xzdContractProgressSettlementService;
|
||||
|
||||
/**
|
||||
* 查询承包合同进度结算列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractProgressSettlement:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdContractProgressSettlementVo> list(XzdContractProgressSettlementBo bo, PageQuery pageQuery) {
|
||||
return xzdContractProgressSettlementService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出承包合同进度结算列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractProgressSettlement:export")
|
||||
@Log(title = "承包合同进度结算", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdContractProgressSettlementBo bo, HttpServletResponse response) {
|
||||
List<XzdContractProgressSettlementVo> list = xzdContractProgressSettlementService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "承包合同进度结算", XzdContractProgressSettlementVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取承包合同进度结算详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractProgressSettlement:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdContractProgressSettlementVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdContractProgressSettlementService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增承包合同进度结算
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractProgressSettlement:add")
|
||||
@Log(title = "承包合同进度结算", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdContractProgressSettlementBo bo) {
|
||||
return toAjax(xzdContractProgressSettlementService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改承包合同进度结算
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractProgressSettlement:edit")
|
||||
@Log(title = "承包合同进度结算", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdContractProgressSettlementBo bo) {
|
||||
return toAjax(xzdContractProgressSettlementService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除承包合同进度结算
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractProgressSettlement:remove")
|
||||
@Log(title = "承包合同进度结算", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdContractProgressSettlementService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.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.xzd.domain.vo.XzdSolutionSelectionVo;
|
||||
import org.dromara.xzd.domain.bo.XzdSolutionSelectionBo;
|
||||
import org.dromara.xzd.service.IXzdSolutionSelectionService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 方案选择帮助
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/solutionSelection")
|
||||
public class XzdSolutionSelectionController extends BaseController {
|
||||
|
||||
private final IXzdSolutionSelectionService xzdSolutionSelectionService;
|
||||
|
||||
/**
|
||||
* 查询方案选择帮助列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:solutionSelection:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdSolutionSelectionVo> list(XzdSolutionSelectionBo bo, PageQuery pageQuery) {
|
||||
return xzdSolutionSelectionService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出方案选择帮助列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:solutionSelection:export")
|
||||
@Log(title = "方案选择帮助", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdSolutionSelectionBo bo, HttpServletResponse response) {
|
||||
List<XzdSolutionSelectionVo> list = xzdSolutionSelectionService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "方案选择帮助", XzdSolutionSelectionVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取方案选择帮助详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xzd:solutionSelection:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdSolutionSelectionVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdSolutionSelectionService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增方案选择帮助
|
||||
*/
|
||||
@SaCheckPermission("xzd:solutionSelection:add")
|
||||
@Log(title = "方案选择帮助", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdSolutionSelectionBo bo) {
|
||||
return toAjax(xzdSolutionSelectionService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改方案选择帮助
|
||||
*/
|
||||
@SaCheckPermission("xzd:solutionSelection:edit")
|
||||
@Log(title = "方案选择帮助", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdSolutionSelectionBo bo) {
|
||||
return toAjax(xzdSolutionSelectionService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除方案选择帮助
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xzd:solutionSelection:remove")
|
||||
@Log(title = "方案选择帮助", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdSolutionSelectionService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package org.dromara.xzd.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 预算分类对象 xzd_budget_classification
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_budget_classification")
|
||||
public class XzdBudgetClassification extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 预算分类编码
|
||||
*/
|
||||
private String budgetClassCode;
|
||||
|
||||
/**
|
||||
* 预算分类名称
|
||||
*/
|
||||
private String budgetClassName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package org.dromara.xzd.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 承包合同变更-印章中间对象 xzd_business_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_business_change")
|
||||
public class XzdBusinessChange extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 绑定id
|
||||
*/
|
||||
private Long contractChangeId;
|
||||
|
||||
/**
|
||||
* 印章id
|
||||
*/
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 印章名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String sealName;
|
||||
|
||||
/**
|
||||
* 使用次数
|
||||
*/
|
||||
private Long count;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,208 @@
|
||||
package org.dromara.xzd.domain;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 承包合同进度结算对象 xzd_contract_progress_settlement
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_contract_progress_settlement")
|
||||
public class XzdContractProgressSettlement extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 方案id
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
private Date settlementDate;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
private Long contractId;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 审批金额
|
||||
*/
|
||||
private Long approvalAmount;
|
||||
|
||||
/**
|
||||
* 统计周期
|
||||
*/
|
||||
private Long contractProgressId;
|
||||
|
||||
/**
|
||||
* 计量开始日期
|
||||
*/
|
||||
private Date meterageDateBegin;
|
||||
|
||||
/**
|
||||
* 计量结束日期
|
||||
*/
|
||||
private Date meterageDateEnd;
|
||||
|
||||
/**
|
||||
* 结算单位(客户)
|
||||
*/
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 本期结算金额
|
||||
*/
|
||||
private Long settlementMoney;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
private Long deductionMoney;
|
||||
|
||||
/**
|
||||
* 累计扣款金额
|
||||
*/
|
||||
private Long deductionMoneyAll;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
private Long bonus;
|
||||
|
||||
/**
|
||||
* 累计奖励金额
|
||||
*/
|
||||
private Long bonusAll;
|
||||
|
||||
/**
|
||||
* 累计收款金额
|
||||
*/
|
||||
private Long payableAll;
|
||||
|
||||
/**
|
||||
* 累计收款占比
|
||||
*/
|
||||
private Long payableAllShare;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private Long contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)
|
||||
*/
|
||||
private Long settlementMoneyAllExclude;
|
||||
|
||||
/**
|
||||
* 累计结算金额(包含本期)
|
||||
*/
|
||||
private Long settlementMoneyAllInclude;
|
||||
|
||||
/**
|
||||
* 本次结算比例
|
||||
*/
|
||||
private Long thisSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)
|
||||
*/
|
||||
private Long settlementRatioExclude;
|
||||
|
||||
/**
|
||||
* 截至本期结算比例
|
||||
*/
|
||||
private Long settlementRatioNow;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private Long paymentTerms;
|
||||
|
||||
/**
|
||||
* 是否用印(是,否)
|
||||
*/
|
||||
private String useSeal;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否实时刷新(是,否)
|
||||
*/
|
||||
private String refresh;
|
||||
|
||||
/**
|
||||
* 合同含税金额
|
||||
*/
|
||||
private Long contractAmountInclude;
|
||||
|
||||
/**
|
||||
* 合同不含税金额
|
||||
*/
|
||||
private Long contractAmountExclude;
|
||||
|
||||
/**
|
||||
* 多文件逗号分隔
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package org.dromara.xzd.domain.bo;
|
||||
|
||||
import org.dromara.xzd.domain.XzdBudgetClassification;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 预算分类业务对象 xzd_budget_classification
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdBudgetClassification.class, reverseConvertGenerate = false)
|
||||
public class XzdBudgetClassificationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 预算分类编码
|
||||
*/
|
||||
@NotBlank(message = "预算分类编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String budgetClassCode;
|
||||
|
||||
/**
|
||||
* 预算分类名称
|
||||
*/
|
||||
@NotBlank(message = "预算分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String budgetClassName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package org.dromara.xzd.domain.bo;
|
||||
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 承包合同变更-印章中间业务对象 xzd_business_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdBusinessChange.class, reverseConvertGenerate = false)
|
||||
public class XzdBusinessChangeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 变更id
|
||||
*/
|
||||
private Long contractChangeId;
|
||||
|
||||
/**
|
||||
* 印章id
|
||||
*/
|
||||
@NotNull(message = "印章id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 使用次数
|
||||
*/
|
||||
private Long count;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
package org.dromara.xzd.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractChange;
|
||||
import org.dromara.xzd.domain.*;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
@ -10,8 +9,6 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.vo.XzdContractAdvanceInfoVo;
|
||||
import org.dromara.xzd.domain.vo.XzdContractClauseVo;
|
||||
import org.dromara.xzd.domain.vo.XzdDeductionItemsVo;
|
||||
@ -40,7 +37,7 @@ public class XzdContractChangeBo extends BaseEntity {
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
@ -57,10 +54,10 @@ public class XzdContractChangeBo extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
//
|
||||
// /**
|
||||
// * 所属部门
|
||||
// */
|
||||
// private Long deptId;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
@ -217,4 +214,9 @@ public class XzdContractChangeBo extends BaseEntity {
|
||||
*/
|
||||
private List<XzdContractClause> htkx;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,232 @@
|
||||
package org.dromara.xzd.domain.bo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractProgressSettlement;
|
||||
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 org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 承包合同进度结算业务对象 xzd_contract_progress_settlement
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdContractProgressSettlement.class, reverseConvertGenerate = false)
|
||||
public class XzdContractProgressSettlementBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 方案id
|
||||
*/
|
||||
@NotNull(message = "方案id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@NotNull(message = "所属部门不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotNull(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
@NotNull(message = "结算日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date settlementDate;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
@NotNull(message = "合同id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long contractId;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 审批金额
|
||||
*/
|
||||
@NotNull(message = "审批金额不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal approvalAmount;
|
||||
|
||||
/**
|
||||
* 统计周期
|
||||
*/
|
||||
private Long contractProgressId;
|
||||
|
||||
/**
|
||||
* 计量开始日期
|
||||
*/
|
||||
@NotNull(message = "计量开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date meterageDateBegin;
|
||||
|
||||
/**
|
||||
* 计量结束日期
|
||||
*/
|
||||
@NotNull(message = "计量结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date meterageDateEnd;
|
||||
|
||||
/**
|
||||
* 结算单位(客户)
|
||||
*/
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 本期结算金额
|
||||
*/
|
||||
private BigDecimal settlementMoney;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
private BigDecimal deductionMoney;
|
||||
|
||||
/**
|
||||
* 累计扣款金额
|
||||
*/
|
||||
private BigDecimal deductionMoneyAll;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
private BigDecimal bonus;
|
||||
|
||||
/**
|
||||
* 累计奖励金额
|
||||
*/
|
||||
private BigDecimal bonusAll;
|
||||
|
||||
/**
|
||||
* 累计收款金额
|
||||
*/
|
||||
private BigDecimal payableAll;
|
||||
|
||||
/**
|
||||
* 累计收款占比
|
||||
*/
|
||||
private BigDecimal payableAllShare;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)
|
||||
*/
|
||||
private BigDecimal settlementMoneyAllExclude;
|
||||
|
||||
/**
|
||||
* 累计结算金额(包含本期)
|
||||
*/
|
||||
private BigDecimal settlementMoneyAllInclude;
|
||||
|
||||
/**
|
||||
* 本次结算比例
|
||||
*/
|
||||
private BigDecimal thisSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)
|
||||
*/
|
||||
private BigDecimal settlementRatioExclude;
|
||||
|
||||
/**
|
||||
* 截至本期结算比例
|
||||
*/
|
||||
private BigDecimal settlementRatioNow;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private Long paymentTerms;
|
||||
|
||||
/**
|
||||
* 是否用印(是,否)
|
||||
*/
|
||||
private String useSeal;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否实时刷新(是,否)
|
||||
*/
|
||||
private String refresh;
|
||||
|
||||
/**
|
||||
* 合同含税金额
|
||||
*/
|
||||
private BigDecimal contractAmountInclude;
|
||||
|
||||
/**
|
||||
* 合同不含税金额
|
||||
*/
|
||||
private BigDecimal contractAmountExclude;
|
||||
|
||||
/**
|
||||
* 多文件逗号分隔
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
private Date beginCreateTime;
|
||||
|
||||
private Date endCreateTime;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
}
|
||||
@ -32,7 +32,7 @@ public class XzdContractTerminationBo extends BaseEntity {
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
package org.dromara.xzd.domain.vo;
|
||||
|
||||
import org.dromara.xzd.domain.XzdBudgetClassification;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 预算分类视图对象 xzd_budget_classification
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdBudgetClassification.class)
|
||||
public class XzdBudgetClassificationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 预算分类编码
|
||||
*/
|
||||
@ExcelProperty(value = "预算分类编码")
|
||||
private String budgetClassCode;
|
||||
|
||||
/**
|
||||
* 预算分类名称
|
||||
*/
|
||||
@ExcelProperty(value = "预算分类名称")
|
||||
private String budgetClassName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package org.dromara.xzd.domain.vo;
|
||||
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 承包合同变更-印章中间视图对象 xzd_business_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdBusinessChange.class)
|
||||
public class XzdBusinessChangeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 绑定id
|
||||
*/
|
||||
@ExcelProperty(value = "变更id")
|
||||
private Long contractChangeId;
|
||||
|
||||
/**
|
||||
* 绑定名称
|
||||
*/
|
||||
private String contractChangeName;
|
||||
|
||||
/**
|
||||
* 印章id
|
||||
*/
|
||||
@ExcelProperty(value = "印章id")
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 印章名称
|
||||
*/
|
||||
private String businessName;
|
||||
|
||||
/**
|
||||
* 使用次数
|
||||
*/
|
||||
@ExcelProperty(value = "使用次数")
|
||||
private Long count;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@ -4,16 +4,13 @@ import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractChange;
|
||||
import org.dromara.xzd.domain.*;
|
||||
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 org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -61,11 +58,11 @@ public class XzdContractChangeVo implements Serializable {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
// /**
|
||||
// * 所属部门
|
||||
// */
|
||||
// @ExcelProperty(value = "所属部门")
|
||||
// private Long deptId;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ExcelProperty(value = "所属部门")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
@ -288,4 +285,9 @@ public class XzdContractChangeVo implements Serializable {
|
||||
*/
|
||||
private List<XzdContractClause> htkx;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
}
|
||||
|
||||
@ -152,6 +152,11 @@ public class XzdContractDetailsVo implements Serializable {
|
||||
@ExcelProperty(value = "预算分类")
|
||||
private Long budgetClassification;
|
||||
|
||||
/**
|
||||
* 预算分类对象
|
||||
*/
|
||||
private XzdBudgetClassification budgetClassificationObj;
|
||||
|
||||
/**
|
||||
* 收票单位
|
||||
*/
|
||||
|
||||
@ -0,0 +1,286 @@
|
||||
package org.dromara.xzd.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractProgressSettlement;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 承包合同进度结算视图对象 xzd_contract_progress_settlement
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdContractProgressSettlement.class)
|
||||
public class XzdContractProgressSettlementVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 方案id
|
||||
*/
|
||||
@ExcelProperty(value = "方案id")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 方案名称
|
||||
*/
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ExcelProperty(value = "所属部门")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
@ExcelProperty(value = "结算日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date settlementDate;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
@ExcelProperty(value = "合同id")
|
||||
private Long contractId;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 审批金额
|
||||
*/
|
||||
@ExcelProperty(value = "审批金额")
|
||||
private BigDecimal approvalAmount;
|
||||
|
||||
/**
|
||||
* 统计周期
|
||||
*/
|
||||
@ExcelProperty(value = "统计周期")
|
||||
private Long contractProgressId;
|
||||
|
||||
/**
|
||||
* 统计周期名称
|
||||
*/
|
||||
private String contractProgressName;
|
||||
|
||||
/**
|
||||
* 计量开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "计量开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date meterageDateBegin;
|
||||
|
||||
/**
|
||||
* 计量结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "计量结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date meterageDateEnd;
|
||||
|
||||
/**
|
||||
* 结算单位(客户)
|
||||
*/
|
||||
@ExcelProperty(value = "结算单位(客户)")
|
||||
private Long settlementUnit;
|
||||
|
||||
/**
|
||||
* 结算单位名称
|
||||
*/
|
||||
private String settlementUnitName;
|
||||
|
||||
/**
|
||||
* 本期结算金额
|
||||
*/
|
||||
@ExcelProperty(value = "本期结算金额")
|
||||
private BigDecimal settlementMoney;
|
||||
|
||||
/**
|
||||
* 本期扣款金额
|
||||
*/
|
||||
@ExcelProperty(value = "本期扣款金额")
|
||||
private BigDecimal deductionMoney;
|
||||
|
||||
/**
|
||||
* 累计扣款金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计扣款金额")
|
||||
private BigDecimal deductionMoneyAll;
|
||||
|
||||
/**
|
||||
* 本期奖励金额
|
||||
*/
|
||||
@ExcelProperty(value = "本期奖励金额")
|
||||
private BigDecimal bonus;
|
||||
|
||||
/**
|
||||
* 累计奖励金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计奖励金额")
|
||||
private BigDecimal bonusAll;
|
||||
|
||||
/**
|
||||
* 累计收款金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计收款金额")
|
||||
private BigDecimal payableAll;
|
||||
|
||||
/**
|
||||
* 累计收款占比
|
||||
*/
|
||||
@ExcelProperty(value = "累计收款占比")
|
||||
private BigDecimal payableAllShare;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同金额")
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额(不含本期)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额(不含本期)")
|
||||
private BigDecimal settlementMoneyAllExclude;
|
||||
|
||||
/**
|
||||
* 累计结算金额(包含本期)
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额(包含本期)")
|
||||
private BigDecimal settlementMoneyAllInclude;
|
||||
|
||||
/**
|
||||
* 本次结算比例
|
||||
*/
|
||||
@ExcelProperty(value = "本次结算比例")
|
||||
private BigDecimal thisSettlementRatio;
|
||||
|
||||
/**
|
||||
* 已结算比例(不含本期)
|
||||
*/
|
||||
@ExcelProperty(value = "已结算比例(不含本期)")
|
||||
private BigDecimal settlementRatioExclude;
|
||||
|
||||
/**
|
||||
* 截至本期结算比例
|
||||
*/
|
||||
@ExcelProperty(value = "截至本期结算比例")
|
||||
private BigDecimal settlementRatioNow;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
@ExcelProperty(value = "支付条款")
|
||||
private Long paymentTerms;
|
||||
|
||||
/**
|
||||
* 支付条款名称
|
||||
*/
|
||||
private String paymentTermsName;
|
||||
|
||||
/**
|
||||
* 是否用印(是,否)
|
||||
*/
|
||||
@ExcelProperty(value = "是否用印(是,否)")
|
||||
private String useSeal;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否实时刷新(是,否)
|
||||
*/
|
||||
@ExcelProperty(value = "是否实时刷新(是,否)")
|
||||
private String refresh;
|
||||
|
||||
/**
|
||||
* 合同含税金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同含税金额")
|
||||
private BigDecimal contractAmountInclude;
|
||||
|
||||
/**
|
||||
* 合同不含税金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同不含税金额")
|
||||
private BigDecimal contractAmountExclude;
|
||||
|
||||
/**
|
||||
* 多文件逗号分隔
|
||||
*/
|
||||
@ExcelProperty(value = "多文件逗号分隔")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.mapper;
|
||||
|
||||
import org.dromara.xzd.domain.XzdBudgetClassification;
|
||||
import org.dromara.xzd.domain.vo.XzdBudgetClassificationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 预算分类Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
public interface XzdBudgetClassificationMapper extends BaseMapperPlus<XzdBudgetClassification, XzdBudgetClassificationVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.mapper;
|
||||
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessChangeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 承包合同变更-印章中间Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface XzdBusinessChangeMapper extends BaseMapperPlus<XzdBusinessChange, XzdBusinessChangeVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.mapper;
|
||||
|
||||
import org.dromara.xzd.domain.XzdContractProgressSettlement;
|
||||
import org.dromara.xzd.domain.vo.XzdContractProgressSettlementVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 承包合同进度结算Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface XzdContractProgressSettlementMapper extends BaseMapperPlus<XzdContractProgressSettlement, XzdContractProgressSettlementVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.service;
|
||||
|
||||
import org.dromara.xzd.domain.vo.XzdBudgetClassificationVo;
|
||||
import org.dromara.xzd.domain.bo.XzdBudgetClassificationBo;
|
||||
import org.dromara.xzd.domain.XzdBudgetClassification;
|
||||
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 Lion Li
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
public interface IXzdBudgetClassificationService extends IService<XzdBudgetClassification>{
|
||||
|
||||
/**
|
||||
* 查询预算分类
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 预算分类
|
||||
*/
|
||||
XzdBudgetClassificationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询预算分类列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 预算分类分页列表
|
||||
*/
|
||||
TableDataInfo<XzdBudgetClassificationVo> queryPageList(XzdBudgetClassificationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的预算分类列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 预算分类列表
|
||||
*/
|
||||
List<XzdBudgetClassificationVo> queryList(XzdBudgetClassificationBo bo);
|
||||
|
||||
/**
|
||||
* 新增预算分类
|
||||
*
|
||||
* @param bo 预算分类
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdBudgetClassificationBo bo);
|
||||
|
||||
/**
|
||||
* 修改预算分类
|
||||
*
|
||||
* @param bo 预算分类
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdBudgetClassificationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除预算分类信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.service;
|
||||
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessChangeVo;
|
||||
import org.dromara.xzd.domain.bo.XzdBusinessChangeBo;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
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 Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IXzdBusinessChangeService extends IService<XzdBusinessChange>{
|
||||
|
||||
/**
|
||||
* 查询承包合同变更-印章中间
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同变更-印章中间
|
||||
*/
|
||||
XzdBusinessChangeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询承包合同变更-印章中间列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同变更-印章中间分页列表
|
||||
*/
|
||||
TableDataInfo<XzdBusinessChangeVo> queryPageList(XzdBusinessChangeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同变更-印章中间列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同变更-印章中间列表
|
||||
*/
|
||||
List<XzdBusinessChangeVo> queryList(XzdBusinessChangeBo bo);
|
||||
|
||||
/**
|
||||
* 新增承包合同变更-印章中间
|
||||
*
|
||||
* @param bo 承包合同变更-印章中间
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdBusinessChangeBo bo);
|
||||
|
||||
/**
|
||||
* 修改承包合同变更-印章中间
|
||||
*
|
||||
* @param bo 承包合同变更-印章中间
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdBusinessChangeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除承包合同变更-印章中间信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.service;
|
||||
|
||||
import org.dromara.xzd.domain.vo.XzdContractProgressSettlementVo;
|
||||
import org.dromara.xzd.domain.bo.XzdContractProgressSettlementBo;
|
||||
import org.dromara.xzd.domain.XzdContractProgressSettlement;
|
||||
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 Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IXzdContractProgressSettlementService extends IService<XzdContractProgressSettlement>{
|
||||
|
||||
/**
|
||||
* 查询承包合同进度结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同进度结算
|
||||
*/
|
||||
XzdContractProgressSettlementVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询承包合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同进度结算分页列表
|
||||
*/
|
||||
TableDataInfo<XzdContractProgressSettlementVo> queryPageList(XzdContractProgressSettlementBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同进度结算列表
|
||||
*/
|
||||
List<XzdContractProgressSettlementVo> queryList(XzdContractProgressSettlementBo bo);
|
||||
|
||||
/**
|
||||
* 新增承包合同进度结算
|
||||
*
|
||||
* @param bo 承包合同进度结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdContractProgressSettlementBo bo);
|
||||
|
||||
/**
|
||||
* 修改承包合同进度结算
|
||||
*
|
||||
* @param bo 承包合同进度结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdContractProgressSettlementBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除承包合同进度结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
package org.dromara.xzd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.domain.bo.XzdBudgetClassificationBo;
|
||||
import org.dromara.xzd.domain.vo.XzdBudgetClassificationVo;
|
||||
import org.dromara.xzd.domain.XzdBudgetClassification;
|
||||
import org.dromara.xzd.mapper.XzdBudgetClassificationMapper;
|
||||
import org.dromara.xzd.service.IXzdBudgetClassificationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 预算分类Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-15
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdBudgetClassificationServiceImpl extends ServiceImpl<XzdBudgetClassificationMapper, XzdBudgetClassification> implements IXzdBudgetClassificationService {
|
||||
|
||||
private final XzdBudgetClassificationMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询预算分类
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 预算分类
|
||||
*/
|
||||
@Override
|
||||
public XzdBudgetClassificationVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询预算分类列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 预算分类分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdBudgetClassificationVo> queryPageList(XzdBudgetClassificationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdBudgetClassification> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdBudgetClassificationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的预算分类列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 预算分类列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdBudgetClassificationVo> queryList(XzdBudgetClassificationBo bo) {
|
||||
LambdaQueryWrapper<XzdBudgetClassification> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdBudgetClassification> buildQueryWrapper(XzdBudgetClassificationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdBudgetClassification> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdBudgetClassification::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBudgetClassCode()), XzdBudgetClassification::getBudgetClassCode, bo.getBudgetClassCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getBudgetClassName()), XzdBudgetClassification::getBudgetClassName, bo.getBudgetClassName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdBudgetClassification::getRemarks, bo.getRemarks());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预算分类
|
||||
*
|
||||
* @param bo 预算分类
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdBudgetClassificationBo bo) {
|
||||
XzdBudgetClassification add = MapstructUtils.convert(bo, XzdBudgetClassification.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改预算分类
|
||||
*
|
||||
* @param bo 预算分类
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdBudgetClassificationBo bo) {
|
||||
XzdBudgetClassification update = MapstructUtils.convert(bo, XzdBudgetClassification.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdBudgetClassification 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,134 @@
|
||||
package org.dromara.xzd.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.domain.bo.XzdBusinessChangeBo;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessChangeVo;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.mapper.XzdBusinessChangeMapper;
|
||||
import org.dromara.xzd.service.IXzdBusinessChangeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 承包合同变更-印章中间Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdBusinessChangeServiceImpl extends ServiceImpl<XzdBusinessChangeMapper, XzdBusinessChange> implements IXzdBusinessChangeService {
|
||||
|
||||
private final XzdBusinessChangeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询承包合同变更-印章中间
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同变更-印章中间
|
||||
*/
|
||||
@Override
|
||||
public XzdBusinessChangeVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询承包合同变更-印章中间列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同变更-印章中间分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdBusinessChangeVo> queryPageList(XzdBusinessChangeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdBusinessChange> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdBusinessChangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同变更-印章中间列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同变更-印章中间列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdBusinessChangeVo> queryList(XzdBusinessChangeBo bo) {
|
||||
LambdaQueryWrapper<XzdBusinessChange> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdBusinessChange> buildQueryWrapper(XzdBusinessChangeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdBusinessChange> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdBusinessChange::getId);
|
||||
lqw.eq(bo.getContractChangeId() != null, XzdBusinessChange::getContractChangeId, bo.getContractChangeId());
|
||||
lqw.eq(bo.getBusinessId() != null, XzdBusinessChange::getBusinessId, bo.getBusinessId());
|
||||
lqw.eq(bo.getCount() != null, XzdBusinessChange::getCount, bo.getCount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemark()), XzdBusinessChange::getRemark, bo.getRemark());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增承包合同变更-印章中间
|
||||
*
|
||||
* @param bo 承包合同变更-印章中间
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdBusinessChangeBo bo) {
|
||||
XzdBusinessChange add = MapstructUtils.convert(bo, XzdBusinessChange.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改承包合同变更-印章中间
|
||||
*
|
||||
* @param bo 承包合同变更-印章中间
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdBusinessChangeBo bo) {
|
||||
XzdBusinessChange update = MapstructUtils.convert(bo, XzdBusinessChange.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdBusinessChange entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除承包合同变更-印章中间信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package org.dromara.xzd.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
@ -17,8 +18,10 @@ import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.system.service.impl.SysUserServiceImpl;
|
||||
import org.dromara.xzd.domain.*;
|
||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
|
||||
import org.dromara.xzd.domain.vo.XzdContractDetailsVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdBusinessSealService;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -61,6 +64,10 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM
|
||||
private XzdContractClauseServiceImpl xzdContractClauseService;
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
@Autowired
|
||||
private XzdBusinessChangeServiceImpl xzdBusinessChangeService;
|
||||
@Autowired
|
||||
private XzdBusinessSealServiceImpl xzdBusinessSealService;
|
||||
|
||||
|
||||
/**
|
||||
@ -155,33 +162,50 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM
|
||||
public Boolean insertByBo(XzdContractChangeBo bo) {
|
||||
XzdContractChange add = MapstructUtils.convert(bo, XzdContractChange.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
add.setDocumentCode(IdUtil.getSnowflakeNextIdStr());
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (!flag) {
|
||||
bo.setId(add.getId());
|
||||
return false;
|
||||
}
|
||||
|
||||
String tableName = XzdClassEnum.XZD_CONTRACT_CHANGE.getClassName();
|
||||
|
||||
//合同条款-预收预付款项
|
||||
for (XzdContractAdvanceInfo ysyfkx : bo.getYsyfkx()) {
|
||||
ysyfkx.setTableName(tableName);
|
||||
ysyfkx.setContractDetailsId(add.getId());
|
||||
if (bo.getYsyfkx() != null && !bo.getYsyfkx().isEmpty()) {
|
||||
for (XzdContractAdvanceInfo ysyfkx : bo.getYsyfkx()) {
|
||||
ysyfkx.setTableName(tableName);
|
||||
ysyfkx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractAdvanceInfoService.saveBatch(bo.getYsyfkx());
|
||||
}
|
||||
xzdContractAdvanceInfoService.saveBatch(bo.getYsyfkx());
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(add.getId());
|
||||
if (bo.getKkyjlx() != null && !bo.getKkyjlx().isEmpty()) {
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause htkx : bo.getHtkx()) {
|
||||
htkx.setTableName(tableName);
|
||||
htkx.setContractDetailsId(add.getId());
|
||||
if (bo.getHtkx() != null && !bo.getHtkx().isEmpty()) {
|
||||
for (XzdContractClause htkx : bo.getHtkx()) {
|
||||
htkx.setTableName(tableName);
|
||||
htkx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHtkx());
|
||||
}
|
||||
|
||||
//印章信息
|
||||
if (bo.getSealInfo() != null && !bo.getSealInfo().isEmpty()){
|
||||
for (XzdBusinessChange sealInfo : bo.getSealInfo()) {
|
||||
sealInfo.setContractChangeId(add.getId());
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHtkx());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -233,6 +257,15 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM
|
||||
}
|
||||
xzdContractClauseService.saveOrUpdateBatch(bo.getHtkx());
|
||||
|
||||
//印章信息
|
||||
for (XzdBusinessChange advanceInfo : bo.getSealInfo()) {
|
||||
if (!old.getSealInfo().contains(advanceInfo)){
|
||||
xzdBusinessChangeService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractChangeId(update.getId());
|
||||
}
|
||||
xzdBusinessChangeService.saveOrUpdateBatch(bo.getSealInfo());
|
||||
|
||||
//更新文件
|
||||
if (bo.getFileId() != null && !bo.getFileId().isEmpty()){
|
||||
if (old != null && old.getFileId() != null) {
|
||||
@ -290,6 +323,11 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM
|
||||
lambdaQueryWrapper3.eq(XzdContractClause::getContractDetailsId, id);
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper3);
|
||||
|
||||
//印章信息删除
|
||||
LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper4.eq(XzdBusinessChange::getContractChangeId, id);
|
||||
xzdBusinessChangeService.remove(lambdaQueryWrapper4);
|
||||
|
||||
if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){
|
||||
List<Long> deleteIds = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
if (!deleteIds.isEmpty()) {
|
||||
@ -371,9 +409,17 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, vo.getId());
|
||||
List<XzdContractClause> list1 = xzdContractClauseService.list(lambdaQueryWrapper2);
|
||||
vo.setHtkx(list1);
|
||||
|
||||
|
||||
|
||||
//印章信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdBusinessChange::getContractChangeId, vo.getId());
|
||||
List<XzdBusinessChange> list2 = xzdBusinessChangeService.list(lambdaQueryWrapper3);
|
||||
for (XzdBusinessChange businessChange : list2) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
businessChange.setSealName(sealVo.getYzName());
|
||||
}
|
||||
}
|
||||
vo.setSealInfo(list2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -72,6 +72,8 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
private XzdBusinessSealServiceImpl xzdBusinessSealService;
|
||||
@Autowired
|
||||
private SysUserServiceImpl sysUserService;
|
||||
@Autowired
|
||||
private XzdBudgetClassificationServiceImpl xzdBudgetClassificationService;
|
||||
|
||||
/**
|
||||
* 查询承包合同信息
|
||||
@ -453,9 +455,17 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
info.setHtzytkyd(list3);
|
||||
|
||||
//项目责任人
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(info.getProjectResponsiblePerson());
|
||||
if (sysUserVo != null){
|
||||
info.setProjectResponsiblePersonName(sysUserVo.getNickName());
|
||||
if (info.getProjectResponsiblePerson() != null) {
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(info.getProjectResponsiblePerson());
|
||||
if (sysUserVo != null) {
|
||||
info.setProjectResponsiblePersonName(sysUserVo.getNickName());
|
||||
}
|
||||
}
|
||||
|
||||
//预算分类
|
||||
if (info.getBudgetClassification() != null){
|
||||
XzdBudgetClassification budgetClassification = xzdBudgetClassificationService.getById(info.getBudgetClassification());
|
||||
info.setBudgetClassificationObj(budgetClassification);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,319 @@
|
||||
package org.dromara.xzd.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.system.domain.vo.SysDeptVo;
|
||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||
import org.dromara.xzd.domain.vo.*;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.dromara.xzd.service.IXzdSolutionSelectionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.domain.bo.XzdContractProgressSettlementBo;
|
||||
import org.dromara.xzd.domain.XzdContractProgressSettlement;
|
||||
import org.dromara.xzd.mapper.XzdContractProgressSettlementMapper;
|
||||
import org.dromara.xzd.service.IXzdContractProgressSettlementService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 承包合同进度结算Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdContractProgressSettlementServiceImpl extends ServiceImpl<XzdContractProgressSettlementMapper, XzdContractProgressSettlement> implements IXzdContractProgressSettlementService {
|
||||
|
||||
private final XzdContractProgressSettlementMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private XzdSolutionSelectionServiceImpl xzdSolutionSelectionService;
|
||||
@Autowired
|
||||
private SysDeptServiceImpl sysDeptService;
|
||||
@Autowired
|
||||
private XzdContractDetailsServiceImpl xzdContractDetailsService;
|
||||
@Autowired
|
||||
private XzdContractProgressSettlementDateServiceImpl xzdContractProgressSettlementDateService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
@Autowired
|
||||
private XzdBusinessSealServiceImpl xzdBusinessSealService;
|
||||
@Autowired
|
||||
private XzdBusinessChangeServiceImpl xzdBusinessChangeService;
|
||||
|
||||
/**
|
||||
* 查询承包合同进度结算
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同进度结算
|
||||
*/
|
||||
@Override
|
||||
public XzdContractProgressSettlementVo queryById(Long id){
|
||||
XzdContractProgressSettlementVo vo = baseMapper.selectVoById(id);
|
||||
List<XzdContractProgressSettlementVo> vo1 = List.of(vo);
|
||||
setValue(vo1);
|
||||
return vo1.getFirst();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询承包合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同进度结算分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdContractProgressSettlementVo> queryPageList(XzdContractProgressSettlementBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdContractProgressSettlement> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdContractProgressSettlementVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
setValue(result.getRecords());
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同进度结算列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同进度结算列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdContractProgressSettlementVo> queryList(XzdContractProgressSettlementBo bo) {
|
||||
LambdaQueryWrapper<XzdContractProgressSettlement> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdContractProgressSettlement> buildQueryWrapper(XzdContractProgressSettlementBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdContractProgressSettlement> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdContractProgressSettlement::getId);
|
||||
lqw.eq(bo.getPlanId() != null, XzdContractProgressSettlement::getPlanId, bo.getPlanId());
|
||||
lqw.eq(bo.getDeptId() != null, XzdContractProgressSettlement::getDeptId, bo.getDeptId());
|
||||
lqw.eq(bo.getCode() != null, XzdContractProgressSettlement::getCode, bo.getCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdContractProgressSettlement::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getSettlementDate() != null, XzdContractProgressSettlement::getSettlementDate, bo.getSettlementDate());
|
||||
lqw.eq(bo.getContractId() != null, XzdContractProgressSettlement::getContractId, bo.getContractId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdContractProgressSettlement::getContractName, bo.getContractName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), XzdContractProgressSettlement::getProjectName, bo.getProjectName());
|
||||
lqw.eq(bo.getApprovalAmount() != null, XzdContractProgressSettlement::getApprovalAmount, bo.getApprovalAmount());
|
||||
lqw.eq(bo.getContractProgressId() != null, XzdContractProgressSettlement::getContractProgressId, bo.getContractProgressId());
|
||||
lqw.eq(bo.getMeterageDateBegin() != null, XzdContractProgressSettlement::getMeterageDateBegin, bo.getMeterageDateBegin());
|
||||
lqw.eq(bo.getMeterageDateEnd() != null, XzdContractProgressSettlement::getMeterageDateEnd, bo.getMeterageDateEnd());
|
||||
lqw.eq(bo.getSettlementUnit() != null, XzdContractProgressSettlement::getSettlementUnit, bo.getSettlementUnit());
|
||||
lqw.eq(bo.getSettlementMoney() != null, XzdContractProgressSettlement::getSettlementMoney, bo.getSettlementMoney());
|
||||
lqw.eq(bo.getDeductionMoney() != null, XzdContractProgressSettlement::getDeductionMoney, bo.getDeductionMoney());
|
||||
lqw.eq(bo.getDeductionMoneyAll() != null, XzdContractProgressSettlement::getDeductionMoneyAll, bo.getDeductionMoneyAll());
|
||||
lqw.eq(bo.getBonus() != null, XzdContractProgressSettlement::getBonus, bo.getBonus());
|
||||
lqw.eq(bo.getBonusAll() != null, XzdContractProgressSettlement::getBonusAll, bo.getBonusAll());
|
||||
lqw.eq(bo.getPayableAll() != null, XzdContractProgressSettlement::getPayableAll, bo.getPayableAll());
|
||||
lqw.eq(bo.getPayableAllShare() != null, XzdContractProgressSettlement::getPayableAllShare, bo.getPayableAllShare());
|
||||
lqw.eq(bo.getContractAmount() != null, XzdContractProgressSettlement::getContractAmount, bo.getContractAmount());
|
||||
lqw.eq(bo.getSettlementMoneyAllExclude() != null, XzdContractProgressSettlement::getSettlementMoneyAllExclude, bo.getSettlementMoneyAllExclude());
|
||||
lqw.eq(bo.getSettlementMoneyAllInclude() != null, XzdContractProgressSettlement::getSettlementMoneyAllInclude, bo.getSettlementMoneyAllInclude());
|
||||
lqw.eq(bo.getThisSettlementRatio() != null, XzdContractProgressSettlement::getThisSettlementRatio, bo.getThisSettlementRatio());
|
||||
lqw.eq(bo.getSettlementRatioExclude() != null, XzdContractProgressSettlement::getSettlementRatioExclude, bo.getSettlementRatioExclude());
|
||||
lqw.eq(bo.getSettlementRatioNow() != null, XzdContractProgressSettlement::getSettlementRatioNow, bo.getSettlementRatioNow());
|
||||
lqw.eq(bo.getPaymentTerms() != null, XzdContractProgressSettlement::getPaymentTerms, bo.getPaymentTerms());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUseSeal()), XzdContractProgressSettlement::getUseSeal, bo.getUseSeal());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRefresh()), XzdContractProgressSettlement::getRefresh, bo.getRefresh());
|
||||
lqw.eq(bo.getContractAmountInclude() != null, XzdContractProgressSettlement::getContractAmountInclude, bo.getContractAmountInclude());
|
||||
lqw.eq(bo.getContractAmountExclude() != null, XzdContractProgressSettlement::getContractAmountExclude, bo.getContractAmountExclude());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractProgressSettlement::getFileId, bo.getFileId());
|
||||
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
||||
XzdContractProgressSettlement::getDocumentDate ,params.get("beginCreateTime"), params.get("endCreateTime"));
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增承包合同进度结算
|
||||
*
|
||||
* @param bo 承包合同进度结算
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdContractProgressSettlementBo bo) {
|
||||
XzdContractProgressSettlement add = MapstructUtils.convert(bo, XzdContractProgressSettlement.class);
|
||||
validEntityBeforeSave(add);
|
||||
add.setCode((IdUtil.getSnowflakeNextIdStr()));
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
if (bo.getSealInfo() != null && !bo.getSealInfo().isEmpty()){
|
||||
for (XzdBusinessChange xzdBusinessChange : bo.getSealInfo()) {
|
||||
xzdBusinessChange.setContractChangeId(add.getId());
|
||||
}
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改承包合同进度结算
|
||||
*
|
||||
* @param bo 承包合同进度结算
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdContractProgressSettlementBo bo) {
|
||||
XzdContractProgressSettlement update = MapstructUtils.convert(bo, XzdContractProgressSettlement.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
XzdContractProgressSettlementVo old = queryById(update.getId());
|
||||
|
||||
//更新文件
|
||||
if (bo.getFileId() != null && !bo.getFileId().isEmpty()){
|
||||
if (old.getFileId() != null && !old.getFileId().isEmpty()) {
|
||||
List<Long> oldFileId = Arrays.stream(old.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
List<Long> nowFileId = Arrays.stream(bo.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
for (Long l : oldFileId) {
|
||||
if (!nowFileId.contains(l)) {
|
||||
sysOssService.deleteWithValidByIds(List.of(l), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (old.getFileId()!= null && !old.getFileId().isEmpty()){
|
||||
List<Long> deleteIds = Arrays.stream(old.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
sysOssService.deleteWithValidByIds(deleteIds, false);
|
||||
}
|
||||
}
|
||||
|
||||
//印章信息
|
||||
for (XzdBusinessChange advanceInfo : bo.getSealInfo()) {
|
||||
if (!old.getSealInfo().contains(advanceInfo)){
|
||||
xzdBusinessChangeService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractChangeId(update.getId());
|
||||
}
|
||||
xzdBusinessChangeService.saveOrUpdateBatch(bo.getSealInfo());
|
||||
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdContractProgressSettlement entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除承包合同进度结算信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
|
||||
for (Long id : ids) {
|
||||
XzdContractProgressSettlementVo vo = queryById(id);
|
||||
if (vo.getFileId()!= null && !vo.getFileId().isEmpty()){
|
||||
List<Long> deleteIds = Arrays.stream(vo.getFileId().split(",")).map(Long::valueOf).toList();
|
||||
if (!deleteIds.isEmpty()) {
|
||||
sysOssService.deleteWithValidByIds(deleteIds, false);
|
||||
}
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<XzdBusinessChange> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.eq(XzdBusinessChange::getContractChangeId, id);
|
||||
xzdBusinessChangeService.remove(lqw);
|
||||
|
||||
}
|
||||
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
public void setValue(List<XzdContractProgressSettlementVo> vos){
|
||||
for (XzdContractProgressSettlementVo vo : vos) {
|
||||
//方案名称
|
||||
if (vo.getPlanId() != null) {
|
||||
XzdSolutionSelectionVo planVo = xzdSolutionSelectionService.queryById(vo.getPlanId());
|
||||
if (planVo != null){
|
||||
vo.setPlanName(planVo.getName());
|
||||
}
|
||||
}
|
||||
//所属部门名称
|
||||
if (vo.getDeptId() != null) {
|
||||
SysDeptVo sysDeptVo = sysDeptService.selectDeptById(vo.getDeptId());
|
||||
if (sysDeptVo != null){
|
||||
vo.setDeptName(sysDeptVo.getDeptName());
|
||||
}
|
||||
}
|
||||
//合同名称
|
||||
if (vo.getContractId() != null){
|
||||
XzdContractDetailsVo contractVo = xzdContractDetailsService.queryById(vo.getContractId());
|
||||
if (contractVo != null){
|
||||
//装填信息
|
||||
List<XzdContractDetailsVo> contractVo1 = List.of(contractVo);
|
||||
xzdContractDetailsService.setValue(contractVo1);
|
||||
contractVo = contractVo1.getFirst();
|
||||
vo.setContractName(contractVo.getContractName());
|
||||
//合同编码
|
||||
vo.setContractCode(contractVo.getContractCode());
|
||||
//项目名称
|
||||
vo.setProjectName(contractVo.getProjectName());
|
||||
//合同金额
|
||||
vo.setContractAmount(contractVo.getContractAmount());
|
||||
//单据日期
|
||||
vo.setDocumentDate(contractVo.getDocumentDate());
|
||||
}
|
||||
}
|
||||
//统计周期名称
|
||||
if (vo.getContractProgressId() != null){
|
||||
XzdContractProgressSettlementDateVo settlementDateVo = xzdContractProgressSettlementDateService.queryById(vo.getContractProgressId());
|
||||
if (settlementDateVo != null){
|
||||
vo.setContractProgressName(settlementDateVo.getName());
|
||||
}
|
||||
}
|
||||
//结算单位名称(客户)
|
||||
if (vo.getSettlementUnit() != null) {
|
||||
R<QuerCorrespondentDto> byid = iXzdCorrespondentList.getCustomerByid(vo.getSettlementUnit());
|
||||
if (byid != null) {
|
||||
if (byid.getData().getXzdCustomerinformation() != null) {
|
||||
vo.setSettlementUnitName(byid.getData().getXzdCustomerinformation().getUnitName());
|
||||
}
|
||||
}
|
||||
}
|
||||
//用印信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(XzdBusinessChange::getContractChangeId, vo.getId());
|
||||
List<XzdBusinessChange> list = xzdBusinessChangeService.list(queryWrapper);
|
||||
for (XzdBusinessChange xzdBusinessChange : list) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(xzdBusinessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
xzdBusinessChange.setSealName(sealVo.getYzName());
|
||||
}
|
||||
}
|
||||
vo.setSealInfo(list);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user