diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntInspectionRecordMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntInspectionRecordMapper.java new file mode 100644 index 0000000..dda1571 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntInspectionRecordMapper.java @@ -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; + +/** + *

+ * 送检记录 Mapper 接口 + *

+ * + * @author + * @since 2022-10-27 + */ +@Repository +public interface EntInspectionRecordMapper extends BaseMapper { + + + /** + * 查询送检记录 + * @return list + * @param startTime + * @param endTime + * */ + ListselectInspectionRecord(@Param("startTime") String startTime,@Param("endTime") String endTime); + + + /** + * 修改送检记录 + * @return int + * @param entInspectionRecord + * */ + int updateEntInspectionRecord(@Param("data") EntInspectionRecord entInspectionRecord); + +} diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntRepairPlanMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntRepairPlanMapper.java new file mode 100644 index 0000000..c62e632 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntRepairPlanMapper.java @@ -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; + +/** + *

+ * Mapper 接口 + *

+ * + * @author + * @since 2022-10-27 + */ +@Repository +public interface EntRepairPlanMapper extends BaseMapper { + + /** + * 企业维修计划查询 + * @return list + * */ + ListselectRepairPlan(); + + + /** + * 修改维修计划 + * @param entRepairPlan 企业维修计划对象 + * @return int + * */ + int updateRepairPlan(@Param("data") EntRepairPlan entRepairPlan); + +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntInspectionRecord.java b/inventory-dao/src/main/java/com/rzyc/model/EntInspectionRecord.java new file mode 100644 index 0000000..39f55ba --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntInspectionRecord.java @@ -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; + +/** + *

+ * 送检记录 + *

+ * + * @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 + + "}"; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntRepairPlan.java b/inventory-dao/src/main/java/com/rzyc/model/EntRepairPlan.java new file mode 100644 index 0000000..c8d3513 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntRepairPlan.java @@ -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; + +/** + *

+ * + *

+ * + * @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 + + "}"; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/EntRepairPlanDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/EntRepairPlanDto.java new file mode 100644 index 0000000..843558b --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/dto/EntRepairPlanDto.java @@ -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; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/InspectionRecordDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/InspectionRecordDto.java new file mode 100644 index 0000000..fdebb5a --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/dto/InspectionRecordDto.java @@ -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; + } +} diff --git a/inventory-dao/src/main/resources/mapper/EntInspectionRecordMapper.xml b/inventory-dao/src/main/resources/mapper/EntInspectionRecordMapper.xml new file mode 100644 index 0000000..316e64a --- /dev/null +++ b/inventory-dao/src/main/resources/mapper/EntInspectionRecordMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + inspection_id, inspection_device_id, inspection_organization, inspection_user_id, inspection_time, inspection_state, inspection_text, create_by, create_time, modify_by, modify_time + + + + + + 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} + + + diff --git a/inventory-dao/src/main/resources/mapper/EntRepairPlanMapper.xml b/inventory-dao/src/main/resources/mapper/EntRepairPlanMapper.xml new file mode 100644 index 0000000..c6d78f7 --- /dev/null +++ b/inventory-dao/src/main/resources/mapper/EntRepairPlanMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + repair_plan_id, repair_device_id, repair_level, repair_state, last_time_repair, repair_time, description, create_time, create_by, modify_time, modify_by + + + + + + 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} + + + + diff --git a/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java b/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java index b7732f3..df4512e 100644 --- a/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java +++ b/inventory-ent/src/main/java/com/rzyc/controller/BaseController.java @@ -501,8 +501,15 @@ public class BaseController { protected EntDeviceMaintenanceRecordMapper entDeviceMaintenanceRecordMapper; + //企业送检记录 + @Autowired + protected EntInspectionRecordMapper entInspectionRecordMapper; + //企业维修计划 + @Autowired + protected EntRepairPlanMapper entRepairPlanMapper; + /** diff --git a/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java b/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java index abf927a..21048eb 100644 --- a/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java +++ b/inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java @@ -4,12 +4,14 @@ package com.rzyc.controller; import com.common.utils.model.SingleResult; import com.rzyc.config.MethodAnnotation; import com.rzyc.model.EntDevice; +import com.rzyc.model.EntDeviceType; import com.rzyc.model.dto.*; import com.rzyc.service.PcBusinessService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import org.apache.ibatis.annotations.Param; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.validation.annotation.Validated; @@ -42,7 +44,7 @@ public class EnterpriseEquipmentController extends BaseController { * @return 企业设备类型列表 * @throws Exception */ - /*@ApiOperation(value = "企业设备类型列表", notes = "企业设备类型列表") + @ApiOperation(value = "企业设备类型列表", notes = "企业设备类型列表") @ApiImplicitParams({ @ApiImplicitParam(name = "enterpriseId", value = "公司id", required = true, dataType = "string") }) @@ -52,7 +54,7 @@ public class EnterpriseEquipmentController extends BaseController { @ResponseBody public SingleResult> entEquipmentTypeList(@NotNull(message = "公司id不能为null") String enterpriseId)throws Exception{ return pcBusinessService.entEquipmentTypeList(enterpriseId); - }*/ + } /** @@ -162,7 +164,7 @@ public class EnterpriseEquipmentController extends BaseController { * @throws Exception */ @ApiOperation(value = "设备巡检记录-添加和修改巡检记录", notes = "设备巡检记录-添加和修改巡检记录") - @PostMapping(value = "/addOrUpdateInspectionRecord") + @PostMapping(value = "/addOrUpdateInspectionAddOrRecord") @PreAuthorize("hasAnyAuthority('addOrUpdateInspectionRecord:update')") @MethodAnnotation(authorizations = {"addOrUpdateInspectionRecord:update"},name = "设备巡检记录-添加和修改巡检记录") @ResponseBody @@ -207,7 +209,7 @@ public class EnterpriseEquipmentController extends BaseController { * @throws Exception **/ @ApiOperation(value = "备件列表-新增和修改", notes = "备件列表-新增和修改") - @PostMapping(value = "/sparePartUpdate") + @PostMapping(value = "/sparePartAddOrUpdate") @PreAuthorize("hasAnyAuthority('sparePartList:update')") @MethodAnnotation(authorizations = {"sparePartList:update"},name = "备件列表-新增和修改") @ResponseBody @@ -222,7 +224,7 @@ public class EnterpriseEquipmentController extends BaseController { * @throws Exception **/ @ApiOperation(value = "保养计划-新增和修改", notes = "保养计划-新增和修改") - @PostMapping(value = "/entDeviceMaintenancePlanUpdate") + @PostMapping(value = "/entDeviceMaintenancePlanAddOrUpdate") @PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan:update')") @MethodAnnotation(authorizations = {"entDeviceMaintenancePlan:update"},name = "保养计划-新增和修改") @ResponseBody @@ -253,7 +255,7 @@ public class EnterpriseEquipmentController extends BaseController { * @throws Exception **/ @ApiOperation(value = "保养记录-新增和修改", notes = "保养记录-新增和修改") - @PostMapping(value = "/entDeviceMaintenanceRecordUpdate") + @PostMapping(value = "/entDeviceMaintenanceRecordAddOrUpdate") @PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord:update')") @MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord:update"},name = "保养记录-新增和修改") @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(); + } + + + + + } diff --git a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java index a2b3f31..8623ae7 100644 --- a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java +++ b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java @@ -512,6 +512,65 @@ public class PcBusinessService extends BaseController { return singleResult; } + public SingleResult inspectionRecord(String startTime,String endTime){ + SingleResult singleResult = new SingleResult(); + ListinspectionRecords = entInspectionRecordMapper.selectInspectionRecord(startTime,endTime); + singleResult.setData(inspectionRecords); + return singleResult; + } + public SingleResult repairPlan(){ + SingleResult singleResult = new SingleResult(); + ListentRepairPlans = 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; + } +