| | |
| | | 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()+60*1000L), maps); |
| | | QuartzManager.addJob(StateProcessJob.class, (StateProcessJob.name+flwTask.getId()).toUpperCase(), TimeJobType.AUTO_AUDIT,new Date(new Date().getTime()+3*60*1000L), maps); |
| | | } |
| | | } |
| | | } |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | 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()+60*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()+60*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.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(); |
| | | } |