故障信息四个页面

master
A0010407 1 year ago
parent 5f03c120b6
commit 1d55861aa9

@ -0,0 +1,97 @@
package com.op.device.controller;
import java.util.List;
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.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.device.domain.EquFaultDescription;
import com.op.device.service.IEquFaultDescriptionService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Open Platform
* @date 2023-12-15
*/
@RestController
@RequestMapping("/faultDescription")
public class EquFaultDescriptionController extends BaseController {
@Autowired
private IEquFaultDescriptionService equFaultDescriptionService;
/**
*
*/
@RequiresPermissions("device:faultDescription:list")
@GetMapping("/list")
public TableDataInfo list(EquFaultDescription equFaultDescription) {
startPage();
List<EquFaultDescription> list = equFaultDescriptionService.selectEquFaultDescriptionList(equFaultDescription);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:faultDescription:export")
@Log(title = "故障描述", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquFaultDescription equFaultDescription) {
List<EquFaultDescription> list = equFaultDescriptionService.selectEquFaultDescriptionList(equFaultDescription);
ExcelUtil<EquFaultDescription> util = new ExcelUtil<EquFaultDescription>(EquFaultDescription.class);
util.exportExcel(response, list, "故障描述数据");
}
/**
*
*/
@RequiresPermissions("device:faultDescription:query")
@GetMapping(value = "/{faultId}")
public AjaxResult getInfo(@PathVariable("faultId") String faultId) {
return success(equFaultDescriptionService.selectEquFaultDescriptionByFaultId(faultId));
}
/**
*
*/
@RequiresPermissions("device:faultDescription:add")
@Log(title = "故障描述", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquFaultDescription equFaultDescription) {
return equFaultDescriptionService.insertEquFaultDescription(equFaultDescription);
}
/**
*
*/
@RequiresPermissions("device:faultDescription:edit")
@Log(title = "故障描述", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquFaultDescription equFaultDescription) {
return equFaultDescriptionService.updateEquFaultDescription(equFaultDescription);
}
/**
*
*/
@RequiresPermissions("device:faultDescription:remove")
@Log(title = "故障描述", businessType = BusinessType.DELETE)
@DeleteMapping("/{faultIds}")
public AjaxResult remove(@PathVariable String[] faultIds) {
return toAjax(equFaultDescriptionService.deleteEquFaultDescriptionByFaultIds(faultIds));
}
}

@ -0,0 +1,97 @@
package com.op.device.controller;
import java.util.List;
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.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.device.domain.EquFaultMeasures;
import com.op.device.service.IEquFaultMeasuresService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Open Platform
* @date 2023-12-15
*/
@RestController
@RequestMapping("/faultMeasures")
public class EquFaultMeasuresController extends BaseController {
@Autowired
private IEquFaultMeasuresService equFaultMeasuresService;
/**
*
*/
@RequiresPermissions("device:faultMeasures:list")
@GetMapping("/list")
public TableDataInfo list(EquFaultMeasures equFaultMeasures) {
startPage();
List<EquFaultMeasures> list = equFaultMeasuresService.selectEquFaultMeasuresList(equFaultMeasures);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:faultMeasures:export")
@Log(title = "故障维修措施", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquFaultMeasures equFaultMeasures) {
List<EquFaultMeasures> list = equFaultMeasuresService.selectEquFaultMeasuresList(equFaultMeasures);
ExcelUtil<EquFaultMeasures> util = new ExcelUtil<EquFaultMeasures>(EquFaultMeasures.class);
util.exportExcel(response, list, "故障维修措施数据");
}
/**
*
*/
@RequiresPermissions("device:faultMeasures:query")
@GetMapping(value = "/{faultId}")
public AjaxResult getInfo(@PathVariable("faultId") String faultId) {
return success(equFaultMeasuresService.selectEquFaultMeasuresByFaultId(faultId));
}
/**
*
*/
@RequiresPermissions("device:faultMeasures:add")
@Log(title = "故障维修措施", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquFaultMeasures equFaultMeasures) {
return equFaultMeasuresService.insertEquFaultMeasures(equFaultMeasures);
}
/**
*
*/
@RequiresPermissions("device:faultMeasures:edit")
@Log(title = "故障维修措施", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquFaultMeasures equFaultMeasures) {
return equFaultMeasuresService.updateEquFaultMeasures(equFaultMeasures);
}
/**
*
*/
@RequiresPermissions("device:faultMeasures:remove")
@Log(title = "故障维修措施", businessType = BusinessType.DELETE)
@DeleteMapping("/{faultIds}")
public AjaxResult remove(@PathVariable String[] faultIds) {
return toAjax(equFaultMeasuresService.deleteEquFaultMeasuresByFaultIds(faultIds));
}
}

@ -0,0 +1,97 @@
package com.op.device.controller;
import java.util.List;
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.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.device.domain.EquFaultReason;
import com.op.device.service.IEquFaultReasonService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author Open Platform
* @date 2023-12-15
*/
@RestController
@RequestMapping("/faultReason")
public class EquFaultReasonController extends BaseController {
@Autowired
private IEquFaultReasonService equFaultReasonService;
/**
*
*/
@RequiresPermissions("device:faultReason:list")
@GetMapping("/list")
public TableDataInfo list(EquFaultReason equFaultReason) {
startPage();
List<EquFaultReason> list = equFaultReasonService.selectEquFaultReasonList(equFaultReason);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:faultReason:export")
@Log(title = "故障原因", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EquFaultReason equFaultReason) {
List<EquFaultReason> list = equFaultReasonService.selectEquFaultReasonList(equFaultReason);
ExcelUtil<EquFaultReason> util = new ExcelUtil<EquFaultReason>(EquFaultReason.class);
util.exportExcel(response, list, "故障原因数据");
}
/**
*
*/
@RequiresPermissions("device:faultReason:query")
@GetMapping(value = "/{faultId}")
public AjaxResult getInfo(@PathVariable("faultId") String faultId) {
return success(equFaultReasonService.selectEquFaultReasonByFaultId(faultId));
}
/**
*
*/
@RequiresPermissions("device:faultReason:add")
@Log(title = "故障原因", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody EquFaultReason equFaultReason) {
return equFaultReasonService.insertEquFaultReason(equFaultReason);
}
/**
*
*/
@RequiresPermissions("device:faultReason:edit")
@Log(title = "故障原因", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody EquFaultReason equFaultReason) {
return equFaultReasonService.updateEquFaultReason(equFaultReason);
}
/**
*
*/
@RequiresPermissions("device:faultReason:remove")
@Log(title = "故障原因", businessType = BusinessType.DELETE)
@DeleteMapping("/{faultIds}")
public AjaxResult remove(@PathVariable String[] faultIds) {
return toAjax(equFaultReasonService.deleteEquFaultReasonByFaultIds(faultIds));
}
}

@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquTeamUser;
import com.op.device.domain.Equipment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -137,4 +138,13 @@ public class EquRepairOrderController extends BaseController {
return getDataTable(list);
}
/**
* 线
*/
@GetMapping("/getGroupLineList")
public TableDataInfo getGroupLineList() {
List<EquEquipment> list = equRepairOrderService.selectGroupLineList();
return getDataTable(list);
}
}

@ -3,6 +3,7 @@ package com.op.device.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquTeamUser;
import com.op.device.service.IDevicePDAService;
import com.op.device.service.IEquOutsourceWorkService;

@ -0,0 +1,214 @@
package com.op.device.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import java.util.Date;
import java.util.List;
/**
* equ_fault_description
*
* @author Open Platform
* @date 2023-12-15
*/
public class EquFaultDescription extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 故障描述主键 */
private String faultId;
/** 故障描述编码 */
@Excel(name = "故障描述编码")
private String faultCode;
/** 故障描述类型 */
@Excel(name = "故障描述类型")
private String faultType;
/** 故障描述子类 */
@Excel(name = "故障描述子类")
private String faultSubclass;
/** 备注 */
@Excel(name = "备注")
private String faultRemark;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String factoryCode;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标志 */
private String delFlag;
// 创建日期范围list
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
// 更新日期开始
private String updateTimeStart;
// 更新日期结束
private String updateTimeEnd;
// 创建日期开始
private String createTimeStart;
// 创建日期结束
private String createTimeEnd;
public void setFaultId(String faultId) {
this.faultId = faultId;
}
public String getFaultId() {
return faultId;
}
public void setFaultCode(String faultCode) {
this.faultCode = faultCode;
}
public String getFaultCode() {
return faultCode;
}
public void setFaultType(String faultType) {
this.faultType = faultType;
}
public String getFaultType() {
return faultType;
}
public void setFaultSubclass(String faultSubclass) {
this.faultSubclass = faultSubclass;
}
public String getFaultSubclass() {
return faultSubclass;
}
public void setFaultRemark(String faultRemark) {
this.faultRemark = faultRemark;
}
public String getFaultRemark() {
return faultRemark;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public List<Date> getUpdateTimeArray() {
return updateTimeArray;
}
public void setUpdateTimeArray(List<Date> updateTimeArray) {
this.updateTimeArray = updateTimeArray;
}
public String getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(String updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public String getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(String updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
public String getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(String createTimeStart) {
this.createTimeStart = createTimeStart;
}
public String getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(String createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("faultId", getFaultId())
.append("faultCode", getFaultCode())
.append("faultType", getFaultType())
.append("faultSubclass", getFaultSubclass())
.append("faultRemark", getFaultRemark())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,214 @@
package com.op.device.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import java.util.Date;
import java.util.List;
/**
* equ_fault_measures
*
* @author Open Platform
* @date 2023-12-15
*/
public class EquFaultMeasures extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 故障维修措施主键 */
private String faultId;
/** 故障维修措施编码 */
@Excel(name = "故障维修措施编码")
private String faultCode;
/** 故障维修措施类型 */
@Excel(name = "故障维修措施类型")
private String faultType;
/** 故障维修措施子类 */
@Excel(name = "故障维修措施子类")
private String faultSubclass;
/** 备注 */
@Excel(name = "备注")
private String faultRemark;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String factoryCode;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标志 */
private String delFlag;
// 创建日期范围list
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
// 更新日期开始
private String updateTimeStart;
// 更新日期结束
private String updateTimeEnd;
// 创建日期开始
private String createTimeStart;
// 创建日期结束
private String createTimeEnd;
public void setFaultId(String faultId) {
this.faultId = faultId;
}
public String getFaultId() {
return faultId;
}
public void setFaultCode(String faultCode) {
this.faultCode = faultCode;
}
public String getFaultCode() {
return faultCode;
}
public void setFaultType(String faultType) {
this.faultType = faultType;
}
public String getFaultType() {
return faultType;
}
public void setFaultSubclass(String faultSubclass) {
this.faultSubclass = faultSubclass;
}
public String getFaultSubclass() {
return faultSubclass;
}
public void setFaultRemark(String faultRemark) {
this.faultRemark = faultRemark;
}
public String getFaultRemark() {
return faultRemark;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public List<Date> getUpdateTimeArray() {
return updateTimeArray;
}
public void setUpdateTimeArray(List<Date> updateTimeArray) {
this.updateTimeArray = updateTimeArray;
}
public String getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(String updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public String getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(String updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
public String getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(String createTimeStart) {
this.createTimeStart = createTimeStart;
}
public String getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(String createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("faultId", getFaultId())
.append("faultCode", getFaultCode())
.append("faultType", getFaultType())
.append("faultSubclass", getFaultSubclass())
.append("faultRemark", getFaultRemark())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -0,0 +1,214 @@
package com.op.device.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import java.util.Date;
import java.util.List;
/**
* equ_fault_reason
*
* @author Open Platform
* @date 2023-12-15
*/
public class EquFaultReason extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 故障原因主键 */
private String faultId;
/** 故障原因编码 */
@Excel(name = "故障原因编码")
private String faultCode;
/** 故障原因类型 */
@Excel(name = "故障原因类型")
private String faultType;
/** 故障原因子类 */
@Excel(name = "故障原因子类")
private String faultSubclass;
/** 备注 */
@Excel(name = "备注")
private String faultRemark;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String factoryCode;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String attr1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String attr2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String attr3;
/** 删除标志 */
private String delFlag;
// 创建日期范围list
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
// 更新日期开始
private String updateTimeStart;
// 更新日期结束
private String updateTimeEnd;
// 创建日期开始
private String createTimeStart;
// 创建日期结束
private String createTimeEnd;
public void setFaultId(String faultId) {
this.faultId = faultId;
}
public String getFaultId() {
return faultId;
}
public void setFaultCode(String faultCode) {
this.faultCode = faultCode;
}
public String getFaultCode() {
return faultCode;
}
public void setFaultType(String faultType) {
this.faultType = faultType;
}
public String getFaultType() {
return faultType;
}
public void setFaultSubclass(String faultSubclass) {
this.faultSubclass = faultSubclass;
}
public String getFaultSubclass() {
return faultSubclass;
}
public void setFaultRemark(String faultRemark) {
this.faultRemark = faultRemark;
}
public String getFaultRemark() {
return faultRemark;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setAttr1(String attr1) {
this.attr1 = attr1;
}
public String getAttr1() {
return attr1;
}
public void setAttr2(String attr2) {
this.attr2 = attr2;
}
public String getAttr2() {
return attr2;
}
public void setAttr3(String attr3) {
this.attr3 = attr3;
}
public String getAttr3() {
return attr3;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public List<Date> getUpdateTimeArray() {
return updateTimeArray;
}
public void setUpdateTimeArray(List<Date> updateTimeArray) {
this.updateTimeArray = updateTimeArray;
}
public String getUpdateTimeStart() {
return updateTimeStart;
}
public void setUpdateTimeStart(String updateTimeStart) {
this.updateTimeStart = updateTimeStart;
}
public String getUpdateTimeEnd() {
return updateTimeEnd;
}
public void setUpdateTimeEnd(String updateTimeEnd) {
this.updateTimeEnd = updateTimeEnd;
}
public String getCreateTimeStart() {
return createTimeStart;
}
public void setCreateTimeStart(String createTimeStart) {
this.createTimeStart = createTimeStart;
}
public String getCreateTimeEnd() {
return createTimeEnd;
}
public void setCreateTimeEnd(String createTimeEnd) {
this.createTimeEnd = createTimeEnd;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("faultId", getFaultId())
.append("faultCode", getFaultCode())
.append("faultType", getFaultType())
.append("faultSubclass", getFaultSubclass())
.append("faultRemark", getFaultRemark())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -10,7 +10,7 @@ import java.util.List;
/**
* equ_fault_type
*
*
* @author wws
* @date 2023-10-12
*/
@ -216,20 +216,20 @@ public class EquFaultType extends BaseEntity {
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("faultId", getFaultId())
.append("faultCode", getFaultCode())
.append("faultType", getFaultType())
.append("faultSubclass", getFaultSubclass())
.append("faultRemark", getFaultRemark())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
.append("faultId", getFaultId())
.append("faultCode", getFaultCode())
.append("faultType", getFaultType())
.append("faultSubclass", getFaultSubclass())
.append("faultRemark", getFaultRemark())
.append("factoryCode", getFactoryCode())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -66,7 +66,7 @@ public interface EquEquipmentMapper {
List<EquEquipment> getEquipmentTypeList(EquEquipment equEquipment);
// 查询设备组线
List<Equipment> selectEqupmentGroupLine();
List<EquEquipment> selectEquipmentGroupLine();
// 查询设备信息
List<EquEquipment> selectEquipmentList(EquEquipment equEquipment);

@ -0,0 +1,66 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquFaultDescription;
import com.op.device.domain.EquFaultType;
/**
* Mapper
*
* @author Open Platform
* @date 2023-12-15
*/
public interface EquFaultDescriptionMapper {
/**
*
*
* @param faultId
* @return
*/
public EquFaultDescription selectEquFaultDescriptionByFaultId(String faultId);
/**
*
*
* @param equFaultDescription
* @return
*/
public List<EquFaultDescription> selectEquFaultDescriptionList(EquFaultDescription equFaultDescription);
/**
*
*
* @param equFaultDescription
* @return
*/
public int insertEquFaultDescription(EquFaultDescription equFaultDescription);
/**
*
*
* @param equFaultDescription
* @return
*/
public int updateEquFaultDescription(EquFaultDescription equFaultDescription);
/**
*
*
* @param faultId
* @return
*/
public int deleteEquFaultDescriptionByFaultId(String faultId);
/**
*
*
* @param faultIds
* @return
*/
public int deleteEquFaultDescriptionByFaultIds(String[] faultIds);
int selectSerialNumber();
List<EquFaultDescription> selectFaultDescriptionList(EquFaultDescription equFaultDescription);
}

@ -0,0 +1,66 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquFaultMeasures;
import com.op.device.domain.EquFaultType;
/**
* Mapper
*
* @author Open Platform
* @date 2023-12-15
*/
public interface EquFaultMeasuresMapper {
/**
*
*
* @param faultId
* @return
*/
public EquFaultMeasures selectEquFaultMeasuresByFaultId(String faultId);
/**
*
*
* @param equFaultMeasures
* @return
*/
public List<EquFaultMeasures> selectEquFaultMeasuresList(EquFaultMeasures equFaultMeasures);
/**
*
*
* @param equFaultMeasures
* @return
*/
public int insertEquFaultMeasures(EquFaultMeasures equFaultMeasures);
/**
*
*
* @param equFaultMeasures
* @return
*/
public int updateEquFaultMeasures(EquFaultMeasures equFaultMeasures);
/**
*
*
* @param faultId
* @return
*/
public int deleteEquFaultMeasuresByFaultId(String faultId);
/**
*
*
* @param faultIds
* @return
*/
public int deleteEquFaultMeasuresByFaultIds(String[] faultIds);
List<EquFaultMeasures> selectFaultMeasuresList(EquFaultMeasures equFaultMeasures);
int selectSerialNumber();
}

@ -0,0 +1,66 @@
package com.op.device.mapper;
import java.util.List;
import com.op.device.domain.EquFaultReason;
import com.op.device.domain.EquFaultType;
/**
* Mapper
*
* @author Open Platform
* @date 2023-12-15
*/
public interface EquFaultReasonMapper {
/**
*
*
* @param faultId
* @return
*/
public EquFaultReason selectEquFaultReasonByFaultId(String faultId);
/**
*
*
* @param equFaultReason
* @return
*/
public List<EquFaultReason> selectEquFaultReasonList(EquFaultReason equFaultReason);
/**
*
*
* @param equFaultReason
* @return
*/
public int insertEquFaultReason(EquFaultReason equFaultReason);
/**
*
*
* @param equFaultReason
* @return
*/
public int updateEquFaultReason(EquFaultReason equFaultReason);
/**
*
*
* @param faultId
* @return
*/
public int deleteEquFaultReasonByFaultId(String faultId);
/**
*
*
* @param faultIds
* @return
*/
public int deleteEquFaultReasonByFaultIds(String[] faultIds);
List<EquFaultType> selectFaultReasonList(EquFaultType checkQuery);
int selectSerialNumber();
}

@ -8,14 +8,14 @@ import com.op.device.domain.EquRepairWorkOrder;
/**
* Mapper
*
*
* @author wws
* @date 2023-10-12
*/
public interface EquFaultTypeMapper {
/**
*
*
*
* @param faultId
* @return
*/
@ -23,7 +23,7 @@ public interface EquFaultTypeMapper {
/**
*
*
*
* @param equFaultType
* @return
*/
@ -31,7 +31,7 @@ public interface EquFaultTypeMapper {
/**
*
*
*
* @param equFaultType
* @return
*/
@ -39,7 +39,7 @@ public interface EquFaultTypeMapper {
/**
*
*
*
* @param equFaultType
* @return
*/
@ -47,7 +47,7 @@ public interface EquFaultTypeMapper {
/**
* -
*
*
* @param faultId
* @return
*/
@ -55,7 +55,7 @@ public interface EquFaultTypeMapper {
/**
* -
*
*
* @param faultIds
* @return
*/
@ -65,9 +65,9 @@ public interface EquFaultTypeMapper {
*
* @return
*/
int selectSerialNumber();
int selectSerialNumber();
//故障报修第一级
//故障报修第一级
@DS("master")
List<EquFaultType> selectFirstLevelList(EquRepairWorkOrder equRepairWorkOrder);

@ -0,0 +1,62 @@
package com.op.device.service;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquFaultDescription;
/**
* Service
*
* @author Open Platform
* @date 2023-12-15
*/
public interface IEquFaultDescriptionService {
/**
*
*
* @param faultId
* @return
*/
public EquFaultDescription selectEquFaultDescriptionByFaultId(String faultId);
/**
*
*
* @param equFaultDescription
* @return
*/
public List<EquFaultDescription> selectEquFaultDescriptionList(EquFaultDescription equFaultDescription);
/**
*
*
* @param equFaultDescription
* @return
*/
public AjaxResult insertEquFaultDescription(EquFaultDescription equFaultDescription);
/**
*
*
* @param equFaultDescription
* @return
*/
public AjaxResult updateEquFaultDescription(EquFaultDescription equFaultDescription);
/**
*
*
* @param faultIds
* @return
*/
public int deleteEquFaultDescriptionByFaultIds(String[] faultIds);
/**
*
*
* @param faultId
* @return
*/
public int deleteEquFaultDescriptionByFaultId(String faultId);
}

@ -0,0 +1,62 @@
package com.op.device.service;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquFaultMeasures;
/**
* Service
*
* @author Open Platform
* @date 2023-12-15
*/
public interface IEquFaultMeasuresService {
/**
*
*
* @param faultId
* @return
*/
public EquFaultMeasures selectEquFaultMeasuresByFaultId(String faultId);
/**
*
*
* @param equFaultMeasures
* @return
*/
public List<EquFaultMeasures> selectEquFaultMeasuresList(EquFaultMeasures equFaultMeasures);
/**
*
*
* @param equFaultMeasures
* @return
*/
public AjaxResult insertEquFaultMeasures(EquFaultMeasures equFaultMeasures);
/**
*
*
* @param equFaultMeasures
* @return
*/
public AjaxResult updateEquFaultMeasures(EquFaultMeasures equFaultMeasures);
/**
*
*
* @param faultIds
* @return
*/
public int deleteEquFaultMeasuresByFaultIds(String[] faultIds);
/**
*
*
* @param faultId
* @return
*/
public int deleteEquFaultMeasuresByFaultId(String faultId);
}

@ -0,0 +1,62 @@
package com.op.device.service;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquFaultReason;
/**
* Service
*
* @author Open Platform
* @date 2023-12-15
*/
public interface IEquFaultReasonService {
/**
*
*
* @param faultId
* @return
*/
public EquFaultReason selectEquFaultReasonByFaultId(String faultId);
/**
*
*
* @param equFaultReason
* @return
*/
public List<EquFaultReason> selectEquFaultReasonList(EquFaultReason equFaultReason);
/**
*
*
* @param equFaultReason
* @return
*/
public AjaxResult insertEquFaultReason(EquFaultReason equFaultReason);
/**
*
*
* @param equFaultReason
* @return
*/
public AjaxResult updateEquFaultReason(EquFaultReason equFaultReason);
/**
*
*
* @param faultIds
* @return
*/
public int deleteEquFaultReasonByFaultIds(String[] faultIds);
/**
*
*
* @param faultId
* @return
*/
public int deleteEquFaultReasonByFaultId(String faultId);
}

@ -7,14 +7,14 @@ import com.op.device.domain.EquFaultType;
/**
* Service
*
*
* @author wws
* @date 2023-10-12
*/
public interface IEquFaultTypeService {
/**
*
*
*
* @param faultId
* @return
*/
@ -22,7 +22,7 @@ public interface IEquFaultTypeService {
/**
*
*
*
* @param equFaultType
* @return
*/
@ -30,7 +30,7 @@ public interface IEquFaultTypeService {
/**
*
*
*
* @param equFaultType
* @return
*/
@ -38,7 +38,7 @@ public interface IEquFaultTypeService {
/**
*
*
*
* @param equFaultType
* @return
*/
@ -46,7 +46,7 @@ public interface IEquFaultTypeService {
/**
*
*
*
* @param faultIds
* @return
*/
@ -54,7 +54,7 @@ public interface IEquFaultTypeService {
/**
*
*
*
* @param faultId
* @return
*/

@ -77,4 +77,7 @@ public interface IEquRepairOrderService {
//查询报修人员列表
List<EquTeamUser> getRepairPersonList(EquTeamUser equTeamUser);
//查询组线
public List<EquEquipment> selectGroupLineList();
}

@ -2,6 +2,7 @@ package com.op.device.service;
import java.util.List;
import com.op.device.domain.EquEquipment;
import com.op.device.domain.EquRepairWorkOrder;
import com.op.device.domain.EquTeamUser;

@ -0,0 +1,169 @@
package com.op.device.service.impl;
import java.text.SimpleDateFormat;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.context.SecurityContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquFaultType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.device.mapper.EquFaultDescriptionMapper;
import com.op.device.domain.EquFaultDescription;
import com.op.device.service.IEquFaultDescriptionService;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import static com.op.common.core.web.domain.AjaxResult.error;
import static com.op.common.core.web.domain.AjaxResult.success;
/**
* Service
*
* @author Open Platform
* @date 2023-12-15
*/
@Service
public class EquFaultDescriptionServiceImpl implements IEquFaultDescriptionService {
@Autowired
private EquFaultDescriptionMapper equFaultDescriptionMapper;
/**
*
*
* @param faultId
* @return
*/
@Override
@DS("#header.poolName")
public EquFaultDescription selectEquFaultDescriptionByFaultId(String faultId) {
return equFaultDescriptionMapper.selectEquFaultDescriptionByFaultId(faultId);
}
/**
*
*
* @param equFaultDescription
* @return
*/
@Override
@DS("#header.poolName")
public List<EquFaultDescription> selectEquFaultDescriptionList(EquFaultDescription equFaultDescription) {
// 创建时间不为空
if (equFaultDescription.getCreateTimeArray() != null) {
// 设置创建日期开始和结束值
if (equFaultDescription.getCreateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equFaultDescription.setCreateTimeStart(formatter.format(equFaultDescription.getCreateTimeArray().get(0)));
equFaultDescription.setCreateTimeEnd(formatter.format(equFaultDescription.getCreateTimeArray().get(1)));
}
}
// 更新时间不为空
if (equFaultDescription.getUpdateTimeArray() != null) {
// 设置更新日期开始和结束
if (equFaultDescription.getUpdateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equFaultDescription.setUpdateTimeStart(formatter.format(equFaultDescription.getUpdateTimeArray().get(0)));
equFaultDescription.setUpdateTimeEnd(formatter.format(equFaultDescription.getUpdateTimeArray().get(1)));
}
}
return equFaultDescriptionMapper.selectEquFaultDescriptionList(equFaultDescription);
}
/**
*
*
* @param equFaultDescription
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult insertEquFaultDescription(EquFaultDescription equFaultDescription) {
// 校验
EquFaultDescription checkQuery = new EquFaultDescription();
checkQuery.setFaultType(equFaultDescription.getFaultType());
checkQuery.setFaultSubclass(equFaultDescription.getFaultSubclass());
List<EquFaultDescription> check = equFaultDescriptionMapper.selectEquFaultDescriptionList(checkQuery);
if (check.size() > 0) {
return error(500, "故障描述已存在!不可添加!");
}
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String str = request.getHeader(key.substring(8));
int index = str.indexOf("_");
String factory = str.substring(index + 1);
// 获取检查项流水号
String serialNum = String.format("%04d", equFaultDescriptionMapper.selectSerialNumber());
// 处理故障信息
equFaultDescription.setFaultId(IdUtils.fastSimpleUUID());// id
equFaultDescription.setFaultCode("DES" + serialNum);// 故障编码
equFaultDescription.setFactoryCode(factory);// 工厂
equFaultDescription.setCreateBy(SecurityContextHolder.getUserName());
equFaultDescription.setCreateTime(DateUtils.getNowDate());
equFaultDescription.setUpdateBy(SecurityContextHolder.getUserName());
equFaultDescription.setUpdateTime(DateUtils.getNowDate());
equFaultDescriptionMapper.insertEquFaultDescription(equFaultDescription);
return success("新增故障描述成功!");
}
/**
*
*
* @param equFaultDescription
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult updateEquFaultDescription(EquFaultDescription equFaultDescription) {
// 校验
EquFaultDescription checkQuery = new EquFaultDescription();
checkQuery.setFaultType(equFaultDescription.getFaultType());
checkQuery.setFaultSubclass(equFaultDescription.getFaultSubclass());
List<EquFaultDescription> check = equFaultDescriptionMapper.selectEquFaultDescriptionList(checkQuery);
if (check.size() > 0) {
for (EquFaultDescription equFaultDescription1 : check) {
if (!equFaultDescription1.getFaultCode().equals(equFaultDescription.getFaultCode())){
return error(500, "故障子类已存在!修改失败!");
}
}
}
equFaultDescription.setUpdateBy(SecurityContextHolder.getUserName());
equFaultDescription.setUpdateTime(DateUtils.getNowDate());
// 插入数据库
equFaultDescriptionMapper.updateEquFaultDescription(equFaultDescription);
return success("修改成功!");
}
/**
*
*
* @param faultIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquFaultDescriptionByFaultIds(String[] faultIds) {
return equFaultDescriptionMapper.deleteEquFaultDescriptionByFaultIds(faultIds);
}
/**
*
*
* @param faultId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquFaultDescriptionByFaultId(String faultId) {
return equFaultDescriptionMapper.deleteEquFaultDescriptionByFaultId(faultId);
}
}

@ -0,0 +1,170 @@
package com.op.device.service.impl;
import java.text.SimpleDateFormat;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.context.SecurityContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquFaultDescription;
import com.op.device.domain.EquFaultType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.device.mapper.EquFaultMeasuresMapper;
import com.op.device.domain.EquFaultMeasures;
import com.op.device.service.IEquFaultMeasuresService;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import static com.op.common.core.web.domain.AjaxResult.error;
import static com.op.common.core.web.domain.AjaxResult.success;
/**
* Service
*
* @author Open Platform
* @date 2023-12-15
*/
@Service
public class EquFaultMeasuresServiceImpl implements IEquFaultMeasuresService {
@Autowired
private EquFaultMeasuresMapper equFaultMeasuresMapper;
/**
*
*
* @param faultId
* @return
*/
@Override
@DS("#header.poolName")
public EquFaultMeasures selectEquFaultMeasuresByFaultId(String faultId) {
return equFaultMeasuresMapper.selectEquFaultMeasuresByFaultId(faultId);
}
/**
*
*
* @param equFaultMeasures
* @return
*/
@Override
@DS("#header.poolName")
public List<EquFaultMeasures> selectEquFaultMeasuresList(EquFaultMeasures equFaultMeasures) {
// 创建时间不为空
if (equFaultMeasures.getCreateTimeArray() != null) {
// 设置创建日期开始和结束值
if (equFaultMeasures.getCreateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equFaultMeasures.setCreateTimeStart(formatter.format(equFaultMeasures.getCreateTimeArray().get(0)));
equFaultMeasures.setCreateTimeEnd(formatter.format(equFaultMeasures.getCreateTimeArray().get(1)));
}
}
// 更新时间不为空
if (equFaultMeasures.getUpdateTimeArray() != null) {
// 设置更新日期开始和结束
if (equFaultMeasures.getUpdateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equFaultMeasures.setUpdateTimeStart(formatter.format(equFaultMeasures.getUpdateTimeArray().get(0)));
equFaultMeasures.setUpdateTimeEnd(formatter.format(equFaultMeasures.getUpdateTimeArray().get(1)));
}
}
return equFaultMeasuresMapper.selectEquFaultMeasuresList(equFaultMeasures);
}
/**
*
*
* @param equFaultMeasures
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult insertEquFaultMeasures(EquFaultMeasures equFaultMeasures) {
// 校验
EquFaultMeasures checkQuery = new EquFaultMeasures();
checkQuery.setFaultType(equFaultMeasures.getFaultType());
checkQuery.setFaultSubclass(equFaultMeasures.getFaultSubclass());
List<EquFaultMeasures> check = equFaultMeasuresMapper.selectEquFaultMeasuresList(checkQuery);
if (check.size() > 0) {
return error(500, "故障子类已存在!不可添加!");
}
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String str = request.getHeader(key.substring(8));
int index = str.indexOf("_");
String factory = str.substring(index + 1);
// 获取检查项流水号
String serialNum = String.format("%04d", equFaultMeasuresMapper.selectSerialNumber());
// 处理故障信息
equFaultMeasures.setFaultId(IdUtils.fastSimpleUUID());// id
equFaultMeasures.setFaultCode("MEA" + serialNum);// 故障编码
equFaultMeasures.setFactoryCode(factory);// 工厂
equFaultMeasures.setCreateBy(SecurityContextHolder.getUserName());
equFaultMeasures.setCreateTime(DateUtils.getNowDate());
equFaultMeasures.setUpdateBy(SecurityContextHolder.getUserName());
equFaultMeasures.setUpdateTime(DateUtils.getNowDate());
equFaultMeasuresMapper.insertEquFaultMeasures(equFaultMeasures);
return success("新增故障维修措施成功");
}
/**
*
*
* @param equFaultMeasures
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult updateEquFaultMeasures(EquFaultMeasures equFaultMeasures) {
// 校验
EquFaultMeasures checkQuery = new EquFaultMeasures();
checkQuery.setFaultType(equFaultMeasures.getFaultType());
checkQuery.setFaultSubclass(equFaultMeasures.getFaultSubclass());
List<EquFaultMeasures> check = equFaultMeasuresMapper.selectEquFaultMeasuresList(checkQuery);
if (check.size() > 0) {
for (EquFaultMeasures equFaultMeasures1 : check) {
if (!equFaultMeasures1.getFaultCode().equals(equFaultMeasures.getFaultCode())){
return error(500, "故障子类已存在!修改失败!");
}
}
}
equFaultMeasures.setUpdateBy(SecurityContextHolder.getUserName());
equFaultMeasures.setUpdateTime(DateUtils.getNowDate());
// 插入数据库
equFaultMeasuresMapper.updateEquFaultMeasures(equFaultMeasures);
return success("修改成功!");
}
/**
*
*
* @param faultIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquFaultMeasuresByFaultIds(String[] faultIds) {
return equFaultMeasuresMapper.deleteEquFaultMeasuresByFaultIds(faultIds);
}
/**
*
*
* @param faultId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquFaultMeasuresByFaultId(String faultId) {
return equFaultMeasuresMapper.deleteEquFaultMeasuresByFaultId(faultId);
}
}

@ -0,0 +1,170 @@
package com.op.device.service.impl;
import java.text.SimpleDateFormat;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.context.SecurityContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquFaultMeasures;
import com.op.device.domain.EquFaultType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.device.mapper.EquFaultReasonMapper;
import com.op.device.domain.EquFaultReason;
import com.op.device.service.IEquFaultReasonService;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import static com.op.common.core.web.domain.AjaxResult.error;
import static com.op.common.core.web.domain.AjaxResult.success;
/**
* Service
*
* @author Open Platform
* @date 2023-12-15
*/
@Service
public class EquFaultReasonServiceImpl implements IEquFaultReasonService {
@Autowired
private EquFaultReasonMapper equFaultReasonMapper;
/**
*
*
* @param faultId
* @return
*/
@Override
@DS("#header.poolName")
public EquFaultReason selectEquFaultReasonByFaultId(String faultId) {
return equFaultReasonMapper.selectEquFaultReasonByFaultId(faultId);
}
/**
*
*
* @param equFaultReason
* @return
*/
@Override
@DS("#header.poolName")
public List<EquFaultReason> selectEquFaultReasonList(EquFaultReason equFaultReason) {
// 创建时间不为空
if (equFaultReason.getCreateTimeArray() != null) {
// 设置创建日期开始和结束值
if (equFaultReason.getCreateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equFaultReason.setCreateTimeStart(formatter.format(equFaultReason.getCreateTimeArray().get(0)));
equFaultReason.setCreateTimeEnd(formatter.format(equFaultReason.getCreateTimeArray().get(1)));
}
}
// 更新时间不为空
if (equFaultReason.getUpdateTimeArray() != null) {
// 设置更新日期开始和结束
if (equFaultReason.getUpdateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equFaultReason.setUpdateTimeStart(formatter.format(equFaultReason.getUpdateTimeArray().get(0)));
equFaultReason.setUpdateTimeEnd(formatter.format(equFaultReason.getUpdateTimeArray().get(1)));
}
}
return equFaultReasonMapper.selectEquFaultReasonList(equFaultReason);
}
/**
*
*
* @param equFaultReason
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult insertEquFaultReason(EquFaultReason equFaultReason) {
// 校验
EquFaultReason checkQuery = new EquFaultReason();
checkQuery.setFaultType(equFaultReason.getFaultType());
checkQuery.setFaultSubclass(equFaultReason.getFaultSubclass());
List<EquFaultReason> check = equFaultReasonMapper.selectEquFaultReasonList(checkQuery);
if (check.size() > 0) {
return error(500, "故障子类已存在!不可添加!");
}
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String str = request.getHeader(key.substring(8));
int index = str.indexOf("_");
String factory = str.substring(index + 1);
// 获取检查项流水号
String serialNum = String.format("%04d", equFaultReasonMapper.selectSerialNumber());
// 处理故障信息
equFaultReason.setFaultId(IdUtils.fastSimpleUUID());// id
equFaultReason.setFaultCode("REA" + serialNum);// 故障编码
equFaultReason.setFactoryCode(factory);// 工厂
equFaultReason.setCreateBy(SecurityContextHolder.getUserName());
equFaultReason.setCreateTime(DateUtils.getNowDate());
equFaultReason.setUpdateBy(SecurityContextHolder.getUserName());
equFaultReason.setUpdateTime(DateUtils.getNowDate());
equFaultReasonMapper.insertEquFaultReason(equFaultReason);
return success("新增故障原因成功!");
}
/**
*
*
* @param equFaultReason
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult updateEquFaultReason(EquFaultReason equFaultReason) {
// 校验
EquFaultReason checkQuery = new EquFaultReason();
checkQuery.setFaultType(equFaultReason.getFaultType());
checkQuery.setFaultSubclass(equFaultReason.getFaultSubclass());
List<EquFaultReason> check = equFaultReasonMapper.selectEquFaultReasonList(checkQuery);
if (check.size() > 0) {
for (EquFaultReason equFaultReason1 : check) {
if (!equFaultReason1.getFaultCode().equals(equFaultReason.getFaultCode())){
return error(500, "故障子类已存在!修改失败!");
}
}
}
equFaultReason.setUpdateBy(SecurityContextHolder.getUserName());
equFaultReason.setUpdateTime(DateUtils.getNowDate());
// 插入数据库
equFaultReasonMapper.updateEquFaultReason(equFaultReason);
return success("修改成功!");
}
/**
*
*
* @param faultIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquFaultReasonByFaultIds(String[] faultIds) {
return equFaultReasonMapper.deleteEquFaultReasonByFaultIds(faultIds);
}
/**
*
*
* @param faultId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteEquFaultReasonByFaultId(String faultId) {
return equFaultReasonMapper.deleteEquFaultReasonByFaultId(faultId);
}
}

@ -370,7 +370,7 @@ public class EquPlanServiceImpl implements IEquPlanService {
@Override
@DS("#header.poolName")
public AjaxResult getGroupLine() {
return success(equEquipmentMapper.selectEqupmentGroupLine());
return success(equEquipmentMapper.selectEquipmentGroupLine());
}
/**

@ -432,4 +432,11 @@ public class EquRepairOrderServiceImpl implements IEquRepairOrderService {
public List<EquTeamUser> getRepairPersonList(EquTeamUser equTeamUser) {
return equRepairOrderMapper.getRepairPersonList(equTeamUser);
}
//获取组线列表
@Override
@DS("#header.poolName")
public List<EquEquipment> selectGroupLineList() {
return equEquipmentMapper.selectEquipmentGroupLine();
}
}

@ -252,15 +252,15 @@
group by equipment_type_code,equipment_type_name
</select>
<select id="selectEqupmentGroupLine" resultMap="EquEquipmentResult">
<select id="selectEquipmentGroupLine" resultMap="EquEquipmentResult">
select equipment_code, equipment_name
from base_equipment
where del_flag = '0'
and equipment_category = '1'
from base_equipment
where del_flag = '0'
and equipment_category = '1'
</select>
<select id="selectEquipmentList" parameterType="EquEquipment" resultMap="EquEquipmentResult">
select be.equipment_code,be.equipment_name,be.equipment_type_name,be.workshop_name
select be.equipment_code,be.equipment_name,be.equipment_type_code,be.equipment_type_name,be.workshop_name
from base_equipment be
<where>
<if test="equipmentCode != null and equipmentCode != ''">and equipment_code like concat('%',

@ -0,0 +1,127 @@
<?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.op.device.mapper.EquFaultDescriptionMapper">
<resultMap type="EquFaultDescription" id="EquFaultDescriptionResult">
<result property="faultId" column="fault_id" />
<result property="faultCode" column="fault_code" />
<result property="faultType" column="fault_type" />
<result property="faultSubclass" column="fault_subclass" />
<result property="faultRemark" column="fault_remark" />
<result property="factoryCode" column="factory_code" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<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="selectEquFaultDescriptionVo">
select fault_id, fault_code, fault_type, fault_subclass, fault_remark, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_fault_description
</sql>
<select id="selectEquFaultDescriptionList" parameterType="EquFaultDescription" resultMap="EquFaultDescriptionResult">
<include refid="selectEquFaultDescriptionVo"/>
<where>
<if test="faultCode != null and faultCode != ''"> and fault_code like concat('%', #{faultCode}, '%')</if>
<if test="faultType != null and faultType != ''"> and fault_type like concat('%', #{faultType}, '%')</if>
<if test="faultSubclass != null and faultSubclass != ''"> and fault_subclass like concat('%', #{faultSubclass}, '%')</if>
<if test="faultRemark != null and faultRemark != ''"> and fault_remark = #{faultRemark}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null "> and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</where>
</select>
<select id="selectEquFaultDescriptionByFaultId" parameterType="String" resultMap="EquFaultDescriptionResult">
<include refid="selectEquFaultDescriptionVo"/>
where fault_id = #{faultId}
</select>
<insert id="insertEquFaultDescription" parameterType="EquFaultDescription">
insert into equ_fault_description
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="faultId != null">fault_id,</if>
<if test="faultCode != null and faultCode != ''">fault_code,</if>
<if test="faultType != null and faultType != ''">fault_type,</if>
<if test="faultSubclass != null">fault_subclass,</if>
<if test="faultRemark != null">fault_remark,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="faultId != null">#{faultId},</if>
<if test="faultCode != null and faultCode != ''">#{faultCode},</if>
<if test="faultType != null and faultType != ''">#{faultType},</if>
<if test="faultSubclass != null">#{faultSubclass},</if>
<if test="faultRemark != null">#{faultRemark},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquFaultDescription" parameterType="EquFaultDescription">
update equ_fault_description
<trim prefix="SET" suffixOverrides=",">
<if test="faultCode != null and faultCode != ''">fault_code = #{faultCode},</if>
<if test="faultType != null and faultType != ''">fault_type = #{faultType},</if>
<if test="faultSubclass != null">fault_subclass = #{faultSubclass},</if>
<if test="faultRemark != null">fault_remark = #{faultRemark},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where fault_id = #{faultId}
</update>
<delete id="deleteEquFaultDescriptionByFaultId" parameterType="String">
delete from equ_fault_description where fault_id = #{faultId}
</delete>
<delete id="deleteEquFaultDescriptionByFaultIds" parameterType="String">
delete from equ_fault_description where fault_id in
<foreach item="faultId" collection="array" open="(" separator="," close=")">
#{faultId}
</foreach>
</delete>
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_description
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
</select>
</mapper>

@ -0,0 +1,127 @@
<?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.op.device.mapper.EquFaultMeasuresMapper">
<resultMap type="EquFaultMeasures" id="EquFaultMeasuresResult">
<result property="faultId" column="fault_id" />
<result property="faultCode" column="fault_code" />
<result property="faultType" column="fault_type" />
<result property="faultSubclass" column="fault_subclass" />
<result property="faultRemark" column="fault_remark" />
<result property="factoryCode" column="factory_code" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<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="selectEquFaultMeasuresVo">
select fault_id, fault_code, fault_type, fault_subclass, fault_remark, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_fault_measures
</sql>
<select id="selectEquFaultMeasuresList" parameterType="EquFaultMeasures" resultMap="EquFaultMeasuresResult">
<include refid="selectEquFaultMeasuresVo"/>
<where>
<if test="faultCode != null and faultCode != ''"> and fault_code like concat('%', #{faultCode}, '%')</if>
<if test="faultType != null and faultType != ''"> and fault_type like concat('%', #{faultType}, '%')</if>
<if test="faultSubclass != null and faultSubclass != ''"> and fault_subclass like concat('%', #{faultSubclass}, '%')</if>
<if test="faultRemark != null and faultRemark != ''"> and fault_remark = #{faultRemark}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null "> and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</where>
</select>
<select id="selectEquFaultMeasuresByFaultId" parameterType="String" resultMap="EquFaultMeasuresResult">
<include refid="selectEquFaultMeasuresVo"/>
where fault_id = #{faultId}
</select>
<insert id="insertEquFaultMeasures" parameterType="EquFaultMeasures">
insert into equ_fault_measures
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="faultId != null">fault_id,</if>
<if test="faultCode != null and faultCode != ''">fault_code,</if>
<if test="faultType != null and faultType != ''">fault_type,</if>
<if test="faultSubclass != null">fault_subclass,</if>
<if test="faultRemark != null">fault_remark,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="faultId != null">#{faultId},</if>
<if test="faultCode != null and faultCode != ''">#{faultCode},</if>
<if test="faultType != null and faultType != ''">#{faultType},</if>
<if test="faultSubclass != null">#{faultSubclass},</if>
<if test="faultRemark != null">#{faultRemark},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquFaultMeasures" parameterType="EquFaultMeasures">
update equ_fault_measures
<trim prefix="SET" suffixOverrides=",">
<if test="faultCode != null and faultCode != ''">fault_code = #{faultCode},</if>
<if test="faultType != null and faultType != ''">fault_type = #{faultType},</if>
<if test="faultSubclass != null">fault_subclass = #{faultSubclass},</if>
<if test="faultRemark != null">fault_remark = #{faultRemark},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where fault_id = #{faultId}
</update>
<delete id="deleteEquFaultMeasuresByFaultId" parameterType="String">
delete from equ_fault_measures where fault_id = #{faultId}
</delete>
<delete id="deleteEquFaultMeasuresByFaultIds" parameterType="String">
delete from equ_fault_measures where fault_id in
<foreach item="faultId" collection="array" open="(" separator="," close=")">
#{faultId}
</foreach>
</delete>
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_measures
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
</select>
</mapper>

@ -0,0 +1,127 @@
<?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.op.device.mapper.EquFaultReasonMapper">
<resultMap type="EquFaultReason" id="EquFaultReasonResult">
<result property="faultId" column="fault_id" />
<result property="faultCode" column="fault_code" />
<result property="faultType" column="fault_type" />
<result property="faultSubclass" column="fault_subclass" />
<result property="faultRemark" column="fault_remark" />
<result property="factoryCode" column="factory_code" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<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="selectEquFaultReasonVo">
select fault_id, fault_code, fault_type, fault_subclass, fault_remark, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_fault_reason
</sql>
<select id="selectEquFaultReasonList" parameterType="EquFaultReason" resultMap="EquFaultReasonResult">
<include refid="selectEquFaultReasonVo"/>
<where>
<if test="faultCode != null and faultCode != ''"> and fault_code like concat('%', #{faultCode}, '%')</if>
<if test="faultType != null and faultType != ''"> and fault_type like concat('%', #{faultType}, '%')</if>
<if test="faultSubclass != null and faultSubclass != ''"> and fault_subclass like concat('%', #{faultSubclass}, '%')</if>
<if test="faultRemark != null and faultRemark != ''"> and fault_remark = #{faultRemark}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null "> and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</where>
</select>
<select id="selectEquFaultReasonByFaultId" parameterType="String" resultMap="EquFaultReasonResult">
<include refid="selectEquFaultReasonVo"/>
where fault_id = #{faultId}
</select>
<insert id="insertEquFaultReason" parameterType="EquFaultReason">
insert into equ_fault_reason
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="faultId != null">fault_id,</if>
<if test="faultCode != null and faultCode != ''">fault_code,</if>
<if test="faultType != null and faultType != ''">fault_type,</if>
<if test="faultSubclass != null">fault_subclass,</if>
<if test="faultRemark != null">fault_remark,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="faultId != null">#{faultId},</if>
<if test="faultCode != null and faultCode != ''">#{faultCode},</if>
<if test="faultType != null and faultType != ''">#{faultType},</if>
<if test="faultSubclass != null">#{faultSubclass},</if>
<if test="faultRemark != null">#{faultRemark},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEquFaultReason" parameterType="EquFaultReason">
update equ_fault_reason
<trim prefix="SET" suffixOverrides=",">
<if test="faultCode != null and faultCode != ''">fault_code = #{faultCode},</if>
<if test="faultType != null and faultType != ''">fault_type = #{faultType},</if>
<if test="faultSubclass != null">fault_subclass = #{faultSubclass},</if>
<if test="faultRemark != null">fault_remark = #{faultRemark},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where fault_id = #{faultId}
</update>
<delete id="deleteEquFaultReasonByFaultId" parameterType="String">
delete from equ_fault_reason where fault_id = #{faultId}
</delete>
<delete id="deleteEquFaultReasonByFaultIds" parameterType="String">
delete from equ_fault_reason where fault_id in
<foreach item="faultId" collection="array" open="(" separator="," close=")">
#{faultId}
</foreach>
</delete>
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_reason
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
</select>
</mapper>

@ -1,9 +1,9 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.device.mapper.EquFaultTypeMapper">
<resultMap type="EquFaultType" id="EquFaultTypeResult">
<result property="faultId" column="fault_id" />
<result property="faultCode" column="fault_code" />
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<!--故障大类-->
<!--故障大类-->
<result property="dictLabel" column="dict_label"/>
<result property="dictValue" column="dict_value"/>
@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEquFaultTypeList" parameterType="EquFaultType" resultMap="EquFaultTypeResult">
<include refid="selectEquFaultTypeVo"/>
<where>
<where>
<if test="faultCode != null and faultCode != ''"> and fault_code like concat('%', #{faultCode}, '%')</if>
<if test="faultType != null and faultType != ''"> and fault_type like concat('%', #{faultType}, '%')</if>
<if test="faultSubclass != null and faultSubclass != ''"> and fault_subclass like concat('%', #{faultSubclass}, '%')</if>
@ -52,19 +52,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
ORDER BY create_time DESC
</select>
<select id="selectEquFaultTypeByFaultId" parameterType="String" resultMap="EquFaultTypeResult">
<include refid="selectEquFaultTypeVo"/>
where fault_id = #{faultId} and del_flag = '0'
</select>
<select id="selectSerialNumber" resultType="java.lang.Integer">
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_type
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
</select>
<insert id="insertEquFaultType" parameterType="EquFaultType">
<insert id="insertEquFaultType" parameterType="EquFaultType">
insert into equ_fault_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="faultId != null">fault_id,</if>
@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="faultId != null">#{faultId},</if>
<if test="faultCode != null and faultCode != ''">#{faultCode},</if>
@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</trim>
</insert>
<update id="updateEquFaultType" parameterType="EquFaultType">

@ -239,7 +239,7 @@ public class BaseEquipmentController extends BaseController {
}
/**
* 线/
* 线
*/
@GetMapping("/getAuxiliaryEquipmentList")
public TableDataInfo getAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment) {

@ -81,6 +81,6 @@ public interface IBaseEquipmentService {
//查询人员列表
List<BaseTeamUser> getPersonList(BaseTeamUser baseTeamUser);
//查询组线/辅助设备
//查询组线下的辅助设备
List<BaseEquipment> selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment);
}

Loading…
Cancel
Save