|
@@ -8,9 +8,7 @@ import com.fjhx.common.constant.SourceConstant;
|
|
|
import com.fjhx.common.enums.FlowStatusEnum1;
|
|
|
import com.fjhx.common.utils.Assert;
|
|
|
import com.fjhx.flow.core.FlowDelegate;
|
|
|
-import com.fjhx.flow.core.FlowThreadLocalUtil;
|
|
|
import com.fjhx.flow.enums.FlowStatusEnum;
|
|
|
-import com.fjhx.flow.enums.HandleTypeEnum;
|
|
|
import com.fjhx.purchase.entity.purchase.enums.PurchaseDataResourceEnum;
|
|
|
import com.fjhx.sale.entity.contract.po.ContractProduct;
|
|
|
import com.fjhx.sale.entity.purchase.dto.EhsdPurchaseDto;
|
|
@@ -18,7 +16,6 @@ import com.fjhx.sale.entity.purchase.po.EhsdPurchase;
|
|
|
import com.fjhx.sale.entity.purchase.po.EhsdPurchaseArrival;
|
|
|
import com.fjhx.sale.entity.purchase.po.EhsdPurchaseProduct;
|
|
|
import com.fjhx.sale.entity.purchase.po.EhsdPurchaseProject;
|
|
|
-import com.fjhx.sale.entity.sample.po.Sample;
|
|
|
import com.fjhx.sale.entity.sample.po.SampleProduct;
|
|
|
import com.fjhx.sale.service.contract.ContractProductService;
|
|
|
import com.fjhx.sale.service.purchase.EhsdPurchaseArrivalService;
|
|
@@ -27,7 +24,6 @@ import com.fjhx.sale.service.purchase.EhsdPurchaseProjectService;
|
|
|
import com.fjhx.sale.service.purchase.EhsdPurchaseService;
|
|
|
import com.fjhx.sale.service.sample.SampleProductService;
|
|
|
import com.ruoyi.common.annotation.LogicIgnore;
|
|
|
-import com.ruoyi.common.core.domain.BaseIdPo;
|
|
|
import com.ruoyi.common.core.domain.BasePo;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
@@ -128,10 +124,6 @@ public class EhsdPurchaseUpdateFlow extends FlowDelegate {
|
|
|
|
|
|
|
|
|
* 重新发起
|
|
|
- * @param flowId
|
|
|
- * @param businessId
|
|
|
- * @param flowStatus
|
|
|
- * @param submitData
|
|
|
*/
|
|
|
@Override
|
|
|
@LogicIgnore
|
|
@@ -148,20 +140,29 @@ public class EhsdPurchaseUpdateFlow extends FlowDelegate {
|
|
|
|
|
|
|
|
|
* 驳回
|
|
|
- * @param flowId
|
|
|
- * @param businessId
|
|
|
- * @param flowStatus
|
|
|
*/
|
|
|
@Override
|
|
|
public void reject(Long flowId, Long businessId, FlowStatusEnum flowStatus) {
|
|
|
- ehsdPurchaseService.update(q -> q
|
|
|
- .eq(EhsdPurchase::getId, businessId)
|
|
|
- .set(EhsdPurchase::getStatus, FlowStatusEnum1.REJECT.getKey())
|
|
|
- .set(EhsdPurchase::getUpdateTime, new Date())
|
|
|
- .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
- );
|
|
|
+ ehsdPurchaseService.update(q -> q
|
|
|
+ .eq(EhsdPurchase::getId, businessId)
|
|
|
+ .set(EhsdPurchase::getStatus, FlowStatusEnum1.REJECT.getKey())
|
|
|
+ .set(EhsdPurchase::getUpdateTime, new Date())
|
|
|
+ .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ EhsdPurchase ehsdPurchase = ehsdPurchaseService.getById(businessId);
|
|
|
+ ehsdPurchaseService.update(q -> q
|
|
|
+ .eq(BasePo::getId, ehsdPurchase.getOldPurchaseId())
|
|
|
+ .set(EhsdPurchase::getStatus, FlowStatusEnum1.PASS.getKey())
|
|
|
+ .set(BasePo::getUpdateTime, new Date())
|
|
|
+ .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * 作废
|
|
|
+ */
|
|
|
@Override
|
|
|
public void cancellation(Long flowId, Long businessId, FlowStatusEnum flowStatus) {
|
|
|
super.cancellation(flowId, businessId, flowStatus);
|
|
@@ -171,6 +172,15 @@ public class EhsdPurchaseUpdateFlow extends FlowDelegate {
|
|
|
.set(EhsdPurchase::getUpdateTime, new Date())
|
|
|
.set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
);
|
|
|
+
|
|
|
+
|
|
|
+ EhsdPurchase ehsdPurchase = ehsdPurchaseService.getById(businessId);
|
|
|
+ ehsdPurchaseService.update(q -> q
|
|
|
+ .eq(BasePo::getId, ehsdPurchase.getOldPurchaseId())
|
|
|
+ .set(EhsdPurchase::getStatus, FlowStatusEnum1.PASS.getKey())
|
|
|
+ .set(BasePo::getUpdateTime, new Date())
|
|
|
+ .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
|