10-13-承包合同,变更,终止
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.XzdBusinessSealVo;
|
||||
import org.dromara.xzd.domain.bo.XzdBusinessSealBo;
|
||||
import org.dromara.xzd.service.IXzdBusinessSealService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 印章帮助
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/businessSeal")
|
||||
public class XzdBusinessSealController extends BaseController {
|
||||
|
||||
private final IXzdBusinessSealService xzdBusinessSealService;
|
||||
|
||||
/**
|
||||
* 查询印章帮助列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:businessSeal:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdBusinessSealVo> list(XzdBusinessSealBo bo, PageQuery pageQuery) {
|
||||
return xzdBusinessSealService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出印章帮助列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:businessSeal:export")
|
||||
@Log(title = "印章帮助", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdBusinessSealBo bo, HttpServletResponse response) {
|
||||
List<XzdBusinessSealVo> list = xzdBusinessSealService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "印章帮助", XzdBusinessSealVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取印章帮助详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xzd:businessSeal:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdBusinessSealVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdBusinessSealService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增印章帮助
|
||||
*/
|
||||
@SaCheckPermission("xzd:businessSeal:add")
|
||||
@Log(title = "印章帮助", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdBusinessSealBo bo) {
|
||||
return toAjax(xzdBusinessSealService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改印章帮助
|
||||
*/
|
||||
@SaCheckPermission("xzd:businessSeal:edit")
|
||||
@Log(title = "印章帮助", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdBusinessSealBo bo) {
|
||||
return toAjax(xzdBusinessSealService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除印章帮助
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xzd:businessSeal:remove")
|
||||
@Log(title = "印章帮助", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdBusinessSealService.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.XzdContractChangeVo;
|
||||
import org.dromara.xzd.domain.bo.XzdContractChangeBo;
|
||||
import org.dromara.xzd.service.IXzdContractChangeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 承包合同变更
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/contractChange")
|
||||
public class XzdContractChangeController extends BaseController {
|
||||
|
||||
private final IXzdContractChangeService xzdContractChangeService;
|
||||
|
||||
/**
|
||||
* 查询承包合同变更列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractChange:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdContractChangeVo> list(XzdContractChangeBo bo, PageQuery pageQuery) {
|
||||
return xzdContractChangeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出承包合同变更列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractChange:export")
|
||||
@Log(title = "承包合同变更", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdContractChangeBo bo, HttpServletResponse response) {
|
||||
List<XzdContractChangeVo> list = xzdContractChangeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "承包合同变更", XzdContractChangeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取承包合同变更详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractChange:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdContractChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdContractChangeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增承包合同变更
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractChange:add")
|
||||
@Log(title = "承包合同变更", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdContractChangeBo bo) {
|
||||
return toAjax(xzdContractChangeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改承包合同变更
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractChange:edit")
|
||||
@Log(title = "承包合同变更", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdContractChangeBo bo) {
|
||||
return toAjax(xzdContractChangeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除承包合同变更
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractChange:remove")
|
||||
@Log(title = "承包合同变更", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdContractChangeService.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.XzdContractTerminationVo;
|
||||
import org.dromara.xzd.domain.bo.XzdContractTerminationBo;
|
||||
import org.dromara.xzd.service.IXzdContractTerminationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 承包合同终止
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/contractTermination")
|
||||
public class XzdContractTerminationController extends BaseController {
|
||||
|
||||
private final IXzdContractTerminationService xzdContractTerminationService;
|
||||
|
||||
/**
|
||||
* 查询承包合同终止列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractTermination:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdContractTerminationVo> list(XzdContractTerminationBo bo, PageQuery pageQuery) {
|
||||
return xzdContractTerminationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出承包合同终止列表
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractTermination:export")
|
||||
@Log(title = "承包合同终止", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdContractTerminationBo bo, HttpServletResponse response) {
|
||||
List<XzdContractTerminationVo> list = xzdContractTerminationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "承包合同终止", XzdContractTerminationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取承包合同终止详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractTermination:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdContractTerminationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdContractTerminationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增承包合同终止
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractTermination:add")
|
||||
@Log(title = "承包合同终止", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdContractTerminationBo bo) {
|
||||
return toAjax(xzdContractTerminationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改承包合同终止
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractTermination:edit")
|
||||
@Log(title = "承包合同终止", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdContractTerminationBo bo) {
|
||||
return toAjax(xzdContractTerminationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除承包合同终止
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("xzd:contractTermination:remove")
|
||||
@Log(title = "承包合同终止", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdContractTerminationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,192 @@
|
||||
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.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 承包合同变更对象 xzd_contract_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_contract_change")
|
||||
public class XzdContractChange extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private Date documentDate;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private Long contractCodeId;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同类型(字典)
|
||||
*/
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型(字典)
|
||||
*/
|
||||
private String changeType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 所属组织
|
||||
*/
|
||||
private String belongingOrganization;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private String partyAUnit;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private String partyBUnit;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private Long originalContractCost;
|
||||
|
||||
/**
|
||||
* 变更合同造价
|
||||
*/
|
||||
private Long changedContractCost;
|
||||
|
||||
/**
|
||||
* 变更后总造价
|
||||
*/
|
||||
private Long postChangeTotalCost;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private Long cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 变更原合同单项已结工程量
|
||||
*/
|
||||
private String changedOriginalContractQuantity;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
private Long isStamped;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 原收票单位
|
||||
*/
|
||||
private String originalInvoiceUnit;
|
||||
|
||||
/**
|
||||
* 现收票单位
|
||||
*/
|
||||
private Long currentInvoiceUnit;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
private Long postChangeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
private Long postChangeProjectOwner;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
private Long postChangeSiteManager;
|
||||
|
||||
/**
|
||||
* 项目大类(字典)
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型(字典)
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
private String postChangeContractRemarks;
|
||||
|
||||
/**
|
||||
* 是否实时刷新(0:否,1:是)
|
||||
*/
|
||||
private Long isRealTimeRefresh;
|
||||
|
||||
/**
|
||||
* 合同累计变更金额
|
||||
*/
|
||||
private Long contractCumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 附件ID(多个逗号分隔)
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 单据引用ID
|
||||
*/
|
||||
private Long danjuId;
|
||||
|
||||
|
||||
}
|
||||
@ -27,6 +27,8 @@ public class XzdContractDepositInfo extends BaseEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 承包合同信息ID
|
||||
*/
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package org.dromara.xzd.domain;
|
||||
|
||||
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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@ -53,6 +55,8 @@ public class XzdContractDetails extends BaseEntity {
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
/**
|
||||
@ -63,6 +67,8 @@ public class XzdContractDetails extends BaseEntity {
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date signingDate;
|
||||
|
||||
/**
|
||||
@ -108,6 +114,8 @@ public class XzdContractDetails extends BaseEntity {
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date filingDate;
|
||||
|
||||
/**
|
||||
@ -178,6 +186,8 @@ public class XzdContractDetails extends BaseEntity {
|
||||
/**
|
||||
* 备案时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date filingTime;
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
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.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 承包合同终止对象 xzd_contract_termination
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_contract_termination")
|
||||
public class XzdContractTermination extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private Long contractNumber;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
private Date terminationDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private String partyAUnit;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private String partyBUnit;
|
||||
|
||||
/**
|
||||
* 工程项目
|
||||
*/
|
||||
private String engineeringProject;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
private String terminationReason;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 项目类型(字典)
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类(字典)
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 文件id (多个文件逗号分隔)
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 单据引用ID
|
||||
*/
|
||||
private Long danjuId;
|
||||
|
||||
|
||||
}
|
||||
@ -1,9 +1,12 @@
|
||||
package org.dromara.xzd.domain;
|
||||
|
||||
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.time.LocalDate;
|
||||
import java.util.Date;
|
||||
@ -88,12 +91,16 @@ public class XzdDeductionItems extends BaseEntity {
|
||||
/**
|
||||
* 归还时间
|
||||
*/
|
||||
private LocalDate returnTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date returnTime;
|
||||
|
||||
/**
|
||||
* 变更归还时间
|
||||
*/
|
||||
private LocalDate changeReturnTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date changeReturnTime;
|
||||
|
||||
/**
|
||||
* 申请扣除(0:否,1:是)
|
||||
|
||||
@ -62,7 +62,7 @@ public class XzdContractAgreementBo extends BaseEntity {
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@NotBlank(message = "公司名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotBlank(message = "公司名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,216 @@
|
||||
package org.dromara.xzd.domain.bo;
|
||||
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractChange;
|
||||
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.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;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 承包合同变更业务对象 xzd_contract_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdContractChange.class, reverseConvertGenerate = false)
|
||||
public class XzdContractChangeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date documentDate;
|
||||
//
|
||||
// /**
|
||||
// * 所属部门
|
||||
// */
|
||||
// private Long deptId;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private Long contractCodeId;
|
||||
|
||||
// /**
|
||||
// * 合同名称
|
||||
// */
|
||||
// private String contractName;
|
||||
|
||||
// /**
|
||||
// * 合同类型(字典)
|
||||
// */
|
||||
// private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型(字典)
|
||||
*/
|
||||
private String changeType;
|
||||
|
||||
// /**
|
||||
// * 项目名称
|
||||
// */
|
||||
// private String projectName;
|
||||
|
||||
/**
|
||||
* 所属组织
|
||||
*/
|
||||
private Long belongingOrganization;
|
||||
|
||||
// /**
|
||||
// * 甲方单位
|
||||
// */
|
||||
// private String partyAUnit;
|
||||
//
|
||||
// /**
|
||||
// * 乙方单位
|
||||
// */
|
||||
// private String partyBUnit;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 变更合同造价
|
||||
*/
|
||||
private BigDecimal changedContractCost;
|
||||
|
||||
/**
|
||||
* 变更后总造价
|
||||
*/
|
||||
private BigDecimal postChangeTotalCost;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 变更原合同单项已结工程量
|
||||
*/
|
||||
private String changedOriginalContractQuantity;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
private Long isStamped;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
// /**
|
||||
// * 原收票单位
|
||||
// */
|
||||
// private String originalInvoiceUnit;
|
||||
|
||||
/**
|
||||
* 现收票单位
|
||||
*/
|
||||
private Long currentInvoiceUnit;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
private Long postChangeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
private Long postChangeProjectOwner;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
private Long postChangeSiteManager;
|
||||
|
||||
// /**
|
||||
// * 项目大类(字典)
|
||||
// */
|
||||
// private String projectCategory;
|
||||
//
|
||||
// /**
|
||||
// * 项目类型(字典)
|
||||
// */
|
||||
// private String projectType;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
private String postChangeContractRemarks;
|
||||
|
||||
/**
|
||||
* 是否实时刷新(0:否,1:是)
|
||||
*/
|
||||
private Long isRealTimeRefresh;
|
||||
|
||||
/**
|
||||
* 合同累计变更金额
|
||||
*/
|
||||
private BigDecimal contractCumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 附件ID(多个逗号分隔)
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 单据引用ID
|
||||
*/
|
||||
private Long danjuId;
|
||||
|
||||
/**
|
||||
* 合同条款-预收预付款项
|
||||
*/
|
||||
private List<XzdContractAdvanceInfo> ysyfkx;
|
||||
|
||||
/**
|
||||
* 合同条款-扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
/**
|
||||
* 合同条款-合同条款
|
||||
*/
|
||||
private List<XzdContractClause> htkx;
|
||||
|
||||
}
|
||||
@ -25,6 +25,8 @@ public class XzdContractDepositInfoBo extends BaseEntity {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 承包合同信息ID
|
||||
*/
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package org.dromara.xzd.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.domain.*;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
@ -8,6 +9,7 @@ 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;
|
||||
@ -43,7 +45,7 @@ public class XzdContractDetailsBo extends BaseEntity {
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
@NotBlank(message = "合同编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotBlank(message = "合同编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
@ -55,6 +57,8 @@ public class XzdContractDetailsBo extends BaseEntity {
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date documentDate;
|
||||
|
||||
@ -67,6 +71,8 @@ public class XzdContractDetailsBo extends BaseEntity {
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date signingDate;
|
||||
|
||||
/**
|
||||
@ -117,6 +123,8 @@ public class XzdContractDetailsBo extends BaseEntity {
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date filingDate;
|
||||
|
||||
/**
|
||||
@ -189,6 +197,8 @@ public class XzdContractDetailsBo extends BaseEntity {
|
||||
/**
|
||||
* 备案时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date filingTime;
|
||||
|
||||
/**
|
||||
@ -254,6 +264,6 @@ public class XzdContractDetailsBo extends BaseEntity {
|
||||
/**
|
||||
* 合同主要条款约定
|
||||
*/
|
||||
private List<XzdContractDepositInfo> htzytkyd;
|
||||
private XzdContractDepositInfo htzytkyd;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,104 @@
|
||||
package org.dromara.xzd.domain.bo;
|
||||
|
||||
import org.dromara.xzd.domain.XzdContractTermination;
|
||||
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.util.Date;
|
||||
|
||||
/**
|
||||
* 承包合同终止业务对象 xzd_contract_termination
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdContractTermination.class, reverseConvertGenerate = false)
|
||||
public class XzdContractTerminationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@NotBlank(message = "单据编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
@NotNull(message = "合同编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long contractNumber;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
@NotNull(message = "终止日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date terminationDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private String partyAUnit;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private String partyBUnit;
|
||||
|
||||
/**
|
||||
* 工程项目
|
||||
*/
|
||||
private String engineeringProject;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
private String terminationReason;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 项目类型(字典)
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类(字典)
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 文件id (多个文件逗号分隔)
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 单据引用ID
|
||||
*/
|
||||
private Long danjuId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,287 @@
|
||||
package org.dromara.xzd.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractChange;
|
||||
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 java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 承包合同变更视图对象 xzd_contract_change
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdContractChange.class)
|
||||
public class XzdContractChangeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码")
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private Date documentDate;
|
||||
|
||||
// /**
|
||||
// * 所属部门
|
||||
// */
|
||||
// @ExcelProperty(value = "所属部门")
|
||||
// private Long deptId;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
@ExcelProperty(value = "合同编码")
|
||||
private Long contractCodeId;
|
||||
|
||||
/**
|
||||
* 合同对象
|
||||
*/
|
||||
private XzdContractDetailsVo contract;
|
||||
|
||||
// /**
|
||||
// * 合同名称
|
||||
// */
|
||||
// @ExcelProperty(value = "合同名称")
|
||||
// private String contractName;
|
||||
|
||||
// /**
|
||||
// * 合同类型(字典)
|
||||
// */
|
||||
// @ExcelProperty(value = "合同类型", converter = ExcelDictConvert.class)
|
||||
// @ExcelDictFormat(readConverterExp = "字=典")
|
||||
// private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型(字典)
|
||||
*/
|
||||
@ExcelProperty(value = "变更类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "字=典")
|
||||
private String changeType;
|
||||
|
||||
// /**
|
||||
// * 项目名称
|
||||
// */
|
||||
// @ExcelProperty(value = "项目名称")
|
||||
// private String projectName;
|
||||
|
||||
/**
|
||||
* 所属组织
|
||||
*/
|
||||
@ExcelProperty(value = "所属组织")
|
||||
private Long belongingOrganization;
|
||||
|
||||
/**
|
||||
* 所属组织
|
||||
*/
|
||||
private String belongingOrganizationName;
|
||||
|
||||
// /**
|
||||
// * 甲方单位
|
||||
// */
|
||||
// @ExcelProperty(value = "甲方单位")
|
||||
// private String partyAUnit;
|
||||
//
|
||||
// /**
|
||||
// * 乙方单位
|
||||
// */
|
||||
// @ExcelProperty(value = "乙方单位")
|
||||
// private String partyBUnit;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
@ExcelProperty(value = "原合同造价")
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 变更合同造价
|
||||
*/
|
||||
@ExcelProperty(value = "变更合同造价")
|
||||
private BigDecimal changedContractCost;
|
||||
|
||||
/**
|
||||
* 变更后总造价
|
||||
*/
|
||||
@ExcelProperty(value = "变更后总造价")
|
||||
private BigDecimal postChangeTotalCost;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计变更金额")
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 变更原合同单项已结工程量
|
||||
*/
|
||||
@ExcelProperty(value = "变更原合同单项已结工程量")
|
||||
private String changedOriginalContractQuantity;
|
||||
|
||||
/**
|
||||
* 是否用印(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否用印", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long isStamped;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
@ExcelProperty(value = "支付条款")
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
// /**
|
||||
// * 原收票单位
|
||||
// */
|
||||
// @ExcelProperty(value = "原收票单位")
|
||||
// private String originalInvoiceUnit;
|
||||
|
||||
/**
|
||||
* 现收票单位
|
||||
*/
|
||||
@ExcelProperty(value = "现收票单位")
|
||||
private Long currentInvoiceUnit;
|
||||
|
||||
/**
|
||||
* 现收票单位名
|
||||
*/
|
||||
private String currentInvoiceUnitName;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目经理")
|
||||
private Long postChangeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目经理名
|
||||
*/
|
||||
private String postChangeProjectManagerName;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目责任人")
|
||||
private Long postChangeProjectOwner;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人名
|
||||
*/
|
||||
private String postChangeProjectOwnerName;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
@ExcelProperty(value = "变更后现场经理")
|
||||
private Long postChangeSiteManager;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
// @ExcelProperty(value = "变更后现场经理")
|
||||
private String postChangeSiteManagerName;
|
||||
|
||||
// /**
|
||||
// * 项目大类(字典)
|
||||
// */
|
||||
// @ExcelProperty(value = "项目大类", converter = ExcelDictConvert.class)
|
||||
// @ExcelDictFormat(readConverterExp = "字=典")
|
||||
// private String projectCategory;
|
||||
|
||||
// /**
|
||||
// * 项目类型(字典)
|
||||
// */
|
||||
// @ExcelProperty(value = "项目类型", converter = ExcelDictConvert.class)
|
||||
// @ExcelDictFormat(readConverterExp = "字=典")
|
||||
// private String projectType;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
@ExcelProperty(value = "变更后合同备注")
|
||||
private String postChangeContractRemarks;
|
||||
|
||||
/**
|
||||
* 是否实时刷新(0:否,1:是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否实时刷新", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=:否,1:是")
|
||||
private Long isRealTimeRefresh;
|
||||
|
||||
/**
|
||||
* 合同累计变更金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同累计变更金额")
|
||||
private Long contractCumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 附件ID(多个逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "附件ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "多=个逗号分隔")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 单据引用ID
|
||||
*/
|
||||
@ExcelProperty(value = "单据引用ID")
|
||||
private Long danjuId;
|
||||
|
||||
/**
|
||||
* 合同条款-预收预付款项
|
||||
*/
|
||||
private List<XzdContractAdvanceInfo> ysyfkx;
|
||||
|
||||
/**
|
||||
* 合同条款-扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
/**
|
||||
* 合同条款-合同条款
|
||||
*/
|
||||
private List<XzdContractClause> htkx;
|
||||
|
||||
}
|
||||
@ -32,6 +32,8 @@ public class XzdContractDepositInfoVo implements Serializable {
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 承包合同信息ID
|
||||
*/
|
||||
|
||||
@ -3,6 +3,7 @@ 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.*;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
@ -10,6 +11,7 @@ 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.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@ -68,6 +70,8 @@ public class XzdContractDetailsVo implements Serializable {
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private Date documentDate;
|
||||
|
||||
@ -86,6 +90,8 @@ public class XzdContractDetailsVo implements Serializable {
|
||||
* 签订日期
|
||||
*/
|
||||
@ExcelProperty(value = "签订日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date signingDate;
|
||||
|
||||
/**
|
||||
@ -161,6 +167,7 @@ public class XzdContractDetailsVo implements Serializable {
|
||||
* 归档日期
|
||||
*/
|
||||
@ExcelProperty(value = "归档日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date filingDate;
|
||||
|
||||
/**
|
||||
@ -262,6 +269,8 @@ public class XzdContractDetailsVo implements Serializable {
|
||||
* 备案时间
|
||||
*/
|
||||
@ExcelProperty(value = "备案时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date filingTime;
|
||||
|
||||
/**
|
||||
@ -337,7 +346,7 @@ public class XzdContractDetailsVo implements Serializable {
|
||||
/**
|
||||
* 合同主要条款约定
|
||||
*/
|
||||
private List<XzdContractDepositInfo> htzytqyd;
|
||||
private XzdContractDepositInfo htzytqyd;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,125 @@
|
||||
package org.dromara.xzd.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.dromara.xzd.domain.XzdContractTermination;
|
||||
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.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 承包合同终止视图对象 xzd_contract_termination
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdContractTermination.class)
|
||||
public class XzdContractTerminationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码")
|
||||
private String documentCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
@ExcelProperty(value = "合同编号")
|
||||
private Long contractNumber;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
@ExcelProperty(value = "终止日期")
|
||||
private Date terminationDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private String partyAUnit;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private String partyBUnit;
|
||||
|
||||
/**
|
||||
* 工程项目
|
||||
*/
|
||||
@ExcelProperty(value = "工程项目")
|
||||
private String engineeringProject;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
@ExcelProperty(value = "终止原因")
|
||||
private String terminationReason;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 项目类型(字典)
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "字=典")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类(字典)
|
||||
*/
|
||||
@ExcelProperty(value = "项目大类", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "字=典")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 文件id (多个文件逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "文件id ", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "多=个文件逗号分隔")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 单据引用ID
|
||||
*/
|
||||
@ExcelProperty(value = "单据引用ID")
|
||||
private Long danjuId;
|
||||
|
||||
|
||||
}
|
||||
@ -3,9 +3,14 @@ package org.dromara.xzd.enums;
|
||||
|
||||
public enum XzdClassEnum {
|
||||
|
||||
XZD_CONTRACT_DETAILS("xzd_contract_details"),
|
||||
|
||||
XZD_CONTRACT_CHANGE("xzd_contract_change"),
|
||||
|
||||
CS_CONTRACT_INFORMATION("xzd_cs_contract_information");
|
||||
|
||||
|
||||
|
||||
private final String className;
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.mapper;
|
||||
|
||||
import org.dromara.xzd.domain.XzdContractChange;
|
||||
import org.dromara.xzd.domain.vo.XzdContractChangeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 承包合同变更Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface XzdContractChangeMapper extends BaseMapperPlus<XzdContractChange, XzdContractChangeVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.mapper;
|
||||
|
||||
import org.dromara.xzd.domain.XzdContractTermination;
|
||||
import org.dromara.xzd.domain.vo.XzdContractTerminationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 承包合同终止Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface XzdContractTerminationMapper extends BaseMapperPlus<XzdContractTermination, XzdContractTerminationVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.service;
|
||||
|
||||
import org.dromara.xzd.domain.vo.XzdContractChangeVo;
|
||||
import org.dromara.xzd.domain.bo.XzdContractChangeBo;
|
||||
import org.dromara.xzd.domain.XzdContractChange;
|
||||
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-13
|
||||
*/
|
||||
public interface IXzdContractChangeService extends IService<XzdContractChange>{
|
||||
|
||||
/**
|
||||
* 查询承包合同变更
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同变更
|
||||
*/
|
||||
XzdContractChangeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询承包合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同变更分页列表
|
||||
*/
|
||||
TableDataInfo<XzdContractChangeVo> queryPageList(XzdContractChangeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同变更列表
|
||||
*/
|
||||
List<XzdContractChangeVo> queryList(XzdContractChangeBo bo);
|
||||
|
||||
/**
|
||||
* 新增承包合同变更
|
||||
*
|
||||
* @param bo 承包合同变更
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdContractChangeBo bo);
|
||||
|
||||
/**
|
||||
* 修改承包合同变更
|
||||
*
|
||||
* @param bo 承包合同变更
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdContractChangeBo 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.XzdContractTerminationVo;
|
||||
import org.dromara.xzd.domain.bo.XzdContractTerminationBo;
|
||||
import org.dromara.xzd.domain.XzdContractTermination;
|
||||
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-13
|
||||
*/
|
||||
public interface IXzdContractTerminationService extends IService<XzdContractTermination>{
|
||||
|
||||
/**
|
||||
* 查询承包合同终止
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同终止
|
||||
*/
|
||||
XzdContractTerminationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询承包合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同终止分页列表
|
||||
*/
|
||||
TableDataInfo<XzdContractTerminationVo> queryPageList(XzdContractTerminationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同终止列表
|
||||
*/
|
||||
List<XzdContractTerminationVo> queryList(XzdContractTerminationBo bo);
|
||||
|
||||
/**
|
||||
* 新增承包合同终止
|
||||
*
|
||||
* @param bo 承包合同终止
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdContractTerminationBo bo);
|
||||
|
||||
/**
|
||||
* 修改承包合同终止
|
||||
*
|
||||
* @param bo 承包合同终止
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdContractTerminationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除承包合同终止信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,380 @@
|
||||
package org.dromara.xzd.service.impl;
|
||||
|
||||
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.domain.vo.SysUserVo;
|
||||
import org.dromara.system.service.impl.SysDeptServiceImpl;
|
||||
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.XzdContractDetailsVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.domain.bo.XzdContractChangeBo;
|
||||
import org.dromara.xzd.domain.vo.XzdContractChangeVo;
|
||||
import org.dromara.xzd.mapper.XzdContractChangeMapper;
|
||||
import org.dromara.xzd.service.IXzdContractChangeService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 承包合同变更Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeMapper, XzdContractChange> implements IXzdContractChangeService {
|
||||
|
||||
private final XzdContractChangeMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private XzdContractDetailsServiceImpl xzdContractDetailsService;
|
||||
@Autowired
|
||||
private IXzdCorrespondentList xzdCorrespondentListService;
|
||||
@Autowired
|
||||
private SysDeptServiceImpl sysDeptService;
|
||||
@Autowired
|
||||
private SysUserServiceImpl sysUserService;
|
||||
@Autowired
|
||||
private XzdContractAdvanceInfoServiceImpl xzdContractAdvanceInfoService;
|
||||
@Autowired
|
||||
private XzdDeductionItemsServiceImpl xzdDeductionItemsService;
|
||||
@Autowired
|
||||
private XzdContractClauseServiceImpl xzdContractClauseService;
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询承包合同变更
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同变更
|
||||
*/
|
||||
@Override
|
||||
public XzdContractChangeVo queryById(Long id){
|
||||
XzdContractChangeVo changeVo = baseMapper.selectVoById(id);
|
||||
List<XzdContractChangeVo> changeVo1 = List.of(changeVo);
|
||||
setValue(changeVo1);
|
||||
return changeVo1.getFirst();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询承包合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同变更分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdContractChangeVo> queryPageList(XzdContractChangeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdContractChange> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdContractChangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
setValue(result.getRecords());
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同变更列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdContractChangeVo> queryList(XzdContractChangeBo bo) {
|
||||
LambdaQueryWrapper<XzdContractChange> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdContractChange> buildQueryWrapper(XzdContractChangeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdContractChange> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdContractChange::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), XzdContractChange::getDocumentCode, bo.getDocumentCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdContractChange::getTitle, bo.getTitle());
|
||||
lqw.between(params.get("beginDocumentDate") != null && params.get("endDocumentDate") != null,
|
||||
XzdContractChange::getDocumentDate ,params.get("beginDocumentDate"), params.get("endDocumentDate"));
|
||||
// lqw.eq(bo.getDeptId() != null, XzdContractChange::getDeptId, bo.getDeptId());
|
||||
lqw.eq(bo.getContractCodeId() != null, XzdContractChange::getContractCodeId, bo.getContractCodeId());
|
||||
// lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdContractChange::getContractName, bo.getContractName());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdContractChange::getContractType, bo.getContractType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getChangeType()), XzdContractChange::getChangeType, bo.getChangeType());
|
||||
// lqw.like(StringUtils.isNotBlank(bo.getProjectName()), XzdContractChange::getProjectName, bo.getProjectName());
|
||||
lqw.eq(bo.getBelongingOrganization() != null, XzdContractChange::getBelongingOrganization, bo.getBelongingOrganization());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getPartyAUnit()), XzdContractChange::getPartyAUnit, bo.getPartyAUnit());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getPartyBUnit()), XzdContractChange::getPartyBUnit, bo.getPartyBUnit());
|
||||
lqw.eq(bo.getOriginalContractCost() != null, XzdContractChange::getOriginalContractCost, bo.getOriginalContractCost());
|
||||
lqw.eq(bo.getChangedContractCost() != null, XzdContractChange::getChangedContractCost, bo.getChangedContractCost());
|
||||
lqw.eq(bo.getPostChangeTotalCost() != null, XzdContractChange::getPostChangeTotalCost, bo.getPostChangeTotalCost());
|
||||
lqw.eq(bo.getCumulativeChangeAmount() != null, XzdContractChange::getCumulativeChangeAmount, bo.getCumulativeChangeAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getChangedOriginalContractQuantity()), XzdContractChange::getChangedOriginalContractQuantity, bo.getChangedOriginalContractQuantity());
|
||||
lqw.eq(bo.getIsStamped() != null, XzdContractChange::getIsStamped, bo.getIsStamped());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdContractChange::getPaymentTerms, bo.getPaymentTerms());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdContractChange::getRemarks, bo.getRemarks());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getOriginalInvoiceUnit()), XzdContractChange::getOriginalInvoiceUnit, bo.getOriginalInvoiceUnit());
|
||||
lqw.eq(bo.getCurrentInvoiceUnit() != null, XzdContractChange::getCurrentInvoiceUnit, bo.getCurrentInvoiceUnit());
|
||||
lqw.eq(bo.getPostChangeProjectManager() != null, XzdContractChange::getPostChangeProjectManager, bo.getPostChangeProjectManager());
|
||||
lqw.eq(bo.getPostChangeProjectOwner() != null, XzdContractChange::getPostChangeProjectOwner, bo.getPostChangeProjectOwner());
|
||||
lqw.eq(bo.getPostChangeSiteManager() != null, XzdContractChange::getPostChangeSiteManager, bo.getPostChangeSiteManager());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdContractChange::getProjectCategory, bo.getProjectCategory());
|
||||
// lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdContractChange::getProjectType, bo.getProjectType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPostChangeContractRemarks()), XzdContractChange::getPostChangeContractRemarks, bo.getPostChangeContractRemarks());
|
||||
lqw.eq(bo.getIsRealTimeRefresh() != null, XzdContractChange::getIsRealTimeRefresh, bo.getIsRealTimeRefresh());
|
||||
lqw.eq(bo.getContractCumulativeChangeAmount() != null, XzdContractChange::getContractCumulativeChangeAmount, bo.getContractCumulativeChangeAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractChange::getFileId, bo.getFileId());
|
||||
lqw.eq(bo.getDanjuId() != null, XzdContractChange::getDanjuId, bo.getDanjuId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增承包合同变更
|
||||
*
|
||||
* @param bo 承包合同变更
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public Boolean insertByBo(XzdContractChangeBo bo) {
|
||||
XzdContractChange add = MapstructUtils.convert(bo, XzdContractChange.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (!flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
|
||||
String tableName = XzdClassEnum.XZD_CONTRACT_CHANGE.getClassName();
|
||||
|
||||
//合同条款-预收预付款项
|
||||
for (XzdContractAdvanceInfo ysyfkx : bo.getYsyfkx()) {
|
||||
ysyfkx.setTableName(tableName);
|
||||
ysyfkx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractAdvanceInfoService.saveBatch(bo.getYsyfkx());
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause htkx : bo.getHtkx()) {
|
||||
htkx.setTableName(tableName);
|
||||
htkx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHtkx());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改承包合同变更
|
||||
*
|
||||
* @param bo 承包合同变更
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdContractChangeBo bo) {
|
||||
|
||||
XzdContractChangeVo old = baseMapper.selectVoById(bo.getId());
|
||||
|
||||
XzdContractChange update = MapstructUtils.convert(bo, XzdContractChange.class);
|
||||
validEntityBeforeSave(update);
|
||||
boolean b = baseMapper.updateById(update) > 0;
|
||||
|
||||
String tableName = XzdClassEnum.XZD_CONTRACT_CHANGE.getClassName();
|
||||
|
||||
//合同文本-预收款项
|
||||
for (XzdContractAdvanceInfo advanceInfo : bo.getYsyfkx()) {
|
||||
if (!old.getYsyfkx().contains(advanceInfo)){
|
||||
xzdContractAdvanceInfoService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractDetailsId(update.getId());
|
||||
advanceInfo.setTableName(tableName);
|
||||
}
|
||||
xzdContractAdvanceInfoService.saveOrUpdateBatch(bo.getYsyfkx());
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems advanceInfo : bo.getKkyjlx()) {
|
||||
if (!old.getKkyjlx().contains(advanceInfo)){
|
||||
xzdDeductionItemsService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractDetailsId(update.getId());
|
||||
advanceInfo.setTableName(tableName);
|
||||
}
|
||||
xzdDeductionItemsService.saveOrUpdateBatch(bo.getKkyjlx());
|
||||
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause advanceInfo : bo.getHtkx()) {
|
||||
if (!old.getHtkx().contains(advanceInfo)){
|
||||
xzdContractClauseService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractDetailsId(update.getId());
|
||||
advanceInfo.setTableName(tableName);
|
||||
}
|
||||
xzdContractClauseService.saveOrUpdateBatch(bo.getHtkx());
|
||||
|
||||
//更新文件
|
||||
if (bo.getFileId() != null && !bo.getFileId().isEmpty()){
|
||||
if (old != null && old.getFileId() != null) {
|
||||
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 fileId : oldFileId) {
|
||||
if (!nowFileId.contains(fileId)) {
|
||||
sysOssService.deleteWithValidByIds(List.of(fileId), 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);
|
||||
}
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdContractChange entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除承包合同变更信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
|
||||
for (Long id : ids) {
|
||||
|
||||
XzdContractChangeVo vo = queryById(id);
|
||||
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdContractAdvanceInfo::getContractDetailsId, id);
|
||||
xzdContractAdvanceInfoService.remove(lambdaQueryWrapper1);
|
||||
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdDeductionItems::getContractDetailsId, id);
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper2);
|
||||
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdContractClause::getContractDetailsId, id);
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper3);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
public void setValue(List<XzdContractChangeVo> vos){
|
||||
for (XzdContractChangeVo vo : vos) {
|
||||
//通过合同编码拿到合同信息
|
||||
if (vo.getContractCodeId() != null){
|
||||
XzdContractDetailsVo xzdContractDetailsVo = xzdContractDetailsService.queryById(vo.getContractCodeId());
|
||||
List<XzdContractDetailsVo> xzdContractDetailsVo1 = List.of(xzdContractDetailsVo);
|
||||
xzdContractDetailsService.setValue(xzdContractDetailsVo1);
|
||||
xzdContractDetailsVo = xzdContractDetailsVo1.getFirst();
|
||||
|
||||
vo.setContract(xzdContractDetailsVo);
|
||||
}
|
||||
|
||||
//所属组织
|
||||
if (vo.getBelongingOrganization() != null){
|
||||
SysDeptVo sysDeptVo = sysDeptService.selectDeptById(vo.getBelongingOrganization());
|
||||
if (sysDeptVo != null){
|
||||
vo.setBelongingOrganizationName(sysDeptVo.getDeptName());
|
||||
}
|
||||
}
|
||||
|
||||
//收票单位名称(客户名称)
|
||||
if (vo.getCurrentInvoiceUnit() != null) {
|
||||
R<QuerCorrespondentDto> byid2 = xzdCorrespondentListService.getCustomerByid(vo.getCurrentInvoiceUnit());
|
||||
if (byid2 != null) {
|
||||
if (byid2.getData().getXzdCustomerinformation() != null) {
|
||||
vo.setCurrentInvoiceUnitName(byid2.getData().getXzdCustomerinformation().getUnitName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//变更后项目经理
|
||||
if (vo.getPostChangeProjectManager() != null){
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(vo.getPostChangeProjectManager());
|
||||
if (sysUserVo != null){
|
||||
vo.setPostChangeProjectManagerName(sysUserVo.getNickName());
|
||||
}
|
||||
}
|
||||
|
||||
//变更后项目责任人
|
||||
if (vo.getPostChangeProjectOwner() != null){
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(vo.getPostChangeProjectOwner());
|
||||
if (sysUserVo != null){
|
||||
vo.setPostChangeProjectOwnerName(sysUserVo.getNickName());
|
||||
}
|
||||
}
|
||||
|
||||
//变更后现场经理
|
||||
if (vo.getPostChangeSiteManager() != null){
|
||||
SysUserVo sysUserVo = sysUserService.selectUserById(vo.getPostChangeSiteManager());
|
||||
if (sysUserVo != null){
|
||||
vo.setPostChangeSiteManagerName(sysUserVo.getNickName());
|
||||
}
|
||||
}
|
||||
|
||||
//合同条款-预收预付款项
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(XzdContractAdvanceInfo::getContractDetailsId, vo.getId());
|
||||
List<XzdContractAdvanceInfo> advanceInfos = xzdContractAdvanceInfoService.list(lambdaQueryWrapper);
|
||||
vo.setYsyfkx(advanceInfos);
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, vo.getId());
|
||||
List<XzdDeductionItems> list = xzdDeductionItemsService.list(lambdaQueryWrapper1);
|
||||
vo.setKkyjlx(list);
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, vo.getId());
|
||||
List<XzdContractClause> list1 = xzdContractClauseService.list(lambdaQueryWrapper2);
|
||||
vo.setHtkx(list1);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package org.dromara.xzd.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
@ -21,6 +22,7 @@ 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.*;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -29,6 +31,7 @@ import org.dromara.xzd.mapper.XzdContractDetailsMapper;
|
||||
import org.dromara.xzd.service.IXzdContractDetailsService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -166,24 +169,17 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
public Boolean insertByBo(XzdContractDetailsBo bo) {
|
||||
XzdContractDetails add = MapstructUtils.convert(bo, XzdContractDetails.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
add.setContractCode(IdUtil.getSnowflakeNextIdStr());
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (!flag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String tableName = XzdClassEnum.XZD_CONTRACT_DETAILS.getClassName();
|
||||
|
||||
String tableName = null;
|
||||
Class<?> boClass = bo.getClass();
|
||||
AutoMapper autoMapper = boClass.getAnnotation(AutoMapper.class);
|
||||
if (autoMapper != null) {
|
||||
Class<?> targetClass = autoMapper.target();
|
||||
TableName tableNameAnnotation = targetClass.getAnnotation(TableName.class);
|
||||
if (tableNameAnnotation != null) {
|
||||
tableName = tableNameAnnotation.value();
|
||||
}
|
||||
}
|
||||
|
||||
//合同文本-预收款项
|
||||
//预收预付款项
|
||||
for (XzdContractAdvanceInfo yskx : bo.getYskx()) {
|
||||
yskx.setTableName(tableName);
|
||||
yskx.setContractDetailsId(add.getId());
|
||||
@ -211,10 +207,9 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
xzdSettlementRulesService.saveBatch(bo.getZftk());
|
||||
|
||||
//合同主要条款约定
|
||||
for (XzdContractDepositInfo contractDepositInfo : bo.getHtzytkyd()) {
|
||||
contractDepositInfo.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractDepositInfoService.saveBatch(bo.getHtzytkyd());
|
||||
bo.getHtzytkyd().setContractDetailsId(add.getId());
|
||||
bo.getHtzytkyd().setTableName(tableName);
|
||||
xzdContractDepositInfoService.save(bo.getHtzytkyd());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -229,65 +224,71 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
@Override
|
||||
public Boolean updateByBo(XzdContractDetailsBo bo) {
|
||||
|
||||
String tableName = XzdClassEnum.XZD_CONTRACT_DETAILS.getClassName();
|
||||
|
||||
XzdContractDetails update = MapstructUtils.convert(bo, XzdContractDetails.class);
|
||||
|
||||
XzdContractDetails old = baseMapper.selectById(update.getId());
|
||||
XzdContractDetailsVo old = baseMapper.selectVoById(update.getId());
|
||||
|
||||
List<XzdContractDetailsVo> old1 = List.of(old);
|
||||
setValue(old1);
|
||||
old = old1.getFirst();
|
||||
|
||||
//合同文本-预收款项
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(XzdContractAdvanceInfo::getContractDetailsId, old.getId());
|
||||
List<XzdContractAdvanceInfo> advanceInfos = xzdContractAdvanceInfoService.list(lambdaQueryWrapper);
|
||||
for (XzdContractAdvanceInfo advanceInfo : advanceInfos) {
|
||||
if (!bo.getYskx().contains(advanceInfo)){
|
||||
for (XzdContractAdvanceInfo advanceInfo : bo.getYskx()) {
|
||||
if (!old.getYskx().contains(advanceInfo)){
|
||||
xzdContractAdvanceInfoService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractDetailsId(update.getId());
|
||||
advanceInfo.setTableName(tableName);
|
||||
}
|
||||
xzdContractAdvanceInfoService.saveOrUpdateBatch(bo.getYskx());
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, old.getId());
|
||||
List<XzdDeductionItems> deductionItems = xzdDeductionItemsService.list(lambdaQueryWrapper1);
|
||||
for (XzdDeductionItems advanceInfo : deductionItems) {
|
||||
if (!bo.getKkyjlx().contains(advanceInfo)){
|
||||
for (XzdDeductionItems advanceInfo : bo.getKkyjlx()) {
|
||||
if (!old.getKkyjlx().contains(advanceInfo)){
|
||||
xzdDeductionItemsService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractDetailsId(update.getId());
|
||||
advanceInfo.setTableName(tableName);
|
||||
}
|
||||
xzdDeductionItemsService.saveOrUpdateBatch(bo.getKkyjlx());
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, old.getId());
|
||||
List<XzdContractClause> clauses = xzdContractClauseService.list(lambdaQueryWrapper2);
|
||||
for (XzdContractClause advanceInfo : clauses) {
|
||||
if (!bo.getHttk().contains(advanceInfo)){
|
||||
for (XzdContractClause advanceInfo : bo.getHttk()) {
|
||||
if (!old.getHttk().contains(advanceInfo)){
|
||||
xzdContractClauseService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractDetailsId(update.getId());
|
||||
advanceInfo.setTableName(tableName);
|
||||
}
|
||||
xzdContractClauseService.saveOrUpdateBatch(bo.getHttk());
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, old.getId());
|
||||
List<XzdSettlementRules> settlementRules = xzdSettlementRulesService.list(lambdaQueryWrapper3);
|
||||
for (XzdSettlementRules advanceInfo : settlementRules) {
|
||||
if (!bo.getZftk().contains(advanceInfo)){
|
||||
for (XzdSettlementRules advanceInfo : bo.getZftk()) {
|
||||
if (!old.getZftk().contains(advanceInfo)){
|
||||
xzdSettlementRulesService.removeById(advanceInfo);
|
||||
}
|
||||
advanceInfo.setContractDetailsId(update.getId());
|
||||
}
|
||||
xzdSettlementRulesService.saveOrUpdateBatch(bo.getZftk());
|
||||
|
||||
if (bo.getHtzytkyd() != null){
|
||||
bo.getHtzytkyd().setContractDetailsId(update.getId());
|
||||
xzdContractDepositInfoService.updateById(bo.getHtzytkyd());
|
||||
}else {
|
||||
xzdContractDepositInfoService.removeById(old.getHtzytqyd());
|
||||
}
|
||||
|
||||
//更新文件
|
||||
if (bo.getFileId() != null && !bo.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);
|
||||
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 {
|
||||
@ -298,6 +299,7 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
}
|
||||
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
@ -335,22 +337,22 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
|
||||
//合同文本-预收款项
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(XzdContractAdvanceInfo::getContractDetailsId, ids);
|
||||
lambdaQueryWrapper.eq(XzdContractAdvanceInfo::getContractDetailsId, id);
|
||||
xzdContractAdvanceInfoService.remove(lambdaQueryWrapper);
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, ids);
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, id);
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper1);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, ids);
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, id);
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper2);
|
||||
|
||||
//支付条款
|
||||
LambdaQueryWrapper<XzdSettlementRules> lambdaQueryWrapper3 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, ids);
|
||||
lambdaQueryWrapper3.eq(XzdSettlementRules::getContractDetailsId, id);
|
||||
xzdSettlementRulesService.remove(lambdaQueryWrapper3);
|
||||
|
||||
}
|
||||
@ -367,43 +369,57 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
info.setDeptName(sysDeptVo.getDeptName());
|
||||
}
|
||||
//项目名称
|
||||
XzdProjectVo projectVo = xzdProjectService.queryById(info.getProject());
|
||||
if (projectVo != null){
|
||||
info.setProjectName(projectVo.getProjectName());
|
||||
if (info.getProject() != null) {
|
||||
XzdProjectVo projectVo = xzdProjectService.queryById(info.getProject());
|
||||
if (projectVo != null) {
|
||||
info.setProjectName(projectVo.getProjectName());
|
||||
}
|
||||
}
|
||||
//甲方单位(客户信息列表)
|
||||
R<QuerCorrespondentDto> byid = iXzdCorrespondentList.getCustomerByid(info.getPartyAUnit());
|
||||
if (byid!=null){
|
||||
if (byid.getData().getXzdCustomerinformation() != null){
|
||||
info.setPartyAUnitName(byid.getData().getXzdCustomerinformation().getUnitName());
|
||||
if (info.getPartyAUnit() != null) {
|
||||
R<QuerCorrespondentDto> byid = iXzdCorrespondentList.getCustomerByid(info.getPartyAUnit());
|
||||
if (byid != null) {
|
||||
if (byid.getData().getXzdCustomerinformation() != null) {
|
||||
info.setPartyAUnitName(byid.getData().getXzdCustomerinformation().getUnitName());
|
||||
}
|
||||
}
|
||||
}
|
||||
//乙方单位(供应商信息列表)
|
||||
XzdSupplierInfoVo xzdSupplierInfoVo = xzdSupplierInfoService.queryById(info.getPartyBUnit());
|
||||
if (xzdSupplierInfoVo != null){
|
||||
info.setPartyBUnitName(xzdSupplierInfoVo.getUnitName());
|
||||
if (info.getPartyBUnit() != null) {
|
||||
XzdSupplierInfoVo xzdSupplierInfoVo = xzdSupplierInfoService.queryById(info.getPartyBUnit());
|
||||
if (xzdSupplierInfoVo != null) {
|
||||
info.setPartyBUnitName(xzdSupplierInfoVo.getUnitName());
|
||||
}
|
||||
}
|
||||
//开票单位名称(供应商名称)
|
||||
XzdSupplierInfoVo xzdSupplierInfoVo1 = xzdSupplierInfoService.queryById(info.getInvoicingUnit());
|
||||
if (xzdSupplierInfoVo1 != null){
|
||||
info.setInvoicingUnitName(xzdSupplierInfoVo1.getUnitName());
|
||||
if (info.getInvoicingUnit() != null) {
|
||||
XzdSupplierInfoVo xzdSupplierInfoVo1 = xzdSupplierInfoService.queryById(info.getInvoicingUnit());
|
||||
if (xzdSupplierInfoVo1 != null) {
|
||||
info.setInvoicingUnitName(xzdSupplierInfoVo1.getUnitName());
|
||||
}
|
||||
}
|
||||
//收票单位名称(客户名称)
|
||||
R<QuerCorrespondentDto> byid2 = iXzdCorrespondentList.getCustomerByid(info.getTicketReceivingUnit());
|
||||
if (byid2!=null){
|
||||
if (byid2.getData().getXzdCustomerinformation() != null){
|
||||
info.setTicketReceivingUnitName(byid2.getData().getXzdCustomerinformation().getUnitName());
|
||||
if (info.getTicketReceivingUnit() != null) {
|
||||
R<QuerCorrespondentDto> byid2 = iXzdCorrespondentList.getCustomerByid(info.getTicketReceivingUnit());
|
||||
if (byid2 != null) {
|
||||
if (byid2.getData().getXzdCustomerinformation() != null) {
|
||||
info.setTicketReceivingUnitName(byid2.getData().getXzdCustomerinformation().getUnitName());
|
||||
}
|
||||
}
|
||||
}
|
||||
//印章名称
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(info.getSealName());
|
||||
if (sealVo != null){
|
||||
info.setSealNameDetail(sealVo.getYzName());
|
||||
if (info.getSealName() != null) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(info.getSealName());
|
||||
if (sealVo != null) {
|
||||
info.setSealNameDetail(sealVo.getYzName());
|
||||
}
|
||||
}
|
||||
//签约组织(供应商)
|
||||
XzdSupplierInfoVo xzdSupplierInfoVo2 = xzdSupplierInfoService.queryById(info.getSigningOrganization());
|
||||
if (xzdSupplierInfoVo2!= null){
|
||||
info.setSigningOrganizationName(xzdSupplierInfoVo2.getUnitName());
|
||||
if (info.getSigningOrganization() != null) {
|
||||
XzdSupplierInfoVo xzdSupplierInfoVo2 = xzdSupplierInfoService.queryById(info.getSigningOrganization());
|
||||
if (xzdSupplierInfoVo2 != null) {
|
||||
info.setSigningOrganizationName(xzdSupplierInfoVo2.getUnitName());
|
||||
}
|
||||
}
|
||||
|
||||
//合同文本-预收款项
|
||||
@ -433,7 +449,7 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
||||
//合同文本-合同主要条款约定
|
||||
LambdaQueryWrapper<XzdContractDepositInfo> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper4.eq(XzdContractDepositInfo::getContractDetailsId, info.getId());
|
||||
List<XzdContractDepositInfo> list3 = xzdContractDepositInfoService.list(lambdaQueryWrapper4);
|
||||
XzdContractDepositInfo list3 = xzdContractDepositInfoService.getOne(lambdaQueryWrapper4);
|
||||
info.setHtzytqyd(list3);
|
||||
|
||||
//项目责任人
|
||||
|
||||
@ -0,0 +1,185 @@
|
||||
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.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.service.impl.SysOssServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.domain.bo.XzdContractTerminationBo;
|
||||
import org.dromara.xzd.domain.vo.XzdContractTerminationVo;
|
||||
import org.dromara.xzd.domain.XzdContractTermination;
|
||||
import org.dromara.xzd.mapper.XzdContractTerminationMapper;
|
||||
import org.dromara.xzd.service.IXzdContractTerminationService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 承包合同终止Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdContractTerminationServiceImpl extends ServiceImpl<XzdContractTerminationMapper, XzdContractTermination> implements IXzdContractTerminationService {
|
||||
|
||||
private final XzdContractTerminationMapper baseMapper;
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
/**
|
||||
* 查询承包合同终止
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 承包合同终止
|
||||
*/
|
||||
@Override
|
||||
public XzdContractTerminationVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询承包合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 承包合同终止分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdContractTerminationVo> queryPageList(XzdContractTerminationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdContractTermination> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdContractTerminationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的承包合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 承包合同终止列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdContractTerminationVo> queryList(XzdContractTerminationBo bo) {
|
||||
LambdaQueryWrapper<XzdContractTermination> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdContractTermination> buildQueryWrapper(XzdContractTerminationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdContractTermination> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdContractTermination::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDocumentCode()), XzdContractTermination::getDocumentCode, bo.getDocumentCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdContractTermination::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getContractNumber() != null, XzdContractTermination::getContractNumber, bo.getContractNumber());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdContractTermination::getContractName, bo.getContractName());
|
||||
lqw.eq(bo.getTerminationDate() != null, XzdContractTermination::getTerminationDate, bo.getTerminationDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPartyAUnit()), XzdContractTermination::getPartyAUnit, bo.getPartyAUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPartyBUnit()), XzdContractTermination::getPartyBUnit, bo.getPartyBUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEngineeringProject()), XzdContractTermination::getEngineeringProject, bo.getEngineeringProject());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTerminationReason()), XzdContractTermination::getTerminationReason, bo.getTerminationReason());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdContractTermination::getRemarks, bo.getRemarks());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdContractTermination::getProjectType, bo.getProjectType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdContractTermination::getProjectCategory, bo.getProjectCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractTermination::getFileId, bo.getFileId());
|
||||
lqw.eq(bo.getDanjuId() != null, XzdContractTermination::getDanjuId, bo.getDanjuId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增承包合同终止
|
||||
*
|
||||
* @param bo 承包合同终止
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdContractTerminationBo bo) {
|
||||
XzdContractTermination add = MapstructUtils.convert(bo, XzdContractTermination.class);
|
||||
validEntityBeforeSave(add);
|
||||
bo.setDocumentCode(IdUtil.getSnowflakeNextIdStr());
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改承包合同终止
|
||||
*
|
||||
* @param bo 承包合同终止
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public Boolean updateByBo(XzdContractTerminationBo bo) {
|
||||
XzdContractTermination update = MapstructUtils.convert(bo, XzdContractTermination.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
XzdContractTerminationVo 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);
|
||||
}
|
||||
}
|
||||
boolean b = baseMapper.updateById(update) > 0;
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdContractTermination entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除承包合同终止信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
for (Long id : ids) {
|
||||
XzdContractTerminationVo 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@ -189,7 +189,25 @@ public class XzdProjectTypeServiceImpl extends ServiceImpl<XzdProjectTypeMapper,
|
||||
@Override
|
||||
public XzdProjectTypeVo getBigType(Long id){
|
||||
|
||||
return null;
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 查询当前节点
|
||||
XzdProjectTypeVo current = baseMapper.selectVoById(id);
|
||||
if (current == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 一直向上查找父节点,直到parentId为0或null
|
||||
while (current.getParentId() != null && !current.getParentId().equals(0L)) {
|
||||
current = baseMapper.selectVoById(current.getParentId());
|
||||
if (current == null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user