企业端设备模块->送检记录,维修计划 查询和新增修改接口

This commit is contained in:
79493 2022-10-27 17:39:51 +08:00
parent 9afc67c50d
commit eca366a592
11 changed files with 815 additions and 6 deletions

View File

@ -0,0 +1,38 @@
package com.rzyc.mapper;
import com.rzyc.model.EntInspectionRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* 送检记录 Mapper 接口
* </p>
*
* @author
* @since 2022-10-27
*/
@Repository
public interface EntInspectionRecordMapper extends BaseMapper<EntInspectionRecord> {
/**
* 查询送检记录
* @return list
* @param startTime
* @param endTime
* */
List<EntInspectionRecord>selectInspectionRecord(@Param("startTime") String startTime,@Param("endTime") String endTime);
/**
* 修改送检记录
* @return int
* @param entInspectionRecord
* */
int updateEntInspectionRecord(@Param("data") EntInspectionRecord entInspectionRecord);
}

View File

@ -0,0 +1,35 @@
package com.rzyc.mapper;
import com.rzyc.model.EntRepairPlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author
* @since 2022-10-27
*/
@Repository
public interface EntRepairPlanMapper extends BaseMapper<EntRepairPlan> {
/**
* 企业维修计划查询
* @return list
* */
List<EntRepairPlan>selectRepairPlan();
/**
* 修改维修计划
* @param entRepairPlan 企业维修计划对象
* @return int
* */
int updateRepairPlan(@Param("data") EntRepairPlan entRepairPlan);
}

View File

@ -0,0 +1,159 @@
package com.rzyc.model;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* <p>
* 送检记录
* </p>
*
* @author
* @since 2022-10-27
*/
@TableName("ent_inspection_record")
@ApiModel(value="EntInspectionRecord对象", description="送检记录")
public class EntInspectionRecord implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "送检记录")
@TableId("inspection_id")
private Integer inspectionId;
@ApiModelProperty(value = "送检设备id")
@TableField("inspection_device_id")
private Integer inspectionDeviceId;
@ApiModelProperty(value = "送检组织")
@TableField("inspection_organization")
private String inspectionOrganization;
@ApiModelProperty(value = "送检人")
@TableField("inspection_user_id")
private String inspectionUserId;
@ApiModelProperty(value = "送检时间")
@TableField("inspection_time")
private Date inspectionTime;
@ApiModelProperty(value = "1.待检查 2.检测中 3.已完成 暂时不用")
@TableField("inspection_state")
private Integer inspectionState;
@ApiModelProperty(value = "检查结果")
@TableField("inspection_text")
private String inspectionText;
@TableField("create_by")
private String createBy;
@TableField("create_time")
private Date createTime;
@TableField("modify_by")
private String modifyBy;
@TableField("modify_time")
private Date modifyTime;
public Integer getInspectionId() {
return inspectionId;
}
public void setInspectionId(Integer inspectionId) {
this.inspectionId = inspectionId;
}
public Integer getInspectionDeviceId() {
return inspectionDeviceId;
}
public void setInspectionDeviceId(Integer inspectionDeviceId) {
this.inspectionDeviceId = inspectionDeviceId;
}
public String getInspectionOrganization() {
return inspectionOrganization;
}
public void setInspectionOrganization(String inspectionOrganization) {
this.inspectionOrganization = inspectionOrganization;
}
public String getInspectionUserId() {
return inspectionUserId;
}
public void setInspectionUserId(String inspectionUserId) {
this.inspectionUserId = inspectionUserId;
}
public Date getInspectionTime() {
return inspectionTime;
}
public void setInspectionTime(Date inspectionTime) {
this.inspectionTime = inspectionTime;
}
public Integer getInspectionState() {
return inspectionState;
}
public void setInspectionState(Integer inspectionState) {
this.inspectionState = inspectionState;
}
public String getInspectionText() {
return inspectionText;
}
public void setInspectionText(String inspectionText) {
this.inspectionText = inspectionText;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getModifyBy() {
return modifyBy;
}
public void setModifyBy(String modifyBy) {
this.modifyBy = modifyBy;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
@Override
public String toString() {
return "EntInspectionRecord{" +
"inspectionId=" + inspectionId +
", inspectionDeviceId=" + inspectionDeviceId +
", inspectionOrganization=" + inspectionOrganization +
", inspectionUserId=" + inspectionUserId +
", inspectionTime=" + inspectionTime +
", inspectionState=" + inspectionState +
", inspectionText=" + inspectionText +
", createBy=" + createBy +
", createTime=" + createTime +
", modifyBy=" + modifyBy +
", modifyTime=" + modifyTime +
"}";
}
}

View File

@ -0,0 +1,158 @@
package com.rzyc.model;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* <p>
*
* </p>
*
* @author
* @since 2022-10-27
*/
@TableName("ent_repair_plan")
@ApiModel(value="EntRepairPlan对象", description="")
public class EntRepairPlan implements Serializable {
private static final long serialVersionUID = 1L;
@TableId("repair_plan_id")
private String repairPlanId;
@ApiModelProperty(value = "设备id")
@TableField("repair_device_id")
private String repairDeviceId;
@ApiModelProperty(value = "1.常见故障维修 2.突发性故障维修 3.计划项目维修 4.不正当使用维修")
@TableField("repair_level")
private Integer repairLevel;
@ApiModelProperty(value = "1.未执行 2.已执行 3.已过期 4.已删除")
@TableField("repair_state")
private Integer repairState;
@ApiModelProperty(value = "上一次维修时间")
@TableField("last_time_repair")
private Date lastTimeRepair;
@ApiModelProperty(value = "维修时间")
@TableField("repair_time")
private Date repairTime;
@ApiModelProperty(value = "描述")
@TableField("description")
private String description;
@TableField("create_time")
private Date createTime;
@TableField("create_by")
private String createBy;
@TableField("modify_time")
private Date modifyTime;
@TableField("modify_by")
private String modifyBy;
public String getRepairPlanId() {
return repairPlanId;
}
public void setRepairPlanId(String repairPlanId) {
this.repairPlanId = repairPlanId;
}
public String getRepairDeviceId() {
return repairDeviceId;
}
public void setRepairDeviceId(String repairDeviceId) {
this.repairDeviceId = repairDeviceId;
}
public Integer getRepairLevel() {
return repairLevel;
}
public void setRepairLevel(Integer repairLevel) {
this.repairLevel = repairLevel;
}
public Integer getRepairState() {
return repairState;
}
public void setRepairState(Integer repairState) {
this.repairState = repairState;
}
public Date getLastTimeRepair() {
return lastTimeRepair;
}
public void setLastTimeRepair(Date lastTimeRepair) {
this.lastTimeRepair = lastTimeRepair;
}
public Date getRepairTime() {
return repairTime;
}
public void setRepairTime(Date repairTime) {
this.repairTime = repairTime;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getModifyBy() {
return modifyBy;
}
public void setModifyBy(String modifyBy) {
this.modifyBy = modifyBy;
}
@Override
public String toString() {
return "EntRepairPlan{" +
"repairPlanId=" + repairPlanId +
", repairDeviceId=" + repairDeviceId +
", repairLevel=" + repairLevel +
", repairState=" + repairState +
", lastTimeRepair=" + lastTimeRepair +
", repairTime=" + repairTime +
", description=" + description +
", createTime=" + createTime +
", createBy=" + createBy +
", modifyTime=" + modifyTime +
", modifyBy=" + modifyBy +
"}";
}
}

View File

@ -0,0 +1,88 @@
package com.rzyc.model.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
public class EntRepairPlanDto {
@ApiModelProperty(value = "主键")
private String repairPlanId;
@ApiModelProperty(value = "设备id")
private String repairDeviceId;
@ApiModelProperty(value = "1.常见故障维修 2.突发性故障维修 3.计划项目维修 4.不正当使用维修")
private Integer repairLevel;
@ApiModelProperty(value = "1.未执行 2.已执行 3.已过期 4.已删除")
private Integer repairState;
@ApiModelProperty(value = "上一次维修时间")
private Date lastTimeRepair;
@ApiModelProperty(value = "维修时间")
private Date repairTime;
@ApiModelProperty(value = "描述")
private String description;
public String getRepairPlanId() {
return repairPlanId;
}
public void setRepairPlanId(String repairPlanId) {
this.repairPlanId = repairPlanId;
}
public String getRepairDeviceId() {
return repairDeviceId;
}
public void setRepairDeviceId(String repairDeviceId) {
this.repairDeviceId = repairDeviceId;
}
public Integer getRepairLevel() {
return repairLevel;
}
public void setRepairLevel(Integer repairLevel) {
this.repairLevel = repairLevel;
}
public Integer getRepairState() {
return repairState;
}
public void setRepairState(Integer repairState) {
this.repairState = repairState;
}
public Date getLastTimeRepair() {
return lastTimeRepair;
}
public void setLastTimeRepair(Date lastTimeRepair) {
this.lastTimeRepair = lastTimeRepair;
}
public Date getRepairTime() {
return repairTime;
}
public void setRepairTime(Date repairTime) {
this.repairTime = repairTime;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View File

@ -0,0 +1,94 @@
package com.rzyc.model.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
* 送检记录dto
* @author Xuwanxin
* @date 2022/10/27
* */
public class InspectionRecordDto {
@ApiModelProperty(value = "送检记录")
private Integer inspectionId;
@ApiModelProperty(value = "送检设备id")
private Integer inspectionDeviceId;
@ApiModelProperty(value = "送检组织")
private String inspectionOrganization;
@ApiModelProperty(value = "送检人")
private String inspectionUserId;
@ApiModelProperty(value = "送检时间")
private Date inspectionTime;
@ApiModelProperty(value = "1.待检查 2.检测中 3.已完成 暂时不用")
private Integer inspectionState;
@ApiModelProperty(value = "检查结果")
private String inspectionText;
public Integer getInspectionId() {
return inspectionId;
}
public void setInspectionId(Integer inspectionId) {
this.inspectionId = inspectionId;
}
public Integer getInspectionDeviceId() {
return inspectionDeviceId;
}
public void setInspectionDeviceId(Integer inspectionDeviceId) {
this.inspectionDeviceId = inspectionDeviceId;
}
public String getInspectionOrganization() {
return inspectionOrganization;
}
public void setInspectionOrganization(String inspectionOrganization) {
this.inspectionOrganization = inspectionOrganization;
}
public String getInspectionUserId() {
return inspectionUserId;
}
public void setInspectionUserId(String inspectionUserId) {
this.inspectionUserId = inspectionUserId;
}
public Date getInspectionTime() {
return inspectionTime;
}
public void setInspectionTime(Date inspectionTime) {
this.inspectionTime = inspectionTime;
}
public Integer getInspectionState() {
return inspectionState;
}
public void setInspectionState(Integer inspectionState) {
this.inspectionState = inspectionState;
}
public String getInspectionText() {
return inspectionText;
}
public void setInspectionText(String inspectionText) {
this.inspectionText = inspectionText;
}
}

View File

@ -0,0 +1,40 @@
<?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.rzyc.mapper.EntInspectionRecordMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.rzyc.model.EntInspectionRecord">
<id column="inspection_id" property="inspectionId" />
<result column="inspection_device_id" property="inspectionDeviceId" />
<result column="inspection_organization" property="inspectionOrganization" />
<result column="inspection_user_id" property="inspectionUserId" />
<result column="inspection_time" property="inspectionTime" />
<result column="inspection_state" property="inspectionState" />
<result column="inspection_text" property="inspectionText" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="modify_by" property="modifyBy" />
<result column="modify_time" property="modifyTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
inspection_id, inspection_device_id, inspection_organization, inspection_user_id, inspection_time, inspection_state, inspection_text, create_by, create_time, modify_by, modify_time
</sql>
<select id="selectInspectionRecord" resultMap="BaseResultMap">
select * from ent_inspection_record where 1=1
<if test="startTime != null and '' != startTime">
and start_time = #{startTime}
</if>
<if test="endTime != null and '' != endTime">
and end_time = #{endTime}
</if>
</select>
<update id="updateEntInspectionRecord">
update ent_inspection_record set inspection_device_id = #{data.inspectionDeviceId}, inspection_organization = #{data.inspectionOrganization},inspection_user_id = #{data.inspectionUserId},
inspection_time = #{data.inspectionTime},inspection_state = #{data.inspectionState},inspection_text = #{data.inspectionText},modify_by = #{data.modifyBy},modify_time = #{data.modifyTime}
</update>
</mapper>

View File

@ -0,0 +1,35 @@
<?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.rzyc.mapper.EntRepairPlanMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.rzyc.model.EntRepairPlan">
<id column="repair_plan_id" property="repairPlanId" />
<result column="repair_device_id" property="repairDeviceId" />
<result column="repair_level" property="repairLevel" />
<result column="repair_state" property="repairState" />
<result column="last_time_repair" property="lastTimeRepair" />
<result column="repair_time" property="repairTime" />
<result column="description" property="description" />
<result column="create_time" property="createTime" />
<result column="create_by" property="createBy" />
<result column="modify_time" property="modifyTime" />
<result column="modify_by" property="modifyBy" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
repair_plan_id, repair_device_id, repair_level, repair_state, last_time_repair, repair_time, description, create_time, create_by, modify_time, modify_by
</sql>
<select id="selectRepairPlan">
select * from ent_repair_plan
</select>
<update id="updateRepairPlan">
update ent_repair_plan set repair_device_id = #{data.repairDeviceId},repair_level = #{data.repairLevel},repair_state =#{data.repairState},last_time_repair = #{data.lastTimeRepair},
repair_time = #{repairTime},description = #{description},modify_time = #{modifyTime},modify_by = #{modifyBy}
</update>
</mapper>

View File

@ -501,8 +501,15 @@ public class BaseController {
protected EntDeviceMaintenanceRecordMapper entDeviceMaintenanceRecordMapper; protected EntDeviceMaintenanceRecordMapper entDeviceMaintenanceRecordMapper;
//企业送检记录
@Autowired
protected EntInspectionRecordMapper entInspectionRecordMapper;
//企业维修计划
@Autowired
protected EntRepairPlanMapper entRepairPlanMapper;
/** /**

View File

@ -4,12 +4,14 @@ package com.rzyc.controller;
import com.common.utils.model.SingleResult; import com.common.utils.model.SingleResult;
import com.rzyc.config.MethodAnnotation; import com.rzyc.config.MethodAnnotation;
import com.rzyc.model.EntDevice; import com.rzyc.model.EntDevice;
import com.rzyc.model.EntDeviceType;
import com.rzyc.model.dto.*; import com.rzyc.model.dto.*;
import com.rzyc.service.PcBusinessService; import com.rzyc.service.PcBusinessService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -42,7 +44,7 @@ public class EnterpriseEquipmentController extends BaseController {
* @return 企业设备类型列表 * @return 企业设备类型列表
* @throws Exception * @throws Exception
*/ */
/*@ApiOperation(value = "企业设备类型列表", notes = "企业设备类型列表") @ApiOperation(value = "企业设备类型列表", notes = "企业设备类型列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "enterpriseId", value = "公司id", required = true, dataType = "string") @ApiImplicitParam(name = "enterpriseId", value = "公司id", required = true, dataType = "string")
}) })
@ -52,7 +54,7 @@ public class EnterpriseEquipmentController extends BaseController {
@ResponseBody @ResponseBody
public SingleResult<List<EntDeviceType>> entEquipmentTypeList(@NotNull(message = "公司id不能为null") String enterpriseId)throws Exception{ public SingleResult<List<EntDeviceType>> entEquipmentTypeList(@NotNull(message = "公司id不能为null") String enterpriseId)throws Exception{
return pcBusinessService.entEquipmentTypeList(enterpriseId); return pcBusinessService.entEquipmentTypeList(enterpriseId);
}*/ }
/** /**
@ -162,7 +164,7 @@ public class EnterpriseEquipmentController extends BaseController {
* @throws Exception * @throws Exception
*/ */
@ApiOperation(value = "设备巡检记录-添加和修改巡检记录", notes = "设备巡检记录-添加和修改巡检记录") @ApiOperation(value = "设备巡检记录-添加和修改巡检记录", notes = "设备巡检记录-添加和修改巡检记录")
@PostMapping(value = "/addOrUpdateInspectionRecord") @PostMapping(value = "/addOrUpdateInspectionAddOrRecord")
@PreAuthorize("hasAnyAuthority('addOrUpdateInspectionRecord:update')") @PreAuthorize("hasAnyAuthority('addOrUpdateInspectionRecord:update')")
@MethodAnnotation(authorizations = {"addOrUpdateInspectionRecord:update"},name = "设备巡检记录-添加和修改巡检记录") @MethodAnnotation(authorizations = {"addOrUpdateInspectionRecord:update"},name = "设备巡检记录-添加和修改巡检记录")
@ResponseBody @ResponseBody
@ -207,7 +209,7 @@ public class EnterpriseEquipmentController extends BaseController {
* @throws Exception * @throws Exception
**/ **/
@ApiOperation(value = "备件列表-新增和修改", notes = "备件列表-新增和修改") @ApiOperation(value = "备件列表-新增和修改", notes = "备件列表-新增和修改")
@PostMapping(value = "/sparePartUpdate") @PostMapping(value = "/sparePartAddOrUpdate")
@PreAuthorize("hasAnyAuthority('sparePartList:update')") @PreAuthorize("hasAnyAuthority('sparePartList:update')")
@MethodAnnotation(authorizations = {"sparePartList:update"},name = "备件列表-新增和修改") @MethodAnnotation(authorizations = {"sparePartList:update"},name = "备件列表-新增和修改")
@ResponseBody @ResponseBody
@ -222,7 +224,7 @@ public class EnterpriseEquipmentController extends BaseController {
* @throws Exception * @throws Exception
**/ **/
@ApiOperation(value = "保养计划-新增和修改", notes = "保养计划-新增和修改") @ApiOperation(value = "保养计划-新增和修改", notes = "保养计划-新增和修改")
@PostMapping(value = "/entDeviceMaintenancePlanUpdate") @PostMapping(value = "/entDeviceMaintenancePlanAddOrUpdate")
@PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan:update')") @PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan:update')")
@MethodAnnotation(authorizations = {"entDeviceMaintenancePlan:update"},name = "保养计划-新增和修改") @MethodAnnotation(authorizations = {"entDeviceMaintenancePlan:update"},name = "保养计划-新增和修改")
@ResponseBody @ResponseBody
@ -253,7 +255,7 @@ public class EnterpriseEquipmentController extends BaseController {
* @throws Exception * @throws Exception
**/ **/
@ApiOperation(value = "保养记录-新增和修改", notes = "保养记录-新增和修改") @ApiOperation(value = "保养记录-新增和修改", notes = "保养记录-新增和修改")
@PostMapping(value = "/entDeviceMaintenanceRecordUpdate") @PostMapping(value = "/entDeviceMaintenanceRecordAddOrUpdate")
@PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord:update')") @PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord:update')")
@MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord:update"},name = "保养记录-新增和修改") @MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord:update"},name = "保养记录-新增和修改")
@ResponseBody @ResponseBody
@ -280,6 +282,100 @@ public class EnterpriseEquipmentController extends BaseController {
/**
* 送检记录
* @return 送检记录
* @throws Exception
**/
@ApiOperation(value = "送检记录", notes = "送检记录")
@GetMapping(value = "/inspectionRecord")
@PreAuthorize("hasAnyAuthority('inspectionRecord','inspectionRecord:update')")
@MethodAnnotation(authorizations = {"inspectionRecord","inspectionRecord:update"},name = "送检记录")
@ResponseBody
public SingleResult inspectionRecord(@Param("startTime") String startTime, @Param("endTime")String endTime)throws Exception{
return pcBusinessService.inspectionRecord(startTime,endTime);
}
/**
* 送检操作
* @return 送检操作
* @throws Exception
**/
@ApiOperation(value = "送检操作", notes = "送检操作")
@PostMapping(value = "/submitInspection")
@PreAuthorize("hasAnyAuthority('inspectionRecord:update')")
@MethodAnnotation(authorizations = {"inspectionRecord:update"},name = "送检操作")
@ResponseBody
public SingleResult submitInspection(InspectionRecordDto inspectionRecordDto)throws Exception{
return pcBusinessService.submitInspection(inspectionRecordDto);
}
/**
* 维修计划
* @return 维修计划
* @throws Exception
**/
@ApiOperation(value = "维修计划", notes = "维修计划")
@GetMapping(value = "/repairPlan")
@PreAuthorize("hasAnyAuthority('repairPlan','repairPlan:update')")
@MethodAnnotation(authorizations = {"repairPlan","repairPlan:update"},name = "维修计划")
@ResponseBody
public SingleResult repairPlan()throws Exception{
return pcBusinessService.repairPlan();
}
/**
* 维修计划-新增,修改
* @return 维修计划-新增,修改
* @throws Exception
**/
@ApiOperation(value = "维修计划-新增,修改", notes = "维修计划-新增,修改")
@GetMapping(value = "/repairPlanAddOrUpdate")
@PreAuthorize("hasAnyAuthority('repairPlan:update')")
@MethodAnnotation(authorizations = {"repairPlan:update"},name = "维修计划-新增,修改")
@ResponseBody
public SingleResult repairPlanAddOrUpdate(EntRepairPlanDto entRepairPlanDto)throws Exception{
return pcBusinessService.repairPlanUpdate(entRepairPlanDto);
}
/**
* 维修记录
* @return 维修记录
* @throws Exception
**/
@ApiOperation(value = "维修记录", notes = "维修记录")
@GetMapping(value = "/repairRecord")
@PreAuthorize("hasAnyAuthority('repairRecord','repairRecord:update')")
@MethodAnnotation(authorizations = {"repairRecord","repairRecord:update"},name = "维修记录")
@ResponseBody
public SingleResult repairRecord()throws Exception{
return pcBusinessService.repairRecord();
}
/**
* 报修记录
* @return 报修记录
* @throws Exception
**/
@ApiOperation(value = "报修记录", notes = "报修记录")
@GetMapping(value = "/reportRecord")
@PreAuthorize("hasAnyAuthority('reportRecord','reportRecord:update')")
@MethodAnnotation(authorizations = {"reportRecord","reportRecord:update"},name = "报修记录")
@ResponseBody
public SingleResult reportRecord()throws Exception{
return pcBusinessService.reportRecord();
}
} }

View File

@ -512,6 +512,65 @@ public class PcBusinessService extends BaseController {
return singleResult; return singleResult;
} }
public SingleResult inspectionRecord(String startTime,String endTime){
SingleResult singleResult = new SingleResult();
List<EntInspectionRecord>inspectionRecords = entInspectionRecordMapper.selectInspectionRecord(startTime,endTime);
singleResult.setData(inspectionRecords);
return singleResult;
}
public SingleResult repairPlan(){
SingleResult singleResult = new SingleResult();
List<EntRepairPlan>entRepairPlans = entRepairPlanMapper.selectRepairPlan();
singleResult.setData(entRepairPlans);
return singleResult;
}
public SingleResult repairPlanUpdate(EntRepairPlanDto entRepairPlanDto){
SingleResult singleResult = new SingleResult();
EntRepairPlan entRepairPlan = new EntRepairPlan();
BeanUtils.copyProperties(entRepairPlanDto,entRepairPlan);
int result = 0;
if (null != entRepairPlanDto && null != entRepairPlan.getRepairPlanId()){
result = entRepairPlanMapper.updateRepairPlan(entRepairPlan);
}else{
result = entRepairPlanMapper.insert(entRepairPlan);
}
if (result != 1 ){
singleResult.setCode(Code.ERROR.getCode());
singleResult.setMessage(Message.ERROR);
}
return singleResult;
}
public SingleResult submitInspection(InspectionRecordDto inspectionRecordDto){
SingleResult singleResult = new SingleResult();
EntInspectionRecord entInspectionRecord = new EntInspectionRecord();
BeanUtils.copyProperties(inspectionRecordDto,entInspectionRecord);
int result = 0;
if (null != inspectionRecordDto && null != entInspectionRecord.getInspectionId()){
result = entInspectionRecordMapper.updateEntInspectionRecord(entInspectionRecord);
}else {
result = entInspectionRecordMapper.insert(entInspectionRecord);
}
if (result != 1 ){
singleResult.setCode(Code.ERROR.getCode());
singleResult.setMessage(Message.ERROR);
}
return singleResult;
}
public SingleResult repairRecord(){
SingleResult singleResult = new SingleResult();
//ent_repair_record
return singleResult;
}
public SingleResult reportRecord(){
SingleResult singleResult = new SingleResult();
return singleResult;
}