10-24-修复

This commit is contained in:
2025-10-24 20:05:45 +08:00
parent 8cfc34dbcb
commit 40e57b18cb
14 changed files with 147 additions and 111 deletions

View File

@ -1,16 +1,15 @@
package org.dromara.xzd.domain; package org.dromara.xzd.domain;
import com.alibaba.excel.annotation.ExcelProperty; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.io.Serial; import java.io.Serial;
import java.util.Date;
/** /**
* 承包合同进度结算对象 xzd_contract_progress_settlement * 承包合同进度结算对象 xzd_contract_progress_settlement
@ -92,7 +91,7 @@ public class XzdContractProgressSettlement extends BaseEntity {
/** /**
* 统计周期 * 统计周期
*/ */
private Long contractProgressId; private String contractProgressId;
/** /**
* 计量开始日期 * 计量开始日期

View File

@ -32,6 +32,11 @@ public class XzdContractTermination extends BaseEntity {
@TableId(value = "id") @TableId(value = "id")
private Long id; private Long id;
/**
* 部门id
*/
private Long deptId;
/** /**
* 单据编码 * 单据编码
*/ */

View File

@ -1,16 +1,16 @@
package org.dromara.xzd.domain.bo; package org.dromara.xzd.domain.bo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.xzd.domain.XzdBusinessChange;
import org.dromara.xzd.domain.XzdContractProgressSettlement;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper; import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*; import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.xzd.domain.XzdBusinessChange;
import org.dromara.xzd.domain.XzdContractProgressSettlement;
import org.dromara.xzd.settlement.domain.XzdAlterationInventory; import org.dromara.xzd.settlement.domain.XzdAlterationInventory;
import org.dromara.xzd.settlement.domain.XzdContractInventory; import org.dromara.xzd.settlement.domain.XzdContractInventory;
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
@ -105,7 +105,7 @@ public class XzdContractProgressSettlementBo extends BaseEntity {
/** /**
* 统计周期 * 统计周期
*/ */
private Long contractProgressId; private String contractProgressId;
/** /**
* 计量开始日期 * 计量开始日期

View File

@ -31,6 +31,11 @@ public class XzdContractTerminationBo extends BaseEntity {
*/ */
private Long id; private Long id;
/**
* 部门id
*/
private Long deptId;
/** /**
* 单据编码 * 单据编码
*/ */

View File

@ -1,15 +1,12 @@
package org.dromara.xzd.domain.vo; package org.dromara.xzd.domain.vo;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.xzd.domain.XzdBusinessChange;
import org.dromara.xzd.domain.XzdContractProgressSettlement;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper; import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data; import lombok.Data;
import org.dromara.xzd.domain.XzdBusinessChange;
import org.dromara.xzd.domain.XzdContractProgressSettlement;
import org.dromara.xzd.settlement.domain.XzdAlterationInventory; import org.dromara.xzd.settlement.domain.XzdAlterationInventory;
import org.dromara.xzd.settlement.domain.XzdContractInventory; import org.dromara.xzd.settlement.domain.XzdContractInventory;
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
@ -17,6 +14,8 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List; import java.util.List;
@ -127,7 +126,7 @@ public class XzdContractProgressSettlementVo implements Serializable {
* 统计周期 * 统计周期
*/ */
@ExcelProperty(value = "统计周期") @ExcelProperty(value = "统计周期")
private Long contractProgressId; private String contractProgressId;
/** /**
* 统计周期名称 * 统计周期名称

View File

@ -36,6 +36,11 @@ public class XzdContractTerminationVo implements Serializable {
@ExcelProperty(value = "") @ExcelProperty(value = "")
private Long id; private Long id;
/**
* 部门id
*/
private Long deptId;
/** /**
* 单据编码 * 单据编码
*/ */

View File

@ -151,6 +151,7 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM
lqw.eq(bo.getContractCumulativeChangeAmount() != null, XzdContractChange::getContractCumulativeChangeAmount, bo.getContractCumulativeChangeAmount()); lqw.eq(bo.getContractCumulativeChangeAmount() != null, XzdContractChange::getContractCumulativeChangeAmount, bo.getContractCumulativeChangeAmount());
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractChange::getFileId, bo.getFileId()); lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractChange::getFileId, bo.getFileId());
lqw.eq(bo.getDanjuId() != null, XzdContractChange::getDanjuId, bo.getDanjuId()); lqw.eq(bo.getDanjuId() != null, XzdContractChange::getDanjuId, bo.getDanjuId());
lqw.eq(bo.getDeptId() != null, XzdContractChange::getDeptId, bo.getDeptId());
return lqw; return lqw;
} }

View File

@ -167,6 +167,7 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
lqw.eq(bo.getCumulativeSettlementAmount() != null, XzdContractDetails::getCumulativeSettlementAmount, bo.getCumulativeSettlementAmount()); lqw.eq(bo.getCumulativeSettlementAmount() != null, XzdContractDetails::getCumulativeSettlementAmount, bo.getCumulativeSettlementAmount());
lqw.eq(bo.getDanjuId() != null, XzdContractDetails::getDanjuId, bo.getDanjuId()); lqw.eq(bo.getDanjuId() != null, XzdContractDetails::getDanjuId, bo.getDanjuId());
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractDetails::getFileId, bo.getFileId()); lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractDetails::getFileId, bo.getFileId());
lqw.eq(bo.getDeptId() != null, XzdContractDetails::getDeptId, bo.getDeptId());
return lqw; return lqw;
} }

View File

@ -1,27 +1,28 @@
package org.dromara.xzd.service.impl; package org.dromara.xzd.service.impl;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R; import org.dromara.common.core.domain.R;
import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils; import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.dromara.common.mybatis.core.page.TableDataInfo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.common.utils.BatchNumberGenerator; import org.dromara.common.utils.BatchNumberGenerator;
import org.dromara.system.domain.vo.SysDeptVo; import org.dromara.system.domain.vo.SysDeptVo;
import org.dromara.system.service.impl.SysDeptServiceImpl; import org.dromara.system.service.impl.SysDeptServiceImpl;
import org.dromara.system.service.impl.SysOssServiceImpl; import org.dromara.system.service.impl.SysOssServiceImpl;
import org.dromara.xzd.domain.XzdBusinessChange; import org.dromara.xzd.domain.XzdBusinessChange;
import org.dromara.xzd.domain.XzdDeductionItems; import org.dromara.xzd.domain.XzdContractProgressSettlement;
import org.dromara.xzd.domain.XzdSettlementRules; import org.dromara.xzd.domain.bo.XzdContractProgressSettlementBo;
import org.dromara.xzd.domain.dto.QuerCorrespondentDto; import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
import org.dromara.xzd.domain.vo.*; import org.dromara.xzd.domain.vo.*;
import org.dromara.xzd.mapper.XzdContractProgressSettlementMapper;
import org.dromara.xzd.service.IXzdContractProgressSettlementService;
import org.dromara.xzd.service.IXzdCorrespondentList; import org.dromara.xzd.service.IXzdCorrespondentList;
import org.dromara.xzd.service.IXzdSolutionSelectionService;
import org.dromara.xzd.settlement.domain.XzdAlterationInventory; import org.dromara.xzd.settlement.domain.XzdAlterationInventory;
import org.dromara.xzd.settlement.domain.XzdContractInventory; import org.dromara.xzd.settlement.domain.XzdContractInventory;
import org.dromara.xzd.settlement.domain.XzdJsDeductionItems; import org.dromara.xzd.settlement.domain.XzdJsDeductionItems;
@ -30,17 +31,12 @@ import org.dromara.xzd.settlement.service.impl.XzdContractInventoryServiceImpl;
import org.dromara.xzd.settlement.service.impl.XzdJsDeductionItemsServiceImpl; import org.dromara.xzd.settlement.service.impl.XzdJsDeductionItemsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.dromara.xzd.domain.bo.XzdContractProgressSettlementBo;
import org.dromara.xzd.domain.XzdContractProgressSettlement;
import org.dromara.xzd.mapper.XzdContractProgressSettlementMapper;
import org.dromara.xzd.service.IXzdContractProgressSettlementService;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Collection;
/** /**
* 承包合同进度结算Service业务层处理 * 承包合同进度结算Service业务层处理
@ -457,14 +453,16 @@ public class XzdContractProgressSettlementServiceImpl extends ServiceImpl<XzdCon
XzdContractDetailsVo contractVo = xzdContractDetailsService.queryById(vo.getContractId()); XzdContractDetailsVo contractVo = xzdContractDetailsService.queryById(vo.getContractId());
if (contractVo != null){ if (contractVo != null){
//装填信息 //装填信息
List<XzdContractDetailsVo> contractVo1 = List.of(contractVo); // List<XzdContractDetailsVo> contractVo1 = List.of(contractVo);
xzdContractDetailsService.setValue(contractVo1); // xzdContractDetailsService.setValue(contractVo1);
contractVo = contractVo1.getFirst(); // contractVo = contractVo1.getFirst();
vo.setContractName(contractVo.getContractName()); vo.setContractName(contractVo.getContractName());
//合同编码 //合同编码
vo.setContractCode(contractVo.getContractCode()); vo.setContractCode(contractVo.getContractCode());
//项目名称 //项目名称
vo.setProjectName(contractVo.getProjectName()); vo.setProjectName(contractVo.getProjectName());
//项目id
vo.setProjectId(contractVo.getProject());
//合同金额 //合同金额
vo.setContractAmount(contractVo.getContractAmount()); vo.setContractAmount(contractVo.getContractAmount());
//单据日期 //单据日期
@ -472,12 +470,12 @@ public class XzdContractProgressSettlementServiceImpl extends ServiceImpl<XzdCon
} }
} }
//统计周期名称 //统计周期名称
if (vo.getContractProgressId() != null){ // if (vo.getContractProgressId() != null){
XzdContractProgressSettlementDateVo settlementDateVo = xzdContractProgressSettlementDateService.queryById(vo.getContractProgressId()); // XzdContractProgressSettlementDateVo settlementDateVo = xzdContractProgressSettlementDateService.queryById(vo.getContractProgressId());
if (settlementDateVo != null){ // if (settlementDateVo != null){
vo.setContractProgressName(settlementDateVo.getName()); // vo.setContractProgressName(settlementDateVo.getName());
} // }
} // }
//结算单位名称(客户) //结算单位名称(客户)
if (vo.getSettlementUnit() != null) { if (vo.getSettlementUnit() != null) {
R<QuerCorrespondentDto> byid = iXzdCorrespondentList.getCustomerByid(vo.getSettlementUnit()); R<QuerCorrespondentDto> byid = iXzdCorrespondentList.getCustomerByid(vo.getSettlementUnit());

View File

@ -94,6 +94,7 @@ public class XzdContractTerminationServiceImpl extends ServiceImpl<XzdContractTe
lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdContractTermination::getProjectCategory, bo.getProjectCategory()); lqw.eq(StringUtils.isNotBlank(bo.getProjectCategory()), XzdContractTermination::getProjectCategory, bo.getProjectCategory());
lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractTermination::getFileId, bo.getFileId()); lqw.eq(StringUtils.isNotBlank(bo.getFileId()), XzdContractTermination::getFileId, bo.getFileId());
lqw.eq(bo.getDanjuId() != null, XzdContractTermination::getDanjuId, bo.getDanjuId()); lqw.eq(bo.getDanjuId() != null, XzdContractTermination::getDanjuId, bo.getDanjuId());
lqw.eq(bo.getDeptId() != null, XzdContractTermination::getDeptId, bo.getDeptId());
return lqw; return lqw;
} }

View File

@ -30,7 +30,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* 供应商信息Service业务层处理 * 供应商信息Service业务层处理
@ -349,41 +348,12 @@ public class XzdSupplierInfoServiceImpl extends ServiceImpl<XzdSupplierInfoMappe
if (old.getQualifications() != null && !old.getQualifications().isEmpty()){ if (old.getQualifications() != null && !old.getQualifications().isEmpty()){
xzdSupplierQualificationService.removeByIds(old.getQualifications()); xzdSupplierQualificationService.removeByIds(old.getQualifications());
} }
List<Long> nowFile = new ArrayList<>(); for (XzdSupplierQualification qualification : bo.getQualifications()) {
List<Long> oldFile = new ArrayList<>(); qualification.setSupplierId(update.getId());
for (XzdSupplierQualification businessChange : bo.getQualifications()) {
businessChange.setSupplierId(update.getId());
for (String s : businessChange.getFileId().split(",")) {
nowFile.add(Long.valueOf(s));
}
}
for (XzdSupplierQualification qualification : old.getQualifications()) {
if (qualification.getFileId() != null){
String[] split = qualification.getFileId().split(",");
List<Long> fileIdList = Arrays.stream(split)
.map(Long::valueOf)
.toList();
oldFile.addAll(fileIdList);
}
}
for (Long l : oldFile) {
if (!nowFile.contains(l)) {
sysOssService.deleteWithValidByIds(List.of(l), false);
}
} }
xzdSupplierQualificationService.saveBatch(bo.getQualifications()); xzdSupplierQualificationService.saveBatch(bo.getQualifications());
}else { }else {
if (old.getQualifications() != null && !old.getQualifications().isEmpty()){ if (old.getQualifications() != null && !old.getQualifications().isEmpty()){
//删除绑定的文件
for (XzdSupplierQualification qualification : old.getQualifications()) {
if (qualification.getFileId() != null){
String[] split = qualification.getFileId().split(",");
List<Long> fileIdList = Arrays.stream(split)
.map(Long::valueOf)
.collect(Collectors.toList());
sysOssService.deleteWithValidByIds(fileIdList, false);
}
}
xzdSupplierQualificationService.removeByIds(old.getQualifications()); xzdSupplierQualificationService.removeByIds(old.getQualifications());
} }
} }
@ -396,30 +366,51 @@ public class XzdSupplierInfoServiceImpl extends ServiceImpl<XzdSupplierInfoMappe
//处理地址信息 //处理地址信息
if (bo.getAddresses()!= null && !bo.getAddresses().isEmpty()){ if (bo.getAddresses() != null && !bo.getAddresses().isEmpty()){
if (old.getAddresses() != null && !old.getAddresses().isEmpty()){
xzdAddressInfoService.removeByIds(old.getAddresses());
}
for (XzdAddressInfo address : bo.getAddresses()) { for (XzdAddressInfo address : bo.getAddresses()) {
address.setType("2"); address.setType("2");
address.setCustomerinformationId(update.getId()); address.setCustomerinformationId(update.getId());
} }
xzdAddressInfoService.saveOrUpdateBatch(bo.getAddresses()); xzdAddressInfoService.saveBatch(bo.getAddresses());
}else {
if (old.getAddresses() != null && !old.getAddresses().isEmpty()){
xzdAddressInfoService.removeByIds(old.getAddresses());
}
} }
//处理联系人信息 //处理联系人信息
if (bo.getContacts()!=null && !bo.getContacts().isEmpty()){ if (bo.getContacts() != null && !bo.getContacts().isEmpty()){
if (old.getContacts() != null && !old.getContacts().isEmpty()){
xzdContactService.removeByIds(old.getContacts());
}
for (XzdContact contact : bo.getContacts()) { for (XzdContact contact : bo.getContacts()) {
contact.setType("2"); contact.setType("2");
contact.setCustomerinformationId(update.getId()); contact.setCustomerinformationId(update.getId());
} }
xzdContactService.saveOrUpdateBatch(bo.getContacts()); xzdContactService.saveBatch(bo.getContacts());
}else {
if (old.getContacts() != null && !old.getContacts().isEmpty()){
xzdContactService.removeByIds(old.getContacts());
}
} }
//处理证照信息 //处理证照信息
if (bo.getCertificates()!= null && !bo.getCertificates().isEmpty()){ if (bo.getCertificates() != null && !bo.getCertificates().isEmpty()){
if (old.getCertificates() != null && !old.getCertificates().isEmpty()){
xzdCertificateInfoService.removeByIds(old.getCertificates());
}
for (XzdCertificateInfo certificate : bo.getCertificates()) { for (XzdCertificateInfo certificate : bo.getCertificates()) {
certificate.setType("2"); certificate.setType("2");
certificate.setCustomerinformationId(update.getId()); certificate.setCustomerinformationId(update.getId());
} }
xzdCertificateInfoService.saveOrUpdateBatch(bo.getCertificates()); xzdCertificateInfoService.saveBatch(bo.getCertificates());
}else {
if (old.getCertificates() != null && !old.getCertificates().isEmpty()){
xzdCertificateInfoService.removeByIds(old.getCertificates());
}
} }
//处理结算信息 //处理结算信息
@ -459,52 +450,81 @@ public class XzdSupplierInfoServiceImpl extends ServiceImpl<XzdSupplierInfoMappe
//处理供应商类型 //处理供应商类型
if (bo.getCustomerTypes() != null && !bo.getCustomerTypes().isEmpty()){ if (bo.getCustomerTypes() != null && !bo.getCustomerTypes().isEmpty()){
if (old.getCustomerTypes() != null && !old.getCustomerTypes().isEmpty()){
//删除原来的再新增 xzdCustomertypeInfoService.removeByIds(old.getCustomerTypes());
LambdaQueryWrapper<XzdCustomertypeInfo> xzdCustomertypeInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); }
xzdCustomertypeInfoLambdaQueryWrapper.eq(XzdCustomertypeInfo::getType,"2");
xzdCustomertypeInfoLambdaQueryWrapper.eq(XzdCustomertypeInfo::getCustomerinformationId, update.getId());
xzdCustomertypeInfoService.remove(xzdCustomertypeInfoLambdaQueryWrapper);
for (XzdCustomertypeInfo customerType : bo.getCustomerTypes()) { for (XzdCustomertypeInfo customerType : bo.getCustomerTypes()) {
customerType.setType("2"); customerType.setType("2");
customerType.setCustomerinformationId(update.getId()); customerType.setCustomerinformationId(update.getId());
} }
xzdCustomertypeInfoService.saveBatch(bo.getCustomerTypes()); xzdCustomertypeInfoService.saveBatch(bo.getCustomerTypes());
}else {
if (old.getCustomerTypes() != null && !old.getCustomerTypes().isEmpty()){
xzdCustomertypeInfoService.removeByIds(old.getCustomerTypes());
}
} }
//处理供应物料 //处理供应物料
if (bo.getMaterials()!= null && !bo.getMaterials().isEmpty()){ if (bo.getMaterials() != null && !bo.getMaterials().isEmpty()){
for (XzdSupplyMaterials material : bo.getMaterials()) { if (old.getMaterials() != null && !old.getMaterials().isEmpty()){
material.setSupplierId(update.getId()); xzdSupplyMaterialsService.removeByIds(old.getMaterials());
}
for (XzdSupplyMaterials customerType : bo.getMaterials()) {
customerType.setSupplierId(update.getId());
}
xzdSupplyMaterialsService.saveBatch(bo.getMaterials());
}else {
if (old.getMaterials() != null && !old.getMaterials().isEmpty()){
xzdSupplyMaterialsService.removeByIds(old.getMaterials());
} }
xzdSupplyMaterialsService.saveOrUpdateBatch(bo.getMaterials());
} }
//供应商评价 //供应商评价
if (bo.getEvaluations()!= null && !bo.getEvaluations().isEmpty()){ if (bo.getEvaluations() != null && !bo.getEvaluations().isEmpty()){
for (XzdSupplierEvaluation evaluation : bo.getEvaluations()) { if (old.getEvaluations() != null && !old.getEvaluations().isEmpty()){
evaluation.setSupplierId(update.getId()); xzdSupplierEvaluationService.removeByIds(old.getEvaluations());
}
for (XzdSupplierEvaluation customerType : bo.getEvaluations()) {
customerType.setSupplierId(update.getId());
}
xzdSupplierEvaluationService.saveBatch(bo.getEvaluations());
}else {
if (old.getEvaluations() != null && !old.getEvaluations().isEmpty()){
xzdSupplierEvaluationService.removeByIds(old.getEvaluations());
} }
xzdSupplierEvaluationService.saveOrUpdateBatch(bo.getEvaluations());
} }
//项目信息 //项目信息
if (bo.getProjects()!= null && !bo.getProjects().isEmpty()){ if (bo.getProjects() != null && !bo.getProjects().isEmpty()){
if (old.getProjects() != null && !old.getProjects().isEmpty()){
xzdProjectInfoService.removeByIds(old.getProjects());
}
for (XzdProjectInfo project : bo.getProjects()) { for (XzdProjectInfo project : bo.getProjects()) {
project.setCustomerinformationId(update.getId()); project.setCustomerinformationId(update.getId());
project.setType("2"); project.setType("2");
} }
xzdProjectInfoService.saveOrUpdateBatch(bo.getProjects()); xzdProjectInfoService.saveBatch(bo.getProjects());
}else {
if (old.getProjects() != null && !old.getProjects().isEmpty()){
xzdProjectInfoService.removeByIds(old.getProjects());
}
} }
//合同信息 //合同信息
if (bo.getContracts()!= null && !bo.getContracts().isEmpty()){ if (bo.getContracts() != null && !bo.getContracts().isEmpty()){
if (old.getContracts() != null && !old.getContracts().isEmpty()){
xzdContractInfoService.removeByIds(old.getContracts());
}
for (XzdContractInfo contract : bo.getContracts()) { for (XzdContractInfo contract : bo.getContracts()) {
contract.setType("2"); contract.setType("2");
contract.setCustomerinformationId(update.getId()); contract.setCustomerinformationId(update.getId());
} }
xzdContractInfoService.saveOrUpdateBatch(bo.getContracts()); xzdContractInfoService.saveBatch(bo.getContracts());
}else {
if (old.getContracts() != null && !old.getContracts().isEmpty()){
xzdContractInfoService.removeByIds(old.getContracts());
}
} }
return b; return b;

View File

@ -314,7 +314,7 @@ public class XzdWorkcontractCompletionAdjustServiceImpl extends ServiceImpl<XzdW
// xzdContractAccountService.setValue(accountVo); // xzdContractAccountService.setValue(accountVo);
// xzdContractAccountVo = accountVo.getFirst(); // xzdContractAccountVo = accountVo.getFirst();
//竣工决算 //竣工决算
vo.setContractAccount(xzdContractAccountVo); // vo.setContractAccount(xzdContractAccountVo);
//决算标题 //决算标题
vo.setFinalAccountTitle(xzdContractAccountVo.getTitle()); vo.setFinalAccountTitle(xzdContractAccountVo.getTitle());
//从竣工获取合同 //从竣工获取合同

View File

@ -1,22 +1,17 @@
package org.dromara.xzd.spykp.sjsqd.domain.vo; package org.dromara.xzd.spykp.sjsqd.domain.vo;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.system.domain.vo.SysUserVo;
import org.dromara.xzd.domain.vo.XzdProjectVo;
import org.dromara.xzd.spykp.sjsqd.domain.XzdSpykpSjsqd;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper; import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data; import lombok.Data;
import org.dromara.xzd.spykp.sjsqd.domain.XzdSpykpSjsqd;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/** /**
@ -131,6 +126,11 @@ public class XzdSpykpSjsqdVo implements Serializable {
@ExcelProperty(value = "合同编号") @ExcelProperty(value = "合同编号")
private String htbh; private String htbh;
/**
* 合同金额
*/
private BigDecimal htje;
/** /**
* 付款单位id(客户) * 付款单位id(客户)
*/ */

View File

@ -250,6 +250,8 @@ public class XzdSpykpSjsqdServiceImpl extends ServiceImpl<XzdSpykpSjsqdMapper, X
vo.setHtmc(xzdContractDetailsVo.getContractName()); vo.setHtmc(xzdContractDetailsVo.getContractName());
//合同编号 //合同编号
vo.setHtbh(xzdContractDetailsVo.getContractCode()); vo.setHtbh(xzdContractDetailsVo.getContractCode());
//合同金额
vo.setHtje(xzdContractDetailsVo.getContractAmount());
} }
} }
//付款单位名称 //付款单位名称