机械合同
This commit is contained in:
@ -320,6 +320,8 @@ xss:
|
||||
- /xzd/fenbaohetongbiangg/**
|
||||
- /xzd/fenbaohetongxinxi/**
|
||||
- /xzd/contractManagement/**
|
||||
- /xzd/jixiehetongxinxi/contractMachinery/**
|
||||
- /xzd/jixiehetongbiang/machineryContractAlteration/**
|
||||
|
||||
# 全局线程池相关配置
|
||||
# 如使用JDK21请直接使用虚拟线程 不要开启此配置
|
||||
|
||||
@ -8,9 +8,11 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购合同终止业务对象 xzd_purchase_contract_suspend
|
||||
@ -135,5 +137,10 @@ public class XzdPurchaseContractSuspendBo extends BaseEntity {
|
||||
|
||||
private LocalDate endDate;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -15,9 +15,11 @@ 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.XzdBusinessChange;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -210,5 +212,10 @@ public class XzdPurchaseContractSuspendVo implements Serializable {
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -24,10 +24,14 @@ import org.dromara.xzd.contractManagement.fenbaohetongxinxi.domain.XzdSubcontrac
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.service.IXzdPurchaseContractInformationService;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdSettlementRules;
|
||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
|
||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||
import org.dromara.xzd.service.IXzdSettlementRulesService;
|
||||
import org.dromara.xzd.service.impl.XzdBusinessChangeServiceImpl;
|
||||
import org.dromara.xzd.service.impl.XzdBusinessSealServiceImpl;
|
||||
import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
||||
import org.dromara.xzd.settlement.fenbaohetongjungong.domain.vo.SettlementOfSubcontractingCompletionVo;
|
||||
import org.dromara.xzd.utilS.AreaUtil;
|
||||
@ -74,7 +78,12 @@ public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurcha
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
private final AreaUtil areaUtil;
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessChangeServiceImpl xzdBusinessChangeService;
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessSealServiceImpl xzdBusinessSealService;
|
||||
|
||||
/**
|
||||
* 查询采购合同终止
|
||||
@ -101,6 +110,18 @@ public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurcha
|
||||
}
|
||||
}
|
||||
|
||||
//印章信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> xzdBusinessChangeWrapper = new LambdaQueryWrapper<>();
|
||||
xzdBusinessChangeWrapper.eq(XzdBusinessChange::getContractChangeId, item.getId());
|
||||
List<XzdBusinessChange> xzdBusinessChanges = xzdBusinessChangeService.list(xzdBusinessChangeWrapper);
|
||||
for (XzdBusinessChange businessChange : xzdBusinessChanges) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
businessChange.setSealName(sealVo.getYzName());
|
||||
}
|
||||
}
|
||||
item.setSealInfo(xzdBusinessChanges);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,8 +197,18 @@ public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurcha
|
||||
String banBen = BatchNumberGenerator.generateBatchNumber("CGHTZZ-");
|
||||
|
||||
add.setReceiptsCode(banBen);
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
|
||||
//印章信息
|
||||
if (bo.getSealInfo() != null && !bo.getSealInfo().isEmpty()){
|
||||
for (XzdBusinessChange sealInfo : bo.getSealInfo()) {
|
||||
sealInfo.setContractChangeId(add.getId());
|
||||
sealInfo.setType("9");
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
}
|
||||
|
||||
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
@ -194,6 +225,16 @@ public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurcha
|
||||
public Boolean updateByBo(XzdPurchaseContractSuspendBo bo) {
|
||||
XzdPurchaseContractSuspend update = MapstructUtils.convert(bo, XzdPurchaseContractSuspend.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
//印章信息
|
||||
xzdBusinessChangeService.remove(new LambdaQueryWrapper<XzdBusinessChange>().eq(XzdBusinessChange::getContractChangeId, update.getId()));
|
||||
|
||||
|
||||
for (XzdBusinessChange xzdBusinessChange : bo.getSealInfo()) {
|
||||
xzdBusinessChange.setContractChangeId(update.getId());
|
||||
xzdBusinessChange.setType("9");
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
@ -226,6 +267,8 @@ public class XzdPurchaseContractSuspendServiceImpl extends ServiceImpl<XzdPurcha
|
||||
sysOssService.deleteWithValidByIds(collect, false);
|
||||
}
|
||||
}
|
||||
//印章信息
|
||||
xzdBusinessChangeService.remove(new LambdaQueryWrapper<XzdBusinessChange>().in(XzdBusinessChange::getContractChangeId, ids));
|
||||
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongbiang.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.contractManagement.jixiehetongbiang.domain.vo.XzdMachineryContractAlterationVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.bo.XzdMachineryContractAlterationBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.service.IXzdMachineryContractAlterationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 机械合同变更
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/jixiehetongbiang/machineryContractAlteration")
|
||||
public class XzdMachineryContractAlterationController extends BaseController {
|
||||
|
||||
private final IXzdMachineryContractAlterationService xzdMachineryContractAlterationService;
|
||||
|
||||
/**
|
||||
* 查询机械合同变更列表
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongbiang:machineryContractAlteration:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdMachineryContractAlterationVo> list(XzdMachineryContractAlterationBo bo, PageQuery pageQuery) {
|
||||
return xzdMachineryContractAlterationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出机械合同变更列表
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongbiang:machineryContractAlteration:export")
|
||||
@Log(title = "机械合同变更", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdMachineryContractAlterationBo bo, HttpServletResponse response) {
|
||||
List<XzdMachineryContractAlterationVo> list = xzdMachineryContractAlterationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "机械合同变更", XzdMachineryContractAlterationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机械合同变更详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongbiang:machineryContractAlteration:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdMachineryContractAlterationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdMachineryContractAlterationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械合同变更
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongbiang:machineryContractAlteration:add")
|
||||
@Log(title = "机械合同变更", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdMachineryContractAlterationBo bo) {
|
||||
return toAjax(xzdMachineryContractAlterationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械合同变更
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongbiang:machineryContractAlteration:edit")
|
||||
@Log(title = "机械合同变更", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdMachineryContractAlterationBo bo) {
|
||||
return toAjax(xzdMachineryContractAlterationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除机械合同变更
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongbiang:machineryContractAlteration:remove")
|
||||
@Log(title = "机械合同变更", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdMachineryContractAlterationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,223 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongbiang.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 机械合同变更对象 xzd_machinery_contract_alteration
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_machinery_contract_alteration")
|
||||
public class XzdMachineryContractAlteration extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
private String alterationType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessModel;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 支付比例
|
||||
*/
|
||||
private BigDecimal paymentRatio;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private Long centralizedPurchasingMode;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 警示信息
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private Long cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 变更原合同单项已结工程量
|
||||
*/
|
||||
private Long biangengyuanhetong;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
private Long changeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
private Long changeProjectResponsible;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
private Long changeSiteManager;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
private String changeContractRemarks;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPayment;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额支付比例
|
||||
*/
|
||||
private BigDecimal paymentNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 付款额是否不能超支付比例:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPaymentRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算额是否不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long preSettlementNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算额不能超合同额比例
|
||||
*/
|
||||
private BigDecimal preSettlementNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 变更价税合计
|
||||
*/
|
||||
private String changeInTotalAmount;
|
||||
|
||||
/**
|
||||
* 变更后价税合计
|
||||
*/
|
||||
private String revisedTotalAmount;
|
||||
|
||||
/**
|
||||
* 合同文本
|
||||
*/
|
||||
private String contractText;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,269 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongbiang.domain.bo;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.XzdMachineryContractAlteration;
|
||||
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.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机械合同变更业务对象 xzd_machinery_contract_alteration
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdMachineryContractAlteration.class, reverseConvertGenerate = false)
|
||||
public class XzdMachineryContractAlterationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@NotBlank(message = "合同名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
@NotBlank(message = "合同类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
@NotBlank(message = "变更类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String alterationType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessModel;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 支付比例
|
||||
*/
|
||||
private BigDecimal paymentRatio;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@NotNull(message = "甲方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private Long centralizedPurchasingMode;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@NotNull(message = "乙方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 警示信息
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private Long cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 变更原合同单项已结工程量
|
||||
*/
|
||||
private Long biangengyuanhetong;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
@NotNull(message = "变更后项目经理不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long changeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
@NotNull(message = "变更后项目责任人不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long changeProjectResponsible;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
@NotNull(message = "变更后现场经理不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long changeSiteManager;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
@NotBlank(message = "变更后合同备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String changeContractRemarks;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPayment;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额支付比例
|
||||
*/
|
||||
private BigDecimal paymentNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 付款额是否不能超支付比例:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPaymentRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算额是否不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long preSettlementNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算额不能超合同额比例
|
||||
*/
|
||||
private BigDecimal preSettlementNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 变更价税合计
|
||||
*/
|
||||
private String changeInTotalAmount;
|
||||
|
||||
/**
|
||||
* 变更后价税合计
|
||||
*/
|
||||
private String revisedTotalAmount;
|
||||
|
||||
/**
|
||||
* 合同文本
|
||||
*/
|
||||
private String contractText;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
/**
|
||||
* 设备租聘列表
|
||||
*/
|
||||
|
||||
private List<XzdEquipmentLeasing> jqlist;
|
||||
|
||||
|
||||
/**
|
||||
* 预收款项
|
||||
*/
|
||||
private List<XzdContractAdvanceInfo> yskx;
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,371 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongbiang.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.XzdMachineryContractAlteration;
|
||||
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.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 机械合同变更视图对象 xzd_machinery_contract_alteration
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdMachineryContractAlteration.class)
|
||||
public class XzdMachineryContractAlterationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
@ExcelProperty(value = "合同信息ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "合=同编码")
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
@ExcelProperty(value = "合同信息ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "合=同编码")
|
||||
private String contractInformationName;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码")
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
@ExcelProperty(value = "合同类型")
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
@ExcelProperty(value = "变更类型")
|
||||
private String alterationType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
@ExcelProperty(value = "经营模式")
|
||||
private String businessModel;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
@ExcelProperty(value = "原合同造价")
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 支付比例
|
||||
*/
|
||||
@ExcelProperty(value = "支付比例")
|
||||
private BigDecimal paymentRatio;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyAUnit")
|
||||
private String partyAUnitName;
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
@ExcelProperty(value = "集采模式")
|
||||
private Long centralizedPurchasingMode;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "artyBUnit")
|
||||
private String artyBUnitName;
|
||||
|
||||
/**
|
||||
* 警示信息
|
||||
*/
|
||||
@ExcelProperty(value = "警示信息")
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计变更金额")
|
||||
private Long cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
@ExcelProperty(value = "支付条款")
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
@ExcelProperty(value = "备注说明")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 变更原合同单项已结工程量
|
||||
*/
|
||||
@ExcelProperty(value = "变更原合同单项已结工程量")
|
||||
private Long biangengyuanhetong;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "是否用印:1-是,0-否")
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目经理")
|
||||
private Long changeProjectManager;
|
||||
|
||||
/**
|
||||
* 变更后项目经理
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "changeProjectManager")
|
||||
@ExcelProperty(value = "变更后项目经理")
|
||||
private String changeProjectManageName;
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
@ExcelProperty(value = "变更后项目责任人")
|
||||
private Long changeProjectResponsible;
|
||||
|
||||
|
||||
/**
|
||||
* 变更后项目责任人
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "changeProjectResponsible")
|
||||
@ExcelProperty(value = "变更后项目责任人")
|
||||
private String changeProjectResponsibleName;
|
||||
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
@ExcelProperty(value = "变更后现场经理")
|
||||
private Long changeSiteManager;
|
||||
|
||||
/**
|
||||
* 变更后现场经理
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "changeSiteManager")
|
||||
@ExcelProperty(value = "变更后现场经理")
|
||||
private String changeSiteManagerName;
|
||||
|
||||
/**
|
||||
* 变更后合同备注
|
||||
*/
|
||||
@ExcelProperty(value = "变更后合同备注")
|
||||
private String changeContractRemarks;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
@ExcelProperty(value = "项目大类")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不能超合同额:1-是,0-否")
|
||||
private Long paymentNotExceedPayment;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额支付比例
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不能超合同额支付比例")
|
||||
private BigDecimal paymentNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 付款额是否不能超支付比例:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "付款额是否不能超支付比例:1-是,0-否")
|
||||
private Long paymentNotExceedPaymentRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算额是否不能超合同额:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算额是否不能超合同额:1-是,0-否")
|
||||
private Long preSettlementNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算额不能超合同额比例
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算额不能超合同额比例")
|
||||
private BigDecimal preSettlementNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 变更价税合计
|
||||
*/
|
||||
@ExcelProperty(value = "变更价税合计")
|
||||
private String changeInTotalAmount;
|
||||
|
||||
/**
|
||||
* 变更后价税合计
|
||||
*/
|
||||
@ExcelProperty(value = "变更后价税合计")
|
||||
private String revisedTotalAmount;
|
||||
|
||||
/**
|
||||
* 合同文本
|
||||
*/
|
||||
@ExcelProperty(value = "合同文本")
|
||||
private String contractText;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@ExcelProperty(value = "组织id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createByName;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
/**
|
||||
* 设备租聘列表
|
||||
*/
|
||||
|
||||
private List<XzdEquipmentLeasing> jqlist;
|
||||
|
||||
|
||||
/**
|
||||
* 预收款项
|
||||
*/
|
||||
private List<XzdContractAdvanceInfo> yskx;
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongbiang.mapper;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.XzdMachineryContractAlteration;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.vo.XzdMachineryContractAlterationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 机械合同变更Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface XzdMachineryContractAlterationMapper extends BaseMapperPlus<XzdMachineryContractAlteration, XzdMachineryContractAlterationVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongbiang.service;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.vo.XzdMachineryContractAlterationVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.bo.XzdMachineryContractAlterationBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.XzdMachineryContractAlteration;
|
||||
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-11-12
|
||||
*/
|
||||
public interface IXzdMachineryContractAlterationService extends IService<XzdMachineryContractAlteration>{
|
||||
|
||||
/**
|
||||
* 查询机械合同变更
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同变更
|
||||
*/
|
||||
XzdMachineryContractAlterationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询机械合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同变更分页列表
|
||||
*/
|
||||
TableDataInfo<XzdMachineryContractAlterationVo> queryPageList(XzdMachineryContractAlterationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同变更列表
|
||||
*/
|
||||
List<XzdMachineryContractAlterationVo> queryList(XzdMachineryContractAlterationBo bo);
|
||||
|
||||
/**
|
||||
* 新增机械合同变更
|
||||
*
|
||||
* @param bo 机械合同变更
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdMachineryContractAlterationBo bo);
|
||||
|
||||
/**
|
||||
* 修改机械合同变更
|
||||
*
|
||||
* @param bo 机械合同变更
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdMachineryContractAlterationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除机械合同变更信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,445 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongbiang.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||
import org.dromara.common.core.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.common.utils.BatchNumberGenerator;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.XzdPurchaseContractAlteration;
|
||||
import org.dromara.xzd.contractManagement.caigouhetongbiangeng.domain.vo.XzdPurchaseContractAlterationVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdContractMachineryVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdEquipmentLeasingVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.service.IXzdContractMachineryService;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.service.IXzdEquipmentLeasingService;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.service.IXzdContractAdvanceInfoService;
|
||||
import org.dromara.xzd.service.IXzdContractClauseService;
|
||||
import org.dromara.xzd.service.IXzdDeductionItemsService;
|
||||
import org.dromara.xzd.service.impl.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.bo.XzdMachineryContractAlterationBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.vo.XzdMachineryContractAlterationVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.XzdMachineryContractAlteration;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.mapper.XzdMachineryContractAlterationMapper;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.service.IXzdMachineryContractAlterationService;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 机械合同变更Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@Slf4j
|
||||
public class XzdMachineryContractAlterationServiceImpl extends ServiceImpl<XzdMachineryContractAlterationMapper, XzdMachineryContractAlteration> implements IXzdMachineryContractAlterationService {
|
||||
|
||||
private final XzdMachineryContractAlterationMapper baseMapper;
|
||||
private final IXzdContractMachineryService xzdContractMachineryService;
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessChangeServiceImpl xzdBusinessChangeService;
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessSealServiceImpl xzdBusinessSealService;
|
||||
|
||||
@Autowired
|
||||
private XzdContractAdvanceInfoServiceImpl xzdContractAdvanceInfoService;
|
||||
@Autowired
|
||||
private XzdDeductionItemsServiceImpl xzdDeductionItemsService;
|
||||
@Autowired
|
||||
private XzdContractClauseServiceImpl xzdContractClauseService;
|
||||
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
private final IXzdContractAdvanceInfoService iXzdContractAdvanceInfoService;
|
||||
|
||||
private final IXzdDeductionItemsService iXzdDeductionItemsService;
|
||||
|
||||
private final IXzdContractClauseService iXzdContractClauseService;
|
||||
|
||||
|
||||
private final IXzdEquipmentLeasingService xzdEquipmentLeasingService;
|
||||
|
||||
/**
|
||||
* 查询机械合同变更
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同变更
|
||||
*/
|
||||
@Override
|
||||
public XzdMachineryContractAlterationVo queryById(Long id){
|
||||
|
||||
XzdMachineryContractAlterationVo xzdPurchaseContractAlterationVo = baseMapper.selectVoById(id);
|
||||
List<XzdMachineryContractAlterationVo> list = List.of(xzdPurchaseContractAlterationVo);
|
||||
saveValue(list);
|
||||
return list.getFirst();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询机械合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同变更分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdMachineryContractAlterationVo> queryPageList(XzdMachineryContractAlterationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdMachineryContractAlteration> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdMachineryContractAlterationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
saveValue(result.getRecords());
|
||||
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void saveValue(List<XzdMachineryContractAlterationVo> records) {
|
||||
for (XzdMachineryContractAlterationVo item : records) {
|
||||
// 机械
|
||||
List<XzdEquipmentLeasing> xzdEquipmentLeasings = xzdEquipmentLeasingService.getBaseMapper().selectList(new LambdaQueryWrapper<XzdEquipmentLeasing>().eq(XzdEquipmentLeasing::getRelevanceId, item.getId()));
|
||||
if (xzdEquipmentLeasings != null && xzdEquipmentLeasings.size() > 0) {
|
||||
item.setJqlist(xzdEquipmentLeasings);
|
||||
}
|
||||
|
||||
// 合同编码
|
||||
if (item.getContractInformationId() != null){
|
||||
XzdContractMachineryVo vo = xzdContractMachineryService.queryById(item.getContractInformationId());
|
||||
if (vo != null){
|
||||
item.setContractInformationName(vo.getContractCode());
|
||||
}
|
||||
|
||||
}
|
||||
//印章信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> xzdBusinessChangeWrapper = new LambdaQueryWrapper<>();
|
||||
xzdBusinessChangeWrapper.eq(XzdBusinessChange::getContractChangeId, item.getId());
|
||||
List<XzdBusinessChange> xzdBusinessChanges = xzdBusinessChangeService.list(xzdBusinessChangeWrapper);
|
||||
for (XzdBusinessChange businessChange : xzdBusinessChanges) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
businessChange.setSealName(sealVo.getYzName());
|
||||
}
|
||||
}
|
||||
item.setSealInfo(xzdBusinessChanges);
|
||||
//合同文本-预收款项
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(XzdContractAdvanceInfo::getContractDetailsId, item.getId());
|
||||
List<XzdContractAdvanceInfo> advanceInfos = xzdContractAdvanceInfoService.list(lambdaQueryWrapper);
|
||||
item.setYskx(advanceInfos);
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, item.getId());
|
||||
List<XzdDeductionItems> list = xzdDeductionItemsService.list(lambdaQueryWrapper1);
|
||||
item.setKkyjlx(list);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, item.getId());
|
||||
List<XzdContractClause> list1 = xzdContractClauseService.list(lambdaQueryWrapper2);
|
||||
item.setHttk(list1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同变更列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同变更列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdMachineryContractAlterationVo> queryList(XzdMachineryContractAlterationBo bo) {
|
||||
LambdaQueryWrapper<XzdMachineryContractAlteration> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdMachineryContractAlteration> buildQueryWrapper(XzdMachineryContractAlterationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdMachineryContractAlteration> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdMachineryContractAlteration::getId);
|
||||
lqw.eq(bo.getContractInformationId() != null, XzdMachineryContractAlteration::getContractInformationId, bo.getContractInformationId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReceiptsCode()), XzdMachineryContractAlteration::getReceiptsCode, bo.getReceiptsCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdMachineryContractAlteration::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocumentDate() != null, XzdMachineryContractAlteration::getDocumentDate, bo.getDocumentDate());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdMachineryContractAlteration::getContractName, bo.getContractName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdMachineryContractAlteration::getContractType, bo.getContractType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAlterationType()), XzdMachineryContractAlteration::getAlterationType, bo.getAlterationType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProject()), XzdMachineryContractAlteration::getProject, bo.getProject());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBusinessModel()), XzdMachineryContractAlteration::getBusinessModel, bo.getBusinessModel());
|
||||
lqw.eq(bo.getOriginalContractCost() != null, XzdMachineryContractAlteration::getOriginalContractCost, bo.getOriginalContractCost());
|
||||
lqw.eq(bo.getPaymentRatio() != null, XzdMachineryContractAlteration::getPaymentRatio, bo.getPaymentRatio());
|
||||
lqw.eq(bo.getPartyAUnit() != null, XzdMachineryContractAlteration::getPartyAUnit, bo.getPartyAUnit());
|
||||
lqw.eq(bo.getCentralizedPurchasingMode() != null, XzdMachineryContractAlteration::getCentralizedPurchasingMode, bo.getCentralizedPurchasingMode());
|
||||
lqw.eq(bo.getArtyBUnit() != null, XzdMachineryContractAlteration::getArtyBUnit, bo.getArtyBUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWarning()), XzdMachineryContractAlteration::getWarning, bo.getWarning());
|
||||
lqw.eq(bo.getCumulativeChangeAmount() != null, XzdMachineryContractAlteration::getCumulativeChangeAmount, bo.getCumulativeChangeAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdMachineryContractAlteration::getPaymentTerms, bo.getPaymentTerms());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdMachineryContractAlteration::getRemarks, bo.getRemarks());
|
||||
lqw.eq(bo.getBiangengyuanhetong() != null, XzdMachineryContractAlteration::getBiangengyuanhetong, bo.getBiangengyuanhetong());
|
||||
lqw.eq(bo.getIsSeal() != null, XzdMachineryContractAlteration::getIsSeal, bo.getIsSeal());
|
||||
lqw.eq(bo.getChangeProjectManager() != null, XzdMachineryContractAlteration::getChangeProjectManager, bo.getChangeProjectManager());
|
||||
lqw.eq(bo.getChangeProjectResponsible() != null, XzdMachineryContractAlteration::getChangeProjectResponsible, bo.getChangeProjectResponsible());
|
||||
lqw.eq(bo.getChangeSiteManager() != null, XzdMachineryContractAlteration::getChangeSiteManager, bo.getChangeSiteManager());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getChangeContractRemarks()), XzdMachineryContractAlteration::getChangeContractRemarks, bo.getChangeContractRemarks());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdMachineryContractAlteration::getProjectCategory, bo.getProjectCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdMachineryContractAlteration::getProjectType, bo.getProjectType());
|
||||
lqw.eq(bo.getPaymentNotExceedPayment() != null, XzdMachineryContractAlteration::getPaymentNotExceedPayment, bo.getPaymentNotExceedPayment());
|
||||
lqw.eq(bo.getPaymentNotExceedContractRatio() != null, XzdMachineryContractAlteration::getPaymentNotExceedContractRatio, bo.getPaymentNotExceedContractRatio());
|
||||
lqw.eq(bo.getPaymentNotExceedPaymentRatio() != null, XzdMachineryContractAlteration::getPaymentNotExceedPaymentRatio, bo.getPaymentNotExceedPaymentRatio());
|
||||
lqw.eq(bo.getPreSettlementNotExceedContract() != null, XzdMachineryContractAlteration::getPreSettlementNotExceedContract, bo.getPreSettlementNotExceedContract());
|
||||
lqw.eq(bo.getPreSettlementNotExceedContractRatio() != null, XzdMachineryContractAlteration::getPreSettlementNotExceedContractRatio, bo.getPreSettlementNotExceedContractRatio());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdMachineryContractAlteration::getFileId, bo.getFileId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdMachineryContractAlteration::getAuditStatus, bo.getAuditStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getChangeInTotalAmount()), XzdMachineryContractAlteration::getChangeInTotalAmount, bo.getChangeInTotalAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRevisedTotalAmount()), XzdMachineryContractAlteration::getRevisedTotalAmount, bo.getRevisedTotalAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractText()), XzdMachineryContractAlteration::getContractText, bo.getContractText());
|
||||
lqw.eq(bo.getDeptId() != null, XzdMachineryContractAlteration::getDeptId, bo.getDeptId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械合同变更
|
||||
*
|
||||
* @param bo 机械合同变更
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdMachineryContractAlterationBo bo) {
|
||||
XzdMachineryContractAlteration add = MapstructUtils.convert(bo, XzdMachineryContractAlteration.class);
|
||||
validEntityBeforeSave(add);
|
||||
String banBen = BatchNumberGenerator.generateBatchNumber("JXHTXX-");
|
||||
add.setReceiptsCode(banBen);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
String tableName = XzdClassEnum.JIXIEHETONGBIANG_XINXI.getClassName();
|
||||
//合同文本-预收款项
|
||||
for (XzdContractAdvanceInfo yskx : bo.getYskx()) {
|
||||
yskx.setTableName(tableName);
|
||||
yskx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractAdvanceInfoService.saveBatch(bo.getYskx());
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause clause : bo.getHttk()) {
|
||||
clause.setTableName(tableName);
|
||||
clause.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHttk());
|
||||
//印章信息
|
||||
if (bo.getSealInfo() != null && !bo.getSealInfo().isEmpty()){
|
||||
for (XzdBusinessChange sealInfo : bo.getSealInfo()) {
|
||||
sealInfo.setContractChangeId(add.getId());
|
||||
sealInfo.setType("14");
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
}
|
||||
// 机械列表
|
||||
if (bo.getJqlist() != null && !bo.getJqlist().isEmpty()){
|
||||
for (XzdEquipmentLeasing xzdEquipmentLeasing : bo.getJqlist()) {
|
||||
xzdEquipmentLeasing.setRelevanceId(add.getId());
|
||||
}
|
||||
xzdEquipmentLeasingService.saveBatch(bo.getJqlist());
|
||||
}
|
||||
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械合同变更
|
||||
*
|
||||
* @param bo 机械合同变更
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdMachineryContractAlterationBo bo) {
|
||||
XzdMachineryContractAlteration update = MapstructUtils.convert(bo, XzdMachineryContractAlteration.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
/**
|
||||
* 预收款项 优先删除数据在添加
|
||||
*/
|
||||
String tableName = XzdClassEnum.JIXIEHETONG_JINDU.getClassName();
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("contract_details_id", bo.getId());
|
||||
List<XzdContractAdvanceInfo> yskx = bo.getYskx();
|
||||
iXzdContractAdvanceInfoService.getBaseMapper().deleteByMap(hashMap);
|
||||
if (yskx != null){
|
||||
yskx.forEach(item -> {
|
||||
item.setTableName(tableName);
|
||||
item.setContractDetailsId(bo.getId());
|
||||
});
|
||||
iXzdContractAdvanceInfoService.saveBatch(yskx);
|
||||
}
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
List<XzdDeductionItems> kkyjlx = bo.getKkyjlx();
|
||||
iXzdDeductionItemsService.getBaseMapper().deleteByMap(hashMap);
|
||||
if(kkyjlx != null){
|
||||
kkyjlx.forEach(item -> {
|
||||
item.setTableName(tableName);
|
||||
item.setContractDetailsId(bo.getId());
|
||||
});
|
||||
iXzdDeductionItemsService.saveBatch(kkyjlx);
|
||||
}
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
List<XzdContractClause> httk = bo.getHttk();
|
||||
iXzdContractClauseService.getBaseMapper().deleteByMap(hashMap);
|
||||
if (httk != null){
|
||||
httk.forEach(item -> {
|
||||
item.setTableName(tableName);
|
||||
item.setContractDetailsId(bo.getId());
|
||||
});
|
||||
iXzdContractClauseService.saveBatch(httk);
|
||||
}
|
||||
// 机械租聘
|
||||
xzdEquipmentLeasingService.getBaseMapper().delete(new LambdaQueryWrapper<XzdEquipmentLeasing>().eq(XzdEquipmentLeasing::getRelevanceId,bo.getId()));
|
||||
if (bo.getJqlist() != null && !bo.getJqlist().isEmpty()){
|
||||
for (XzdEquipmentLeasing xzdEquipmentLeasing : bo.getJqlist()) {
|
||||
xzdEquipmentLeasing.setRelevanceId(update.getId());
|
||||
}
|
||||
xzdEquipmentLeasingService.saveBatch(bo.getJqlist());
|
||||
}
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdMachineryContractAlteration entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除机械合同变更信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
|
||||
for (Long id : ids) {
|
||||
XzdMachineryContractAlterationVo vo = baseMapper.selectVoById(id);
|
||||
if (vo != null){
|
||||
//删除附件
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//印章信息
|
||||
xzdBusinessChangeService.remove(new LambdaQueryWrapper<XzdBusinessChange>().in(XzdBusinessChange::getContractChangeId, ids));
|
||||
//合同文本-预收款项
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(XzdContractAdvanceInfo::getContractDetailsId, ids);
|
||||
xzdContractAdvanceInfoService.remove(lambdaQueryWrapper);
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids);
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper1);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids);
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper2);
|
||||
// 机械租聘
|
||||
xzdEquipmentLeasingService.getBaseMapper().delete(new LambdaQueryWrapper<XzdEquipmentLeasing>().in(XzdEquipmentLeasing::getRelevanceId,ids));
|
||||
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||
*
|
||||
* @param processEvent 参数
|
||||
*/
|
||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdjxhtbg')")
|
||||
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||
log.info("机械合同变更审核任务执行了{}", processEvent.toString());
|
||||
String id = processEvent.getBusinessId();
|
||||
XzdMachineryContractAlteration vo = baseMapper.selectById(Long.valueOf(id));
|
||||
if (vo == null) {
|
||||
return;
|
||||
}
|
||||
vo.setAuditStatus(processEvent.getStatus());
|
||||
this.updateById(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行任务创建监听
|
||||
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||
* 在方法中判断流程节点key
|
||||
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||
* //执行业务逻辑
|
||||
* }
|
||||
*
|
||||
* @param processTaskEvent 参数
|
||||
*/
|
||||
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdjxhtbg')")
|
||||
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||
log.info("机械合同变更审核任务创建了{}", processTaskEvent.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听删除流程事件
|
||||
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||
*
|
||||
* @param processDeleteEvent 参数
|
||||
*/
|
||||
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdjxhtbg')")
|
||||
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||
log.info("机械合同变更删除流程事件,机械合同变更审核任务执行了{}", processDeleteEvent.toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.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.contractManagement.jixiehetongxinxi.domain.vo.XzdContractMachineryVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.bo.XzdContractMachineryBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.service.IXzdContractMachineryService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 机械合同信息
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/jixiehetongxinxi/contractMachinery")
|
||||
public class XzdContractMachineryController extends BaseController {
|
||||
|
||||
private final IXzdContractMachineryService xzdContractMachineryService;
|
||||
|
||||
/**
|
||||
* 查询机械合同信息列表
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongxinxi:contractMachinery:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdContractMachineryVo> list(XzdContractMachineryBo bo, PageQuery pageQuery) {
|
||||
return xzdContractMachineryService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出机械合同信息列表
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongxinxi:contractMachinery:export")
|
||||
@Log(title = "机械合同信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdContractMachineryBo bo, HttpServletResponse response) {
|
||||
List<XzdContractMachineryVo> list = xzdContractMachineryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "机械合同信息", XzdContractMachineryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机械合同信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongxinxi:contractMachinery:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdContractMachineryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdContractMachineryService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械合同信息
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongxinxi:contractMachinery:add")
|
||||
@Log(title = "机械合同信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdContractMachineryBo bo) {
|
||||
return toAjax(xzdContractMachineryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械合同信息
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongxinxi:contractMachinery:edit")
|
||||
@Log(title = "机械合同信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdContractMachineryBo bo) {
|
||||
return toAjax(xzdContractMachineryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除机械合同信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongxinxi:contractMachinery:remove")
|
||||
@Log(title = "机械合同信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdContractMachineryService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,248 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 机械合同信息对象 xzd_contract_machinery
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_contract_machinery")
|
||||
public class XzdContractMachinery extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同类型,例如:主要物资采购合同
|
||||
*/
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessModel;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
private LocalDate signingDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 含税合同金额
|
||||
*/
|
||||
private BigDecimal taxInclusiveContractAmount;
|
||||
|
||||
/**
|
||||
* 合同状态,例如:新增
|
||||
*/
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
private LocalDate filingDate;
|
||||
|
||||
/**
|
||||
* 管理组织
|
||||
*/
|
||||
private Long managementOrganization;
|
||||
|
||||
/**
|
||||
* 开票单位(支持搜索,必填)
|
||||
*/
|
||||
private Long invoiceIssuingUnit;
|
||||
|
||||
/**
|
||||
* 收票单位(支持搜索,必填)
|
||||
*/
|
||||
private Long invoiceReceivingUnit;
|
||||
|
||||
/**
|
||||
* 警示信息
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private Long centralizedPurchasingMode;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long partyBUnit;
|
||||
|
||||
/**
|
||||
* 其他收入合同组织
|
||||
*/
|
||||
private Long otherIncomeContractOrganization;
|
||||
|
||||
/**
|
||||
* 其他收入合同项目
|
||||
*/
|
||||
private Long otherIncomeContractProject;
|
||||
|
||||
/**
|
||||
* 其他收入合同类型
|
||||
*/
|
||||
private Long otherIncomeContractType;
|
||||
|
||||
/**
|
||||
* 是否启用:1-是,0-否
|
||||
*/
|
||||
private Long isEnabled;
|
||||
|
||||
/**
|
||||
* 大写合同价税合计
|
||||
*/
|
||||
private String capitalizedTaxInclusiveTotal;
|
||||
|
||||
/**
|
||||
* 签约组织
|
||||
*/
|
||||
private Long signingOrganization;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 是否为固定单价合同:1-是,0-否
|
||||
*/
|
||||
private Long fixedUnitPriceContract;
|
||||
|
||||
/**
|
||||
* 是否为总价包干合同:1-是,0-否
|
||||
*/
|
||||
private Long lumpSumContract;
|
||||
|
||||
/**
|
||||
* 付款额是否不能超支付比例:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPaymentRatio;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPayment;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额支付比例
|
||||
*/
|
||||
private BigDecimal paymentNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算额是否不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long preSettlementNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算额不能超合同额比例
|
||||
*/
|
||||
private BigDecimal preSettlementNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 是否终止
|
||||
*/
|
||||
private String sfzz;
|
||||
|
||||
/**
|
||||
* 合同文本
|
||||
*/
|
||||
private String contractText;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 机械合同信息-设备租赁对象 xzd_equipment_leasing
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_equipment_leasing")
|
||||
public class XzdEquipmentLeasing extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联ID
|
||||
*/
|
||||
private Long relevanceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String specificationModel;
|
||||
|
||||
/**
|
||||
* 数量(台)
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 租赁金额(元/H)
|
||||
*/
|
||||
private BigDecimal rentalAmountPerHour;
|
||||
|
||||
/**
|
||||
* 工程量( H)
|
||||
*/
|
||||
private BigDecimal engineeringQuantity;
|
||||
|
||||
/**
|
||||
* 金额(元)
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,290 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.bo;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdContractMachinery;
|
||||
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.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机械合同信息业务对象 xzd_contract_machinery
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdContractMachinery.class, reverseConvertGenerate = false)
|
||||
public class XzdContractMachineryBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@NotBlank(message = "合同名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同类型,例如:主要物资采购合同
|
||||
*/
|
||||
@NotBlank(message = "合同类型,例如:主要物资采购合同不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@NotNull(message = "项目不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
private String businessModel;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
private LocalDate signingDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@NotNull(message = "甲方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 含税合同金额
|
||||
*/
|
||||
private BigDecimal taxInclusiveContractAmount;
|
||||
|
||||
/**
|
||||
* 合同状态,例如:新增
|
||||
*/
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
private LocalDate filingDate;
|
||||
|
||||
/**
|
||||
* 管理组织
|
||||
*/
|
||||
private Long managementOrganization;
|
||||
|
||||
/**
|
||||
* 开票单位(支持搜索,必填)
|
||||
*/
|
||||
@NotNull(message = "开票单位(支持搜索,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long invoiceIssuingUnit;
|
||||
|
||||
/**
|
||||
* 收票单位(支持搜索,必填)
|
||||
*/
|
||||
@NotNull(message = "收票单位(支持搜索,必填)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long invoiceReceivingUnit;
|
||||
|
||||
/**
|
||||
* 警示信息
|
||||
*/
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
private Long centralizedPurchasingMode;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@NotNull(message = "乙方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long partyBUnit;
|
||||
|
||||
/**
|
||||
* 其他收入合同组织
|
||||
*/
|
||||
private Long otherIncomeContractOrganization;
|
||||
|
||||
/**
|
||||
* 其他收入合同项目
|
||||
*/
|
||||
private Long otherIncomeContractProject;
|
||||
|
||||
/**
|
||||
* 其他收入合同类型
|
||||
*/
|
||||
private Long otherIncomeContractType;
|
||||
|
||||
/**
|
||||
* 是否启用:1-是,0-否
|
||||
*/
|
||||
private Long isEnabled;
|
||||
|
||||
/**
|
||||
* 大写合同价税合计
|
||||
*/
|
||||
private String capitalizedTaxInclusiveTotal;
|
||||
|
||||
/**
|
||||
* 签约组织
|
||||
*/
|
||||
private Long signingOrganization;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 是否为固定单价合同:1-是,0-否
|
||||
*/
|
||||
private Long fixedUnitPriceContract;
|
||||
|
||||
/**
|
||||
* 是否为总价包干合同:1-是,0-否
|
||||
*/
|
||||
private Long lumpSumContract;
|
||||
|
||||
/**
|
||||
* 付款额是否不能超支付比例:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPaymentRatio;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long paymentNotExceedPayment;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额支付比例
|
||||
*/
|
||||
private BigDecimal paymentNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算额是否不能超合同额:1-是,0-否
|
||||
*/
|
||||
private Long preSettlementNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算额不能超合同额比例
|
||||
*/
|
||||
private BigDecimal preSettlementNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 是否终止
|
||||
*/
|
||||
private String sfzz;
|
||||
|
||||
/**
|
||||
* 合同文本
|
||||
*/
|
||||
private String contractText;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
/**
|
||||
* 设备租聘列表
|
||||
*/
|
||||
|
||||
private List<XzdEquipmentLeasing> jqlist;
|
||||
|
||||
|
||||
/**
|
||||
* 预收款项
|
||||
*/
|
||||
private List<XzdContractAdvanceInfo> yskx;
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.bo;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 机械合同信息-设备租赁业务对象 xzd_equipment_leasing
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdEquipmentLeasing.class, reverseConvertGenerate = false)
|
||||
public class XzdEquipmentLeasingBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联ID
|
||||
*/
|
||||
private Long relevanceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String specificationModel;
|
||||
|
||||
/**
|
||||
* 数量(台)
|
||||
*/
|
||||
@NotNull(message = "数量(台)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 租赁金额(元/H)
|
||||
*/
|
||||
private BigDecimal rentalAmountPerHour;
|
||||
|
||||
/**
|
||||
* 工程量( H)
|
||||
*/
|
||||
private BigDecimal engineeringQuantity;
|
||||
|
||||
/**
|
||||
* 金额(元)
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,428 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdContractMachinery;
|
||||
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.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 机械合同信息视图对象 xzd_contract_machinery
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdContractMachinery.class)
|
||||
public class XzdContractMachineryVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同编码
|
||||
*/
|
||||
@ExcelProperty(value = "合同编码")
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同类型,例如:主要物资采购合同
|
||||
*/
|
||||
@ExcelProperty(value = "合同类型,例如:主要物资采购合同")
|
||||
private String contractType;
|
||||
/**
|
||||
* 阶段状态
|
||||
*/
|
||||
private String jdzt;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
private Long project;
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
@ExcelProperty(value = "项目")
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
|
||||
private String projectName;
|
||||
|
||||
|
||||
/**
|
||||
* 经营模式
|
||||
*/
|
||||
@ExcelProperty(value = "经营模式")
|
||||
private String businessModel;
|
||||
|
||||
/**
|
||||
* 原合同造价
|
||||
*/
|
||||
@ExcelProperty(value = "原合同造价")
|
||||
private BigDecimal originalContractCost;
|
||||
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
@ExcelProperty(value = "签订日期")
|
||||
private LocalDate signingDate;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 甲方单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位名称")
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyAUnit")
|
||||
private String partyAUnitName;
|
||||
|
||||
/**
|
||||
* 含税合同金额
|
||||
*/
|
||||
@ExcelProperty(value = "含税合同金额")
|
||||
private BigDecimal taxInclusiveContractAmount;
|
||||
|
||||
/**
|
||||
* 合同状态,例如:新增
|
||||
*/
|
||||
@ExcelProperty(value = "合同状态,例如:新增")
|
||||
private String contractStatus;
|
||||
|
||||
/**
|
||||
* 累计变更金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计变更金额")
|
||||
private BigDecimal cumulativeChangeAmount;
|
||||
|
||||
/**
|
||||
* 归档日期
|
||||
*/
|
||||
@ExcelProperty(value = "归档日期")
|
||||
private LocalDate filingDate;
|
||||
|
||||
/**
|
||||
* 管理组织
|
||||
*/
|
||||
@ExcelProperty(value = "管理组织")
|
||||
private Long managementOrganization;
|
||||
|
||||
/**
|
||||
* 管理组织名称
|
||||
*/
|
||||
@ExcelProperty(value = "管理组织名称")
|
||||
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "managementOrganization")
|
||||
private String managementOrganizationName;
|
||||
|
||||
|
||||
/**
|
||||
* 开票单位(支持搜索,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "开票单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "支=持搜索,必填")
|
||||
private Long invoiceIssuingUnit;
|
||||
|
||||
/**
|
||||
* 开票单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "开票单位名称", converter = ExcelDictConvert.class)
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "invoiceIssuingUnit")
|
||||
private String invoiceIssuingUnitName;
|
||||
|
||||
/**
|
||||
* 收票单位(支持搜索,必填)
|
||||
*/
|
||||
@ExcelProperty(value = "收票单位", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "支=持搜索,必填")
|
||||
private Long invoiceReceivingUnit;
|
||||
|
||||
/**
|
||||
* 收票单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "收票单位名称", converter = ExcelDictConvert.class)
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "invoiceReceivingUnit")
|
||||
private String invoiceReceivingUnitName;
|
||||
|
||||
/**
|
||||
* 警示信息
|
||||
*/
|
||||
@ExcelProperty(value = "警示信息")
|
||||
private String warning;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
@ExcelProperty(value = "备注说明")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 支付条款
|
||||
*/
|
||||
@ExcelProperty(value = "支付条款")
|
||||
private String paymentTerms;
|
||||
|
||||
/**
|
||||
* 集采模式
|
||||
*/
|
||||
@ExcelProperty(value = "集采模式")
|
||||
private Long centralizedPurchasingMode;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long partyBUnit;
|
||||
|
||||
/**
|
||||
* 乙方单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位名称")
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyBUnit")
|
||||
private String partyBUnitName;
|
||||
|
||||
/**
|
||||
* 其他收入合同组织
|
||||
*/
|
||||
@ExcelProperty(value = "其他收入合同组织")
|
||||
private Long otherIncomeContractOrganization;
|
||||
|
||||
/**
|
||||
* 其他收入合同组织名称
|
||||
*/
|
||||
@ExcelProperty(value = "其他收入合同组织名称")
|
||||
@Translation(type = TransConstant.DEPT_ID_TO_NAME, mapper = "otherIncomeContractOrganization")
|
||||
private String otherIncomeContractOrganizationName;
|
||||
|
||||
/**
|
||||
* 其他收入合同项目
|
||||
*/
|
||||
@ExcelProperty(value = "其他收入合同项目")
|
||||
private Long otherIncomeContractProject;
|
||||
|
||||
/**
|
||||
* 其他收入合同项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "其他收入合同项目名称")
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "otherIncomeContractProject")
|
||||
private String otherIncomeContractProjectName;
|
||||
|
||||
/**
|
||||
* 其他收入合同类型
|
||||
*/
|
||||
@ExcelProperty(value = "其他收入合同类型")
|
||||
private Long otherIncomeContractType;
|
||||
|
||||
/**
|
||||
* 是否启用:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用:1-是,0-否")
|
||||
private Long isEnabled;
|
||||
|
||||
/**
|
||||
* 大写合同价税合计
|
||||
*/
|
||||
@ExcelProperty(value = "大写合同价税合计")
|
||||
private String capitalizedTaxInclusiveTotal;
|
||||
|
||||
/**
|
||||
* 签约组织
|
||||
*/
|
||||
@ExcelProperty(value = "签约组织")
|
||||
private Long signingOrganization;
|
||||
|
||||
/**
|
||||
* 签约组织名称
|
||||
*/
|
||||
@ExcelProperty(value = "签约组织名称")
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "signingOrganization")
|
||||
private String signingOrganizationName;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
@ExcelProperty(value = "项目大类")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "是否用印:1-是,0-否")
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 是否为固定单价合同:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "是否为固定单价合同:1-是,0-否")
|
||||
private Long fixedUnitPriceContract;
|
||||
|
||||
/**
|
||||
* 是否为总价包干合同:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "是否为总价包干合同:1-是,0-否")
|
||||
private Long lumpSumContract;
|
||||
|
||||
/**
|
||||
* 付款额是否不能超支付比例:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "付款额是否不能超支付比例:1-是,0-否")
|
||||
private Long paymentNotExceedPaymentRatio;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不能超合同额:1-是,0-否")
|
||||
private Long paymentNotExceedPayment;
|
||||
|
||||
/**
|
||||
* 付款额不能超合同额支付比例
|
||||
*/
|
||||
@ExcelProperty(value = "付款额不能超合同额支付比例")
|
||||
private BigDecimal paymentNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 预结算/结算额是否不能超合同额:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算额是否不能超合同额:1-是,0-否")
|
||||
private Long preSettlementNotExceedContract;
|
||||
|
||||
/**
|
||||
* 预结算/结算额不能超合同额比例
|
||||
*/
|
||||
@ExcelProperty(value = "预结算/结算额不能超合同额比例")
|
||||
private BigDecimal preSettlementNotExceedContractRatio;
|
||||
|
||||
/**
|
||||
* 是否终止
|
||||
*/
|
||||
@ExcelProperty(value = "是否终止")
|
||||
private String sfzz;
|
||||
|
||||
/**
|
||||
* 合同文本
|
||||
*/
|
||||
@ExcelProperty(value = "合同文本")
|
||||
private String contractText;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createByName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@ExcelProperty(value = "组织id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
/**
|
||||
* 设备租聘列表
|
||||
*/
|
||||
|
||||
private List<XzdEquipmentLeasing> jqlist;
|
||||
|
||||
|
||||
/**
|
||||
* 预收款项
|
||||
*/
|
||||
private List<XzdContractAdvanceInfo> yskx;
|
||||
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
private List<XzdDeductionItems> kkyjlx;
|
||||
|
||||
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
private List<XzdContractClause> httk;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
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;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 机械合同信息-设备租赁视图对象 xzd_equipment_leasing
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdEquipmentLeasing.class)
|
||||
public class XzdEquipmentLeasingVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联ID")
|
||||
private Long relevanceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ExcelProperty(value = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
/**
|
||||
* 数量(台)
|
||||
*/
|
||||
@ExcelProperty(value = "数量(台)")
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 租赁金额(元/H)
|
||||
*/
|
||||
@ExcelProperty(value = "租赁金额(元/H)")
|
||||
private BigDecimal rentalAmountPerHour;
|
||||
|
||||
/**
|
||||
* 工程量( H)
|
||||
*/
|
||||
@ExcelProperty(value = "工程量( H)")
|
||||
private BigDecimal engineeringQuantity;
|
||||
|
||||
/**
|
||||
* 金额(元)
|
||||
*/
|
||||
@ExcelProperty(value = "金额(元)")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
private Date updatedTime;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.mapper;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdContractMachinery;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdContractMachineryVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 机械合同信息Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface XzdContractMachineryMapper extends BaseMapperPlus<XzdContractMachinery, XzdContractMachineryVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.mapper;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdEquipmentLeasingVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 机械合同信息-设备租赁Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface XzdEquipmentLeasingMapper extends BaseMapperPlus<XzdEquipmentLeasing, XzdEquipmentLeasingVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.service;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdContractMachineryVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.bo.XzdContractMachineryBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdContractMachinery;
|
||||
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-11-12
|
||||
*/
|
||||
public interface IXzdContractMachineryService extends IService<XzdContractMachinery>{
|
||||
|
||||
/**
|
||||
* 查询机械合同信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同信息
|
||||
*/
|
||||
XzdContractMachineryVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询机械合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同信息分页列表
|
||||
*/
|
||||
TableDataInfo<XzdContractMachineryVo> queryPageList(XzdContractMachineryBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同信息列表
|
||||
*/
|
||||
List<XzdContractMachineryVo> queryList(XzdContractMachineryBo bo);
|
||||
|
||||
/**
|
||||
* 新增机械合同信息
|
||||
*
|
||||
* @param bo 机械合同信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdContractMachineryBo bo);
|
||||
|
||||
/**
|
||||
* 修改机械合同信息
|
||||
*
|
||||
* @param bo 机械合同信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdContractMachineryBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除机械合同信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.service;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdEquipmentLeasingVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.bo.XzdEquipmentLeasingBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
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-11-12
|
||||
*/
|
||||
public interface IXzdEquipmentLeasingService extends IService<XzdEquipmentLeasing>{
|
||||
|
||||
/**
|
||||
* 查询机械合同信息-设备租赁
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同信息-设备租赁
|
||||
*/
|
||||
XzdEquipmentLeasingVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询机械合同信息-设备租赁列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同信息-设备租赁分页列表
|
||||
*/
|
||||
TableDataInfo<XzdEquipmentLeasingVo> queryPageList(XzdEquipmentLeasingBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同信息-设备租赁列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同信息-设备租赁列表
|
||||
*/
|
||||
List<XzdEquipmentLeasingVo> queryList(XzdEquipmentLeasingBo bo);
|
||||
|
||||
/**
|
||||
* 新增机械合同信息-设备租赁
|
||||
*
|
||||
* @param bo 机械合同信息-设备租赁
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdEquipmentLeasingBo bo);
|
||||
|
||||
/**
|
||||
* 修改机械合同信息-设备租赁
|
||||
*
|
||||
* @param bo 机械合同信息-设备租赁
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdEquipmentLeasingBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除机械合同信息-设备租赁信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,467 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||
import org.dromara.common.core.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.common.utils.BatchNumberGenerator;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.contractManagement.fenbaohetongbiangg.domain.XzdSubcontractChange;
|
||||
import org.dromara.xzd.contractManagement.fenbaohetongzhongzhi.domain.XzdSubcontractTermination;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.domain.XzdMachineryContractAlteration;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongbiang.service.IXzdMachineryContractAlterationService;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.service.IXzdEquipmentLeasingService;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.XzdMachineryContractSuspend;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.service.IXzdMachineryContractSuspendService;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.XzdContractAdvanceInfo;
|
||||
import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
|
||||
import org.dromara.xzd.enums.XzdClassEnum;
|
||||
import org.dromara.xzd.enums.ZxdEnum;
|
||||
import org.dromara.xzd.service.IXzdContractAdvanceInfoService;
|
||||
import org.dromara.xzd.service.IXzdContractClauseService;
|
||||
import org.dromara.xzd.service.IXzdDeductionItemsService;
|
||||
import org.dromara.xzd.service.impl.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.bo.XzdContractMachineryBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdContractMachineryVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdContractMachinery;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.mapper.XzdContractMachineryMapper;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.service.IXzdContractMachineryService;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 机械合同信息Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@Slf4j
|
||||
public class XzdContractMachineryServiceImpl extends ServiceImpl<XzdContractMachineryMapper, XzdContractMachinery> implements IXzdContractMachineryService {
|
||||
|
||||
private final XzdContractMachineryMapper baseMapper;
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessChangeServiceImpl xzdBusinessChangeService;
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessSealServiceImpl xzdBusinessSealService;
|
||||
|
||||
@Autowired
|
||||
private XzdContractAdvanceInfoServiceImpl xzdContractAdvanceInfoService;
|
||||
@Autowired
|
||||
private XzdDeductionItemsServiceImpl xzdDeductionItemsService;
|
||||
@Autowired
|
||||
private XzdContractClauseServiceImpl xzdContractClauseService;
|
||||
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
private IXzdMachineryContractSuspendService xzdMachineryContractSuspendService;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private IXzdMachineryContractAlterationService xzdMachineryContractAlterationService;
|
||||
|
||||
|
||||
|
||||
|
||||
private final IXzdContractAdvanceInfoService iXzdContractAdvanceInfoService;
|
||||
|
||||
private final IXzdDeductionItemsService iXzdDeductionItemsService;
|
||||
|
||||
private final IXzdContractClauseService iXzdContractClauseService;
|
||||
|
||||
|
||||
private final IXzdEquipmentLeasingService xzdEquipmentLeasingService;
|
||||
|
||||
/**
|
||||
* 查询机械合同信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同信息
|
||||
*/
|
||||
@Override
|
||||
public XzdContractMachineryVo queryById(Long id){
|
||||
XzdContractMachineryVo vo = baseMapper.selectVoById(id);
|
||||
List<XzdContractMachineryVo> res = List.of(vo);
|
||||
saveValue(res);
|
||||
return res.getFirst();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询机械合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdContractMachineryVo> queryPageList(XzdContractMachineryBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdContractMachinery> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdContractMachineryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
saveValue(result.getRecords());
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private void saveValue(List<XzdContractMachineryVo> infos) {
|
||||
for (XzdContractMachineryVo item : infos) {
|
||||
// 机械
|
||||
List<XzdEquipmentLeasing> xzdEquipmentLeasings = xzdEquipmentLeasingService.getBaseMapper().selectList(new LambdaQueryWrapper<XzdEquipmentLeasing>().eq(XzdEquipmentLeasing::getRelevanceId, item.getId()));
|
||||
if (xzdEquipmentLeasings != null && xzdEquipmentLeasings.size() > 0) {
|
||||
item.setJqlist(xzdEquipmentLeasings);
|
||||
}
|
||||
//印章信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> xzdBusinessChangeWrapper = new LambdaQueryWrapper<>();
|
||||
xzdBusinessChangeWrapper.eq(XzdBusinessChange::getContractChangeId, item.getId());
|
||||
List<XzdBusinessChange> xzdBusinessChanges = xzdBusinessChangeService.list(xzdBusinessChangeWrapper);
|
||||
for (XzdBusinessChange businessChange : xzdBusinessChanges) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
businessChange.setSealName(sealVo.getYzName());
|
||||
}
|
||||
}
|
||||
item.setSealInfo(xzdBusinessChanges);
|
||||
//合同文本-预收款项
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(XzdContractAdvanceInfo::getContractDetailsId, item.getId());
|
||||
List<XzdContractAdvanceInfo> advanceInfos = xzdContractAdvanceInfoService.list(lambdaQueryWrapper);
|
||||
item.setYskx(advanceInfos);
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(XzdDeductionItems::getContractDetailsId, item.getId());
|
||||
List<XzdDeductionItems> list = xzdDeductionItemsService.list(lambdaQueryWrapper1);
|
||||
item.setKkyjlx(list);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.eq(XzdContractClause::getContractDetailsId, item.getId());
|
||||
List<XzdContractClause> list1 = xzdContractClauseService.list(lambdaQueryWrapper2);
|
||||
item.setHttk(list1);
|
||||
// 阶段状态
|
||||
item.setJdzt(ZxdEnum.HETONGZTYS.getTypeValue());
|
||||
Long l = xzdMachineryContractAlterationService.getBaseMapper().selectCount(new LambdaQueryWrapper<XzdMachineryContractAlteration>().eq(XzdMachineryContractAlteration::getContractInformationId, item.getId()));
|
||||
if (l > 0) {
|
||||
item.setJdzt(ZxdEnum.HETONGZTBG.getTypeValue());
|
||||
}
|
||||
Long l1 = xzdMachineryContractSuspendService.getBaseMapper().selectCount(new LambdaQueryWrapper<XzdMachineryContractSuspend>().eq(XzdMachineryContractSuspend::getContractInformationId, item.getId()));
|
||||
if (l1 > 0) {
|
||||
item.setJdzt(ZxdEnum.HETONGZTZZ.getTypeValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdContractMachineryVo> queryList(XzdContractMachineryBo bo) {
|
||||
LambdaQueryWrapper<XzdContractMachinery> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdContractMachinery> buildQueryWrapper(XzdContractMachineryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdContractMachinery> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdContractMachinery::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractCode()), XzdContractMachinery::getContractCode, bo.getContractCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdContractMachinery::getContractName, bo.getContractName());
|
||||
lqw.eq(bo.getDocumentDate() != null, XzdContractMachinery::getDocumentDate, bo.getDocumentDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractType()), XzdContractMachinery::getContractType, bo.getContractType());
|
||||
lqw.eq(bo.getProject() != null, XzdContractMachinery::getProject, bo.getProject());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getBusinessModel()), XzdContractMachinery::getBusinessModel, bo.getBusinessModel());
|
||||
lqw.eq(bo.getOriginalContractCost() != null, XzdContractMachinery::getOriginalContractCost, bo.getOriginalContractCost());
|
||||
lqw.eq(bo.getSigningDate() != null, XzdContractMachinery::getSigningDate, bo.getSigningDate());
|
||||
lqw.eq(bo.getPartyAUnit() != null, XzdContractMachinery::getPartyAUnit, bo.getPartyAUnit());
|
||||
lqw.eq(bo.getTaxInclusiveContractAmount() != null, XzdContractMachinery::getTaxInclusiveContractAmount, bo.getTaxInclusiveContractAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractStatus()), XzdContractMachinery::getContractStatus, bo.getContractStatus());
|
||||
lqw.eq(bo.getCumulativeChangeAmount() != null, XzdContractMachinery::getCumulativeChangeAmount, bo.getCumulativeChangeAmount());
|
||||
lqw.eq(bo.getFilingDate() != null, XzdContractMachinery::getFilingDate, bo.getFilingDate());
|
||||
lqw.eq(bo.getManagementOrganization() != null, XzdContractMachinery::getManagementOrganization, bo.getManagementOrganization());
|
||||
lqw.eq(bo.getInvoiceIssuingUnit() != null, XzdContractMachinery::getInvoiceIssuingUnit, bo.getInvoiceIssuingUnit());
|
||||
lqw.eq(bo.getInvoiceReceivingUnit() != null, XzdContractMachinery::getInvoiceReceivingUnit, bo.getInvoiceReceivingUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWarning()), XzdContractMachinery::getWarning, bo.getWarning());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdContractMachinery::getRemarks, bo.getRemarks());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdContractMachinery::getPaymentTerms, bo.getPaymentTerms());
|
||||
lqw.eq(bo.getCentralizedPurchasingMode() != null, XzdContractMachinery::getCentralizedPurchasingMode, bo.getCentralizedPurchasingMode());
|
||||
lqw.eq(bo.getPartyBUnit() != null, XzdContractMachinery::getPartyBUnit, bo.getPartyBUnit());
|
||||
lqw.eq(bo.getOtherIncomeContractOrganization() != null, XzdContractMachinery::getOtherIncomeContractOrganization, bo.getOtherIncomeContractOrganization());
|
||||
lqw.eq(bo.getOtherIncomeContractProject() != null, XzdContractMachinery::getOtherIncomeContractProject, bo.getOtherIncomeContractProject());
|
||||
lqw.eq(bo.getOtherIncomeContractType() != null, XzdContractMachinery::getOtherIncomeContractType, bo.getOtherIncomeContractType());
|
||||
lqw.eq(bo.getIsEnabled() != null, XzdContractMachinery::getIsEnabled, bo.getIsEnabled());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCapitalizedTaxInclusiveTotal()), XzdContractMachinery::getCapitalizedTaxInclusiveTotal, bo.getCapitalizedTaxInclusiveTotal());
|
||||
lqw.eq(bo.getSigningOrganization() != null, XzdContractMachinery::getSigningOrganization, bo.getSigningOrganization());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdContractMachinery::getProjectType, bo.getProjectType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdContractMachinery::getProjectCategory, bo.getProjectCategory());
|
||||
lqw.eq(bo.getIsSeal() != null, XzdContractMachinery::getIsSeal, bo.getIsSeal());
|
||||
lqw.eq(bo.getFixedUnitPriceContract() != null, XzdContractMachinery::getFixedUnitPriceContract, bo.getFixedUnitPriceContract());
|
||||
lqw.eq(bo.getLumpSumContract() != null, XzdContractMachinery::getLumpSumContract, bo.getLumpSumContract());
|
||||
lqw.eq(bo.getPaymentNotExceedPaymentRatio() != null, XzdContractMachinery::getPaymentNotExceedPaymentRatio, bo.getPaymentNotExceedPaymentRatio());
|
||||
lqw.eq(bo.getPaymentNotExceedPayment() != null, XzdContractMachinery::getPaymentNotExceedPayment, bo.getPaymentNotExceedPayment());
|
||||
lqw.eq(bo.getPaymentNotExceedContractRatio() != null, XzdContractMachinery::getPaymentNotExceedContractRatio, bo.getPaymentNotExceedContractRatio());
|
||||
lqw.eq(bo.getPreSettlementNotExceedContract() != null, XzdContractMachinery::getPreSettlementNotExceedContract, bo.getPreSettlementNotExceedContract());
|
||||
lqw.eq(bo.getPreSettlementNotExceedContractRatio() != null, XzdContractMachinery::getPreSettlementNotExceedContractRatio, bo.getPreSettlementNotExceedContractRatio());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSfzz()), XzdContractMachinery::getSfzz, bo.getSfzz());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContractText()), XzdContractMachinery::getContractText, bo.getContractText());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractMachinery::getFileId, bo.getFileId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdContractMachinery::getAuditStatus, bo.getAuditStatus());
|
||||
lqw.eq(bo.getDeptId() != null, XzdContractMachinery::getDeptId, bo.getDeptId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械合同信息
|
||||
*
|
||||
* @param bo 机械合同信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdContractMachineryBo bo) {
|
||||
XzdContractMachinery add = MapstructUtils.convert(bo, XzdContractMachinery.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
|
||||
String banBen = BatchNumberGenerator.generateBatchNumber("JXHTXX-");
|
||||
add.setContractCode(banBen);
|
||||
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
String tableName = XzdClassEnum.JIXIEHETONG_JINDU.getClassName();
|
||||
//合同文本-预收款项
|
||||
for (XzdContractAdvanceInfo yskx : bo.getYskx()) {
|
||||
yskx.setTableName(tableName);
|
||||
yskx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractAdvanceInfoService.saveBatch(bo.getYskx());
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
for (XzdDeductionItems kkyjlx : bo.getKkyjlx()) {
|
||||
kkyjlx.setTableName(tableName);
|
||||
kkyjlx.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdDeductionItemsService.saveBatch(bo.getKkyjlx());
|
||||
|
||||
//合同条款-合同条款
|
||||
for (XzdContractClause clause : bo.getHttk()) {
|
||||
clause.setTableName(tableName);
|
||||
clause.setContractDetailsId(add.getId());
|
||||
}
|
||||
xzdContractClauseService.saveBatch(bo.getHttk());
|
||||
//印章信息
|
||||
if (bo.getSealInfo() != null && !bo.getSealInfo().isEmpty()){
|
||||
for (XzdBusinessChange sealInfo : bo.getSealInfo()) {
|
||||
sealInfo.setContractChangeId(add.getId());
|
||||
sealInfo.setType("13");
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
}
|
||||
// 机械列表
|
||||
if (bo.getJqlist() != null && !bo.getJqlist().isEmpty()){
|
||||
for (XzdEquipmentLeasing xzdEquipmentLeasing : bo.getJqlist()) {
|
||||
xzdEquipmentLeasing.setRelevanceId(add.getId());
|
||||
}
|
||||
xzdEquipmentLeasingService.saveBatch(bo.getJqlist());
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械合同信息
|
||||
*
|
||||
* @param bo 机械合同信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdContractMachineryBo bo) {
|
||||
XzdContractMachinery update = MapstructUtils.convert(bo, XzdContractMachinery.class);
|
||||
validEntityBeforeSave(update);
|
||||
/**
|
||||
* 预收款项 优先删除数据在添加
|
||||
*/
|
||||
String tableName = XzdClassEnum.JIXIEHETONG_JINDU.getClassName();
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("contract_details_id", bo.getId());
|
||||
List<XzdContractAdvanceInfo> yskx = bo.getYskx();
|
||||
iXzdContractAdvanceInfoService.getBaseMapper().deleteByMap(hashMap);
|
||||
if (yskx != null){
|
||||
yskx.forEach(item -> {
|
||||
item.setTableName(tableName);
|
||||
item.setContractDetailsId(bo.getId());
|
||||
});
|
||||
iXzdContractAdvanceInfoService.saveBatch(yskx);
|
||||
}
|
||||
/**
|
||||
* 扣款与奖励项
|
||||
*/
|
||||
List<XzdDeductionItems> kkyjlx = bo.getKkyjlx();
|
||||
iXzdDeductionItemsService.getBaseMapper().deleteByMap(hashMap);
|
||||
if(kkyjlx != null){
|
||||
kkyjlx.forEach(item -> {
|
||||
item.setTableName(tableName);
|
||||
item.setContractDetailsId(bo.getId());
|
||||
});
|
||||
iXzdDeductionItemsService.saveBatch(kkyjlx);
|
||||
}
|
||||
/**
|
||||
* 合同条款
|
||||
*/
|
||||
List<XzdContractClause> httk = bo.getHttk();
|
||||
iXzdContractClauseService.getBaseMapper().deleteByMap(hashMap);
|
||||
if (httk != null){
|
||||
httk.forEach(item -> {
|
||||
item.setTableName(tableName);
|
||||
item.setContractDetailsId(bo.getId());
|
||||
});
|
||||
iXzdContractClauseService.saveBatch(httk);
|
||||
}
|
||||
// 机械租聘
|
||||
xzdEquipmentLeasingService.getBaseMapper().delete(new LambdaQueryWrapper<XzdEquipmentLeasing>().eq(XzdEquipmentLeasing::getRelevanceId,bo.getId()));
|
||||
if (bo.getJqlist() != null && !bo.getJqlist().isEmpty()){
|
||||
for (XzdEquipmentLeasing xzdEquipmentLeasing : bo.getJqlist()) {
|
||||
xzdEquipmentLeasing.setRelevanceId(update.getId());
|
||||
}
|
||||
xzdEquipmentLeasingService.saveBatch(bo.getJqlist());
|
||||
}
|
||||
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdContractMachinery entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除机械合同信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
for (Long id : ids) {
|
||||
XzdContractMachineryVo vo = baseMapper.selectVoById(id);
|
||||
if (vo != null){
|
||||
//删除附件
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//印章信息
|
||||
xzdBusinessChangeService.remove(new LambdaQueryWrapper<XzdBusinessChange>().in(XzdBusinessChange::getContractChangeId, ids));
|
||||
//合同文本-预收款项
|
||||
LambdaQueryWrapper<XzdContractAdvanceInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(XzdContractAdvanceInfo::getContractDetailsId, ids);
|
||||
xzdContractAdvanceInfoService.remove(lambdaQueryWrapper);
|
||||
|
||||
//合同条款-扣款与奖励项
|
||||
LambdaQueryWrapper<XzdDeductionItems> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.in(XzdDeductionItems::getContractDetailsId, ids);
|
||||
xzdDeductionItemsService.remove(lambdaQueryWrapper1);
|
||||
|
||||
//合同条款-合同条款
|
||||
LambdaQueryWrapper<XzdContractClause> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper2.in(XzdContractClause::getContractDetailsId, ids);
|
||||
xzdContractClauseService.remove(lambdaQueryWrapper2);
|
||||
// 机械租聘
|
||||
xzdEquipmentLeasingService.getBaseMapper().delete(new LambdaQueryWrapper<XzdEquipmentLeasing>().in(XzdEquipmentLeasing::getRelevanceId,ids));
|
||||
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||
*
|
||||
* @param processEvent 参数
|
||||
*/
|
||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdjxsp')")
|
||||
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||
log.info("机械合同信息审核任务执行了{}", processEvent.toString());
|
||||
String id = processEvent.getBusinessId();
|
||||
XzdContractMachinery vo = baseMapper.selectById(Long.valueOf(id));
|
||||
if (vo == null) {
|
||||
return;
|
||||
}
|
||||
vo.setAuditStatus(processEvent.getStatus());
|
||||
this.updateById(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行任务创建监听
|
||||
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||
* 在方法中判断流程节点key
|
||||
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||
* //执行业务逻辑
|
||||
* }
|
||||
*
|
||||
* @param processTaskEvent 参数
|
||||
*/
|
||||
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdjxsp')")
|
||||
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||
log.info("机械合同信息审核任务创建了{}", processTaskEvent.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听删除流程事件
|
||||
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||
*
|
||||
* @param processDeleteEvent 参数
|
||||
*/
|
||||
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdjxsp')")
|
||||
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||
log.info("机械合同信息删除流程事件,机械合同信息审核任务执行了{}", processDeleteEvent.toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,139 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongxinxi.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.contractManagement.jixiehetongxinxi.domain.bo.XzdEquipmentLeasingBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdEquipmentLeasingVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdEquipmentLeasing;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.mapper.XzdEquipmentLeasingMapper;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.service.IXzdEquipmentLeasingService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 机械合同信息-设备租赁Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class XzdEquipmentLeasingServiceImpl extends ServiceImpl<XzdEquipmentLeasingMapper, XzdEquipmentLeasing> implements IXzdEquipmentLeasingService {
|
||||
|
||||
private final XzdEquipmentLeasingMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询机械合同信息-设备租赁
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同信息-设备租赁
|
||||
*/
|
||||
@Override
|
||||
public XzdEquipmentLeasingVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询机械合同信息-设备租赁列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同信息-设备租赁分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdEquipmentLeasingVo> queryPageList(XzdEquipmentLeasingBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdEquipmentLeasing> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdEquipmentLeasingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同信息-设备租赁列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同信息-设备租赁列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdEquipmentLeasingVo> queryList(XzdEquipmentLeasingBo bo) {
|
||||
LambdaQueryWrapper<XzdEquipmentLeasing> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdEquipmentLeasing> buildQueryWrapper(XzdEquipmentLeasingBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdEquipmentLeasing> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdEquipmentLeasing::getId);
|
||||
lqw.eq(bo.getRelevanceId() != null, XzdEquipmentLeasing::getRelevanceId, bo.getRelevanceId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getEquipmentName()), XzdEquipmentLeasing::getEquipmentName, bo.getEquipmentName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecificationModel()), XzdEquipmentLeasing::getSpecificationModel, bo.getSpecificationModel());
|
||||
lqw.eq(bo.getQuantity() != null, XzdEquipmentLeasing::getQuantity, bo.getQuantity());
|
||||
lqw.eq(bo.getRentalAmountPerHour() != null, XzdEquipmentLeasing::getRentalAmountPerHour, bo.getRentalAmountPerHour());
|
||||
lqw.eq(bo.getEngineeringQuantity() != null, XzdEquipmentLeasing::getEngineeringQuantity, bo.getEngineeringQuantity());
|
||||
lqw.eq(bo.getTotalAmount() != null, XzdEquipmentLeasing::getTotalAmount, bo.getTotalAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdEquipmentLeasing::getRemarks, bo.getRemarks());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdEquipmentLeasing::getAuditStatus, bo.getAuditStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械合同信息-设备租赁
|
||||
*
|
||||
* @param bo 机械合同信息-设备租赁
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdEquipmentLeasingBo bo) {
|
||||
XzdEquipmentLeasing add = MapstructUtils.convert(bo, XzdEquipmentLeasing.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械合同信息-设备租赁
|
||||
*
|
||||
* @param bo 机械合同信息-设备租赁
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdEquipmentLeasingBo bo) {
|
||||
XzdEquipmentLeasing update = MapstructUtils.convert(bo, XzdEquipmentLeasing.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdEquipmentLeasing 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,105 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongzz.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.contractManagement.jixiehetongzz.domain.vo.XzdMachineryContractSuspendVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.bo.XzdMachineryContractSuspendBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.service.IXzdMachineryContractSuspendService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 机械合同终止
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/xzd/jixiehetongzz/machineryContractSuspend")
|
||||
public class XzdMachineryContractSuspendController extends BaseController {
|
||||
|
||||
private final IXzdMachineryContractSuspendService xzdMachineryContractSuspendService;
|
||||
|
||||
/**
|
||||
* 查询机械合同终止列表
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongzz:machineryContractSuspend:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<XzdMachineryContractSuspendVo> list(XzdMachineryContractSuspendBo bo, PageQuery pageQuery) {
|
||||
return xzdMachineryContractSuspendService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出机械合同终止列表
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongzz:machineryContractSuspend:export")
|
||||
@Log(title = "机械合同终止", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(XzdMachineryContractSuspendBo bo, HttpServletResponse response) {
|
||||
List<XzdMachineryContractSuspendVo> list = xzdMachineryContractSuspendService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "机械合同终止", XzdMachineryContractSuspendVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机械合同终止详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongzz:machineryContractSuspend:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<XzdMachineryContractSuspendVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(xzdMachineryContractSuspendService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械合同终止
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongzz:machineryContractSuspend:add")
|
||||
@Log(title = "机械合同终止", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdMachineryContractSuspendBo bo) {
|
||||
return toAjax(xzdMachineryContractSuspendService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械合同终止
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongzz:machineryContractSuspend:edit")
|
||||
@Log(title = "机械合同终止", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdMachineryContractSuspendBo bo) {
|
||||
return toAjax(xzdMachineryContractSuspendService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除机械合同终止
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("jixiehetongzz:machineryContractSuspend:remove")
|
||||
@Log(title = "机械合同终止", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(xzdMachineryContractSuspendService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,138 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongzz.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 机械合同终止对象 xzd_machinery_contract_suspend
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("xzd_machinery_contract_suspend")
|
||||
public class XzdMachineryContractSuspend extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
private LocalDate terminationDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
private String terminationCause;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额
|
||||
*/
|
||||
private BigDecimal cumulativeSettlementAmount;
|
||||
|
||||
/**
|
||||
* 累计付款金额
|
||||
*/
|
||||
private BigDecimal cumulativePaymentAmount;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,153 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongzz.domain.bo;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.XzdMachineryContractSuspend;
|
||||
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.XzdBusinessChange;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机械合同终止业务对象 xzd_machinery_contract_suspend
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = XzdMachineryContractSuspend.class, reverseConvertGenerate = false)
|
||||
public class XzdMachineryContractSuspendBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@NotNull(message = "单据日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@NotBlank(message = "合同名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
@NotNull(message = "终止日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private LocalDate terminationDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@NotNull(message = "乙方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@NotNull(message = "甲方单位不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
@NotBlank(message = "终止原因不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String terminationCause;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额
|
||||
*/
|
||||
private BigDecimal cumulativeSettlementAmount;
|
||||
|
||||
/**
|
||||
* 累计付款金额
|
||||
*/
|
||||
private BigDecimal cumulativePaymentAmount;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,226 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongzz.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.XzdMachineryContractSuspend;
|
||||
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.XzdBusinessChange;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 机械合同终止视图对象 xzd_machinery_contract_suspend
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = XzdMachineryContractSuspend.class)
|
||||
public class XzdMachineryContractSuspendVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
@ExcelProperty(value = "合同信息ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "合=同编码")
|
||||
private Long contractInformationId;
|
||||
|
||||
/**
|
||||
* 合同信息ID(合同编码)
|
||||
*/
|
||||
@ExcelDictFormat(readConverterExp = "合=同编码")
|
||||
private String contractInformationIdName;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
@ExcelProperty(value = "单据编码")
|
||||
private String receiptsCode;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ExcelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 单据日期
|
||||
*/
|
||||
@ExcelProperty(value = "单据日期")
|
||||
private LocalDate documentDate;
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@ExcelProperty(value = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 终止日期
|
||||
*/
|
||||
@ExcelProperty(value = "终止日期")
|
||||
private LocalDate terminationDate;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String project;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
@Translation(type = TransConstant.XZD_PROJECT_ID_TO_NAME, mapper = "project")
|
||||
private String projectName;
|
||||
/**
|
||||
* 乙方单位
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位")
|
||||
private Long artyBUnit;
|
||||
|
||||
/**
|
||||
* 乙方单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "乙方单位名称")
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "artyBUnit")
|
||||
private String artyBUnitName;
|
||||
|
||||
|
||||
/**
|
||||
* 甲方单位
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位")
|
||||
private Long partyAUnit;
|
||||
|
||||
/**
|
||||
* 甲方单位名称
|
||||
*/
|
||||
@ExcelProperty(value = "甲方单位名称")
|
||||
@Translation(type = TransConstant.XZD_KHXX_ID_TO_NAME, mapper = "partyAUnit")
|
||||
private String partyAUnitName;
|
||||
|
||||
/**
|
||||
* 终止原因
|
||||
*/
|
||||
@ExcelProperty(value = "终止原因")
|
||||
private String terminationCause;
|
||||
|
||||
/**
|
||||
* 项目大类
|
||||
*/
|
||||
@ExcelProperty(value = "项目大类")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 备注说明
|
||||
*/
|
||||
@ExcelProperty(value = "备注说明")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@ExcelProperty(value = "合同金额")
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/**
|
||||
* 累计结算金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计结算金额")
|
||||
private BigDecimal cumulativeSettlementAmount;
|
||||
|
||||
/**
|
||||
* 累计付款金额
|
||||
*/
|
||||
@ExcelProperty(value = "累计付款金额")
|
||||
private BigDecimal cumulativePaymentAmount;
|
||||
|
||||
/**
|
||||
* 是否用印:1-是,0-否
|
||||
*/
|
||||
@ExcelProperty(value = "是否用印:1-是,0-否")
|
||||
private Long isSeal;
|
||||
|
||||
/**
|
||||
* 文件ID
|
||||
*/
|
||||
@ExcelProperty(value = "文件ID")
|
||||
private String fileId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@ExcelProperty(value = "组织id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createByName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 印章信息
|
||||
*/
|
||||
private List<XzdBusinessChange> sealInfo;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongzz.mapper;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.XzdMachineryContractSuspend;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.vo.XzdMachineryContractSuspendVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 机械合同终止Mapper接口
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface XzdMachineryContractSuspendMapper extends BaseMapperPlus<XzdMachineryContractSuspend, XzdMachineryContractSuspendVo> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongzz.service;
|
||||
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.vo.XzdMachineryContractSuspendVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.bo.XzdMachineryContractSuspendBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.XzdMachineryContractSuspend;
|
||||
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-11-12
|
||||
*/
|
||||
public interface IXzdMachineryContractSuspendService extends IService<XzdMachineryContractSuspend>{
|
||||
|
||||
/**
|
||||
* 查询机械合同终止
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同终止
|
||||
*/
|
||||
XzdMachineryContractSuspendVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询机械合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同终止分页列表
|
||||
*/
|
||||
TableDataInfo<XzdMachineryContractSuspendVo> queryPageList(XzdMachineryContractSuspendBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同终止列表
|
||||
*/
|
||||
List<XzdMachineryContractSuspendVo> queryList(XzdMachineryContractSuspendBo bo);
|
||||
|
||||
/**
|
||||
* 新增机械合同终止
|
||||
*
|
||||
* @param bo 机械合同终止
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(XzdMachineryContractSuspendBo bo);
|
||||
|
||||
/**
|
||||
* 修改机械合同终止
|
||||
*
|
||||
* @param bo 机械合同终止
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(XzdMachineryContractSuspendBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除机械合同终止信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@ -0,0 +1,308 @@
|
||||
package org.dromara.xzd.contractManagement.jixiehetongzz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.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.common.utils.BatchNumberGenerator;
|
||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.XzdPurchaseContractSuspend;
|
||||
import org.dromara.xzd.contractManagement.caigoucontractTermination.domain.vo.XzdPurchaseContractSuspendVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.XzdContractMachinery;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.domain.vo.XzdContractMachineryVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongxinxi.mapper.XzdContractMachineryMapper;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.XzdPurchaseContractInformation;
|
||||
import org.dromara.xzd.contractManagement.purchaseManagement.domain.vo.XzdPurchaseContractInformationVo;
|
||||
import org.dromara.xzd.domain.XzdBusinessChange;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
|
||||
import org.dromara.xzd.service.impl.XzdBusinessChangeServiceImpl;
|
||||
import org.dromara.xzd.service.impl.XzdBusinessSealServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.bo.XzdMachineryContractSuspendBo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.vo.XzdMachineryContractSuspendVo;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.domain.XzdMachineryContractSuspend;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.mapper.XzdMachineryContractSuspendMapper;
|
||||
import org.dromara.xzd.contractManagement.jixiehetongzz.service.IXzdMachineryContractSuspendService;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 机械合同终止Service业务层处理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@Slf4j
|
||||
public class XzdMachineryContractSuspendServiceImpl extends ServiceImpl<XzdMachineryContractSuspendMapper, XzdMachineryContractSuspend> implements IXzdMachineryContractSuspendService {
|
||||
|
||||
private final XzdMachineryContractSuspendMapper baseMapper;
|
||||
|
||||
private final XzdContractMachineryMapper xzdContractMachineryMapper;
|
||||
|
||||
@Autowired
|
||||
private SysOssServiceImpl sysOssService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessChangeServiceImpl xzdBusinessChangeService;
|
||||
|
||||
@Autowired
|
||||
private XzdBusinessSealServiceImpl xzdBusinessSealService;
|
||||
/**
|
||||
* 查询机械合同终止
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 机械合同终止
|
||||
*/
|
||||
@Override
|
||||
public XzdMachineryContractSuspendVo queryById(Long id){
|
||||
|
||||
XzdMachineryContractSuspendVo vo = baseMapper.selectVoById(id);
|
||||
List<XzdMachineryContractSuspendVo> res = List.of(vo);
|
||||
saveValue(res);
|
||||
return res.getFirst();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询机械合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 机械合同终止分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<XzdMachineryContractSuspendVo> queryPageList(XzdMachineryContractSuspendBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<XzdMachineryContractSuspend> lqw = buildQueryWrapper(bo);
|
||||
Page<XzdMachineryContractSuspendVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
saveValue(result.getRecords());
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private void saveValue(List<XzdMachineryContractSuspendVo> records) {
|
||||
for (XzdMachineryContractSuspendVo item : records) {
|
||||
// 合同信息编码
|
||||
if (item.getContractInformationId() != null){
|
||||
XzdContractMachineryVo queryById = xzdContractMachineryMapper.selectVoById(item.getContractInformationId());
|
||||
if (queryById != null){
|
||||
item.setContractInformationIdName(queryById.getContractCode());
|
||||
}
|
||||
}
|
||||
|
||||
//印章信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> xzdBusinessChangeWrapper = new LambdaQueryWrapper<>();
|
||||
xzdBusinessChangeWrapper.eq(XzdBusinessChange::getContractChangeId, item.getId());
|
||||
List<XzdBusinessChange> xzdBusinessChanges = xzdBusinessChangeService.list(xzdBusinessChangeWrapper);
|
||||
for (XzdBusinessChange businessChange : xzdBusinessChanges) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
businessChange.setSealName(sealVo.getYzName());
|
||||
}
|
||||
}
|
||||
item.setSealInfo(xzdBusinessChanges);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的机械合同终止列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 机械合同终止列表
|
||||
*/
|
||||
@Override
|
||||
public List<XzdMachineryContractSuspendVo> queryList(XzdMachineryContractSuspendBo bo) {
|
||||
LambdaQueryWrapper<XzdMachineryContractSuspend> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<XzdMachineryContractSuspend> buildQueryWrapper(XzdMachineryContractSuspendBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<XzdMachineryContractSuspend> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(XzdMachineryContractSuspend::getId);
|
||||
lqw.eq(bo.getContractInformationId() != null, XzdMachineryContractSuspend::getContractInformationId, bo.getContractInformationId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReceiptsCode()), XzdMachineryContractSuspend::getReceiptsCode, bo.getReceiptsCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTitle()), XzdMachineryContractSuspend::getTitle, bo.getTitle());
|
||||
lqw.eq(bo.getDocumentDate() != null, XzdMachineryContractSuspend::getDocumentDate, bo.getDocumentDate());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractName()), XzdMachineryContractSuspend::getContractName, bo.getContractName());
|
||||
lqw.eq(bo.getTerminationDate() != null, XzdMachineryContractSuspend::getTerminationDate, bo.getTerminationDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProject()), XzdMachineryContractSuspend::getProject, bo.getProject());
|
||||
lqw.eq(bo.getArtyBUnit() != null, XzdMachineryContractSuspend::getArtyBUnit, bo.getArtyBUnit());
|
||||
lqw.eq(bo.getPartyAUnit() != null, XzdMachineryContractSuspend::getPartyAUnit, bo.getPartyAUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTerminationCause()), XzdMachineryContractSuspend::getTerminationCause, bo.getTerminationCause());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdMachineryContractSuspend::getProjectCategory, bo.getProjectCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectType()), XzdMachineryContractSuspend::getProjectType, bo.getProjectType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdMachineryContractSuspend::getRemarks, bo.getRemarks());
|
||||
lqw.eq(bo.getContractAmount() != null, XzdMachineryContractSuspend::getContractAmount, bo.getContractAmount());
|
||||
lqw.eq(bo.getCumulativeSettlementAmount() != null, XzdMachineryContractSuspend::getCumulativeSettlementAmount, bo.getCumulativeSettlementAmount());
|
||||
lqw.eq(bo.getCumulativePaymentAmount() != null, XzdMachineryContractSuspend::getCumulativePaymentAmount, bo.getCumulativePaymentAmount());
|
||||
lqw.eq(bo.getIsSeal() != null, XzdMachineryContractSuspend::getIsSeal, bo.getIsSeal());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdMachineryContractSuspend::getFileId, bo.getFileId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), XzdMachineryContractSuspend::getAuditStatus, bo.getAuditStatus());
|
||||
lqw.eq(bo.getDeptId() != null, XzdMachineryContractSuspend::getDeptId, bo.getDeptId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械合同终止
|
||||
*
|
||||
* @param bo 机械合同终止
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(XzdMachineryContractSuspendBo bo) {
|
||||
XzdMachineryContractSuspend add = MapstructUtils.convert(bo, XzdMachineryContractSuspend.class);
|
||||
validEntityBeforeSave(add);
|
||||
String banBen = BatchNumberGenerator.generateBatchNumber("JXHTZZ-");
|
||||
|
||||
add.setReceiptsCode(banBen);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
|
||||
//印章信息
|
||||
if (bo.getSealInfo() != null && !bo.getSealInfo().isEmpty()){
|
||||
for (XzdBusinessChange sealInfo : bo.getSealInfo()) {
|
||||
sealInfo.setContractChangeId(add.getId());
|
||||
sealInfo.setType("15");
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械合同终止
|
||||
*
|
||||
* @param bo 机械合同终止
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(XzdMachineryContractSuspendBo bo) {
|
||||
XzdMachineryContractSuspend update = MapstructUtils.convert(bo, XzdMachineryContractSuspend.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
//印章信息
|
||||
xzdBusinessChangeService.remove(new LambdaQueryWrapper<XzdBusinessChange>().eq(XzdBusinessChange::getContractChangeId, update.getId()));
|
||||
|
||||
|
||||
for (XzdBusinessChange xzdBusinessChange : bo.getSealInfo()) {
|
||||
xzdBusinessChange.setContractChangeId(update.getId());
|
||||
xzdBusinessChange.setType("15");
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(XzdMachineryContractSuspend entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除机械合同终止信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
|
||||
for (Long id : ids) {
|
||||
XzdMachineryContractSuspendVo vo = baseMapper.selectVoById(id);
|
||||
// 删除附件
|
||||
if (!StringUtils.isEmpty(vo.getFileId())){
|
||||
List<Long> collect = Arrays.stream(vo.getFileId().split(",")).map(item -> {
|
||||
return Long.parseLong(item);
|
||||
}).collect(Collectors.toList());
|
||||
sysOssService.deleteWithValidByIds(collect, false);
|
||||
}
|
||||
}
|
||||
//印章信息
|
||||
xzdBusinessChangeService.remove(new LambdaQueryWrapper<XzdBusinessChange>().in(XzdBusinessChange::getContractChangeId, ids));
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||
*
|
||||
* @param processEvent 参数
|
||||
*/
|
||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('xzdjxhtzz')")
|
||||
public void processPlansHandlErequipmentList(ProcessEvent processEvent) {
|
||||
log.info("机械合同终止审核任务执行了{}", processEvent.toString());
|
||||
String id = processEvent.getBusinessId();
|
||||
XzdMachineryContractSuspend vo = baseMapper.selectById(Long.valueOf(id));
|
||||
if (vo == null) {
|
||||
return;
|
||||
}
|
||||
if (processEvent.getStatus().equals(BusinessStatusEnum.FINISH.getStatus())){
|
||||
UpdateWrapper<XzdContractMachinery> wrapper = new UpdateWrapper<>();
|
||||
wrapper.eq("id",vo.getContractInformationId()).set("sfzz","1");
|
||||
xzdContractMachineryMapper.update(wrapper);
|
||||
}
|
||||
vo.setAuditStatus(processEvent.getStatus());
|
||||
this.updateById(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行任务创建监听
|
||||
* 示例:也可通过 @EventListener(condition = "#processTaskEvent.flowCode=='leave1'")进行判断
|
||||
* 在方法中判断流程节点key
|
||||
* if ("xxx".equals(processTaskEvent.getNodeCode())) {
|
||||
* //执行业务逻辑
|
||||
* }
|
||||
*
|
||||
* @param processTaskEvent 参数
|
||||
*/
|
||||
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('xzdjxhtzz')")
|
||||
public void processTaskPlansHandlerEquipmentList(ProcessTaskEvent processTaskEvent) {
|
||||
log.info("机械合同终止审核任务创建了{}", processTaskEvent.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听删除流程事件
|
||||
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||
*
|
||||
* @param processDeleteEvent 参数
|
||||
*/
|
||||
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('xzdjxhtzz')")
|
||||
public void processDeletePlansHandlerEquipmentList(ProcessDeleteEvent processDeleteEvent) {
|
||||
log.info("机械合同终止删除流程事件,机械合同终止审核任务执行了{}", processDeleteEvent.toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -364,7 +364,6 @@ public class XzdPurchaseContractInformationServiceImpl extends ServiceImpl<XzdPu
|
||||
//印章信息
|
||||
xzdBusinessChangeService.remove(new LambdaQueryWrapper<XzdBusinessChange>().eq(XzdBusinessChange::getContractChangeId, update.getId()));
|
||||
|
||||
|
||||
for (XzdBusinessChange xzdBusinessChange : bo.getSealInfo()) {
|
||||
xzdBusinessChange.setContractChangeId(update.getId());
|
||||
xzdBusinessChange.setType("7");
|
||||
@ -384,6 +383,8 @@ public class XzdPurchaseContractInformationServiceImpl extends ServiceImpl<XzdPu
|
||||
xzdHtglHthzsjService.saveBatch(bo.getHtghthzsjs());
|
||||
}
|
||||
|
||||
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,8 @@ public enum XzdClassEnum {
|
||||
FENBAOHETONGBINGGENG_INFORMATION("xzd_subcontract_change"),//分包合同变更
|
||||
CAIGOUHETONG_INFORMATION("xzd_purchase_contract_alteration"), //采购变更合同
|
||||
FENBAOHETONG_JINDU("xzd_settlement_of_subcontracting_contract"),//分包合同进度结算
|
||||
JIXIEHETONG_JINDU("xzd_contract_machinery"),//机械合同信息
|
||||
JIXIEHETONGBIANG_XINXI("xzd_contract_machinery"),//机械合同信息变更
|
||||
PURCHASE_CONTRACT_INFORMATION("xzd_purchase_contract_information");//采购合同
|
||||
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import org.dromara.xzd.zijinjihua.yueduzijinjihua.domain.vo.StatementOfExpenditu
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -158,6 +159,12 @@ public class FinancialRevenuePlanAlterationVo implements Serializable {
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy")
|
||||
private String createByName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 收入明细
|
||||
|
||||
Reference in New Issue
Block a user