|
@@ -18,14 +18,8 @@ import com.gree.mall.manager.enums.contract.SignContractStatusEnum;
|
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.logic.fadada.FDDNotifyLogic;
|
|
|
-import com.gree.mall.manager.plus.entity.AdminWebsit;
|
|
|
-import com.gree.mall.manager.plus.entity.WebsitContractSignField;
|
|
|
-import com.gree.mall.manager.plus.entity.WebsitContractSignItem;
|
|
|
-import com.gree.mall.manager.plus.entity.WebsitContractSignRecord;
|
|
|
-import com.gree.mall.manager.plus.service.AdminWebsitService;
|
|
|
-import com.gree.mall.manager.plus.service.WebsitContractSignFieldService;
|
|
|
-import com.gree.mall.manager.plus.service.WebsitContractSignItemService;
|
|
|
-import com.gree.mall.manager.plus.service.WebsitContractSignRecordService;
|
|
|
+import com.gree.mall.manager.plus.entity.*;
|
|
|
+import com.gree.mall.manager.plus.service.*;
|
|
|
import com.gree.mall.manager.utils.fadada.Auth4FDDUtil;
|
|
|
import com.gree.mall.manager.utils.oss.OSSUtil;
|
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
@@ -56,6 +50,7 @@ public class WebsitContractSignLogic {
|
|
|
private final WebsitContractSignFieldService websitContractSignFieldService;
|
|
|
private final FDDNotifyLogic fddNotifyLogic;
|
|
|
private final OSSUtil ossUtil;
|
|
|
+ private final CompanyCaAuthService companyCaAuthService;
|
|
|
|
|
|
@Value("${fadada.websit.auth.verified-way}")
|
|
|
private String fddAuthVerifiedWay;
|
|
@@ -266,6 +261,17 @@ public class WebsitContractSignLogic {
|
|
|
.eq(WebsitContractSignField::getWebsitContractSignItemId, id)
|
|
|
.list();
|
|
|
|
|
|
+ final CompanyCaAuth companyCaAuth = companyCaAuthService.lambdaQuery()
|
|
|
+ .eq(CompanyCaAuth::getWebsitId, websit.getParentId())
|
|
|
+ .eq(CompanyCaAuth::getCompanyCaAuthId, websit.getCompanyWechatId())
|
|
|
+ .eq(CompanyCaAuth::getFadadaIsAuth, IsYesNoEnum.YES.getKey())
|
|
|
+ .eq(CompanyCaAuth::getFadadaAuthAutoStatus, IsYesNoEnum.YES.getKey())
|
|
|
+ .one();
|
|
|
+
|
|
|
+ if (Objects.isNull(companyCaAuth)) {
|
|
|
+ throw new RemoteServiceException("未找到上级网点的CA认证记录");
|
|
|
+ }
|
|
|
+
|
|
|
if (CollectionUtil.isEmpty(fields)) {
|
|
|
return "";
|
|
|
}
|
|
@@ -276,8 +282,12 @@ public class WebsitContractSignLogic {
|
|
|
for (WebsitContractSignField field : fields) {
|
|
|
if (field.getFieldType().equals(FieldTypeEnum.CUSTOM.getKey())) {
|
|
|
params.set(field.getFieldName(), field.getFieldValue());
|
|
|
+ } else if (field.getFieldType().equals(FieldTypeEnum.CA_LEGAL_NAME.getKey())) {
|
|
|
+ params.set(field.getFieldName(), companyCaAuth.getLegalName());
|
|
|
} else if (field.getFieldType().equals(FieldTypeEnum.WEBSIT_NAME.getKey())) {
|
|
|
params.set(field.getFieldName(), websit.getName());
|
|
|
+ } else if (field.getFieldType().equals(FieldTypeEnum.SHORT_NAME.getKey())) {
|
|
|
+ params.set(field.getFieldName(), websit.getName());
|
|
|
} else if (field.getFieldType().equals(FieldTypeEnum.WEBSIT_ID.getKey())) {
|
|
|
params.set(field.getFieldName(), websit.getWebsitId());
|
|
|
} else if (field.getFieldType().equals(FieldTypeEnum.EMAIL.getKey())) {
|