企业端设备模块->企业端PC,小程序接口调试,部分设备删除接口
This commit is contained in:
parent
48a83ae2c5
commit
1be58d62e7
|
|
@ -33,4 +33,12 @@ public interface EntDeviceMaintenanceRecordMapper extends BaseMapper<EntDeviceMa
|
|||
* */
|
||||
List<EntDeviceMaintenanceRecord>selectEntDeviceMaintenanceRecord(String deviceId);
|
||||
|
||||
|
||||
/**
|
||||
* 设备保养记录软删除
|
||||
* @param deviceEntInsRecordId
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String deviceEntInsRecordId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,4 +36,12 @@ public interface EntInspectionRecordMapper extends BaseMapper<EntInspectionRecor
|
|||
* */
|
||||
int updateEntInspectionRecord(@Param("data") EntInspectionRecord entInspectionRecord);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 软删除送检记录
|
||||
* @return int
|
||||
* @param deviceEntInspectionRecordId
|
||||
* */
|
||||
int updateDelState(String deviceEntInspectionRecordId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,13 @@ public interface EntRepairPlanMapper extends BaseMapper<EntRepairPlan> {
|
|||
* */
|
||||
int updateRepairPlan(@Param("data") EntRepairPlan entRepairPlan);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 软删除维修计划
|
||||
* @param repairPlanId 企业维修计划主键
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(@Param("repairPlanId")String repairPlanId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,12 @@ public interface EntRepairRecordMapper extends BaseMapper<EntRepairRecord> {
|
|||
* */
|
||||
int repairRecordUpdate(EntRepairRecord entRepairRecord);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 软删除维修记录
|
||||
* @param repairRecordId
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String repairRecordId );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,13 @@ public interface EntReportRepairMapper extends BaseMapper<EntReportRepair> {
|
|||
int updateReportRecord(@Param("data") EntReportRepair entReportRepair);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 软删除报修列表
|
||||
* @return int
|
||||
* @param reportRepairId 报修对象ID
|
||||
* */
|
||||
int updateDelState(String reportRepairId);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<update id="UpdateEntDeviceMaintenanceRecord">
|
||||
update ent_device_maintenance_record set maintenance_status = #{data.maintenanceStatus} , maintenance_level = #{data.maintenanceLevel}, start_time = #{data.startTime},ent_time = #{data.entTime},maintenance_time_hour = #{data.maintenanceTimeHour},
|
||||
maintenance_time_minute = #{data.maintenanceTimeMinute},maintenance_cost = #{data.maintenanceCost},shutdown_or_not = #{shutdownOrNot},down_time = #{data.downTime},maintenance_charge_person = #{data.maintenanceChargePerson},
|
||||
maintenance_requirement = #{data.maintenanceRequirement},job_description = #{data.jobDescription},modify_by = #{data.modifyBy},modify_time = #{modifyTime}
|
||||
maintenance_requirement = #{data.maintenanceRequirement},job_description = #{data.jobDescription},modify_by = #{data.modifyBy},modify_time = #{data.modifyTime} where record_id = #{data.recordId}
|
||||
</update>
|
||||
|
||||
|
||||
|
|
@ -42,4 +42,8 @@
|
|||
left join ent_user eu on edmr.maintenance_charge_person = eu.ent_user_id
|
||||
where device_id = #{deviceId}
|
||||
</select>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_device_maintenance_record set del_state = 1 where record_id = #{deviceEntInsRecordId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@
|
|||
<update id="updateEntInspectionRecord">
|
||||
update ent_inspection_record set device_id = #{data.deviceId}, 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}
|
||||
where inspection_id = #{data.inspectionId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_inspection_record set del_state = 2 where inspection_id = #{data.inspectionId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,11 @@
|
|||
<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}
|
||||
where repair_plan_id = #{repairPlanId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_repair_plan set del_state = 2 where repair_plan_id = #{repairPlanId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -36,8 +36,12 @@
|
|||
</select>
|
||||
|
||||
<update id="repairRecordUpdate">
|
||||
update ent_report_repair set device_id = #{deviceId},repair_code = #{repairCode}, repair_time = #{repairTime}, cause_of_failure = #{causeOfFailure}, external_maintenance_unit = #{externalMaintenanceUnit}, external_maintenance_person_name = #{externalMaintenancePersonName}, repair_state = #{repairState}, repair_start_time = #{repairStartTime}, repair_end_time = #{repairEndTime}, repair_level = #{repairLevel}, shutdown = #{shutdown}, down_time = #{downTime}, affected_generation = #{affectedGeneration}, repair_cost = #{repairCost}, work_description = #{workDescription},modify_by = #{modifyBy}, modify_time= #{modifyTime}
|
||||
update ent_repair_record set device_id = #{deviceId},repair_code = #{repairCode}, repair_time = #{repairTime}, cause_of_failure = #{causeOfFailure}, external_maintenance_unit = #{externalMaintenanceUnit}, external_maintenance_person_name = #{externalMaintenancePersonName}, repair_state = #{repairState}, repair_start_time = #{repairStartTime}, repair_end_time = #{repairEndTime}, repair_level = #{repairLevel}, shutdown = #{shutdown}, down_time = #{downTime}, affected_generation = #{affectedGeneration}, repair_cost = #{repairCost}, work_description = #{workDescription},modify_by = #{modifyBy}, modify_time= #{modifyTime}
|
||||
where repair_record_id = #{repairRecordId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_repair_record set del_state = 2 where repair_record_id = #{repairRecordId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -35,4 +35,8 @@
|
|||
where report_repair_id = #{data.reportRepairId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_report_repair set del_state = 2 where report_repair_id = #{reportRepairId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -528,8 +528,81 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
@PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceMaintenancePlan:delete"},name = "企业设备保养计划删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceMaintenancePlanDelete(@RequestParam(required = true) String deviceEntInsRecordId)throws Exception{
|
||||
return pcBusinessService.entDeviceMaintenancePlanDelete(deviceEntInsRecordId);
|
||||
public SingleResult entDeviceMaintenancePlanDelete(@RequestParam(required = true) String deviceEntInsPlanId)throws Exception{
|
||||
return pcBusinessService.entDeviceMaintenancePlanDelete(deviceEntInsPlanId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 企业设备保养记录删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备保养记录删除", notes = "企业设备保养记录删除")
|
||||
@PostMapping(value = "/entDeviceMaintenanceRecordDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord:delete"},name = "企业设备保养记录删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceMaintenanceRecordDelete(@RequestParam(required = true) String deviceEntInsRecordId)throws Exception{
|
||||
return pcBusinessService.entDeviceMaintenanceRecordDelete(deviceEntInsRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备送检记录删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备送检记录删除", notes = "企业设备送检记录删除")
|
||||
@PostMapping(value = "/entDeviceEntInspectionRecordDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceEntInspectionRecord:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceEntInspectionRecord:delete"},name = "企业设备送检记录删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceEntInspectionRecordDelete(@RequestParam(required = true) String deviceEntInspectionRecordId)throws Exception{
|
||||
return pcBusinessService.entDeviceEntInspectionRecordDelete(deviceEntInspectionRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备维修计划删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备维修计划删除", notes = "企业设备维修计划删除")
|
||||
@PostMapping(value = "/entDeviceRepairPlanDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceEntRepairPlan:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceEntRepairPlan:delete"},name = "企业设备维修计划删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceRepairPlanDelete(@RequestParam(required = true) String repairPlanId)throws Exception{
|
||||
return pcBusinessService.entDeviceRepairPlanDelete(repairPlanId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业设备维修记录删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备维修记录删除", notes = "企业设备维修记录删除")
|
||||
@PostMapping(value = "/entDeviceRepairRecordDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceEntRepairRecord:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceEntRepairRecord:delete"},name = "企业设备维修记录删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceRepairRecordDelete(@RequestParam(required = true) String repairRecordId)throws Exception{
|
||||
return pcBusinessService.entDeviceRepairRecordDelete(repairRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备故障报修删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备故障报修删除", notes = "企业设备故障报修删除")
|
||||
@PostMapping(value = "/entDeviceReportRepairDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceReportRepair:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceReportRepair:delete"},name = "企业设备故障报修删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceReportRepairDelete(@RequestParam(required = true) String reportRepair)throws Exception{
|
||||
return pcBusinessService.entDeviceReportRepairDelete(reportRepair);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -540,4 +613,6 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import com.rzyc.model.dto.SparePartDto;
|
|||
import com.rzyc.model.ent.InEntList;
|
||||
import com.rzyc.model.ent.SysEnterprise;
|
||||
|
||||
import org.apache.commons.math3.analysis.function.Sin;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -1068,9 +1069,9 @@ public class PcBusinessService extends BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceMaintenancePlanDelete(String maintenancePlanId){
|
||||
public SingleResult entDeviceMaintenancePlanDelete(String deviceEntInsPlanId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entDeviceMaintenancePlanMapper.updateDelState(maintenancePlanId);
|
||||
int result = entDeviceMaintenancePlanMapper.updateDelState(deviceEntInsPlanId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
|
|
@ -1079,5 +1080,55 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
public SingleResult entDeviceMaintenanceRecordDelete(String deviceEntInsRecordId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entDeviceMaintenanceRecordMapper.updateDelState(deviceEntInsRecordId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceEntInspectionRecordDelete(String deviceEntInspectionRecordId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entInspectionRecordMapper.updateDelState(deviceEntInspectionRecordId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceRepairPlanDelete(String repairPlanId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entRepairPlanMapper.updateDelState(repairPlanId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceRepairRecordDelete(String repairRecordId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entRepairRecordMapper.updateDelState(repairRecordId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceReportRepairDelete(String reportRepair){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entReportRepairMapper.updateDelState(reportRepair);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user