Merge branch 'master' of https://gitee.com/xiaochen991015/xizang
| | |
| | | <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> |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | list.clear(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void doAfterAllAnalysed(AnalysisContext context) { |
| | | int size = list.size(); |
| | |
| | | } |
| | | } |
| | | }).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 { |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | 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; |
| | |
| | | @Autowired |
| | | TBillDetailService tBillDetailService; |
| | | |
| | | @Autowired |
| | | TBillConfirmService tBillConfirmService; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('bill:list')") |
| | | @PostMapping("list") |
| | |
| | | |
| | | @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); |
| | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | @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)); |
| | |
| | | @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())); |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | |
| | | @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()); |
| | |
| | | contractService.updateById(contract); |
| | | // 撤销审批实例 |
| | | stateProcessTemplateService.revoke(dto.getInstanceId()); |
| | | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "查询合同信息信息") |
| | |
| | | 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())); |
| | |
| | | caches.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "密码错误次数")); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @GetMapping() |
| | | public AjaxResult getInfo() throws Exception |
| | | { |
| | |
| | | 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) |
| | | { |
| | |
| | | return AjaxResult.success(cacheKeys); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @GetMapping("/getValue/{cacheName}/{cacheKey}") |
| | | public AjaxResult getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey) |
| | | { |
| | |
| | | return AjaxResult.success(sysCache); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @DeleteMapping("/clearCacheName/{cacheName}") |
| | | public AjaxResult clearCacheName(@PathVariable String cacheName) |
| | | { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @DeleteMapping("/clearCacheKey/{cacheKey}") |
| | | public AjaxResult clearCacheKey(@PathVariable String cacheKey) |
| | | { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @DeleteMapping("/clearCacheAll") |
| | | public AjaxResult clearCacheAll() |
| | | { |
| | |
| | | @RequestMapping("/monitor/server") |
| | | public class ServerController |
| | | { |
| | | @PreAuthorize("@ss.hasPermi('monitor:server:list')") |
| | | @GetMapping() |
| | | public AjaxResult getInfo() throws Exception |
| | | { |
| | |
| | | @Autowired |
| | | private SysPasswordService passwordService; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysLogininfor logininfor) |
| | | { |
| | |
| | | } |
| | | |
| | | // @Log(title = "登录日志", businessType = BusinessType.EXPORT) |
| | | // @PreAuthorize("@ss.hasPermi('monitor:logininfor:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysLogininfor logininfor) |
| | | // { |
| | |
| | | // util.exportExcel(response, list, "登录日志"); |
| | | // } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") |
| | | @Log(title = "登录日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{infoIds}") |
| | | public AjaxResult remove(@PathVariable Long[] infoIds) |
| | |
| | | return toAjax(logininforService.deleteLogininforByIds(infoIds)); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") |
| | | @Log(title = "登录日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | | public AjaxResult clean() |
| | |
| | | return success(); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')") |
| | | @Log(title = "账户解锁", businessType = BusinessType.OTHER) |
| | | @GetMapping("/unlock/{userName}") |
| | | public AjaxResult unlock(@PathVariable("userName") String userName) |
| | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('monitor:online:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(String ipaddr, String userName) |
| | | { |
| | |
| | | /** |
| | | * 强退用户 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')") |
| | | @Log(title = "在线用户", businessType = BusinessType.FORCE) |
| | | @DeleteMapping("/{tokenId}") |
| | | public AjaxResult forceLogout(@PathVariable String tokenId) |
| | |
| | | private ISysConfigService configService; |
| | | |
| | | // @Log(title = "参数管理", businessType = BusinessType.EXPORT) |
| | | // @PreAuthorize("@ss.hasPermi('system:config:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysConfig config) |
| | | // { |
| | |
| | | /** |
| | | * 根据参数编号获取详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:config:query')") |
| | | @GetMapping(value = "/{configId}") |
| | | public AjaxResult getInfo(@PathVariable Long configId) |
| | | { |
| | |
| | | /** |
| | | * 新增参数配置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:config:add')") |
| | | @Log(title = "参数管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysConfig config) |
| | |
| | | /** |
| | | * 修改参数配置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:config:edit')") |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysConfig config) |
| | |
| | | /** |
| | | * 删除参数配置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:config:remove')") |
| | | @Log(title = "参数管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{configIds}") |
| | | public AjaxResult remove(@PathVariable Long[] configIds) |
| | |
| | | /** |
| | | * 刷新参数缓存 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:config:remove')") |
| | | @Log(title = "参数管理", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/refreshCache") |
| | | public AjaxResult refreshCache() |
| | |
| | | /** |
| | | * 获取部门列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(SysDept dept) |
| | | { |
| | |
| | | /** |
| | | * 查询部门列表(排除节点) |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @GetMapping("/list/exclude/{deptId}") |
| | | public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) |
| | | { |
| | |
| | | /** |
| | | * 根据部门编号获取详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:query')") |
| | | @GetMapping(value = "/{deptId}") |
| | | public AjaxResult getInfo(@PathVariable Long deptId) |
| | | { |
| | |
| | | /** |
| | | * 新增部门 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:add')") |
| | | @Log(title = "部门管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysDept dept) |
| | |
| | | /** |
| | | * 修改部门 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:edit')") |
| | | @Log(title = "部门管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysDept dept) |
| | |
| | | /** |
| | | * 删除部门 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:remove')") |
| | | @Log(title = "部门管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{deptId}") |
| | | public AjaxResult remove(@PathVariable Long deptId) |
| | |
| | | @Autowired |
| | | private ISysDictTypeService dictTypeService; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:dict:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictData dictData) |
| | | { |
| | |
| | | } |
| | | |
| | | // @Log(title = "字典数据", businessType = BusinessType.EXPORT) |
| | | // @PreAuthorize("@ss.hasPermi('system:dict:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysDictData dictData) |
| | | // { |
| | |
| | | /** |
| | | * 查询字典数据详细 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:query')") |
| | | @GetMapping(value = "/{dictCode}") |
| | | public AjaxResult getInfo(@PathVariable Long dictCode) |
| | | { |
| | |
| | | /** |
| | | * 新增字典类型 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:add')") |
| | | @Log(title = "字典数据", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysDictData dict) |
| | |
| | | /** |
| | | * 修改保存字典类型 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:edit')") |
| | | @Log(title = "字典数据", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysDictData dict) |
| | |
| | | /** |
| | | * 删除字典类型 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:remove')") |
| | | @Log(title = "字典类型", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{dictCodes}") |
| | | public AjaxResult remove(@PathVariable Long[] dictCodes) |
| | |
| | | @Autowired |
| | | private ISysDictTypeService dictTypeService; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:dict:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictType dictType) |
| | | { |
| | |
| | | } |
| | | |
| | | // @Log(title = "字典类型", businessType = BusinessType.EXPORT) |
| | | // @PreAuthorize("@ss.hasPermi('system:dict:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysDictType dictType) |
| | | // { |
| | |
| | | /** |
| | | * 查询字典类型详细 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:query')") |
| | | @GetMapping(value = "/{dictId}") |
| | | public AjaxResult getInfo(@PathVariable Long dictId) |
| | | { |
| | |
| | | /** |
| | | * 新增字典类型 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:add')") |
| | | @Log(title = "字典类型", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysDictType dict) |
| | |
| | | /** |
| | | * 修改字典类型 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:edit')") |
| | | @Log(title = "字典类型", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysDictType dict) |
| | |
| | | /** |
| | | * 删除字典类型 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:remove')") |
| | | @Log(title = "字典类型", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{dictIds}") |
| | | public AjaxResult remove(@PathVariable Long[] dictIds) |
| | |
| | | /** |
| | | * 刷新字典缓存 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dict:remove')") |
| | | @Log(title = "字典类型", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/refreshCache") |
| | | public AjaxResult refreshCache() |
| | |
| | | /** |
| | | * 获取菜单列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:menu:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(SysMenu menu) |
| | | { |
| | |
| | | /** |
| | | * 根据菜单编号获取详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:menu:query')") |
| | | @GetMapping(value = "/{menuId}") |
| | | public AjaxResult getInfo(@PathVariable Long menuId) |
| | | { |
| | |
| | | /** |
| | | * 新增菜单 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:menu:add')") |
| | | @Log(title = "菜单管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysMenu menu) |
| | |
| | | /** |
| | | * 修改菜单 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:menu:edit')") |
| | | @Log(title = "菜单管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysMenu menu) |
| | |
| | | /** |
| | | * 删除菜单 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:menu:remove')") |
| | | @Log(title = "菜单管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{menuId}") |
| | | public AjaxResult remove(@PathVariable("menuId") Long menuId) |
| | |
| | | /** |
| | | * 获取通知公告列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:notice:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysNotice notice) |
| | | { |
| | |
| | | /** |
| | | * 根据通知公告编号获取详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:notice:query')") |
| | | @GetMapping(value = "/{noticeId}") |
| | | public AjaxResult getInfo(@PathVariable Long noticeId) |
| | | { |
| | |
| | | /** |
| | | * 新增通知公告 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:notice:add')") |
| | | @Log(title = "通知公告", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysNotice notice) |
| | |
| | | /** |
| | | * 修改通知公告 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:notice:edit')") |
| | | @Log(title = "通知公告", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysNotice notice) |
| | |
| | | /** |
| | | * 删除通知公告 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:notice:remove')") |
| | | @Log(title = "通知公告", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{noticeIds}") |
| | | public AjaxResult remove(@PathVariable Long[] noticeIds) |
| | |
| | | /** |
| | | * 获取岗位列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:post:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysPost post) |
| | | { |
| | |
| | | } |
| | | |
| | | // @Log(title = "岗位管理", businessType = BusinessType.EXPORT) |
| | | // @PreAuthorize("@ss.hasPermi('system:post:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysPost post) |
| | | // { |
| | |
| | | /** |
| | | * 根据岗位编号获取详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:post:query')") |
| | | @GetMapping(value = "/{postId}") |
| | | public AjaxResult getInfo(@PathVariable Long postId) |
| | | { |
| | |
| | | /** |
| | | * 新增岗位 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:post:add')") |
| | | @Log(title = "岗位管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysPost post) |
| | |
| | | /** |
| | | * 修改岗位 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:post:edit')") |
| | | @Log(title = "岗位管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysPost post) |
| | |
| | | /** |
| | | * 删除岗位 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:post:remove')") |
| | | @Log(title = "岗位管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{postIds}") |
| | | public AjaxResult remove(@PathVariable Long[] postIds) |
| | |
| | | @Autowired |
| | | private ISysMenuService menuService; |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('system:role:list')") |
| | | @ApiOperation(value = "角色列表") |
| | | @PostMapping("/list") |
| | | public AjaxResult list(@RequestBody SysRoleQuery query) |
| | |
| | | } |
| | | |
| | | // @Log(title = "角色管理", businessType = BusinessType.EXPORT) |
| | | // // @PreAuthorize("@ss.hasPermi('system:role:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysRole role) |
| | | // { |
| | |
| | | /** |
| | | * 根据角色编号获取详细信息 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:query')") |
| | | @GetMapping(value = "/{roleId}") |
| | | public AjaxResult getInfo(@PathVariable Long roleId) |
| | | { |
| | |
| | | /** |
| | | * 新增角色 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:add')") |
| | | @ApiOperation(value = "新增角色") |
| | | @Log(title = "角色信息-新增角色", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | |
| | | /** |
| | | * 修改保存角色 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:edit')") |
| | | @ApiOperation(value = "编辑角色") |
| | | @Log(title = "角色信息-编辑角色", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 修改保存数据权限 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:edit')") |
| | | @Log(title = "角色管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/dataScope") |
| | | public AjaxResult dataScope(@RequestBody SysRole role) |
| | |
| | | /** |
| | | * 状态修改 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:edit')") |
| | | @ApiOperation(value = "状态修改") |
| | | @Log(title = "角色信息-角色状态修改", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus") |
| | |
| | | /** |
| | | * 删除角色 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:remove')") |
| | | @ApiOperation(value = "删除角色") |
| | | @Log(title = "角色信息-角色删除角色", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteById/{ids}") |
| | |
| | | /** |
| | | * 获取角色选择框列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:query')") |
| | | @GetMapping("/optionselect") |
| | | public AjaxResult optionselect() |
| | | { |
| | |
| | | /** |
| | | * 查询已分配用户角色列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:list')") |
| | | @GetMapping("/authUser/allocatedList") |
| | | public TableDataInfo allocatedList(SysUser user) |
| | | { |
| | |
| | | /** |
| | | * 查询未分配用户角色列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:list')") |
| | | @GetMapping("/authUser/unallocatedList") |
| | | public TableDataInfo unallocatedList(SysUser user) |
| | | { |
| | |
| | | /** |
| | | * 取消授权用户 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:edit')") |
| | | @Log(title = "角色管理", businessType = BusinessType.GRANT) |
| | | @PutMapping("/authUser/cancel") |
| | | public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole) |
| | |
| | | /** |
| | | * 批量取消授权用户 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:edit')") |
| | | @Log(title = "角色管理", businessType = BusinessType.GRANT) |
| | | @PutMapping("/authUser/cancelAll") |
| | | public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds) |
| | |
| | | /** |
| | | * 批量选择用户授权 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:edit')") |
| | | @Log(title = "角色管理", businessType = BusinessType.GRANT) |
| | | @PutMapping("/authUser/selectAll") |
| | | public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds) |
| | |
| | | /** |
| | | * 获取对应角色部门树列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:role:query')") |
| | | @GetMapping(value = "/deptTree/{roleId}") |
| | | public AjaxResult deptTree(@PathVariable("roleId") Long roleId) |
| | | { |
| | |
| | | |
| | | |
| | | // @Log(title = "用户管理", businessType = BusinessType.EXPORT) |
| | | //// // @PreAuthorize("@ss.hasPermi('system:user:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysUser user) |
| | | // { |
| | |
| | | // } |
| | | |
| | | // @Log(title = "用户管理", businessType = BusinessType.IMPORT) |
| | | //// // @PreAuthorize("@ss.hasPermi('system:user:import')") |
| | | // @PostMapping("/importData") |
| | | // public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception |
| | | // { |
| | |
| | | /** |
| | | * 新增用户 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:add')") |
| | | @ApiOperation(value = "新增用户管理") |
| | | @Log(title = "用户信息-新增用户", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | |
| | | /** |
| | | * 修改用户 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:edit')") |
| | | @ApiOperation(value = "修改用户管理") |
| | | @Log(title = "用户信息-修改用户", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | |
| | | /** |
| | | * 删除用户 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:remove')") |
| | | @ApiOperation(value = "批量删除用户") |
| | | @Log(title = "用户信息-批量删除用户", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteById/{ids}") |
| | |
| | | /** |
| | | * 重置密码 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:resetPwd')") |
| | | @ApiOperation(value = "重置密码") |
| | | @Log(title = "用户信息-重置密码", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/resetPwd") |
| | |
| | | /** |
| | | * 根据用户编号获取授权角色 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:query')") |
| | | @GetMapping("/authRole/{userId}") |
| | | public AjaxResult authRole(@PathVariable("userId") Long userId) |
| | | { |
| | |
| | | /** |
| | | * 用户授权角色 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:edit')") |
| | | @Log(title = "用户管理", businessType = BusinessType.GRANT) |
| | | @PutMapping("/authRole") |
| | | public AjaxResult insertAuthRole(Long userId, Long[] roleIds) |
| | |
| | | /** |
| | | * 获取部门树列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @GetMapping("/deptTree") |
| | | public AjaxResult deptTree(SysDept dept) |
| | | { |
| | |
| | | * 最后修改时间 |
| | | */ |
| | | @ApiModelProperty(value = "记录修改时间,前端忽略") |
| | | @JsonIgnore |
| | | @TableField("update_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime updateTime; |
New file |
| | |
| | | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ |
| | | com.ruoyi.common.config.SmsConfig |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | @ApiModelProperty("账单ID列表,管理员处理后的") |
| | | @NotEmpty(message = "账单列表不能为空") |
| | | private List<String> billIds; |
| | | |
| | | @ApiModelProperty(value = "账单ID") |
| | | @NotEmpty(message = "账单ID不能为空") |
| | | private String billId; |
| | | |
| | | @ApiModelProperty("实际支付金额") |
| | | @NotNull(message = "实际支付金额不能为空") |
| | | private BigDecimal amount; |
| | |
| | | @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; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "账单列表") |
| | | @NotEmpty(message = "账单ID不能为空") |
| | | private List<String> billIds; |
| | | |
| | | /** |
| | | * 凭证文件ID |
| | | */ |
| | |
| | | private Date payTime; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | * 电费 |
| | | */ |
| | | private TBillDetail elect; |
| | | /** |
| | | * 线下打款确认单 |
| | | */ |
| | | private TBillConfirm confirm; |
| | | |
| | | } |
| | |
| | | */ |
| | | public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); |
| | | |
| | | void insertBatchUserDept(List<TDeptToUser> deptToUserList); |
| | | void insertBatchUserDept(@Param("deptToUserList")List<TDeptToUser> deptToUserList); |
| | | } |
| | |
| | | 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> |
| | |
| | | * @return 删除结果 |
| | | **/ |
| | | int deleteUserDeptByUserId(Long userId); |
| | | |
| | | void insertBatchUserDept(@Param("deptToUserList") List<TDeptToUser> deptToUserList); |
| | | } |
| | |
| | | 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; |
| | |
| | | @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; |
| | |
| | | @ApiModelProperty(value = "房屋地址") |
| | | @TableField(exist = false) |
| | | private String houseAddress; |
| | | @ApiModelProperty(value = "审批流实例id") |
| | | @TableField(exist = false) |
| | | private Long instanceId; |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | */ |
| | | Boolean start(ProcessStartBO processStartBO); |
| | | |
| | | /** |
| | | * 启动流程 |
| | | * @param processStartBO |
| | | * @return |
| | | */ |
| | | Boolean startApplet(ProcessStartBO processStartBO); |
| | | |
| | | //待办 |
| | | PageInfo<ProcessTaskListVO> waitTaskPage(ProcessTaskListBO processTaskListBO); |
| | | PageInfo<ProcessTaskListVO> waitTaskPageApplet(ProcessTaskListBO processTaskListBO); |
| | |
| | | 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); |
| | | |
| | |
| | | |
| | | 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; |
| | |
| | | * @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); |
| | | } |
| | |
| | | */ |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | PageInfo<ExamineVO> examineList(TExamineAppletQuery dto); |
| | | |
| | | /** |
| | | * 判断租户是否已存在 |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | boolean isExit(TTenantDTO dto); |
| | | |
| | | } |
| | |
| | | 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); |
| | | |
| | | |
| | | //对比发起人和节点审批人 |
| | |
| | | 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); |
| | | |
| | | |
| | | //对比发起人和节点审批人 |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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()); |
| | |
| | | processTaskListVO.setContract(contract); |
| | | } |
| | | |
| | | pageInfo.setRecords(processTaskListVOS); |
| | | |
| | | if (ObjectUtil.isEmpty(processTaskListVOS)) { |
| | | return pageInfo; |
| | | } |
| | |
| | | } 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; |
| | | } |
| | | |
| | |
| | | deptToUser.setDeptId(deptId); |
| | | deptToUserList.add(deptToUser); |
| | | } |
| | | userRoleMapper.insertBatchUserDept(deptToUserList); |
| | | deptToUserMapper.insertBatchUserDept(deptToUserList); |
| | | } |
| | | } |
| | | |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | |
| | | 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; |
| | |
| | | @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 |
| | |
| | | @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 |
| | |
| | | } |
| | | 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){ |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | @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 |
| | |
| | | * @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; |
| | |
| | | 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++; |
| | |
| | | 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++; |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private TContractMapper contractMapper; |
| | | @Autowired |
| | | private StateProcessTemplateService stateProcessTemplateService; |
| | | @Autowired |
| | | private FlwHisTaskMapper flwHisTaskMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TContract> contractList(TContractQuery query) { |
| | |
| | | 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; |
| | |
| | | variable.put("projectId", dto.getId()); |
| | | processStartBO.setVariable(variable); |
| | | //开启工作流程 |
| | | stateProcessTemplateService.start(processStartBO); |
| | | stateProcessTemplateService.startApplet(processStartBO); |
| | | |
| | | List<TContractRentType> contractRentTypes = contractRentTypeService.list(); |
| | | // 生成第一笔账单 |
| | |
| | | @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()) |
| | |
| | | .eq(null != query.getFlowStatus(),TFlowManagement::getFlowStatus,query.getFlowStatus()) |
| | | .orderByDesc(TFlowManagement::getCreateTime) |
| | | ; |
| | | return this.baseMapper.selectList(queryWrapper); |
| | | return this.baseMapper.selectPage(pageInfo,queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | 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; |
| | |
| | | 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(); |
| | | } |
| | |
| | | public class ProcessTaskListVO { |
| | | |
| | | private String nodeName; |
| | | private String id; |
| | | |
| | | private String flowId; |
| | | |
| | |
| | | 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} |
| | |
| | | #{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"> |
| | |
| | | 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> |
| | |
| | | t.update_by, |
| | | t.disabled, |
| | | t.code, |
| | | t.checkMoney, |
| | | t.check_money, |
| | | t.status, |
| | | c.contract_number, |
| | | h.house_name, |
| | |
| | | <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> |