Commit 720a356c authored by yf's avatar yf

Merge branch 'develop' of http://git.censoft.com.cn/rongtong/ruoyi-vue-master into develop

parents c77f23cf 9edc8b71
package com.censoft.censoftrongtong.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal;
import com.censoft.censoftrongtong.service.ICurrentRiskDetailAbnormalService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 现状风险巡查异常信息Controller
*
* @author ruoyi
* @date 2023-12-05
*/
@RestController
@RequestMapping("/risk/currentRiskAbnormal")
public class CurrentRiskDetailAbnormalController extends BaseController
{
@Autowired
private ICurrentRiskDetailAbnormalService currentRiskDetailAbnormalService;
/**
* 查询现状风险巡查异常信息列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:list')")
@GetMapping("/list")
public TableDataInfo list(CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
{
startPage();
List<CurrentRiskDetailAbnormal> list = currentRiskDetailAbnormalService.selectCurrentRiskDetailAbnormalList(currentRiskDetailAbnormal);
return getDataTable(list);
}
/**
* 导出现状风险巡查异常信息列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:export')")
@Log(title = "现状风险巡查异常信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
{
List<CurrentRiskDetailAbnormal> list = currentRiskDetailAbnormalService.selectCurrentRiskDetailAbnormalList(currentRiskDetailAbnormal);
ExcelUtil<CurrentRiskDetailAbnormal> util = new ExcelUtil<CurrentRiskDetailAbnormal>(CurrentRiskDetailAbnormal.class);
util.exportExcel(response, list, "现状风险巡查异常信息数据");
}
/**
* 获取现状风险巡查异常信息详细信息
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(currentRiskDetailAbnormalService.selectCurrentRiskDetailAbnormalById(id));
}
/**
* 新增现状风险巡查异常信息
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:add')")
@Log(title = "现状风险巡查异常信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
{
return toAjax(currentRiskDetailAbnormalService.insertCurrentRiskDetailAbnormal(currentRiskDetailAbnormal));
}
/**
* 修改现状风险巡查异常信息
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:edit')")
@Log(title = "现状风险巡查异常信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
{
return toAjax(currentRiskDetailAbnormalService.updateCurrentRiskDetailAbnormal(currentRiskDetailAbnormal));
}
/**
* 删除现状风险巡查异常信息
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskAbnormal:remove')")
@Log(title = "现状风险巡查异常信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(currentRiskDetailAbnormalService.deleteCurrentRiskDetailAbnormalByIds(ids));
}
}
package com.censoft.censoftrongtong.controller;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.censoft.censoftrongtong.domain.CurrentRiskPostList;
import com.censoft.censoftrongtong.domain.CurrentRiskPostListSaveVO;
import com.censoft.censoftrongtong.service.ICurrentRiskPostListService;
import lombok.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.CurrentRiskPost;
import com.censoft.censoftrongtong.service.ICurrentRiskPostService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 现状风险岗位Controller
*
* @author ruoyi
* @date 2023-12-01
*/
@RestController
@AllArgsConstructor
@RequestMapping("/system/currentRiskPost")
public class CurrentRiskPostController extends BaseController
{
private ICurrentRiskPostService currentRiskPostService;
private ICurrentRiskPostListService currentRiskPostListService;
/**
* 查询现状风险岗位列表
*/
@PreAuthorize("@ss.hasPermi('system:currentRiskPost:list')")
@GetMapping("/list")
public TableDataInfo list(CurrentRiskPost currentRiskPost)
{
startPage();
List<CurrentRiskPost> list = currentRiskPostService.selectCurrentRiskPostList(currentRiskPost);
return getDataTable(list);
}
/**
* 导出现状风险岗位列表
*/
@PreAuthorize("@ss.hasPermi('system:currentRiskPost:export')")
@Log(title = "现状风险岗位", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskPost currentRiskPost)
{
List<CurrentRiskPost> list = currentRiskPostService.selectCurrentRiskPostList(currentRiskPost);
ExcelUtil<CurrentRiskPost> util = new ExcelUtil<CurrentRiskPost>(CurrentRiskPost.class);
util.exportExcel(response, list, "现状风险岗位数据");
}
/**
* 获取现状风险岗位详细信息
*/
@PreAuthorize("@ss.hasPermi('system:currentRiskPost:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(currentRiskPostService.selectCurrentRiskPostById(id));
}
/**
* 新增现状风险岗位
*/
@PreAuthorize("@ss.hasPermi('system:currentRiskPost:add')")
@Log(title = "现状风险岗位", businessType = BusinessType.INSERT)
@PostMapping("save")
public AjaxResult add(@RequestBody CurrentRiskPost currentRiskPost)
{
Long currentRiskPostId = currentRiskPost.getId();
if(currentRiskPostId == null){
int id = currentRiskPostService.insertCurrentRiskPost(currentRiskPost);
currentRiskPostId = currentRiskPost.getId();
}else{
currentRiskPostService.updateCurrentRiskPost(currentRiskPost);
//删除原有岗位用户信息
QueryWrapper<CurrentRiskPostList> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("post_id",currentRiskPostId);
currentRiskPostListService.remove(queryWrapper);
}
//新增清单列表
List<CurrentRiskPostListSaveVO> list = currentRiskPost.getList();
if(!CollectionUtils.isEmpty(list)){
String userIds = currentRiskPost.getUserId();
for(String userId :userIds.split(",")){
List<CurrentRiskPostList> currentRiskPostLists = new ArrayList<>();
Long finalCurrentRiskPostId = currentRiskPostId;
list.forEach(vo ->{
//0 一岗一人 1 一岗多人
if("1".equals(currentRiskPost.getPatrolType()) && Long.parseLong(userId) != vo.getUserId()){
return;
}
CurrentRiskPostList currentRiskPostList = new CurrentRiskPostList();
currentRiskPostList.setProjectId(currentRiskPost.getProjectId());
currentRiskPostList.setPostId(finalCurrentRiskPostId);
currentRiskPostList.setUserId(Long.parseLong(userId));
currentRiskPostList.setCurrentRiskId(vo.getId());
currentRiskPostList.setPatrolType(vo.getPatrolType());
currentRiskPostList.setCreateTime(new Date());
currentRiskPostLists.add(currentRiskPostList);
});
if(!CollectionUtils.isEmpty(currentRiskPostLists)){
currentRiskPostListService.saveBatch(currentRiskPostLists);
}
}
}
return AjaxResult.success();
}
/**
* 修改现状风险岗位
*/
@PreAuthorize("@ss.hasPermi('system:currentRiskPost:edit')")
@Log(title = "现状风险岗位", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskPost currentRiskPost)
{
return toAjax(currentRiskPostService.updateCurrentRiskPost(currentRiskPost));
}
/**
* 删除现状风险岗位
*/
@PreAuthorize("@ss.hasPermi('system:currentRiskPost:remove')")
@Log(title = "现状风险岗位", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(currentRiskPostService.deleteCurrentRiskPostByIds(ids));
}
}
package com.censoft.censoftrongtong.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.CurrentRiskPostList;
import com.censoft.censoftrongtong.service.ICurrentRiskPostListService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 现状风险岗位用户巡查清单Controller
*
* @author bobbao
* @date 2023-12-07
*/
@RestController
@RequestMapping("/risk/riskPostList")
public class CurrentRiskPostListController extends BaseController
{
@Autowired
private ICurrentRiskPostListService currentRiskPostListService;
/**
* 查询现状风险岗位用户巡查清单列表
*/
@GetMapping("/list")
public TableDataInfo list(CurrentRiskPostList currentRiskPostList)
{
startPage();
List<CurrentRiskPostList> list = currentRiskPostListService.selectCurrentRiskPostListList(currentRiskPostList);
return getDataTable(list);
}
@GetMapping("/list2")
public TableDataInfo list2(CurrentRiskPostList currentRiskPostList)
{
startPage();
List<CurrentRiskPostList> list = currentRiskPostListService.selectCurrentRiskPostListList2(currentRiskPostList);
return getDataTable(list);
}
/**
* 导出现状风险岗位用户巡查清单列表
*/
@PreAuthorize("@ss.hasPermi('system:riskPostList:export')")
@Log(title = "现状风险岗位用户巡查清单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskPostList currentRiskPostList)
{
List<CurrentRiskPostList> list = currentRiskPostListService.selectCurrentRiskPostListList(currentRiskPostList);
ExcelUtil<CurrentRiskPostList> util = new ExcelUtil<CurrentRiskPostList>(CurrentRiskPostList.class);
util.exportExcel(response, list, "现状风险岗位用户巡查清单数据");
}
/**
* 获取现状风险岗位用户巡查清单详细信息
*/
@PreAuthorize("@ss.hasPermi('system:riskPostList:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(currentRiskPostListService.selectCurrentRiskPostListById(id));
}
/**
* 新增现状风险岗位用户巡查清单
*/
@PreAuthorize("@ss.hasPermi('system:riskPostList:add')")
@Log(title = "现状风险岗位用户巡查清单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody CurrentRiskPostList currentRiskPostList)
{
return toAjax(currentRiskPostListService.insertCurrentRiskPostList(currentRiskPostList));
}
/**
* 修改现状风险岗位用户巡查清单
*/
@PreAuthorize("@ss.hasPermi('system:riskPostList:edit')")
@Log(title = "现状风险岗位用户巡查清单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskPostList currentRiskPostList)
{
return toAjax(currentRiskPostListService.updateCurrentRiskPostList(currentRiskPostList));
}
/**
* 删除现状风险岗位用户巡查清单
*/
@PreAuthorize("@ss.hasPermi('system:riskPostList:remove')")
@Log(title = "现状风险岗位用户巡查清单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(currentRiskPostListService.deleteCurrentRiskPostListByIds(ids));
}
}
package com.censoft.censoftrongtong.controller;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday;
import com.censoft.censoftrongtong.service.ICurrentRiskUserHolidayService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 现状风险巡查用户请假Controller
*
* @author ruoyi
* @date 2023-12-05
*/
@RestController
@RequestMapping(value = {"/risk/currentRiskHoliday","/app-api/risk/currentRiskHoliday"})
public class CurrentRiskUserHolidayController extends BaseController
{
@Autowired
private ICurrentRiskUserHolidayService currentRiskUserHolidayService;
/**
* 查询现状风险巡查用户请假列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:list')")
@GetMapping("/list")
public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday)
{
startPage();
List<CurrentRiskUserHoliday> list = currentRiskUserHolidayService.selectCurrentRiskUserHolidayList(currentRiskUserHoliday);
return getDataTable(list);
}
/**
* 导出现状风险巡查用户请假列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:export')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskUserHoliday currentRiskUserHoliday)
{
List<CurrentRiskUserHoliday> list = currentRiskUserHolidayService.selectCurrentRiskUserHolidayList(currentRiskUserHoliday);
ExcelUtil<CurrentRiskUserHoliday> util = new ExcelUtil<CurrentRiskUserHoliday>(CurrentRiskUserHoliday.class);
util.exportExcel(response, list, "现状风险巡查用户请假数据");
}
/**
* 获取现状风险巡查用户请假详细信息
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(currentRiskUserHolidayService.selectCurrentRiskUserHolidayById(id));
}
/**
* 新增现状风险巡查用户请假
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:add')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.INSERT)
@PostMapping("/save")
public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
{
if(null == currentRiskUserHoliday.getId()){
currentRiskUserHoliday.setApplyUserId(getUserId());
currentRiskUserHoliday.setApplyTime(new Date());
currentRiskUserHoliday.setStatus("0");
//查询上级项目经理
currentRiskUserHolidayService.insertCurrentRiskUserHoliday(currentRiskUserHoliday);
}else{
currentRiskUserHoliday.setApproveTime(new Date());
currentRiskUserHolidayService.updateCurrentRiskUserHoliday(currentRiskUserHoliday);
}
return AjaxResult.success();
}
/**
* 修改现状风险巡查用户请假
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:edit')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
{
return toAjax(currentRiskUserHolidayService.updateCurrentRiskUserHoliday(currentRiskUserHoliday));
}
/**
* 删除现状风险巡查用户请假
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:remove')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(currentRiskUserHolidayService.deleteCurrentRiskUserHolidayByIds(ids));
}
}
package com.censoft.censoftrongtong.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 巡查执行管理Controller
*
* @author baode
* @date 2023-12-05
*/
@RestController
@RequestMapping(value={"/risk/riskUserPatrol","/app-api/risk/riskUserPatrol"})
public class CurrentRiskUserPatrolController extends BaseController
{
@Autowired
private ICurrentRiskUserPatrolService currentRiskUserPatrolService;
/**
* 查询巡查执行管理列表
*/
@GetMapping("/list")
public TableDataInfo list(CurrentRiskUserPatrol currentRiskUserPatrol)
{
startPage();
List<CurrentRiskUserPatrol> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
return getDataTable(list);
}
/**
* 导出巡查执行管理列表
*/
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:export')")
@Log(title = "巡查执行管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskUserPatrol currentRiskUserPatrol)
{
List<CurrentRiskUserPatrol> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
ExcelUtil<CurrentRiskUserPatrol> util = new ExcelUtil<CurrentRiskUserPatrol>(CurrentRiskUserPatrol.class);
util.exportExcel(response, list, "巡查执行管理数据");
}
/**
* 获取巡查执行管理详细信息
*/
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(currentRiskUserPatrolService.selectCurrentRiskUserPatrolById(id));
}
/**
* 新增巡查执行管理
*/
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:add')")
@Log(title = "巡查执行管理", businessType = BusinessType.INSERT)
@PostMapping("save")
public AjaxResult add(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol)
{
return toAjax(currentRiskUserPatrolService.insertCurrentRiskUserPatrol(currentRiskUserPatrol));
}
/**
* 修改巡查执行管理
*/
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:edit')")
@Log(title = "巡查执行管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol)
{
return toAjax(currentRiskUserPatrolService.updateCurrentRiskUserPatrol(currentRiskUserPatrol));
}
/**
* 删除巡查执行管理
*/
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:remove')")
@Log(title = "巡查执行管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(currentRiskUserPatrolService.deleteCurrentRiskUserPatrolByIds(ids));
}
}
package com.censoft.censoftrongtong.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail;
import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 现状风险用户巡查明细Controller
*
* @author ruoyi
* @date 2023-12-05
*/
@RestController
@RequestMapping("/risk/currentRiskPatrolDetail")
public class CurrentRiskUserPatrolDetailController extends BaseController
{
@Autowired
private ICurrentRiskUserPatrolDetailService currentRiskUserPatrolDetailService;
/**
* 查询现状风险用户巡查明细列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:list')")
@GetMapping("/list")
public TableDataInfo list(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
{
startPage();
List<CurrentRiskUserPatrolDetail> list = currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailList(currentRiskUserPatrolDetail);
return getDataTable(list);
}
/**
* 导出现状风险用户巡查明细列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:export')")
@Log(title = "现状风险用户巡查明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
{
List<CurrentRiskUserPatrolDetail> list = currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailList(currentRiskUserPatrolDetail);
ExcelUtil<CurrentRiskUserPatrolDetail> util = new ExcelUtil<CurrentRiskUserPatrolDetail>(CurrentRiskUserPatrolDetail.class);
util.exportExcel(response, list, "现状风险用户巡查明细数据");
}
/**
* 获取现状风险用户巡查明细详细信息
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(currentRiskUserPatrolDetailService.selectCurrentRiskUserPatrolDetailById(id));
}
/**
* 新增现状风险用户巡查明细
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:add')")
@Log(title = "现状风险用户巡查明细", businessType = BusinessType.INSERT)
@PostMapping("save")
public AjaxResult add(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
{
return toAjax(currentRiskUserPatrolDetailService.insertCurrentRiskUserPatrolDetail(currentRiskUserPatrolDetail));
}
/**
* 修改现状风险用户巡查明细
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:edit')")
@Log(title = "现状风险用户巡查明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
{
return toAjax(currentRiskUserPatrolDetailService.updateCurrentRiskUserPatrolDetail(currentRiskUserPatrolDetail));
}
/**
* 删除现状风险用户巡查明细
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskPatrolDetail:remove')")
@Log(title = "现状风险用户巡查明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(currentRiskUserPatrolDetailService.deleteCurrentRiskUserPatrolDetailByIds(ids));
}
}
package com.censoft.censoftrongtong.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.censoft.censoftrongtong.domain.ProjectUserPost;
import com.censoft.censoftrongtong.service.IProjectUserPostService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 项目用户岗位关系Controller
*
* @author ruoyi
* @date 2023-11-30
*/
@RestController
@RequestMapping("/risk/currentProject")
public class ProjectUserPostController extends BaseController
{
@Autowired
private IProjectUserPostService projectUserPostService;
/**
* 查询项目用户岗位关系列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentProject:list')")
@GetMapping("/list")
public TableDataInfo list(ProjectUserPost projectUserPost)
{
startPage();
List<ProjectUserPost> list = projectUserPostService.selectProjectUserPostList(projectUserPost);
return getDataTable(list);
}
/**
* 导出项目用户岗位关系列表
*/
@PreAuthorize("@ss.hasPermi('risk:currentProject:export')")
@Log(title = "项目用户岗位关系", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProjectUserPost projectUserPost)
{
List<ProjectUserPost> list = projectUserPostService.selectProjectUserPostList(projectUserPost);
ExcelUtil<ProjectUserPost> util = new ExcelUtil<ProjectUserPost>(ProjectUserPost.class);
util.exportExcel(response, list, "项目用户岗位关系数据");
}
/**
* 获取项目用户岗位关系详细信息
*/
@PreAuthorize("@ss.hasPermi('risk:currentProject:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(projectUserPostService.selectProjectUserPostById(id));
}
/**
* 新增项目用户岗位关系
*/
@PreAuthorize("@ss.hasPermi('risk:currentProject:add')")
@Log(title = "项目用户岗位关系", businessType = BusinessType.INSERT)
@PostMapping("save")
public AjaxResult add(@RequestBody ProjectUserPost projectUserPost)
{
if(projectUserPost.getId() == null){
projectUserPostService.insertProjectUserPost(projectUserPost);
}else{
projectUserPostService.updateProjectUserPost(projectUserPost);
}
return AjaxResult.success();
}
/**
* 修改项目用户岗位关系
*/
@PreAuthorize("@ss.hasPermi('risk:currentProject:edit')")
@Log(title = "项目用户岗位关系", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProjectUserPost projectUserPost)
{
return toAjax(projectUserPostService.updateProjectUserPost(projectUserPost));
}
/**
* 删除项目用户岗位关系
*/
@PreAuthorize("@ss.hasPermi('risk:currentProject:remove')")
@Log(title = "项目用户岗位关系", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(projectUserPostService.deleteProjectUserPostByIds(ids));
}
}
package com.censoft.censoftrongtong.domain;
import com.ruoyi.common.core.domain.BaseEntityClean;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 现状风险巡查异常信息对象 current_risk_detail_abnormal
*
* @author ruoyi
* @date 2023-12-05
*/
@Data
public class CurrentRiskDetailAbnormal extends BaseEntityClean
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 巡查 id */
@Excel(name = "巡查 id")
private Long patrolId;
/** 巡查明细id */
@Excel(name = "巡查明细id")
private Long patrolDetailId;
/** 巡查内容 */
@Excel(name = "巡查内容")
private String riskContent;
/** 巡查地点 */
@Excel(name = "巡查地点")
private String riskLocation;
/** 异常说明 */
@Excel(name = "异常说明")
private String abnormalDesc;
/** 评估等级 */
@Excel(name = "评估等级")
private String assessmentLevel;
/** 排序 */
@Excel(name = "排序")
private Long sortNum;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
}
package com.censoft.censoftrongtong.domain;
import com.ruoyi.common.core.domain.BaseEntityClean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.List;
/**
* 现状风险岗位对象 current_risk_post
*
* @author ruoyi
* @date 2023-12-01
*/
@Data
public class CurrentRiskPost extends BaseEntityClean
{
private static final long serialVersionUID = 1L;
/** 主键 id */
private Long id;
/** 项目id */
@Excel(name = "项目id")
private Long projectId;
/** 岗位编码 */
@Excel(name = "岗位编码")
private String riskPostCode;
/** 岗位名称 */
@Excel(name = "岗位名称")
private String riskPostName;
/** 巡查类型 */
@Excel(name = "巡查类型 0 一岗一人 1 一岗多人")
private String patrolType;
/** 岗位描述 */
@Excel(name = "岗位描述")
private String riskPostDesc;
/** 用户 id */
@Excel(name = "用户 id")
private String userId;
/** 排序 */
@Excel(name = "排序")
private Long sortNum;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
private String nickName;
private List<CurrentRiskPostListSaveVO> list;
}
package com.censoft.censoftrongtong.domain;
import com.ruoyi.common.core.domain.BaseEntityClean;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 现状风险岗位用户巡查清单对象 current_risk_post_list
*
* @author bobbao
* @date 2023-12-07
*/
@Data
public class CurrentRiskPostList extends BaseEntityClean
{
private static final long serialVersionUID = 1L;
/** 主键 id */
private Long id;
/** 项目id */
@Excel(name = "项目id")
private Long projectId;
/** 岗位 id */
@Excel(name = "岗位 id")
private Long postId;
/** 用户 id */
@Excel(name = "用户 id")
private Long userId;
/** 现状风险 id */
@Excel(name = "现状风险 id")
private Long currentRiskId;
/** 巡查类型 */
@Excel(name = "巡查类型")
private String patrolType;
/** 排序 */
@Excel(name = "排序")
private Long sortNum;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
private String currentRiskType;
private Long currentRiskId2;
private String currentRiskType2;
private String nickName;
}
package com.censoft.censoftrongtong.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class CurrentRiskPostListSaveVO {
@ApiModelProperty("现有风险 id")
private Long id;
@ApiModelProperty("用户 id")
private Long userId;
@ApiModelProperty("巡查类型")
private String patrolType;
}
package com.censoft.censoftrongtong.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntityClean;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 现状风险巡查用户请假对象 current_risk_user_holiday
*
* @author ruoyi
* @date 2023-12-05
*/
@Data
public class CurrentRiskUserHoliday extends BaseEntityClean
{
private static final long serialVersionUID = 1L;
/** 主键 id */
private Long id;
/** 申请人用户 id */
@Excel(name = "申请人用户 id")
private Long applyUserId;
/** 审批人用户 id */
@Excel(name = "审批人用户 id")
private Long approveUserId;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 审批时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date approveTime;
/** 假期时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "假期时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date holidayTime;
/** 请假原因 */
@Excel(name = "请假原因")
private String reason;
/** 审批描述 */
@Excel(name = "审批描述")
private String approveMsg;
/** 状态 0 待审批 1 已通过 2 已拒绝 */
@Excel(name = "状态 0 待审批 1 已通过 2 已拒绝")
private String status;
/** 排序 */
@Excel(name = "排序")
private Long sortNum;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
}
package com.censoft.censoftrongtong.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntityClean;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
/**
* 巡查执行管理对象 current_risk_user_patrol
*
* @author baode
* @date 2023-12-05
*/
@Data
public class CurrentRiskUserPatrol extends BaseEntityClean
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 用户 id */
@Excel(name = "用户 id")
private Long userId;
/** 项目 id */
@Excel(name = "项目 id")
private Long projectId;
/** 现状风险岗位 id */
@Excel(name = "现状风险岗位 id")
private Long riskPostId;
/** 巡查类型 0 日查 1 周查 2 月查 3 季查 4 年查 */
@Excel(name = "巡查类型 0 日查 1 周查 2 月查 3 季查 4 年查")
private Integer patrolType;
/** 状态 0 未巡查 1 已巡查 */
@Excel(name = "状态 0 未巡查 1 已巡查")
private String status;
/** 开始巡查时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始巡查时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 结束巡查时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束巡查时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date validityTime;
/** 排序 */
@Excel(name = "排序")
private Long sortNum;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
private String riskPostName;
private String nickName;
}
package com.censoft.censoftrongtong.domain;
import com.ruoyi.common.core.domain.BaseEntityClean;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 现状风险用户巡查明细对象 current_risk_user_patrol_detail
*
* @author ruoyi
* @date 2023-12-05
*/
@Data
public class CurrentRiskUserPatrolDetail extends BaseEntityClean
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 巡查 id */
@Excel(name = "巡查 id")
private Long patrolId;
/** 现有风险 id */
@Excel(name = "现有风险 id")
private Long currentRiskId;
/** 状态 0 正常 1 异常 */
@Excel(name = "状态 0 正常 1 异常")
private String status;
/** 排序 */
@Excel(name = "排序")
private Long sortNum;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
private String riskSourceType;
private Long riskPostId;
private Long userId;
}
package com.censoft.censoftrongtong.domain;
import com.ruoyi.common.core.domain.BaseEntityClean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 项目用户岗位关系对象 project_user_post
*
* @author ruoyi
* @date 2023-11-30
*/
@Data
@ApiModel("项目用户岗位关系对象")
public class ProjectUserPost extends BaseEntityClean
{
private static final long serialVersionUID = 1L;
/** 主键 id */
@ApiModelProperty("项目 id")
private Long id;
/** 项目 id */
@Excel(name = "项目 id")
@ApiModelProperty("项目 id")
private Long projectId;
/** 用户 id */
@Excel(name = "用户 id")
@ApiModelProperty("用户 id")
private Long userId;
/** 岗位 id */
@Excel(name = "岗位 id")
@ApiModelProperty("岗位 id")
private Long postId;
private String nickName;
private String projectName;
private String projectType;
private String projectAddress;
}
package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal;
import com.github.yulichang.base.MPJBaseMapper;
/**
* 现状风险巡查异常信息Mapper接口
*
* @author ruoyi
* @date 2023-12-05
*/
public interface CurrentRiskDetailAbnormalMapper extends MPJBaseMapper<CurrentRiskDetailAbnormal>
{
/**
* 查询现状风险巡查异常信息
*
* @param id 现状风险巡查异常信息主键
* @return 现状风险巡查异常信息
*/
public CurrentRiskDetailAbnormal selectCurrentRiskDetailAbnormalById(Long id);
/**
* 查询现状风险巡查异常信息列表
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 现状风险巡查异常信息集合
*/
public List<CurrentRiskDetailAbnormal> selectCurrentRiskDetailAbnormalList(CurrentRiskDetailAbnormal currentRiskDetailAbnormal);
/**
* 新增现状风险巡查异常信息
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 结果
*/
public int insertCurrentRiskDetailAbnormal(CurrentRiskDetailAbnormal currentRiskDetailAbnormal);
/**
* 修改现状风险巡查异常信息
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 结果
*/
public int updateCurrentRiskDetailAbnormal(CurrentRiskDetailAbnormal currentRiskDetailAbnormal);
/**
* 删除现状风险巡查异常信息
*
* @param id 现状风险巡查异常信息主键
* @return 结果
*/
public int deleteCurrentRiskDetailAbnormalById(Long id);
/**
* 批量删除现状风险巡查异常信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCurrentRiskDetailAbnormalByIds(Long[] ids);
}
package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskPostList;
import com.github.yulichang.base.MPJBaseMapper;
/**
* 现状风险岗位用户巡查清单Mapper接口
*
* @author bobbao
* @date 2023-12-07
*/
public interface CurrentRiskPostListMapper extends MPJBaseMapper<CurrentRiskPostList>
{
/**
* 查询现状风险岗位用户巡查清单
*
* @param id 现状风险岗位用户巡查清单主键
* @return 现状风险岗位用户巡查清单
*/
public CurrentRiskPostList selectCurrentRiskPostListById(Long id);
/**
* 查询现状风险岗位用户巡查清单列表
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 现状风险岗位用户巡查清单集合
*/
public List<CurrentRiskPostList> selectCurrentRiskPostListList(CurrentRiskPostList currentRiskPostList);
/**
* 新增现状风险岗位用户巡查清单
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 结果
*/
public int insertCurrentRiskPostList(CurrentRiskPostList currentRiskPostList);
/**
* 修改现状风险岗位用户巡查清单
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 结果
*/
public int updateCurrentRiskPostList(CurrentRiskPostList currentRiskPostList);
/**
* 删除现状风险岗位用户巡查清单
*
* @param id 现状风险岗位用户巡查清单主键
* @return 结果
*/
public int deleteCurrentRiskPostListById(Long id);
/**
* 批量删除现状风险岗位用户巡查清单
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCurrentRiskPostListByIds(Long[] ids);
public List<CurrentRiskPostList> selectCurrentRiskPostListList2(CurrentRiskPostList currentRiskPostList);
}
package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskPost;
import com.github.yulichang.base.MPJBaseMapper;
/**
* 现状风险岗位Mapper接口
*
* @author ruoyi
* @date 2023-12-01
*/
public interface CurrentRiskPostMapper extends MPJBaseMapper<CurrentRiskPost>
{
/**
* 查询现状风险岗位
*
* @param id 现状风险岗位主键
* @return 现状风险岗位
*/
public CurrentRiskPost selectCurrentRiskPostById(Long id);
/**
* 查询现状风险岗位列表
*
* @param currentRiskPost 现状风险岗位
* @return 现状风险岗位集合
*/
public List<CurrentRiskPost> selectCurrentRiskPostList(CurrentRiskPost currentRiskPost);
/**
* 新增现状风险岗位
*
* @param currentRiskPost 现状风险岗位
* @return 结果
*/
public int insertCurrentRiskPost(CurrentRiskPost currentRiskPost);
/**
* 修改现状风险岗位
*
* @param currentRiskPost 现状风险岗位
* @return 结果
*/
public int updateCurrentRiskPost(CurrentRiskPost currentRiskPost);
/**
* 删除现状风险岗位
*
* @param id 现状风险岗位主键
* @return 结果
*/
public int deleteCurrentRiskPostById(Long id);
/**
* 批量删除现状风险岗位
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCurrentRiskPostByIds(Long[] ids);
}
package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday;
import com.github.yulichang.base.MPJBaseMapper;
/**
* 现状风险巡查用户请假Mapper接口
*
* @author ruoyi
* @date 2023-12-05
*/
public interface CurrentRiskUserHolidayMapper extends MPJBaseMapper<CurrentRiskUserHoliday>
{
/**
* 查询现状风险巡查用户请假
*
* @param id 现状风险巡查用户请假主键
* @return 现状风险巡查用户请假
*/
public CurrentRiskUserHoliday selectCurrentRiskUserHolidayById(Long id);
/**
* 查询现状风险巡查用户请假列表
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 现状风险巡查用户请假集合
*/
public List<CurrentRiskUserHoliday> selectCurrentRiskUserHolidayList(CurrentRiskUserHoliday currentRiskUserHoliday);
/**
* 新增现状风险巡查用户请假
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 结果
*/
public int insertCurrentRiskUserHoliday(CurrentRiskUserHoliday currentRiskUserHoliday);
/**
* 修改现状风险巡查用户请假
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 结果
*/
public int updateCurrentRiskUserHoliday(CurrentRiskUserHoliday currentRiskUserHoliday);
/**
* 删除现状风险巡查用户请假
*
* @param id 现状风险巡查用户请假主键
* @return 结果
*/
public int deleteCurrentRiskUserHolidayById(Long id);
/**
* 批量删除现状风险巡查用户请假
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCurrentRiskUserHolidayByIds(Long[] ids);
}
package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail;
import com.github.yulichang.base.MPJBaseMapper;
/**
* 现状风险用户巡查明细Mapper接口
*
* @author ruoyi
* @date 2023-12-05
*/
public interface CurrentRiskUserPatrolDetailMapper extends MPJBaseMapper<CurrentRiskUserPatrolDetail>
{
/**
* 查询现状风险用户巡查明细
*
* @param id 现状风险用户巡查明细主键
* @return 现状风险用户巡查明细
*/
public CurrentRiskUserPatrolDetail selectCurrentRiskUserPatrolDetailById(Long id);
/**
* 查询现状风险用户巡查明细列表
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 现状风险用户巡查明细集合
*/
public List<CurrentRiskUserPatrolDetail> selectCurrentRiskUserPatrolDetailList(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail);
/**
* 新增现状风险用户巡查明细
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 结果
*/
public int insertCurrentRiskUserPatrolDetail(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail);
/**
* 修改现状风险用户巡查明细
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 结果
*/
public int updateCurrentRiskUserPatrolDetail(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail);
/**
* 删除现状风险用户巡查明细
*
* @param id 现状风险用户巡查明细主键
* @return 结果
*/
public int deleteCurrentRiskUserPatrolDetailById(Long id);
/**
* 批量删除现状风险用户巡查明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCurrentRiskUserPatrolDetailByIds(Long[] ids);
}
package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.github.yulichang.base.MPJBaseMapper;
/**
* 巡查执行管理Mapper接口
*
* @author baode
* @date 2023-12-05
*/
public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskUserPatrol>
{
/**
* 查询巡查执行管理
*
* @param id 巡查执行管理主键
* @return 巡查执行管理
*/
public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id);
/**
* 查询巡查执行管理列表
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 巡查执行管理集合
*/
public List<CurrentRiskUserPatrol> selectCurrentRiskUserPatrolList(CurrentRiskUserPatrol currentRiskUserPatrol);
/**
* 新增巡查执行管理
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 结果
*/
public int insertCurrentRiskUserPatrol(CurrentRiskUserPatrol currentRiskUserPatrol);
/**
* 修改巡查执行管理
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 结果
*/
public int updateCurrentRiskUserPatrol(CurrentRiskUserPatrol currentRiskUserPatrol);
/**
* 删除巡查执行管理
*
* @param id 巡查执行管理主键
* @return 结果
*/
public int deleteCurrentRiskUserPatrolById(Long id);
/**
* 批量删除巡查执行管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteCurrentRiskUserPatrolByIds(Long[] ids);
}
package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.ProjectUserPost;
import com.github.yulichang.base.MPJBaseMapper;
/**
* 项目用户岗位关系Mapper接口
*
* @author ruoyi
* @date 2023-11-30
*/
public interface ProjectUserPostMapper extends MPJBaseMapper<ProjectUserPost>
{
/**
* 查询项目用户岗位关系
*
* @param id 项目用户岗位关系主键
* @return 项目用户岗位关系
*/
public ProjectUserPost selectProjectUserPostById(Long id);
/**
* 查询项目用户岗位关系列表
*
* @param projectUserPost 项目用户岗位关系
* @return 项目用户岗位关系集合
*/
public List<ProjectUserPost> selectProjectUserPostList(ProjectUserPost projectUserPost);
/**
* 新增项目用户岗位关系
*
* @param projectUserPost 项目用户岗位关系
* @return 结果
*/
public int insertProjectUserPost(ProjectUserPost projectUserPost);
/**
* 修改项目用户岗位关系
*
* @param projectUserPost 项目用户岗位关系
* @return 结果
*/
public int updateProjectUserPost(ProjectUserPost projectUserPost);
/**
* 删除项目用户岗位关系
*
* @param id 项目用户岗位关系主键
* @return 结果
*/
public int deleteProjectUserPostById(Long id);
/**
* 批量删除项目用户岗位关系
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteProjectUserPostByIds(Long[] ids);
}
package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal;
import com.github.yulichang.base.MPJBaseService;
/**
* 现状风险巡查异常信息Service接口
*
* @author ruoyi
* @date 2023-12-05
*/
public interface ICurrentRiskDetailAbnormalService extends MPJBaseService<CurrentRiskDetailAbnormal>
{
/**
* 查询现状风险巡查异常信息
*
* @param id 现状风险巡查异常信息主键
* @return 现状风险巡查异常信息
*/
public CurrentRiskDetailAbnormal selectCurrentRiskDetailAbnormalById(Long id);
/**
* 查询现状风险巡查异常信息列表
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 现状风险巡查异常信息集合
*/
public List<CurrentRiskDetailAbnormal> selectCurrentRiskDetailAbnormalList(CurrentRiskDetailAbnormal currentRiskDetailAbnormal);
/**
* 新增现状风险巡查异常信息
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 结果
*/
public int insertCurrentRiskDetailAbnormal(CurrentRiskDetailAbnormal currentRiskDetailAbnormal);
/**
* 修改现状风险巡查异常信息
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 结果
*/
public int updateCurrentRiskDetailAbnormal(CurrentRiskDetailAbnormal currentRiskDetailAbnormal);
/**
* 批量删除现状风险巡查异常信息
*
* @param ids 需要删除的现状风险巡查异常信息主键集合
* @return 结果
*/
public int deleteCurrentRiskDetailAbnormalByIds(Long[] ids);
/**
* 删除现状风险巡查异常信息信息
*
* @param id 现状风险巡查异常信息主键
* @return 结果
*/
public int deleteCurrentRiskDetailAbnormalById(Long id);
}
package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskPostList;
import com.github.yulichang.base.MPJBaseService;
/**
* 现状风险岗位用户巡查清单Service接口
*
* @author bobbao
* @date 2023-12-07
*/
public interface ICurrentRiskPostListService extends MPJBaseService<CurrentRiskPostList>
{
/**
* 查询现状风险岗位用户巡查清单
*
* @param id 现状风险岗位用户巡查清单主键
* @return 现状风险岗位用户巡查清单
*/
public CurrentRiskPostList selectCurrentRiskPostListById(Long id);
/**
* 查询现状风险岗位用户巡查清单列表
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 现状风险岗位用户巡查清单集合
*/
public List<CurrentRiskPostList> selectCurrentRiskPostListList(CurrentRiskPostList currentRiskPostList);
/**
* 新增现状风险岗位用户巡查清单
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 结果
*/
public int insertCurrentRiskPostList(CurrentRiskPostList currentRiskPostList);
/**
* 修改现状风险岗位用户巡查清单
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 结果
*/
public int updateCurrentRiskPostList(CurrentRiskPostList currentRiskPostList);
/**
* 批量删除现状风险岗位用户巡查清单
*
* @param ids 需要删除的现状风险岗位用户巡查清单主键集合
* @return 结果
*/
public int deleteCurrentRiskPostListByIds(Long[] ids);
/**
* 删除现状风险岗位用户巡查清单信息
*
* @param id 现状风险岗位用户巡查清单主键
* @return 结果
*/
public int deleteCurrentRiskPostListById(Long id);
public List<CurrentRiskPostList> selectCurrentRiskPostListList2(CurrentRiskPostList currentRiskPostList);
}
package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskPost;
import com.github.yulichang.base.MPJBaseService;
/**
* 现状风险岗位Service接口
*
* @author ruoyi
* @date 2023-12-01
*/
public interface ICurrentRiskPostService extends MPJBaseService<CurrentRiskPost>
{
/**
* 查询现状风险岗位
*
* @param id 现状风险岗位主键
* @return 现状风险岗位
*/
public CurrentRiskPost selectCurrentRiskPostById(Long id);
/**
* 查询现状风险岗位列表
*
* @param currentRiskPost 现状风险岗位
* @return 现状风险岗位集合
*/
public List<CurrentRiskPost> selectCurrentRiskPostList(CurrentRiskPost currentRiskPost);
/**
* 新增现状风险岗位
*
* @param currentRiskPost 现状风险岗位
* @return 结果
*/
public int insertCurrentRiskPost(CurrentRiskPost currentRiskPost);
/**
* 修改现状风险岗位
*
* @param currentRiskPost 现状风险岗位
* @return 结果
*/
public int updateCurrentRiskPost(CurrentRiskPost currentRiskPost);
/**
* 批量删除现状风险岗位
*
* @param ids 需要删除的现状风险岗位主键集合
* @return 结果
*/
public int deleteCurrentRiskPostByIds(Long[] ids);
/**
* 删除现状风险岗位信息
*
* @param id 现状风险岗位主键
* @return 结果
*/
public int deleteCurrentRiskPostById(Long id);
}
package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday;
import com.github.yulichang.base.MPJBaseService;
/**
* 现状风险巡查用户请假Service接口
*
* @author ruoyi
* @date 2023-12-05
*/
public interface ICurrentRiskUserHolidayService extends MPJBaseService<CurrentRiskUserHoliday>
{
/**
* 查询现状风险巡查用户请假
*
* @param id 现状风险巡查用户请假主键
* @return 现状风险巡查用户请假
*/
public CurrentRiskUserHoliday selectCurrentRiskUserHolidayById(Long id);
/**
* 查询现状风险巡查用户请假列表
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 现状风险巡查用户请假集合
*/
public List<CurrentRiskUserHoliday> selectCurrentRiskUserHolidayList(CurrentRiskUserHoliday currentRiskUserHoliday);
/**
* 新增现状风险巡查用户请假
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 结果
*/
public int insertCurrentRiskUserHoliday(CurrentRiskUserHoliday currentRiskUserHoliday);
/**
* 修改现状风险巡查用户请假
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 结果
*/
public int updateCurrentRiskUserHoliday(CurrentRiskUserHoliday currentRiskUserHoliday);
/**
* 批量删除现状风险巡查用户请假
*
* @param ids 需要删除的现状风险巡查用户请假主键集合
* @return 结果
*/
public int deleteCurrentRiskUserHolidayByIds(Long[] ids);
/**
* 删除现状风险巡查用户请假信息
*
* @param id 现状风险巡查用户请假主键
* @return 结果
*/
public int deleteCurrentRiskUserHolidayById(Long id);
}
package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail;
import com.github.yulichang.base.MPJBaseService;
/**
* 现状风险用户巡查明细Service接口
*
* @author ruoyi
* @date 2023-12-05
*/
public interface ICurrentRiskUserPatrolDetailService extends MPJBaseService<CurrentRiskUserPatrolDetail>
{
/**
* 查询现状风险用户巡查明细
*
* @param id 现状风险用户巡查明细主键
* @return 现状风险用户巡查明细
*/
public CurrentRiskUserPatrolDetail selectCurrentRiskUserPatrolDetailById(Long id);
/**
* 查询现状风险用户巡查明细列表
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 现状风险用户巡查明细集合
*/
public List<CurrentRiskUserPatrolDetail> selectCurrentRiskUserPatrolDetailList(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail);
/**
* 新增现状风险用户巡查明细
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 结果
*/
public int insertCurrentRiskUserPatrolDetail(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail);
/**
* 修改现状风险用户巡查明细
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 结果
*/
public int updateCurrentRiskUserPatrolDetail(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail);
/**
* 批量删除现状风险用户巡查明细
*
* @param ids 需要删除的现状风险用户巡查明细主键集合
* @return 结果
*/
public int deleteCurrentRiskUserPatrolDetailByIds(Long[] ids);
/**
* 删除现状风险用户巡查明细信息
*
* @param id 现状风险用户巡查明细主键
* @return 结果
*/
public int deleteCurrentRiskUserPatrolDetailById(Long id);
}
package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.github.yulichang.base.MPJBaseService;
/**
* 巡查执行管理Service接口
*
* @author baode
* @date 2023-12-05
*/
public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRiskUserPatrol>
{
/**
* 查询巡查执行管理
*
* @param id 巡查执行管理主键
* @return 巡查执行管理
*/
public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id);
/**
* 查询巡查执行管理列表
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 巡查执行管理集合
*/
public List<CurrentRiskUserPatrol> selectCurrentRiskUserPatrolList(CurrentRiskUserPatrol currentRiskUserPatrol);
/**
* 新增巡查执行管理
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 结果
*/
public int insertCurrentRiskUserPatrol(CurrentRiskUserPatrol currentRiskUserPatrol);
/**
* 修改巡查执行管理
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 结果
*/
public int updateCurrentRiskUserPatrol(CurrentRiskUserPatrol currentRiskUserPatrol);
/**
* 批量删除巡查执行管理
*
* @param ids 需要删除的巡查执行管理主键集合
* @return 结果
*/
public int deleteCurrentRiskUserPatrolByIds(Long[] ids);
/**
* 删除巡查执行管理信息
*
* @param id 巡查执行管理主键
* @return 结果
*/
public int deleteCurrentRiskUserPatrolById(Long id);
}
package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.ProjectUserPost;
import com.github.yulichang.base.MPJBaseService;
/**
* 项目用户岗位关系Service接口
*
* @author ruoyi
* @date 2023-11-30
*/
public interface IProjectUserPostService extends MPJBaseService<ProjectUserPost>
{
/**
* 查询项目用户岗位关系
*
* @param id 项目用户岗位关系主键
* @return 项目用户岗位关系
*/
public ProjectUserPost selectProjectUserPostById(Long id);
/**
* 查询项目用户岗位关系列表
*
* @param projectUserPost 项目用户岗位关系
* @return 项目用户岗位关系集合
*/
public List<ProjectUserPost> selectProjectUserPostList(ProjectUserPost projectUserPost);
/**
* 新增项目用户岗位关系
*
* @param projectUserPost 项目用户岗位关系
* @return 结果
*/
public int insertProjectUserPost(ProjectUserPost projectUserPost);
/**
* 修改项目用户岗位关系
*
* @param projectUserPost 项目用户岗位关系
* @return 结果
*/
public int updateProjectUserPost(ProjectUserPost projectUserPost);
/**
* 批量删除项目用户岗位关系
*
* @param ids 需要删除的项目用户岗位关系主键集合
* @return 结果
*/
public int deleteProjectUserPostByIds(Long[] ids);
/**
* 删除项目用户岗位关系信息
*
* @param id 项目用户岗位关系主键
* @return 结果
*/
public int deleteProjectUserPostById(Long id);
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.CurrentRiskDetailAbnormalMapper;
import com.censoft.censoftrongtong.domain.CurrentRiskDetailAbnormal;
import com.censoft.censoftrongtong.service.ICurrentRiskDetailAbnormalService;
import com.github.yulichang.base.MPJBaseServiceImpl;
/**
* 现状风险巡查异常信息Service业务层处理
*
* @author ruoyi
* @date 2023-12-05
*/
@Service
public class CurrentRiskDetailAbnormalServiceImpl extends MPJBaseServiceImpl<CurrentRiskDetailAbnormalMapper, CurrentRiskDetailAbnormal> implements ICurrentRiskDetailAbnormalService
{
@Autowired
private CurrentRiskDetailAbnormalMapper currentRiskDetailAbnormalMapper;
/**
* 查询现状风险巡查异常信息
*
* @param id 现状风险巡查异常信息主键
* @return 现状风险巡查异常信息
*/
@Override
public CurrentRiskDetailAbnormal selectCurrentRiskDetailAbnormalById(Long id)
{
return currentRiskDetailAbnormalMapper.selectCurrentRiskDetailAbnormalById(id);
}
/**
* 查询现状风险巡查异常信息列表
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 现状风险巡查异常信息
*/
@Override
public List<CurrentRiskDetailAbnormal> selectCurrentRiskDetailAbnormalList(CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
{
return currentRiskDetailAbnormalMapper.selectCurrentRiskDetailAbnormalList(currentRiskDetailAbnormal);
}
/**
* 新增现状风险巡查异常信息
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 结果
*/
@Override
public int insertCurrentRiskDetailAbnormal(CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
{
currentRiskDetailAbnormal.setCreateTime(DateUtils.getNowDate());
return currentRiskDetailAbnormalMapper.insertCurrentRiskDetailAbnormal(currentRiskDetailAbnormal);
}
/**
* 修改现状风险巡查异常信息
*
* @param currentRiskDetailAbnormal 现状风险巡查异常信息
* @return 结果
*/
@Override
public int updateCurrentRiskDetailAbnormal(CurrentRiskDetailAbnormal currentRiskDetailAbnormal)
{
currentRiskDetailAbnormal.setUpdateTime(DateUtils.getNowDate());
return currentRiskDetailAbnormalMapper.updateCurrentRiskDetailAbnormal(currentRiskDetailAbnormal);
}
/**
* 批量删除现状风险巡查异常信息
*
* @param ids 需要删除的现状风险巡查异常信息主键
* @return 结果
*/
@Override
public int deleteCurrentRiskDetailAbnormalByIds(Long[] ids)
{
return currentRiskDetailAbnormalMapper.deleteCurrentRiskDetailAbnormalByIds(ids);
}
/**
* 删除现状风险巡查异常信息信息
*
* @param id 现状风险巡查异常信息主键
* @return 结果
*/
@Override
public int deleteCurrentRiskDetailAbnormalById(Long id)
{
return currentRiskDetailAbnormalMapper.deleteCurrentRiskDetailAbnormalById(id);
}
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.CurrentRiskPostListMapper;
import com.censoft.censoftrongtong.domain.CurrentRiskPostList;
import com.censoft.censoftrongtong.service.ICurrentRiskPostListService;
import com.github.yulichang.base.MPJBaseServiceImpl;
/**
* 现状风险岗位用户巡查清单Service业务层处理
*
* @author bobbao
* @date 2023-12-07
*/
@Service
public class CurrentRiskPostListServiceImpl extends MPJBaseServiceImpl<CurrentRiskPostListMapper, CurrentRiskPostList> implements ICurrentRiskPostListService
{
@Autowired
private CurrentRiskPostListMapper currentRiskPostListMapper;
/**
* 查询现状风险岗位用户巡查清单
*
* @param id 现状风险岗位用户巡查清单主键
* @return 现状风险岗位用户巡查清单
*/
@Override
public CurrentRiskPostList selectCurrentRiskPostListById(Long id)
{
return currentRiskPostListMapper.selectCurrentRiskPostListById(id);
}
/**
* 查询现状风险岗位用户巡查清单列表
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 现状风险岗位用户巡查清单
*/
@Override
public List<CurrentRiskPostList> selectCurrentRiskPostListList(CurrentRiskPostList currentRiskPostList)
{
return currentRiskPostListMapper.selectCurrentRiskPostListList(currentRiskPostList);
}
/**
* 新增现状风险岗位用户巡查清单
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 结果
*/
@Override
public int insertCurrentRiskPostList(CurrentRiskPostList currentRiskPostList)
{
currentRiskPostList.setCreateTime(DateUtils.getNowDate());
return currentRiskPostListMapper.insertCurrentRiskPostList(currentRiskPostList);
}
/**
* 修改现状风险岗位用户巡查清单
*
* @param currentRiskPostList 现状风险岗位用户巡查清单
* @return 结果
*/
@Override
public int updateCurrentRiskPostList(CurrentRiskPostList currentRiskPostList)
{
currentRiskPostList.setUpdateTime(DateUtils.getNowDate());
return currentRiskPostListMapper.updateCurrentRiskPostList(currentRiskPostList);
}
/**
* 批量删除现状风险岗位用户巡查清单
*
* @param ids 需要删除的现状风险岗位用户巡查清单主键
* @return 结果
*/
@Override
public int deleteCurrentRiskPostListByIds(Long[] ids)
{
return currentRiskPostListMapper.deleteCurrentRiskPostListByIds(ids);
}
/**
* 删除现状风险岗位用户巡查清单信息
*
* @param id 现状风险岗位用户巡查清单主键
* @return 结果
*/
@Override
public int deleteCurrentRiskPostListById(Long id)
{
return currentRiskPostListMapper.deleteCurrentRiskPostListById(id);
}
@Override
public List<CurrentRiskPostList> selectCurrentRiskPostListList2(CurrentRiskPostList currentRiskPostList) {
return currentRiskPostListMapper.selectCurrentRiskPostListList2(currentRiskPostList);
}
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.CurrentRiskPostMapper;
import com.censoft.censoftrongtong.domain.CurrentRiskPost;
import com.censoft.censoftrongtong.service.ICurrentRiskPostService;
import com.github.yulichang.base.MPJBaseServiceImpl;
/**
* 现状风险岗位Service业务层处理
*
* @author ruoyi
* @date 2023-12-01
*/
@Service
public class CurrentRiskPostServiceImpl extends MPJBaseServiceImpl<CurrentRiskPostMapper, CurrentRiskPost> implements ICurrentRiskPostService
{
@Autowired
private CurrentRiskPostMapper currentRiskPostMapper;
/**
* 查询现状风险岗位
*
* @param id 现状风险岗位主键
* @return 现状风险岗位
*/
@Override
public CurrentRiskPost selectCurrentRiskPostById(Long id)
{
return currentRiskPostMapper.selectCurrentRiskPostById(id);
}
/**
* 查询现状风险岗位列表
*
* @param currentRiskPost 现状风险岗位
* @return 现状风险岗位
*/
@Override
public List<CurrentRiskPost> selectCurrentRiskPostList(CurrentRiskPost currentRiskPost)
{
return currentRiskPostMapper.selectCurrentRiskPostList(currentRiskPost);
}
/**
* 新增现状风险岗位
*
* @param currentRiskPost 现状风险岗位
* @return 结果
*/
@Override
public int insertCurrentRiskPost(CurrentRiskPost currentRiskPost)
{
currentRiskPost.setCreateTime(DateUtils.getNowDate());
return currentRiskPostMapper.insertCurrentRiskPost(currentRiskPost);
}
/**
* 修改现状风险岗位
*
* @param currentRiskPost 现状风险岗位
* @return 结果
*/
@Override
public int updateCurrentRiskPost(CurrentRiskPost currentRiskPost)
{
currentRiskPost.setUpdateTime(DateUtils.getNowDate());
return currentRiskPostMapper.updateCurrentRiskPost(currentRiskPost);
}
/**
* 批量删除现状风险岗位
*
* @param ids 需要删除的现状风险岗位主键
* @return 结果
*/
@Override
public int deleteCurrentRiskPostByIds(Long[] ids)
{
return currentRiskPostMapper.deleteCurrentRiskPostByIds(ids);
}
/**
* 删除现状风险岗位信息
*
* @param id 现状风险岗位主键
* @return 结果
*/
@Override
public int deleteCurrentRiskPostById(Long id)
{
return currentRiskPostMapper.deleteCurrentRiskPostById(id);
}
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.CurrentRiskUserHolidayMapper;
import com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday;
import com.censoft.censoftrongtong.service.ICurrentRiskUserHolidayService;
import com.github.yulichang.base.MPJBaseServiceImpl;
/**
* 现状风险巡查用户请假Service业务层处理
*
* @author ruoyi
* @date 2023-12-05
*/
@Service
public class CurrentRiskUserHolidayServiceImpl extends MPJBaseServiceImpl<CurrentRiskUserHolidayMapper, CurrentRiskUserHoliday> implements ICurrentRiskUserHolidayService
{
@Autowired
private CurrentRiskUserHolidayMapper currentRiskUserHolidayMapper;
/**
* 查询现状风险巡查用户请假
*
* @param id 现状风险巡查用户请假主键
* @return 现状风险巡查用户请假
*/
@Override
public CurrentRiskUserHoliday selectCurrentRiskUserHolidayById(Long id)
{
return currentRiskUserHolidayMapper.selectCurrentRiskUserHolidayById(id);
}
/**
* 查询现状风险巡查用户请假列表
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 现状风险巡查用户请假
*/
@Override
public List<CurrentRiskUserHoliday> selectCurrentRiskUserHolidayList(CurrentRiskUserHoliday currentRiskUserHoliday)
{
return currentRiskUserHolidayMapper.selectCurrentRiskUserHolidayList(currentRiskUserHoliday);
}
/**
* 新增现状风险巡查用户请假
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 结果
*/
@Override
public int insertCurrentRiskUserHoliday(CurrentRiskUserHoliday currentRiskUserHoliday)
{
currentRiskUserHoliday.setCreateTime(DateUtils.getNowDate());
return currentRiskUserHolidayMapper.insertCurrentRiskUserHoliday(currentRiskUserHoliday);
}
/**
* 修改现状风险巡查用户请假
*
* @param currentRiskUserHoliday 现状风险巡查用户请假
* @return 结果
*/
@Override
public int updateCurrentRiskUserHoliday(CurrentRiskUserHoliday currentRiskUserHoliday)
{
currentRiskUserHoliday.setUpdateTime(DateUtils.getNowDate());
return currentRiskUserHolidayMapper.updateCurrentRiskUserHoliday(currentRiskUserHoliday);
}
/**
* 批量删除现状风险巡查用户请假
*
* @param ids 需要删除的现状风险巡查用户请假主键
* @return 结果
*/
@Override
public int deleteCurrentRiskUserHolidayByIds(Long[] ids)
{
return currentRiskUserHolidayMapper.deleteCurrentRiskUserHolidayByIds(ids);
}
/**
* 删除现状风险巡查用户请假信息
*
* @param id 现状风险巡查用户请假主键
* @return 结果
*/
@Override
public int deleteCurrentRiskUserHolidayById(Long id)
{
return currentRiskUserHolidayMapper.deleteCurrentRiskUserHolidayById(id);
}
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolDetailMapper;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail;
import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolDetailService;
import com.github.yulichang.base.MPJBaseServiceImpl;
/**
* 现状风险用户巡查明细Service业务层处理
*
* @author ruoyi
* @date 2023-12-05
*/
@Service
public class CurrentRiskUserPatrolDetailServiceImpl extends MPJBaseServiceImpl<CurrentRiskUserPatrolDetailMapper, CurrentRiskUserPatrolDetail> implements ICurrentRiskUserPatrolDetailService
{
@Autowired
private CurrentRiskUserPatrolDetailMapper currentRiskUserPatrolDetailMapper;
/**
* 查询现状风险用户巡查明细
*
* @param id 现状风险用户巡查明细主键
* @return 现状风险用户巡查明细
*/
@Override
public CurrentRiskUserPatrolDetail selectCurrentRiskUserPatrolDetailById(Long id)
{
return currentRiskUserPatrolDetailMapper.selectCurrentRiskUserPatrolDetailById(id);
}
/**
* 查询现状风险用户巡查明细列表
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 现状风险用户巡查明细
*/
@Override
public List<CurrentRiskUserPatrolDetail> selectCurrentRiskUserPatrolDetailList(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
{
return currentRiskUserPatrolDetailMapper.selectCurrentRiskUserPatrolDetailList(currentRiskUserPatrolDetail);
}
/**
* 新增现状风险用户巡查明细
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 结果
*/
@Override
public int insertCurrentRiskUserPatrolDetail(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
{
currentRiskUserPatrolDetail.setCreateTime(DateUtils.getNowDate());
return currentRiskUserPatrolDetailMapper.insertCurrentRiskUserPatrolDetail(currentRiskUserPatrolDetail);
}
/**
* 修改现状风险用户巡查明细
*
* @param currentRiskUserPatrolDetail 现状风险用户巡查明细
* @return 结果
*/
@Override
public int updateCurrentRiskUserPatrolDetail(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
{
currentRiskUserPatrolDetail.setUpdateTime(DateUtils.getNowDate());
return currentRiskUserPatrolDetailMapper.updateCurrentRiskUserPatrolDetail(currentRiskUserPatrolDetail);
}
/**
* 批量删除现状风险用户巡查明细
*
* @param ids 需要删除的现状风险用户巡查明细主键
* @return 结果
*/
@Override
public int deleteCurrentRiskUserPatrolDetailByIds(Long[] ids)
{
return currentRiskUserPatrolDetailMapper.deleteCurrentRiskUserPatrolDetailByIds(ids);
}
/**
* 删除现状风险用户巡查明细信息
*
* @param id 现状风险用户巡查明细主键
* @return 结果
*/
@Override
public int deleteCurrentRiskUserPatrolDetailById(Long id)
{
return currentRiskUserPatrolDetailMapper.deleteCurrentRiskUserPatrolDetailById(id);
}
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.service.ICurrentRiskUserPatrolService;
import com.github.yulichang.base.MPJBaseServiceImpl;
/**
* 巡查执行管理Service业务层处理
*
* @author baode
* @date 2023-12-05
*/
@Service
public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<CurrentRiskUserPatrolMapper, CurrentRiskUserPatrol> implements ICurrentRiskUserPatrolService
{
@Autowired
private CurrentRiskUserPatrolMapper currentRiskUserPatrolMapper;
/**
* 查询巡查执行管理
*
* @param id 巡查执行管理主键
* @return 巡查执行管理
*/
@Override
public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id)
{
return currentRiskUserPatrolMapper.selectCurrentRiskUserPatrolById(id);
}
/**
* 查询巡查执行管理列表
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 巡查执行管理
*/
@Override
public List<CurrentRiskUserPatrol> selectCurrentRiskUserPatrolList(CurrentRiskUserPatrol currentRiskUserPatrol)
{
return currentRiskUserPatrolMapper.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
}
/**
* 新增巡查执行管理
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 结果
*/
@Override
public int insertCurrentRiskUserPatrol(CurrentRiskUserPatrol currentRiskUserPatrol)
{
currentRiskUserPatrol.setCreateTime(DateUtils.getNowDate());
return currentRiskUserPatrolMapper.insertCurrentRiskUserPatrol(currentRiskUserPatrol);
}
/**
* 修改巡查执行管理
*
* @param currentRiskUserPatrol 巡查执行管理
* @return 结果
*/
@Override
public int updateCurrentRiskUserPatrol(CurrentRiskUserPatrol currentRiskUserPatrol)
{
currentRiskUserPatrol.setUpdateTime(DateUtils.getNowDate());
return currentRiskUserPatrolMapper.updateCurrentRiskUserPatrol(currentRiskUserPatrol);
}
/**
* 批量删除巡查执行管理
*
* @param ids 需要删除的巡查执行管理主键
* @return 结果
*/
@Override
public int deleteCurrentRiskUserPatrolByIds(Long[] ids)
{
return currentRiskUserPatrolMapper.deleteCurrentRiskUserPatrolByIds(ids);
}
/**
* 删除巡查执行管理信息
*
* @param id 巡查执行管理主键
* @return 结果
*/
@Override
public int deleteCurrentRiskUserPatrolById(Long id)
{
return currentRiskUserPatrolMapper.deleteCurrentRiskUserPatrolById(id);
}
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.censoft.censoftrongtong.mapper.ProjectUserPostMapper;
import com.censoft.censoftrongtong.domain.ProjectUserPost;
import com.censoft.censoftrongtong.service.IProjectUserPostService;
import com.github.yulichang.base.MPJBaseServiceImpl;
/**
* 项目用户岗位关系Service业务层处理
*
* @author ruoyi
* @date 2023-11-30
*/
@Service
public class ProjectUserPostServiceImpl extends MPJBaseServiceImpl<ProjectUserPostMapper, ProjectUserPost> implements IProjectUserPostService
{
@Autowired
private ProjectUserPostMapper projectUserPostMapper;
/**
* 查询项目用户岗位关系
*
* @param id 项目用户岗位关系主键
* @return 项目用户岗位关系
*/
@Override
public ProjectUserPost selectProjectUserPostById(Long id)
{
return projectUserPostMapper.selectProjectUserPostById(id);
}
/**
* 查询项目用户岗位关系列表
*
* @param projectUserPost 项目用户岗位关系
* @return 项目用户岗位关系
*/
@Override
public List<ProjectUserPost> selectProjectUserPostList(ProjectUserPost projectUserPost)
{
return projectUserPostMapper.selectProjectUserPostList(projectUserPost);
}
/**
* 新增项目用户岗位关系
*
* @param projectUserPost 项目用户岗位关系
* @return 结果
*/
@Override
public int insertProjectUserPost(ProjectUserPost projectUserPost)
{
return projectUserPostMapper.insertProjectUserPost(projectUserPost);
}
/**
* 修改项目用户岗位关系
*
* @param projectUserPost 项目用户岗位关系
* @return 结果
*/
@Override
public int updateProjectUserPost(ProjectUserPost projectUserPost)
{
return projectUserPostMapper.updateProjectUserPost(projectUserPost);
}
/**
* 批量删除项目用户岗位关系
*
* @param ids 需要删除的项目用户岗位关系主键
* @return 结果
*/
@Override
public int deleteProjectUserPostByIds(Long[] ids)
{
return projectUserPostMapper.deleteProjectUserPostByIds(ids);
}
/**
* 删除项目用户岗位关系信息
*
* @param id 项目用户岗位关系主键
* @return 结果
*/
@Override
public int deleteProjectUserPostById(Long id)
{
return projectUserPostMapper.deleteProjectUserPostById(id);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskPostListMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskPostList" id="CurrentRiskPostListResult">
<result property="id" column="id" />
<result property="projectId" column="project_id" />
<result property="postId" column="post_id" />
<result property="userId" column="user_id" />
<result property="currentRiskId" column="current_risk_id" />
<result property="patrolType" column="patrol_type" />
<result property="sortNum" column="sort_num" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="currentRiskType" column="currentRiskType" />
<result property="currentRiskId2" column="current_risk_id2" />
<result property="currentRiskType2" column="currentRiskType2" />
<result property="nickName" column="nick_name" />
</resultMap>
<sql id="selectCurrentRiskPostListVo">
select id, project_id, post_id, user_id, current_risk_id, patrol_type, sort_num, del_flag, create_by, create_time, update_by, update_time, remark from current_risk_post_list
</sql>
<select id="selectCurrentRiskPostListList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPostList" resultMap="CurrentRiskPostListResult">
SELECT
a.id,
a.project_id,
a.post_id,
a.user_id,
a.current_risk_id,
a.patrol_type,
a.sort_num,
a.del_flag,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
b.type currentRiskType
FROM
current_risk_post_list a
LEFT JOIN risk_plan_existing_list b on a.current_risk_id = b.id
<where>
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="postId != null "> and a.post_id = #{postId}</if>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="currentRiskId != null "> and a.current_risk_id = #{currentRiskId}</if>
<if test="patrolType != null and patrolType != ''"> and a.patrol_type = #{patrolType}</if>
<if test="sortNum != null "> and a.sort_num = #{sortNum}</if>
</where>
GROUP BY a.current_risk_id
</select>
<select id="selectCurrentRiskPostListList2" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPostList" resultMap="CurrentRiskPostListResult">
SELECT
a.id,
a.project_id,
a.post_id,
a.user_id,
a.current_risk_id,
a.patrol_type,
a.sort_num,
a.del_flag,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
c.nick_name,
GROUP_CONCAT(a.current_risk_id) current_risk_id2,
GROUP_CONCAT(DISTINCT b.type)currentRiskType2
FROM
current_risk_post_list a
LEFT JOIN risk_plan_existing_list b on a.current_risk_id = b.id
LEFT JOIN sys_user c on a.user_id = c.user_id
<where>
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="postId != null "> and a.post_id = #{postId}</if>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="currentRiskId != null "> and a.current_risk_id = #{currentRiskId}</if>
<if test="patrolType != null and patrolType != ''"> and a.patrol_type = #{patrolType}</if>
</where>
GROUP BY a.user_id
</select>
<select id="selectCurrentRiskPostListById" parameterType="Long" resultMap="CurrentRiskPostListResult">
<include refid="selectCurrentRiskPostListVo"/>
where id = #{id}
</select>
<insert id="insertCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPostList" useGeneratedKeys="true" keyProperty="id">
insert into current_risk_post_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectId != null">project_id,</if>
<if test="postId != null">post_id,</if>
<if test="userId != null">user_id,</if>
<if test="currentRiskId != null">current_risk_id,</if>
<if test="patrolType != null">patrol_type,</if>
<if test="sortNum != null">sort_num,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectId != null">#{projectId},</if>
<if test="postId != null">#{postId},</if>
<if test="userId != null">#{userId},</if>
<if test="currentRiskId != null">#{currentRiskId},</if>
<if test="patrolType != null">#{patrolType},</if>
<if test="sortNum != null">#{sortNum},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPostList">
update current_risk_post_list
<trim prefix="SET" suffixOverrides=",">
<if test="projectId != null">project_id = #{projectId},</if>
<if test="postId != null">post_id = #{postId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="currentRiskId != null">current_risk_id = #{currentRiskId},</if>
<if test="patrolType != null">patrol_type = #{patrolType},</if>
<if test="sortNum != null">sort_num = #{sortNum},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCurrentRiskPostListById" parameterType="Long">
delete from current_risk_post_list where id = #{id}
</delete>
<delete id="deleteCurrentRiskPostListByIds" parameterType="String">
delete from current_risk_post_list where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskPostMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskPost" id="CurrentRiskPostResult">
<result property="id" column="id"/>
<result property="projectId" column="project_id"/>
<result property="riskPostCode" column="risk_post_code"/>
<result property="riskPostName" column="risk_post_name"/>
<result property="patrolType" column="patrol_type"/>
<result property="riskPostDesc" column="risk_post_desc"/>
<result property="userId" column="user_id"/>
<result property="sortNum" column="sort_num"/>
<result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="nickName" column="nickName"/>
</resultMap>
<sql id="selectCurrentRiskPostVo">
select id,
project_id,
risk_post_code,
risk_post_name,
patrol_type,
risk_post_desc,
user_id,
sort_num,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark
from current_risk_post
</sql>
<select id="selectCurrentRiskPostList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost"
resultMap="CurrentRiskPostResult">
SELECT
a.id,
project_id,
risk_post_code,
risk_post_name,
patrol_type,
risk_post_desc,
a.user_id,
sort_num,
a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
GROUP_CONCAT(b.nick_name) nickName
FROM
current_risk_post a
LEFT JOIN sys_user b on FIND_IN_SET(b.user_id,a.user_id)
<where>
<if test="projectId != null ">and project_id = #{projectId}</if>
<if test="riskPostCode != null and riskPostCode != ''">and risk_post_code = #{riskPostCode}</if>
<if test="riskPostName != null and riskPostName != ''">and risk_post_name like concat('%', #{riskPostName},
'%')
</if>
<if test="patrolType != null and patrolType != ''">and patrol_type = #{patrolType}</if>
<if test="riskPostDesc != null and riskPostDesc != ''">and risk_post_desc = #{riskPostDesc}</if>
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
<if test="sortNum != null ">and sort_num = #{sortNum}</if>
</where>
group by a.id
</select>
<select id="selectCurrentRiskPostById" parameterType="Long" resultMap="CurrentRiskPostResult">
<include refid="selectCurrentRiskPostVo"/>
where id = #{id}
</select>
<insert id="insertCurrentRiskPost" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost" useGeneratedKeys="true" keyProperty="id">
insert into current_risk_post
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="projectId != null">project_id,</if>
<if test="riskPostCode != null">risk_post_code,</if>
<if test="riskPostName != null">risk_post_name,</if>
<if test="patrolType != null">patrol_type,</if>
<if test="riskPostDesc != null">risk_post_desc,</if>
<if test="userId != null">user_id,</if>
<if test="sortNum != null">sort_num,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="projectId != null">#{projectId},</if>
<if test="riskPostCode != null">#{riskPostCode},</if>
<if test="riskPostName != null">#{riskPostName},</if>
<if test="patrolType != null">#{patrolType},</if>
<if test="riskPostDesc != null">#{riskPostDesc},</if>
<if test="userId != null">#{userId},</if>
<if test="sortNum != null">#{sortNum},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateCurrentRiskPost" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPost">
update current_risk_post
<trim prefix="SET" suffixOverrides=",">
<if test="projectId != null">project_id = #{projectId},</if>
<if test="riskPostCode != null">risk_post_code = #{riskPostCode},</if>
<if test="riskPostName != null">risk_post_name = #{riskPostName},</if>
<if test="patrolType != null">patrol_type = #{patrolType},</if>
<if test="riskPostDesc != null">risk_post_desc = #{riskPostDesc},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="sortNum != null">sort_num = #{sortNum},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCurrentRiskPostById" parameterType="Long">
delete
from current_risk_post
where id = #{id}
</delete>
<delete id="deleteCurrentRiskPostByIds" parameterType="String">
delete from current_risk_post where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskUserHolidayMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday" id="CurrentRiskUserHolidayResult">
<result property="id" column="id" />
<result property="applyUserId" column="apply_user_id" />
<result property="approveUserId" column="approve_user_id" />
<result property="applyTime" column="apply_time" />
<result property="approveTime" column="approve_time" />
<result property="holidayTime" column="holiday_time" />
<result property="reason" column="reason" />
<result property="approveMsg" column="approve_msg" />
<result property="status" column="status" />
<result property="sortNum" column="sort_num" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectCurrentRiskUserHolidayVo">
select id, apply_user_id, approve_user_id, apply_time, approve_time, holiday_time, reason, approve_msg, status, sort_num, del_flag, create_by, create_time, update_by, update_time, remark from current_risk_user_holiday
</sql>
<select id="selectCurrentRiskUserHolidayList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday" resultMap="CurrentRiskUserHolidayResult">
<include refid="selectCurrentRiskUserHolidayVo"/>
<where>
<if test="applyUserId != null "> and apply_user_id = #{applyUserId}</if>
<if test="approveUserId != null "> and approve_user_id = #{approveUserId}</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="approveTime != null "> and approve_time = #{approveTime}</if>
<if test="holidayTime != null "> and holiday_time = #{holidayTime}</if>
<if test="reason != null and reason != ''"> and reason = #{reason}</if>
<if test="approveMsg != null and approveMsg != ''"> and approve_msg = #{approveMsg}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="sortNum != null "> and sort_num = #{sortNum}</if>
</where>
</select>
<select id="selectCurrentRiskUserHolidayById" parameterType="Long" resultMap="CurrentRiskUserHolidayResult">
<include refid="selectCurrentRiskUserHolidayVo"/>
where id = #{id}
</select>
<insert id="insertCurrentRiskUserHoliday" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday" useGeneratedKeys="true" keyProperty="id">
insert into current_risk_user_holiday
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyUserId != null">apply_user_id,</if>
<if test="approveUserId != null">approve_user_id,</if>
<if test="applyTime != null">apply_time,</if>
<if test="approveTime != null">approve_time,</if>
<if test="holidayTime != null">holiday_time,</if>
<if test="reason != null">reason,</if>
<if test="approveMsg != null">approve_msg,</if>
<if test="status != null">status,</if>
<if test="sortNum != null">sort_num,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyUserId != null">#{applyUserId},</if>
<if test="approveUserId != null">#{approveUserId},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="approveTime != null">#{approveTime},</if>
<if test="holidayTime != null">#{holidayTime},</if>
<if test="reason != null">#{reason},</if>
<if test="approveMsg != null">#{approveMsg},</if>
<if test="status != null">#{status},</if>
<if test="sortNum != null">#{sortNum},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateCurrentRiskUserHoliday" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserHoliday">
update current_risk_user_holiday
<trim prefix="SET" suffixOverrides=",">
<if test="applyUserId != null">apply_user_id = #{applyUserId},</if>
<if test="approveUserId != null">approve_user_id = #{approveUserId},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="approveTime != null">approve_time = #{approveTime},</if>
<if test="holidayTime != null">holiday_time = #{holidayTime},</if>
<if test="reason != null">reason = #{reason},</if>
<if test="approveMsg != null">approve_msg = #{approveMsg},</if>
<if test="status != null">status = #{status},</if>
<if test="sortNum != null">sort_num = #{sortNum},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCurrentRiskUserHolidayById" parameterType="Long">
delete from current_risk_user_holiday where id = #{id}
</delete>
<delete id="deleteCurrentRiskUserHolidayByIds" parameterType="String">
delete from current_risk_user_holiday where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolDetailMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail" id="CurrentRiskUserPatrolDetailResult">
<result property="id" column="id" />
<result property="patrolId" column="patrol_id" />
<result property="currentRiskId" column="current_risk_id" />
<result property="status" column="status" />
<result property="sortNum" column="sort_num" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="riskSourceType" column="riskSourceType" />
</resultMap>
<sql id="selectCurrentRiskUserPatrolDetailVo">
select id, patrol_id, current_risk_id, status, sort_num, del_flag, create_by, create_time, update_by, update_time, remark from current_risk_user_patrol_detail
</sql>
<select id="selectCurrentRiskUserPatrolDetailList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail" resultMap="CurrentRiskUserPatrolDetailResult">
SELECT
a.id,
a.patrol_id,
a.current_risk_id,
a.STATUS,
a.sort_num,
a.del_flag,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
c.type riskSourceType
FROM
current_risk_user_patrol_detail a
INNER JOIN current_risk_user_patrol b ON a.patrol_id = b.id
INNER JOIN risk_plan_existing_list c ON a.current_risk_id = c.id
<where>
<if test="riskPostId != null "> and b.risk_post_id = #{riskPostId}</if>
<if test="userId != null "> and b.user_id = #{userId}</if>
<if test="patrolId != null "> and a.patrol_id = #{patrolId}</if>
<if test="currentRiskId != null "> and a.current_risk_id = #{currentRiskId}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="sortNum != null "> and a.sort_num = #{sortNum}</if>
</where>
</select>
<select id="selectCurrentRiskUserPatrolDetailById" parameterType="Long" resultMap="CurrentRiskUserPatrolDetailResult">
<include refid="selectCurrentRiskUserPatrolDetailVo"/>
where id = #{id}
</select>
<insert id="insertCurrentRiskUserPatrolDetail" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail" useGeneratedKeys="true" keyProperty="id">
insert into current_risk_user_patrol_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patrolId != null">patrol_id,</if>
<if test="currentRiskId != null">current_risk_id,</if>
<if test="status != null">status,</if>
<if test="sortNum != null">sort_num,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patrolId != null">#{patrolId},</if>
<if test="currentRiskId != null">#{currentRiskId},</if>
<if test="status != null">#{status},</if>
<if test="sortNum != null">#{sortNum},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateCurrentRiskUserPatrolDetail" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrolDetail">
update current_risk_user_patrol_detail
<trim prefix="SET" suffixOverrides=",">
<if test="patrolId != null">patrol_id = #{patrolId},</if>
<if test="currentRiskId != null">current_risk_id = #{currentRiskId},</if>
<if test="status != null">status = #{status},</if>
<if test="sortNum != null">sort_num = #{sortNum},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCurrentRiskUserPatrolDetailById" parameterType="Long">
delete from current_risk_user_patrol_detail where id = #{id}
</delete>
<delete id="deleteCurrentRiskUserPatrolDetailByIds" parameterType="String">
delete from current_risk_user_patrol_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol" id="CurrentRiskUserPatrolResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="projectId" column="project_id" />
<result property="riskPostId" column="risk_post_id" />
<result property="patrolType" column="patrol_type" />
<result property="status" column="status" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="sortNum" column="sort_num" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="riskPostName" column="risk_post_name" />
<result property="nickName" column="nick_name" />
<result property="validityTime" column="validity_time" />
</resultMap>
<sql id="selectCurrentRiskUserPatrolVo">
select a.id, user_id, project_id, risk_post_id, patrol_type, status, start_time, end_time, sort_num, a.validity_time,
del_flag, create_by, create_time, update_by, update_time, remark from current_risk_user_patrol a
</sql>
<select id="selectCurrentRiskUserPatrolList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol" resultMap="CurrentRiskUserPatrolResult">
SELECT
a.id,
a.user_id,
a.project_id,
a.risk_post_id,
a.patrol_type,
a.STATUS,
a.start_time,
a.end_time,
a.sort_num,
a.del_flag,
a.create_by,
a.create_time,
a.validity_time,
a.update_by,
a.update_time,
a.remark,
b.risk_post_name,
c.nick_name
FROM
current_risk_user_patrol a
LEFT JOIN current_risk_post b on a.risk_post_id = b.id
LEFT JOIN sys_user c on a.user_id = c.user_id
<where>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="riskPostId != null "> and a.risk_post_id = #{riskPostId}</if>
<if test="patrolType != null "> and a.patrol_type = #{patrolType}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="startTime != null "> and a.start_time = #{startTime}</if>
<if test="endTime != null "> and a.end_time = #{endTime}</if>
<if test="sortNum != null "> and a.sort_num = #{sortNum}</if>
</where>
</select>
<select id="selectCurrentRiskUserPatrolById" parameterType="Long" resultMap="CurrentRiskUserPatrolResult">
<include refid="selectCurrentRiskUserPatrolVo"/>
where id = #{id}
</select>
<insert id="insertCurrentRiskUserPatrol" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol" useGeneratedKeys="true" keyProperty="id">
insert into current_risk_user_patrol
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="projectId != null">project_id,</if>
<if test="riskPostId != null">risk_post_id,</if>
<if test="patrolType != null">patrol_type,</if>
<if test="status != null">status,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="sortNum != null">sort_num,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="validityTime != null">validity_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="projectId != null">#{projectId},</if>
<if test="riskPostId != null">#{riskPostId},</if>
<if test="patrolType != null">#{patrolType},</if>
<if test="status != null">#{status},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="sortNum != null">#{sortNum},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="validityTime != null">#{validityTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateCurrentRiskUserPatrol" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol">
update current_risk_user_patrol
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="projectId != null">project_id = #{projectId},</if>
<if test="riskPostId != null">risk_post_id = #{riskPostId},</if>
<if test="patrolType != null">patrol_type = #{patrolType},</if>
<if test="status != null">status = #{status},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="sortNum != null">sort_num = #{sortNum},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCurrentRiskUserPatrolById" parameterType="Long">
delete from current_risk_user_patrol where id = #{id}
</delete>
<delete id="deleteCurrentRiskUserPatrolByIds" parameterType="String">
delete from current_risk_user_patrol where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.ProjectUserPostMapper">
<resultMap type="com.censoft.censoftrongtong.domain.ProjectUserPost" id="ProjectUserPostResult">
<result property="id" column="id" />
<result property="projectId" column="project_id" />
<result property="userId" column="user_id" />
<result property="postId" column="post_id" />
<result property="projectName" column="project_name" />
<result property="projectType" column="project_type" />
<result property="projectAddress" column="project_address" />
<result property="nickName" column="nick_name" />
</resultMap>
<sql id="selectProjectUserPostVo">
select id, project_id, user_id, post_id from project_user_post
</sql>
<select id="selectProjectUserPostList" parameterType="com.censoft.censoftrongtong.domain.ProjectUserPost" resultMap="ProjectUserPostResult">
SELECT
a.id,
project_id,
b.`name` project_name,
b.type project_type,
b.address project_address,
a.user_id,
post_id,
c.nick_name
FROM
project_user_post a
LEFT JOIN ledger_project b on a.project_id = b.id
LEFT JOIN sys_user c on a.user_id = c.user_id
<where>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="postId != null "> and post_id = #{postId}</if>
<if test="projectName != null "> and b.`name` like concat('%',#{projectName},'%')</if>
</where>
</select>
<select id="selectProjectUserPostById" parameterType="Long" resultMap="ProjectUserPostResult">
<include refid="selectProjectUserPostVo"/>
where id = #{id}
</select>
<insert id="insertProjectUserPost" parameterType="com.censoft.censoftrongtong.domain.ProjectUserPost">
insert into project_user_post
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="projectId != null">project_id,</if>
<if test="userId != null">user_id,</if>
<if test="postId != null">post_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="projectId != null">#{projectId},</if>
<if test="userId != null">#{userId},</if>
<if test="postId != null">#{postId},</if>
</trim>
</insert>
<update id="updateProjectUserPost" parameterType="com.censoft.censoftrongtong.domain.ProjectUserPost">
update project_user_post
<trim prefix="SET" suffixOverrides=",">
<if test="projectId != null">project_id = #{projectId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="postId != null">post_id = #{postId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteProjectUserPostById" parameterType="Long">
delete from project_user_post where id = #{id}
</delete>
<delete id="deleteProjectUserPostByIds" parameterType="String">
delete from project_user_post where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -89,11 +89,50 @@ public class SysUser extends BaseEntity
/** 角色ID */
private Long roleId;
private String projectId;
private String postId;
private String postName;
private String projectUserPostId;
public String getProjectUserPostId() {
return projectUserPostId;
}
public void setProjectUserPostId(String projectUserPostId) {
this.projectUserPostId = projectUserPostId;
}
public SysUser()
{
}
public String getPostId() {
return postId;
}
public void setPostId(String postId) {
this.postId = postId;
}
public String getPostName() {
return postName;
}
public void setPostName(String postName) {
this.postName = postName;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public SysUser(Long userId)
{
this.userId = userId;
......
......@@ -23,6 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="postId" column="post_id" />
<result property="postName" column="post_name" />
<result property="projectUserPostId" column="projectUserPostId" />
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap>
......@@ -57,8 +60,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status,
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_name, d.leader
<if test="projectId != null and projectId != ''">
, b.post_id,b.post_name,a.id projectUserPostId
</if>
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
<if test="projectId != null and projectId != ''">
LEFT JOIN project_user_post a on a.user_id = u.user_id and a.project_id = #{projectId}
LEFT JOIN sys_post b on a.post_id = b.post_id
</if>
where u.del_flag = '0'
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment