|
@@ -1,16 +1,19 @@
|
|
|
-package com.fjhx.oa.flow;
|
|
|
+package com.fjhx.sale.flow;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fjhx.common.enums.CodingRuleEnum;
|
|
|
import com.fjhx.common.enums.FlowStatusEnum1;
|
|
|
import com.fjhx.common.service.coding.CodingRuleService;
|
|
|
import com.fjhx.flow.core.FlowDelegate;
|
|
|
import com.fjhx.flow.enums.FlowStatusEnum;
|
|
|
-import com.fjhx.oa.entity.seal.dto.SealUseDto;
|
|
|
import com.fjhx.oa.entity.seal.po.SealConfig;
|
|
|
-import com.fjhx.oa.entity.seal.po.SealUse;
|
|
|
import com.fjhx.oa.service.seal.SealConfigService;
|
|
|
-import com.fjhx.oa.service.seal.SealUseService;
|
|
|
+import com.fjhx.sale.entity.contract.po.Contract;
|
|
|
+import com.fjhx.sale.entity.seal.dto.SealUseDto;
|
|
|
+import com.fjhx.sale.entity.seal.po.SealUse;
|
|
|
+import com.fjhx.sale.service.contract.ContractService;
|
|
|
+import com.fjhx.sale.service.seal.SealUseService;
|
|
|
import com.ruoyi.common.core.domain.BasePo;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -30,6 +33,8 @@ public class SealUseFlow extends FlowDelegate {
|
|
|
private CodingRuleService codingRuleService;
|
|
|
@Autowired
|
|
|
private SealConfigService sealConfigService;
|
|
|
+ @Autowired
|
|
|
+ private ContractService contractService;
|
|
|
|
|
|
@Override
|
|
|
public String getFlowKey() {
|
|
@@ -51,12 +56,17 @@ public class SealUseFlow extends FlowDelegate {
|
|
|
|
|
|
@Override
|
|
|
public void end(Long flowId, Long businessId, JSONObject submitData) {
|
|
|
+ SealUse byId = sealUseService.getById(businessId);
|
|
|
sealUseService.update(q -> q
|
|
|
.eq(SealUse::getId, businessId)
|
|
|
.set(SealUse::getStatus, FlowStatusEnum1.PASS.getKey())
|
|
|
.set(BasePo::getUpdateTime, new Date())
|
|
|
.set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
);
|
|
|
+ if (ObjectUtil.isNotEmpty(byId.getContractId())) {
|
|
|
+ //刷新合同用印申请id
|
|
|
+ contractService.update(q -> q.eq(Contract::getId, byId.getContractId()).set(Contract::getSealUseId, businessId));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|