diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/controller/WfProcessActivityController.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/controller/WfProcessActivityController.java new file mode 100644 index 0000000..d10dd58 --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/controller/WfProcessActivityController.java @@ -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 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 list = wfProcessActivityService.selectWfProcessActivityList(wfProcessActivity); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/controller/WfProcessController.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/controller/WfProcessController.java new file mode 100644 index 0000000..746862d --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/controller/WfProcessController.java @@ -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 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 list = wfProcessService.selectWfProcessList(wfProcess); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcess.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcess.java new file mode 100644 index 0000000..9c53994 --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcess.java @@ -0,0 +1,98 @@ +package com.hw.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.hw.common.core.annotation.Excel; +import com.hw.common.core.web.domain.BaseEntity; + +/** + * 工单流程对象 wf_process + * + * @author xins + * @date 2024-01-19 + */ +public class WfProcess extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 工单处理流程id */ + private Long wfProcessId; + + /** 工单处理名称 */ + @Excel(name = "工单处理名称") + private String wfProcessName; + + /** 工单处理类型(1质检异常) */ + @Excel(name = "工单处理类型(1质检异常)") + private String wfProcessType; + + /** 流程时限(单位:s) */ + @Excel(name = "流程时限(单位:s)") + private Long timeLimit; + + /** 流程状态(1启用2禁用) */ + @Excel(name = "流程状态", readConverterExp = "1=启用2禁用") + private String processStatus; + + public void setWfProcessId(Long wfProcessId) + { + this.wfProcessId = wfProcessId; + } + + public Long getWfProcessId() + { + return wfProcessId; + } + public void setWfProcessName(String wfProcessName) + { + this.wfProcessName = wfProcessName; + } + + public String getWfProcessName() + { + return wfProcessName; + } + public void setWfProcessType(String wfProcessType) + { + this.wfProcessType = wfProcessType; + } + + public String getWfProcessType() + { + return wfProcessType; + } + public void setTimeLimit(Long timeLimit) + { + this.timeLimit = timeLimit; + } + + public Long getTimeLimit() + { + return timeLimit; + } + public void setProcessStatus(String processStatus) + { + this.processStatus = processStatus; + } + + public String getProcessStatus() + { + return processStatus; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("wfProcessId", getWfProcessId()) + .append("wfProcessName", getWfProcessName()) + .append("wfProcessType", getWfProcessType()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("timeLimit", getTimeLimit()) + .append("processStatus", getProcessStatus()) + .toString(); + } +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcessActivity.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcessActivity.java new file mode 100644 index 0000000..2951a4a --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcessActivity.java @@ -0,0 +1,211 @@ +package com.hw.system.domain; + +import java.util.List; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.hw.common.core.annotation.Excel; +import com.hw.common.core.web.domain.BaseEntity; + +/** + * 工单流程节点步骤对象 wf_process_activity + * + * @author xins + * @date 2024-01-19 + */ +public class WfProcessActivity extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 工单流程节点ID */ + private Long processActivityId; + + /** 工单流程id,关联wf_process的wf_process_id */ + @Excel(name = "工单流程id,关联wf_process的wf_process_id") + private Long wfProcessId; + + /** 工单流程节点名称 */ + @Excel(name = "工单流程节点名称") + private String processActivityName; + + /** 工单流程节点顺序 */ + @Excel(name = "工单流程节点顺序") + private Long processActivityOrder; + + /** 执行类型(0自动节点,1人工节点);暂时只支持人工节点 */ + @Excel(name = "执行类型", readConverterExp = "0=自动节点,1人工节点") + private String wfActivityType; + + /** 是否邮件通知(1是,0否) */ + @Excel(name = "是否邮件通知", readConverterExp = "1=是,0否") + private String emailNotice; + + /** 是否微信公众号(1是,0否) */ + @Excel(name = "是否微信公众号", readConverterExp = "1=是,0否") + private String wechatOfficalNotice; + + /** 是否企业微信通知(1是,0否) */ + @Excel(name = "是否企业微信通知", readConverterExp = "1=是,0否") + private String wecomNotice; + + /** 是否短信通知(1是,0否) */ + @Excel(name = "是否短信通知", readConverterExp = "1=是,0否") + private String smsNotice; + + /** 是否钉钉通知(1是,0否) */ + @Excel(name = "是否钉钉通知", readConverterExp = "1=是,0否") + private String dingtalkNotice; + + /** 时限(单位:s) */ + @Excel(name = "时限(单位:s)") + private Long timeLimit; + + /** 是否需要协助(1是,0否) */ + @Excel(name = "是否需要协助", readConverterExp = "1=是,0否") + private String isAssist; + + /** 工单流程节点步骤权限信息 */ + private List wfProcessActivityAuthList; + + public void setProcessActivityId(Long processActivityId) + { + this.processActivityId = processActivityId; + } + + public Long getProcessActivityId() + { + return processActivityId; + } + public void setWfProcessId(Long wfProcessId) + { + this.wfProcessId = wfProcessId; + } + + public Long getWfProcessId() + { + return wfProcessId; + } + public void setProcessActivityName(String processActivityName) + { + this.processActivityName = processActivityName; + } + + public String getProcessActivityName() + { + return processActivityName; + } + public void setProcessActivityOrder(Long processActivityOrder) + { + this.processActivityOrder = processActivityOrder; + } + + public Long getProcessActivityOrder() + { + return processActivityOrder; + } + public void setWfActivityType(String wfActivityType) + { + this.wfActivityType = wfActivityType; + } + + public String getWfActivityType() + { + return wfActivityType; + } + public void setEmailNotice(String emailNotice) + { + this.emailNotice = emailNotice; + } + + public String getEmailNotice() + { + return emailNotice; + } + public void setWechatOfficalNotice(String wechatOfficalNotice) + { + this.wechatOfficalNotice = wechatOfficalNotice; + } + + public String getWechatOfficalNotice() + { + return wechatOfficalNotice; + } + public void setWecomNotice(String wecomNotice) + { + this.wecomNotice = wecomNotice; + } + + public String getWecomNotice() + { + return wecomNotice; + } + public void setSmsNotice(String smsNotice) + { + this.smsNotice = smsNotice; + } + + public String getSmsNotice() + { + return smsNotice; + } + public void setDingtalkNotice(String dingtalkNotice) + { + this.dingtalkNotice = dingtalkNotice; + } + + public String getDingtalkNotice() + { + return dingtalkNotice; + } + public void setTimeLimit(Long timeLimit) + { + this.timeLimit = timeLimit; + } + + public Long getTimeLimit() + { + return timeLimit; + } + public void setIsAssist(String isAssist) + { + this.isAssist = isAssist; + } + + public String getIsAssist() + { + return isAssist; + } + + public List getWfProcessActivityAuthList() + { + return wfProcessActivityAuthList; + } + + public void setWfProcessActivityAuthList(List wfProcessActivityAuthList) + { + this.wfProcessActivityAuthList = wfProcessActivityAuthList; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("processActivityId", getProcessActivityId()) + .append("wfProcessId", getWfProcessId()) + .append("processActivityName", getProcessActivityName()) + .append("processActivityOrder", getProcessActivityOrder()) + .append("wfActivityType", getWfActivityType()) + .append("emailNotice", getEmailNotice()) + .append("wechatOfficalNotice", getWechatOfficalNotice()) + .append("wecomNotice", getWecomNotice()) + .append("smsNotice", getSmsNotice()) + .append("dingtalkNotice", getDingtalkNotice()) + .append("timeLimit", getTimeLimit()) + .append("isAssist", getIsAssist()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("wfProcessActivityAuthList", getWfProcessActivityAuthList()) + .toString(); + } +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcessActivityAuth.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcessActivityAuth.java new file mode 100644 index 0000000..596afba --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/domain/WfProcessActivityAuth.java @@ -0,0 +1,83 @@ +package com.hw.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.hw.common.core.annotation.Excel; +import com.hw.common.core.web.domain.BaseEntity; + +/** + * 工单流程节点步骤权限对象 wf_process_activity_auth + * + * @author xins + * @date 2024-01-19 + */ +public class WfProcessActivityAuth extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 工单流程步骤权限ID */ + private Long processActivityAuthId; + + /** 工单流程节点步骤ID,关联wf_process_activity的process_activity_id */ + @Excel(name = "工单流程节点步骤ID,关联wf_process_activity的process_activity_id") + private Long processActivityId; + + /** 关联目标对象类型(1用户) */ + @Excel(name = "关联目标对象类型(1用户)") + private String authTargetType; + + /** 关联目标对象ID */ + @Excel(name = "关联目标对象ID") + private Long authTargetId; + + public void setProcessActivityAuthId(Long processActivityAuthId) + { + this.processActivityAuthId = processActivityAuthId; + } + + public Long getProcessActivityAuthId() + { + return processActivityAuthId; + } + public void setProcessActivityId(Long processActivityId) + { + this.processActivityId = processActivityId; + } + + public Long getProcessActivityId() + { + return processActivityId; + } + public void setAuthTargetType(String authTargetType) + { + this.authTargetType = authTargetType; + } + + public String getAuthTargetType() + { + return authTargetType; + } + public void setAuthTargetId(Long authTargetId) + { + this.authTargetId = authTargetId; + } + + public Long getAuthTargetId() + { + return authTargetId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("processActivityAuthId", getProcessActivityAuthId()) + .append("processActivityId", getProcessActivityId()) + .append("authTargetType", getAuthTargetType()) + .append("authTargetId", getAuthTargetId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/mapper/WfProcessActivityMapper.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/mapper/WfProcessActivityMapper.java new file mode 100644 index 0000000..82a8346 --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/mapper/WfProcessActivityMapper.java @@ -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 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 wfProcessActivityAuthList); + + + /** + * 通过工单流程节点步骤主键删除工单流程节点步骤权限信息 + * + * @param processActivityId 工单流程节点步骤ID + * @return 结果 + */ + public int deleteWfProcessActivityAuthByProcessActivityId(Long processActivityId); +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/mapper/WfProcessMapper.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/mapper/WfProcessMapper.java new file mode 100644 index 0000000..a59a82e --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/mapper/WfProcessMapper.java @@ -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 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); +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/service/IWfProcessActivityService.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/IWfProcessActivityService.java new file mode 100644 index 0000000..1ec41dc --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/IWfProcessActivityService.java @@ -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 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); +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/service/IWfProcessService.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/IWfProcessService.java new file mode 100644 index 0000000..1c94894 --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/IWfProcessService.java @@ -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 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); +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/WfProcessActivityServiceImpl.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/WfProcessActivityServiceImpl.java new file mode 100644 index 0000000..d2c4361 --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/WfProcessActivityServiceImpl.java @@ -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 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 wfProcessActivityAuthList = wfProcessActivity.getWfProcessActivityAuthList(); + Long processActivityId = wfProcessActivity.getProcessActivityId(); + if (StringUtils.isNotNull(wfProcessActivityAuthList)) + { + List list = new ArrayList(); + for (WfProcessActivityAuth wfProcessActivityAuth : wfProcessActivityAuthList) + { + wfProcessActivityAuth.setProcessActivityId(processActivityId); + list.add(wfProcessActivityAuth); + } + if (list.size() > 0) + { + wfProcessActivityMapper.batchWfProcessActivityAuth(list); + } + } + } +} diff --git a/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/WfProcessServiceImpl.java b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/WfProcessServiceImpl.java new file mode 100644 index 0000000..b3206d3 --- /dev/null +++ b/hw-modules/hw-system/src/main/java/com/hw/system/common/service/impl/WfProcessServiceImpl.java @@ -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 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); + } +} diff --git a/hw-modules/hw-system/src/main/resources/mapper/system/common/WfProcessActivityMapper.xml b/hw-modules/hw-system/src/main/resources/mapper/system/common/WfProcessActivityMapper.xml new file mode 100644 index 0000000..323e5de --- /dev/null +++ b/hw-modules/hw-system/src/main/resources/mapper/system/common/WfProcessActivityMapper.xml @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into wf_process_activity + + 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, + + + #{wfProcessId}, + #{processActivityName}, + #{processActivityOrder}, + #{wfActivityType}, + #{emailNotice}, + #{wechatOfficalNotice}, + #{wecomNotice}, + #{smsNotice}, + #{dingtalkNotice}, + #{timeLimit}, + #{isAssist}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update wf_process_activity + + wf_process_id = #{wfProcessId}, + process_activity_name = #{processActivityName}, + process_activity_order = #{processActivityOrder}, + wf_activity_type = #{wfActivityType}, + email_notice = #{emailNotice}, + wechat_offical_notice = #{wechatOfficalNotice}, + wecom_notice = #{wecomNotice}, + sms_notice = #{smsNotice}, + dingtalk_notice = #{dingtalkNotice}, + time_limit = #{timeLimit}, + is_assist = #{isAssist}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where process_activity_id = #{processActivityId} + + + + delete from wf_process_activity where process_activity_id = #{processActivityId} + + + + delete from wf_process_activity where process_activity_id in + + #{processActivityId} + + + + + delete from wf_process_activity_auth where process_activity_id in + + #{processActivityId} + + + + + delete from wf_process_activity_auth where process_activity_id = #{processActivityId} + + + + 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 + + ( #{item.processActivityAuthId}, #{item.processActivityId}, #{item.authTargetType}, #{item.authTargetId}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}) + + + \ No newline at end of file diff --git a/hw-modules/hw-system/src/main/resources/mapper/system/common/WfProcessMapper.xml b/hw-modules/hw-system/src/main/resources/mapper/system/common/WfProcessMapper.xml new file mode 100644 index 0000000..6b0c237 --- /dev/null +++ b/hw-modules/hw-system/src/main/resources/mapper/system/common/WfProcessMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into wf_process + + wf_process_name, + wf_process_type, + remark, + create_by, + create_time, + update_by, + update_time, + time_limit, + process_status, + + + #{wfProcessName}, + #{wfProcessType}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{timeLimit}, + #{processStatus}, + + + + + update wf_process + + wf_process_name = #{wfProcessName}, + wf_process_type = #{wfProcessType}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + time_limit = #{timeLimit}, + process_status = #{processStatus}, + + where wf_process_id = #{wfProcessId} + + + + delete from wf_process where wf_process_id = #{wfProcessId} + + + + delete from wf_process where wf_process_id in + + #{wfProcessId} + + + \ No newline at end of file diff --git a/hw-ui/src/api/system/common/wfprocess.js b/hw-ui/src/api/system/common/wfprocess.js new file mode 100644 index 0000000..55e363e --- /dev/null +++ b/hw-ui/src/api/system/common/wfprocess.js @@ -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' + }) +} diff --git a/hw-ui/src/views/dms/dmsBaseInspectProject/index.vue b/hw-ui/src/views/dms/dmsBaseInspectProject/index.vue index d6323be..2684b83 100644 --- a/hw-ui/src/views/dms/dmsBaseInspectProject/index.vue +++ b/hw-ui/src/views/dms/dmsBaseInspectProject/index.vue @@ -17,6 +17,21 @@ @keyup.enter.native="handleQuery" /> + + + + + @@ -108,11 +123,11 @@ - - - - - + + + @@ -159,15 +174,15 @@ - - - - - - - - - + + + {{dict.label}} + + @@ -200,7 +215,6 @@ export default { dicts:['dms_inspect_type'], data() { return { - inspectType:'', // 遮罩层 loading: true, // 选中数组 @@ -254,16 +268,7 @@ export default { methods: { /** 查询巡检项目信息列表 */ getList() { - if (this.$route.path=='/dms/inspect/dmsBaseInspectProject') - { - this.queryParams.inspectType =1 - this.inspectType = 1 - } - else - { - this.queryParams.inspectType = 2 - this.inspectType= 2 - } + this.loading = true; listDmsBaseInspectProject(this.queryParams).then(response => { this.dmsBaseInspectProjectList = response.rows; @@ -333,14 +338,12 @@ export default { this.$refs["form"].validate(valid => { if (valid) { if (this.form.inspectProjectId != null) { - this.form.inspectType = this.inspectType updateDmsBaseInspectProject(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { - this.form.inspectType = this.inspectType addDmsBaseInspectProject(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; diff --git a/hw-ui/src/views/dms/dmsBaseInspectRoute/index.vue b/hw-ui/src/views/dms/dmsBaseInspectRoute/index.vue index 5992924..c37a62c 100644 --- a/hw-ui/src/views/dms/dmsBaseInspectRoute/index.vue +++ b/hw-ui/src/views/dms/dmsBaseInspectRoute/index.vue @@ -17,6 +17,21 @@ @keyup.enter.native="handleQuery" /> + + + + + @@ -106,12 +121,17 @@ - - - - - - + + + + + + +