feat:合同推送
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.dto;
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import com.cool.store.dto.contract.PushContractDTO;
|
||||||
import com.cool.store.vo.BaseInfoVO;
|
import com.cool.store.vo.BaseInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -7,6 +8,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -19,10 +21,6 @@ public class ContractInformationDTO {
|
|||||||
private Long shopId;
|
private Long shopId;
|
||||||
@ApiModelProperty("门店名称")
|
@ApiModelProperty("门店名称")
|
||||||
private String shopName;
|
private String shopName;
|
||||||
@ApiModelProperty("品牌方名称")
|
|
||||||
private String brandName;
|
|
||||||
@ApiModelProperty("支付方信息")
|
|
||||||
private String payee;
|
|
||||||
@ApiModelProperty("签约人1名称")
|
@ApiModelProperty("签约人1名称")
|
||||||
private String sign1Name;
|
private String sign1Name;
|
||||||
@ApiModelProperty("签约人2名称")
|
@ApiModelProperty("签约人2名称")
|
||||||
@@ -39,5 +37,7 @@ public class ContractInformationDTO {
|
|||||||
private String firstYearFee;
|
private String firstYearFee;
|
||||||
@ApiModelProperty("设计费")
|
@ApiModelProperty("设计费")
|
||||||
private String performanceBond;
|
private String performanceBond;
|
||||||
|
@ApiModelProperty("合同配置信息")
|
||||||
|
private List<PushContractDTO> contractList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import java.util.stream.Collectors;
|
|||||||
* @Date 2025/9/8 16:43
|
* @Date 2025/9/8 16:43
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
public class ContractListDTO {
|
public class ContractListDTO {
|
||||||
|
|
||||||
@ApiModelProperty("主键 新建时忽略")
|
@ApiModelProperty("主键 新建时忽略")
|
||||||
@@ -67,7 +66,91 @@ public class ContractListDTO {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<FranchiseModeDTO> getFranchiseModeList(){
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrand() {
|
||||||
|
return brand;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrand(String brand) {
|
||||||
|
this.brand = brand;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContractName() {
|
||||||
|
return contractName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractName(String contractName) {
|
||||||
|
this.contractName = contractName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartyA() {
|
||||||
|
return partyA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPartyA(String partyA) {
|
||||||
|
this.partyA = partyA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartyB() {
|
||||||
|
return partyB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPartyB(String partyB) {
|
||||||
|
this.partyB = partyB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartyC() {
|
||||||
|
return partyC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPartyC(String partyC) {
|
||||||
|
this.partyC = partyC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFranchiseModeList(List<FranchiseModeDTO> franchiseModeList) {
|
||||||
|
this.franchiseModeList = franchiseModeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFadadaTemplateId() {
|
||||||
|
return fadadaTemplateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFadadaTemplateId(String fadadaTemplateId) {
|
||||||
|
this.fadadaTemplateId = fadadaTemplateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSerialNumber() {
|
||||||
|
return serialNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerialNumber(Integer serialNumber) {
|
||||||
|
this.serialNumber = serialNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayeeName() {
|
||||||
|
return payeeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayeeName(String payeeName) {
|
||||||
|
this.payeeName = payeeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFranchiseMode() {
|
||||||
|
return franchiseMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFranchiseMode(String franchiseMode) {
|
||||||
|
this.franchiseMode = franchiseMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<FranchiseModeDTO> getFranchiseModeList(){
|
||||||
String[] split = this.franchiseMode.split(",");
|
String[] split = this.franchiseMode.split(",");
|
||||||
ArrayList<FranchiseModeDTO> result = new ArrayList<>();
|
ArrayList<FranchiseModeDTO> result = new ArrayList<>();
|
||||||
Arrays.stream(split).filter(item -> StringUtil.isNotEmpty(item)).forEach(item -> {
|
Arrays.stream(split).filter(item -> StringUtil.isNotEmpty(item)).forEach(item -> {
|
||||||
@@ -79,4 +162,6 @@ public class ContractListDTO {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.cool.store.dto.contract;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/9/9 13:35
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PushContractDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("品牌方名称")
|
||||||
|
private String brand;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同名称")
|
||||||
|
private String contractName;
|
||||||
|
|
||||||
|
@ApiModelProperty("甲方名称")
|
||||||
|
private String partyA;
|
||||||
|
|
||||||
|
@ApiModelProperty("乙方名称")
|
||||||
|
private String partyB;
|
||||||
|
|
||||||
|
@ApiModelProperty("丙方名称")
|
||||||
|
private String partyC;
|
||||||
|
|
||||||
|
@ApiModelProperty("法大大模板ID")
|
||||||
|
private String fadadaTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同签约顺序")
|
||||||
|
private Integer serialNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("收款方名称")
|
||||||
|
private String payeeName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import com.cool.store.context.LoginUserInfo;
|
|||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.ContractInformationDTO;
|
import com.cool.store.dto.ContractInformationDTO;
|
||||||
import com.cool.store.dto.PartnerBankInfoDTO;
|
import com.cool.store.dto.PartnerBankInfoDTO;
|
||||||
|
import com.cool.store.dto.contract.PushContractDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
@@ -120,6 +121,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
OperationLogService operationLogService;
|
OperationLogService operationLogService;
|
||||||
@Resource
|
@Resource
|
||||||
OperationLogDAO operationLogDAO;
|
OperationLogDAO operationLogDAO;
|
||||||
|
@Resource
|
||||||
|
ContractConfigDAO contractConfigDAO;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -417,7 +420,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
contractInformationDTO.setJoinModel(shopInfoDO.getJoinMode());
|
contractInformationDTO.setJoinModel(shopInfoDO.getJoinMode());
|
||||||
contractInformationDTO.setShopName(shopInfoDO.getShopName());
|
contractInformationDTO.setShopName(shopInfoDO.getShopName());
|
||||||
//品牌信息
|
//品牌信息
|
||||||
|
|
||||||
contractInformationDTO.setSign1Name(signFranchiseDO.getPartnershipSignatoryFirst());
|
contractInformationDTO.setSign1Name(signFranchiseDO.getPartnershipSignatoryFirst());
|
||||||
contractInformationDTO.setSign2Name(signFranchiseDO.getPartnershipSignatorySecond());
|
contractInformationDTO.setSign2Name(signFranchiseDO.getPartnershipSignatorySecond());
|
||||||
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
||||||
@@ -426,6 +428,24 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
||||||
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
||||||
|
|
||||||
|
List<ContractConfigDO> contractConfigDOS = contractConfigDAO.queryContractConfigListByBrandAndMode(shopInfoDO.getFranchiseBrand(), JoinModeEnum.getByCode(shopInfoDO.getJoinMode()));
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(contractConfigDOS)){
|
||||||
|
contractInformationDTO.setContractList(contractConfigDOS.stream().map(contractConfigDO -> {
|
||||||
|
PushContractDTO pushContractDTO = new PushContractDTO();
|
||||||
|
pushContractDTO.setBrand(contractConfigDO.getBrand());
|
||||||
|
pushContractDTO.setContractName(contractConfigDO.getContractName());
|
||||||
|
pushContractDTO.setPartyA(contractConfigDO.getPartyA());
|
||||||
|
pushContractDTO.setPartyB(contractConfigDO.getPartyB());
|
||||||
|
pushContractDTO.setPartyC(contractConfigDO.getPartyC());
|
||||||
|
pushContractDTO.setFadadaTemplateId(contractConfigDO.getFadadaTemplateId());
|
||||||
|
pushContractDTO.setSerialNumber(contractConfigDO.getSerialNumber());
|
||||||
|
pushContractDTO.setPayeeName(contractConfigDO.getPayeeName());
|
||||||
|
return pushContractDTO;
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
||||||
Boolean sendNotice = Boolean.TRUE;
|
Boolean sendNotice = Boolean.TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user