报修工单文件上传、pda报修接口

master
zhouhy 11 months ago
parent 0cdc576679
commit 3b66195f8c

@ -25,5 +25,8 @@ public interface RemoteDmsService {
@PostMapping("/dmsBillsLubeInstance/autoAdd")
R<?> getDmsBillsLube(@RequestHeader(SecurityConstants.FROM_SOURCE) String source,String planInspectId);
@PostMapping("/dmsBillsMaintInstance/autoAdd")
R<?> getDmsBillsMaintInstance(@RequestHeader(SecurityConstants.FROM_SOURCE) String source,String dmsBillsMaintId);
}

@ -29,6 +29,11 @@ public class RemoteDmsFallbackFactory implements FallbackFactory<RemoteDmsServic
public R<?> getDmsBillsLube(String source, String planInspectId) {
return null;
}
@Override
public R<?> getDmsBillsMaintInstance(String source, String dmsBillsMaintId) {
return null;
}
};
}
}

@ -20,4 +20,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
public interface RemoteSysCommonService {
@GetMapping("/wfprocessactivity/list")
R<?> selectWfProcessActivity(@RequestHeader(SecurityConstants.INNER) String source, WfProcessActivity wfProcessActivity);
@PostMapping("/wfprocessactivity/selectProcessActivityIdByWfProcessId")
Long selectProcessActivityIdByWfProcessId(@RequestHeader(SecurityConstants.FROM_SOURCE) String source, Long wfProcessId);
}

@ -18,6 +18,10 @@ public class WfProcessActivity extends BaseEntity
{
private static final long serialVersionUID = 1L;
public WfProcessActivity() {
}
/** 工单流程节点ID */
private Long processActivityId;

@ -1,9 +1,18 @@
package com.hw.system.api.factory;
import com.hw.common.core.domain.R;
import com.hw.system.api.RemoteSysCommonService;
import com.hw.system.api.RemoteUserService;
import com.hw.system.api.domain.SysUser;
import com.hw.system.api.domain.common.WfProcessActivity;
import com.hw.system.api.model.LoginUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.rmi.Remote;
/**
*
*
@ -13,8 +22,25 @@ import org.springframework.stereotype.Component;
public class RemoteSysCommonFallbackFactory implements FallbackFactory<RemoteSysCommonService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class);
@Override
public RemoteSysCommonService create(Throwable cause) {
return null;
public RemoteSysCommonService create(Throwable throwable) {
log.error("用户服务调用失败:{}", throwable.getMessage());
return new RemoteSysCommonService(){
@Override
public R<?> selectWfProcessActivity(String source, WfProcessActivity wfProcessActivity) {
return null;
}
@Override
public Long selectProcessActivityIdByWfProcessId(String source, Long wfProcessId) {
return null;
}
};
}
}

@ -7,53 +7,57 @@
<version>3.6.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>hw-auth</artifactId>
<description>
hw-auth认证授权中心
</description>
<dependencies>
<!-- SpringCloud Alibaba Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- SpringBoot Actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- RuoYi Common Security-->
<dependency>
<groupId>com.hw</groupId>
<artifactId>hw-common-security</artifactId>
</dependency>
<dependency>
<groupId>com.hw</groupId>
<artifactId>hw-api-mes</artifactId>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
@ -70,5 +74,5 @@
</plugin>
</plugins>
</build>
</project>

@ -3,6 +3,7 @@ package com.hw.auth.controller;
import javax.servlet.http.HttpServletRequest;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.mes.api.RemoteMesService;
import com.hw.mes.api.domain.MesBaseStationInfo;
import org.springframework.beans.factory.annotation.Autowired;

@ -0,0 +1,84 @@
package com.hw.dms.controller;
import com.hw.common.core.web.controller.BaseController;
import com.hw.common.core.web.domain.AjaxResult;
import com.hw.dms.domain.*;
import com.hw.dms.service.*;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @ClassName : DmsApiController
* @Description : zhouhy
* @Author :
* @Date: 2024-02-29 16:45
*/
@RestController
@RequestMapping("/api")
public class DmsApiController extends BaseController {
@Autowired
private IDmsBillsFaultInstanceService dmsBillsFaultInstanceService;
@Autowired
private IDmsRepairInstanceService dmsRepairInstanceService;
@Autowired
private IDmsBillsInspectInstanceService dmsBillsInspectInstanceService;
@Autowired
private IDmsBillsMaintInstanceService dmsBillsMaintInstanceService;
@Autowired
private IDmsBillsLubeInstanceService dmsBillsLubeInstanceService;
//APS-MyPuRz3G6HfBYcH8dw7Y2ai1D6iZRmXX apifox令牌
/**
* PDA-
*
*
* faultSourceType
* faultSourceId
* faultType
* faultDescription
* designOperations
* id deviceId
* repairType
* id outsrcId()
* imgUrl()
* */
@PostMapping("/PDAFault")
@ResponseBody
public AjaxResult PDAFault(@RequestBody DmsBillsFaultInstance dmsBillsFaultInstance){
return toAjax(dmsBillsFaultInstanceService.insertDmsBillsFaultInstance(dmsBillsFaultInstance));
}
/**
* PDA-
* */
@PostMapping("/PDARepair")
@ResponseBody
public AjaxResult PDARepair(@RequestBody DmsRepairInstance dmsRepairInstance){
return toAjax(dmsRepairInstanceService.insertDmsRepairInstance(dmsRepairInstance));
}
/**
* PDA-
* */
@PostMapping("/PDAInspect")
@ResponseBody
public AjaxResult PDAInspect(@RequestBody DmsBillsInspectInstance dmsBillsInspectInstance){
return toAjax(dmsBillsInspectInstanceService.insertDmsBillsInspectInstance(dmsBillsInspectInstance));
}
/**
* PDA-
* */
@PostMapping("/PDAMaint")
@ResponseBody
public AjaxResult PDAMaint(@RequestBody DmsBillsMaintInstance dmsBillsMaintInstance){
return toAjax(dmsBillsMaintInstanceService.insertDmsBillsMaintInstance(dmsBillsMaintInstance));
}
/**
* PDA-
* */
@PostMapping("/PDALube")
@ResponseBody
public AjaxResult PDALube(@RequestBody DmsBillsLubeInstance dmsBillsLubeInstance){
return toAjax(dmsBillsLubeInstanceService.insertDmsBillsLubeInstance(dmsBillsLubeInstance));
}
}

@ -108,6 +108,7 @@ public class DmsBillsLubeInstanceController extends BaseController
dmsBillsLubeInstance.setBillsLubeCode(strDate);
return toAjax(dmsBillsLubeInstanceService.insertDmsBillsLubeInstance(dmsBillsLubeInstance));

@ -0,0 +1,125 @@
package com.hw.dms.controller;
import java.text.SimpleDateFormat;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsPlanMaint;
import com.hw.dms.service.IDmsPlanMaintService;
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.dms.domain.DmsBillsMaintInstance;
import com.hw.dms.service.IDmsBillsMaintInstanceService;
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 Open Platform
* @date 2024-02-29
*/
@RestController
@RequestMapping("/dmsBillsMaintInstance")
public class DmsBillsMaintInstanceController extends BaseController
{
@Autowired
private IDmsBillsMaintInstanceService dmsBillsMaintInstanceService;
@Autowired
private IDmsPlanMaintService dmsPlanMaintService;
/**
*
*/
@RequiresPermissions("dms:dmsBillsMaintInstance:list")
@GetMapping("/list")
public TableDataInfo list(DmsBillsMaintInstance dmsBillsMaintInstance)
{
startPage();
List<DmsBillsMaintInstance> list = dmsBillsMaintInstanceService.selectDmsBillsMaintInstanceList(dmsBillsMaintInstance);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("dms:dmsBillsMaintInstance:export")
@Log(title = "保养工单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DmsBillsMaintInstance dmsBillsMaintInstance)
{
List<DmsBillsMaintInstance> list = dmsBillsMaintInstanceService.selectDmsBillsMaintInstanceList(dmsBillsMaintInstance);
ExcelUtil<DmsBillsMaintInstance> util = new ExcelUtil<DmsBillsMaintInstance>(DmsBillsMaintInstance.class);
util.exportExcel(response, list, "保养工单数据");
}
/**
*
*/
@RequiresPermissions("dms:dmsBillsMaintInstance:query")
@GetMapping(value = "/{maintInstanceId}")
public AjaxResult getInfo(@PathVariable("maintInstanceId") Long maintInstanceId)
{
return success(dmsBillsMaintInstanceService.selectDmsBillsMaintInstanceByMaintInstanceId(maintInstanceId));
}
/**
*
*/
@RequiresPermissions("dms:dmsBillsMaintInstance:add")
@Log(title = "保养工单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DmsBillsMaintInstance dmsBillsMaintInstance)
{
return toAjax(dmsBillsMaintInstanceService.insertDmsBillsMaintInstance(dmsBillsMaintInstance));
}
@PostMapping("/autoAdd")
public AjaxResult autoAdd(@RequestBody String dmsBillsMaintId)
{
String s = dmsBillsMaintId.replaceAll("\"", "");
DmsPlanMaint dmsPlanMaint = dmsPlanMaintService.selectDmsPlanMaintByPlanMaintId(Long.valueOf(s));
DmsBillsMaintInstance dmsBillsMaintInstance = new DmsBillsMaintInstance();
dmsBillsMaintInstance.setPlanMaintId(dmsPlanMaint.getPlanMaintId());
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhh");
dmsBillsMaintInstance.setBillsMaintCode(sdf.format(DateUtils.getNowDate()));
return toAjax(dmsBillsMaintInstanceService.insertDmsBillsMaintInstance(dmsBillsMaintInstance));
}
/**
*
*/
@RequiresPermissions("dms:dmsBillsMaintInstance:edit")
@Log(title = "保养工单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DmsBillsMaintInstance dmsBillsMaintInstance)
{
return toAjax(dmsBillsMaintInstanceService.updateDmsBillsMaintInstance(dmsBillsMaintInstance));
}
/**
*
*/
@RequiresPermissions("dms:dmsBillsMaintInstance:remove")
@Log(title = "保养工单", businessType = BusinessType.DELETE)
@DeleteMapping("/{maintInstanceIds}")
public AjaxResult remove(@PathVariable Long[] maintInstanceIds)
{
return toAjax(dmsBillsMaintInstanceService.deleteDmsBillsMaintInstanceByMaintInstanceIds(maintInstanceIds));
}
}

@ -0,0 +1,105 @@
package com.hw.dms.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.dms.domain.DmsFaultInstanceFile;
import com.hw.dms.service.IDmsFaultInstanceFileService;
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 Open Platform
* @date 2024-02-29
*/
@RestController
@RequestMapping("/dmsFaultInstanceFile")
public class DmsFaultInstanceFileController extends BaseController
{
@Autowired
private IDmsFaultInstanceFileService dmsFaultInstanceFileService;
/**
* ;
*/
@RequiresPermissions("dms:dmsFaultInstanceFile:list")
@GetMapping("/list")
public TableDataInfo list(DmsFaultInstanceFile dmsFaultInstanceFile)
{
startPage();
List<DmsFaultInstanceFile> list = dmsFaultInstanceFileService.selectDmsFaultInstanceFileList(dmsFaultInstanceFile);
return getDataTable(list);
}
/**
* ;
*/
@RequiresPermissions("dms:dmsFaultInstanceFile:export")
@Log(title = "故障文件;手工创建,从故障报修开始", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DmsFaultInstanceFile dmsFaultInstanceFile)
{
List<DmsFaultInstanceFile> list = dmsFaultInstanceFileService.selectDmsFaultInstanceFileList(dmsFaultInstanceFile);
ExcelUtil<DmsFaultInstanceFile> util = new ExcelUtil<DmsFaultInstanceFile>(DmsFaultInstanceFile.class);
util.exportExcel(response, list, "故障文件;手工创建,从故障报修开始数据");
}
/**
* ;
*/
@RequiresPermissions("dms:dmsFaultInstanceFile:query")
@GetMapping(value = "/{repairInstanceFileId}")
public AjaxResult getInfo(@PathVariable("repairInstanceFileId") Long repairInstanceFileId)
{
return success(dmsFaultInstanceFileService.selectDmsFaultInstanceFileByRepairInstanceFileId(repairInstanceFileId));
}
/**
* ;
*/
@RequiresPermissions("dms:dmsFaultInstanceFile:add")
@Log(title = "故障文件;手工创建,从故障报修开始", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DmsFaultInstanceFile dmsFaultInstanceFile)
{
return toAjax(dmsFaultInstanceFileService.insertDmsFaultInstanceFile(dmsFaultInstanceFile));
}
/**
* ;
*/
@RequiresPermissions("dms:dmsFaultInstanceFile:edit")
@Log(title = "故障文件;手工创建,从故障报修开始", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DmsFaultInstanceFile dmsFaultInstanceFile)
{
return toAjax(dmsFaultInstanceFileService.updateDmsFaultInstanceFile(dmsFaultInstanceFile));
}
/**
* ;
*/
@RequiresPermissions("dms:dmsFaultInstanceFile:remove")
@Log(title = "故障文件;手工创建,从故障报修开始", businessType = BusinessType.DELETE)
@DeleteMapping("/{repairInstanceFileIds}")
public AjaxResult remove(@PathVariable Long[] repairInstanceFileIds)
{
return toAjax(dmsFaultInstanceFileService.deleteDmsFaultInstanceFileByRepairInstanceFileIds(repairInstanceFileIds));
}
}

@ -0,0 +1,110 @@
package com.hw.dms.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.dms.domain.DmsMaintInstanceActivity;
import com.hw.dms.service.IDmsMaintInstanceActivityService;
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 Open Platform
* @date 2024-02-29
*/
@RestController
@RequestMapping("/dmsMaintInstanceActivity")
public class DmsMaintInstanceActivityController extends BaseController
{
@Autowired
private IDmsMaintInstanceActivityService dmsMaintInstanceActivityService;
/**
*
*/
@RequiresPermissions("dms:dmsMaintInstanceActivity:list")
@GetMapping("/list")
public TableDataInfo list(DmsMaintInstanceActivity dmsMaintInstanceActivity)
{
startPage();
List<DmsMaintInstanceActivity> list = dmsMaintInstanceActivityService.selectDmsMaintInstanceActivityList(dmsMaintInstanceActivity);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("dms:dmsMaintInstanceActivity:export")
@Log(title = "保养工单实例节点", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DmsMaintInstanceActivity dmsMaintInstanceActivity)
{
List<DmsMaintInstanceActivity> list = dmsMaintInstanceActivityService.selectDmsMaintInstanceActivityList(dmsMaintInstanceActivity);
ExcelUtil<DmsMaintInstanceActivity> util = new ExcelUtil<DmsMaintInstanceActivity>(DmsMaintInstanceActivity.class);
util.exportExcel(response, list, "保养工单实例节点数据");
}
/**
*
*/
@RequiresPermissions("dms:dmsMaintInstanceActivity:query")
@GetMapping(value = "/{instanceActivityId}")
public AjaxResult getInfo(@PathVariable("instanceActivityId") Long instanceActivityId)
{
return success(dmsMaintInstanceActivityService.selectDmsMaintInstanceActivityByInstanceActivityId(instanceActivityId));
}
/**
*
*/
@RequiresPermissions("dms:dmsMaintInstanceActivity:add")
@Log(title = "保养工单实例节点", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DmsMaintInstanceActivity dmsMaintInstanceActivity)
{
return toAjax(dmsMaintInstanceActivityService.insertDmsMaintInstanceActivity(dmsMaintInstanceActivity));
}
/**
*
*/
@RequiresPermissions("dms:dmsMaintInstanceActivity:edit")
@Log(title = "保养工单实例节点", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DmsMaintInstanceActivity dmsMaintInstanceActivity)
{
return toAjax(dmsMaintInstanceActivityService.updateDmsMaintInstanceActivity(dmsMaintInstanceActivity));
}
/**
*
*/
@RequiresPermissions("dms:dmsMaintInstanceActivity:remove")
@Log(title = "保养工单实例节点", businessType = BusinessType.DELETE)
@DeleteMapping("/{instanceActivityIds}")
public AjaxResult remove(@PathVariable Long[] instanceActivityIds)
{
return toAjax(dmsMaintInstanceActivityService.deleteDmsMaintInstanceActivityByInstanceActivityIds(instanceActivityIds));
}
@GetMapping("/selectUserIdByDmsMaintInstanceActivityId/{maintInstanceId}/userId/{userId}")
public boolean selectUserIdByDmsMaintInstanceActivityId(@PathVariable("maintInstanceId") Long maintInstanceId,@PathVariable("userId") Long userId){
return dmsMaintInstanceActivityService.selectUserIdByDmsMaintInstanceActivityId(maintInstanceId,userId);
}
}

@ -93,21 +93,20 @@ public class DmsPlanLubeController extends BaseController
Date nextExecution = CronUtils.getNextExecution(time);
dmsPlanLube.setLubeTime(nextExecution);
int i = dmsPlanLubeService.insertDmsPlanLube(dmsPlanLube);
List<DmsPlanLube> dmsPlanLubes = dmsPlanLubeService.selectDmsPlanLubeList(dmsPlanLube);
DmsPlanLube dmsPlanLube1 = dmsPlanLubes.get(0);
SysJob job = new SysJob();
job.setJobName("创建计划编号为"+dmsPlanLube1.getPlanLubeCode()+"工单");
job.setJobName("创建计划编号为"+dmsPlanLube.getPlanLubeCode()+"工单");
job.setJobGroup("DEFAULT");
job.setInvokeTarget("ryTask.getDmsBillsLube(\""+dmsPlanLube1.getPlanLubeId()+"\")");
job.setInvokeTarget("ryTask.getDmsBillsLube(\""+dmsPlanLube.getPlanLubeId()+"\")");
job.setCronExpression(dmsPlanLube.getCronExpression());
job.setMisfirePolicy("1");
job.setConcurrent("1");
job.setStatus("1");
remoteJobService.add(SecurityConstants.INNER,job);
SysJob job1 = remoteJobService.selectJobList(dmsPlanLubes.get(0).getPlanLubeId());
dmsPlanLubes.get(0).setJobId(job1.getJobId());
dmsPlanLubeService.updateDmsPlanLube(dmsPlanLubes.get(0));
SysJob job1 = remoteJobService.selectJobList(dmsPlanLube.getPlanLubeId());
dmsPlanLube.setJobId(job1.getJobId());
dmsPlanLubeService.updateDmsPlanLube(dmsPlanLube);
return toAjax(i);
}

@ -1,8 +1,14 @@
package com.hw.dms.controller;
import java.util.Date;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.job.api.RemoteJobService;
import com.hw.job.api.domain.SysJob;
import com.hw.job.api.util.CronUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -24,7 +30,7 @@ import com.hw.common.core.web.page.TableDataInfo;
/**
* Controller
*
*
* @author xins
* @date 2024-01-08
*/
@ -34,6 +40,8 @@ public class DmsPlanMaintController extends BaseController
{
@Autowired
private IDmsPlanMaintService dmsPlanMaintService;
@Autowired
private RemoteJobService remoteJobService;
/**
*
@ -78,7 +86,25 @@ public class DmsPlanMaintController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody DmsPlanMaint dmsPlanMaint)
{
return toAjax(dmsPlanMaintService.insertDmsPlanMaint(dmsPlanMaint));
String time = dmsPlanMaint.getCronExpression();
//通过cron表达式获取下一次执行时间
Date nextExecution = CronUtils.getNextExecution(time);
dmsPlanMaint.setMaintTime(nextExecution);
int i = dmsPlanMaintService.insertDmsPlanMaint(dmsPlanMaint);
SysJob job = new SysJob();
job.setJobName("创建计划编号为"+dmsPlanMaint.getPlanMaintCode()+"工单");
job.setJobGroup("DEFAULT");
job.setInvokeTarget("ryTask.getDmsBillsLube(\""+dmsPlanMaint.getPlanMaintId()+"\")");
job.setCronExpression(dmsPlanMaint.getCronExpression());
job.setMisfirePolicy("1");
job.setConcurrent("1");
job.setStatus("1");
remoteJobService.add(SecurityConstants.INNER,job);
SysJob job1 = remoteJobService.selectJobList(dmsPlanMaint.getPlanMaintId());
dmsPlanMaint.setJobId(job1.getJobId());
dmsPlanMaintService.updateDmsPlanMaint(dmsPlanMaint);
return toAjax(i);
}
/**

@ -95,20 +95,19 @@ public class DmsPlanRepairController extends BaseController
dmsPlanRepair.setRepairTime(nextExecution);
AjaxResult ajaxResult = toAjax(dmsPlanRepairService.insertDmsPlanRepair(dmsPlanRepair));
List<DmsPlanRepair> dmsPlanRepairs = dmsPlanRepairService.selectDmsPlanRepairList(dmsPlanRepair);
DmsPlanRepair dmsPlanRepair1 = dmsPlanRepairs.get(0);
SysJob job = new SysJob();
job.setJobName("创建计划编号为"+dmsPlanRepair.getPlanRepairCode()+"工单");
job.setJobGroup("DEFAULT");
job.setInvokeTarget("ryTask.getDmsRepairInstance(\""+dmsPlanRepair1.getPlanRepairId()+"\")");
job.setInvokeTarget("ryTask.getDmsRepairInstance(\""+dmsPlanRepair.getPlanRepairId()+"\")");
job.setCronExpression(dmsPlanRepair.getCronExpression());
job.setMisfirePolicy("1");
job.setConcurrent("1");
job.setStatus("1");
remoteJobService.add(SecurityConstants.INNER,job);
SysJob job1 = remoteJobService.selectJobList(dmsPlanRepairs.get(0).getPlanRepairId());
dmsPlanRepairs.get(0).setJobId(job1.getJobId());
dmsPlanRepairService.updateDmsPlanRepair(dmsPlanRepairs.get(0));
SysJob job1 = remoteJobService.selectJobList(dmsPlanRepair.getPlanRepairId());
dmsPlanRepair.setJobId(job1.getJobId());
dmsPlanRepairService.updateDmsPlanRepair(dmsPlanRepair);
return ajaxResult;
}

@ -1,7 +1,10 @@
package com.hw.dms.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hw.system.api.domain.SysFile;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hw.common.core.annotation.Excel;
@ -70,6 +73,15 @@ public class DmsBillsFaultInstance extends BaseEntity
/** 是否标识1-是0-否 */
@Excel(name = "是否标识1-是0-否")
private List<DmsFaultInstanceFile> dmsFaultInstanceFiles;
private List<SysFile> sysFiles;
private String imgUrl;
private String isFlag;
private String faultType;
@ -84,6 +96,29 @@ public class DmsBillsFaultInstance extends BaseEntity
private Long outsrcId;
public List<SysFile> getSysFiles() {
return sysFiles;
}
public void setSysFiles(List<SysFile> sysFiles) {
this.sysFiles = sysFiles;
}
public List<DmsFaultInstanceFile> getDmsFaultInstanceFiles() {
return dmsFaultInstanceFiles;
}
public void setDmsFaultInstanceFiles(List<DmsFaultInstanceFile> dmsFaultInstanceFiles) {
this.dmsFaultInstanceFiles = dmsFaultInstanceFiles;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
public String getFaultType() {
return faultType;
}

@ -9,7 +9,7 @@ import com.hw.common.core.web.domain.BaseEntity;
/**
* dms_bills_lube_instance
*
*
* @author Open Platform
* @date 2024-02-26
*/
@ -56,84 +56,114 @@ public class DmsBillsLubeInstance extends BaseEntity
@Excel(name = "是否标识1-是0-否")
private String isFlag;
public void setLubeInstanceId(Long lubeInstanceId)
private String lubeGroup;
private String lubeSupervisor;
private String lubeLevel;
public String getLubeGroup() {
return lubeGroup;
}
public void setLubeGroup(String lubeGroup) {
this.lubeGroup = lubeGroup;
}
public String getLubeSupervisor() {
return lubeSupervisor;
}
public void setLubeSupervisor(String lubeSupervisor) {
this.lubeSupervisor = lubeSupervisor;
}
public String getLubeLevel() {
return lubeLevel;
}
public void setLubeLevel(String lubeLevel) {
this.lubeLevel = lubeLevel;
}
public void setLubeInstanceId(Long lubeInstanceId)
{
this.lubeInstanceId = lubeInstanceId;
}
public Long getLubeInstanceId()
public Long getLubeInstanceId()
{
return lubeInstanceId;
}
public void setPlanLubeId(Long planLubeId)
public void setPlanLubeId(Long planLubeId)
{
this.planLubeId = planLubeId;
}
public Long getPlanLubeId()
public Long getPlanLubeId()
{
return planLubeId;
}
public void setBillsLubeCode(String billsLubeCode)
public void setBillsLubeCode(String billsLubeCode)
{
this.billsLubeCode = billsLubeCode;
}
public String getBillsLubeCode()
public String getBillsLubeCode()
{
return billsLubeCode;
}
public void setPlanBeginTime(Date planBeginTime)
public void setPlanBeginTime(Date planBeginTime)
{
this.planBeginTime = planBeginTime;
}
public Date getPlanBeginTime()
public Date getPlanBeginTime()
{
return planBeginTime;
}
public void setRealBeginTime(Date realBeginTime)
public void setRealBeginTime(Date realBeginTime)
{
this.realBeginTime = realBeginTime;
}
public Date getRealBeginTime()
public Date getRealBeginTime()
{
return realBeginTime;
}
public void setPlanEndTime(Date planEndTime)
public void setPlanEndTime(Date planEndTime)
{
this.planEndTime = planEndTime;
}
public Date getPlanEndTime()
public Date getPlanEndTime()
{
return planEndTime;
}
public void setRealEndTime(Date realEndTime)
public void setRealEndTime(Date realEndTime)
{
this.realEndTime = realEndTime;
}
public Date getRealEndTime()
public Date getRealEndTime()
{
return realEndTime;
}
public void setLubeStatus(String lubeStatus)
public void setLubeStatus(String lubeStatus)
{
this.lubeStatus = lubeStatus;
}
public String getLubeStatus()
public String getLubeStatus()
{
return lubeStatus;
}
public void setIsFlag(String isFlag)
public void setIsFlag(String isFlag)
{
this.isFlag = isFlag;
}
public String getIsFlag()
public String getIsFlag()
{
return isFlag;
}

@ -0,0 +1,216 @@
package com.hw.dms.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* dms_bills_maint_instance
*
* @author Open Platform
* @date 2024-02-29
*/
public class DmsBillsMaintInstance extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键标识 */
private Long maintInstanceId;
/** 保养计划ID,关联dms_plan_maint的plan_maint_id */
@Excel(name = "保养计划ID,关联dms_plan_maint的plan_maint_id")
private Long planMaintId;
/** 工单流程ID关联wf_process的wf_process_id */
@Excel(name = "工单流程ID关联wf_process的wf_process_id")
private Long wfProcessId;
/** 保养单号 */
@Excel(name = "保养单号")
private String billsMaintCode;
/** 计划保养时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划保养时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date planBeginTime;
/** 实际开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date realBeginTime;
/** 计划完成时间;根据计划的时限计算 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划完成时间;根据计划的时限计算", width = 30, dateFormat = "yyyy-MM-dd")
private Date planEndTime;
/** 实际完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实际完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date realEndTime;
/** 保养状态1-待保养2-保养中3-已完成 */
@Excel(name = "保养状态1-待保养2-保养中3-已完成")
private Long maintStatus;
/** 保养完成率 */
@Excel(name = "保养完成率")
private BigDecimal maintCompRate;
/** 是否标识1-是2-否 */
@Excel(name = "是否标识1-是2-否")
private Long isFlag;
private Long maintLevel;
private String maintGroup;
private String maintSupervisor;
public Long getMaintLevel() {
return maintLevel;
}
public void setMaintLevel(Long maintLevel) {
this.maintLevel = maintLevel;
}
public String getMaintGroup() {
return maintGroup;
}
public void setMaintGroup(String maintGroup) {
this.maintGroup = maintGroup;
}
public String getMaintSupervisor() {
return maintSupervisor;
}
public void setMaintSupervisor(String maintSupervisor) {
this.maintSupervisor = maintSupervisor;
}
public void setMaintInstanceId(Long maintInstanceId)
{
this.maintInstanceId = maintInstanceId;
}
public Long getMaintInstanceId()
{
return maintInstanceId;
}
public void setPlanMaintId(Long planMaintId)
{
this.planMaintId = planMaintId;
}
public Long getPlanMaintId()
{
return planMaintId;
}
public void setWfProcessId(Long wfProcessId)
{
this.wfProcessId = wfProcessId;
}
public Long getWfProcessId()
{
return wfProcessId;
}
public void setBillsMaintCode(String billsMaintCode)
{
this.billsMaintCode = billsMaintCode;
}
public String getBillsMaintCode()
{
return billsMaintCode;
}
public void setPlanBeginTime(Date planBeginTime)
{
this.planBeginTime = planBeginTime;
}
public Date getPlanBeginTime()
{
return planBeginTime;
}
public void setRealBeginTime(Date realBeginTime)
{
this.realBeginTime = realBeginTime;
}
public Date getRealBeginTime()
{
return realBeginTime;
}
public void setPlanEndTime(Date planEndTime)
{
this.planEndTime = planEndTime;
}
public Date getPlanEndTime()
{
return planEndTime;
}
public void setRealEndTime(Date realEndTime)
{
this.realEndTime = realEndTime;
}
public Date getRealEndTime()
{
return realEndTime;
}
public void setMaintStatus(Long maintStatus)
{
this.maintStatus = maintStatus;
}
public Long getMaintStatus()
{
return maintStatus;
}
public void setMaintCompRate(BigDecimal maintCompRate)
{
this.maintCompRate = maintCompRate;
}
public BigDecimal getMaintCompRate()
{
return maintCompRate;
}
public void setIsFlag(Long isFlag)
{
this.isFlag = isFlag;
}
public Long getIsFlag()
{
return isFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("maintInstanceId", getMaintInstanceId())
.append("planMaintId", getPlanMaintId())
.append("wfProcessId", getWfProcessId())
.append("billsMaintCode", getBillsMaintCode())
.append("planBeginTime", getPlanBeginTime())
.append("realBeginTime", getRealBeginTime())
.append("planEndTime", getPlanEndTime())
.append("realEndTime", getRealEndTime())
.append("maintStatus", getMaintStatus())
.append("maintCompRate", getMaintCompRate())
.append("isFlag", getIsFlag())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,79 @@
package com.hw.dms.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;
/**
* ; dms_fault_instance_file
*
* @author Open Platform
* @date 2024-02-29
*/
public class DmsFaultInstanceFile extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键标识 */
private Long repairInstanceFileId;
/** 关联类型(1故障报修工单实例节点2故障记录) */
@Excel(name = "关联类型(1故障报修工单实例节点2故障记录)")
private String targetType;
/** 关联类型为1时关联维修工单实例节点主键关联类型为2时关联维修记录ID */
@Excel(name = "关联类型为1时关联维修工单实例节点主键关联类型为2时关联维修记录ID")
private Long targetId;
/** 故障文件地址,一般是图片 */
@Excel(name = "故障文件地址,一般是图片")
private String faultFile;
public void setRepairInstanceFileId(Long repairInstanceFileId)
{
this.repairInstanceFileId = repairInstanceFileId;
}
public Long getRepairInstanceFileId()
{
return repairInstanceFileId;
}
public void setTargetType(String targetType)
{
this.targetType = targetType;
}
public String getTargetType()
{
return targetType;
}
public void setTargetId(Long targetId)
{
this.targetId = targetId;
}
public Long getTargetId()
{
return targetId;
}
public void setFaultFile(String faultFile)
{
this.faultFile = faultFile;
}
public String getFaultFile()
{
return faultFile;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("repairInstanceFileId", getRepairInstanceFileId())
.append("targetType", getTargetType())
.append("targetId", getTargetId())
.append("faultFile", getFaultFile())
.toString();
}
}

@ -0,0 +1,264 @@
package com.hw.dms.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* dms_maint_instance_activity
*
* @author Open Platform
* @date 2024-02-29
*/
public class DmsMaintInstanceActivity extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 保养工单实例节点ID */
private Long instanceActivityId;
/** 保养工单实例ID关联dms_bills_maint_instance的maint_instance_id */
@Excel(name = "保养工单实例ID关联dms_bills_maint_instance的maint_instance_id")
private Long maintInstanceId;
/** 工单流程节点ID关联wf_process_activity的process_activity_id */
@Excel(name = "工单流程节点ID", readConverterExp = "关=联wf_process_activity的process_activity_id")
private Long processActivityId;
/** 保养级别1-日常保养2-月度保养3-年度保养;最后一步自动复制第1步的可在第2步修改修改保存后为第2步的记录第1步为要求的第2步为实际的 */
@Excel(name = "保养级别1-日常保养2-月度保养3-年度保养;最后一步自动复制第1步的可在第2步修改修改保存后为第2步的记录第1步为要求的第2步为实际的")
private Long maintLevel;
/** 保养组别;最后一步自动复制第1步的可在第2步修改修改保存后为第2步的记录第1步为要求的第2步为实际的 */
@Excel(name = "保养组别;最后一步自动复制第1步的可在第2步修改修改保存后为第2步的记录第1步为要求的第2步为实际的")
private String maintGroup;
/** 保养负责人;最后一步自动复制第1步的可在第2步修改修改保存后为第2步的记录第1步为要求的第2步为实际的 */
@Excel(name = "保养负责人;最后一步自动复制第1步的可在第2步修改修改保存后为第2步的记录第1步为要求的第2步为实际的")
private String maintSupervisor;
/** 处理意见;第一步不显示,从第二步开始只显示此字段 */
@Excel(name = "处理意见;第一步不显示,从第二步开始只显示此字段")
private String processHandleResolution;
/** 状态(0已结束1执行中2、待接取3、已转发 */
@Excel(name = "状态(0已结束1执行中2、待接取3、已转发")
private String processHandleStatus;
/** 工单流程步骤顺序 */
@Excel(name = "工单流程步骤顺序")
private Long processStepOrder;
/** 执行开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "执行开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 执行结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 处理人ID关联sys_user的user_id) */
@Excel(name = "处理人ID", readConverterExp = "处理人ID关联sys_user的user_id)")
private Long handleUserId;
/** 处理人 */
@Excel(name = "处理人")
private String handleBy;
/** 处理时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date handleTime;
/** 转单人用户id或转发协助用户id;1、在转发时生成新的工单节点实例执行人id为转发的用户而转单人是刚才转发给此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束2、在添加协助时生成新的工单节点实例执行人id为添加协助的用户而转单人是刚才添加协助此用户的用户id是否协助工单为1并且转发后当前工单的状态仍为执行中 */
@Excel(name = "转单人用户id或转发协助用户id;1、在转发时生成新的工单节点实例执行人id为转发的用户而转单人是刚才转发给此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束此用户的用户id是否协助工单为0并且转发后当前工单的状态为已结束2、在添加协助时生成新的工单节点实例执行人id为添加协助的用户而转单人是刚才添加协助此用户的用户id是否协助工单为1并且转发后当前工单的状态仍为执行中")
private Long transferUserId;
/** 用户预留1 */
@Excel(name = "用户预留1")
private String attr1;
private Long wfLength;
public Long getWfLength() {
return wfLength;
}
public void setWfLength(Long wfLength) {
this.wfLength = wfLength;
}
public void setInstanceActivityId(Long instanceActivityId)
{
this.instanceActivityId = instanceActivityId;
}
public Long getInstanceActivityId()
{
return instanceActivityId;
}
public void setMaintInstanceId(Long maintInstanceId)
{
this.maintInstanceId = maintInstanceId;
}
public Long getMaintInstanceId()
{
return maintInstanceId;
}
public void setProcessActivityId(Long processActivityId)
{
this.processActivityId = processActivityId;
}
public Long getProcessActivityId()
{
return processActivityId;
}
public void setMaintLevel(Long maintLevel)
{
this.maintLevel = maintLevel;
}
public Long getMaintLevel()
{
return maintLevel;
}
public void setMaintGroup(String maintGroup)
{
this.maintGroup = maintGroup;
}
public String getMaintGroup()
{
return maintGroup;
}
public void setMaintSupervisor(String maintSupervisor)
{
this.maintSupervisor = maintSupervisor;
}
public String getMaintSupervisor()
{
return maintSupervisor;
}
public void setProcessHandleResolution(String processHandleResolution)
{
this.processHandleResolution = processHandleResolution;
}
public String getProcessHandleResolution()
{
return processHandleResolution;
}
public void setProcessHandleStatus(String processHandleStatus)
{
this.processHandleStatus = processHandleStatus;
}
public String getProcessHandleStatus()
{
return processHandleStatus;
}
public void setProcessStepOrder(Long processStepOrder)
{
this.processStepOrder = processStepOrder;
}
public Long getProcessStepOrder()
{
return processStepOrder;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public Date getEndTime()
{
return endTime;
}
public void setHandleUserId(Long handleUserId)
{
this.handleUserId = handleUserId;
}
public Long getHandleUserId()
{
return handleUserId;
}
public void setHandleBy(String handleBy)
{
this.handleBy = handleBy;
}
public String getHandleBy()
{
return handleBy;
}
public void setHandleTime(Date handleTime)
{
this.handleTime = handleTime;
}
public Date getHandleTime()
{
return handleTime;
}
public void setTransferUserId(Long transferUserId)
{
this.transferUserId = transferUserId;
}
public Long getTransferUserId()
{
return transferUserId;
}
public void setAttr1(String attr1)
{
this.attr1 = attr1;
}
public String getAttr1()
{
return attr1;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("instanceActivityId", getInstanceActivityId())
.append("maintInstanceId", getMaintInstanceId())
.append("processActivityId", getProcessActivityId())
.append("maintLevel", getMaintLevel())
.append("maintGroup", getMaintGroup())
.append("maintSupervisor", getMaintSupervisor())
.append("processHandleResolution", getProcessHandleResolution())
.append("remark", getRemark())
.append("processHandleStatus", getProcessHandleStatus())
.append("processStepOrder", getProcessStepOrder())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("handleUserId", getHandleUserId())
.append("handleBy", getHandleBy())
.append("handleTime", getHandleTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("transferUserId", getTransferUserId())
.append("attr1", getAttr1())
.toString();
}
}

@ -10,7 +10,7 @@ import com.hw.common.core.web.domain.BaseEntity;
/**
* dms_plan_maint
*
*
* @author xins
* @date 2024-01-08
*/
@ -41,6 +41,13 @@ public class DmsPlanMaint extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "本次保养时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date maintTime;
@Excel(name = "关联sys_job主键")
private Long jobId;
@Excel(name = "时限")
private Long timeLimit;
/** 循环周期 */
@Excel(name = "循环周期")
@ -58,96 +65,140 @@ public class DmsPlanMaint extends BaseEntity
@Excel(name = "是否标识1-是2-否")
private Long isFlag;
private String cronExpression;
private Long timeLimitDays;
private Long timeLimitHours;
public Long getTimeLimitDays() {
return timeLimitDays;
}
public void setTimeLimitDays(Long timeLimitDays) {
this.timeLimitDays = timeLimitDays;
}
public Long getTimeLimitHours() {
return timeLimitHours;
}
public void setTimeLimitHours(Long timeLimitHours) {
this.timeLimitHours = timeLimitHours;
}
public String getCronExpression() {
return cronExpression;
}
public void setCronExpression(String cronExpression) {
this.cronExpression = cronExpression;
}
public Long getJobId() {
return jobId;
}
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public Long getTimeLimit() {
return timeLimit;
}
public void setTimeLimit(Long timeLimit) {
this.timeLimit = timeLimit;
}
/** 保养计划明细信息 */
private List<DmsPlanMaintDetail> dmsPlanMaintDetailList;
public void setPlanMaintId(Long planMaintId)
public void setPlanMaintId(Long planMaintId)
{
this.planMaintId = planMaintId;
}
public Long getPlanMaintId()
public Long getPlanMaintId()
{
return planMaintId;
}
public void setPlanMaintCode(String planMaintCode)
public void setPlanMaintCode(String planMaintCode)
{
this.planMaintCode = planMaintCode;
}
public String getPlanMaintCode()
public String getPlanMaintCode()
{
return planMaintCode;
}
public void setMaintLevel(Long maintLevel)
public void setMaintLevel(Long maintLevel)
{
this.maintLevel = maintLevel;
}
public Long getMaintLevel()
public Long getMaintLevel()
{
return maintLevel;
}
public void setMaintGroup(String maintGroup)
public void setMaintGroup(String maintGroup)
{
this.maintGroup = maintGroup;
}
public String getMaintGroup()
public String getMaintGroup()
{
return maintGroup;
}
public void setMaintSupervisor(String maintSupervisor)
public void setMaintSupervisor(String maintSupervisor)
{
this.maintSupervisor = maintSupervisor;
}
public String getMaintSupervisor()
public String getMaintSupervisor()
{
return maintSupervisor;
}
public void setMaintTime(Date maintTime)
public void setMaintTime(Date maintTime)
{
this.maintTime = maintTime;
}
public Date getMaintTime()
public Date getMaintTime()
{
return maintTime;
}
public void setCyclePeriod(Long cyclePeriod)
public void setCyclePeriod(Long cyclePeriod)
{
this.cyclePeriod = cyclePeriod;
}
public Long getCyclePeriod()
public Long getCyclePeriod()
{
return cyclePeriod;
}
public void setMaintStatus(Long maintStatus)
public void setMaintStatus(Long maintStatus)
{
this.maintStatus = maintStatus;
}
public Long getMaintStatus()
public Long getMaintStatus()
{
return maintStatus;
}
public void setCreateMethod(Long createMethod)
public void setCreateMethod(Long createMethod)
{
this.createMethod = createMethod;
}
public Long getCreateMethod()
public Long getCreateMethod()
{
return createMethod;
}
public void setIsFlag(Long isFlag)
public void setIsFlag(Long isFlag)
{
this.isFlag = isFlag;
}
public Long getIsFlag()
public Long getIsFlag()
{
return isFlag;
}
@ -164,23 +215,21 @@ public class DmsPlanMaint extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("planMaintId", getPlanMaintId())
.append("planMaintCode", getPlanMaintCode())
.append("maintLevel", getMaintLevel())
.append("maintGroup", getMaintGroup())
.append("maintSupervisor", getMaintSupervisor())
.append("maintTime", getMaintTime())
.append("cyclePeriod", getCyclePeriod())
.append("maintStatus", getMaintStatus())
.append("createMethod", getCreateMethod())
.append("isFlag", getIsFlag())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("dmsPlanMaintDetailList", getDmsPlanMaintDetailList())
.toString();
return "DmsPlanMaint{" +
"planMaintId=" + planMaintId +
", planMaintCode='" + planMaintCode + '\'' +
", maintLevel=" + maintLevel +
", maintGroup='" + maintGroup + '\'' +
", maintSupervisor='" + maintSupervisor + '\'' +
", maintTime=" + maintTime +
", jobId=" + jobId +
", timeLimit=" + timeLimit +
", cyclePeriod=" + cyclePeriod +
", maintStatus=" + maintStatus +
", createMethod=" + createMethod +
", isFlag=" + isFlag +
", cronExpression='" + cronExpression + '\'' +
", dmsPlanMaintDetailList=" + dmsPlanMaintDetailList +
'}';
}
}

@ -7,7 +7,7 @@ import com.hw.common.core.web.domain.BaseEntity;
/**
* dms_plan_maint_detail
*
*
* @author xins
* @date 2024-01-08
*/
@ -30,10 +30,12 @@ public class DmsPlanMaintDetail extends BaseEntity
@Excel(name = "保养部位,关联dms_base_maint_station的maint_station_id")
private Long maintStationId;
/** 保养标准 */
@Excel(name = "保养标准")
private String maintProtocol;
// /** 保养标准 */
// @Excel(name = "保养标准")
// private String maintProtocol;
@Excel(name = "保养标准id")
private Long maintStandardId;
/** 操作描述 */
@Excel(name = "操作描述")
private String operationDescription;
@ -42,66 +44,68 @@ public class DmsPlanMaintDetail extends BaseEntity
@Excel(name = "是否标识1-是2-否")
private Long isFlag;
public void setPlanMaintDetailId(Long planMaintDetailId)
public Long getMaintStandardId() {
return maintStandardId;
}
public void setMaintStandardId(Long maintStandardId) {
this.maintStandardId = maintStandardId;
}
public void setPlanMaintDetailId(Long planMaintDetailId)
{
this.planMaintDetailId = planMaintDetailId;
}
public Long getPlanMaintDetailId()
public Long getPlanMaintDetailId()
{
return planMaintDetailId;
}
public void setPlanMaintId(Long planMaintId)
public void setPlanMaintId(Long planMaintId)
{
this.planMaintId = planMaintId;
}
public Long getPlanMaintId()
public Long getPlanMaintId()
{
return planMaintId;
}
public void setDeviceId(Long deviceId)
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
public Long getDeviceId()
{
return deviceId;
}
public void setMaintStationId(Long maintStationId)
public void setMaintStationId(Long maintStationId)
{
this.maintStationId = maintStationId;
}
public Long getMaintStationId()
public Long getMaintStationId()
{
return maintStationId;
}
public void setMaintProtocol(String maintProtocol)
{
this.maintProtocol = maintProtocol;
}
public String getMaintProtocol()
{
return maintProtocol;
}
public void setOperationDescription(String operationDescription)
public void setOperationDescription(String operationDescription)
{
this.operationDescription = operationDescription;
}
public String getOperationDescription()
public String getOperationDescription()
{
return operationDescription;
}
public void setIsFlag(Long isFlag)
public void setIsFlag(Long isFlag)
{
this.isFlag = isFlag;
}
public Long getIsFlag()
public Long getIsFlag()
{
return isFlag;
}
@ -113,7 +117,6 @@ public class DmsPlanMaintDetail extends BaseEntity
.append("planMaintId", getPlanMaintId())
.append("deviceId", getDeviceId())
.append("maintStationId", getMaintStationId())
.append("maintProtocol", getMaintProtocol())
.append("operationDescription", getOperationDescription())
.append("isFlag", getIsFlag())
.append("remark", getRemark())

@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBillsFaultInstance;
/**
* Mapper
*
*
* @author Open Platform
* @date 2024-01-23
*/
public interface DmsBillsFaultInstanceMapper
public interface DmsBillsFaultInstanceMapper
{
/**
*
*
*
* @param repairInstanceId
* @return
*/
@ -21,7 +21,7 @@ public interface DmsBillsFaultInstanceMapper
/**
*
*
*
* @param dmsBillsFaultInstance
* @return
*/
@ -29,7 +29,7 @@ public interface DmsBillsFaultInstanceMapper
/**
*
*
*
* @param dmsBillsFaultInstance
* @return
*/
@ -37,7 +37,7 @@ public interface DmsBillsFaultInstanceMapper
/**
*
*
*
* @param dmsBillsFaultInstance
* @return
*/
@ -45,7 +45,7 @@ public interface DmsBillsFaultInstanceMapper
/**
*
*
*
* @param repairInstanceId
* @return
*/
@ -53,9 +53,13 @@ public interface DmsBillsFaultInstanceMapper
/**
*
*
*
* @param repairInstanceIds
* @return
*/
public int deleteDmsBillsFaultInstanceByRepairInstanceIds(Long[] repairInstanceIds);
public Long selectProcessActivityId(Long wfProcessId);
}

@ -59,4 +59,8 @@ public interface DmsBillsInspectInstanceMapper
* @return
*/
public int deleteDmsBillsInspectInstanceByInspectInstanceIds(Long[] inspectInstanceIds);
int insertDmsBillsInspectInstancePDA(DmsBillsInspectInstance dmsBillsInspectInstance);
}

@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBillsLubeInstance;
/**
* Mapper
*
*
* @author Open Platform
* @date 2024-02-26
*/
public interface DmsBillsLubeInstanceMapper
public interface DmsBillsLubeInstanceMapper
{
/**
*
*
*
* @param lubeInstanceId
* @return
*/
@ -21,7 +21,7 @@ public interface DmsBillsLubeInstanceMapper
/**
*
*
*
* @param dmsBillsLubeInstance
* @return
*/
@ -29,7 +29,7 @@ public interface DmsBillsLubeInstanceMapper
/**
*
*
*
* @param dmsBillsLubeInstance
* @return
*/
@ -37,7 +37,7 @@ public interface DmsBillsLubeInstanceMapper
/**
*
*
*
* @param dmsBillsLubeInstance
* @return
*/
@ -45,7 +45,7 @@ public interface DmsBillsLubeInstanceMapper
/**
*
*
*
* @param lubeInstanceId
* @return
*/
@ -53,9 +53,10 @@ public interface DmsBillsLubeInstanceMapper
/**
*
*
*
* @param lubeInstanceIds
* @return
*/
public int deleteDmsBillsLubeInstanceByLubeInstanceIds(Long[] lubeInstanceIds);
}

@ -0,0 +1,61 @@
package com.hw.dms.mapper;
import java.util.List;
import com.hw.dms.domain.DmsBillsMaintInstance;
/**
* Mapper
*
* @author Open Platform
* @date 2024-02-29
*/
public interface DmsBillsMaintInstanceMapper
{
/**
*
*
* @param maintInstanceId
* @return
*/
public DmsBillsMaintInstance selectDmsBillsMaintInstanceByMaintInstanceId(Long maintInstanceId);
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
public List<DmsBillsMaintInstance> selectDmsBillsMaintInstanceList(DmsBillsMaintInstance dmsBillsMaintInstance);
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
public int insertDmsBillsMaintInstance(DmsBillsMaintInstance dmsBillsMaintInstance);
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
public int updateDmsBillsMaintInstance(DmsBillsMaintInstance dmsBillsMaintInstance);
/**
*
*
* @param maintInstanceId
* @return
*/
public int deleteDmsBillsMaintInstanceByMaintInstanceId(Long maintInstanceId);
/**
*
*
* @param maintInstanceIds
* @return
*/
public int deleteDmsBillsMaintInstanceByMaintInstanceIds(Long[] maintInstanceIds);
}

@ -60,4 +60,5 @@ public interface DmsFaultInstanceActivityMapper
public int deleteDmsFaultInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds);
Long[] selectUserIdByDmsFaultInstanceActivity(Long repairInstanceId);
DmsFaultInstanceActivity selectDmsFaultInstanceActivityByRepairIdMin(Long repairInstanceId);
}

@ -0,0 +1,66 @@
package com.hw.dms.mapper;
import java.util.List;
import com.hw.dms.domain.DmsFaultInstanceFile;
/**
* ;Mapper
*
* @author Open Platform
* @date 2024-02-29
*/
public interface DmsFaultInstanceFileMapper
{
/**
* ;
*
* @param repairInstanceFileId ;
* @return ;
*/
public DmsFaultInstanceFile selectDmsFaultInstanceFileByRepairInstanceFileId(Long repairInstanceFileId);
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return ;
*/
public List<DmsFaultInstanceFile> selectDmsFaultInstanceFileList(DmsFaultInstanceFile dmsFaultInstanceFile);
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return
*/
public int insertDmsFaultInstanceFile(DmsFaultInstanceFile dmsFaultInstanceFile);
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return
*/
public int updateDmsFaultInstanceFile(DmsFaultInstanceFile dmsFaultInstanceFile);
/**
* ;
*
* @param repairInstanceFileId ;
* @return
*/
public int deleteDmsFaultInstanceFileByRepairInstanceFileId(Long repairInstanceFileId);
/**
* ;
*
* @param repairInstanceFileIds
* @return
*/
public int deleteDmsFaultInstanceFileByRepairInstanceFileIds(Long[] repairInstanceFileIds);
/**
* id
* */
List<DmsFaultInstanceFile> selectDmsFaultInstanceFileByFaultId(Long repairInstanceId);
}

@ -0,0 +1,63 @@
package com.hw.dms.mapper;
import java.util.List;
import com.hw.dms.domain.DmsMaintInstanceActivity;
/**
* Mapper
*
* @author Open Platform
* @date 2024-02-29
*/
public interface DmsMaintInstanceActivityMapper
{
/**
*
*
* @param instanceActivityId
* @return
*/
public DmsMaintInstanceActivity selectDmsMaintInstanceActivityByInstanceActivityId(Long instanceActivityId);
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
public List<DmsMaintInstanceActivity> selectDmsMaintInstanceActivityList(DmsMaintInstanceActivity dmsMaintInstanceActivity);
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
public int insertDmsMaintInstanceActivity(DmsMaintInstanceActivity dmsMaintInstanceActivity);
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
public int updateDmsMaintInstanceActivity(DmsMaintInstanceActivity dmsMaintInstanceActivity);
/**
*
*
* @param instanceActivityId
* @return
*/
public int deleteDmsMaintInstanceActivityByInstanceActivityId(Long instanceActivityId);
/**
*
*
* @param instanceActivityIds
* @return
*/
public int deleteDmsMaintInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds);
Long[] selectUserIdByDmsMaintInstanceActivityId(Long maintInstanceId);
}

@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBillsFaultInstance;
/**
* Service
*
*
* @author Open Platform
* @date 2024-01-23
*/
public interface IDmsBillsFaultInstanceService
public interface IDmsBillsFaultInstanceService
{
/**
*
*
*
* @param repairInstanceId
* @return
*/
@ -21,7 +21,7 @@ public interface IDmsBillsFaultInstanceService
/**
*
*
*
* @param dmsBillsFaultInstance
* @return
*/
@ -29,7 +29,7 @@ public interface IDmsBillsFaultInstanceService
/**
*
*
*
* @param dmsBillsFaultInstance
* @return
*/
@ -37,7 +37,7 @@ public interface IDmsBillsFaultInstanceService
/**
*
*
*
* @param dmsBillsFaultInstance
* @return
*/
@ -45,7 +45,7 @@ public interface IDmsBillsFaultInstanceService
/**
*
*
*
* @param repairInstanceIds
* @return
*/
@ -53,9 +53,11 @@ public interface IDmsBillsFaultInstanceService
/**
*
*
*
* @param repairInstanceId
* @return
*/
public int deleteDmsBillsFaultInstanceByRepairInstanceId(Long repairInstanceId);
int insertDmsBillsFaultInstancePDA(DmsBillsFaultInstance dmsBillsFaultInstance);
}

@ -62,4 +62,6 @@ public interface IDmsBillsInspectInstanceService
* @return
*/
public int deleteDmsBillsInspectInstanceByInspectInstanceId(Long inspectInstanceId);
int insertDmsBillsInspectInstancePDA(DmsBillsInspectInstance dmsBillsInspectInstance);
}

@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBillsLubeInstance;
/**
* Service
*
*
* @author Open Platform
* @date 2024-02-26
*/
public interface IDmsBillsLubeInstanceService
public interface IDmsBillsLubeInstanceService
{
/**
*
*
*
* @param lubeInstanceId
* @return
*/
@ -21,7 +21,7 @@ public interface IDmsBillsLubeInstanceService
/**
*
*
*
* @param dmsBillsLubeInstance
* @return
*/
@ -29,7 +29,7 @@ public interface IDmsBillsLubeInstanceService
/**
*
*
*
* @param dmsBillsLubeInstance
* @return
*/
@ -37,7 +37,7 @@ public interface IDmsBillsLubeInstanceService
/**
*
*
*
* @param dmsBillsLubeInstance
* @return
*/
@ -45,7 +45,7 @@ public interface IDmsBillsLubeInstanceService
/**
*
*
*
* @param lubeInstanceIds
* @return
*/
@ -53,9 +53,12 @@ public interface IDmsBillsLubeInstanceService
/**
*
*
*
* @param lubeInstanceId
* @return
*/
public int deleteDmsBillsLubeInstanceByLubeInstanceId(Long lubeInstanceId);
int insertDmsBillsLubeInstancePDA(DmsBillsLubeInstance dmsBillsLubeInstance);
}

@ -0,0 +1,63 @@
package com.hw.dms.service;
import java.util.List;
import com.hw.dms.domain.DmsBillsMaintInstance;
/**
* Service
*
* @author Open Platform
* @date 2024-02-29
*/
public interface IDmsBillsMaintInstanceService
{
/**
*
*
* @param maintInstanceId
* @return
*/
public DmsBillsMaintInstance selectDmsBillsMaintInstanceByMaintInstanceId(Long maintInstanceId);
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
public List<DmsBillsMaintInstance> selectDmsBillsMaintInstanceList(DmsBillsMaintInstance dmsBillsMaintInstance);
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
public int insertDmsBillsMaintInstance(DmsBillsMaintInstance dmsBillsMaintInstance);
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
public int updateDmsBillsMaintInstance(DmsBillsMaintInstance dmsBillsMaintInstance);
/**
*
*
* @param maintInstanceIds
* @return
*/
public int deleteDmsBillsMaintInstanceByMaintInstanceIds(Long[] maintInstanceIds);
/**
*
*
* @param maintInstanceId
* @return
*/
public int deleteDmsBillsMaintInstanceByMaintInstanceId(Long maintInstanceId);
int insertDmsBillsMaintInstancePDA(DmsBillsMaintInstance dmsBillsMaintInstance);
}

@ -0,0 +1,61 @@
package com.hw.dms.service;
import java.util.List;
import com.hw.dms.domain.DmsFaultInstanceFile;
/**
* ;Service
*
* @author Open Platform
* @date 2024-02-29
*/
public interface IDmsFaultInstanceFileService
{
/**
* ;
*
* @param repairInstanceFileId ;
* @return ;
*/
public DmsFaultInstanceFile selectDmsFaultInstanceFileByRepairInstanceFileId(Long repairInstanceFileId);
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return ;
*/
public List<DmsFaultInstanceFile> selectDmsFaultInstanceFileList(DmsFaultInstanceFile dmsFaultInstanceFile);
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return
*/
public int insertDmsFaultInstanceFile(DmsFaultInstanceFile dmsFaultInstanceFile);
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return
*/
public int updateDmsFaultInstanceFile(DmsFaultInstanceFile dmsFaultInstanceFile);
/**
* ;
*
* @param repairInstanceFileIds ;
* @return
*/
public int deleteDmsFaultInstanceFileByRepairInstanceFileIds(Long[] repairInstanceFileIds);
/**
* ;
*
* @param repairInstanceFileId ;
* @return
*/
public int deleteDmsFaultInstanceFileByRepairInstanceFileId(Long repairInstanceFileId);
}

@ -0,0 +1,65 @@
package com.hw.dms.service;
import java.util.List;
import com.hw.dms.domain.DmsMaintInstanceActivity;
/**
* Service
*
* @author Open Platform
* @date 2024-02-29
*/
public interface IDmsMaintInstanceActivityService
{
/**
*
*
* @param instanceActivityId
* @return
*/
public DmsMaintInstanceActivity selectDmsMaintInstanceActivityByInstanceActivityId(Long instanceActivityId);
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
public List<DmsMaintInstanceActivity> selectDmsMaintInstanceActivityList(DmsMaintInstanceActivity dmsMaintInstanceActivity);
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
public int insertDmsMaintInstanceActivity(DmsMaintInstanceActivity dmsMaintInstanceActivity);
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
public int updateDmsMaintInstanceActivity(DmsMaintInstanceActivity dmsMaintInstanceActivity);
/**
*
*
* @param instanceActivityIds
* @return
*/
public int deleteDmsMaintInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds);
/**
*
*
* @param instanceActivityId
* @return
*/
public int deleteDmsMaintInstanceActivityByInstanceActivityId(Long instanceActivityId);
boolean selectUserIdByDmsMaintInstanceActivityId(Long maintInstanceId,Long userId);
}

@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsRepairInstance;
/**
* ;Service
*
*
* @author Open Platform
* @date 2024-01-24
*/
public interface IDmsRepairInstanceService
public interface IDmsRepairInstanceService
{
/**
* ;
*
*
* @param repairInstanceId ;
* @return ;
*/
@ -21,7 +21,7 @@ public interface IDmsRepairInstanceService
/**
* ;
*
*
* @param dmsRepairInstance ;
* @return ;
*/
@ -29,7 +29,7 @@ public interface IDmsRepairInstanceService
/**
* ;
*
*
* @param dmsRepairInstance ;
* @return
*/
@ -37,7 +37,7 @@ public interface IDmsRepairInstanceService
/**
* ;
*
*
* @param dmsRepairInstance ;
* @return
*/
@ -45,7 +45,7 @@ public interface IDmsRepairInstanceService
/**
* ;
*
*
* @param repairInstanceIds ;
* @return
*/
@ -53,9 +53,11 @@ public interface IDmsRepairInstanceService
/**
* ;
*
*
* @param repairInstanceId ;
* @return
*/
public int deleteDmsRepairInstanceByRepairInstanceId(Long repairInstanceId);
int insertDmsRepairInstancePDA(DmsRepairInstance dmsRepairInstance);
}

@ -1,19 +1,28 @@
package com.hw.dms.service.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.domain.R;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsFaultInstanceActivity;
import com.hw.dms.domain.DmsFaultInstanceFile;
import com.hw.dms.domain.DmsRepairInstanceActivity;
import com.hw.dms.mapper.DmsFaultInstanceActivityMapper;
import com.hw.dms.mapper.DmsFaultInstanceFileMapper;
import com.hw.dms.mapper.DmsRepairInstanceActivityMapper;
import com.hw.dms.service.IDmsRepairInstanceActivityService;
import com.hw.system.api.RemoteSysCommonService;
import com.hw.system.api.domain.SysFile;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsBillsFaultInstanceMapper;
import com.hw.dms.domain.DmsBillsFaultInstance;
import com.hw.dms.service.IDmsBillsFaultInstanceService;
import org.springframework.transaction.annotation.Transactional;
/**
* Service
@ -28,6 +37,10 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
private DmsBillsFaultInstanceMapper dmsBillsFaultInstanceMapper;
@Autowired
private DmsFaultInstanceActivityMapper dmsFaultInstanceActivityMapper;
@Autowired
private RemoteSysCommonService remoteSysCommonService;
@Autowired
private DmsFaultInstanceFileMapper dmsFaultInstanceFileMapper;
/**
*
@ -38,7 +51,27 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
@Override
public DmsBillsFaultInstance selectDmsBillsFaultInstanceByRepairInstanceId(Long repairInstanceId)
{
return dmsBillsFaultInstanceMapper.selectDmsBillsFaultInstanceByRepairInstanceId(repairInstanceId);
DmsFaultInstanceActivity dmsFaultInstanceActivity = dmsFaultInstanceActivityMapper.selectDmsFaultInstanceActivityByRepairIdMin(repairInstanceId);
DmsBillsFaultInstance dmsBillsFaultInstance = dmsBillsFaultInstanceMapper.selectDmsBillsFaultInstanceByRepairInstanceId(repairInstanceId);
List<DmsFaultInstanceFile> dmsFaultInstanceFiles = dmsFaultInstanceFileMapper.selectDmsFaultInstanceFileByFaultId(repairInstanceId);
List<SysFile> sysFiles = new ArrayList<SysFile>();
SysFile sysFile = new SysFile();
dmsBillsFaultInstance.setFaultType(dmsFaultInstanceActivity.getFaultType());
dmsBillsFaultInstance.setFaultDescription(dmsFaultInstanceActivity.getFaultDescription());
dmsBillsFaultInstance.setDesignOperations(dmsFaultInstanceActivity.getDesignOperations());
dmsBillsFaultInstance.setDesignOperations(dmsFaultInstanceActivity.getDesignOperations());
dmsBillsFaultInstance.setDeviceId(dmsFaultInstanceActivity.getDeviceId());
dmsBillsFaultInstance.setRepairType(dmsFaultInstanceActivity.getRepairType());
if (dmsFaultInstanceActivity.getOutsrcId()!=null) {
dmsBillsFaultInstance.setOutsrcId(dmsFaultInstanceActivity.getOutsrcId());
}
for (DmsFaultInstanceFile dmsFaultFor : dmsFaultInstanceFiles){
sysFile.setUrl(dmsFaultFor.getFaultFile());
sysFiles.add(sysFile);
}
dmsBillsFaultInstance.setDmsFaultInstanceFiles(dmsFaultInstanceFiles);
dmsBillsFaultInstance.setSysFiles(sysFiles);
return dmsBillsFaultInstance;
}
/**
@ -50,6 +83,7 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
@Override
public List<DmsBillsFaultInstance> selectDmsBillsFaultInstanceList(DmsBillsFaultInstance dmsBillsFaultInstance)
{
return dmsBillsFaultInstanceMapper.selectDmsBillsFaultInstanceList(dmsBillsFaultInstance);
}
@ -60,12 +94,14 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertDmsBillsFaultInstance(DmsBillsFaultInstance dmsBillsFaultInstance)
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm");
String str = sdf.format(DateUtils.getNowDate());
LoginUser user = new LoginUser();
dmsBillsFaultInstance.setWfProcessId(102l);
dmsBillsFaultInstance.setApplyUser(user.getUsername());
dmsBillsFaultInstance.setApplyTime(DateUtils.getNowDate());
dmsBillsFaultInstance.setCreateTime(DateUtils.getNowDate());
@ -73,10 +109,10 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
dmsBillsFaultInstance.setBillsStatus("0");
dmsBillsFaultInstance.setInstanceType("1");
int i = dmsBillsFaultInstanceMapper.insertDmsBillsFaultInstance(dmsBillsFaultInstance);
List<DmsBillsFaultInstance> dmsBillsFaultInstances = dmsBillsFaultInstanceMapper.selectDmsBillsFaultInstanceList(dmsBillsFaultInstance);
Long aLong = dmsBillsFaultInstanceMapper.selectProcessActivityId(102l);
DmsFaultInstanceActivity dmsFaultInstanceActivity = new DmsFaultInstanceActivity();
dmsFaultInstanceActivity.setRepairInstanceId(dmsBillsFaultInstance.getRepairInstanceId());
dmsFaultInstanceActivity.setProcessActivityId(102l);
dmsFaultInstanceActivity.setProcessActivityId(aLong);
dmsFaultInstanceActivity.setFaultType(dmsBillsFaultInstance.getFaultType());
dmsFaultInstanceActivity.setFaultDescription(dmsBillsFaultInstance.getFaultDescription());
dmsFaultInstanceActivity.setDesignOperations(dmsBillsFaultInstance.getDesignOperations());
@ -88,6 +124,14 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
dmsFaultInstanceActivity.setProcessHandleStatus("2");
dmsFaultInstanceActivity.setProcessStepOrder(1l);
dmsFaultInstanceActivityMapper.insertDmsFaultInstanceActivity(dmsFaultInstanceActivity);
//存储图片
DmsFaultInstanceFile dmsFaultInstanceFile = new DmsFaultInstanceFile();
if (dmsBillsFaultInstance.getImgUrl()!=""&&dmsBillsFaultInstance.getImgUrl()!=null){
dmsFaultInstanceFile.setTargetId(dmsFaultInstanceActivity.getInstanceActivityId());
dmsFaultInstanceFile.setTargetType("1");
dmsFaultInstanceFile.setFaultFile(dmsBillsFaultInstance.getImgUrl());
dmsFaultInstanceFileMapper.insertDmsFaultInstanceFile(dmsFaultInstanceFile);}
return i;
}
@ -127,4 +171,27 @@ public class DmsBillsFaultInstanceServiceImpl implements IDmsBillsFaultInstanceS
{
return dmsBillsFaultInstanceMapper.deleteDmsBillsFaultInstanceByRepairInstanceId(repairInstanceId);
}
/**
* pda-
* */
public int insertDmsBillsFaultInstancePDA(DmsBillsFaultInstance dmsBillsFaultInstance){
//根据报修流程查询工单流程节点id
Long aLong = dmsBillsFaultInstanceMapper.selectProcessActivityId(102l);
int i = dmsBillsFaultInstanceMapper.insertDmsBillsFaultInstance(dmsBillsFaultInstance);
DmsFaultInstanceActivity dmsFaultInstanceActivity = new DmsFaultInstanceActivity();
//生成故障报修工单实例节点第一步
dmsFaultInstanceActivity.setRepairInstanceId(dmsBillsFaultInstance.getRepairInstanceId());
dmsFaultInstanceActivity.setFaultType(dmsBillsFaultInstance.getFaultType());
dmsFaultInstanceActivity.setFaultDescription(dmsBillsFaultInstance.getFaultDescription());
dmsFaultInstanceActivity.setDesignOperations(dmsBillsFaultInstance.getDesignOperations());
dmsFaultInstanceActivity.setDeviceId(dmsBillsFaultInstance.getDeviceId());
dmsFaultInstanceActivity.setRepairType(dmsBillsFaultInstance.getRepairType());
dmsFaultInstanceActivity.setOutsrcId(dmsBillsFaultInstance.getOutsrcId());
dmsFaultInstanceActivity.setProcessActivityId(aLong);
dmsFaultInstanceActivity.setProcessStepOrder(1l);
dmsFaultInstanceActivity.setCreateTime(DateUtils.getNowDate());
dmsFaultInstanceActivityMapper.insertDmsFaultInstanceActivity(dmsFaultInstanceActivity);
return i;
}
}

@ -1,10 +1,14 @@
package com.hw.dms.service.impl;
import java.text.SimpleDateFormat;
import java.util.List;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsBillsInspectInstanceActivity;
import com.hw.dms.mapper.DmsBillsInspectInstanceActivityMapper;
import com.hw.dms.mapper.DmsRepairInstanceMapper;
import com.hw.system.api.RemoteSysCommonService;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -27,6 +31,8 @@ public class DmsBillsInspectInstanceServiceImpl implements IDmsBillsInspectInsta
private DmsBillsInspectInstanceActivityMapper dmsBillsInspectInstanceActivityMapper;
@Autowired
private DmsRepairInstanceMapper dmsRepairInstanceMapper;
@Autowired
private RemoteSysCommonService remoteSysCommonService;
/**
*
@ -74,7 +80,11 @@ public class DmsBillsInspectInstanceServiceImpl implements IDmsBillsInspectInsta
LoginUser user = new LoginUser();
//写死105也可根据传入对象的wfprocessid作为传参。
Long aLong = dmsRepairInstanceMapper.selectWfProcessActivityId(105l);
dmsBillsInspectInstance.setWfProcessId(105l);
if (dmsBillsInspectInstance.getInspectType().equals("1")){
dmsBillsInspectInstance.setWfProcessId(105l);
}else if (dmsBillsInspectInstance.getInspectType().equals("2")){
dmsBillsInspectInstance.setWfProcessId(104l);
}
dmsBillsInspectInstance.setCreateTime(DateUtils.getNowDate());
dmsBillsInspectInstance.setIsFlag("1");
dmsBillsInspectInstance.setCreateBy(user.getUsername());
@ -128,4 +138,37 @@ public class DmsBillsInspectInstanceServiceImpl implements IDmsBillsInspectInsta
{
return dmsBillsInspectInstanceMapper.deleteDmsBillsInspectInstanceByInspectInstanceId(inspectInstanceId);
}
@Override
public int insertDmsBillsInspectInstancePDA(DmsBillsInspectInstance dmsBillsInspectInstance) {
Long along = null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHH");
if (dmsBillsInspectInstance.getInspectType().equals("1")){
dmsBillsInspectInstance.setWfProcessId(105l);
along = remoteSysCommonService.selectProcessActivityIdByWfProcessId(SecurityConstants.INNER,105l);
}
else if (dmsBillsInspectInstance.getInspectType().equals("2")){
dmsBillsInspectInstance.setWfProcessId(104l);
along = remoteSysCommonService.selectProcessActivityIdByWfProcessId(SecurityConstants.INNER,104l);
}
dmsBillsInspectInstance.setBillsInspectCode(sdf.format(DateUtils.getNowDate()));
dmsBillsInspectInstance.setInspectStatus("1");
dmsBillsInspectInstance.setIsFlag("1");
//创建点巡检工单实例节点第一步
int i = dmsBillsInspectInstanceMapper.insertDmsBillsInspectInstance(dmsBillsInspectInstance);
DmsBillsInspectInstanceActivity dmsBillsInspectInstanceActivity = new DmsBillsInspectInstanceActivity();
dmsBillsInspectInstanceActivity.setInspectInstanceId(dmsBillsInspectInstance.getInspectInstanceId());
dmsBillsInspectInstanceActivity.setProcessStepOrder(1l);
dmsBillsInspectInstanceActivity.setProcessActivityId(along);
dmsBillsInspectInstanceActivity.setInspectRouteId(dmsBillsInspectInstance.getInspectRouteId());
dmsBillsInspectInstanceActivity.setDeviceAmount(dmsBillsInspectInstance.getDeviceAmount());
dmsBillsInspectInstanceActivity.setPerformer(dmsBillsInspectInstance.getPerformer());
dmsBillsInspectInstanceActivity.setProcessHandleStatus("1");
dmsBillsInspectInstanceActivityMapper.insertDmsBillsInspectInstanceActivity(dmsBillsInspectInstanceActivity);
return 0;
}
}

@ -1,12 +1,16 @@
package com.hw.dms.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsBillsLubeInstanceActivity;
import com.hw.dms.domain.DmsPlanLube;
import com.hw.dms.mapper.DmsBillsLubeInstanceActivityMapper;
import com.hw.dms.mapper.DmsPlanLubeMapper;
import com.hw.system.api.RemoteSysCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsBillsLubeInstanceMapper;
@ -31,6 +35,8 @@ public class DmsBillsLubeInstanceServiceImpl implements IDmsBillsLubeInstanceSer
@Autowired
private DmsBillsLubeInstanceActivityMapper dmsBillsLubeInstanceActivityMapper;;
@Autowired
private RemoteSysCommonService remoteSysCommonService;
/**
*
*
@ -82,7 +88,6 @@ public class DmsBillsLubeInstanceServiceImpl implements IDmsBillsLubeInstanceSer
dmsBillsLubeInstanceActivity.setLubeSupervisor(dmsPlanLube.getLubeSupervisor());
dmsBillsLubeInstanceActivity.setLubeLevel(dmsPlanLube.getLubeLevel());
dmsBillsLubeInstanceActivity.setProcessStepOrder(1l);
dmsBillsLubeInstanceActivity.setProcessHandleResolution("无");
dmsBillsLubeInstanceActivityMapper.insertDmsBillsLubeInstanceActivity(dmsBillsLubeInstanceActivity);
return i;
}
@ -123,4 +128,22 @@ public class DmsBillsLubeInstanceServiceImpl implements IDmsBillsLubeInstanceSer
{
return dmsBillsLubeInstanceMapper.deleteDmsBillsLubeInstanceByLubeInstanceId(lubeInstanceId);
}
@Override
public int insertDmsBillsLubeInstancePDA(DmsBillsLubeInstance dmsBillsLubeInstance) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHH");
Long aLong= remoteSysCommonService.selectProcessActivityIdByWfProcessId(SecurityConstants.INNER, 106l);
dmsBillsLubeInstance.setBillsLubeCode(sdf.format(DateUtils.getNowDate()));
dmsBillsLubeInstance.setLubeStatus("1");
dmsBillsLubeInstance.setIsFlag("1");
//创建润滑工单实例节点
DmsBillsLubeInstanceActivity dmsBillsLubeInstanceActivity = new DmsBillsLubeInstanceActivity();
dmsBillsLubeInstanceActivity.setLubeInstanceId(dmsBillsLubeInstance.getLubeInstanceId());
dmsBillsLubeInstanceActivity.setProcessActivityId(aLong);
dmsBillsLubeInstanceActivity.setLubeGroup(dmsBillsLubeInstance.getLubeGroup());
dmsBillsLubeInstanceActivity.setLubeLevel(dmsBillsLubeInstance.getLubeLevel());
dmsBillsLubeInstanceActivity.setLubeSupervisor(dmsBillsLubeInstance.getLubeSupervisor());
return 0;
}
}

@ -0,0 +1,153 @@
package com.hw.dms.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsMaintInstanceActivity;
import com.hw.dms.domain.DmsPlanMaint;
import com.hw.dms.mapper.DmsMaintInstanceActivityMapper;
import com.hw.dms.mapper.DmsPlanMaintMapper;
import com.hw.system.api.RemoteSysCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsBillsMaintInstanceMapper;
import com.hw.dms.domain.DmsBillsMaintInstance;
import com.hw.dms.service.IDmsBillsMaintInstanceService;
/**
* Service
*
* @author Open Platform
* @date 2024-02-29
*/
@Service
public class DmsBillsMaintInstanceServiceImpl implements IDmsBillsMaintInstanceService
{
@Autowired
private DmsBillsMaintInstanceMapper dmsBillsMaintInstanceMapper;
@Autowired
private DmsPlanMaintMapper dmsPlanMaintMapper;
@Autowired
private DmsMaintInstanceActivityMapper dmsMaintInstanceActivityMapper;
@Autowired
private RemoteSysCommonService remoteSysCommonService;
/**
*
*
* @param maintInstanceId
* @return
*/
@Override
public DmsBillsMaintInstance selectDmsBillsMaintInstanceByMaintInstanceId(Long maintInstanceId)
{
return dmsBillsMaintInstanceMapper.selectDmsBillsMaintInstanceByMaintInstanceId(maintInstanceId);
}
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
@Override
public List<DmsBillsMaintInstance> selectDmsBillsMaintInstanceList(DmsBillsMaintInstance dmsBillsMaintInstance)
{
return dmsBillsMaintInstanceMapper.selectDmsBillsMaintInstanceList(dmsBillsMaintInstance);
}
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
@Override
public int insertDmsBillsMaintInstance(DmsBillsMaintInstance dmsBillsMaintInstance)
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm");
dmsBillsMaintInstance.setCreateTime(DateUtils.getNowDate());
DmsPlanMaint dmsPlanMaint = dmsPlanMaintMapper.selectDmsPlanMaintByPlanMaintId(dmsBillsMaintInstance.getPlanMaintId());
dmsBillsMaintInstance.setPlanBeginTime(dmsPlanMaint.getMaintTime());
dmsBillsMaintInstance.setBillsMaintCode(sdf.format(DateUtils.getNowDate()));
dmsBillsMaintInstance.setMaintStatus(1l);
Date lubeTime = dmsPlanMaint.getMaintTime();
Long timeLimit = dmsPlanMaint.getTimeLimit();
dmsBillsMaintInstance.setIsFlag(1l);
dmsBillsMaintInstance.setWfProcessId(103l);
dmsBillsMaintInstance.setPlanEndTime(new Date(lubeTime.getTime() + timeLimit*1000l));
int i = dmsBillsMaintInstanceMapper.insertDmsBillsMaintInstance(dmsBillsMaintInstance);
DmsMaintInstanceActivity maintInstanceActivity = new DmsMaintInstanceActivity();
maintInstanceActivity.setMaintInstanceId(dmsBillsMaintInstance.getMaintInstanceId());
maintInstanceActivity.setProcessActivityId(103l);
maintInstanceActivity.setMaintLevel(dmsPlanMaint.getMaintLevel());
maintInstanceActivity.setMaintGroup(dmsPlanMaint.getMaintGroup());
maintInstanceActivity.setMaintSupervisor(dmsPlanMaint.getMaintSupervisor());
maintInstanceActivity.setProcessStepOrder(1l);
dmsMaintInstanceActivityMapper.insertDmsMaintInstanceActivity(maintInstanceActivity);
return i;
}
/**
*
*
* @param dmsBillsMaintInstance
* @return
*/
@Override
public int updateDmsBillsMaintInstance(DmsBillsMaintInstance dmsBillsMaintInstance)
{
dmsBillsMaintInstance.setUpdateTime(DateUtils.getNowDate());
return dmsBillsMaintInstanceMapper.updateDmsBillsMaintInstance(dmsBillsMaintInstance);
}
/**
*
*
* @param maintInstanceIds
* @return
*/
@Override
public int deleteDmsBillsMaintInstanceByMaintInstanceIds(Long[] maintInstanceIds)
{
return dmsBillsMaintInstanceMapper.deleteDmsBillsMaintInstanceByMaintInstanceIds(maintInstanceIds);
}
/**
*
*
* @param maintInstanceId
* @return
*/
@Override
public int deleteDmsBillsMaintInstanceByMaintInstanceId(Long maintInstanceId)
{
return dmsBillsMaintInstanceMapper.deleteDmsBillsMaintInstanceByMaintInstanceId(maintInstanceId);
}
@Override
public int insertDmsBillsMaintInstancePDA(DmsBillsMaintInstance dmsBillsMaintInstance) {
Long aLong= remoteSysCommonService.selectProcessActivityIdByWfProcessId(SecurityConstants.INNER, 103l);
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHH");
dmsBillsMaintInstance.setWfProcessId(103l);
dmsBillsMaintInstance.setBillsMaintCode(sdf.format(DateUtils.getNowDate()));
dmsBillsMaintInstance.setMaintStatus(1l);
dmsBillsMaintInstance.setIsFlag(1l);
int i = dmsBillsMaintInstanceMapper.insertDmsBillsMaintInstance(dmsBillsMaintInstance);
//创建保养工单实例节点第一步
DmsMaintInstanceActivity dmsMaintInstanceActivity = new DmsMaintInstanceActivity();
dmsMaintInstanceActivity.setMaintInstanceId(dmsBillsMaintInstance.getMaintInstanceId());
dmsMaintInstanceActivity.setProcessActivityId(aLong);
dmsMaintInstanceActivity.setMaintGroup(dmsBillsMaintInstance.getMaintGroup());
dmsMaintInstanceActivity.setMaintLevel(dmsBillsMaintInstance.getMaintLevel());
dmsMaintInstanceActivity.setMaintSupervisor(dmsBillsMaintInstance.getMaintSupervisor());
dmsMaintInstanceActivity.setProcessStepOrder(1l);
dmsMaintInstanceActivity.setProcessHandleStatus("1");
dmsMaintInstanceActivityMapper.insertDmsMaintInstanceActivity(dmsMaintInstanceActivity);
return i;
}
}

@ -0,0 +1,95 @@
package com.hw.dms.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsFaultInstanceFileMapper;
import com.hw.dms.domain.DmsFaultInstanceFile;
import com.hw.dms.service.IDmsFaultInstanceFileService;
/**
* ;Service
*
* @author Open Platform
* @date 2024-02-29
*/
@Service
public class DmsFaultInstanceFileServiceImpl implements IDmsFaultInstanceFileService
{
@Autowired
private DmsFaultInstanceFileMapper dmsFaultInstanceFileMapper;
/**
* ;
*
* @param repairInstanceFileId ;
* @return ;
*/
@Override
public DmsFaultInstanceFile selectDmsFaultInstanceFileByRepairInstanceFileId(Long repairInstanceFileId)
{
return dmsFaultInstanceFileMapper.selectDmsFaultInstanceFileByRepairInstanceFileId(repairInstanceFileId);
}
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return ;
*/
@Override
public List<DmsFaultInstanceFile> selectDmsFaultInstanceFileList(DmsFaultInstanceFile dmsFaultInstanceFile)
{
return dmsFaultInstanceFileMapper.selectDmsFaultInstanceFileList(dmsFaultInstanceFile);
}
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return
*/
@Override
public int insertDmsFaultInstanceFile(DmsFaultInstanceFile dmsFaultInstanceFile)
{
if (dmsFaultInstanceFile!=null){
return dmsFaultInstanceFileMapper.insertDmsFaultInstanceFile(dmsFaultInstanceFile);}
return 0;
}
/**
* ;
*
* @param dmsFaultInstanceFile ;
* @return
*/
@Override
public int updateDmsFaultInstanceFile(DmsFaultInstanceFile dmsFaultInstanceFile)
{
return dmsFaultInstanceFileMapper.updateDmsFaultInstanceFile(dmsFaultInstanceFile);
}
/**
* ;
*
* @param repairInstanceFileIds ;
* @return
*/
@Override
public int deleteDmsFaultInstanceFileByRepairInstanceFileIds(Long[] repairInstanceFileIds)
{
return dmsFaultInstanceFileMapper.deleteDmsFaultInstanceFileByRepairInstanceFileIds(repairInstanceFileIds);
}
/**
* ;
*
* @param repairInstanceFileId ;
* @return
*/
@Override
public int deleteDmsFaultInstanceFileByRepairInstanceFileId(Long repairInstanceFileId)
{
return dmsFaultInstanceFileMapper.deleteDmsFaultInstanceFileByRepairInstanceFileId(repairInstanceFileId);
}
}

@ -0,0 +1,164 @@
package com.hw.dms.service.impl;
import java.util.Arrays;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsBillsMaintInstance;
import com.hw.dms.domain.DmsRepairInstance;
import com.hw.dms.domain.DmsRepairInstanceActivity;
import com.hw.dms.mapper.DmsBillsMaintInstanceMapper;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsMaintInstanceActivityMapper;
import com.hw.dms.domain.DmsMaintInstanceActivity;
import com.hw.dms.service.IDmsMaintInstanceActivityService;
/**
* Service
*
* @author Open Platform
* @date 2024-02-29
*/
@Service
public class DmsMaintInstanceActivityServiceImpl implements IDmsMaintInstanceActivityService
{
@Autowired
private DmsMaintInstanceActivityMapper dmsMaintInstanceActivityMapper;
@Autowired
private DmsBillsMaintInstanceMapper dmsBillsMaintInstanceMapper;
/**
*
*
* @param instanceActivityId
* @return
*/
@Override
public DmsMaintInstanceActivity selectDmsMaintInstanceActivityByInstanceActivityId(Long instanceActivityId)
{
return dmsMaintInstanceActivityMapper.selectDmsMaintInstanceActivityByInstanceActivityId(instanceActivityId);
}
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
@Override
public List<DmsMaintInstanceActivity> selectDmsMaintInstanceActivityList(DmsMaintInstanceActivity dmsMaintInstanceActivity)
{
return dmsMaintInstanceActivityMapper.selectDmsMaintInstanceActivityList(dmsMaintInstanceActivity);
}
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
@Override
public int insertDmsMaintInstanceActivity(DmsMaintInstanceActivity dmsMaintInstanceActivity)
{
LoginUser user = new LoginUser();
dmsMaintInstanceActivity.setCreateBy(user.getUsername());
dmsMaintInstanceActivity.setCreateTime(DateUtils.getNowDate());
dmsMaintInstanceActivity.setStartTime(DateUtils.getNowDate());
dmsMaintInstanceActivity.setProcessHandleStatus("2");
//如果是最后一步,则添加一条检修记录(检修记录暂时不用)
//创建步骤2时修改步骤1的状态处理人处理时间等数据
if (dmsMaintInstanceActivity.getProcessStepOrder()!=1){
//最后一步 直接将
if (dmsMaintInstanceActivity.getProcessStepOrder()==dmsMaintInstanceActivity.getWfLength()){
dmsMaintInstanceActivity.setEndTime(DateUtils.getNowDate());
dmsMaintInstanceActivity.setHandleUserId(user.getUserid());
dmsMaintInstanceActivity.setHandleBy(user.getUsername());
dmsMaintInstanceActivity.setHandleTime(DateUtils.getNowDate());
DmsMaintInstanceActivity dms = new DmsMaintInstanceActivity();
dms.setInstanceActivityId(dmsMaintInstanceActivity.getInstanceActivityId());
List<DmsMaintInstanceActivity> dmsMaintInstanceActivities = dmsMaintInstanceActivityMapper.selectDmsMaintInstanceActivityList(dms);
int i = dmsMaintInstanceActivityMapper.insertDmsMaintInstanceActivity(dmsMaintInstanceActivity);
for (DmsMaintInstanceActivity dmsRepairInstanceActivityFor:dmsMaintInstanceActivities){
dmsRepairInstanceActivityFor.setProcessHandleStatus("0");
dmsMaintInstanceActivityMapper.updateDmsMaintInstanceActivity(dmsRepairInstanceActivityFor);
}
DmsBillsMaintInstance dmsBillsMaintInstance = dmsBillsMaintInstanceMapper.selectDmsBillsMaintInstanceByMaintInstanceId(dmsMaintInstanceActivity.getMaintInstanceId());
dmsBillsMaintInstance.setBillsMaintCode("2");
dmsBillsMaintInstance.setRealEndTime(DateUtils.getNowDate());
dmsBillsMaintInstanceMapper.updateDmsBillsMaintInstance(dmsBillsMaintInstance);
// //更新本次计划时间,当上一个计划生成的工单结束时,本机计划时间为下一个计划工单的时间
// DmsPlanRepair dmsPlanRepair = dmsPlanRepairMapper.selectDmsPlanRepairByPlanRepairId(dmsRepairInstance.getPlanRepairId());
// //根据jobid获取cron表达式
// String cron = dmsPlanRepairMapper.getCron(dmsPlanRepair.getJobId());
// dmsPlanRepair.setRepairTime(CronUtils.getNextExecution(cron));
// dmsPlanRepairMapper.updateDmsPlanRepair(dmsPlanRepair);
return i;
}
//中间步骤
else {
if (dmsMaintInstanceActivity.getProcessStepOrder()==2){
DmsBillsMaintInstance dmsBillsMaintInstance = dmsBillsMaintInstanceMapper.selectDmsBillsMaintInstanceByMaintInstanceId(dmsMaintInstanceActivity.getMaintInstanceId());
dmsBillsMaintInstance.setRealBeginTime(DateUtils.getNowDate());
dmsBillsMaintInstanceMapper.updateDmsBillsMaintInstance(dmsBillsMaintInstance);
}
DmsMaintInstanceActivity dmsMaintInstanceActivityOrderSmall = new DmsMaintInstanceActivity();
dmsMaintInstanceActivityOrderSmall.setMaintInstanceId(dmsMaintInstanceActivity.getMaintInstanceId());
dmsMaintInstanceActivityOrderSmall.setProcessStepOrder(dmsMaintInstanceActivity.getProcessStepOrder() - 1);
List<DmsMaintInstanceActivity> dmsMaintInstanceActivities = dmsMaintInstanceActivityMapper.selectDmsMaintInstanceActivityList(dmsMaintInstanceActivityOrderSmall);
dmsMaintInstanceActivities.get(0).setProcessHandleStatus("3");
dmsMaintInstanceActivities.get(0).setEndTime(DateUtils.getNowDate());
dmsMaintInstanceActivities.get(0).setHandleBy(user.getUsername());
dmsMaintInstanceActivities.get(0).setHandleUserId(user.getUserid());
dmsMaintInstanceActivityMapper.updateDmsMaintInstanceActivity(dmsMaintInstanceActivities.get(0));
}
}
return dmsMaintInstanceActivityMapper.insertDmsMaintInstanceActivity(dmsMaintInstanceActivity);
}
/**
*
*
* @param dmsMaintInstanceActivity
* @return
*/
@Override
public int updateDmsMaintInstanceActivity(DmsMaintInstanceActivity dmsMaintInstanceActivity)
{
return dmsMaintInstanceActivityMapper.updateDmsMaintInstanceActivity(dmsMaintInstanceActivity);
}
/**
*
*
* @param instanceActivityIds
* @return
*/
@Override
public int deleteDmsMaintInstanceActivityByInstanceActivityIds(Long[] instanceActivityIds)
{
return dmsMaintInstanceActivityMapper.deleteDmsMaintInstanceActivityByInstanceActivityIds(instanceActivityIds);
}
/**
*
*
* @param instanceActivityId
* @return
*/
@Override
public int deleteDmsMaintInstanceActivityByInstanceActivityId(Long instanceActivityId)
{
return dmsMaintInstanceActivityMapper.deleteDmsMaintInstanceActivityByInstanceActivityId(instanceActivityId);
}
@Override
public boolean selectUserIdByDmsMaintInstanceActivityId(Long maintInstanceId, Long userId) {
Long[] longs = dmsMaintInstanceActivityMapper.selectUserIdByDmsMaintInstanceActivityId(maintInstanceId);
boolean contains = Arrays.asList(longs).contains(userId);
return contains;
}
}

@ -2,6 +2,7 @@ package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsPlanRepair;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -34,7 +35,19 @@ public class DmsPlanMaintServiceImpl implements IDmsPlanMaintService
@Override
public DmsPlanMaint selectDmsPlanMaintByPlanMaintId(Long planMaintId)
{
return dmsPlanMaintMapper.selectDmsPlanMaintByPlanMaintId(planMaintId);
DmsPlanMaint dmsPlanMaint = dmsPlanMaintMapper.selectDmsPlanMaintByPlanMaintId(planMaintId);
Long timeLimit = dmsPlanMaint.getTimeLimit();
if (timeLimit !=null){
Long days = timeLimit / (24 * 60 * 60l);
Long hours = timeLimit % (24 * 60 * 60l);
// System.out.println(days);
// System.out.println(hours);
dmsPlanMaint.setTimeLimitDays(days);
dmsPlanMaint.setTimeLimitHours(hours/(60*60l));
}
return dmsPlanMaint;
}
/**
@ -46,7 +59,15 @@ public class DmsPlanMaintServiceImpl implements IDmsPlanMaintService
@Override
public List<DmsPlanMaint> selectDmsPlanMaintList(DmsPlanMaint dmsPlanMaint)
{
return dmsPlanMaintMapper.selectDmsPlanMaintList(dmsPlanMaint);
List<DmsPlanMaint> dmsPlanMaints = dmsPlanMaintMapper.selectDmsPlanMaintList(dmsPlanMaint);
for (DmsPlanMaint d:dmsPlanMaints){
Long timeLimit = d.getTimeLimit();
d.setTimeLimitDays(timeLimit/(24*60*60L));
d.setTimeLimitHours((timeLimit%(24*60*60L))/(60*60l));
}
return dmsPlanMaints;
}
/**
@ -59,6 +80,8 @@ public class DmsPlanMaintServiceImpl implements IDmsPlanMaintService
@Override
public int insertDmsPlanMaint(DmsPlanMaint dmsPlanMaint)
{
dmsPlanMaint.setTimeLimit((dmsPlanMaint.getTimeLimitDays()*24*60*60)
+(dmsPlanMaint.getTimeLimitHours()*60*60));
dmsPlanMaint.setIsFlag(1l);
LoginUser user = new LoginUser();
dmsPlanMaint.setCreateBy(user.getUsername());

@ -115,6 +115,7 @@ public class DmsRepairInstanceServiceImpl implements IDmsRepairInstanceService
}
dmsRepairInstance.setApplyBy(user.getUsername());
dmsRepairInstance.setApplyTime(DateUtils.getNowDate());
dmsRepairInstance.setWfProcessId(101l);
int flag = dmsRepairInstanceMapper.insertDmsRepairInstance(dmsRepairInstance);
//创建工单时新建工单实例节点
@ -193,6 +194,29 @@ public class DmsRepairInstanceServiceImpl implements IDmsRepairInstanceService
return dmsRepairInstanceMapper.deleteDmsRepairInstanceByRepairInstanceId(repairInstanceId);
}
@Override
public int insertDmsRepairInstancePDA(DmsRepairInstance dmsRepairInstance) {
Long aLong= remoteSysCommonService.selectProcessActivityIdByWfProcessId(SecurityConstants.INNER, 101l);
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHH");
dmsRepairInstance.setWfProcessId(101l);
dmsRepairInstance.setBillsRepairCode(sdf.format(DateUtils.getNowDate()));
dmsRepairInstance.setBillsStatus("0");
dmsRepairInstance.setInstanceType("1");
dmsRepairInstance.setIsFlag("1");
int i = dmsRepairInstanceMapper.insertDmsRepairInstance(dmsRepairInstance);
//创建工单实例节点
DmsRepairInstanceActivity dmsRepairInstanceActivity = new DmsRepairInstanceActivity();
dmsRepairInstanceActivity.setRepairInstanceId(dmsRepairInstance.getRepairInstanceId());
dmsRepairInstanceActivity.setProcessActivityId(aLong);
dmsRepairInstanceActivity.setRepairType(dmsRepairInstance.getRepairType());
dmsRepairInstanceActivity.setRepairGroup(dmsRepairInstance.getRepairGroup());
dmsRepairInstanceActivity.setRepairSupervisor(dmsRepairInstance.getRepairSupervisor());
dmsRepairInstanceActivity.setProcessStepOrder(1l);
dmsRepairInstanceActivity.setProcessHandleStatus("1");
dmsRepairInstanceActivityMapper.insertDmsRepairInstanceActivity(dmsRepairInstanceActivity);
return i;
}
// public static void main(String[] args) {
//
// SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");

@ -23,10 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="deviceId" column="device_id" />
</resultMap>
<sql id="selectDmsBillsFaultInstanceVo">
select repair_instance_id, fault_source_type, fault_source_id, wf_process_id, bills_fault_code, bills_status, apply_user, apply_time, real_begin_time, real_end_time, require_end_time, instance_type, is_flag, remark, create_by, create_time, update_by, update_time from dms_bills_fault_instance
select repair_instance_id, fault_source_type, fault_source_id, wf_process_id, bills_fault_code, bills_status, apply_user, apply_time, real_begin_time, real_end_time, require_end_time, instance_type, is_flag, remark, create_by, create_time, update_by, update_time,device_id from dms_bills_fault_instance
</sql>
<select id="selectDmsBillsFaultInstanceList" parameterType="DmsBillsFaultInstance" resultMap="DmsBillsFaultInstanceResult">
@ -45,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="requireEndTime != null "> and require_end_time = #{requireEndTime}</if>
<if test="instanceType != null and instanceType != ''"> and instance_type = #{instanceType}</if>
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
</where>
</select>
@ -73,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="deviceId != null">device_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="faultSourceType != null">#{faultSourceType},</if>
@ -92,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="deviceId != null">#{deviceId},</if>
</trim>
</insert>
@ -115,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="deviceId != null">device_id = #{deviceId},</if>
</trim>
where repair_instance_id = #{repairInstanceId}
</update>
@ -129,4 +135,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{repairInstanceId}
</foreach>
</delete>
<select id="selectProcessActivityId" parameterType="Long" resultType="Long">
select min(process_activity_id) from wf_process_activity where wf_process_id = #{wfProcessId}
</select>
</mapper>

@ -0,0 +1,121 @@
<?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.dms.mapper.DmsBillsMaintInstanceMapper">
<resultMap type="DmsBillsMaintInstance" id="DmsBillsMaintInstanceResult">
<result property="maintInstanceId" column="maint_instance_id" />
<result property="planMaintId" column="plan_maint_id" />
<result property="wfProcessId" column="wf_process_id" />
<result property="billsMaintCode" column="bills_maint_code" />
<result property="planBeginTime" column="plan_begin_time" />
<result property="realBeginTime" column="real_begin_time" />
<result property="planEndTime" column="plan_end_time" />
<result property="realEndTime" column="real_end_time" />
<result property="maintStatus" column="maint_status" />
<result property="maintCompRate" column="maint_comp_rate" />
<result property="isFlag" column="is_flag" />
<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>
<sql id="selectDmsBillsMaintInstanceVo">
select maint_instance_id, plan_maint_id, wf_process_id, bills_maint_code, plan_begin_time, real_begin_time, plan_end_time, real_end_time, maint_status, maint_comp_rate, is_flag, remark, create_by, create_time, update_by, update_time from dms_bills_maint_instance
</sql>
<select id="selectDmsBillsMaintInstanceList" parameterType="DmsBillsMaintInstance" resultMap="DmsBillsMaintInstanceResult">
<include refid="selectDmsBillsMaintInstanceVo"/>
<where>
<if test="planMaintId != null "> and plan_maint_id = #{planMaintId}</if>
<if test="wfProcessId != null "> and wf_process_id = #{wfProcessId}</if>
<if test="billsMaintCode != null and billsMaintCode != ''"> and bills_maint_code = #{billsMaintCode}</if>
<if test="planBeginTime != null "> and plan_begin_time = #{planBeginTime}</if>
<if test="realBeginTime != null "> and real_begin_time = #{realBeginTime}</if>
<if test="planEndTime != null "> and plan_end_time = #{planEndTime}</if>
<if test="realEndTime != null "> and real_end_time = #{realEndTime}</if>
<if test="maintStatus != null "> and maint_status = #{maintStatus}</if>
<if test="maintCompRate != null "> and maint_comp_rate = #{maintCompRate}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
</where>
</select>
<select id="selectDmsBillsMaintInstanceByMaintInstanceId" parameterType="Long" resultMap="DmsBillsMaintInstanceResult">
<include refid="selectDmsBillsMaintInstanceVo"/>
where maint_instance_id = #{maintInstanceId}
</select>
<insert id="insertDmsBillsMaintInstance" parameterType="DmsBillsMaintInstance" useGeneratedKeys="true" keyProperty="maintInstanceId">
insert into dms_bills_maint_instance
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="planMaintId != null">plan_maint_id,</if>
<if test="wfProcessId != null">wf_process_id,</if>
<if test="billsMaintCode != null and billsMaintCode != ''">bills_maint_code,</if>
<if test="planBeginTime != null">plan_begin_time,</if>
<if test="realBeginTime != null">real_begin_time,</if>
<if test="planEndTime != null">plan_end_time,</if>
<if test="realEndTime != null">real_end_time,</if>
<if test="maintStatus != null">maint_status,</if>
<if test="maintCompRate != null">maint_comp_rate,</if>
<if test="isFlag != null">is_flag,</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="planMaintId != null">#{planMaintId},</if>
<if test="wfProcessId != null">#{wfProcessId},</if>
<if test="billsMaintCode != null and billsMaintCode != ''">#{billsMaintCode},</if>
<if test="planBeginTime != null">#{planBeginTime},</if>
<if test="realBeginTime != null">#{realBeginTime},</if>
<if test="planEndTime != null">#{planEndTime},</if>
<if test="realEndTime != null">#{realEndTime},</if>
<if test="maintStatus != null">#{maintStatus},</if>
<if test="maintCompRate != null">#{maintCompRate},</if>
<if test="isFlag != null">#{isFlag},</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="updateDmsBillsMaintInstance" parameterType="DmsBillsMaintInstance">
update dms_bills_maint_instance
<trim prefix="SET" suffixOverrides=",">
<if test="planMaintId != null">plan_maint_id = #{planMaintId},</if>
<if test="wfProcessId != null">wf_process_id = #{wfProcessId},</if>
<if test="billsMaintCode != null and billsMaintCode != ''">bills_maint_code = #{billsMaintCode},</if>
<if test="planBeginTime != null">plan_begin_time = #{planBeginTime},</if>
<if test="realBeginTime != null">real_begin_time = #{realBeginTime},</if>
<if test="planEndTime != null">plan_end_time = #{planEndTime},</if>
<if test="realEndTime != null">real_end_time = #{realEndTime},</if>
<if test="maintStatus != null">maint_status = #{maintStatus},</if>
<if test="maintCompRate != null">maint_comp_rate = #{maintCompRate},</if>
<if test="isFlag != null">is_flag = #{isFlag},</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 maint_instance_id = #{maintInstanceId}
</update>
<delete id="deleteDmsBillsMaintInstanceByMaintInstanceId" parameterType="Long">
delete from dms_bills_maint_instance where maint_instance_id = #{maintInstanceId}
</delete>
<delete id="deleteDmsBillsMaintInstanceByMaintInstanceIds" parameterType="String">
delete from dms_bills_maint_instance where maint_instance_id in
<foreach item="maintInstanceId" collection="array" open="(" separator="," close=")">
#{maintInstanceId}
</foreach>
</delete>
</mapper>

@ -159,4 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from dms_fault_instance_activity
where repair_instance_id=#{repairInstanceId})))
</select>
<select id="selectDmsFaultInstanceActivityByRepairIdMin" parameterType="Long" resultMap="DmsFaultInstanceActivityResult">
select * from dms_fault_instance_activity where instance_activity_id = (select min(instance_activity_id) FROM dms_fault_instance_activity where repair_instance_id = #{repairInstanceId})
</select>
</mapper>

@ -0,0 +1,71 @@
<?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.dms.mapper.DmsFaultInstanceFileMapper">
<resultMap type="DmsFaultInstanceFile" id="DmsFaultInstanceFileResult">
<result property="repairInstanceFileId" column="repair_instance_file_id" />
<result property="targetType" column="target_type" />
<result property="targetId" column="target_id" />
<result property="faultFile" column="fault_file" />
</resultMap>
<sql id="selectDmsFaultInstanceFileVo">
select repair_instance_file_id, target_type, target_id, fault_file from dms_fault_instance_file
</sql>
<select id="selectDmsFaultInstanceFileList" parameterType="DmsFaultInstanceFile" resultMap="DmsFaultInstanceFileResult">
<include refid="selectDmsFaultInstanceFileVo"/>
<where>
<if test="targetType != null and targetType != ''"> and target_type = #{targetType}</if>
<if test="targetId != null "> and target_id = #{targetId}</if>
<if test="faultFile != null and faultFile != ''"> and fault_file = #{faultFile}</if>
</where>
</select>
<select id="selectDmsFaultInstanceFileByRepairInstanceFileId" parameterType="Long" resultMap="DmsFaultInstanceFileResult">
<include refid="selectDmsFaultInstanceFileVo"/>
where repair_instance_file_id = #{repairInstanceFileId}
</select>
<insert id="insertDmsFaultInstanceFile" parameterType="DmsFaultInstanceFile" useGeneratedKeys="true" keyProperty="repairInstanceFileId">
insert into dms_fault_instance_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="targetType != null and targetType != ''">target_type,</if>
<if test="targetId != null">target_id,</if>
<if test="faultFile != null and faultFile != ''">fault_file,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="targetType != null and targetType != ''">#{targetType},</if>
<if test="targetId != null">#{targetId},</if>
<if test="faultFile != null and faultFile != ''">#{faultFile},</if>
</trim>
</insert>
<update id="updateDmsFaultInstanceFile" parameterType="DmsFaultInstanceFile">
update dms_fault_instance_file
<trim prefix="SET" suffixOverrides=",">
<if test="targetType != null and targetType != ''">target_type = #{targetType},</if>
<if test="targetId != null">target_id = #{targetId},</if>
<if test="faultFile != null and faultFile != ''">fault_file = #{faultFile},</if>
</trim>
where repair_instance_file_id = #{repairInstanceFileId}
</update>
<delete id="deleteDmsFaultInstanceFileByRepairInstanceFileId" parameterType="Long">
delete from dms_fault_instance_file where repair_instance_file_id = #{repairInstanceFileId}
</delete>
<delete id="deleteDmsFaultInstanceFileByRepairInstanceFileIds" parameterType="String">
delete from dms_fault_instance_file where repair_instance_file_id in
<foreach item="repairInstanceFileId" collection="array" open="(" separator="," close=")">
#{repairInstanceFileId}
</foreach>
</delete>
<select id="selectDmsFaultInstanceFileByFaultId" parameterType="Long" resultMap="DmsFaultInstanceFileResult">
select * from dms_fault_instance_file where target_id = (
select min(instance_activity_id) from dms_fault_instance_activity where repair_instance_id = #{repairInstanceId}
)
</select>
</mapper>

@ -0,0 +1,148 @@
<?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.dms.mapper.DmsMaintInstanceActivityMapper">
<resultMap type="DmsMaintInstanceActivity" id="DmsMaintInstanceActivityResult">
<result property="instanceActivityId" column="instance_activity_id" />
<result property="maintInstanceId" column="maint_instance_id" />
<result property="processActivityId" column="process_activity_id" />
<result property="maintLevel" column="maint_level" />
<result property="maintGroup" column="maint_group" />
<result property="maintSupervisor" column="maint_supervisor" />
<result property="processHandleResolution" column="process_handle_resolution" />
<result property="remark" column="remark" />
<result property="processHandleStatus" column="process_handle_status" />
<result property="processStepOrder" column="process_step_order" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="handleUserId" column="handle_user_id" />
<result property="handleBy" column="handle_by" />
<result property="handleTime" column="handle_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="transferUserId" column="transfer_user_id" />
<result property="attr1" column="attr1" />
</resultMap>
<sql id="selectDmsMaintInstanceActivityVo">
select instance_activity_id, maint_instance_id, process_activity_id, maint_level, maint_group, maint_supervisor, process_handle_resolution, remark, process_handle_status, process_step_order, start_time, end_time, handle_user_id, handle_by, handle_time, create_by, create_time, transfer_user_id, attr1 from dms_maint_instance_activity
</sql>
<select id="selectDmsMaintInstanceActivityList" parameterType="DmsMaintInstanceActivity" resultMap="DmsMaintInstanceActivityResult">
<include refid="selectDmsMaintInstanceActivityVo"/>
<where>
<if test="maintInstanceId != null "> and maint_instance_id = #{maintInstanceId}</if>
<if test="processActivityId != null "> and process_activity_id = #{processActivityId}</if>
<if test="maintLevel != null "> and maint_level = #{maintLevel}</if>
<if test="maintGroup != null and maintGroup != ''"> and maint_group = #{maintGroup}</if>
<if test="maintSupervisor != null and maintSupervisor != ''"> and maint_supervisor = #{maintSupervisor}</if>
<if test="processHandleResolution != null and processHandleResolution != ''"> and process_handle_resolution = #{processHandleResolution}</if>
<if test="processHandleStatus != null and processHandleStatus != ''"> and process_handle_status = #{processHandleStatus}</if>
<if test="processStepOrder != null "> and process_step_order = #{processStepOrder}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="handleUserId != null "> and handle_user_id = #{handleUserId}</if>
<if test="handleBy != null and handleBy != ''"> and handle_by = #{handleBy}</if>
<if test="handleTime != null "> and handle_time = #{handleTime}</if>
<if test="transferUserId != null "> and transfer_user_id = #{transferUserId}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
</where>
</select>
<select id="selectDmsMaintInstanceActivityByInstanceActivityId" parameterType="Long" resultMap="DmsMaintInstanceActivityResult">
<include refid="selectDmsMaintInstanceActivityVo"/>
where instance_activity_id = #{instanceActivityId}
</select>
<insert id="insertDmsMaintInstanceActivity" parameterType="DmsMaintInstanceActivity" useGeneratedKeys="true" keyProperty="instanceActivityId">
insert into dms_maint_instance_activity
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="maintInstanceId != null">maint_instance_id,</if>
<if test="processActivityId != null">process_activity_id,</if>
<if test="maintLevel != null">maint_level,</if>
<if test="maintGroup != null">maint_group,</if>
<if test="maintSupervisor != null">maint_supervisor,</if>
<if test="processHandleResolution != null and processHandleResolution != ''">process_handle_resolution,</if>
<if test="remark != null">remark,</if>
<if test="processHandleStatus != null">process_handle_status,</if>
<if test="processStepOrder != null">process_step_order,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="handleUserId != null">handle_user_id,</if>
<if test="handleBy != null">handle_by,</if>
<if test="handleTime != null">handle_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="transferUserId != null">transfer_user_id,</if>
<if test="attr1 != null">attr1,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="maintInstanceId != null">#{maintInstanceId},</if>
<if test="processActivityId != null">#{processActivityId},</if>
<if test="maintLevel != null">#{maintLevel},</if>
<if test="maintGroup != null">#{maintGroup},</if>
<if test="maintSupervisor != null">#{maintSupervisor},</if>
<if test="processHandleResolution != null and processHandleResolution != ''">#{processHandleResolution},</if>
<if test="remark != null">#{remark},</if>
<if test="processHandleStatus != null">#{processHandleStatus},</if>
<if test="processStepOrder != null">#{processStepOrder},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="handleUserId != null">#{handleUserId},</if>
<if test="handleBy != null">#{handleBy},</if>
<if test="handleTime != null">#{handleTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="transferUserId != null">#{transferUserId},</if>
<if test="attr1 != null">#{attr1},</if>
</trim>
</insert>
<update id="updateDmsMaintInstanceActivity" parameterType="DmsMaintInstanceActivity">
update dms_maint_instance_activity
<trim prefix="SET" suffixOverrides=",">
<if test="maintInstanceId != null">maint_instance_id = #{maintInstanceId},</if>
<if test="processActivityId != null">process_activity_id = #{processActivityId},</if>
<if test="maintLevel != null">maint_level = #{maintLevel},</if>
<if test="maintGroup != null">maint_group = #{maintGroup},</if>
<if test="maintSupervisor != null">maint_supervisor = #{maintSupervisor},</if>
<if test="processHandleResolution != null and processHandleResolution != ''">process_handle_resolution = #{processHandleResolution},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="processHandleStatus != null">process_handle_status = #{processHandleStatus},</if>
<if test="processStepOrder != null">process_step_order = #{processStepOrder},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="handleUserId != null">handle_user_id = #{handleUserId},</if>
<if test="handleBy != null">handle_by = #{handleBy},</if>
<if test="handleTime != null">handle_time = #{handleTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="transferUserId != null">transfer_user_id = #{transferUserId},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
</trim>
where instance_activity_id = #{instanceActivityId}
</update>
<delete id="deleteDmsMaintInstanceActivityByInstanceActivityId" parameterType="Long">
delete from dms_maint_instance_activity where instance_activity_id = #{instanceActivityId}
</delete>
<delete id="deleteDmsMaintInstanceActivityByInstanceActivityIds" parameterType="String">
delete from dms_maint_instance_activity where instance_activity_id in
<foreach item="instanceActivityId" collection="array" open="(" separator="," close=")">
#{instanceActivityId}
</foreach>
</delete>
<!-- 先查询出该工单审批到了第几步然后根据步骤查询拥有权限的对象id集合 -->
<select id="selectUserIdByDmsMaintInstanceActivityId" parameterType="Long" resultType="java.lang.Long">
select auth_target_id from wf_process_activity_auth where process_activity_id =(
select process_activity_id from wf_process_activity
where wf_process_id = 103
and process_activity_order = (1+(select max(process_step_order)
from dms_maint_instance_activity
where maint_instance_id=#{maintInstanceId})))
</select>
</mapper>

@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="maintGroup" column="maint_group" />
<result property="maintSupervisor" column="maint_supervisor" />
<result property="maintTime" column="maint_time" />
<result property="jobId" column="job_id" />
<result property="timeLimit" column="time_limit" />
<result property="cyclePeriod" column="cycle_period" />
<result property="maintStatus" column="maint_status" />
<result property="createMethod" column="create_method" />
@ -31,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="planMaintId" column="sub_plan_maint_id" />
<result property="deviceId" column="sub_device_id" />
<result property="maintStationId" column="sub_maint_station_id" />
<result property="maintProtocol" column="sub_maint_protocol" />
<result property="maintStandardId" column="maint_standard_id" />
<result property="operationDescription" column="sub_operation_description" />
<result property="isFlag" column="sub_is_flag" />
<result property="remark" column="sub_remark" />
@ -42,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDmsPlanMaintVo">
select plan_maint_id, plan_maint_code, maint_level, maint_group, maint_supervisor, maint_time, cycle_period, maint_status, create_method, is_flag, remark, create_by, create_time, update_by, update_time from dms_plan_maint
select plan_maint_id, plan_maint_code, maint_level, maint_group, maint_supervisor, maint_time,job_id,time_limit, cycle_period, maint_status, create_method, is_flag, remark, create_by, create_time, update_by, update_time from dms_plan_maint
</sql>
<select id="selectDmsPlanMaintList" parameterType="DmsPlanMaint" resultMap="DmsPlanMaintResult">
@ -62,8 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDmsPlanMaintByPlanMaintId" parameterType="Long" resultMap="DmsPlanMaintDmsPlanMaintDetailResult">
select a.plan_maint_id, a.plan_maint_code, a.maint_level, a.maint_group, a.maint_supervisor, a.maint_time, a.cycle_period, a.maint_status, a.create_method, a.is_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,
b.plan_maint_detail_id as sub_plan_maint_detail_id, b.plan_maint_id as sub_plan_maint_id, b.device_id as sub_device_id, b.maint_station_id as sub_maint_station_id, b.maint_protocol as sub_maint_protocol, b.operation_description as sub_operation_description, b.is_flag as sub_is_flag, b.remark as sub_remark, 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
select a.plan_maint_id, a.plan_maint_code, a.maint_level, a.maint_group, a.maint_supervisor, a.maint_time,a.time_limit,a.job_id, a.cycle_period, a.maint_status, a.create_method, a.is_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,
b.plan_maint_detail_id as sub_plan_maint_detail_id, b.plan_maint_id as sub_plan_maint_id, b.device_id as sub_device_id, b.maint_station_id as sub_maint_station_id, b.maint_standard_id as sub_maint_protocol, b.operation_description as sub_operation_description, b.is_flag as sub_is_flag, b.remark as sub_remark, 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 dms_plan_maint a
left join dms_plan_maint_detail b on b.plan_maint_id = a.plan_maint_id
where a.plan_maint_id = #{planMaintId}
@ -77,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maintGroup != null">maint_group,</if>
<if test="maintSupervisor != null">maint_supervisor,</if>
<if test="maintTime != null">maint_time,</if>
<if test="timeLimit != null">time_limit,</if>
<if test="jobId != null">job_id,</if>
<if test="cyclePeriod != null">cycle_period,</if>
<if test="maintStatus != null">maint_status,</if>
<if test="createMethod != null">create_method,</if>
@ -93,6 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maintGroup != null">#{maintGroup},</if>
<if test="maintSupervisor != null">#{maintSupervisor},</if>
<if test="maintTime != null">#{maintTime},</if>
<if test="timeLimit != null">#{timeLimit},</if>
<if test="jobId != null">#{jobId},</if>
<if test="cyclePeriod != null">#{cyclePeriod},</if>
<if test="maintStatus != null">#{maintStatus},</if>
<if test="createMethod != null">#{createMethod},</if>
@ -113,6 +119,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maintGroup != null">maint_group = #{maintGroup},</if>
<if test="maintSupervisor != null">maint_supervisor = #{maintSupervisor},</if>
<if test="maintTime != null">maint_time = #{maintTime},</if>
<if test="timeLimit != null">time_limit = #{timeLimit},</if>
<if test="jobId != null">job_id = #{jobId},</if>
<if test="cyclePeriod != null">cycle_period = #{cyclePeriod},</if>
<if test="maintStatus != null">maint_status = #{maintStatus},</if>
<if test="createMethod != null">create_method = #{createMethod},</if>

@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDmsRepairInstanceVo">
select repair_instance_id, plan_repair_id, wf_process_id, bills_repair_code, bills_status, plan_begin_time, real_begin_time, plan_end_time, real_end_time, repair_comp_rate, instance_type, is_flag, remark, apply_by, apply_time, update_by, update_time from dms_repair_instance
</sql>

@ -60,5 +60,10 @@ public class RyTask
System.out.println("++创建润滑工单++getDmsRepairInstance");
remoteDmsService.getDmsBillsLube(SecurityConstants.INNER, planInspectId);
}
public void getDmsBillsMaint(String dmsBillsMaintId){
System.out.println("++创建保养工单++getDmsMaintInstance");
remoteDmsService.getDmsBillsMaintInstance(SecurityConstants.INNER,dmsBillsMaintId);
}
}

@ -4,6 +4,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.hw.system.api.domain.common.WfProcessActivity;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -102,4 +103,12 @@ public class WfProcessActivityController extends BaseController
{
return toAjax(wfProcessActivityService.deleteWfProcessActivityByProcessActivityIds(processActivityIds));
}
/**
* wfidid
* */
@PostMapping("/selectProcessActivityIdByWfProcessId")
public Long selectProcessActivityIdByWfProcessId(@RequestBody Long wfProcessId){
return wfProcessActivityService.selectProcessActivityIdByWfProcessId(wfProcessId);
// return 200l;
}
}

@ -85,4 +85,7 @@ public interface WfProcessActivityMapper
* @return
*/
public int deleteWfProcessActivityAuthByProcessActivityId(Long processActivityId);
Long selectProcessActivityIdByWfProcessId(Long wfProcessId);
}

@ -59,4 +59,6 @@ public interface IWfProcessActivityService
* @return
*/
public int deleteWfProcessActivityByProcessActivityId(Long processActivityId);
Long selectProcessActivityIdByWfProcessId(Long wfProcessId);
}

@ -138,6 +138,11 @@ public class WfProcessActivityServiceImpl implements IWfProcessActivityService
return wfProcessActivityMapper.deleteWfProcessActivityByProcessActivityId(processActivityId);
}
@Override
public Long selectProcessActivityIdByWfProcessId(Long wfProcessId) {
return wfProcessActivityMapper.selectProcessActivityIdByWfProcessId(wfProcessId);
}
/**
*
*

@ -160,4 +160,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
( #{item.processActivityAuthId}, #{item.processActivityId}, #{item.authTargetType}, #{item.authTargetId}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
</foreach>
</insert>
<select id="selectProcessActivityIdByWfProcessId" parameterType="Long" resultType="Long">
select min(process_activity_id) from wf_process_activity where wf_process_id = #{wfProcessId}
</select>
</mapper>

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询保养工单列表
export function listDmsBillsMaintInstance(query) {
return request({
url: '/dms/dmsBillsMaintInstance/list',
method: 'get',
params: query
})
}
// 查询保养工单详细
export function getDmsBillsMaintInstance(maintInstanceId) {
return request({
url: '/dms/dmsBillsMaintInstance/' + maintInstanceId,
method: 'get'
})
}
// 新增保养工单
export function addDmsBillsMaintInstance(data) {
return request({
url: '/dms/dmsBillsMaintInstance',
method: 'post',
data: data
})
}
// 修改保养工单
export function updateDmsBillsMaintInstance(data) {
return request({
url: '/dms/dmsBillsMaintInstance',
method: 'put',
data: data
})
}
// 删除保养工单
export function delDmsBillsMaintInstance(maintInstanceId) {
return request({
url: '/dms/dmsBillsMaintInstance/' + maintInstanceId,
method: 'delete'
})
}

@ -0,0 +1,51 @@
import request from '@/utils/request'
// 查询保养工单实例节点列表
export function listDmsMaintInstanceActivity(query) {
return request({
url: '/dms/dmsMaintInstanceActivity/list',
method: 'get',
params: query
})
}
// 查询保养工单实例节点详细
export function getDmsMaintInstanceActivity(instanceActivityId) {
return request({
url: '/dms/dmsMaintInstanceActivity/' + instanceActivityId,
method: 'get'
})
}
// 新增保养工单实例节点
export function addDmsMaintInstanceActivity(data) {
return request({
url: '/dms/dmsMaintInstanceActivity',
method: 'post',
data: data
})
}
// 修改保养工单实例节点
export function updateDmsMaintInstanceActivity(data) {
return request({
url: '/dms/dmsMaintInstanceActivity',
method: 'put',
data: data
})
}
// 删除保养工单实例节点
export function delDmsMaintInstanceActivity(instanceActivityId) {
return request({
url: '/dms/dmsMaintInstanceActivity/' + instanceActivityId,
method: 'delete'
})
}
export function selectUserIdByDmsMaintInstanceActivityId(maintInstanceId,userId) {
return request({
url:`/dms/dmsMaintInstanceActivity/selectUserIdByDmsMaintInstanceActivityId/${maintInstanceId}/userId/${userId}`,
method:'get'
})
}

@ -334,6 +334,7 @@ export default {
this.resultList.push('最近100年内只有上面' + resultArr.length + '条结果!')
}
}
// -
this.isShow = true;

@ -264,7 +264,7 @@ export const dynamicRoutes = [
path: "index/:repairInstanceId(\\d+)",
component: () => import("@/views/dms/repairInstanceActivity/index"),
name: "childInstanceUpdate",
meta: { title: "工单审批", activeMenu: "/repairInstanceActivity" },
meta: { title: "工单处理", activeMenu: "/repairInstanceActivity" },
},
],
},
@ -323,7 +323,7 @@ export const dynamicRoutes = [
path: "index/:inspectInstanceId(\\d+)",
component: () => import("@/views/dms/dmsBillsInspectActivity/index"),
name: "childDmsBillsInspectActivity",
meta: { title: "工单审批", activeMenu: "/dmsBillsInspectActivity" },
meta: { title: "工单处理", activeMenu: "/dmsBillsInspectActivity" },
},
],
},
@ -339,7 +339,7 @@ export const dynamicRoutes = [
path: "index/:inspectInstanceId(\\d+)",
component: () => import("@/views/dms/dmsBillsInspectActivity/index"),
name: "selectDmsBillsInspectActivity",
meta: { title: "工单审批", activeMenu: "/dmsBillsInspectActivity" },
meta: { title: "工单处理", activeMenu: "/dmsBillsInspectActivity" },
},
],
},
@ -354,7 +354,7 @@ export const dynamicRoutes = [
path: "index/:lubeInstanceId(\\d+)",
component: () => import("@/views/dms/dmsBillsLubeInstanceActivity/index"),
name: "childDmsBillsLubeInstanceActivity",
meta: { title: "工单审批", activeMenu: "/dmsBillsLubeInstanceActivity" },
meta: { title: "工单处理", activeMenu: "/dmsBillsLubeInstanceActivity" },
},
],
},
@ -369,7 +369,7 @@ export const dynamicRoutes = [
path: "index/:lubeInstanceId(\\d+)",
component: () => import("@/views/dms/dmsBillsLubeInstanceActivity/index"),
name: "selectChildDmsBillsLubeInstanceActivity",
meta: { title: "工单审批", activeMenu: "/dmsBillsLubeInstanceActivity" },
meta: { title: "工单处理", activeMenu: "/dmsBillsLubeInstanceActivity" },
},
],
},
@ -384,7 +384,22 @@ export const dynamicRoutes = [
path: "index/:repairInstanceId(\\d+)",
component: () => import("@/views/dms/activity/index"),
name: "childDmsFaultInstanceActivity",
meta: { title: "工单审批", activeMenu: "/activity" },
meta: { title: "工单处理", activeMenu: "/activity" },
},
],
},
//审批保养工单路由
{
path: "/dms/dmsMaintInstanceActivity",
component: Layout,
hidden: true,
permissions: ["tool:gen:edit"],
children: [
{
path: "index/:maintInstanceId(\\d+)",
component: () => import("@/views/dms/dmsMaintInstanceActivity/index"),
name: "childDmsMaintInstanceActivity",
meta: { title: "工单处理", activeMenu: "/dmsMaintInstanceActivity" },
},
],
},

@ -1,78 +1,18 @@
<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="报修来源ID根据报修来源类型关联来源主键" prop="faultSourceId">
<el-input
v-model="queryParams.faultSourceId"
placeholder="请输入报修来源ID根据报修来源类型关联来源主键"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单流程ID关联wf_process的wf_process_id" prop="wfProcessId">
<el-input
v-model="queryParams.wfProcessId"
placeholder="请输入工单流程ID关联wf_process的wf_process_id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单编号" prop="billsFaultCode">
<el-input
v-model="queryParams.billsFaultCode"
placeholder="请输入工单编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请人" prop="applyUser">
<el-input
v-model="queryParams.applyUser"
placeholder="请输入申请人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="申请时间" prop="applyTime">
<el-date-picker clearable
v-model="queryParams.applyTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择申请时间">
</el-date-picker>
</el-form-item>
<el-form-item label="实际开始时间" prop="realBeginTime">
<el-date-picker clearable
v-model="queryParams.realBeginTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="实际完成时间" prop="realEndTime">
<el-date-picker clearable
v-model="queryParams.realEndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际完成时间">
</el-date-picker>
</el-form-item>
<el-form-item label="要求完成时间" prop="requireEndTime">
<el-date-picker clearable
v-model="queryParams.requireEndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择要求完成时间">
</el-date-picker>
</el-form-item>
<el-form-item label="是否标识1-是0-否" prop="isFlag">
<el-input
v-model="queryParams.isFlag"
placeholder="请输入是否标识1-是0-否"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="报修来源" prop="faultSourceId">
<el-select @change="change" v-model="queryParams.faultSourceType" placeholder="报修来源类型" >
<el-option
v-for="item in dict.type.dms_fault_source_type"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</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>
@ -90,17 +30,17 @@
v-hasPermi="['dms:dmsBillsFaultInstance: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="['dms:dmsBillsFaultInstance:edit']"
>修改</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="['dms:dmsBillsFaultInstance:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
@ -210,6 +150,17 @@
<!-- 添加或修改检修工单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="96px">
<el-form-item label="设备名称" prop="deviceId">
<el-select v-model="form.deviceId" placeholder="设备名称" >
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
:label="item.deviceName"
:value="item.deviceId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="报修来源类型" prop="faultSourceType">
<el-select @change="change" v-model="form.faultSourceType" placeholder="报修来源类型" >
<el-option
@ -338,7 +289,7 @@
</el-form-item>
<el-divider content-position="center">工单实例节点信息</el-divider>
<el-divider content-position="center">故障报修工单信息</el-divider>
@ -359,22 +310,12 @@
<el-form-item label="涉及操作" prop="designOperations">
<el-input v-model="form.designOperations" placeholder="涉及操作" />
</el-form-item>
<el-form-item label="设备名称" prop="deviceId">
<el-select v-model="form.deviceId" placeholder="设备名称" >
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
:label="item.deviceName"
:value="item.deviceId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="维修类型" prop="repairType">
<el-radio-group v-model="form.repairType">
<el-radio
@change="changeOut"
v-for="dict in dict.type.dms_repair_type"
v-for="dict in dict.type.dms_fault_repair_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
@ -391,6 +332,24 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="pictureUrl">
<el-upload
:action="imgUpload.url"
:headers="imgUpload.headers"
:on-success="handlePictureSuccess"
:before-upload="beforePictureUpload"
list-type="picture-card"
:file-list="fileListShow"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<!--图片预览的dialog-->
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl">
</el-dialog>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -407,18 +366,40 @@ import { listDmsRepairInstance } from '@/api/dms/dmsRepairInstance'
import { listPoint,listSelectInspection } from '@/api/dms/dmsBillsInstance'
import { listLedger } from '@/api/dms/ledger'
import { listDmsInfo } from '@/api/dms/dmsInfo'
import { getToken } from '@/utils/auth'
export default {
name: "DmsBillsFaultInstance",
dicts:['bills_status','dms_instance_type','dms_fault_source_type','dms_fault_type','dms_repair_type'],
dicts:['bills_status','dms_instance_type','dms_fault_source_type','dms_fault_type','dms_repair_type','dms_fault_repair_type'],
data() {
return {
//
isCommonName: true,
//list
fileListShow: [],
//List
fileListPut: [],
dialogImageUrl: '',
dialogVisible: false,
imgUpload: {
//
headers: {
Authorization: "Bearer " + getToken()
},
// :
url: process.env.VUE_APP_BASE_API + "/file/upload",
url2: process.env.VUE_APP_BASE_API,
},
isShow1:false,
isShow2:false,
isShow3:false,
isShow9:false,
isShowOut:false,
imgAddress:"",
//
dmsInfoList:[],
//
@ -454,7 +435,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
faultSourceType: 1,
faultSourceType: null,
faultSourceId: null,
wfProcessId: null,
billsFaultCode: null,
@ -499,6 +480,55 @@ export default {
this.getoutsrcId();
},
methods: {
//
beforePictureUpload(file){
// isCommonName true
this.isCommonName = true;
const isJPG = file.type === 'image/jpeg';
const isLt2M = file.size / 1024 / 1024 < 2;
//
if(this.fileListPut.length > 0){
this.fileListPut.forEach((item,index)=>{
if(item.name == file.name){
this.$message.error('已存在相同的图片!');
this.isCommonName = false;
}
})
}
if (!isJPG) {
this.$message.error('请上传图片格式的文件!');
}
if (!isLt2M) {
this.$message.error('上传的图片不能超过2MB!');
}
return isJPG && isLt2M && this.isCommonName;
},
//
handleRemove(file, fileList) {
//filefileListPut
if(this.fileListPut.length > 0){
this.fileListPut = this.fileListPut.filter((item, index)=>{
return item.name != file.name;
})
}
},
//
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
//
handlePictureSuccess(res, file) {
//访
const imgObjectUrl = this.imgUpload.url2 + file.response.imgUrl;
//JSON
let currentFile = { name: '', url: '' };
currentFile.name = file.name;
currentFile.url = imgObjectUrl;
this.imgAddress = res.data.url;
//
this.fileListPut.push(currentFile);
},
getJump(row){
this.$router.push('/dms/activity/index/'+row.repairInstanceId)
},
@ -620,6 +650,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.faultSourceType = null;
this.handleQuery();
},
//
@ -631,8 +662,10 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.fileListShow = [];
this.isShowOut = false;
this.open = true;
this.title = "添加检修工单";
this.title = "添加修工单";
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -640,8 +673,9 @@ export default {
const repairInstanceId = row.repairInstanceId || this.ids
getDmsBillsFaultInstance(repairInstanceId).then(response => {
this.form = response.data;
this.fileListShow = response.data.sysFiles
this.open = true;
this.title = "修改修工单";
this.title = "修改修工单";
});
},
/** 提交按钮 */
@ -657,6 +691,8 @@ export default {
} else {
this.form.wfProcessId = 102;
this.form.isFlag = 1;
this.form.imgUrl = this.imgAddress;
alert(this.imgAddress)
addDmsBillsFaultInstance(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;

@ -294,7 +294,6 @@ export default {
this.form.lubeInstanceId = lubeInstanceIdCheck;
this.queryParams.lubeInstanceId = lubeInstanceIdCheck;
this.queryParamWfProcessActivity.wfProcessId = 106;
this.isUpdate = true;
this.getWfprocessActivity();
this.getDmsBillsLubeInstance();
this.getList();

@ -0,0 +1,410 @@
<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="保养计划ID,关联dms_plan_maint的plan_maint_id" prop="planMaintId">
<el-input
v-model="queryParams.planMaintId"
placeholder="请输入保养计划ID,关联dms_plan_maint的plan_maint_id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单流程ID关联wf_process的wf_process_id" prop="wfProcessId">
<el-input
v-model="queryParams.wfProcessId"
placeholder="请输入工单流程ID关联wf_process的wf_process_id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="保养单号" prop="billsMaintCode">
<el-input
v-model="queryParams.billsMaintCode"
placeholder="请输入保养单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划保养时间" prop="planBeginTime">
<el-date-picker clearable
v-model="queryParams.planBeginTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择计划保养时间">
</el-date-picker>
</el-form-item>
<el-form-item label="实际开始时间" prop="realBeginTime">
<el-date-picker clearable
v-model="queryParams.realBeginTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="计划完成时间;根据计划的时限计算" prop="planEndTime">
<el-date-picker clearable
v-model="queryParams.planEndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择计划完成时间;根据计划的时限计算">
</el-date-picker>
</el-form-item>
<el-form-item label="实际完成时间" prop="realEndTime">
<el-date-picker clearable
v-model="queryParams.realEndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际完成时间">
</el-date-picker>
</el-form-item>
<el-form-item label="保养完成率" prop="maintCompRate">
<el-input
v-model="queryParams.maintCompRate"
placeholder="请输入保养完成率"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否标识1-是2-否" prop="isFlag">
<el-input
v-model="queryParams.isFlag"
placeholder="请输入是否标识1-是2-否"
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="['dms:dmsBillsMaintInstance: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="['dms:dmsBillsMaintInstance: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="['dms:dmsBillsMaintInstance: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="['dms:dmsBillsMaintInstance:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dmsBillsMaintInstanceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="maintInstanceId" />
<el-table-column label="保养计划ID,关联dms_plan_maint的plan_maint_id" align="center" prop="planMaintId" />
<el-table-column label="工单流程ID关联wf_process的wf_process_id" align="center" prop="wfProcessId" />
<el-table-column label="保养单号" align="center" prop="billsMaintCode" />
<el-table-column label="计划保养时间" align="center" prop="planBeginTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planBeginTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际开始时间" align="center" prop="realBeginTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.realBeginTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="计划完成时间;根据计划的时限计算" align="center" prop="planEndTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planEndTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" prop="realEndTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.realEndTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="保养状态1-待保养2-保养中3-已完成" align="center" prop="maintStatus" />
<el-table-column label="保养完成率" align="center" prop="maintCompRate" />
<el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
style="float: right"
size="mini"
type="text"
icon="el-icon-bell"
@click="getJump(scope.row)"
v-hasPermi="['dms:dmsBillsFaultInstance:edit']"
>处理工单</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dms:dmsBillsMaintInstance:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['dms:dmsBillsMaintInstance: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="planMaintId" >
<el-select v-model="form.planMaintId" placeholder="请输入设备类型">
<el-option
v-for="item in maintList"
:key="item.planMaintId"
:label="item.planMaintCode"
:value="item.planMaintId">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="保养完成率" prop="maintCompRate">-->
<!-- <el-input v-model="form.maintCompRate" placeholder="请输入保养完成率" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</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 { listDmsBillsMaintInstance, getDmsBillsMaintInstance, delDmsBillsMaintInstance, addDmsBillsMaintInstance, updateDmsBillsMaintInstance } from "@/api/dms/dmsBillsMaintInstance";
import { listMaint } from '@/api/dms/maint'
export default {
name: "DmsBillsMaintInstance",
dicts:['dms_maint_level'],
data() {
return {
//
maintList:[],
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dmsBillsMaintInstanceList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
planMaintId: null,
wfProcessId: null,
billsMaintCode: null,
planBeginTime: null,
realBeginTime: null,
planEndTime: null,
realEndTime: null,
maintStatus: null,
maintCompRate: null,
isFlag: null,
},
//
form: {},
//
rules: {
wfProcessId: [
{ required: true, message: "工单流程ID关联wf_process的wf_process_id不能为空", trigger: "blur" }
],
billsMaintCode: [
{ required: true, message: "保养单号不能为空", trigger: "blur" }
],
isFlag: [
{ required: true, message: "是否标识1-是2-否不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getPlanMaint();
},
methods: {
getJump(row){
this.$router.push('/dms/dmsMaintInstanceActivity/index/'+row.maintInstanceId)
},
getJumpSelect(row){
this.$router.push('/dms/dmsMaintInstanceActivity/index/'+row.maintInstanceId)
},
/** 查询保养计划信息列表 */
getPlanMaint() {
listMaint(this.queryParams).then(response => {
this.maintList = response.rows;
});
},
/** 查询保养工单列表 */
getList() {
this.loading = true;
listDmsBillsMaintInstance(this.queryParams).then(response => {
this.dmsBillsMaintInstanceList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
maintInstanceId: null,
planMaintId: null,
wfProcessId: null,
billsMaintCode: null,
planBeginTime: null,
realBeginTime: null,
planEndTime: null,
realEndTime: null,
maintStatus: null,
maintCompRate: null,
isFlag: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.maintInstanceId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加保养工单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const maintInstanceId = row.maintInstanceId || this.ids
getDmsBillsMaintInstance(maintInstanceId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改保养工单";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.maintInstanceId != null) {
updateDmsBillsMaintInstance(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.wfProcessId = 103;
addDmsBillsMaintInstance(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const maintInstanceIds = row.maintInstanceId || this.ids;
this.$modal.confirm('是否确认删除保养工单编号为"' + maintInstanceIds + '"的数据项?').then(function() {
return delDmsBillsMaintInstance(maintInstanceIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('dms/dmsBillsMaintInstance/export', {
...this.queryParams
}, `dmsBillsMaintInstance_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -0,0 +1,482 @@
<template>
<div class="app-container">
<h4 class="form-header h4">工单信息</h4>
<el-form label-width="120px">
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="工单编号" >
<el-input v-model="this.dmsBillsMaintInstanceList[0].billsMaintCode" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="当前流程" >
<el-input v-model="this.dmsBillsMaintInstanceList[0].wfProcessId" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="工单状态" >
<el-input v-model="this.billsStatusCheck" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="申请人" >
<el-input v-model="this.dmsBillsMaintInstanceList[0].createBy" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="申请时间" >
<el-input v-model="this.dmsBillsMaintInstanceList[0].createTime" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="工单类型" >
<el-input v-model="this.instanceTypeCheck" disabled />
</el-form-item>
</el-col>
<el-col :span="16" :offset="2">
<el-form-item label="备注" >
<el-input v-model="this.dmsBillsMaintInstanceList[0].remark" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<!-- 第一步-->
<el-form ref="form" :model="form" label-width="100px">
<h4 class="form-header h4">{{this.wfProcessActivityList[0].processActivityName}}</h4>
<el-col :span="8" >
<el-form-item label="保养级别" prop="maintlevel">
<el-select v-model="form.maintLevel" placeholder="保养级别" :disabled=true>
<el-option
v-for="item in dict.type.dms_maint_level"
:key=" parseInt(item.value)"
:label="item.label"
:value="parseInt(item.value)">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="润滑组别" prop="maintGroup">
<el-input v-model="form.maintGroup" placeholder="请输入检修组别" :disabled=true />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="润滑负责人" prop="maintSupervisor">
<el-input v-model="form.maintSupervisor" placeholder="请输入检修负责人" :disabled=true />
</el-form-item>
</el-col>
<!-- 中间步骤-->
<el-form-item v-for="(repairInstanceActivity,index) in dmsMaintInstanceActivityList"
:key="dmsMaintInstanceActivityList.instanceActivityId"
label-width="0px"
:model="form"
v-if="repairInstanceActivity.processStepOrder!=1"
>
<h4 class="form-header h4">{{repairInstanceActivity.name}}</h4>
<el-col :span="8">
<el-form-item label="保养级别" prop="maintLevel">
<el-select v-model="form.maintLevel" placeholder="保养级别" :disabled=true>
<el-option
v-for="item in dict.type.dms_maint_level"
:key="parseInt(item.value)"
:label="item.label"
:value="parseInt(item.value)"
v-bind:disabled="repairInstanceActivity.processStepOrder!=dmsMaintInstanceActivityList.length+1"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养组别">
<el-input
v-model="repairInstanceActivity.maintGroup"
v-bind:disabled="repairInstanceActivity.processStepOrder!=dmsMaintInstanceActivityList.length+1"
placeholder="保养组别">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养负责人"
>
<el-input
v-model="repairInstanceActivity.maintSupervisor"
v-bind:disabled="repairInstanceActivity.processStepOrder!=dmsMaintInstanceActivityList.length+1"
placeholder="保养负责人">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="处理意见"
>
<el-input
v-model="repairInstanceActivity.processHandleResolution"
v-bind:disabled="repairInstanceActivity.processStepOrder!=dmsMaintInstanceActivityList.length+1"
placeholder="处理意见">
</el-input>
</el-form-item>
</el-col>
</el-form-item>
</el-form>
<!--新增审批流程表单显示-->
<el-form ref="form1" :model="form1" label-width="100px"
v-if="form1.processStepOrder!=wfProcessActivityList.length&&this.isUpdate==true">
<h4 class="form-header h4">{{this.wfProcessActivityList[this.dmsMaintInstanceActivityList.length].processActivityName}}</h4>
<el-col :span="8">
<!-- <el-form-item label="检修类型" prop="repairType"-->
<!-- >-->
<!-- <el-input-->
<!-- v-model="form1.repairType"-->
<!-- placeholder="检修类型"-->
<!-- >-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<el-form-item label="保养等级" prop="maintLevel">
<el-select v-model="form1.maintLevel" placeholder="保养等级" >
<el-option
v-for="item in dict.type.dms_maint_level"
:key="parseInt(item.value)"
:label="item.label"
:value="parseInt(item.value)"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养组别"
>
<el-input
v-model="form1.maintGroup"
placeholder="保养组别">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养负责人"
>
<el-input
v-model="form1.maintSupervisor"
placeholder="保养负责人">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="处理意见"
>
<el-input
v-model="form1.processHandleResolution"
placeholder="处理意见">
</el-input>
</el-form-item>
</el-col>
<div >
<el-button type="primary" @click="submitForm"> </el-button>
</div>
</el-form>
</el-row>
</div>
</template>
<script>
import { selectUserIdByDmsMaintInstanceActivityId,listDmsMaintInstanceActivity, getDmsMaintInstanceActivity, delDmsMaintInstanceActivity, addDmsMaintInstanceActivity, updateDmsMaintInstanceActivity } from "@/api/dms/dmsMaintInstanceActivity";
import { listWfprocessactivity } from '@/api/system/common/wfprocessactivity'
import { listDmsBillsMaintInstance } from '@/api/dms/dmsBillsMaintInstance'
import { selectUserIdByDmsBillsLubeInstanceActivityId } from '@/api/dms/dmsBillsLubeInstanceActivity'
export default {
name: "DmsMaintInstanceActivity",
dicts:['dms_bills_status','dms_instance_type','dms_maint_level'],
data() {
return {
nowPorcessStepOrder:"",
ListLength:"",
//
instanceTypeCheck:"",
//
billsStatusCheck:"",
stepsNum:"",
isUpdate:false,
maintInstanceIdCheck:"",
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dmsBillsMaintInstanceList:[],
//
dmsMaintInstanceActivityList: [],
wfProcessActivityList:[],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
maintInstanceId: null,
processActivityId: null,
maintLevel: null,
maintGroup: null,
maintSupervisor: null,
processHandleResolution: null,
processHandleStatus: null,
processStepOrder: null,
startTime: null,
endTime: null,
handleUserId: null,
handleBy: null,
handleTime: null,
transferUserId: null,
attr1: null
},
queryParamWfProcessActivity:{
wfProcessId:null,
},
//
form: {},
form1: {},
//
rules: {
maintInstanceId: [
{ required: true, message: "保养工单实例ID关联dms_bills_maint_instance的maint_instance_id不能为空", trigger: "blur" }
],
processHandleResolution: [
{ required: true, message: "处理意见;第一步不显示,从第二步开始只显示此字段不能为空", trigger: "blur" }
],
}
};
},
created() {
const maintInstanceId = this.$route.params && this.$route.params.maintInstanceId;
console.log(this.dict.type.dms_maint_level)
this.maintInstanceIdCheck = maintInstanceId;
this.form.maintInstanceId = maintInstanceId;
this.queryParams.maintInstanceId = maintInstanceId;
this.queryParamWfProcessActivity.wfProcessId = 103;
this.isUpdate = true;
this.getList();
this.getDmsBillsMaintInstance();
this.getWfprocessActivity();
},
methods: {
getselectUserIdByMaintInstanceId(){
// console.log(this.nowPorcessStepOrder)
// console.log(this.wfProcessActivityList.length)
if (this.nowPorcessStepOrder==this.wfProcessActivityList.length){
selectUserIdByDmsMaintInstanceActivityId(this.maintInstanceIdCheck,this.$store.state.user.id).then(response=>{
console.log(response)
if (response == false) {
alert("无权限")
this.$store.dispatch("tagsView/delView",this.$route)
this.$router.replace({path:"/dms/maint/dmsBillsMaintInstance"})
}
})
}
},
/** 查询保养工单列表 */
getDmsBillsMaintInstance() {
this.loading = true;
listDmsBillsMaintInstance(this.queryParams).then(response => {
this.dmsBillsMaintInstanceList = response.rows;
for (let i = 0; i < this.dict.type.dms_bills_status.length;i++){
if (this.dmsBillsMaintInstanceList[0].billsStatus==i){
this.billsStatusCheck = this.dict.type.dms_bills_status[i].label;
}
}
for (let j = 0; j < this.dict.type.dms_instance_type.length;j++){
//dms_instance_type0==j+1
if (this.dmsBillsMaintInstanceList[0].instanceType==j+1){
// console.log(this.dmsBillsMaintInstanceList)
this.instanceTypeCheck = this.dict.type.dms_instance_type[j].label;
// console.log(this.instanceTypeCheck)
}
}
this.total = response.total;
this.loading = false;
});
},
/**查询流程信息*/
getWfprocessActivity(){
listWfprocessactivity(this.queryParamWfProcessActivity).then(response=>{
this.wfProcessActivityList = response.rows;
console.log(this.wfProcessActivityList)
this.stepsNum = this.wfProcessActivityList.length;
for (let i=0;i<this.stepsNum;i++){
for (let j=0;j<this.stepsNum;j++){
if (this.dmsMaintInstanceActivityList[i].processStepOrder==this.wfProcessActivityList[j].processActivityOrder){
this.dmsMaintInstanceActivityList[i].name = this.wfProcessActivityList[j].processActivityName;
console.log(this.dmsMaintInstanceActivityList[i].name)
}
}
}
})
},
/** 查询保养工单实例节点列表 */
getList() {
this.loading = true;
listDmsMaintInstanceActivity(this.queryParams).then(response => {
this.dmsMaintInstanceActivityList = response.rows;
this.total = response.total;
this.form.maintLevel = this.dmsMaintInstanceActivityList[0].maintLevel;
this.form.maintGroup = this.dmsMaintInstanceActivityList[0].maintGroup;
this.form.maintSupervisor = this.dmsMaintInstanceActivityList[0].maintSupervisor;
this.form.remark = this.dmsMaintInstanceActivityList[0].remark;
this.ListLength = this.dmsMaintInstanceActivityList.length;
this.form1 = JSON.parse(JSON.stringify(this.dmsMaintInstanceActivityList[this.ListLength-1]))
this.form1.processHandleResolution = null;
this.nowPorcessStepOrder = this.ListLength+1;
listWfprocessactivity(this.queryParamWfProcessActivity).then(response=>{
this.wfProcessActivityList = response.rows;
this.getselectUserIdByMaintInstanceId();
})
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
instanceActivityId: null,
maintInstanceId: null,
processActivityId: null,
maintLevel: null,
maintGroup: null,
maintSupervisor: null,
processHandleResolution: null,
remark: null,
processHandleStatus: null,
processStepOrder: null,
startTime: null,
endTime: null,
handleUserId: null,
handleBy: null,
handleTime: null,
createBy: null,
createTime: null,
transferUserId: null,
attr1: 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.instanceActivityId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加保养工单实例节点";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const instanceActivityId = row.instanceActivityId || this.ids
getDmsMaintInstanceActivity(instanceActivityId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改保养工单实例节点";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.instanceActivityId != null) {
updateDmsMaintInstanceActivity(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
for (let i = 0; i < this.wfProcessActivityList.length;i++){
if (this.form1.processStepOrder+1 == this.wfProcessActivityList[i].processActivityOrder){
this.form1.processActivityId = this.wfProcessActivityList[i].processActivityId;
// alert(this.wfProcessActivityList[i].processActivityId)
}
}
this.form1.instanceActivityId =null;
//
this.form1.processStepOrder = this.form1.processStepOrder+1;
this.form1.wfLength = this.wfProcessActivityList.length;
addDmsMaintInstanceActivity(this.form1).then(response => {
this.$modal.msgSuccess("新增成功");
this.getList();
this.getDmsBillsMaintInstance();
this.getWfprocessActivity();
this.open = false;
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const instanceActivityIds = row.instanceActivityId || this.ids;
this.$modal.confirm('是否确认删除保养工单实例节点编号为"' + instanceActivityIds + '"的数据项?').then(function() {
return delDmsMaintInstanceActivity(instanceActivityIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('dms/dmsMaintInstanceActivity/export', {
...this.queryParams
}, `dmsMaintInstanceActivity_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -191,7 +191,15 @@
<span>{{ parseTime(scope.row.maintTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环周期" align="center" prop="cyclePeriod" />
<el-table-column label="时限" align="center" prop="timeLimit" >
<template slot-scope="scope">
<span v-show="scope.row.timeLimitDays!=0&&scope.row.timeLimitDays!=null">{{scope.row.timeLimitDays}}</span>
<span v-show="scope.row.timeLimitHours!=0&&scope.row.timeLimitHours!=null">{{scope.row.timeLimitHours}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="循环周期" align="center" prop="cyclePeriod" />-->
<!-- <el-table-column label="保养状态1-待保养2-保养中3-已完成" align="center" prop="maintStatus" />-->
<el-table-column label="保养状态" align="center" prop="maintStatus">
<template slot-scope="scope">
@ -265,20 +273,38 @@
<el-form-item label="保养负责人" prop="maintSupervisor">
<el-input v-model="form.maintSupervisor" placeholder="请输入保养负责人" />
</el-form-item>
<el-form-item label="本次保养时间" prop="maintTime">
<el-date-picker clearable
v-model="form.maintTime"
type="date"
value-format="yyyy-MM-dd"
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="maintTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.maintTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- 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="创建方式1-人工创建2-自动创建" prop="createMethod">-->
<!-- <el-input v-model="form.createMethod" placeholder="请输入创建方式1-人工创建2-自动创建" />-->
<!-- </el-form-item>-->
<el-row>
<el-col :span="12">
<el-form-item label="时限" prop="timeLimitDays">
<el-input-number v-model="form.timeLimitDays" placeholder="请输入天数" :min="0" :max="10000"/>
<el-input-number v-model="form.timeLimitHours" placeholder="请输入小时" :min="0" :max="23"/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="cron表达式" prop="cronExpression">
<el-input v-model="form.cronExpression" placeholder="请输入cron执行表达式">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成表达式
<i class="el-icon-time el-icon--right"></i>
</el-button>
</template>
</el-input>
</el-form-item>
<el-form-item label="保养状态" prop="maintStatus">
<el-radio-group v-model="form.maintStatus">
<el-radio
@ -311,6 +337,9 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog title="Cron表达式生成器" :visible.sync="openCron" append-to-body destroy-on-close class="scrollbar">
<crontab @hide="openCron=false" @fill="crontabFill" :expression="expression"></crontab>
</el-dialog>
</div>
</template>
@ -319,11 +348,16 @@ import { listMaint, getMaint, delMaint, addMaint, updateMaint } from "@/api/dms/
import { listLedger } from '@/api/dms/ledger'
import { listStation } from '@/api/dms/station'
import { listStandard } from '@/api/dms/standard'
import Crontab from '@/components/Crontab/index'
export default {
components: { Crontab },
name: "Maint",
dicts:['dms_maint_level','dms_create_method','dms_maint_status'],
data() {
return {
//
expression: "",
openCron:false,
//
loading: true,
//
@ -387,6 +421,16 @@ export default {
this.getStandard();
},
methods: {
/** cron表达式按钮操作 */
handleShowCron() {
this.expression = this.form.cronExpression;
this.openCron = true;
},
/** 确定后回传值 */
crontabFill(value) {
this.form.cronExpression = value;
},
//
jumpToDetail(row){
this.$router.push('/dms/maintDetail/index/' + row.planMaintId)

Loading…
Cancel
Save