27b628c9 by xiaojie

【数据资产】

1、认证变更跨平台审批
1 parent 6b1c82b9
......@@ -185,6 +185,14 @@ public class EnterpriseController {
return CommonRes.success(true);
}
@DeleteMapping("/change/cross-delete")
@SystemLog(value = "变更申请-批量删除(跨平台)")
@Operation(summary = "变更申请-批量删除(跨平台)", hidden = true)
public CommonRes<Boolean> crossRemoveByGuids(@RequestBody List<String> zqBizGuids) {
enterpriseChangeApproveService.crossRemoveByBizGuid(zqBizGuids);
return CommonRes.success(true);
}
//endregion
}
......
......@@ -20,4 +20,6 @@ public interface EnterpriseChangeApproveService {
void removeByGuids(List<String> guids);
void crossFlowCallBack(BizCallbackDTO dto);
void crossRemoveByBizGuid(List<String> zqBizGuids);
}
......
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.csbr.cloud.common.enums.SystemError;
import com.csbr.cloud.common.exception.CsbrSystemException;
import com.csbr.cloud.common.util.CommonUtil;
......@@ -29,9 +30,12 @@ import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
......@@ -241,6 +245,31 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
enterpriseService.updateTenant(vo);
}
@Override
@GlobalTransactional
public void crossRemoveByBizGuid(List<String> zqBizGuids) {
if (ObjectUtils.isEmpty(zqBizGuids)) {
// W00012 = {0}:参数[{1}]不能为空!
throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, messageSourceUtil.getMessage("W00012",
String.format("删除%s数据", FUNCTION_NAME), "数据唯一标识"));
}
String zqBizGuid = zqBizGuids.get(0);
LambdaQueryWrapper<MfEnterpriseChangeApprove> queryWrapper = Wrappers.lambdaQuery(MfEnterpriseChangeApprove.class);
queryWrapper.eq(MfEnterpriseChangeApprove::getZqBizGuid, zqBizGuid);
queryWrapper.eq(MfEnterpriseChangeApprove::getDataType, 2).apply(" limit 1 ");
MfEnterpriseChangeApprove enterpriseChangeApprove = mfEnterpriseChangeApproveService.getOne(queryWrapper);
if (ObjectUtils.isEmpty(enterpriseChangeApprove)) {
return;
}
LambdaUpdateWrapper<MfEnterpriseChangeApprove> removeWraaper = Wrappers.lambdaUpdate(MfEnterpriseChangeApprove.class);
removeWraaper.eq(MfEnterpriseChangeApprove::getZqBizGuid, zqBizGuid);
mfEnterpriseChangeApproveService.remove(removeWraaper);
// 删除流程数据
approvalFlowUtil.removeApproveByBizGuids(Collections.singletonList(enterpriseChangeApprove.getGuid()));
}
/**
* 企业信息删除前置处理
* @author xcq
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!