Merge remote-tracking branch 'origin/master'
commit
ce1773f640
@ -0,0 +1,105 @@
|
||||
package com.hw.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.system.domain.WfProcessActivity;
|
||||
import com.hw.system.service.IWfProcessActivityService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 工单流程节点步骤Controller
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wfprocessactivity")
|
||||
public class WfProcessActivityController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWfProcessActivityService wfProcessActivityService;
|
||||
|
||||
/**
|
||||
* 查询工单流程节点步骤列表
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocessactivity:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
startPage();
|
||||
List<WfProcessActivity> list = wfProcessActivityService.selectWfProcessActivityList(wfProcessActivity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工单流程节点步骤列表
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocessactivity:export")
|
||||
@Log(title = "工单流程节点步骤", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
List<WfProcessActivity> list = wfProcessActivityService.selectWfProcessActivityList(wfProcessActivity);
|
||||
ExcelUtil<WfProcessActivity> util = new ExcelUtil<WfProcessActivity>(WfProcessActivity.class);
|
||||
util.exportExcel(response, list, "工单流程节点步骤数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工单流程节点步骤详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocessactivity:query")
|
||||
@GetMapping(value = "/{processActivityId}")
|
||||
public AjaxResult getInfo(@PathVariable("processActivityId") Long processActivityId)
|
||||
{
|
||||
return success(wfProcessActivityService.selectWfProcessActivityByProcessActivityId(processActivityId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单流程节点步骤
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocessactivity:add")
|
||||
@Log(title = "工单流程节点步骤", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
return toAjax(wfProcessActivityService.insertWfProcessActivity(wfProcessActivity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工单流程节点步骤
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocessactivity:edit")
|
||||
@Log(title = "工单流程节点步骤", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
return toAjax(wfProcessActivityService.updateWfProcessActivity(wfProcessActivity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单流程节点步骤
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocessactivity:remove")
|
||||
@Log(title = "工单流程节点步骤", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{processActivityIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] processActivityIds)
|
||||
{
|
||||
return toAjax(wfProcessActivityService.deleteWfProcessActivityByProcessActivityIds(processActivityIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.hw.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.system.domain.WfProcess;
|
||||
import com.hw.system.service.IWfProcessService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 工单流程Controller
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wfprocess")
|
||||
public class WfProcessController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWfProcessService wfProcessService;
|
||||
|
||||
/**
|
||||
* 查询工单流程列表
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocess:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WfProcess wfProcess)
|
||||
{
|
||||
startPage();
|
||||
List<WfProcess> list = wfProcessService.selectWfProcessList(wfProcess);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工单流程列表
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocess:export")
|
||||
@Log(title = "工单流程", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WfProcess wfProcess)
|
||||
{
|
||||
List<WfProcess> list = wfProcessService.selectWfProcessList(wfProcess);
|
||||
ExcelUtil<WfProcess> util = new ExcelUtil<WfProcess>(WfProcess.class);
|
||||
util.exportExcel(response, list, "工单流程数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工单流程详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocess:query")
|
||||
@GetMapping(value = "/{wfProcessId}")
|
||||
public AjaxResult getInfo(@PathVariable("wfProcessId") Long wfProcessId)
|
||||
{
|
||||
return success(wfProcessService.selectWfProcessByWfProcessId(wfProcessId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单流程
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocess:add")
|
||||
@Log(title = "工单流程", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WfProcess wfProcess)
|
||||
{
|
||||
return toAjax(wfProcessService.insertWfProcess(wfProcess));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工单流程
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocess:edit")
|
||||
@Log(title = "工单流程", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WfProcess wfProcess)
|
||||
{
|
||||
return toAjax(wfProcessService.updateWfProcess(wfProcess));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单流程
|
||||
*/
|
||||
@RequiresPermissions("system:wfprocess:remove")
|
||||
@Log(title = "工单流程", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{wfProcessIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] wfProcessIds)
|
||||
{
|
||||
return toAjax(wfProcessService.deleteWfProcessByWfProcessIds(wfProcessIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.hw.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.system.domain.WfProcessActivity;
|
||||
import com.hw.system.domain.WfProcessActivityAuth;
|
||||
|
||||
/**
|
||||
* 工单流程节点步骤Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
public interface WfProcessActivityMapper
|
||||
{
|
||||
/**
|
||||
* 查询工单流程节点步骤
|
||||
*
|
||||
* @param processActivityId 工单流程节点步骤主键
|
||||
* @return 工单流程节点步骤
|
||||
*/
|
||||
public WfProcessActivity selectWfProcessActivityByProcessActivityId(Long processActivityId);
|
||||
|
||||
/**
|
||||
* 查询工单流程节点步骤列表
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 工单流程节点步骤集合
|
||||
*/
|
||||
public List<WfProcessActivity> selectWfProcessActivityList(WfProcessActivity wfProcessActivity);
|
||||
|
||||
/**
|
||||
* 新增工单流程节点步骤
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWfProcessActivity(WfProcessActivity wfProcessActivity);
|
||||
|
||||
/**
|
||||
* 修改工单流程节点步骤
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWfProcessActivity(WfProcessActivity wfProcessActivity);
|
||||
|
||||
/**
|
||||
* 删除工单流程节点步骤
|
||||
*
|
||||
* @param processActivityId 工单流程节点步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessActivityByProcessActivityId(Long processActivityId);
|
||||
|
||||
/**
|
||||
* 批量删除工单流程节点步骤
|
||||
*
|
||||
* @param processActivityIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessActivityByProcessActivityIds(Long[] processActivityIds);
|
||||
|
||||
/**
|
||||
* 批量删除工单流程节点步骤权限
|
||||
*
|
||||
* @param processActivityIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessActivityAuthByProcessActivityIds(Long[] processActivityIds);
|
||||
|
||||
/**
|
||||
* 批量新增工单流程节点步骤权限
|
||||
*
|
||||
* @param wfProcessActivityAuthList 工单流程节点步骤权限列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchWfProcessActivityAuth(List<WfProcessActivityAuth> wfProcessActivityAuthList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过工单流程节点步骤主键删除工单流程节点步骤权限信息
|
||||
*
|
||||
* @param processActivityId 工单流程节点步骤ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessActivityAuthByProcessActivityId(Long processActivityId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.system.domain.WfProcess;
|
||||
|
||||
/**
|
||||
* 工单流程Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
public interface WfProcessMapper
|
||||
{
|
||||
/**
|
||||
* 查询工单流程
|
||||
*
|
||||
* @param wfProcessId 工单流程主键
|
||||
* @return 工单流程
|
||||
*/
|
||||
public WfProcess selectWfProcessByWfProcessId(Long wfProcessId);
|
||||
|
||||
/**
|
||||
* 查询工单流程列表
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 工单流程集合
|
||||
*/
|
||||
public List<WfProcess> selectWfProcessList(WfProcess wfProcess);
|
||||
|
||||
/**
|
||||
* 新增工单流程
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWfProcess(WfProcess wfProcess);
|
||||
|
||||
/**
|
||||
* 修改工单流程
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWfProcess(WfProcess wfProcess);
|
||||
|
||||
/**
|
||||
* 删除工单流程
|
||||
*
|
||||
* @param wfProcessId 工单流程主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessByWfProcessId(Long wfProcessId);
|
||||
|
||||
/**
|
||||
* 批量删除工单流程
|
||||
*
|
||||
* @param wfProcessIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessByWfProcessIds(Long[] wfProcessIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.system.domain.WfProcessActivity;
|
||||
|
||||
/**
|
||||
* 工单流程节点步骤Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
public interface IWfProcessActivityService
|
||||
{
|
||||
/**
|
||||
* 查询工单流程节点步骤
|
||||
*
|
||||
* @param processActivityId 工单流程节点步骤主键
|
||||
* @return 工单流程节点步骤
|
||||
*/
|
||||
public WfProcessActivity selectWfProcessActivityByProcessActivityId(Long processActivityId);
|
||||
|
||||
/**
|
||||
* 查询工单流程节点步骤列表
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 工单流程节点步骤集合
|
||||
*/
|
||||
public List<WfProcessActivity> selectWfProcessActivityList(WfProcessActivity wfProcessActivity);
|
||||
|
||||
/**
|
||||
* 新增工单流程节点步骤
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWfProcessActivity(WfProcessActivity wfProcessActivity);
|
||||
|
||||
/**
|
||||
* 修改工单流程节点步骤
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWfProcessActivity(WfProcessActivity wfProcessActivity);
|
||||
|
||||
/**
|
||||
* 批量删除工单流程节点步骤
|
||||
*
|
||||
* @param processActivityIds 需要删除的工单流程节点步骤主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessActivityByProcessActivityIds(Long[] processActivityIds);
|
||||
|
||||
/**
|
||||
* 删除工单流程节点步骤信息
|
||||
*
|
||||
* @param processActivityId 工单流程节点步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessActivityByProcessActivityId(Long processActivityId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.system.domain.WfProcess;
|
||||
|
||||
/**
|
||||
* 工单流程Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
public interface IWfProcessService
|
||||
{
|
||||
/**
|
||||
* 查询工单流程
|
||||
*
|
||||
* @param wfProcessId 工单流程主键
|
||||
* @return 工单流程
|
||||
*/
|
||||
public WfProcess selectWfProcessByWfProcessId(Long wfProcessId);
|
||||
|
||||
/**
|
||||
* 查询工单流程列表
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 工单流程集合
|
||||
*/
|
||||
public List<WfProcess> selectWfProcessList(WfProcess wfProcess);
|
||||
|
||||
/**
|
||||
* 新增工单流程
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWfProcess(WfProcess wfProcess);
|
||||
|
||||
/**
|
||||
* 修改工单流程
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWfProcess(WfProcess wfProcess);
|
||||
|
||||
/**
|
||||
* 批量删除工单流程
|
||||
*
|
||||
* @param wfProcessIds 需要删除的工单流程主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessByWfProcessIds(Long[] wfProcessIds);
|
||||
|
||||
/**
|
||||
* 删除工单流程信息
|
||||
*
|
||||
* @param wfProcessId 工单流程主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWfProcessByWfProcessId(Long wfProcessId);
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package com.hw.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.hw.common.core.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.hw.system.domain.WfProcessActivityAuth;
|
||||
import com.hw.system.mapper.WfProcessActivityMapper;
|
||||
import com.hw.system.domain.WfProcessActivity;
|
||||
import com.hw.system.service.IWfProcessActivityService;
|
||||
|
||||
/**
|
||||
* 工单流程节点步骤Service业务层处理
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
@Service
|
||||
public class WfProcessActivityServiceImpl implements IWfProcessActivityService
|
||||
{
|
||||
@Autowired
|
||||
private WfProcessActivityMapper wfProcessActivityMapper;
|
||||
|
||||
/**
|
||||
* 查询工单流程节点步骤
|
||||
*
|
||||
* @param processActivityId 工单流程节点步骤主键
|
||||
* @return 工单流程节点步骤
|
||||
*/
|
||||
@Override
|
||||
public WfProcessActivity selectWfProcessActivityByProcessActivityId(Long processActivityId)
|
||||
{
|
||||
return wfProcessActivityMapper.selectWfProcessActivityByProcessActivityId(processActivityId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单流程节点步骤列表
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 工单流程节点步骤
|
||||
*/
|
||||
@Override
|
||||
public List<WfProcessActivity> selectWfProcessActivityList(WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
return wfProcessActivityMapper.selectWfProcessActivityList(wfProcessActivity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单流程节点步骤
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertWfProcessActivity(WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
wfProcessActivity.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = wfProcessActivityMapper.insertWfProcessActivity(wfProcessActivity);
|
||||
insertWfProcessActivityAuth(wfProcessActivity);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工单流程节点步骤
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateWfProcessActivity(WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
wfProcessActivity.setUpdateTime(DateUtils.getNowDate());
|
||||
wfProcessActivityMapper.deleteWfProcessActivityAuthByProcessActivityId(wfProcessActivity.getProcessActivityId());
|
||||
insertWfProcessActivityAuth(wfProcessActivity);
|
||||
return wfProcessActivityMapper.updateWfProcessActivity(wfProcessActivity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工单流程节点步骤
|
||||
*
|
||||
* @param processActivityIds 需要删除的工单流程节点步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteWfProcessActivityByProcessActivityIds(Long[] processActivityIds)
|
||||
{
|
||||
wfProcessActivityMapper.deleteWfProcessActivityAuthByProcessActivityIds(processActivityIds);
|
||||
return wfProcessActivityMapper.deleteWfProcessActivityByProcessActivityIds(processActivityIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单流程节点步骤信息
|
||||
*
|
||||
* @param processActivityId 工单流程节点步骤主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteWfProcessActivityByProcessActivityId(Long processActivityId)
|
||||
{
|
||||
wfProcessActivityMapper.deleteWfProcessActivityAuthByProcessActivityId(processActivityId);
|
||||
return wfProcessActivityMapper.deleteWfProcessActivityByProcessActivityId(processActivityId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单流程节点步骤权限信息
|
||||
*
|
||||
* @param wfProcessActivity 工单流程节点步骤对象
|
||||
*/
|
||||
public void insertWfProcessActivityAuth(WfProcessActivity wfProcessActivity)
|
||||
{
|
||||
List<WfProcessActivityAuth> wfProcessActivityAuthList = wfProcessActivity.getWfProcessActivityAuthList();
|
||||
Long processActivityId = wfProcessActivity.getProcessActivityId();
|
||||
if (StringUtils.isNotNull(wfProcessActivityAuthList))
|
||||
{
|
||||
List<WfProcessActivityAuth> list = new ArrayList<WfProcessActivityAuth>();
|
||||
for (WfProcessActivityAuth wfProcessActivityAuth : wfProcessActivityAuthList)
|
||||
{
|
||||
wfProcessActivityAuth.setProcessActivityId(processActivityId);
|
||||
list.add(wfProcessActivityAuth);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
wfProcessActivityMapper.batchWfProcessActivityAuth(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.hw.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.system.mapper.WfProcessMapper;
|
||||
import com.hw.system.domain.WfProcess;
|
||||
import com.hw.system.service.IWfProcessService;
|
||||
|
||||
/**
|
||||
* 工单流程Service业务层处理
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-01-19
|
||||
*/
|
||||
@Service
|
||||
public class WfProcessServiceImpl implements IWfProcessService
|
||||
{
|
||||
@Autowired
|
||||
private WfProcessMapper wfProcessMapper;
|
||||
|
||||
/**
|
||||
* 查询工单流程
|
||||
*
|
||||
* @param wfProcessId 工单流程主键
|
||||
* @return 工单流程
|
||||
*/
|
||||
@Override
|
||||
public WfProcess selectWfProcessByWfProcessId(Long wfProcessId)
|
||||
{
|
||||
return wfProcessMapper.selectWfProcessByWfProcessId(wfProcessId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单流程列表
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 工单流程
|
||||
*/
|
||||
@Override
|
||||
public List<WfProcess> selectWfProcessList(WfProcess wfProcess)
|
||||
{
|
||||
return wfProcessMapper.selectWfProcessList(wfProcess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单流程
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWfProcess(WfProcess wfProcess)
|
||||
{
|
||||
wfProcess.setCreateTime(DateUtils.getNowDate());
|
||||
return wfProcessMapper.insertWfProcess(wfProcess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工单流程
|
||||
*
|
||||
* @param wfProcess 工单流程
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWfProcess(WfProcess wfProcess)
|
||||
{
|
||||
wfProcess.setUpdateTime(DateUtils.getNowDate());
|
||||
return wfProcessMapper.updateWfProcess(wfProcess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工单流程
|
||||
*
|
||||
* @param wfProcessIds 需要删除的工单流程主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWfProcessByWfProcessIds(Long[] wfProcessIds)
|
||||
{
|
||||
return wfProcessMapper.deleteWfProcessByWfProcessIds(wfProcessIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单流程信息
|
||||
*
|
||||
* @param wfProcessId 工单流程主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWfProcessByWfProcessId(Long wfProcessId)
|
||||
{
|
||||
return wfProcessMapper.deleteWfProcessByWfProcessId(wfProcessId);
|
||||
}
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
<?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.hw.system.mapper.WfProcessActivityMapper">
|
||||
|
||||
<resultMap type="WfProcessActivity" id="WfProcessActivityResult">
|
||||
<result property="processActivityId" column="process_activity_id" />
|
||||
<result property="wfProcessId" column="wf_process_id" />
|
||||
<result property="processActivityName" column="process_activity_name" />
|
||||
<result property="processActivityOrder" column="process_activity_order" />
|
||||
<result property="wfActivityType" column="wf_activity_type" />
|
||||
<result property="emailNotice" column="email_notice" />
|
||||
<result property="wechatOfficalNotice" column="wechat_offical_notice" />
|
||||
<result property="wecomNotice" column="wecom_notice" />
|
||||
<result property="smsNotice" column="sms_notice" />
|
||||
<result property="dingtalkNotice" column="dingtalk_notice" />
|
||||
<result property="timeLimit" column="time_limit" />
|
||||
<result property="isAssist" column="is_assist" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="WfProcessActivityWfProcessActivityAuthResult" type="WfProcessActivity" extends="WfProcessActivityResult">
|
||||
<collection property="wfProcessActivityAuthList" notNullColumn="sub_process_activity_auth_id" javaType="java.util.List" resultMap="WfProcessActivityAuthResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="WfProcessActivityAuth" id="WfProcessActivityAuthResult">
|
||||
<result property="processActivityAuthId" column="sub_process_activity_auth_id" />
|
||||
<result property="processActivityId" column="sub_process_activity_id" />
|
||||
<result property="authTargetType" column="sub_auth_target_type" />
|
||||
<result property="authTargetId" column="sub_auth_target_id" />
|
||||
<result property="createBy" column="sub_create_by" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="updateBy" column="sub_update_by" />
|
||||
<result property="updateTime" column="sub_update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWfProcessActivityVo">
|
||||
select process_activity_id, wf_process_id, process_activity_name, process_activity_order, wf_activity_type, email_notice, wechat_offical_notice, wecom_notice, sms_notice, dingtalk_notice, time_limit, is_assist, remark, create_by, create_time, update_by, update_time from wf_process_activity
|
||||
</sql>
|
||||
|
||||
<select id="selectWfProcessActivityList" parameterType="WfProcessActivity" resultMap="WfProcessActivityResult">
|
||||
<include refid="selectWfProcessActivityVo"/>
|
||||
<where>
|
||||
<if test="wfProcessId != null "> and wf_process_id = #{wfProcessId}</if>
|
||||
<if test="processActivityName != null and processActivityName != ''"> and process_activity_name like concat('%', #{processActivityName}, '%')</if>
|
||||
<if test="processActivityOrder != null "> and process_activity_order = #{processActivityOrder}</if>
|
||||
<if test="wfActivityType != null and wfActivityType != ''"> and wf_activity_type = #{wfActivityType}</if>
|
||||
<if test="emailNotice != null and emailNotice != ''"> and email_notice = #{emailNotice}</if>
|
||||
<if test="wechatOfficalNotice != null and wechatOfficalNotice != ''"> and wechat_offical_notice = #{wechatOfficalNotice}</if>
|
||||
<if test="wecomNotice != null and wecomNotice != ''"> and wecom_notice = #{wecomNotice}</if>
|
||||
<if test="smsNotice != null and smsNotice != ''"> and sms_notice = #{smsNotice}</if>
|
||||
<if test="dingtalkNotice != null and dingtalkNotice != ''"> and dingtalk_notice = #{dingtalkNotice}</if>
|
||||
<if test="timeLimit != null "> and time_limit = #{timeLimit}</if>
|
||||
<if test="isAssist != null and isAssist != ''"> and is_assist = #{isAssist}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWfProcessActivityByProcessActivityId" parameterType="Long" resultMap="WfProcessActivityWfProcessActivityAuthResult">
|
||||
select a.process_activity_id, a.wf_process_id, a.process_activity_name, a.process_activity_order, a.wf_activity_type, a.email_notice, a.wechat_offical_notice, a.wecom_notice, a.sms_notice, a.dingtalk_notice, a.time_limit, a.is_assist, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,
|
||||
b.process_activity_auth_id as sub_process_activity_auth_id, b.process_activity_id as sub_process_activity_id, b.auth_target_type as sub_auth_target_type, b.auth_target_id as sub_auth_target_id, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time
|
||||
from wf_process_activity a
|
||||
left join wf_process_activity_auth b on b.process_activity_id = a.process_activity_id
|
||||
where a.process_activity_id = #{processActivityId}
|
||||
</select>
|
||||
|
||||
<insert id="insertWfProcessActivity" parameterType="WfProcessActivity" useGeneratedKeys="true" keyProperty="processActivityId">
|
||||
insert into wf_process_activity
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wfProcessId != null">wf_process_id,</if>
|
||||
<if test="processActivityName != null and processActivityName != ''">process_activity_name,</if>
|
||||
<if test="processActivityOrder != null">process_activity_order,</if>
|
||||
<if test="wfActivityType != null and wfActivityType != ''">wf_activity_type,</if>
|
||||
<if test="emailNotice != null">email_notice,</if>
|
||||
<if test="wechatOfficalNotice != null">wechat_offical_notice,</if>
|
||||
<if test="wecomNotice != null">wecom_notice,</if>
|
||||
<if test="smsNotice != null">sms_notice,</if>
|
||||
<if test="dingtalkNotice != null">dingtalk_notice,</if>
|
||||
<if test="timeLimit != null">time_limit,</if>
|
||||
<if test="isAssist != null">is_assist,</if>
|
||||
<if test="remark != null">remark,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wfProcessId != null">#{wfProcessId},</if>
|
||||
<if test="processActivityName != null and processActivityName != ''">#{processActivityName},</if>
|
||||
<if test="processActivityOrder != null">#{processActivityOrder},</if>
|
||||
<if test="wfActivityType != null and wfActivityType != ''">#{wfActivityType},</if>
|
||||
<if test="emailNotice != null">#{emailNotice},</if>
|
||||
<if test="wechatOfficalNotice != null">#{wechatOfficalNotice},</if>
|
||||
<if test="wecomNotice != null">#{wecomNotice},</if>
|
||||
<if test="smsNotice != null">#{smsNotice},</if>
|
||||
<if test="dingtalkNotice != null">#{dingtalkNotice},</if>
|
||||
<if test="timeLimit != null">#{timeLimit},</if>
|
||||
<if test="isAssist != null">#{isAssist},</if>
|
||||
<if test="remark != null">#{remark},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWfProcessActivity" parameterType="WfProcessActivity">
|
||||
update wf_process_activity
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wfProcessId != null">wf_process_id = #{wfProcessId},</if>
|
||||
<if test="processActivityName != null and processActivityName != ''">process_activity_name = #{processActivityName},</if>
|
||||
<if test="processActivityOrder != null">process_activity_order = #{processActivityOrder},</if>
|
||||
<if test="wfActivityType != null and wfActivityType != ''">wf_activity_type = #{wfActivityType},</if>
|
||||
<if test="emailNotice != null">email_notice = #{emailNotice},</if>
|
||||
<if test="wechatOfficalNotice != null">wechat_offical_notice = #{wechatOfficalNotice},</if>
|
||||
<if test="wecomNotice != null">wecom_notice = #{wecomNotice},</if>
|
||||
<if test="smsNotice != null">sms_notice = #{smsNotice},</if>
|
||||
<if test="dingtalkNotice != null">dingtalk_notice = #{dingtalkNotice},</if>
|
||||
<if test="timeLimit != null">time_limit = #{timeLimit},</if>
|
||||
<if test="isAssist != null">is_assist = #{isAssist},</if>
|
||||
<if test="remark != null">remark = #{remark},</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>
|
||||
</trim>
|
||||
where process_activity_id = #{processActivityId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWfProcessActivityByProcessActivityId" parameterType="Long">
|
||||
delete from wf_process_activity where process_activity_id = #{processActivityId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWfProcessActivityByProcessActivityIds" parameterType="String">
|
||||
delete from wf_process_activity where process_activity_id in
|
||||
<foreach item="processActivityId" collection="array" open="(" separator="," close=")">
|
||||
#{processActivityId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWfProcessActivityAuthByProcessActivityIds" parameterType="String">
|
||||
delete from wf_process_activity_auth where process_activity_id in
|
||||
<foreach item="processActivityId" collection="array" open="(" separator="," close=")">
|
||||
#{processActivityId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWfProcessActivityAuthByProcessActivityId" parameterType="Long">
|
||||
delete from wf_process_activity_auth where process_activity_id = #{processActivityId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchWfProcessActivityAuth">
|
||||
insert into wf_process_activity_auth( process_activity_auth_id, process_activity_id, auth_target_type, auth_target_id, create_by, create_time, update_by, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.processActivityAuthId}, #{item.processActivityId}, #{item.authTargetType}, #{item.authTargetId}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,91 @@
|
||||
<?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.hw.system.mapper.WfProcessMapper">
|
||||
|
||||
<resultMap type="WfProcess" id="WfProcessResult">
|
||||
<result property="wfProcessId" column="wf_process_id" />
|
||||
<result property="wfProcessName" column="wf_process_name" />
|
||||
<result property="wfProcessType" column="wf_process_type" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="timeLimit" column="time_limit" />
|
||||
<result property="processStatus" column="process_status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWfProcessVo">
|
||||
select wf_process_id, wf_process_name, wf_process_type, remark, create_by, create_time, update_by, update_time, time_limit, process_status from wf_process
|
||||
</sql>
|
||||
|
||||
<select id="selectWfProcessList" parameterType="WfProcess" resultMap="WfProcessResult">
|
||||
<include refid="selectWfProcessVo"/>
|
||||
<where>
|
||||
<if test="wfProcessName != null and wfProcessName != ''"> and wf_process_name like concat('%', #{wfProcessName}, '%')</if>
|
||||
<if test="wfProcessType != null and wfProcessType != ''"> and wf_process_type = #{wfProcessType}</if>
|
||||
<if test="timeLimit != null "> and time_limit = #{timeLimit}</if>
|
||||
<if test="processStatus != null and processStatus != ''"> and process_status = #{processStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWfProcessByWfProcessId" parameterType="Long" resultMap="WfProcessResult">
|
||||
<include refid="selectWfProcessVo"/>
|
||||
where wf_process_id = #{wfProcessId}
|
||||
</select>
|
||||
|
||||
<insert id="insertWfProcess" parameterType="WfProcess" useGeneratedKeys="true" keyProperty="wfProcessId">
|
||||
insert into wf_process
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wfProcessName != null and wfProcessName != ''">wf_process_name,</if>
|
||||
<if test="wfProcessType != null and wfProcessType != ''">wf_process_type,</if>
|
||||
<if test="remark != null">remark,</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="timeLimit != null">time_limit,</if>
|
||||
<if test="processStatus != null and processStatus != ''">process_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wfProcessName != null and wfProcessName != ''">#{wfProcessName},</if>
|
||||
<if test="wfProcessType != null and wfProcessType != ''">#{wfProcessType},</if>
|
||||
<if test="remark != null">#{remark},</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="timeLimit != null">#{timeLimit},</if>
|
||||
<if test="processStatus != null and processStatus != ''">#{processStatus},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWfProcess" parameterType="WfProcess">
|
||||
update wf_process
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wfProcessName != null and wfProcessName != ''">wf_process_name = #{wfProcessName},</if>
|
||||
<if test="wfProcessType != null and wfProcessType != ''">wf_process_type = #{wfProcessType},</if>
|
||||
<if test="remark != null">remark = #{remark},</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="timeLimit != null">time_limit = #{timeLimit},</if>
|
||||
<if test="processStatus != null and processStatus != ''">process_status = #{processStatus},</if>
|
||||
</trim>
|
||||
where wf_process_id = #{wfProcessId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWfProcessByWfProcessId" parameterType="Long">
|
||||
delete from wf_process where wf_process_id = #{wfProcessId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWfProcessByWfProcessIds" parameterType="String">
|
||||
delete from wf_process where wf_process_id in
|
||||
<foreach item="wfProcessId" collection="array" open="(" separator="," close=")">
|
||||
#{wfProcessId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询工单流程列表
|
||||
export function listWfprocess(query) {
|
||||
return request({
|
||||
url: '/system/wfprocess/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工单流程详细
|
||||
export function getWfprocess(wfProcessId) {
|
||||
return request({
|
||||
url: '/system/wfprocess/' + wfProcessId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增工单流程
|
||||
export function addWfprocess(data) {
|
||||
return request({
|
||||
url: '/system/wfprocess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工单流程
|
||||
export function updateWfprocess(data) {
|
||||
return request({
|
||||
url: '/system/wfprocess',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工单流程
|
||||
export function delWfprocess(wfProcessId) {
|
||||
return request({
|
||||
url: '/system/wfprocess/' + wfProcessId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue