Merge remote-tracking branch 'origin/master'

1.2.6
夜笙歌 10 months ago
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,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();
}
}

@ -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<WfProcessActivityAuth> 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<WfProcessActivityAuth> getWfProcessActivityAuthList()
{
return wfProcessActivityAuthList;
}
public void setWfProcessActivityAuthList(List<WfProcessActivityAuth> 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();
}
}

@ -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();
}
}

@ -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'
})
}

@ -17,6 +17,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检查类型" prop="inspectType">
<el-select
v-model="queryParams.inspectType"
placeholder="检查类型"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="记录方式" prop="recordMethod">-->
<!-- <el-input-->
<!-- v-model="queryParams.recordMethod"-->
@ -108,11 +123,11 @@
<el-table-column label="项目编号" align="center" prop="inspectProjectCode" />
<el-table-column label="巡检项目" align="center" prop="inspectProject" />
<!-- <el-table-column label="检查类型(1巡检,2点检)" align="center" prop="inspectType" />-->
<!-- <el-table-column label="检查类型" align="center" prop="inspectType">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="检查类型" align="center" prop="inspectType">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>
</template>
</el-table-column>
<el-table-column label="记录方式" align="center" prop="recordMethod" />
<el-table-column label="上限" align="center" prop="upLimit" />
<el-table-column label="下限" align="center" prop="lowLimit" />
@ -159,15 +174,15 @@
<el-form-item label="记录方式" prop="recordMethod">
<el-input v-model="form.recordMethod" placeholder="请输入记录方式" />
</el-form-item>
<!-- <el-form-item label="检查类型" prop="checkState">-->
<!-- <el-radio-group v-model="form.inspectType">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.dms_inspect_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.value"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="检查类型" prop="checkState">
<el-radio-group v-model="form.inspectType">
<el-radio
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="上限" prop="upLimit">
<el-input v-model="form.upLimit" placeholder="请输入上限" />
</el-form-item>
@ -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;

@ -17,6 +17,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检查类型" prop="inspectType">
<el-select
v-model="queryParams.inspectType"
placeholder="检查类型"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="循环周期" prop="cyclePeriod">-->
<!-- <el-input-->
<!-- v-model="queryParams.cyclePeriod"-->
@ -106,12 +121,17 @@
</el-table-column>
<el-table-column label="线路名称" align="center" prop="routeName" />
<!-- <el-table-column label="线路类型(1巡检,2点检)" align="center" prop="inspectType" />-->
<!-- <el-table-column label="线路类型" align="center" prop="inspectType">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="循环周期" align="center" prop="cyclePeriod" />
<el-table-column label="线路类型" align="center" prop="inspectType">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>
</template>
</el-table-column>
<!-- <el-table-column label="循环周期" align="center" prop="cyclePeriod" />-->
<el-table-column label="循环周期" align="center" prop="cyclePeriod">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_cycle_period" :value="scope.row.inspectType"/>
</template>
</el-table-column>
<!-- <el-table-column label="设备类型ID关联dms_base_device_type的device_type_id" align="center" prop="deviceTypeId" />-->
<el-table-column label="设备类型" align="center" prop="deviceTypeId" >
<template slot-scope="scope">
@ -164,8 +184,17 @@
<el-form-item label="线路名称" prop="routeName">
<el-input v-model="form.routeName" placeholder="请输入线路名称" />
</el-form-item>
<!-- <el-form-item label="循环周期" prop="cyclePeriod">-->
<!-- <el-input v-model="form.cyclePeriod" placeholder="请输入循环周期" />-->
<!-- </el-form-item>-->
<el-form-item label="循环周期" prop="cyclePeriod">
<el-input v-model="form.cyclePeriod" placeholder="请输入循环周期" />
<el-radio-group v-model="form.cyclePeriod">
<el-radio
v-for="dict in dict.type.dms_cycle_period"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="设备类型ID关联dms_base_device_type的device_type_id" prop="deviceTypeId">-->
<!-- <el-input v-model="form.deviceTypeId" placeholder="请输入设备类型ID关联dms_base_device_type的device_type_id" />-->
@ -180,15 +209,15 @@
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="线路类型" prop="checkState">-->
<!-- <el-radio-group v-model="form.inspectType">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.dms_inspect_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.value"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="线路类型" prop="checkState">
<el-radio-group v-model="form.inspectType">
<el-radio
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="是否标识1-是0-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是0-否" />-->
<!-- </el-form-item>-->
@ -210,7 +239,7 @@ import { listDevicetype } from '@/api/dms/devicetype'
export default {
name: "DmsBaseInspectRoute",
dicts:['dms_inspect_type'],
dicts:['dms_inspect_type','dms_cycle_period'],
data() {
return {
inspectType:'',
@ -276,16 +305,7 @@ export default {
},
/** 查询巡检线路信息列表 */
getList() {
if (this.$route.path=='/dms/inspect/dmsBaseInspectRoute')
{
this.queryParams.inspectType =1;
this.inspectType = 1;
}
else
{
this.queryParams.inspectType = 2
this.inspectType = 2;
}
this.loading = true;
listDmsBaseInspectRoute(this.queryParams).then(response => {
this.dmsBaseInspectRouteList = response.rows;
@ -353,14 +373,12 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.inspectRouteId != null) {
this.form.inspectType = this.inspectType;
updateDmsBaseInspectRoute(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.inspectType = this.inspectType;
addDmsBaseInspectRoute(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;

@ -261,14 +261,6 @@ export default {
},
/** 查询巡检标准信息列表 */
getList() {
// if (this.$route.path=='/dms/inspect/dmsBaseInspectStandard')
// {
// this.queryParams.inspectType =1
// }
// else
// {
// this.queryParams.inspectType = 2
// }
this.loading = true;
listDmsBaseInspectStandard(this.queryParams).then(response => {
this.dmsBaseInspectStandardList = response.rows;

@ -18,6 +18,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检查类型" prop="inspectType">
<el-select
v-model="queryParams.inspectType"
placeholder="检查类型"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="巡检线路ID关联dm_base_inspect_route的inspect_route_id" prop="inspectRouteId">-->
<!-- <el-input-->
<!-- v-model="queryParams.inspectRouteId"-->
@ -124,11 +139,11 @@
<el-table-column label="计划编号" align="center" prop="planInspectCode" />
<el-table-column label="计划名称" align="center" prop="planInspectName" />
<!-- <el-table-column label="检查类型(1巡检,2点检)" align="center" prop="inspectType" />-->
<!-- <el-table-column label="巡检类型" align="center" prop="inspectType">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="巡检类型" align="center" prop="inspectType">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>
</template>
</el-table-column>
<!-- <el-table-column label="巡检线路ID关联dm_base_inspect_route的inspect_route_id" align="center" prop="inspectRouteId" />-->
<el-table-column label="巡检线路" align="center" prop="inspectRouteId" >
<template slot-scope="scope">
@ -148,7 +163,12 @@
<span>{{ parseTime(scope.row.planTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环周期" align="center" prop="cyclePeriod" />
<!-- <el-table-column label="循环周期" align="center" prop="cyclePeriod" />-->
<el-table-column label="循环周期" align="center" prop="cyclePeriod">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_cycle_period" :value="scope.row.inspectType"/>
</template>
</el-table-column>
<el-table-column label="执行人员" align="center" prop="performer" />
<!-- <el-table-column label="是否标识1-是0-否" align="center" prop="isFlag" />-->
<el-table-column label="备注" align="center" prop="remark" />
@ -202,15 +222,15 @@
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="巡检类型" prop="checkState">-->
<!-- <el-radio-group v-model="form.inspectType">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.dms_inspect_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.value"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="巡检类型" prop="checkState">
<el-radio-group v-model="form.inspectType">
<el-radio
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="设备总数" prop="deviceAmount">
<el-input v-model="form.deviceAmount" placeholder="请输入设备总数" />
</el-form-item>
@ -222,8 +242,17 @@
placeholder="请选择计划巡检时间">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="循环周期" prop="cyclePeriod">-->
<!-- <el-input v-model="form.cyclePeriod" placeholder="请输入循环周期" />-->
<!-- </el-form-item>-->
<el-form-item label="循环周期" prop="cyclePeriod">
<el-input v-model="form.cyclePeriod" placeholder="请输入循环周期" />
<el-radio-group v-model="form.cyclePeriod">
<el-radio
v-for="dict in dict.type.dms_cycle_period"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="执行人员" prop="performer">
<el-input v-model="form.performer" placeholder="请输入执行人员" />
@ -249,10 +278,9 @@ import { listDmsBaseInspectRoute } from '@/api/dms/dmsBaseInspectRoute'
export default {
name: "DmsPlanInspect",
dicts:['dms_inspect_type'],
dicts:['dms_inspect_type','dms_cycle_period'],
data() {
return {
inspectType:'',
dmsBaseInspectRouteList:[],
//
loading: true,
@ -309,16 +337,6 @@ export default {
},
/** 查询巡检计划信息列表 */
getList() {
if (this.$route.path=='/dms/inspect/dmsPlanInspect')
{
this.queryParams.inspectType =1
this.inspectType = 1
}
else
{
this.queryParams.inspectType = 2
this.inspectType = 2
}
this.loading = true;
listDmsPlanInspect(this.queryParams).then(response => {
this.dmsPlanInspectList = response.rows;
@ -389,14 +407,12 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.planInspectId != null) {
this.form.inspectType = this.inspectType;
updateDmsPlanInspect(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.inspectType = this.inspectType;
addDmsPlanInspect(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;

@ -10,6 +10,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检查类型" prop="inspectType">
<el-select
v-model="queryParams.inspectType"
placeholder="检查类型"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="巡检线路,关联dms_base_inspect_route的inspect_route_id" prop="inspectRouteId">-->
<!-- <el-input-->
<!-- v-model="queryParams.inspectRouteId"-->
@ -132,11 +147,11 @@
<!-- <el-table-column label="主键标识" align="center" prop="recordInspectId" />-->
<el-table-column label="巡检单号" align="center" prop="billsInspectCode" />
<!-- <el-table-column label="检查类型(1巡检,2点检)" align="center" prop="inspectType" />-->
<!-- <el-table-column label="检查类型" align="center" prop="inspectType">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="检查类型" align="center" prop="inspectType">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_inspect_type" :value="scope.row.inspectType"/>
</template>
</el-table-column>
<!-- <el-table-column label="巡检线路,关联dms_base_inspect_route的inspect_route_id" align="center" prop="inspectRouteId" />-->
<el-table-column label="巡检线路" align="center" prop="inspectRouteId" >
<template slot-scope="scope">
@ -206,7 +221,7 @@
<!-- 添加或修改巡检记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="巡检单号" prop="billsInspectCode">
<el-input v-model="form.billsInspectCode" placeholder="请输入巡检单号" />
</el-form-item>
@ -253,15 +268,15 @@
<el-form-item label="执行人员" prop="performer">
<el-input v-model="form.performer" placeholder="请输入执行人员" />
</el-form-item>
<!-- <el-form-item label="线路类型" prop="checkState">-->
<!-- <el-radio-group v-model="form.inspectType">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.dms_inspect_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.value"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="线路类型" prop="checkState">
<el-radio-group v-model="form.inspectType">
<el-radio
v-for="dict in dict.type.dms_inspect_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="巡检状态" prop="checkState">
<el-radio-group v-model="form.inspectStatus">
<el-radio
@ -295,7 +310,7 @@ import { listDmsBaseInspectRoute } from '@/api/dms/dmsBaseInspectRoute'
export default {
name: "DmsRecordInspect",
dicts:['dms_inspect_type','dms_inspect_status'],
dicts:['dms_inspect_type','dms_inspect_status','dms_cycle_period'],
data() {
return {
inspectTypes:'',
@ -361,17 +376,16 @@ export default {
},
/** 查询巡检记录列表 */
getList() {
if (this.$route.path=='/dms/inspect/dmsRecordInspect')
{
this.queryParams.inspectType =1;
this.inspectTypes = 1;
}
else
{
this.inspectTypes = 2;
this.queryParams.inspectType = 2
}
console.log(this.$route)
// if (this.$route.path=='/dms/inspect/dmsRecordInspect')
// {
// this.queryParams.inspectType =1;
// this.inspectTypes = 1;
// }
// else
// {
// this.inspectTypes = 2;
// this.queryParams.inspectType = 2
// }
this.loading = true;
listDmsRecordInspect(this.queryParams).then(response => {
this.dmsRecordInspectList = response.rows;
@ -444,14 +458,12 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.recordInspectId != null) {
updateDmsRecordInspect(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.inspectType = this.inspectTypes;
addDmsRecordInspect(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;

@ -0,0 +1,283 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工单处理名称" prop="wfProcessName">
<el-input
v-model="queryParams.wfProcessName"
placeholder="请输入工单处理名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="流程时限(单位s)" prop="timeLimit">
<el-input
v-model="queryParams.timeLimit"
placeholder="请输入流程时限(单位s)"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:wfprocess:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:wfprocess:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:wfprocess:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:wfprocess:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="wfprocessList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工单处理流程id" align="center" prop="wfProcessId" />
<el-table-column label="工单处理名称" align="center" prop="wfProcessName" />
<el-table-column label="工单处理类型(1质检异常)" align="center" prop="wfProcessType" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="流程时限(单位s)" align="center" prop="timeLimit" />
<el-table-column label="流程状态" align="center" prop="processStatus" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:wfprocess:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:wfprocess:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改工单流程对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="工单处理名称" prop="wfProcessName">
<el-input v-model="form.wfProcessName" placeholder="请输入工单处理名称" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="流程时限(单位s)" prop="timeLimit">
<el-input v-model="form.timeLimit" placeholder="请输入流程时限(单位s)" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listWfprocess, getWfprocess, delWfprocess, addWfprocess, updateWfprocess } from "@/api/system/common/wfprocess";
export default {
name: "Wfprocess",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
wfprocessList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
wfProcessName: null,
wfProcessType: null,
timeLimit: null,
processStatus: null
},
//
form: {},
//
rules: {
wfProcessName: [
{ required: true, message: "工单处理名称不能为空", trigger: "blur" }
],
wfProcessType: [
{ required: true, message: "工单处理类型(1质检异常)不能为空", trigger: "change" }
],
processStatus: [
{ required: true, message: "流程状态不能为空", trigger: "change" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询工单流程列表 */
getList() {
this.loading = true;
listWfprocess(this.queryParams).then(response => {
this.wfprocessList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
wfProcessId: null,
wfProcessName: null,
wfProcessType: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
timeLimit: null,
processStatus: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.wfProcessId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工单流程";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const wfProcessId = row.wfProcessId || this.ids
getWfprocess(wfProcessId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改工单流程";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.wfProcessId != null) {
updateWfprocess(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addWfprocess(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const wfProcessIds = row.wfProcessId || this.ids;
this.$modal.confirm('是否确认删除工单流程编号为"' + wfProcessIds + '"的数据项?').then(function() {
return delWfprocess(wfProcessIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/wfprocess/export', {
...this.queryParams
}, `wfprocess_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save