|
@@ -11,6 +11,7 @@ import com.fjhx.activiti.feign.IActivitiApi;
|
|
|
import com.fjhx.calculator.entity.ProfitlossCalculator;
|
|
|
import com.fjhx.calculator.service.IProfitlossCalculatorService;
|
|
|
import com.fjhx.coderule.enums.CodeRuleTypeEnum;
|
|
|
+import com.fjhx.common.attachment.IAttachmentApi;
|
|
|
import com.fjhx.common.seq.feign.ISequenceApi;
|
|
|
import com.fjhx.contract.constant.ContractConstant;
|
|
|
import com.fjhx.contract.constant.ContractTrackLogConstant;
|
|
@@ -34,15 +35,18 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.redisson.api.RLock;
|
|
|
import org.springblade.common.constant.ActivitiConstant;
|
|
|
import org.springblade.common.constant.ApiConstant;
|
|
|
+import org.springblade.common.constant.AttachmentConstant;
|
|
|
import org.springblade.common.enums.YesOrNoEnum;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.core.redis.lock.RedisLockClient;
|
|
|
import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
+import org.springblade.core.tool.utils.CollectionUtil;
|
|
|
import org.springblade.core.tool.utils.id.IdUtils;
|
|
|
import org.springblade.resource.entity.Base64ToUrl;
|
|
|
import org.springblade.resource.feign.IObsClient;
|
|
|
+import org.springblade.system.attachment.entity.Attachment;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -95,6 +99,9 @@ public class ContractFlowServiceImpl implements IContractFlowService {
|
|
|
@Autowired
|
|
|
private RedisLockClient redisLockClient;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IAttachmentApi attachmentApi;
|
|
|
+
|
|
|
/**
|
|
|
* 新增、编辑草稿
|
|
|
*
|
|
@@ -545,7 +552,6 @@ public class ContractFlowServiceImpl implements IContractFlowService {
|
|
|
String remark = obsClient.base64ToUrl(new Base64ToUrl(product.getRemark(), AuthUtil.getTenantId()));
|
|
|
product.setRemark(remark);
|
|
|
}
|
|
|
-
|
|
|
product.setId(IdUtils.fastSimpleUUID());
|
|
|
//父id=0
|
|
|
product.setParentId("0");
|
|
@@ -586,6 +592,15 @@ public class ContractFlowServiceImpl implements IContractFlowService {
|
|
|
calculatorList.add(calculator);
|
|
|
}
|
|
|
}
|
|
|
+ //产品附件
|
|
|
+ if(CollectionUtils.isNotEmpty(product.getAttachments())){
|
|
|
+ for(Attachment a :product.getAttachments()){
|
|
|
+ a.setBusiId(product.getId());
|
|
|
+ a.setBusiType(AttachmentConstant.BusiType.PRODUCT);
|
|
|
+ }
|
|
|
+ //保存附件
|
|
|
+ attachmentApi.batchInsert(product.getAttachments());
|
|
|
+ }
|
|
|
}
|
|
|
if (CollectionUtils.isNotEmpty(childs)) {
|
|
|
products.addAll(childs);
|