mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
2
This commit is contained in:
parent
35f70e9cc8
commit
604b79b998
@ -52,13 +52,24 @@ public class HousesReviewController extends BaseController {
|
|||||||
private final BuyHousesMapper buyHousesMapper;
|
private final BuyHousesMapper buyHousesMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购房登记录入
|
||||||
|
* @param bo
|
||||||
|
* @param pageQuery
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:review:reviewList")
|
||||||
|
@GetMapping("/review/list")
|
||||||
|
public TableDataInfo<HousesReview> reviewList(HousesReviewBo bo, PageQuery pageQuery) {
|
||||||
|
return iHousesReviewService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询购房复审登记列表
|
* 查询购房复审登记列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:review:list")
|
@SaCheckPermission("system:review:list")
|
||||||
@GetMapping("/registrationManagement/list")
|
@GetMapping("/registrationManagement/list")
|
||||||
public TableDataInfo<HousesReviewVo> list(HousesReviewBo bo, PageQuery pageQuery) {
|
public TableDataInfo<HousesReview> list(HousesReviewBo bo, PageQuery pageQuery) {
|
||||||
return iHousesReviewService.queryPageList(bo, pageQuery);
|
return iHousesReviewService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,113 @@
|
|||||||
|
package com.ruoyi.web.controller.material;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.system.domain.bo.MaterialModuleBo;
|
||||||
|
import com.ruoyi.system.domain.vo.MaterialModuleVo;
|
||||||
|
import com.ruoyi.system.service.IMaterialModuleService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料模块
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-03-09
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/material/module")
|
||||||
|
public class MaterialModuleController extends BaseController {
|
||||||
|
|
||||||
|
private final IMaterialModuleService iMaterialModuleService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询材料模块列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:module:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<MaterialModuleVo> list(MaterialModuleBo bo, PageQuery pageQuery) {
|
||||||
|
return iMaterialModuleService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SaCheckPermission("material:materialList:list")
|
||||||
|
@GetMapping("/materialList")
|
||||||
|
public R<?> materialList(MaterialModuleBo bo) {
|
||||||
|
return iMaterialModuleService.selectMaterialList(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出材料模块列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:module:export")
|
||||||
|
@Log(title = "材料模块", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(MaterialModuleBo bo, HttpServletResponse response) {
|
||||||
|
List<MaterialModuleVo> list = iMaterialModuleService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "材料模块", MaterialModuleVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取材料模块详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:module:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<MaterialModuleVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(iMaterialModuleService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增材料模块
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:module:add")
|
||||||
|
@Log(title = "材料模块", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody MaterialModuleBo bo) {
|
||||||
|
return toAjax(iMaterialModuleService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改材料模块
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:module:edit")
|
||||||
|
@Log(title = "材料模块", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MaterialModuleBo bo) {
|
||||||
|
return toAjax(iMaterialModuleService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除材料模块
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:module:remove")
|
||||||
|
@Log(title = "材料模块", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(iMaterialModuleService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package com.ruoyi.web.controller.material;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.system.domain.bo.MaterialTalentsBo;
|
||||||
|
import com.ruoyi.system.domain.vo.MaterialTalentsVo;
|
||||||
|
import com.ruoyi.system.service.IMaterialTalentsService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料关系
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-03-09
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/material/talents")
|
||||||
|
public class MaterialTalentsController extends BaseController {
|
||||||
|
|
||||||
|
private final IMaterialTalentsService iMaterialTalentsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询材料关系列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:talents:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public R<List<MaterialTalentsVo>> list(MaterialTalentsBo bo) {
|
||||||
|
List<MaterialTalentsVo> list = iMaterialTalentsService.queryList(bo);
|
||||||
|
return R.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出材料关系列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:talents:export")
|
||||||
|
@Log(title = "材料关系", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(MaterialTalentsBo bo, HttpServletResponse response) {
|
||||||
|
List<MaterialTalentsVo> list = iMaterialTalentsService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "材料关系", MaterialTalentsVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取材料关系详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:talents:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<MaterialTalentsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(iMaterialTalentsService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增材料关系
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:talents:add")
|
||||||
|
@Log(title = "材料关系", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody MaterialTalentsBo bo) {
|
||||||
|
return toAjax(iMaterialTalentsService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改材料关系
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:talents:edit")
|
||||||
|
@Log(title = "材料关系", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MaterialTalentsBo bo) {
|
||||||
|
return toAjax(iMaterialTalentsService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除材料关系
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("material:talents:remove")
|
||||||
|
@Log(title = "材料关系", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(iMaterialTalentsService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -62,7 +62,7 @@ public class SysOssController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param ossIds OSS对象ID串
|
* @param ossIds OSS对象ID串
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("system:oss:list")
|
// @SaCheckPermission("system:oss:list")
|
||||||
@GetMapping("/listByIds/{ossIds}")
|
@GetMapping("/listByIds/{ossIds}")
|
||||||
public R<List<SysOssVo>> listByIds(@NotEmpty(message = "主键不能为空")
|
public R<List<SysOssVo>> listByIds(@NotEmpty(message = "主键不能为空")
|
||||||
@PathVariable Long[] ossIds) {
|
@PathVariable Long[] ossIds) {
|
||||||
|
|||||||
@ -233,6 +233,8 @@ springdoc:
|
|||||||
packages-to-scan: com.ruoyi.web
|
packages-to-scan: com.ruoyi.web
|
||||||
- group: 3.代码生成模块
|
- group: 3.代码生成模块
|
||||||
packages-to-scan: com.ruoyi.generator
|
packages-to-scan: com.ruoyi.generator
|
||||||
|
- group: 4.流程模块
|
||||||
|
packages-to-scan: com.ruoyi.work
|
||||||
|
|
||||||
# 防止XSS攻击
|
# 防止XSS攻击
|
||||||
xss:
|
xss:
|
||||||
|
|||||||
@ -151,10 +151,10 @@ public class DemoUnitTest {
|
|||||||
ProcessVo processVo = new ProcessVo();
|
ProcessVo processVo = new ProcessVo();
|
||||||
processVo.setProcessKey("apply_house");
|
processVo.setProcessKey("apply_house");
|
||||||
processVo.setStep("1");
|
processVo.setStep("1");
|
||||||
BuyHouses buyHouses = buyHousesMapper.selectById("2");
|
BuyHouses buyHouses = buyHousesMapper.selectById("1011");
|
||||||
Map<String, Object> map = BeanUtil.beanToMap(buyHouses);
|
Map<String, Object> map = BeanUtil.beanToMap(buyHouses);
|
||||||
processVo.setParams(map);
|
processVo.setParams(map);
|
||||||
processVo.setBusinessId("2");
|
processVo.setBusinessId("1011");
|
||||||
processVo.setStartUser(buyHouses.getUserName());
|
processVo.setStartUser(buyHouses.getUserName());
|
||||||
WorkComplyUtils.comply(processVo);
|
WorkComplyUtils.comply(processVo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("buy_houses")
|
@TableName("buy_houses")
|
||||||
public class BuyHouses {
|
public class BuyHouses {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,12 @@ package com.ruoyi.system.domain.vo;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.ruoyi.system.domain.BuyHousesMember;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -217,6 +220,10 @@ public class BuyHousesVo {
|
|||||||
@ExcelProperty(value = "")
|
@ExcelProperty(value = "")
|
||||||
private String workAddress;
|
private String workAddress;
|
||||||
|
|
||||||
public String processKey;
|
private String processKey;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<BuyHousesMember> buyHousesMemberList;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.ruoyi.system.domain.vo;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import com.ruoyi.system.domain.BuyHousesReviewMember;
|
import com.ruoyi.system.domain.BuyHousesReviewMember;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ public class HousesReviewVo {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
// @ExcelProperty(value = "id")
|
@ExcelProperty(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public interface IHousesReviewService {
|
|||||||
/**
|
/**
|
||||||
* 查询购房复审登记列表
|
* 查询购房复审登记列表
|
||||||
*/
|
*/
|
||||||
TableDataInfo<HousesReviewVo> queryPageList(HousesReviewBo bo, PageQuery pageQuery);
|
TableDataInfo<HousesReview> queryPageList(HousesReviewBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询购房复审登记列表
|
* 查询购房复审登记列表
|
||||||
|
|||||||
@ -8,9 +8,11 @@ import com.ruoyi.common.core.domain.PageQuery;
|
|||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.system.domain.BuyHouses;
|
import com.ruoyi.system.domain.BuyHouses;
|
||||||
|
import com.ruoyi.system.domain.BuyHousesMember;
|
||||||
import com.ruoyi.system.domain.bo.BuyHousesBo;
|
import com.ruoyi.system.domain.bo.BuyHousesBo;
|
||||||
import com.ruoyi.system.domain.vo.BuyHousesVo;
|
import com.ruoyi.system.domain.vo.BuyHousesVo;
|
||||||
import com.ruoyi.system.mapper.BuyHousesMapper;
|
import com.ruoyi.system.mapper.BuyHousesMapper;
|
||||||
|
import com.ruoyi.system.mapper.BuyHousesMemberMapper;
|
||||||
import com.ruoyi.system.service.IBuyHousesService;
|
import com.ruoyi.system.service.IBuyHousesService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -31,12 +33,19 @@ public class BuyHousesServiceImpl implements IBuyHousesService {
|
|||||||
|
|
||||||
private final BuyHousesMapper baseMapper;
|
private final BuyHousesMapper baseMapper;
|
||||||
|
|
||||||
|
private final BuyHousesMemberMapper buyHousesMemberMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】
|
* 查询【请填写功能名称】
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BuyHousesVo queryById(Long id){
|
public BuyHousesVo queryById(Long id){
|
||||||
return baseMapper.selectVoById(id);
|
BuyHousesVo buyHousesVo = baseMapper.selectVoById(id);
|
||||||
|
LambdaQueryWrapper<BuyHousesMember> queryWrapper = new LambdaQueryWrapper<BuyHousesMember>()
|
||||||
|
.eq(BuyHousesMember::getBuyHousesId, id);
|
||||||
|
List<BuyHousesMember> buyHousesMembers = buyHousesMemberMapper.selectList(queryWrapper);
|
||||||
|
buyHousesVo.setBuyHousesMemberList(buyHousesMembers);
|
||||||
|
return buyHousesVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -73,9 +73,9 @@ public class HousesReviewServiceImpl implements IHousesReviewService {
|
|||||||
* 查询购房复审登记列表
|
* 查询购房复审登记列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<HousesReviewVo> queryPageList(HousesReviewBo bo, PageQuery pageQuery) {
|
public TableDataInfo<HousesReview> queryPageList(HousesReviewBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<HousesReview> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<HousesReview> lqw = buildQueryWrapper(bo);
|
||||||
Page<HousesReviewVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<HousesReview> result = baseMapper.selectPage(pageQuery.build(), lqw);
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,107 @@
|
|||||||
|
package com.ruoyi.work.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.work.domain.bo.ProcessBo;
|
||||||
|
import com.ruoyi.work.domain.vo.ProcessVo;
|
||||||
|
import com.ruoyi.work.service.IProcessService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-03-24
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/process")
|
||||||
|
public class ProcessController extends BaseController {
|
||||||
|
|
||||||
|
private final IProcessService iProcessService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:process:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<ProcessVo> list(ProcessBo bo, PageQuery pageQuery) {
|
||||||
|
return iProcessService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出流程列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:process:export")
|
||||||
|
@Log(title = "流程", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(ProcessBo bo, HttpServletResponse response) {
|
||||||
|
List<ProcessVo> list = iProcessService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "流程", ProcessVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:process:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<ProcessVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long id) {
|
||||||
|
return R.ok(iProcessService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增流程
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:process:add")
|
||||||
|
@Log(title = "流程", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody ProcessBo bo) {
|
||||||
|
return toAjax(iProcessService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改流程
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:process:edit")
|
||||||
|
@Log(title = "流程", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProcessBo bo) {
|
||||||
|
return toAjax(iProcessService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除流程
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:process:remove")
|
||||||
|
@Log(title = "流程", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(iProcessService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.work.controller;
|
package com.ruoyi.work.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
@ -23,7 +23,6 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -97,6 +96,8 @@ public class WorkController extends BaseController {
|
|||||||
WorkComplyUtils.getStep(businessDTO);
|
WorkComplyUtils.getStep(businessDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程办理
|
* 流程办理
|
||||||
*/
|
*/
|
||||||
@ -104,6 +105,15 @@ public class WorkController extends BaseController {
|
|||||||
@SaCheckPermission("work:task:batchDeleted")
|
@SaCheckPermission("work:task:batchDeleted")
|
||||||
@PostMapping("/batchDeleted")
|
@PostMapping("/batchDeleted")
|
||||||
public R<?> batchDeleted(@RequestBody HisProcess hisProcess){
|
public R<?> batchDeleted(@RequestBody HisProcess hisProcess){
|
||||||
|
if (ObjectUtil.isNull(hisProcess.getStatus())){
|
||||||
|
return R.fail("状态不可为空");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNull(hisProcess.getProcessKey())){
|
||||||
|
return R.fail("流程key不可为空");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNull(hisProcess.getBusinessId())){
|
||||||
|
return R.fail("业务id不可为空");
|
||||||
|
}
|
||||||
LambdaQueryWrapper<TProcess> wrapper = new LambdaQueryWrapper<TProcess>()
|
LambdaQueryWrapper<TProcess> wrapper = new LambdaQueryWrapper<TProcess>()
|
||||||
.eq(TProcess::getProcessKey, hisProcess.getProcessKey());
|
.eq(TProcess::getProcessKey, hisProcess.getProcessKey());
|
||||||
List<TProcess> tProcesses = processMapper.selectList(wrapper);
|
List<TProcess> tProcesses = processMapper.selectList(wrapper);
|
||||||
|
|||||||
@ -87,6 +87,9 @@ public class HisProcess{
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String bean;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,6 +73,8 @@ public class HisProcessVo {
|
|||||||
|
|
||||||
private String startUser;
|
private String startUser;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String bean;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -687,18 +687,23 @@ public class WorkComplyUtils {
|
|||||||
if (auditLogs.size()>0) {
|
if (auditLogs.size()>0) {
|
||||||
List<AuditLog> collect = auditLogs.stream().filter(a -> e.getStep().equals(a.getStep()) && e.getAudit().equals(a.getAudit())).collect(Collectors.toList());
|
List<AuditLog> collect = auditLogs.stream().filter(a -> e.getStep().equals(a.getStep()) && e.getAudit().equals(a.getAudit())).collect(Collectors.toList());
|
||||||
collect.forEach(a -> {
|
collect.forEach(a -> {
|
||||||
switch (a.getStatus()) {
|
if (ObjectUtil.isNotNull(a.getStatus())) {
|
||||||
case "1":
|
switch (a.getStatus()) {
|
||||||
a.setStatus("审核失败");
|
case "1":
|
||||||
break;
|
a.setStatus("审核失败");
|
||||||
case "2":
|
break;
|
||||||
a.setStatus("审核成功");
|
case "2":
|
||||||
break;
|
a.setStatus("审核成功");
|
||||||
default:
|
break;
|
||||||
a.setStatus("未知状态");
|
default:
|
||||||
break;
|
a.setStatus("未知状态");
|
||||||
} });
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
e.setAuditLogList(collect);
|
e.setAuditLogList(collect);
|
||||||
|
}else {
|
||||||
|
e.setAuditLogList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
if("4".equals(e.getCheckType())){//企业审核
|
if("4".equals(e.getCheckType())){//企业审核
|
||||||
Map params = e.getParams();
|
Map params = e.getParams();
|
||||||
|
|||||||
@ -50,6 +50,9 @@
|
|||||||
(SELECT id FROM `process` WHERE FIND_IN_SET(#{actProcess.userId},cc))
|
(SELECT id FROM `process` WHERE FIND_IN_SET(#{actProcess.userId},cc))
|
||||||
GROUP BY business_id ) AS a
|
GROUP BY business_id ) AS a
|
||||||
INNER JOIN process p ON p.id = a.process_id
|
INNER JOIN process p ON p.id = a.process_id
|
||||||
|
<where>
|
||||||
|
<if test="actProcess.startUser != null and actProcess.startUser != ''"> and a.start_user like concat('%', #{actProcess.startUser}, '%')</if>
|
||||||
|
</where>
|
||||||
ORDER BY a.create_time
|
ORDER BY a.create_time
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByIdResultBean2BusinessId" resultType="com.ruoyi.work.domain.ActProcess"
|
<select id="selectByIdResultBean2BusinessId" resultType="com.ruoyi.work.domain.ActProcess"
|
||||||
|
|||||||
@ -19,9 +19,6 @@
|
|||||||
<result property="companyName" column="companyName"/>
|
<result property="companyName" column="companyName"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="ReturnBeanResult" type="com.ruoyi.work.domain.bo.ReturnBean">
|
|
||||||
|
|
||||||
</resultMap>
|
|
||||||
<select id="selectVoListPage" resultType="com.ruoyi.work.domain.HisProcess" parameterType="com.ruoyi.work.domain.HisProcess">
|
<select id="selectVoListPage" resultType="com.ruoyi.work.domain.HisProcess" parameterType="com.ruoyi.work.domain.HisProcess">
|
||||||
SELECT p.`name` ,process_key AS processKey,d.audit,d.check_type AS checkType ,d.type,p.bean,d.`status`,d.create_time AS createTime,d.end_time AS endTime ,
|
SELECT p.`name` ,process_key AS processKey,d.audit,d.check_type AS checkType ,d.type,p.bean,d.`status`,d.create_time AS createTime,d.end_time AS endTime ,
|
||||||
d.business_id AS businessId,d.start_user AS startUser,p.cc,p.description,d.step
|
d.business_id AS businessId,d.start_user AS startUser,p.cc,p.description,d.step
|
||||||
@ -30,7 +27,8 @@
|
|||||||
FROM
|
FROM
|
||||||
`his_process` h
|
`his_process` h
|
||||||
WHERE h.id IN (SELECT MAX(id) FROM his_process
|
WHERE h.id IN (SELECT MAX(id) FROM his_process
|
||||||
where ((audit = #{hisProcess.userId} AND check_type= 1)
|
where (
|
||||||
|
(audit = #{hisProcess.userId} AND check_type= 1)
|
||||||
OR
|
OR
|
||||||
(check_type = 2 AND audit =#{hisProcess.deptId})
|
(check_type = 2 AND audit =#{hisProcess.deptId})
|
||||||
OR
|
OR
|
||||||
@ -41,7 +39,7 @@
|
|||||||
GROUP BY business_id) ) d
|
GROUP BY business_id) ) d
|
||||||
INNER JOIN process p ON p.id = d.process_id
|
INNER JOIN process p ON p.id = d.process_id
|
||||||
<where>
|
<where>
|
||||||
<if test="hisProcess.startUser !='' and hisProcess.startUser !=null"> and d.start_user= #{hisProcess.startUser}</if>
|
<if test="hisProcess.startUser !='' and hisProcess.startUser !=null"> and d.start_user like concat('%', #{hisProcess.startUser}, '%')</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY d.end_time DESC
|
ORDER BY d.end_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user