Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f604fbf61d
3 files changed
+23
-2
No files matched your search
+2
-2
@@ -110,7 +110,6 @@ public class WalletFreezeController {
|
||||
return R.ok(walletFreezeService.create(dto));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "修改饭卡冻结记录表", description = "修改饭卡冻结记录表")
|
||||
@SysLog("修改饭卡冻结记录表")
|
||||
@PutMapping
|
||||
@@ -124,7 +123,8 @@ public class WalletFreezeController {
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletFreeze_del')")
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(walletFreezeService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
walletFreezeService.delByIds(CollUtil.toList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ResponseExcel
|
||||
|
||||
+4
@@ -8,6 +8,8 @@ import com.bsd.pjcloud.wallet.api.dto.WalletFreezeDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.WalletFreezeEntity;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletFreezeVo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public interface WalletFreezeService extends IService<WalletFreezeEntity> {
|
||||
|
||||
Page<WalletFreezeVo> pageJoin(Page page, WalletFreezeDto dto);
|
||||
@@ -19,4 +21,6 @@ public interface WalletFreezeService extends IService<WalletFreezeEntity> {
|
||||
void applyCallback(ProcessNodeRecordAssignUserParamDto dto);
|
||||
|
||||
void applyFreeze(WalletFreezeDto dto, PjcloudUser user);
|
||||
|
||||
void delByIds(ArrayList<Long> list);
|
||||
}
|
||||
+17
@@ -19,9 +19,11 @@ import com.bsd.pjcloud.common.core.util.CollectionUtils;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.security.service.PjcloudUser;
|
||||
import com.bsd.pjcloud.flow.task.api.feign.RemoteFlowEngineService;
|
||||
import com.bsd.pjcloud.flow.task.constant.NodeStatusEnum;
|
||||
import com.bsd.pjcloud.flow.task.constant.TaskCheckStatusEnum;
|
||||
import com.bsd.pjcloud.flow.task.dto.ProcessNodeRecordAssignUserParamDto;
|
||||
import com.bsd.pjcloud.flow.task.dto.TaskParamDto;
|
||||
import com.bsd.pjcloud.wallet.api.dto.WalletFreezeDto;
|
||||
import com.bsd.pjcloud.wallet.api.entity.*;
|
||||
import com.bsd.pjcloud.wallet.api.vo.WalletFreezeVo;
|
||||
@@ -63,6 +65,7 @@ public class WalletFreezeServiceImpl extends ServiceImpl<WalletFreezeMapper, Wal
|
||||
|
||||
private final WalletManageService walletManageService;
|
||||
private final WalletCodeUseService walletCodeUseService;
|
||||
private final RemoteFlowEngineService remoteFlowEngineService;
|
||||
|
||||
@Override
|
||||
public Page<WalletFreezeVo> pageJoin(Page page, WalletFreezeDto dto) {
|
||||
@@ -185,6 +188,20 @@ public class WalletFreezeServiceImpl extends ServiceImpl<WalletFreezeMapper, Wal
|
||||
getSelf().applyFlow(userData, dept, wallet, saveObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delByIds(ArrayList<Long> list) {
|
||||
if (ObjectUtil.isEmpty(list)) return;
|
||||
// 取消审批
|
||||
List<WalletFreezeEntity> walletFreezeList = this.baseMapper.selectByIds(list);
|
||||
if (ObjectUtil.isNotEmpty(walletFreezeList)) {
|
||||
TaskParamDto dto = new TaskParamDto();
|
||||
dto.setProcessInstanceIdList(walletFreezeList.stream().map(WalletFreezeEntity::getProcessId).toList());
|
||||
remoteFlowEngineService.stopProcessInstance(dto).getData();
|
||||
}
|
||||
this.removeByIds(list);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void applyFlow(UserInfo userInfo, SysDept dept, WalletManageEntity wallet, WalletFreezeEntity obj) {
|
||||
// 发起审批
|
||||
|
||||
Reference in new issue
Block a user