|
@@ -3,6 +3,7 @@ package com.inkasso.factoring.creditmanagement.service.impl;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.inkasso.adapter.exception.BusinessException;
|
|
|
import com.inkasso.adapter.exception.ServiceException;
|
|
|
import com.inkasso.adapter.util.CodeUtil;
|
|
|
import com.inkasso.adapter.util.CollectionUtil;
|
|
@@ -27,6 +28,7 @@ import com.inkasso.factoring.purchManagement.dao.CPurchContractManagementMapper;
|
|
|
import com.inkasso.factoring.purchManagement.entity.vo.PurchContractCompletedVo;
|
|
|
import com.inkasso.factoring.system.user.entity.UserDO;
|
|
|
import com.inkasso.factoring.system.user.service.UserService;
|
|
|
+import org.apache.bcel.classfile.Code;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
import org.apache.logging.log4j.Logger;
|
|
@@ -236,6 +238,7 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void supplement(ProjectInformation projectInformation) {
|
|
|
+ ProjectInformation existsProject = getById(projectInformation.getId());
|
|
|
//补充项目信息
|
|
|
String status = getById(projectInformation.getId()).getStatus();
|
|
|
if (!status.equals(ProjectAndEnterpriseStatusEnums.VOTE.getCode())) {
|
|
@@ -257,6 +260,18 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
|
|
|
String coreStatus = null;
|
|
|
ProjectCoreEnterprise projectCoreEnterprise = projectInformation.getProjectCoreEnterprise();
|
|
|
if (projectCoreEnterprise != null) {
|
|
|
+ //核心企业企查查
|
|
|
+ Enterprise coreEnterprise = enterpriseService.getById(projectCoreEnterprise.getcEnterpriseId());
|
|
|
+ List<String> coreErrors = qichacha(null, coreEnterprise, projectCoreEnterprise);
|
|
|
+ coreEnterprise.setErrors(coreErrors);
|
|
|
+ //业主方
|
|
|
+ if (existsProject.getcEnterpriseId() == null) {
|
|
|
+ String projectCoreStatus = projectCoreEnterprise.getStatus();
|
|
|
+ existsProject.setStatus(projectCoreStatus);
|
|
|
+ updateById(existsProject);
|
|
|
+ }
|
|
|
+ enterpriseService.updateById(coreEnterprise);
|
|
|
+
|
|
|
coreStatus = projectCoreEnterpriseService.getById(projectCoreEnterprise.getId()).getStatus();
|
|
|
if (!coreStatus.equals(ProjectAndEnterpriseStatusEnums.VOTE.getCode())) {
|
|
|
projectCoreEnterpriseService.updateById(projectCoreEnterprise);
|
|
@@ -278,7 +293,6 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
|
|
|
}
|
|
|
Boolean visible = projectInformation.getVisible();
|
|
|
if (visible) {
|
|
|
- ProjectInformation existsProject = getById(projectInformation.getId());
|
|
|
SupplierInfo supplierInfo = supplierInfoService.getById(existsProject.getcSupplierInfoId());
|
|
|
Long sysUserId = supplierInfo.getSysUserId();
|
|
|
UserDO userDO = userService.getById(sysUserId);
|
|
@@ -657,7 +671,7 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
|
|
|
if (projectCore.getCentralizedProcurementPlatform() != null && projectCore.getCentralizedProcurementPlatform() == 1 && betweenYear < 2) {
|
|
|
error.add(enterprise.getCorporateName() + "集采平台注册时间少于两年");
|
|
|
status = ProjectAndEnterpriseStatusEnums.VOTE.getCode();
|
|
|
- }else if (betweenYear < 5) {
|
|
|
+ }else if (projectCore.getCentralizedProcurementPlatform() != null && betweenYear < 5) {
|
|
|
error.add(enterprise.getCorporateName() + "注册时间少于五年");
|
|
|
status = ProjectAndEnterpriseStatusEnums.VOTE.getCode();
|
|
|
}
|