|
@@ -21,6 +21,7 @@ import com.trade.common.validate.ValidatorGroup;
|
|
|
import com.trade.common.validate.ValidatorUtil;
|
|
|
import com.trade.service.DictConstants;
|
|
|
import com.trade.service.TransStruct;
|
|
|
+import com.trade.service.contract.config.ContractConfigProperties;
|
|
|
import com.trade.service.contract.constant.ContractConstant;
|
|
|
import com.trade.service.contract.dto.*;
|
|
|
import com.trade.service.contract.service.ContractService;
|
|
@@ -113,6 +114,8 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
|
|
|
private ContractFileService contractFileService;
|
|
|
@Resource
|
|
|
private PurchaseOrderService purchaseOrderService;
|
|
|
+ @Resource
|
|
|
+ private ContractConfigProperties contractConfigProperties;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -711,8 +714,8 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
|
|
|
if (!DictConstants.EXPORT_TYPE_PROXY.equals(enterprise.getExportType())
|
|
|
|| !DictConstants.DISTRICT_CN_MAINLAND.equals(enterprise.getProxyDistrictCode())) {
|
|
|
// 自营出口或者非大陆贸易平台代理,人工录入采购单价,这里重新计算下商品金额
|
|
|
- purchaseContractDto.getCommodityList().forEach(purchaseCommodityDto -> purchaseCommodityDto.setAmount(
|
|
|
- purchaseCommodityDto.getPriceUnit().multiply(purchaseCommodityDto.getNumber())));
|
|
|
+ purchaseContractDto.getCommodityList().forEach(purchaseCommodityDto -> purchaseCommodityDto
|
|
|
+ .setAmount(purchaseCommodityDto.getPriceUnit().multiply(purchaseCommodityDto.getNumber())));
|
|
|
// 含税金额 = 采购商品金额 * (1 + 增值税率)
|
|
|
purchaseContractDto.getCommodityList()
|
|
|
.forEach(purchaseCommodityDto -> purchaseCommodityDto.setAmount(purchaseCommodityDto.getAmount()
|
|
@@ -891,25 +894,32 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
|
|
|
*/
|
|
|
private List<ContractSeal> getContractSeals(SignPartyInfo signPartyInfo, String companySignKeyword,
|
|
|
String personalSignKeyword) {
|
|
|
- ContractSigner signer = new ContractSigner();
|
|
|
- signer.setSigner(signPartyInfo.getLegalPersonName());
|
|
|
- signer.setSignerIdNo(signPartyInfo.getLegalPersonCertNo());
|
|
|
- signer.setSignerIdType(ESignConstant.CRED_PSN_CH_IDCARD);
|
|
|
- signer.setMobile(signPartyInfo.getLegalPersonPhone());
|
|
|
+ boolean autoSign = CollUtil.isNotEmpty(contractConfigProperties.getESignSealIdMap())
|
|
|
+ && contractConfigProperties.getESignSealIdMap()
|
|
|
+ .containsKey(signPartyInfo.getEnterpriseCertNo());
|
|
|
List<ContractSeal> sealInfoList = new ArrayList<>();
|
|
|
ContractSeal companySeal = new ContractSeal();
|
|
|
- companySeal.setSigner(signer);
|
|
|
+ companySeal.setAutoSign(autoSign);
|
|
|
companySeal.setKeyword(companySignKeyword);
|
|
|
companySeal.setSealIdType(ESignConstant.CRED_ORG_USCC);
|
|
|
companySeal.setSealName(signPartyInfo.getEnterpriseName());
|
|
|
companySeal.setSealIdNo(signPartyInfo.getEnterpriseCertNo());
|
|
|
companySeal.setWithTime(true);
|
|
|
- ContractSeal legalSeal = new ContractSeal();
|
|
|
- legalSeal.setSigner(signer);
|
|
|
- legalSeal.setKeyword(personalSignKeyword);
|
|
|
- legalSeal.setWithTime(true);
|
|
|
+ // 如果静默签署,则不考虑法人签署
|
|
|
+ if (autoSign) {
|
|
|
+ ContractSigner signer = new ContractSigner();
|
|
|
+ signer.setSigner(signPartyInfo.getLegalPersonName());
|
|
|
+ signer.setSignerIdNo(signPartyInfo.getLegalPersonCertNo());
|
|
|
+ signer.setSignerIdType(ESignConstant.CRED_PSN_CH_IDCARD);
|
|
|
+ signer.setMobile(signPartyInfo.getLegalPersonPhone());
|
|
|
+ companySeal.setSigner(signer);
|
|
|
+ ContractSeal legalSeal = new ContractSeal();
|
|
|
+ legalSeal.setSigner(signer);
|
|
|
+ legalSeal.setKeyword(personalSignKeyword);
|
|
|
+ legalSeal.setWithTime(true);
|
|
|
+ sealInfoList.add(legalSeal);
|
|
|
+ }
|
|
|
sealInfoList.add(companySeal);
|
|
|
- sealInfoList.add(legalSeal);
|
|
|
return sealInfoList;
|
|
|
}
|
|
|
|