From c92df6e57423bfbd71c4b228337d99b7653755bd Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 28 二月 2025 16:31:16 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/xiaochen991015/xizang --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFlowManagementServiceImpl.java | 16 ruoyi-system/src/main/java/com/ruoyi/system/service/TBillService.java | 9 ruoyi-system/src/main/java/com/ruoyi/system/task/jobs/StateProcessJob.java | 4 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java | 5 ruoyi-system/src/main/resources/mapper/system/TCheckAcceptRecordMapper.xml | 2 ruoyi-system/src/main/java/com/ruoyi/system/query/SysUserQuery.java | 4 ruoyi-system/src/main/java/com/ruoyi/system/service/TTenantService.java | 9 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java | 20 + ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StateProcessTemplateServiceImpl.java | 88 +++++++ ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java | 13 + ruoyi-system/src/main/java/com/ruoyi/system/dto/CachPayDto.java | 33 +++ ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java | 5 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java | 7 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java | 6 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysPostController.java | 6 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java | 153 ++++++++++--- ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TContractController.java | 2 ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java | 15 + ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml | 2 ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseModel.java | 1 ruoyi-system/src/main/resources/mapper/system/TDeptToUserMapper.xml | 6 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBankFlowServiceImpl.java | 27 - ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java | 3 ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 15 ruoyi-system/src/main/java/com/ruoyi/system/vo/ProcessTaskListVO.java | 1 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java | 5 ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/THouseController.java | 1 ruoyi-system/src/main/java/com/ruoyi/system/model/TBankFlow.java | 2 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java | 6 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java | 15 - ruoyi-system/src/main/java/com/ruoyi/system/service/TBankFlowService.java | 1 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysUserController.java | 9 ruoyi-system/src/main/java/com/ruoyi/system/service/TFlowManagementService.java | 4 ruoyi-system/src/main/java/com/ruoyi/system/task/base/AbstractJob.java | 7 ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java | 7 ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDeptToUserMapper.java | 5 ruoyi-admin/pom.xml | 10 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBankFlowController.java | 20 + ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java | 10 ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java | 2 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInvoiceController.java | 3 ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java | 1 ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java | 2 ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayDto.java | 3 ruoyi-system/src/main/java/com/ruoyi/system/dto/TBillDto.java | 5 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 3 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java | 2 ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java | 6 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java | 4 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java | 14 + ruoyi-common/src/main/resources/META-INF/spring.factories | 2 ruoyi-system/src/main/java/com/ruoyi/system/service/StateProcessTemplateService.java | 7 52 files changed, 408 insertions(+), 200 deletions(-) diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 96e7388..5741488 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -32,11 +32,11 @@ <version>31.1-jre</version> <!-- 请根据需要选择合适的版本 --> </dependency> <!-- spring-boot-devtools --> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-devtools</artifactId> - <optional>true</optional> <!-- 表示依赖不会传递 --> - </dependency> +<!-- <dependency>--> +<!-- <groupId>org.springframework.boot</groupId>--> +<!-- <artifactId>spring-boot-devtools</artifactId>--> +<!-- <optional>true</optional> <!– 表示依赖不会传递 –>--> +<!-- </dependency>--> <!-- swagger3--> <dependency> diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBankFlowController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBankFlowController.java index e3929d2..cc91e8f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBankFlowController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBankFlowController.java @@ -6,6 +6,7 @@ import com.alibaba.excel.event.AnalysisEventListener; import com.ruoyi.common.basic.PageInfo; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.WebUtils; import com.ruoyi.system.importExcel.TBankFlowImportExcel; import com.ruoyi.system.model.TBankFlow; @@ -15,10 +16,7 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -84,7 +82,6 @@ list.clear(); } } - @Override public void doAfterAllAnalysed(AnalysisContext context) { int size = list.size(); @@ -93,12 +90,12 @@ } } }).sheet().doRead(); - - // 导出导入结果 HttpServletResponse response = WebUtils.response(); response.setContentType("application/vnd.ms-excel;charset=utf-8"); response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); + response.setHeader("Content-Length","1"); + response.setHeader("Pragma", "no-cache"); if (failList.size() > 0) { EasyExcel.write(response.getOutputStream(), TBankFlowImportExcel.class).sheet("Sheet1").doWrite(failList); } else { @@ -107,12 +104,19 @@ failList.add(result); EasyExcel.write(response.getOutputStream(), TBankFlowImportExcel.class).sheet("Sheet1").doWrite(failList); } - } catch (Exception e) { e.printStackTrace(); System.err.println("银行流水返回结果导出失败"); } } + + @GetMapping("getByBankSerialNumber") + public R<List<TBankFlow>> searchByBankSerialNumber(@RequestParam String bankSerialNumber){ + List<TBankFlow> tBankFlows = flowService.searchByBankSerialNumber(bankSerialNumber); + return R.ok(tBankFlows); + } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java index 4893b54..be019f9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TBillController.java @@ -4,10 +4,13 @@ import com.ruoyi.common.basic.PageInfo; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.dto.*; import com.ruoyi.system.model.TBill; +import com.ruoyi.system.model.TBillConfirm; import com.ruoyi.system.model.TBillDetail; import com.ruoyi.system.query.TBillQuery; +import com.ruoyi.system.service.TBillConfirmService; import com.ruoyi.system.service.TBillDetailService; import com.ruoyi.system.service.TBillService; import io.swagger.annotations.Api; @@ -39,6 +42,8 @@ @Autowired TBillDetailService tBillDetailService; + @Autowired + TBillConfirmService tBillConfirmService; @PreAuthorize("@ss.hasPermi('bill:list')") @PostMapping("list") @@ -58,7 +63,10 @@ @ApiOperation("通过ID查找详情") @GetMapping("getDetailById") - public R<TBillDto> getDetailById(@Validated @NotEmpty String id){ + public R<TBillDto> getDetailById(@RequestParam String id){ + if (StringUtils.isEmpty(id)){ + return R.fail(); + } TBillDto dto = tBillService.getDetailByBillId(id); if (dto.getBillType().equals("3")){ List<TBillDetail> details = tBillDetailService.getByBillId(id); @@ -66,6 +74,10 @@ if (detail.getLiveType()==1)dto.setWater(detail); //水费 else dto.setElect(detail); //电费 } + } + if (StringUtils.isNotEmpty(dto.getConfirmId())){ + TBillConfirm confirm = tBillConfirmService.getById(dto.getConfirmId()); + dto.setConfirm(confirm); } return R.ok(dto); } @@ -96,10 +108,14 @@ return R.ok(failNum); } + + + @PreAuthorize("@ss.hasPermi('bill:list:receipt')") @ApiOperation("收款") @PostMapping("cashPay") - public R cashPay(@RequestBody OfflinePayDto offlinePayDto){ + public R cashPay(@RequestBody CachPayDto cachPayDto){ + tBillService.cashPay(cachPayDto); return null; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java index d6f9f12..760fa94 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java @@ -124,7 +124,7 @@ new ImmutableMap.Builder<String, Long>(). put("id", flwTask.getId()) .build(); - QuartzManager.addJob(StateProcessJob.class, (StateProcessJob.name+flwTask.getId()).toUpperCase(), TimeJobType.AUTO_AUDIT,new Date(new Date().getTime()+10*1000L), maps); + QuartzManager.addJob(StateProcessJob.class, (StateProcessJob.name+flwTask.getId()).toUpperCase(), TimeJobType.AUTO_AUDIT,new Date(new Date().getTime()+3*60*1000L), maps); } } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInvoiceController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInvoiceController.java index 62c6668..17a0f0c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInvoiceController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInvoiceController.java @@ -5,6 +5,7 @@ import com.ruoyi.common.basic.PageInfo; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.dto.TBillDto; import com.ruoyi.system.model.TBill; import com.ruoyi.system.model.TInvoice; import com.ruoyi.system.query.TInvoiceQuery; @@ -48,7 +49,7 @@ @ApiOperation(value = "关联账单信息") @GetMapping(value = "/getBillByInvoiceId/{invoiceId}") - public R<PageInfo<TBill>> getBillByInvoiceId(@PathVariable String invoiceId){ + public R<PageInfo<TBillDto>> getBillByInvoiceId(@PathVariable String invoiceId){ return R.ok(tBillService.getBillByInvoiceId(invoiceId)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java index 0bd938e..c1d5f10 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java @@ -73,6 +73,9 @@ @ApiOperation(value = "添加租户") @PostMapping(value = "/add") public R<Boolean> add(@Validated @RequestBody TTenantDTO dto) { + if(tenantService.isExit(dto)){ + return R.fail("该账号已存在"); + } // 密码加密 dto.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); return R.ok(tenantService.save(dto)); @@ -86,6 +89,9 @@ @ApiOperation(value = "修改租户") @PostMapping(value = "/update") public R<Boolean> update(@Validated @RequestBody TTenantDTO dto) { + if(tenantService.isExit(dto)){ + return R.fail("该账号已存在"); + } // 密码加密 if(StringUtils.isNotBlank(dto.getPassword())){ dto.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); @@ -101,8 +107,8 @@ @GetMapping(value = "/getDetailById") public R<TTenant> getDetailById(@RequestParam String id) { TTenant tenant = tenantService.getById(id); - tenant.setTenantAttributes(StringUtils.isNotEmpty(tenant.getTenantAttributes())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_ATTRIBUTE,tenant.getTenantAttributes()):""); - tenant.setTenantType(StringUtils.isNotEmpty(tenant.getTenantType())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_TYPE,tenant.getTenantType()):""); +// tenant.setTenantAttributes(StringUtils.isNotEmpty(tenant.getTenantAttributes())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_ATTRIBUTE,tenant.getTenantAttributes()):""); +// tenant.setTenantType(StringUtils.isNotEmpty(tenant.getTenantType())?DictUtils.getDictLabel(DictConstants.DICT_TYPE_TENANT_TYPE,tenant.getTenantType()):""); return R.ok(tenant); } diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TContractController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TContractController.java index 5062df4..7390252 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TContractController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TContractController.java @@ -76,7 +76,6 @@ @Log(title = "合同管理-撤销审批", businessType = BusinessType.UPDATE) @ApiOperation(value = "撤销审批") - @PreAuthorize("@ss.hasPermi('system:contract:revoke')") @PostMapping(value = "/updateContractStatus") public R<Boolean> updateContractStatus(@RequestBody RevokeDTO dto) { TContract contract = contractService.getById(dto.getContractId()); @@ -84,7 +83,6 @@ contractService.updateById(contract); // 撤销审批实例 stateProcessTemplateService.revoke(dto.getInstanceId()); - return R.ok(); } @ApiOperation(value = "查询合同信息信息") diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/THouseController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/THouseController.java index 176b1af..2942d5e 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/THouseController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/THouseController.java @@ -32,7 +32,6 @@ private THouseService tHouseService; @ApiOperation(value = "查询房屋信息") @GetMapping(value = "/getHouseById") - @PreAuthorize("@ss.hasPermi('system:house:detail')") public R<THouse> getHouseById(@RequestParam String id) { THouse tHouse = tHouseService.getById(id); tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tHouse.getLeaseStatus())); diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java index 69470d0..ef8c5dd 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java @@ -44,7 +44,6 @@ caches.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "密码错误次数")); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping() public AjaxResult getInfo() throws Exception { @@ -68,14 +67,12 @@ return AjaxResult.success(result); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping("/getNames") public AjaxResult cache() { return AjaxResult.success(caches); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping("/getKeys/{cacheName}") public AjaxResult getCacheKeys(@PathVariable String cacheName) { @@ -83,7 +80,6 @@ return AjaxResult.success(cacheKeys); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") @GetMapping("/getValue/{cacheName}/{cacheKey}") public AjaxResult getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey) { @@ -92,7 +88,6 @@ return AjaxResult.success(sysCache); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") @DeleteMapping("/clearCacheName/{cacheName}") public AjaxResult clearCacheName(@PathVariable String cacheName) { @@ -101,7 +96,6 @@ return AjaxResult.success(); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") @DeleteMapping("/clearCacheKey/{cacheKey}") public AjaxResult clearCacheKey(@PathVariable String cacheKey) { @@ -109,7 +103,6 @@ return AjaxResult.success(); } - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") @DeleteMapping("/clearCacheAll") public AjaxResult clearCacheAll() { diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java index cc805ad..60f09bb 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java @@ -16,7 +16,6 @@ @RequestMapping("/monitor/server") public class ServerController { - @PreAuthorize("@ss.hasPermi('monitor:server:list')") @GetMapping() public AjaxResult getInfo() throws Exception { diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java index 1039b43..eb748ba 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java @@ -35,7 +35,6 @@ @Autowired private SysPasswordService passwordService; - @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')") @GetMapping("/list") public TableDataInfo list(SysLogininfor logininfor) { @@ -45,7 +44,6 @@ } // @Log(title = "登录日志", businessType = BusinessType.EXPORT) -// @PreAuthorize("@ss.hasPermi('monitor:logininfor:export')") // @PostMapping("/export") // public void export(HttpServletResponse response, SysLogininfor logininfor) // { @@ -54,7 +52,6 @@ // util.exportExcel(response, list, "登录日志"); // } - @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") @Log(title = "登录日志", businessType = BusinessType.DELETE) @DeleteMapping("/{infoIds}") public AjaxResult remove(@PathVariable Long[] infoIds) @@ -62,7 +59,6 @@ return toAjax(logininforService.deleteLogininforByIds(infoIds)); } - @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") @Log(title = "登录日志", businessType = BusinessType.CLEAN) @DeleteMapping("/clean") public AjaxResult clean() @@ -71,7 +67,6 @@ return success(); } - @PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')") @Log(title = "账户解锁", businessType = BusinessType.OTHER) @GetMapping("/unlock/{userName}") public AjaxResult unlock(@PathVariable("userName") String userName) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java index a442863..c13bcfc 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java @@ -38,7 +38,6 @@ @Autowired private RedisCache redisCache; - @PreAuthorize("@ss.hasPermi('monitor:online:list')") @GetMapping("/list") public TableDataInfo list(String ipaddr, String userName) { @@ -72,7 +71,6 @@ /** * 强退用户 */ - @PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')") @Log(title = "在线用户", businessType = BusinessType.FORCE) @DeleteMapping("/{tokenId}") public AjaxResult forceLogout(@PathVariable String tokenId) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java index 5737466..706ccf2 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java @@ -35,7 +35,6 @@ private ISysConfigService configService; // @Log(title = "参数管理", businessType = BusinessType.EXPORT) -// @PreAuthorize("@ss.hasPermi('system:config:export')") // @PostMapping("/export") // public void export(HttpServletResponse response, SysConfig config) // { @@ -47,7 +46,6 @@ /** * 根据参数编号获取详细信息 */ - @PreAuthorize("@ss.hasPermi('system:config:query')") @GetMapping(value = "/{configId}") public AjaxResult getInfo(@PathVariable Long configId) { @@ -66,7 +64,6 @@ /** * 新增参数配置 */ - @PreAuthorize("@ss.hasPermi('system:config:add')") @Log(title = "参数管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysConfig config) @@ -82,7 +79,6 @@ /** * 修改参数配置 */ - @PreAuthorize("@ss.hasPermi('system:config:edit')") @Log(title = "参数管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysConfig config) @@ -98,7 +94,6 @@ /** * 删除参数配置 */ - @PreAuthorize("@ss.hasPermi('system:config:remove')") @Log(title = "参数管理", businessType = BusinessType.DELETE) @DeleteMapping("/{configIds}") public AjaxResult remove(@PathVariable Long[] configIds) @@ -110,7 +105,6 @@ /** * 刷新参数缓存 */ - @PreAuthorize("@ss.hasPermi('system:config:remove')") @Log(title = "参数管理", businessType = BusinessType.CLEAN) @DeleteMapping("/refreshCache") public AjaxResult refreshCache() diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java index a74355f..990d0f7 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java @@ -37,7 +37,6 @@ /** * 获取部门列表 */ - // @PreAuthorize("@ss.hasPermi('system:dept:list')") @GetMapping("/list") public AjaxResult list(SysDept dept) { @@ -48,7 +47,6 @@ /** * 查询部门列表(排除节点) */ - // @PreAuthorize("@ss.hasPermi('system:dept:list')") @GetMapping("/list/exclude/{deptId}") public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) { @@ -60,7 +58,6 @@ /** * 根据部门编号获取详细信息 */ - // @PreAuthorize("@ss.hasPermi('system:dept:query')") @GetMapping(value = "/{deptId}") public AjaxResult getInfo(@PathVariable Long deptId) { @@ -71,7 +68,6 @@ /** * 新增部门 */ - // @PreAuthorize("@ss.hasPermi('system:dept:add')") @Log(title = "部门管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysDept dept) @@ -87,7 +83,6 @@ /** * 修改部门 */ - // @PreAuthorize("@ss.hasPermi('system:dept:edit')") @Log(title = "部门管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysDept dept) @@ -113,7 +108,6 @@ /** * 删除部门 */ - // @PreAuthorize("@ss.hasPermi('system:dept:remove')") @Log(title = "部门管理", businessType = BusinessType.DELETE) @DeleteMapping("/{deptId}") public AjaxResult remove(@PathVariable Long deptId) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java index d8f207d..23b0c23 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java @@ -40,7 +40,6 @@ @Autowired private ISysDictTypeService dictTypeService; - @PreAuthorize("@ss.hasPermi('system:dict:list')") @GetMapping("/list") public TableDataInfo list(SysDictData dictData) { @@ -50,7 +49,6 @@ } // @Log(title = "字典数据", businessType = BusinessType.EXPORT) -// @PreAuthorize("@ss.hasPermi('system:dict:export')") // @PostMapping("/export") // public void export(HttpServletResponse response, SysDictData dictData) // { @@ -62,7 +60,6 @@ /** * 查询字典数据详细 */ - @PreAuthorize("@ss.hasPermi('system:dict:query')") @GetMapping(value = "/{dictCode}") public AjaxResult getInfo(@PathVariable Long dictCode) { @@ -86,7 +83,6 @@ /** * 新增字典类型 */ - @PreAuthorize("@ss.hasPermi('system:dict:add')") @Log(title = "字典数据", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysDictData dict) @@ -98,7 +94,6 @@ /** * 修改保存字典类型 */ - @PreAuthorize("@ss.hasPermi('system:dict:edit')") @Log(title = "字典数据", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysDictData dict) @@ -110,7 +105,6 @@ /** * 删除字典类型 */ - @PreAuthorize("@ss.hasPermi('system:dict:remove')") @Log(title = "字典类型", businessType = BusinessType.DELETE) @DeleteMapping("/{dictCodes}") public AjaxResult remove(@PathVariable Long[] dictCodes) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java index 855d191..1c5ab6b 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java @@ -34,7 +34,6 @@ @Autowired private ISysDictTypeService dictTypeService; - @PreAuthorize("@ss.hasPermi('system:dict:list')") @GetMapping("/list") public TableDataInfo list(SysDictType dictType) { @@ -44,7 +43,6 @@ } // @Log(title = "字典类型", businessType = BusinessType.EXPORT) -// @PreAuthorize("@ss.hasPermi('system:dict:export')") // @PostMapping("/export") // public void export(HttpServletResponse response, SysDictType dictType) // { @@ -56,7 +54,6 @@ /** * 查询字典类型详细 */ - @PreAuthorize("@ss.hasPermi('system:dict:query')") @GetMapping(value = "/{dictId}") public AjaxResult getInfo(@PathVariable Long dictId) { @@ -66,7 +63,6 @@ /** * 新增字典类型 */ - @PreAuthorize("@ss.hasPermi('system:dict:add')") @Log(title = "字典类型", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysDictType dict) @@ -82,7 +78,6 @@ /** * 修改字典类型 */ - @PreAuthorize("@ss.hasPermi('system:dict:edit')") @Log(title = "字典类型", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysDictType dict) @@ -98,7 +93,6 @@ /** * 删除字典类型 */ - @PreAuthorize("@ss.hasPermi('system:dict:remove')") @Log(title = "字典类型", businessType = BusinessType.DELETE) @DeleteMapping("/{dictIds}") public AjaxResult remove(@PathVariable Long[] dictIds) @@ -110,7 +104,6 @@ /** * 刷新字典缓存 */ - @PreAuthorize("@ss.hasPermi('system:dict:remove')") @Log(title = "字典类型", businessType = BusinessType.CLEAN) @DeleteMapping("/refreshCache") public AjaxResult refreshCache() diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java index ad9b0f4..2b5e89c 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java @@ -62,7 +62,6 @@ /** * 获取菜单列表 */ - // @PreAuthorize("@ss.hasPermi('system:menu:list')") @GetMapping("/list") public AjaxResult list(SysMenu menu) { @@ -73,7 +72,6 @@ /** * 根据菜单编号获取详细信息 */ - // @PreAuthorize("@ss.hasPermi('system:menu:query')") @GetMapping(value = "/{menuId}") public AjaxResult getInfo(@PathVariable Long menuId) { @@ -106,7 +104,6 @@ /** * 新增菜单 */ - // @PreAuthorize("@ss.hasPermi('system:menu:add')") @Log(title = "菜单管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysMenu menu) @@ -126,7 +123,6 @@ /** * 修改菜单 */ - // @PreAuthorize("@ss.hasPermi('system:menu:edit')") @Log(title = "菜单管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysMenu menu) @@ -150,7 +146,6 @@ /** * 删除菜单 */ - // @PreAuthorize("@ss.hasPermi('system:menu:remove')") @Log(title = "菜单管理", businessType = BusinessType.DELETE) @DeleteMapping("/{menuId}") public AjaxResult remove(@PathVariable("menuId") Long menuId) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java index 3d7352a..92a1d6b 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java @@ -35,7 +35,6 @@ /** * 获取通知公告列表 */ - @PreAuthorize("@ss.hasPermi('system:notice:list')") @GetMapping("/list") public TableDataInfo list(SysNotice notice) { @@ -47,7 +46,6 @@ /** * 根据通知公告编号获取详细信息 */ - @PreAuthorize("@ss.hasPermi('system:notice:query')") @GetMapping(value = "/{noticeId}") public AjaxResult getInfo(@PathVariable Long noticeId) { @@ -57,7 +55,6 @@ /** * 新增通知公告 */ - @PreAuthorize("@ss.hasPermi('system:notice:add')") @Log(title = "通知公告", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysNotice notice) @@ -69,7 +66,6 @@ /** * 修改通知公告 */ - @PreAuthorize("@ss.hasPermi('system:notice:edit')") @Log(title = "通知公告", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysNotice notice) @@ -81,7 +77,6 @@ /** * 删除通知公告 */ - @PreAuthorize("@ss.hasPermi('system:notice:remove')") @Log(title = "通知公告", businessType = BusinessType.DELETE) @DeleteMapping("/{noticeIds}") public AjaxResult remove(@PathVariable Long[] noticeIds) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysPostController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysPostController.java index 4d18083..a7a3e13 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysPostController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysPostController.java @@ -37,7 +37,6 @@ /** * 获取岗位列表 */ - @PreAuthorize("@ss.hasPermi('system:post:list')") @GetMapping("/list") public TableDataInfo list(SysPost post) { @@ -47,7 +46,6 @@ } // @Log(title = "岗位管理", businessType = BusinessType.EXPORT) -// @PreAuthorize("@ss.hasPermi('system:post:export')") // @PostMapping("/export") // public void export(HttpServletResponse response, SysPost post) // { @@ -59,7 +57,6 @@ /** * 根据岗位编号获取详细信息 */ - @PreAuthorize("@ss.hasPermi('system:post:query')") @GetMapping(value = "/{postId}") public AjaxResult getInfo(@PathVariable Long postId) { @@ -69,7 +66,6 @@ /** * 新增岗位 */ - @PreAuthorize("@ss.hasPermi('system:post:add')") @Log(title = "岗位管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@Validated @RequestBody SysPost post) @@ -89,7 +85,6 @@ /** * 修改岗位 */ - @PreAuthorize("@ss.hasPermi('system:post:edit')") @Log(title = "岗位管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysPost post) @@ -109,7 +104,6 @@ /** * 删除岗位 */ - @PreAuthorize("@ss.hasPermi('system:post:remove')") @Log(title = "岗位管理", businessType = BusinessType.DELETE) @DeleteMapping("/{postIds}") public AjaxResult remove(@PathVariable Long[] postIds) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java index 3aeaac9..fecb55c 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java @@ -61,7 +61,6 @@ @Autowired private ISysMenuService menuService; - // @PreAuthorize("@ss.hasPermi('system:role:list')") @ApiOperation(value = "角色列表") @PostMapping("/list") public AjaxResult list(@RequestBody SysRoleQuery query) @@ -94,7 +93,6 @@ } // @Log(title = "角色管理", businessType = BusinessType.EXPORT) -// // @PreAuthorize("@ss.hasPermi('system:role:export')") // @PostMapping("/export") // public void export(HttpServletResponse response, SysRole role) // { @@ -106,7 +104,6 @@ /** * 根据角色编号获取详细信息 */ - // @PreAuthorize("@ss.hasPermi('system:role:query')") @GetMapping(value = "/{roleId}") public AjaxResult getInfo(@PathVariable Long roleId) { @@ -150,7 +147,6 @@ /** * 新增角色 */ - // @PreAuthorize("@ss.hasPermi('system:role:add')") @ApiOperation(value = "新增角色") @Log(title = "角色信息-新增角色", businessType = BusinessType.INSERT) @PostMapping("/add") @@ -168,7 +164,6 @@ /** * 修改保存角色 */ - // @PreAuthorize("@ss.hasPermi('system:role:edit')") @ApiOperation(value = "编辑角色") @Log(title = "角色信息-编辑角色", businessType = BusinessType.UPDATE) @PutMapping @@ -196,7 +191,6 @@ /** * 修改保存数据权限 */ - // @PreAuthorize("@ss.hasPermi('system:role:edit')") @Log(title = "角色管理", businessType = BusinessType.UPDATE) @PutMapping("/dataScope") public AjaxResult dataScope(@RequestBody SysRole role) @@ -209,7 +203,6 @@ /** * 状态修改 */ - // @PreAuthorize("@ss.hasPermi('system:role:edit')") @ApiOperation(value = "状态修改") @Log(title = "角色信息-角色状态修改", businessType = BusinessType.UPDATE) @PutMapping("/changeStatus") @@ -223,7 +216,6 @@ /** * 删除角色 */ - // @PreAuthorize("@ss.hasPermi('system:role:remove')") @ApiOperation(value = "删除角色") @Log(title = "角色信息-角色删除角色", businessType = BusinessType.DELETE) @DeleteMapping("/deleteById/{ids}") @@ -240,7 +232,6 @@ /** * 获取角色选择框列表 */ - // @PreAuthorize("@ss.hasPermi('system:role:query')") @GetMapping("/optionselect") public AjaxResult optionselect() { @@ -250,7 +241,6 @@ /** * 查询已分配用户角色列表 */ - // @PreAuthorize("@ss.hasPermi('system:role:list')") @GetMapping("/authUser/allocatedList") public TableDataInfo allocatedList(SysUser user) { @@ -262,7 +252,6 @@ /** * 查询未分配用户角色列表 */ - // @PreAuthorize("@ss.hasPermi('system:role:list')") @GetMapping("/authUser/unallocatedList") public TableDataInfo unallocatedList(SysUser user) { @@ -274,7 +263,6 @@ /** * 取消授权用户 */ - // @PreAuthorize("@ss.hasPermi('system:role:edit')") @Log(title = "角色管理", businessType = BusinessType.GRANT) @PutMapping("/authUser/cancel") public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole) @@ -285,7 +273,6 @@ /** * 批量取消授权用户 */ - // @PreAuthorize("@ss.hasPermi('system:role:edit')") @Log(title = "角色管理", businessType = BusinessType.GRANT) @PutMapping("/authUser/cancelAll") public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds) @@ -296,7 +283,6 @@ /** * 批量选择用户授权 */ - // @PreAuthorize("@ss.hasPermi('system:role:edit')") @Log(title = "角色管理", businessType = BusinessType.GRANT) @PutMapping("/authUser/selectAll") public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds) @@ -308,7 +294,6 @@ /** * 获取对应角色部门树列表 */ - // @PreAuthorize("@ss.hasPermi('system:role:query')") @GetMapping(value = "/deptTree/{roleId}") public AjaxResult deptTree(@PathVariable("roleId") Long roleId) { diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 310a24a..24335f4 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -232,7 +232,6 @@ // @Log(title = "用户管理", businessType = BusinessType.EXPORT) -//// // @PreAuthorize("@ss.hasPermi('system:user:export')") // @PostMapping("/export") // public void export(HttpServletResponse response, SysUser user) // { @@ -242,7 +241,6 @@ // } // @Log(title = "用户管理", businessType = BusinessType.IMPORT) -//// // @PreAuthorize("@ss.hasPermi('system:user:import')") // @PostMapping("/importData") // public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception // { @@ -264,7 +262,6 @@ /** * 新增用户 */ - // @PreAuthorize("@ss.hasPermi('system:user:add')") @ApiOperation(value = "新增用户管理") @Log(title = "用户信息-新增用户", businessType = BusinessType.INSERT) @PostMapping("/add") @@ -288,7 +285,6 @@ /** * 修改用户 */ - // @PreAuthorize("@ss.hasPermi('system:user:edit')") @ApiOperation(value = "修改用户管理") @Log(title = "用户信息-修改用户", businessType = BusinessType.UPDATE) @PostMapping("/edit") @@ -314,7 +310,6 @@ /** * 删除用户 */ - // @PreAuthorize("@ss.hasPermi('system:user:remove')") @ApiOperation(value = "批量删除用户") @Log(title = "用户信息-批量删除用户", businessType = BusinessType.DELETE) @DeleteMapping("/deleteById/{ids}") @@ -335,7 +330,6 @@ /** * 重置密码 */ - // @PreAuthorize("@ss.hasPermi('system:user:resetPwd')") @ApiOperation(value = "重置密码") @Log(title = "用户信息-重置密码", businessType = BusinessType.UPDATE) @PostMapping("/resetPwd") @@ -367,7 +361,6 @@ /** * 根据用户编号获取授权角色 */ - // @PreAuthorize("@ss.hasPermi('system:user:query')") @GetMapping("/authRole/{userId}") public AjaxResult authRole(@PathVariable("userId") Long userId) { @@ -382,7 +375,6 @@ /** * 用户授权角色 */ - // @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.GRANT) @PutMapping("/authRole") public AjaxResult insertAuthRole(Long userId, Long[] roleIds) @@ -395,7 +387,6 @@ /** * 获取部门树列表 */ - // @PreAuthorize("@ss.hasPermi('system:user:list')") @GetMapping("/deptTree") public AjaxResult deptTree(SysDept dept) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseModel.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseModel.java index 3e5ea1d..94db5c6 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseModel.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseModel.java @@ -60,7 +60,6 @@ * 最后修改时间 */ @ApiModelProperty(value = "记录修改时间,前端忽略") - @JsonIgnore @TableField("update_time") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime updateTime; diff --git a/ruoyi-common/src/main/resources/META-INF/spring.factories b/ruoyi-common/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..dc976e7 --- /dev/null +++ b/ruoyi-common/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +com.ruoyi.common.config.SmsConfig diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/CachPayDto.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/CachPayDto.java new file mode 100644 index 0000000..fbc237e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/CachPayDto.java @@ -0,0 +1,33 @@ +package com.ruoyi.system.dto; + +import com.ruoyi.system.model.TBankFlow; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 收款对象 + */ +@Data +public class CachPayDto implements Serializable { + + @ApiModelProperty(value = "支付类型:1.银行、2.现金") + private Integer payType; + + @ApiModelProperty(value = "账单ID") + private String billId; + + @ApiModelProperty(value = "金额") + private BigDecimal amount; + + @ApiModelProperty(value = "付款人姓名") + private String payer; + + @ApiModelProperty(value = "银行支付的付款凭证") + private String voucher; + + @ApiModelProperty("银行支付的银行流水") + private TBankFlow tBankFlow; +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java index 8e088b9..97d1159 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayCheckDto.java @@ -1,6 +1,7 @@ package com.ruoyi.system.dto; import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.system.model.TBankFlow; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -19,6 +20,11 @@ @ApiModelProperty("账单ID列表,管理员处理后的") @NotEmpty(message = "账单列表不能为空") private List<String> billIds; + + @ApiModelProperty(value = "账单ID") + @NotEmpty(message = "账单ID不能为空") + private String billId; + @ApiModelProperty("实际支付金额") @NotNull(message = "实际支付金额不能为空") private BigDecimal amount; @@ -27,14 +33,15 @@ @NotNull(message = "确认单ID不能为空") private String confirmId; - @ApiModelProperty("银行流水号,用于生成流水") - @NotEmpty(message = "银行流水号不能为空") - private String bankSerilNum; - @ApiModelProperty("支付人") private String payer; @ApiModelProperty("支付时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime payTime; + @ApiModelProperty("支付凭证") + private String voucher; + + @ApiModelProperty("银行流水") + private TBankFlow tBankFlow; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayDto.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayDto.java index fdaf862..9af180e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayDto.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/OfflinePayDto.java @@ -27,6 +27,7 @@ @ApiModelProperty(value = "账单列表") @NotEmpty(message = "账单ID不能为空") private List<String> billIds; + /** * 凭证文件ID */ @@ -39,4 +40,6 @@ private Date payTime; + + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/dto/TBillDto.java b/ruoyi-system/src/main/java/com/ruoyi/system/dto/TBillDto.java index 6619889..1babbce 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/dto/TBillDto.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/dto/TBillDto.java @@ -1,6 +1,7 @@ package com.ruoyi.system.dto; import com.ruoyi.system.model.TBill; +import com.ruoyi.system.model.TBillConfirm; import com.ruoyi.system.model.TBillDetail; import lombok.Data; @@ -40,5 +41,9 @@ * 电费 */ private TBillDetail elect; + /** + * 线下打款确认单 + */ + private TBillConfirm confirm; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java index 843a7fc..10b64d6 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java @@ -72,5 +72,5 @@ */ public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); - void insertBatchUserDept(List<TDeptToUser> deptToUserList); + void insertBatchUserDept(@Param("deptToUserList")List<TDeptToUser> deptToUserList); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDeptToUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDeptToUserMapper.java index 37dfe49..664fa59 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDeptToUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TDeptToUserMapper.java @@ -3,6 +3,9 @@ import com.ruoyi.system.model.TDeptToUser; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * <p> @@ -22,4 +25,6 @@ * @return 删除结果 **/ int deleteUserDeptByUserId(Long userId); + + void insertBatchUserDept(@Param("deptToUserList") List<TDeptToUser> deptToUserList); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TBankFlow.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TBankFlow.java index b4821ed..2340d46 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TBankFlow.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TBankFlow.java @@ -3,6 +3,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -47,6 +48,7 @@ @TableField("remaining_money") private BigDecimal remainingMoney; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty(value = "支付时间") @TableField("pay_time") private LocalDateTime payTime; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java index 198ccc1..c2c2834 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java @@ -170,5 +170,8 @@ @ApiModelProperty(value = "房屋地址") @TableField(exist = false) private String houseAddress; + @ApiModelProperty(value = "审批流实例id") + @TableField(exist = false) + private Long instanceId; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/query/SysUserQuery.java b/ruoyi-system/src/main/java/com/ruoyi/system/query/SysUserQuery.java index 3727f0a..3c7b3d4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/query/SysUserQuery.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/query/SysUserQuery.java @@ -12,10 +12,10 @@ public class SysUserQuery extends BasePage { @ApiModelProperty(value = "姓名") - private String nickNameAndPhone; + private String nickNameOrPhone; @ApiModelProperty(value = "角色id") - private Integer roleId; + private List<Integer> roleIds; @ApiModelProperty(value = "部门id集合") private List<String> deptIds; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/StateProcessTemplateService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/StateProcessTemplateService.java index 3511a69..fb31683 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/StateProcessTemplateService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/StateProcessTemplateService.java @@ -26,6 +26,13 @@ */ Boolean start(ProcessStartBO processStartBO); + /** + * 启动流程 + * @param processStartBO + * @return + */ + Boolean startApplet(ProcessStartBO processStartBO); + //待办 PageInfo<ProcessTaskListVO> waitTaskPage(ProcessTaskListBO processTaskListBO); PageInfo<ProcessTaskListVO> waitTaskPageApplet(ProcessTaskListBO processTaskListBO); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TBankFlowService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TBankFlowService.java index 711ee30..cce9baa 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TBankFlowService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TBankFlowService.java @@ -20,7 +20,6 @@ public interface TBankFlowService extends IService<TBankFlow> { PageInfo<TBankFlow> pageList(TBankFlowQuery query); - List<TBankFlow> makeQuery(TBankFlowQuery query); TBankFlowStatisticsVo getPaymentStats( TBankFlowQuery query); List<TBankFlow> searchByBankSerialNumber(String bankSerialNumber); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TBillService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TBillService.java index 1a08a95..090fed4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TBillService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TBillService.java @@ -2,10 +2,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.common.basic.PageInfo; -import com.ruoyi.system.dto.OfflinePayCheckDto; -import com.ruoyi.system.dto.SmsByBillDto; -import com.ruoyi.system.dto.TBillDto; -import com.ruoyi.system.dto.TbillSaveDto; +import com.ruoyi.system.dto.*; import com.ruoyi.system.model.TBill; import com.ruoyi.system.query.TBillQuery; import com.taxi591.bankapi.dto.ChargeBillRequest; @@ -77,11 +74,13 @@ * @param invoiceId * @return */ - PageInfo<TBill> getBillByInvoiceId(String invoiceId); + PageInfo<TBillDto> getBillByInvoiceId(String invoiceId); Integer sendSmsByBillIds(SmsByBillDto dto); Integer sendMailBatchByBillIds(SmsByBillDto dto); TBillDto getDetailByBillId(@NotEmpty String id); + + Boolean cashPay(CachPayDto offlinePayDto); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TFlowManagementService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TFlowManagementService.java index bf137ff..dac9331 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TFlowManagementService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TFlowManagementService.java @@ -18,8 +18,6 @@ */ public interface TFlowManagementService extends IService<TFlowManagement> { PageInfo<TFlowManagement> pageList(TFlowManagementQuery query); - List<TFlowManagement> makeQuery(TFlowManagementQuery query); TFlowManagementStatisticsVo getPaymentStats(TFlowManagementQuery req); - - + List<TFlowManagement> findByBankSerialNumber(String bankSerialNumber); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TTenantService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TTenantService.java index 989de6c..6097744 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TTenantService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TTenantService.java @@ -3,7 +3,9 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.common.basic.PageInfo; import com.ruoyi.system.dto.TBillDto; +import com.ruoyi.system.dto.TTenantDTO; import com.ruoyi.system.model.TContract; +import com.ruoyi.system.model.TDept; import com.ruoyi.system.model.THouse; import com.ruoyi.system.query.TBillAppletQuery; import com.ruoyi.system.query.TExamineAppletQuery; @@ -45,4 +47,11 @@ PageInfo<ExamineVO> examineList(TExamineAppletQuery dto); + /** + * 判断租户是否已存在 + * @param dto + * @return + */ + boolean isExit(TTenantDTO dto); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java index 48bf079..5391d65 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java @@ -101,7 +101,7 @@ new ImmutableMap.Builder<String, Long>(). put("id", flwTask.getId()) .build(); - QuartzManager.addJob(StateProcessJob.class, (StateProcessJob.name+flwTask.getId()).toUpperCase(), TimeJobType.AUTO_AUDIT,new Date(new Date().getTime()+10*1000L), maps); + QuartzManager.addJob(StateProcessJob.class, (StateProcessJob.name+flwTask.getId()).toUpperCase(), TimeJobType.AUTO_AUDIT,new Date(new Date().getTime()+3*60*1000L), maps); //对比发起人和节点审批人 @@ -152,7 +152,7 @@ new ImmutableMap.Builder<String, Long>(). put("id", flwTask.getId()) .build(); - QuartzManager.addJob(StateProcessJob.class, (StateProcessJob.name+flwTask.getId()).toUpperCase(), TimeJobType.AUTO_AUDIT,new Date(new Date().getTime()+10*1000L), maps); + QuartzManager.addJob(StateProcessJob.class, (StateProcessJob.name+flwTask.getId()).toUpperCase(), TimeJobType.AUTO_AUDIT,new Date(new Date().getTime()+3*60*1000L), maps); //对比发起人和节点审批人 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StateProcessTemplateServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StateProcessTemplateServiceImpl.java index 7c3da74..cbefcad 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StateProcessTemplateServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StateProcessTemplateServiceImpl.java @@ -27,6 +27,7 @@ import com.ruoyi.common.core.domain.BaseModel; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; +import com.ruoyi.common.core.domain.model.LoginUserApplet; import com.ruoyi.common.enums.StateProcessActionEnum; import com.ruoyi.common.enums.TaskEventType; import com.ruoyi.common.exception.GlobalException; @@ -274,6 +275,83 @@ stateTaskCenter.setFlowId(instance.getId().toString()); stateTaskCenter.setRemark(processStartBO.getRemark()); stateTaskCenter.setCreateBy(loginUser.getUser().getNickName()); + stateTaskCenter.setVariable(JSONUtil.toJsonStr(processStartBO.getVariable())); + stateTaskCenter.setProjectId(JSONObject.parseObject(JSONUtil.toJsonStr(processStartBO.getVariable())).getString("projectId")); + stateTaskCenterService.save(stateTaskCenter); + + // action记录 + StateProcessInstanceAction stateProcessInstanceAction = new StateProcessInstanceAction(); + stateProcessInstanceAction.setId(IdUtils.simpleUUID()); + stateProcessInstanceAction.setInstanceId(instance.getId().toString()); + stateProcessInstanceAction.setActionType(StateProcessActionEnum.START.getValue()); + stateProcessInstanceAction.setAuditorId(creator.getCreateId()); + stateProcessInstanceActionService.save(stateProcessInstanceAction); + + // 添加拓展信息 + StateProcessExtInstance stateProcessExtInstance = new StateProcessExtInstance(); + stateProcessExtInstance.setId(instance.getId().toString()); + stateProcessExtInstance.setTemplateId(lastTemplate.getId()); + stateProcessExtInstance.setProcessId(flwProcess.getId().toString()); + + //保存version + stateProcessExtInstance.setProcessVersion(flwProcess.getProcessVersion()); + stateProcessExtInstanceService.save(stateProcessExtInstance); + } + return true; + } + + /** + * 启动流程 + * @param processStartBO + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public Boolean startApplet(ProcessStartBO processStartBO) { + String userId = "1"; + String nickName = "admin"; + FlowCreator creator = FlowCreator.of(userId, nickName); + //查询流程绑定 + StateProcessModule stateProcessModule = stateProcessModuleService.getOne(Wrappers.<StateProcessModule>lambdaQuery() + .eq(StateProcessModule::getCategory, processStartBO.getCategory())); + if (ObjectUtil.isNull(stateProcessModule) || ObjectUtil.isEmpty(stateProcessModule.getTemplateId())) { + throw new GlobalException("请先配置流程引擎模版!"); + } + //查询模版,准备启动 + StateProcessTemplate template = this.getById(stateProcessModule.getTemplateId()); + StateProcessTemplate lastTemplate = this.getOne(Wrappers.<StateProcessTemplate>lambdaQuery() + .eq(StateProcessTemplate::getTemplateKey, template.getTemplateKey()) + .apply("(template_key, template_version) in(" + + "SELECT template_key, MAX(template_version) " + + "FROM state_process_template " + + "GROUP BY template_key)") + ); + + if (ObjectUtil.isNull(lastTemplate)) { + throw new GlobalException(StateErrorCode.PROCESS_TEMPLATE_NOT_EXISTS.getValue()); + } + FlwProcess flwProcess = flowLongEngine.processService().getProcessById(lastTemplate.getWorkFlowId()); + if (ObjectUtil.isNull(flwProcess)) { + throw new GlobalException(StateErrorCode.PROCESS_NOT_DEPLOY.getValue()); + } + if (!Objects.equals(lastTemplate.getWorkflowVersion(), flwProcess.getProcessVersion())) { + throw new GlobalException(StateErrorCode.PROCESS_VERSION_ERROR.getValue()); + } + //监听器参数补全 + processStartBO.getVariable().put("category", processStartBO.getCategory()); + // 开启流程 + Optional<FlwInstance> flwInstanceOptional = flowLongEngine.startInstanceById(flwProcess.getId(), creator, processStartBO.getVariable()); + if(flwInstanceOptional.isPresent()){ + FlwInstance instance = flwInstanceOptional.get(); + //存储任务中心信息 + StateTaskCenter stateTaskCenter = new StateTaskCenter(); + stateTaskCenter.setId(IdUtils.simpleUUID()); + stateTaskCenter.setName(processStartBO.getName()); + stateTaskCenter.setModuleName(processStartBO.getModuleName()); + stateTaskCenter.setCategory(processStartBO.getCategory()); + stateTaskCenter.setFlowId(instance.getId().toString()); + stateTaskCenter.setRemark(processStartBO.getRemark()); + stateTaskCenter.setCreateBy(nickName); stateTaskCenter.setVariable(JSONUtil.toJsonStr(processStartBO.getVariable())); stateTaskCenter.setProjectId(JSONObject.parseObject(JSONUtil.toJsonStr(processStartBO.getVariable())).getString("projectId")); stateTaskCenterService.save(stateTaskCenter); @@ -902,16 +980,17 @@ if (ObjectUtil.isNull(flwTask)) { throw new GlobalException("任务已处理或者不存在"); } + StateProcessInstanceAction stateProcessInstanceAction = new StateProcessInstanceAction(); if(Objects.nonNull(processAgreeBO.getUserId())){ flowLongEngine.executeTask(taskId, currentFlowCreator(processAgreeBO.getUserId())); + stateProcessInstanceAction.setAuditorId(String.valueOf(processAgreeBO.getUserId())); }else { + stateProcessInstanceAction.setAuditorId(String.valueOf(SecurityUtils.getUserId())); flowLongEngine.executeTask(taskId, currentFlowCreator()); } // 动作执行记录 - StateProcessInstanceAction stateProcessInstanceAction = new StateProcessInstanceAction(); stateProcessInstanceAction.setId(IdUtils.simpleUUID()); stateProcessInstanceAction.setInstanceId(flwTask.getInstanceId().toString()); - stateProcessInstanceAction.setAuditorId(String.valueOf(processAgreeBO.getUserId())); stateProcessInstanceAction.setActionType(StateProcessActionEnum.APPROVED.getValue()); stateProcessInstanceAction.setNodeId(processAgreeBO.getTaskId()); stateProcessInstanceAction.setRemark(processAgreeBO.getRemark()); @@ -1269,8 +1348,6 @@ processTaskListVO.setContract(contract); } - pageInfo.setRecords(processTaskListVOS); - if (ObjectUtil.isEmpty(processTaskListVOS)) { return pageInfo; } @@ -1287,13 +1364,14 @@ } else { sysUserMap = new HashMap<>(); } - for (ProcessTaskListVO processTaskListVO : processTaskListVOS) { + processTaskListVO.setTaskId(processTaskListVO.getId()); SysUser sysUser = sysUserMap.get(processTaskListVO.getCreateBy()); if (Objects.nonNull(sysUser)) { processTaskListVO.setCreateBy(sysUser.getNickName()); } } + pageInfo.setRecords(processTaskListVOS); return pageInfo; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index ed7ae34..753944f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -495,7 +495,7 @@ deptToUser.setDeptId(deptId); deptToUserList.add(deptToUser); } - userRoleMapper.insertBatchUserDept(deptToUserList); + deptToUserMapper.insertBatchUserDept(deptToUserList); } } @@ -675,6 +675,7 @@ for (SysUserVO sysUserVO : list) { tDeptToUsers.stream().filter(tDeptToUser -> tDeptToUser.getUserId().equals(sysUserVO.getUserId())).forEach(tDeptToUser -> { sysUserVO.setDeptList(depts.stream().filter(tDept -> tDept.getId().equals(tDeptToUser.getDeptId())).map(TDept::getDeptName).collect(Collectors.toList())); + sysUserVO.setDeptIds(depts.stream().map(TDept::getId).filter(id -> id.equals(tDeptToUser.getDeptId())).collect(Collectors.toList())); }); } pageInfo.setRecords(list); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBankFlowServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBankFlowServiceImpl.java index fc5e23e..147a3ea 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBankFlowServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBankFlowServiceImpl.java @@ -1,14 +1,13 @@ package com.ruoyi.system.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.Query; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.basic.PageInfo; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.importExcel.TBankFlowImportExcel; import com.ruoyi.system.mapper.TBankFlowMapper; import com.ruoyi.system.model.TBankFlow; +import com.ruoyi.system.model.TBill; import com.ruoyi.system.model.TFlowManagement; import com.ruoyi.system.query.TBankFlowQuery; import com.ruoyi.system.query.TFlowManagementQuery; @@ -21,7 +20,6 @@ import java.math.BigDecimal; import java.math.RoundingMode; -import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; @@ -42,23 +40,14 @@ @Override public PageInfo<TBankFlow> pageList(TBankFlowQuery query) { PageInfo<TBankFlow> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); - List<TBankFlow> list = makeQuery(query); - pageInfo.setRecords(list); - pageInfo.setTotal(list.size()); - return pageInfo; - } - - @Override - public List<TBankFlow> makeQuery(TBankFlowQuery query) { LambdaQueryWrapper<TBankFlow> queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(StringUtils.isNotEmpty(query.getBankSerialNumber()),TBankFlow::getBankSerialNumber,query.getBankSerialNumber()) .like(StringUtils.isNotEmpty(query.getPayer()),TBankFlow::getPayer,query.getPayer()) .ge(StringUtils.isNotEmpty(query.getPayStartTime()),TBankFlow::getPayTime,query.getPayStartTime()) .lt(StringUtils.isNotEmpty(query.getPayEndTime()),TBankFlow::getPayTime,query.getPayEndTime()) .eq(null != query.getFlowStatus(),TBankFlow::getFlowStatus,query.getFlowStatus()) - .orderByDesc(TBankFlow::getCreateTime) - ; - return this.baseMapper.selectList(queryWrapper); + .orderByDesc(TBankFlow::getCreateTime); + return this.baseMapper.selectPage(pageInfo, queryWrapper); } @Override @@ -74,8 +63,12 @@ @Override public List<TBankFlow> searchByBankSerialNumber(String bankSerialNumber) { LambdaQueryWrapper<TBankFlow> queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.like(StringUtils.isNotEmpty(bankSerialNumber),TBankFlow::getBankSerialNumber,bankSerialNumber); - return this.baseMapper.selectList(queryWrapper); + queryWrapper.like(StringUtils.isNotEmpty(bankSerialNumber),TBankFlow::getBankSerialNumber,bankSerialNumber) + .orderByDesc(TBankFlow::getPayTime); + + PageInfo<TBankFlow> pageInfo = new PageInfo<>(1, 20); + pageInfo = this.baseMapper.selectPage(pageInfo, queryWrapper); + return pageInfo.getRecords(); } @Override @@ -100,7 +93,7 @@ } TFlowManagementQuery query = new TFlowManagementQuery(); query.setBankSerialNumber(row.getBankSerialNumber()); - List<TFlowManagement> list1 = flowManagementService.makeQuery(query); + List<TFlowManagement> list1 = flowManagementService.findByBankSerialNumber(row.getBankSerialNumber()); for (TFlowManagement tFlowManagement : list1) { // 如果相同流水号金额相同 :抵扣金额为流水金额,剩余金额为0,状态为正常 if (row.getFlowMoney().compareTo(tFlowManagement.getFlowMoney()) == 0){ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java index fd4ec65..dd43535 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java @@ -12,15 +12,13 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.TencentMailUtil; import com.ruoyi.common.utils.uuid.UUID; -import com.ruoyi.system.dto.OfflinePayCheckDto; -import com.ruoyi.system.dto.SmsByBillDto; -import com.ruoyi.system.dto.TBillDto; -import com.ruoyi.system.dto.TbillSaveDto; +import com.ruoyi.system.dto.*; import com.ruoyi.system.mapper.TBillMapper; import com.ruoyi.system.model.*; import com.ruoyi.system.query.TBillQuery; import com.ruoyi.system.query.TInvoiceToBillQuery; import com.ruoyi.system.service.*; +import com.ruoyi.system.vo.TBillVO; import com.taxi591.bankapi.dto.ChargeBillRequest; import com.tencentcloudapi.sms.v20190711.SmsClient; import com.tencentcloudapi.sms.v20190711.models.SendSmsRequest; @@ -243,32 +241,50 @@ } @Override + @Transactional(rollbackFor = Exception.class) public boolean checkOfflinePay(OfflinePayCheckDto dto) { - List<TBill> tBills = listByIds(dto.getBillIds()); - TBillConfirm confirm = tBillConfirmService.getById(dto.getConfirmId()); - lockAndUpdateByAmountBatch(tBills,dto.getAmount(),(bill)->{ - TFlowManagement save = new TFlowManagement(); - save.setPayType(3); - save.setPayer(dto.getPayer()); - save.setPayTime(dto.getPayTime()==null?DateUtils.dateToLocalDateTime(confirm.getPayTime()):dto.getPayTime()); - save.setBankSerialNumber(dto.getBankSerilNum()); - save.setFlowType(2); - save.setPaymentBillId(bill.getId()); - save.setDeductionMoney(bill.getDeductionMoney()); - save.setFlowMoney(dto.getAmount()); - save.setRemainingMoney(bill.getOutstandingMoney()); - save.setPreOutstand(bill.getPreOutstand()); - tFlowManagementService.save(save); - }); - TBankFlow bankFlow = new TBankFlow(); - bankFlow.setPayType(3); - bankFlow.setPayer(dto.getPayer()); - bankFlow.setPayTime(dto.getPayTime()==null?DateUtils.dateToLocalDateTime(confirm.getPayTime()):dto.getPayTime()); - bankFlow.setBankSerialNumber(dto.getBankSerilNum()); - bankFlow.setFlowMoney(dto.getAmount()); - bankFlow.setFlowStatus(1); - tBankFlowService.save(bankFlow); - return false; + TBankFlow bankflow = tBankFlowService.getById(dto.getTBankFlow().getId()); + TBillDto bill = getDetailByBillId(dto.getBillId()); + if (bankflow.getRemainingMoney().compareTo(BigDecimal.ZERO)<=0){ + throw new ServiceException("该流水已无可抵扣剩余金额"); + } + if (bankflow.getRemainingMoney().compareTo(dto.getAmount())<0){ + throw new ServiceException("实付金额不能高于于流水可抵扣剩余金额"); + } + //如果实付金额大于欠费金额 + if (dto.getAmount().compareTo(bill.getOutstandingMoney())>=0){ + throw new ServiceException("实付金额不能高于该账单欠费金额"); + } + + TBill billSave = new TBill(); + billSave.setId(bill.getId()); + billSave.setPayFeesMoney(dto.getAmount()); + billSave.setBankSerialNumber(dto.getTBankFlow().getBankSerialNumber()); + billSave.setPayFeesTime(dto.getTBankFlow().getPayTime()); + billSave.setVoucher(dto.getVoucher()); + billSave.setPayFeesType(2); + TBill back = lockAndUpdateInfo(billSave, 2); + + //更新银行流水的已抵扣金额和剩余可抵扣金额 + TBankFlow saveBankFlow = new TBankFlow(); + saveBankFlow.setId(bankflow.getId()); + saveBankFlow.setDeductionMoney(bankflow.getDeductionMoney().add(dto.getAmount())); + saveBankFlow.setRemainingMoney(bankflow.getRemainingMoney().subtract(dto.getAmount())); + tBankFlowService.updateById(saveBankFlow); + //存流水 + TFlowManagement save = new TFlowManagement(); + save.setPayType(3); + save.setPayer(dto.getPayer()); + save.setPayTime(dto.getTBankFlow().getPayTime()); + save.setBankSerialNumber(dto.getTBankFlow().getBankSerialNumber()); + save.setFlowType(2); + save.setPaymentBillId(back.getId()); + save.setDeductionMoney(back.getDeductionMoney()); + save.setFlowMoney(dto.getAmount()); + save.setRemainingMoney(back.getOutstandingMoney()); + save.setPreOutstand(back.getPreOutstand()); + tFlowManagementService.save(save); + return true; } @Override @@ -344,16 +360,18 @@ * @return */ @Override - public PageInfo<TBill> getBillByInvoiceId(String invoiceId){ - invoiceId = "1889552849671061505"; - PageInfo<TBill> pageInfo = new PageInfo<>(); - ArrayList<TBill> bills = new ArrayList<>(); + public PageInfo<TBillDto> getBillByInvoiceId(String invoiceId){ + PageInfo<TBillDto> pageInfo = new PageInfo<>(); + ArrayList<TBillDto> bills = new ArrayList<>(); TInvoiceToBillQuery query = new TInvoiceToBillQuery(); query.setInvoiceId(invoiceId); List<TInvoiceToBill> tInvoiceToBills = tInvoiceToBillService.makeQuery(query); for (TInvoiceToBill tInvoiceToBill : tInvoiceToBills) { - TBill byId = getById(tInvoiceToBill.getBillId()); - bills.add(byId); + TBill bill = getById(tInvoiceToBill.getBillId()); + if (bill != null && bill.getId() != null){ + TBillDto detailByBillId = getDetailByBillId(bill.getId()); + bills.add(detailByBillId); + } } pageInfo.setRecords(bills); return pageInfo; @@ -377,7 +395,7 @@ TBill save = new TBill(); save.setId(bill.getId()); try { - smsUtil.sendSms(bill.getPhone(), "", new String[]{""}); + smsUtil.sendSms(bill.getPhone(), "2365726", new String[]{bill.getPartyTwoName()}); save.setSmsStatus(1); }catch (ServiceException e){ failNum++; @@ -395,9 +413,9 @@ int failNum = 0; for (String billId : dto.getBillIds()) { TBillDto bill = getDetailByBillId(billId); - if (bill.getSmsLastTime()!=null - && (System.currentTimeMillis()-bill.getSmsLastTime().getTime()<mailUtil.getPro().getBillMailDelayPeriod()*60*1000L)){ - throw new ServiceException("有账单最近一次发送的时间是:"+DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,bill.getSmsLastTime())); + if (bill.getMailLastTime()!=null + && (System.currentTimeMillis()-bill.getMailLastTime().getTime()<mailUtil.getPro().getBillMailDelayPeriod()*60*1000L)){ + throw new ServiceException("有账单最近一次发送的时间是:"+DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,bill.getMailLastTime())); } if (StringUtils.isEmpty(bill.getEmail())){ failNum++; @@ -423,5 +441,62 @@ return getBaseMapper().selectDetailByBillId(billId); } + /** + * 收款、类型可能是现金、银行 + * @param dto + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public Boolean cashPay(CachPayDto dto) { + TBill back = null; + TBankFlow bankflow = null; + if (dto.getPayType()==1){ + bankflow = tBankFlowService.getById(dto.getTBankFlow().getId()); + TBillDto bill = getDetailByBillId(dto.getBillId()); + if (bankflow.getRemainingMoney().compareTo(BigDecimal.ZERO)<=0){ + throw new ServiceException("该流水已无可抵扣剩余金额"); + } + if (bankflow.getRemainingMoney().compareTo(dto.getAmount())<0){ + throw new ServiceException("实付金额不能高于于流水可抵扣剩余金额"); + } + //如果实付金额大于欠费金额 + if (dto.getAmount().compareTo(bill.getOutstandingMoney())>=0){ + throw new ServiceException("实付金额不能高于该账单欠费金额"); + } + } + TBillDto bill = getDetailByBillId(dto.getBillId()); + TBill billSave = new TBill(); + billSave.setId(bill.getId()); + billSave.setPayFeesMoney(dto.getAmount()); + billSave.setBankSerialNumber(dto.getTBankFlow().getBankSerialNumber()); + billSave.setPayFeesTime(dto.getTBankFlow().getPayTime()); + billSave.setVoucher(dto.getVoucher()); + billSave.setPayFeesType(2); + back = lockAndUpdateInfo(billSave, 2); + if (dto.getPayType()==1){ + //更新银行流水的已抵扣金额和剩余可抵扣金额 + TBankFlow saveBankFlow = new TBankFlow(); + saveBankFlow.setId(bankflow.getId()); + saveBankFlow.setDeductionMoney(bankflow.getDeductionMoney().add(dto.getAmount())); + saveBankFlow.setRemainingMoney(bankflow.getRemainingMoney().subtract(dto.getAmount())); + tBankFlowService.updateById(saveBankFlow); + } + //存流水 + TFlowManagement save = new TFlowManagement(); + save.setPayType(3); + save.setPayer(dto.getPayer()); + save.setPayTime(dto.getTBankFlow().getPayTime()); + save.setBankSerialNumber(dto.getTBankFlow().getBankSerialNumber()); + save.setFlowType(dto.getPayType()==1?2:1); + save.setPaymentBillId(back.getId()); + save.setDeductionMoney(back.getDeductionMoney()); + save.setFlowMoney(dto.getAmount()); + save.setRemainingMoney(back.getOutstandingMoney()); + save.setPreOutstand(back.getPreOutstand()); + tFlowManagementService.save(save); + return true; + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java index 259fa72..00bc552 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java @@ -1,5 +1,7 @@ package com.ruoyi.system.service.impl; +import com.aizuda.bpm.engine.entity.FlwHisTask; +import com.aizuda.bpm.mybatisplus.mapper.FlwHisTaskMapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.ruoyi.common.basic.PageInfo; @@ -28,6 +30,7 @@ import com.ruoyi.system.vo.CheckAcceptRecordVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.math.BigDecimal; @@ -36,6 +39,7 @@ import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalAdjusters; import java.util.*; +import java.util.stream.Collectors; /** * <p> @@ -59,6 +63,8 @@ private TContractMapper contractMapper; @Autowired private StateProcessTemplateService stateProcessTemplateService; + @Autowired + private FlwHisTaskMapper flwHisTaskMapper; @Override public PageInfo<TContract> contractList(TContractQuery query) { @@ -80,6 +86,12 @@ for (TContract tContract : list) { tContract.setPayType(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_PAY_TYPE,tContract.getPayType())); tContract.setStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_STATUS,tContract.getStatus())); + FlwHisTask flwHisTask = flwHisTaskMapper.selectOne(new LambdaQueryWrapper<FlwHisTask>() + .like(FlwHisTask::getVariable, tContract.getId()) + .last("LIMIT 1")); + if (Objects.nonNull(flwHisTask)){ + tContract.setInstanceId(flwHisTask.getInstanceId()); + } } pageInfo.setRecords(list); return pageInfo; @@ -184,7 +196,7 @@ variable.put("projectId", dto.getId()); processStartBO.setVariable(variable); //开启工作流程 - stateProcessTemplateService.start(processStartBO); + stateProcessTemplateService.startApplet(processStartBO); List<TContractRentType> contractRentTypes = contractRentTypeService.list(); // 生成第一笔账单 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFlowManagementServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFlowManagementServiceImpl.java index 98ef5a0..3bc07fe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFlowManagementServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TFlowManagementServiceImpl.java @@ -27,13 +27,6 @@ @Override public PageInfo<TFlowManagement> pageList(TFlowManagementQuery query) { PageInfo<TFlowManagement> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); - List<TFlowManagement> list = makeQuery(query); - pageInfo.setRecords(list); - pageInfo.setTotal(list.size()); - return pageInfo; - } - @Override - public List<TFlowManagement> makeQuery(TFlowManagementQuery query){ LambdaQueryWrapper<TFlowManagement> queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(StringUtils.isNotEmpty(query.getSysSerialNumber()),TFlowManagement::getSysSerialNumber,query.getSysSerialNumber()) .eq(StringUtils.isNotEmpty(query.getBankSerialNumber()),TFlowManagement::getBankSerialNumber,query.getBankSerialNumber()) @@ -43,7 +36,7 @@ .eq(null != query.getFlowStatus(),TFlowManagement::getFlowStatus,query.getFlowStatus()) .orderByDesc(TFlowManagement::getCreateTime) ; - return this.baseMapper.selectList(queryWrapper); + return this.baseMapper.selectPage(pageInfo,queryWrapper); } @Override @@ -51,4 +44,11 @@ return this.baseMapper.getPaymentStats(query); } + @Override + public List<TFlowManagement> findByBankSerialNumber(String bankSerialNumber){ + LambdaQueryWrapper<TFlowManagement> queryWrapper = new LambdaQueryWrapper<>() ; + queryWrapper.eq(StringUtils.isNotEmpty(bankSerialNumber),TFlowManagement::getBankSerialNumber,bankSerialNumber); + return this.baseMapper.selectList(queryWrapper); + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java index eb76072..0c1e19f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TTenantServiceImpl.java @@ -7,11 +7,13 @@ import com.ruoyi.common.constant.DictConstants; import com.ruoyi.common.utils.DictUtils; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.system.dto.TTenantDTO; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.TContractMapper; import com.ruoyi.system.mapper.THouseMapper; import com.ruoyi.system.mapper.TTenantMapper; import com.ruoyi.system.model.TContract; +import com.ruoyi.system.model.TDept; import com.ruoyi.system.model.THouse; import com.ruoyi.system.model.TTenant; import com.ruoyi.system.query.TBillAppletQuery; @@ -139,4 +141,15 @@ pageInfo.setRecords(list); return pageInfo; } + + @Override + public boolean isExit(TTenantDTO dto) { + if(StringUtils.isNotEmpty(dto.getId())){ + // 修改 + return this.count(Wrappers.lambdaQuery(TTenant.class).ne(TTenant::getId, dto.getId()).eq(TTenant::getPhone, dto.getPhone())) > 0; + }else { + // 新增 + return this.count(Wrappers.lambdaQuery(TTenant.class).eq(TTenant::getPhone, dto.getPhone())) > 0; + } + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/task/base/AbstractJob.java b/ruoyi-system/src/main/java/com/ruoyi/system/task/base/AbstractJob.java index 720445d..c6aee66 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/task/base/AbstractJob.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/task/base/AbstractJob.java @@ -2,6 +2,9 @@ import com.aizuda.bpm.mybatisplus.mapper.FlwTaskActorMapper; import com.aizuda.bpm.mybatisplus.mapper.FlwTaskMapper; +import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.utils.SmsUtil; +import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.StateProcessTemplateService; import com.ruoyi.system.task.utils.SpringContextsUtil; import org.quartz.Job; @@ -19,11 +22,15 @@ protected StateProcessTemplateService stateProcessTemplateService; protected FlwTaskMapper flwTaskMapper; protected FlwTaskActorMapper flwTaskActorMapper; + protected SmsUtil smsUtil; + protected ISysUserService sysUserService; public AbstractJob(){ this.stateProcessTemplateService = SpringContextsUtil.getBean(StateProcessTemplateService.class); this.flwTaskMapper = SpringContextsUtil.getBean(FlwTaskMapper.class); this.flwTaskActorMapper = SpringContextsUtil.getBean(FlwTaskActorMapper.class); + this.smsUtil = SpringContextsUtil.getBean(SmsUtil.class); + this.sysUserService = SpringContextsUtil.getBean(ISysUserService.class); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/task/jobs/StateProcessJob.java b/ruoyi-system/src/main/java/com/ruoyi/system/task/jobs/StateProcessJob.java index c4ad3a2..73e2ab2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/task/jobs/StateProcessJob.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/task/jobs/StateProcessJob.java @@ -2,6 +2,7 @@ import com.aizuda.bpm.engine.entity.FlwTaskActor; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.system.bo.ProcessAgreeBO; import com.ruoyi.system.task.base.AbstractJob; @@ -37,6 +38,9 @@ processAgreeBO.setRemark("自动审批"); processAgreeBO.setUserId(Long.valueOf(flwTaskActor.getActorId())); stateProcessTemplateService.agree(processAgreeBO); + // 短信发送 + SysUser sysUser = sysUserService.selectUserById(Long.valueOf(flwTaskActor.getActorId())); + smsUtil.sendSms(sysUser.getPhonenumber(), "2369951", new String[]{""}); }catch(Exception e){ e.printStackTrace(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/ProcessTaskListVO.java b/ruoyi-system/src/main/java/com/ruoyi/system/vo/ProcessTaskListVO.java index 337a265..cada03f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/vo/ProcessTaskListVO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/vo/ProcessTaskListVO.java @@ -19,6 +19,7 @@ public class ProcessTaskListVO { private String nodeName; + private String id; private String flowId; diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 477a6ee..17ba3a3 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -230,12 +230,9 @@ left join sys_role r on r.role_id = ur.role_id left join t_dept_to_user tdtu on u.user_id = tdtu.user_id WHERE u.del_flag = 0 - <if test="query.nickNameAndPhone != null and query.nickNameAndPhone != ''"> - AND (u.nick_name LIKE concat('%',#{query.nickNameAndPhone},'%') - OR u.phonenumber LIKE concat('%',#{query.nickNameAndPhone},'%')) - </if> - <if test="query.roleId != null"> - AND r.role_id = #{query.roleId} + <if test="query.nickNameOrPhone != null and query.nickNameOrPhone != ''"> + AND (u.nick_name LIKE concat('%',#{query.nickNameOrPhone},'%') + OR u.phonenumber LIKE concat('%',#{query.nickNameOrPhone},'%')) </if> <if test="query.status != null and query.status != ''"> AND u.status = #{query.status} @@ -246,6 +243,12 @@ #{deptId} </foreach>) </if> + <if test="query.roleIds != null and query.roleIds.size()>0"> + AND r.role_id IN + <foreach collection="query.roleIds" close=")" open="(" item="roleId" separator=","> + #{roleId} + </foreach> + </if> ORDER BY u.create_time DESC </select> <select id="selectIdByPhone" resultType="java.lang.Long"> diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml index 9b0d3cd..9f93e27 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml @@ -34,7 +34,7 @@ insert into sys_user_role(user_id, role_id) values (#{userRole.userId},#{userRole.roleId}) </insert> <insert id="insertBatchUserDept"> - insert into sys_user_role(user_id, dept_id) values + insert into t_dept_to_user(user_id, dept_id) values <foreach item="item" index="index" collection="deptToUserList" separator=","> (#{item.userId},#{item.deptId}) </foreach> diff --git a/ruoyi-system/src/main/resources/mapper/system/TCheckAcceptRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TCheckAcceptRecordMapper.xml index cbff79f..d1b8b4b 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TCheckAcceptRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TCheckAcceptRecordMapper.xml @@ -54,7 +54,7 @@ t.update_by, t.disabled, t.code, - t.checkMoney, + t.check_money, t.status, c.contract_number, h.house_name, diff --git a/ruoyi-system/src/main/resources/mapper/system/TDeptToUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TDeptToUserMapper.xml index a740cf8..3a3f884 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TDeptToUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TDeptToUserMapper.xml @@ -13,6 +13,12 @@ <sql id="Base_Column_List"> id, dept_id, user_id </sql> + <insert id="insertBatchUserDept"> + insert into t_dept_to_user (dept_id, user_id) values + <foreach collection="list" item="item" separator=","> + (#{item.deptId},#{item.userId}) + </foreach> + </insert> <delete id="deleteUserDeptByUserId"> delete from t_dept_to_user where user_id=#{userId} </delete> -- Gitblit v1.7.1