新增设备管理模块
This commit is contained in:
39
gear-mes/pom.xml
Normal file
39
gear-mes/pom.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.gear</groupId>
|
||||
<artifactId>FURNITURE-OA</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.gear.mes</groupId>
|
||||
<artifactId>gear-mes</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.gear</groupId>
|
||||
<artifactId>gear-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.gear</groupId>
|
||||
<artifactId>gear-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvCheckMachinery;
|
||||
import com.gear.mes.dv.service.IDvCheckMachineryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检设备Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/checkmachinery")
|
||||
public class DvCheckMachineryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvCheckMachineryService dvCheckMachineryService;
|
||||
|
||||
/**
|
||||
* 查询点检设备列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckMachinery dvCheckMachinery)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckMachinery> list = dvCheckMachineryService.selectDvCheckMachineryList(dvCheckMachinery);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出点检设备列表
|
||||
*/
|
||||
|
||||
@Log(title = "点检设备", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvCheckMachinery dvCheckMachinery)
|
||||
{
|
||||
List<DvCheckMachinery> list = dvCheckMachineryService.selectDvCheckMachineryList(dvCheckMachinery);
|
||||
ExcelUtil.exportExcel(list, "点检设备数据", DvCheckMachinery.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取点检设备详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckMachineryService.selectDvCheckMachineryByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点检设备
|
||||
*/
|
||||
|
||||
@Log(title = "点检设备", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvCheckMachinery dvCheckMachinery)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvCheckMachineryService.checkMachineryUnique(dvCheckMachinery))){
|
||||
return R.fail("设备已设置过点检计划!");
|
||||
}
|
||||
return toAjax(dvCheckMachineryService.insertDvCheckMachinery(dvCheckMachinery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点检设备
|
||||
*/
|
||||
|
||||
@Log(title = "点检设备", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvCheckMachinery dvCheckMachinery)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvCheckMachineryService.checkMachineryUnique(dvCheckMachinery))){
|
||||
return R.fail("设备已设置过点检计划!");
|
||||
}
|
||||
return toAjax(dvCheckMachineryService.updateDvCheckMachinery(dvCheckMachinery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点检设备
|
||||
*/
|
||||
|
||||
@Log(title = "点检设备", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public R<Void> remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
return toAjax(dvCheckMachineryService.deleteDvCheckMachineryByRecordIds(recordIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvCheckMachinery;
|
||||
import com.gear.mes.dv.domain.DvCheckPlan;
|
||||
import com.gear.mes.dv.domain.DvCheckSubject;
|
||||
import com.gear.mes.dv.domain.dto.DvCheckPlanDTO;
|
||||
import com.gear.mes.dv.service.IDvCheckMachineryService;
|
||||
import com.gear.mes.dv.service.IDvCheckPlanService;
|
||||
import com.gear.mes.dv.service.IDvCheckSubjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检计划头Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/checkplan")
|
||||
public class DvCheckPlanController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvCheckPlanService dvCheckPlanService;
|
||||
|
||||
@Autowired
|
||||
IDvCheckMachineryService dvCheckMachineryService;
|
||||
|
||||
@Autowired
|
||||
IDvCheckSubjectService dvCheckSubjectService;
|
||||
|
||||
/**
|
||||
* 查询设备点检计划头列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckPlan dvCheckPlan)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckPlan> list = dvCheckPlanService.selectDvCheckPlanList(dvCheckPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备点检计划头列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检计划头", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvCheckPlan dvCheckPlan)
|
||||
{
|
||||
List<DvCheckPlan> list = dvCheckPlanService.selectDvCheckPlanList(dvCheckPlan);
|
||||
ExcelUtil.exportExcel(list, "设备点检计划头数据", DvCheckPlan.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检计划头详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{planId}")
|
||||
public AjaxResult getInfo(@PathVariable("planId") Long planId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckPlanService.selectDvCheckPlanByPlanId(planId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检计划头
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检计划头", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvCheckPlan dvCheckPlan)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvCheckPlanService.checkPlanCodeUnique(dvCheckPlan))){
|
||||
return R.fail("编号已存在!");
|
||||
}
|
||||
return toAjax(dvCheckPlanService.insertDvCheckPlan(dvCheckPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检计划头
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检计划头", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvCheckPlan dvCheckPlan)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvCheckPlanService.checkPlanCodeUnique(dvCheckPlan))){
|
||||
return R.fail("编号已存在!");
|
||||
}
|
||||
if(UserConstants.ORDER_STATUS_FINISHED.equals(dvCheckPlan.getStatus())){
|
||||
DvCheckMachinery para1 = new DvCheckMachinery();
|
||||
para1.setPlanId(dvCheckPlan.getPlanId());
|
||||
List<DvCheckMachinery> machinerys = dvCheckMachineryService.selectDvCheckMachineryList(para1);
|
||||
if(!CollUtil.isNotEmpty(machinerys)){
|
||||
return R.fail("请指定设备!");
|
||||
}
|
||||
|
||||
DvCheckSubject para2 = new DvCheckSubject();
|
||||
para2.setPlanId(dvCheckPlan.getPlanId());
|
||||
List<DvCheckSubject> subjects = dvCheckSubjectService.selectDvCheckSubjectList(para2);
|
||||
if(!CollUtil.isNotEmpty(subjects)){
|
||||
return R.fail("请指定项目!");
|
||||
}
|
||||
}
|
||||
return toAjax(dvCheckPlanService.updateDvCheckPlan(dvCheckPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检计划头
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检计划头", businessType = BusinessType.DELETE)
|
||||
@Transactional
|
||||
@DeleteMapping("/{planIds}")
|
||||
public R<Void> remove(@PathVariable Long[] planIds)
|
||||
{
|
||||
for (Long planId:planIds
|
||||
) {
|
||||
DvCheckPlan plan = dvCheckPlanService.selectDvCheckPlanByPlanId(planId);
|
||||
if(!UserConstants.ORDER_STATUS_PREPARE.equals(plan.getStatus())){
|
||||
return R.fail("只能删除草稿状态单据!");
|
||||
}
|
||||
|
||||
dvCheckMachineryService.deleteByPlanId(planId);
|
||||
dvCheckSubjectService.deleteByPlanId(planId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return toAjax(dvCheckPlanService.deleteDvCheckPlanByPlanIds(planIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据设备编码和计划类型查询设备点检计划头列表
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GetMapping("/getCheckPlan")
|
||||
public AjaxResult getCheckPlan(DvCheckPlanDTO checkPlanDTO) {
|
||||
return dvCheckPlanService.getCheckPlan(checkPlanDTO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvCheckRecord;
|
||||
import com.gear.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.gear.mes.dv.domain.DvCheckSubject;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordLineService;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordService;
|
||||
import com.gear.mes.dv.service.IDvCheckSubjectService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/checkrecord")
|
||||
public class DvCheckRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvCheckRecordService dvCheckRecordService;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckSubjectService dvCheckSubjectService;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckRecordLineService dvCheckRecordLineService;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckRecord> list = dvCheckRecordService.selectDvCheckRecordList(dvCheckRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备点检记录列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
List<DvCheckRecord> list = dvCheckRecordService.selectDvCheckRecordList(dvCheckRecord);
|
||||
ExcelUtil.exportExcel(list, "设备点检记录数据", DvCheckRecord.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检记录详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckRecordService.selectDvCheckRecordByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
dvCheckRecordService.insertDvCheckRecord(dvCheckRecord);
|
||||
|
||||
if(dvCheckRecord.getPlanId()!= null){
|
||||
//根据选择的点检计划自动生成对应的行信息
|
||||
DvCheckSubject param = new DvCheckSubject();
|
||||
param.setPlanId(dvCheckRecord.getPlanId());
|
||||
List<DvCheckSubject> subjectList = dvCheckSubjectService.selectDvCheckSubjectList(param);
|
||||
if(!CollectionUtils.isEmpty(subjectList)){
|
||||
for(DvCheckSubject subject : subjectList){
|
||||
DvCheckRecordLine line = new DvCheckRecordLine();
|
||||
line.setRecordId(dvCheckRecord.getRecordId());
|
||||
line.setSubjectId(subject.getSubjectId());
|
||||
line.setSubjectName(subject.getSubjectName());
|
||||
line.setSubjectType(subject.getSubjectType());
|
||||
line.setSubjectContent(subject.getSubjectContent());
|
||||
line.setSubjectStandard(subject.getSubjectStandard());
|
||||
line.setCheckStatus(UserConstants.YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success(dvCheckRecord.getRecordId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.UPDATE)
|
||||
@Transactional
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
if(UserConstants.ORDER_STATUS_FINISHED.equals(dvCheckRecord.getStatus())){
|
||||
DvCheckRecordLine param = new DvCheckRecordLine();
|
||||
param.setRecordId(dvCheckRecord.getRecordId());
|
||||
List<DvCheckRecordLine> lineList = dvCheckRecordLineService.selectDvCheckRecordLineList(param);
|
||||
if(CollectionUtils.isEmpty(lineList)){
|
||||
return R.fail("请添加设备点检项目结果信息");
|
||||
}
|
||||
}
|
||||
|
||||
DvCheckRecord oldRecord = dvCheckRecordService.selectDvCheckRecordByRecordId(dvCheckRecord.getRecordId());
|
||||
if(oldRecord.getPlanId() != null && dvCheckRecord.getPlanId() != null && !dvCheckRecord.getPlanId().equals(oldRecord.getPlanId())){
|
||||
dvCheckRecordLineService.deleteDvCheckRecordLineByRecordId(dvCheckRecord.getRecordId());
|
||||
//根据选择的点检计划自动生成对应的行信息
|
||||
DvCheckSubject param = new DvCheckSubject();
|
||||
param.setPlanId(dvCheckRecord.getPlanId());
|
||||
List<DvCheckSubject> subjectList = dvCheckSubjectService.selectDvCheckSubjectList(param);
|
||||
if(!CollectionUtils.isEmpty(subjectList)){
|
||||
for(DvCheckSubject subject : subjectList){
|
||||
DvCheckRecordLine line = new DvCheckRecordLine();
|
||||
line.setRecordId(dvCheckRecord.getRecordId());
|
||||
line.setSubjectId(subject.getSubjectId());
|
||||
line.setSubjectName(subject.getSubjectName());
|
||||
line.setSubjectType(subject.getSubjectType());
|
||||
line.setSubjectContent(subject.getSubjectContent());
|
||||
line.setSubjectStandard(subject.getSubjectStandard());
|
||||
line.setCheckStatus(UserConstants.YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return toAjax(dvCheckRecordService.updateDvCheckRecord(dvCheckRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.DELETE)
|
||||
@Transactional
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public R<Void> remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
|
||||
for(Long recordId : recordIds){
|
||||
dvCheckRecordLineService.deleteDvCheckRecordLineByRecordId(recordId);
|
||||
}
|
||||
|
||||
return toAjax(dvCheckRecordService.deleteDvCheckRecordByRecordIds(recordIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/checkrecordline")
|
||||
public class DvCheckRecordLineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvCheckRecordLineService dvCheckRecordLineService;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckRecordLine> list = dvCheckRecordLineService.selectDvCheckRecordLineList(dvCheckRecordLine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备点检记录行列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
List<DvCheckRecordLine> list = dvCheckRecordLineService.selectDvCheckRecordLineList(dvCheckRecordLine);
|
||||
ExcelUtil.exportExcel(list, "设备点检记录行数据", DvCheckRecordLine.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检记录行详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckRecordLineService.selectDvCheckRecordLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
return toAjax(dvCheckRecordLineService.insertDvCheckRecordLine(dvCheckRecordLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
return toAjax(dvCheckRecordLineService.updateDvCheckRecordLine(dvCheckRecordLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{lineIds}")
|
||||
public R<Void> remove(@PathVariable Long[] lineIds)
|
||||
{
|
||||
return toAjax(dvCheckRecordLineService.deleteDvCheckRecordLineByLineIds(lineIds));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvCheckSubject;
|
||||
import com.gear.mes.dv.service.IDvCheckSubjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检项目Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/checksubject")
|
||||
public class DvCheckSubjectController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvCheckSubjectService dvCheckSubjectService;
|
||||
|
||||
/**
|
||||
* 查询点检项目列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckSubject dvCheckSubject)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckSubject> list = dvCheckSubjectService.selectDvCheckSubjectList(dvCheckSubject);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出点检项目列表
|
||||
*/
|
||||
|
||||
@Log(title = "点检项目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvCheckSubject dvCheckSubject)
|
||||
{
|
||||
List<DvCheckSubject> list = dvCheckSubjectService.selectDvCheckSubjectList(dvCheckSubject);
|
||||
ExcelUtil.exportExcel(list, "点检项目数据", DvCheckSubject.class, response);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取点检项目详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckSubjectService.selectDvCheckSubjectByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点检项目
|
||||
*/
|
||||
|
||||
@Log(title = "点检项目", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvCheckSubject dvCheckSubject)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvCheckSubjectService.checkSubjectUnique(dvCheckSubject))){
|
||||
return R.fail("点检项目已经添加过!");
|
||||
}
|
||||
|
||||
return toAjax(dvCheckSubjectService.insertDvCheckSubject(dvCheckSubject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点检项目
|
||||
*/
|
||||
|
||||
@Log(title = "点检项目", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvCheckSubject dvCheckSubject)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvCheckSubjectService.checkSubjectUnique(dvCheckSubject))){
|
||||
return R.fail("点检项目已经添加过!");
|
||||
}
|
||||
return toAjax(dvCheckSubjectService.updateDvCheckSubject(dvCheckSubject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点检项目
|
||||
*/
|
||||
|
||||
@Log(title = "点检项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public R<Void> remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
return toAjax(dvCheckSubjectService.deleteDvCheckSubjectByRecordIds(recordIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.excel.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvMachinery;
|
||||
import com.gear.mes.dv.service.IDvMachineryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/machinery")
|
||||
public class DvMachineryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvMachineryService dvMachineryService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvMachinery dvMachinery)
|
||||
{
|
||||
startPage();
|
||||
List<DvMachinery> list = dvMachineryService.selectDvMachineryList(dvMachinery);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvMachinery dvMachinery)
|
||||
{
|
||||
List<DvMachinery> list = dvMachineryService.selectDvMachineryList(dvMachinery);
|
||||
ExcelUtil<DvMachinery> util = new ExcelUtil<DvMachinery>(DvMachinery.class);
|
||||
util.exportExcel(response, list, "设备数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{machineryId}")
|
||||
public AjaxResult getInfo(@PathVariable("machineryId") Long machineryId)
|
||||
{
|
||||
return AjaxResult.success(dvMachineryService.selectDvMachineryByMachineryId(machineryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*/
|
||||
|
||||
@Log(title = "设备", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DvMachinery dvMachinery)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvMachineryService.checkRecptCodeUnique(dvMachinery))){
|
||||
return AjaxResult.error("编号已存在!");
|
||||
}
|
||||
return dvMachineryService.insertDvMachinery(dvMachinery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*/
|
||||
|
||||
@Log(title = "设备", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DvMachinery dvMachinery)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvMachineryService.checkRecptCodeUnique(dvMachinery))){
|
||||
return AjaxResult.error("编号已存在!");
|
||||
}
|
||||
return dvMachineryService.updateDvMachinery(dvMachinery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*/
|
||||
|
||||
@Log(title = "设备", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{machineryIds}")
|
||||
public R<Void> remove(@PathVariable Long[] machineryIds)
|
||||
{
|
||||
return toAjax(dvMachineryService.deleteDvMachineryByMachineryIds(machineryIds));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 依据上传的文件批量更新或新增设备
|
||||
// */
|
||||
//
|
||||
// @Log(title = "设备", businessType = BusinessType.IMPORT)
|
||||
// @PostMapping("/importData")
|
||||
// public AjaxResult importData(MultipartFile file,
|
||||
// @RequestParam(name = "updateSupport", defaultValue = "false") boolean updateSupport) throws Exception {
|
||||
// ExcelUtil<DvMachinery> util = new ExcelUtil<>(DvMachinery.class);
|
||||
// List<DvMachinery> dvMachineryList = util.importExcel(file.getInputStream());
|
||||
// String operName = LoginHelper.getUsername();
|
||||
// String message = dvMachineryService.importMachinery(dvMachineryList, updateSupport, operName);
|
||||
// return AjaxResult.success(message);
|
||||
// }
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response)
|
||||
{
|
||||
ExcelUtil<DvMachinery> util = new ExcelUtil<DvMachinery>(DvMachinery.class);
|
||||
util.importTemplateExcel(response, "设备台账");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.excel.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvMachinery;
|
||||
import com.gear.mes.dv.domain.DvMachineryType;
|
||||
import com.gear.mes.dv.service.IDvMachineryService;
|
||||
import com.gear.mes.dv.service.IDvMachineryTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 设备类型Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/machinerytype")
|
||||
public class DvMachineryTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvMachineryTypeService dvMachineryTypeService;
|
||||
|
||||
@Autowired
|
||||
private IDvMachineryService dvMachineryService;
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(DvMachineryType dvMachineryType)
|
||||
{
|
||||
List<DvMachineryType> list = dvMachineryTypeService.selectDvMachineryTypeList(dvMachineryType);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备类型列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvMachineryType dvMachineryType)
|
||||
{
|
||||
List<DvMachineryType> list = dvMachineryTypeService.selectDvMachineryTypeList(dvMachineryType);
|
||||
ExcelUtil<DvMachineryType> util = new ExcelUtil<DvMachineryType>(DvMachineryType.class);
|
||||
util.exportExcel(response, list, "设备类型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备类型详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{machineryTypeId}")
|
||||
public AjaxResult getInfo(@PathVariable("machineryTypeId") Long machineryTypeId)
|
||||
{
|
||||
return AjaxResult.success(dvMachineryTypeService.selectDvMachineryTypeByMachineryTypeId(machineryTypeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*/
|
||||
|
||||
@Log(title = "设备类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvMachineryType dvMachineryType)
|
||||
{
|
||||
// 使用UUID生成设备类型编号
|
||||
String machineryTypeCode = "MT-" + UUID.randomUUID().toString().replace("-", "").substring(0, 12).toUpperCase();
|
||||
dvMachineryType.setMachineryTypeCode(machineryTypeCode);
|
||||
return toAjax(dvMachineryTypeService.insertDvMachineryType(dvMachineryType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*/
|
||||
|
||||
@Log(title = "设备类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvMachineryType dvMachineryType)
|
||||
{
|
||||
return toAjax(dvMachineryTypeService.updateDvMachineryType(dvMachineryType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备类型
|
||||
*/
|
||||
|
||||
@Log(title = "设备类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{machineryTypeIds}")
|
||||
public R<Void> remove(@PathVariable Long[] machineryTypeIds)
|
||||
{
|
||||
for (Long typeId:machineryTypeIds
|
||||
) {
|
||||
DvMachinery param = new DvMachinery();
|
||||
param.setMachineryId(typeId);
|
||||
List<DvMachinery> machinerys = dvMachineryService.selectDvMachineryList(param);
|
||||
if(CollUtil.isNotEmpty(machinerys)){
|
||||
return R.fail("设备类型下已配置了设备,不能删除!");
|
||||
}
|
||||
}
|
||||
|
||||
return toAjax(dvMachineryTypeService.deleteDvMachineryTypeByMachineryTypeIds(machineryTypeIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.excel.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvMaintenRecord;
|
||||
import com.gear.mes.dv.service.IDvMaintenRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/maintenrecord")
|
||||
public class DvMaintenRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvMaintenRecordService dvMaintenRecordService;
|
||||
|
||||
/**
|
||||
* 查询设备保养记录列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
startPage();
|
||||
List<DvMaintenRecord> list = dvMaintenRecordService.selectDvMaintenRecordList(dvMaintenRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备保养记录列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
List<DvMaintenRecord> list = dvMaintenRecordService.selectDvMaintenRecordList(dvMaintenRecord);
|
||||
ExcelUtil<DvMaintenRecord> util = new ExcelUtil<DvMaintenRecord>(DvMaintenRecord.class);
|
||||
util.exportExcel(response, list, "设备保养记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备保养记录详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(dvMaintenRecordService.selectDvMaintenRecordByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
return toAjax(dvMaintenRecordService.insertDvMaintenRecord(dvMaintenRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
return toAjax(dvMaintenRecordService.updateDvMaintenRecord(dvMaintenRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public R<Void> remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
return toAjax(dvMaintenRecordService.deleteDvMaintenRecordByRecordIds(recordIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.excel.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvMaintenRecordLine;
|
||||
import com.gear.mes.dv.service.IDvMaintenRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录行Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/maintenrecordline")
|
||||
public class DvMaintenRecordLineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvMaintenRecordLineService dvMaintenRecordLineService;
|
||||
|
||||
/**
|
||||
* 查询设备保养记录行列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
startPage();
|
||||
List<DvMaintenRecordLine> list = dvMaintenRecordLineService.selectDvMaintenRecordLineList(dvMaintenRecordLine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备保养记录行列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录行", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
List<DvMaintenRecordLine> list = dvMaintenRecordLineService.selectDvMaintenRecordLineList(dvMaintenRecordLine);
|
||||
ExcelUtil<DvMaintenRecordLine> util = new ExcelUtil<DvMaintenRecordLine>(DvMaintenRecordLine.class);
|
||||
util.exportExcel(response, list, "设备保养记录行数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备保养记录行详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvMaintenRecordLineService.selectDvMaintenRecordLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录行", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
return toAjax(dvMaintenRecordLineService.insertDvMaintenRecordLine(dvMaintenRecordLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
return toAjax(dvMaintenRecordLineService.updateDvMaintenRecordLine(dvMaintenRecordLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{lineIds}")
|
||||
public R<Void> remove(@PathVariable Long[] lineIds)
|
||||
{
|
||||
return toAjax(dvMaintenRecordLineService.deleteDvMaintenRecordLineByLineIds(lineIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.excel.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvRepair;
|
||||
import com.gear.mes.dv.domain.dto.DvRepairDTO;
|
||||
import com.gear.mes.dv.service.IDvRepairService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/repair")
|
||||
public class DvRepairController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvRepairService dvRepairService;
|
||||
|
||||
/**
|
||||
* 查询设备维修单列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvRepair dvRepair)
|
||||
{
|
||||
startPage();
|
||||
List<DvRepair> list = dvRepairService.selectDvRepairList(dvRepair);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备维修单列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvRepair dvRepair)
|
||||
{
|
||||
List<DvRepair> list = dvRepairService.selectDvRepairList(dvRepair);
|
||||
ExcelUtil<DvRepair> util = new ExcelUtil<DvRepair>(DvRepair.class);
|
||||
util.exportExcel(response, list, "设备维修单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备维修单详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{repairId}")
|
||||
public AjaxResult getInfo(@PathVariable("repairId") Long repairId)
|
||||
{
|
||||
return AjaxResult.success(dvRepairService.selectDvRepairByRepairId(repairId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvRepair dvRepair)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvRepairService.checkCodeUnique(dvRepair))){
|
||||
return R.fail("维修单编号已存!");
|
||||
}
|
||||
return toAjax(dvRepairService.insertDvRepair(dvRepair));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvRepair dvRepair)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvRepairService.checkCodeUnique(dvRepair))){
|
||||
return R.fail("维修单编号已存!");
|
||||
}
|
||||
return toAjax(dvRepairService.updateDvRepair(dvRepair));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{repairIds}")
|
||||
public R<Void> remove(@PathVariable Long[] repairIds)
|
||||
{
|
||||
return toAjax(dvRepairService.deleteDvRepairByRepairIds(repairIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据设备编码查询设备维修单列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getRepairList")
|
||||
public AjaxResult getRepairList(DvRepairDTO repairDTO) {
|
||||
return dvRepairService.getRepairList(repairDTO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.excel.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvRepairLine;
|
||||
import com.gear.mes.dv.service.IDvRepairLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单行Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/repairline")
|
||||
public class DvRepairLineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvRepairLineService dvRepairLineService;
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvRepairLine dvRepairLine)
|
||||
{
|
||||
startPage();
|
||||
List<DvRepairLine> list = dvRepairLineService.selectDvRepairLineList(dvRepairLine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备维修单行列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvRepairLine dvRepairLine)
|
||||
{
|
||||
List<DvRepairLine> list = dvRepairLineService.selectDvRepairLineList(dvRepairLine);
|
||||
ExcelUtil<DvRepairLine> util = new ExcelUtil<DvRepairLine>(DvRepairLine.class);
|
||||
util.exportExcel(response, list, "设备维修单行数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备维修单行详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvRepairLineService.selectDvRepairLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvRepairLine dvRepairLine)
|
||||
{
|
||||
return toAjax(dvRepairLineService.insertDvRepairLine(dvRepairLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvRepairLine dvRepairLine)
|
||||
{
|
||||
return toAjax(dvRepairLineService.updateDvRepairLine(dvRepairLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单行
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{lineIds}")
|
||||
public R<Void> remove(@PathVariable Long[] lineIds)
|
||||
{
|
||||
return toAjax(dvRepairLineService.deleteDvRepairLineByLineIds(lineIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.annotation.RepeatSubmit;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.core.validate.AddGroup;
|
||||
import com.gear.common.core.validate.EditGroup;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.poi.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.bo.DvSpecialEquipmentBo;
|
||||
import com.gear.mes.dv.domain.vo.DvSpecialEquipmentVo;
|
||||
import com.gear.mes.dv.service.IDvSpecialEquipmentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-21
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mes/specialEquipment")
|
||||
public class DvSpecialEquipmentController extends BaseController {
|
||||
|
||||
private final IDvSpecialEquipmentService iDvSpecialEquipmentService;
|
||||
|
||||
/**
|
||||
* 查询特种设备(包含锅炉、压力管道、电梯等特种设备信息)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<DvSpecialEquipmentVo> list(DvSpecialEquipmentBo bo, PageQuery pageQuery) {
|
||||
return iDvSpecialEquipmentService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出特种设备(包含锅炉、压力管道、电梯等特种设备信息)列表
|
||||
*/
|
||||
@Log(title = "特种设备(包含锅炉、压力管道、电梯等特种设备信息)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(DvSpecialEquipmentBo bo, HttpServletResponse response) {
|
||||
List<DvSpecialEquipmentVo> list = iDvSpecialEquipmentService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "特种设备(包含锅炉、压力管道、电梯等特种设备信息)", DvSpecialEquipmentVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取特种设备(包含锅炉、压力管道、电梯等特种设备信息)详细信息
|
||||
*
|
||||
* @param equipmentId 主键
|
||||
*/
|
||||
@GetMapping("/{equipmentId}")
|
||||
public R<DvSpecialEquipmentVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long equipmentId) {
|
||||
return R.ok(iDvSpecialEquipmentService.queryById(equipmentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
@Log(title = "特种设备(包含锅炉、压力管道、电梯等特种设备信息)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody DvSpecialEquipmentBo bo) {
|
||||
return toAjax(iDvSpecialEquipmentService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
@Log(title = "特种设备(包含锅炉、压力管道、电梯等特种设备信息)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody DvSpecialEquipmentBo bo) {
|
||||
return toAjax(iDvSpecialEquipmentService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*
|
||||
* @param equipmentIds 主键串
|
||||
*/
|
||||
@Log(title = "特种设备(包含锅炉、压力管道、电梯等特种设备信息)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{equipmentIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] equipmentIds) {
|
||||
return toAjax(iDvSpecialEquipmentService.deleteWithValidByIds(Arrays.asList(equipmentIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.gear.mes.dv.controller;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.excel.ExcelUtil;
|
||||
import com.gear.mes.dv.domain.DvSubject;
|
||||
import com.gear.mes.dv.service.IDvSubjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检保养项目Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/dvsubject")
|
||||
public class DvSubjectController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvSubjectService dvSubjectService;
|
||||
|
||||
/**
|
||||
* 查询设备点检保养项目列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvSubject dvSubject)
|
||||
{
|
||||
startPage();
|
||||
List<DvSubject> list = dvSubjectService.selectDvSubjectList(dvSubject);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备点检保养项目列表
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检保养项目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvSubject dvSubject)
|
||||
{
|
||||
List<DvSubject> list = dvSubjectService.selectDvSubjectList(dvSubject);
|
||||
ExcelUtil<DvSubject> util = new ExcelUtil<DvSubject>(DvSubject.class);
|
||||
util.exportExcel(response, list, "设备点检保养项目数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检保养项目详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{subjectId}")
|
||||
public AjaxResult getInfo(@PathVariable("subjectId") Long subjectId)
|
||||
{
|
||||
return AjaxResult.success(dvSubjectService.selectDvSubjectBySubjectId(subjectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检保养项目
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检保养项目", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvSubject dvSubject)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvSubjectService.checkSubjectCodeUnique(dvSubject))){
|
||||
return R.fail("项目编码已存在!");
|
||||
}
|
||||
return toAjax(dvSubjectService.insertDvSubject(dvSubject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检保养项目
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检保养项目", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvSubject dvSubject)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvSubjectService.checkSubjectCodeUnique(dvSubject))){
|
||||
return R.fail("项目编码已存在!");
|
||||
}
|
||||
return toAjax(dvSubjectService.updateDvSubject(dvSubject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检保养项目
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检保养项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{subjectIds}")
|
||||
public R<Void> remove(@PathVariable Long[] subjectIds)
|
||||
{
|
||||
return toAjax(dvSubjectService.deleteDvSubjectBySubjectIds(subjectIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.gear.mes.dv.controller.mobile;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yinjinlu
|
||||
* @description
|
||||
* @date 2025/4/30
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/mobile/dv/checkrecordline")
|
||||
public class DvCheckRecordLineMobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDvCheckRecordLineService dvCheckRecordLineService;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
List<DvCheckRecordLine> list = dvCheckRecordLineService.selectDvCheckRecordLineList(dvCheckRecordLine);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检记录行详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckRecordLineService.selectDvCheckRecordLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
return toAjax(dvCheckRecordLineService.updateDvCheckRecordLine(dvCheckRecordLine));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
package com.gear.mes.dv.controller.mobile;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvCheckPlan;
|
||||
import com.gear.mes.dv.domain.DvCheckRecord;
|
||||
import com.gear.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.gear.mes.dv.domain.DvCheckSubject;
|
||||
import com.gear.mes.dv.service.IDvCheckPlanService;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordLineService;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordService;
|
||||
import com.gear.mes.dv.service.IDvCheckSubjectService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yinjinlu
|
||||
* @description
|
||||
* @date 2025/4/30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mobile/dv/checkrecord")
|
||||
public class DvCheckRecordMobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDvCheckRecordService dvCheckRecordService;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckSubjectService dvCheckSubjectService;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckRecordLineService dvCheckRecordLineService;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckPlanService dvCheckPlanService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckRecord> list = dvCheckRecordService.selectDvCheckRecordList(dvCheckRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检记录详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckRecordService.selectDvCheckRecordByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.INSERT)
|
||||
@Transactional
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
dvCheckRecordService.insertDvCheckRecord(dvCheckRecord);
|
||||
//查找生效的点检方案,生成对应的行信息
|
||||
DvCheckPlan plan = dvCheckPlanService.selectDvCheckPlanByMachineryCodeAndType(dvCheckRecord.getMachineryCode(),UserConstants.DV_PLAN_TYPE_CHECK);
|
||||
|
||||
if(StringUtils.isNotNull(plan)){
|
||||
dvCheckRecord.setPlanId(plan.getPlanId());
|
||||
dvCheckRecord.setPlanCode(plan.getPlanCode());
|
||||
dvCheckRecord.setPlanName(plan.getPlanName());
|
||||
dvCheckRecord.setPlanType(plan.getPlanType());
|
||||
dvCheckRecordService.updateDvCheckRecord(dvCheckRecord);
|
||||
//根据选择的点检计划自动生成对应的行信息
|
||||
DvCheckSubject param = new DvCheckSubject();
|
||||
param.setPlanId(dvCheckRecord.getPlanId());
|
||||
List<DvCheckSubject> subjectList = dvCheckSubjectService.selectDvCheckSubjectList(param);
|
||||
if(!CollectionUtils.isEmpty(subjectList)){
|
||||
for(DvCheckSubject subject : subjectList){
|
||||
DvCheckRecordLine line = new DvCheckRecordLine();
|
||||
line.setRecordId(dvCheckRecord.getRecordId());
|
||||
line.setSubjectId(subject.getSubjectId());
|
||||
line.setSubjectCode(subject.getSubjectCode());
|
||||
line.setSubjectName(subject.getSubjectName());
|
||||
line.setSubjectType(subject.getSubjectType());
|
||||
line.setSubjectContent(subject.getSubjectContent());
|
||||
line.setSubjectStandard(subject.getSubjectStandard());
|
||||
line.setCheckStatus(UserConstants.DV_CHECK_STATUS_NOTCHECK);
|
||||
dvCheckRecordLineService.insertDvCheckRecordLine(line);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(dvCheckRecord);
|
||||
}else{
|
||||
return AjaxResult.error("当前设备未找到有效的点检方案,请先添加点检方案");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.UPDATE)
|
||||
@Transactional
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
if(UserConstants.ORDER_STATUS_FINISHED.equals(dvCheckRecord.getStatus())){
|
||||
DvCheckRecordLine param = new DvCheckRecordLine();
|
||||
param.setRecordId(dvCheckRecord.getRecordId());
|
||||
List<DvCheckRecordLine> lineList = dvCheckRecordLineService.selectDvCheckRecordLineList(param);
|
||||
if(CollectionUtils.isEmpty(lineList)){
|
||||
return R.fail("请添加设备点检项目结果信息");
|
||||
}
|
||||
}
|
||||
//如果设备不同则重新生成对应的点检行信息
|
||||
DvCheckRecord oldRecord = dvCheckRecordService.selectDvCheckRecordByRecordId(dvCheckRecord.getRecordId());
|
||||
if(!oldRecord.getMachineryCode().equals(dvCheckRecord.getMachineryCode())){
|
||||
dvCheckRecordLineService.deleteDvCheckRecordLineByRecordId(dvCheckRecord.getRecordId());
|
||||
DvCheckPlan plan = dvCheckPlanService.selectDvCheckPlanByMachineryCodeAndType(dvCheckRecord.getMachineryCode(),UserConstants.DV_PLAN_TYPE_CHECK);
|
||||
|
||||
if(StringUtils.isNotNull(plan)){
|
||||
dvCheckRecord.setPlanId(plan.getPlanId());
|
||||
dvCheckRecord.setPlanCode(plan.getPlanCode());
|
||||
dvCheckRecord.setPlanName(plan.getPlanName());
|
||||
dvCheckRecord.setPlanType(plan.getPlanType());
|
||||
dvCheckRecordService.updateDvCheckRecord(dvCheckRecord);
|
||||
//根据选择的点检计划自动生成对应的行信息
|
||||
DvCheckSubject param = new DvCheckSubject();
|
||||
param.setPlanId(dvCheckRecord.getPlanId());
|
||||
List<DvCheckSubject> subjectList = dvCheckSubjectService.selectDvCheckSubjectList(param);
|
||||
if(!CollectionUtils.isEmpty(subjectList)){
|
||||
for(DvCheckSubject subject : subjectList){
|
||||
DvCheckRecordLine line = new DvCheckRecordLine();
|
||||
line.setRecordId(dvCheckRecord.getRecordId());
|
||||
line.setSubjectId(subject.getSubjectId());
|
||||
line.setSubjectCode(subject.getSubjectCode());
|
||||
line.setSubjectName(subject.getSubjectName());
|
||||
line.setSubjectType(subject.getSubjectType());
|
||||
line.setSubjectContent(subject.getSubjectContent());
|
||||
line.setSubjectStandard(subject.getSubjectStandard());
|
||||
line.setCheckStatus(UserConstants.DV_CHECK_STATUS_NOTCHECK);
|
||||
dvCheckRecordLineService.insertDvCheckRecordLine(line);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return R.fail("当前设备未找到有效的点检方案,请先添加点检方案");
|
||||
}
|
||||
}
|
||||
return toAjax(dvCheckRecordService.updateDvCheckRecord(dvCheckRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.DELETE)
|
||||
@Transactional
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public R<Void> remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
|
||||
for(Long recordId : recordIds){
|
||||
dvCheckRecordLineService.deleteDvCheckRecordLineByRecordId(recordId);
|
||||
}
|
||||
|
||||
return toAjax(dvCheckRecordService.deleteDvCheckRecordByRecordIds(recordIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.controller.mobile;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.mes.dv.domain.DvMachinery;
|
||||
import com.gear.mes.dv.service.IDvMachineryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yinjinlu
|
||||
* @description
|
||||
* @date 2025/4/30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mobile/dv/machinery")
|
||||
public class DvMachineryMobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDvMachineryService dvMachineryService;
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvMachinery dvMachinery)
|
||||
{
|
||||
startPage();
|
||||
List<DvMachinery> list = dvMachineryService.selectDvMachineryList(dvMachinery);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*/
|
||||
|
||||
@Log(title = "设备", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DvMachinery dvMachinery)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvMachineryService.checkRecptCodeUnique(dvMachinery))){
|
||||
return AjaxResult.error("编号已存在!");
|
||||
}
|
||||
return dvMachineryService.updateDvMachinery(dvMachinery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{machineryId}")
|
||||
public AjaxResult getInfo(@PathVariable("machineryId") Long machineryId)
|
||||
{
|
||||
return AjaxResult.success(dvMachineryService.selectDvMachineryByMachineryId(machineryId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.gear.mes.dv.controller.mobile;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.mes.dv.domain.DvMaintenRecordLine;
|
||||
import com.gear.mes.dv.service.IDvMaintenRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录行Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mobile/dv/maintenrecordline")
|
||||
public class DvMaintenRecordLineMobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDvMaintenRecordLineService dvMaintenRecordLineService;
|
||||
|
||||
/**
|
||||
* 查询设备保养记录行列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(DvMaintenRecordLine dvMaintenRecordLine) {
|
||||
List<DvMaintenRecordLine> list = dvMaintenRecordLineService.selectDvMaintenRecordLineList(dvMaintenRecordLine);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备保养记录行详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvMaintenRecordLineService.selectDvMaintenRecordLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养记录行
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
return toAjax(dvMaintenRecordLineService.updateDvMaintenRecordLine(dvMaintenRecordLine));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.gear.mes.dv.controller.mobile;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.mes.dv.domain.DvMaintenRecord;
|
||||
import com.gear.mes.dv.service.IDvMaintenRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mobile/dv/maintenrecord")
|
||||
public class DvMaintenRecordMobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDvMaintenRecordService dvMaintenRecordService;
|
||||
|
||||
/**
|
||||
* 查询设备保养记录列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
startPage();
|
||||
List<DvMaintenRecord> list = dvMaintenRecordService.selectDvMaintenRecordList(dvMaintenRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备保养记录详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(dvMaintenRecordService.selectDvMaintenRecordByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
return toAjax(dvMaintenRecordService.insertDvMaintenRecord(dvMaintenRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
return toAjax(dvMaintenRecordService.updateDvMaintenRecord(dvMaintenRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养记录
|
||||
*/
|
||||
|
||||
@Log(title = "设备保养记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public R<Void> remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
return toAjax(dvMaintenRecordService.deleteDvMaintenRecordByRecordIds(recordIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.gear.mes.dv.controller.mobile;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.mes.dv.domain.DvRepairLine;
|
||||
import com.gear.mes.dv.service.IDvRepairLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单行Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mobile/dv/repairline")
|
||||
public class DvRepairLineMobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDvRepairLineService dvRepairLineService;
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(DvRepairLine dvRepairLine)
|
||||
{
|
||||
List<DvRepairLine> list = dvRepairLineService.selectDvRepairLineList(dvRepairLine);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备维修单行详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvRepairLineService.selectDvRepairLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody DvRepairLine dvRepairLine)
|
||||
{
|
||||
return toAjax(dvRepairLineService.insertDvRepairLine(dvRepairLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvRepairLine dvRepairLine)
|
||||
{
|
||||
return toAjax(dvRepairLineService.updateDvRepairLine(dvRepairLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单行
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{lineIds}")
|
||||
public R<Void> remove(@PathVariable Long[] lineIds)
|
||||
{
|
||||
return toAjax(dvRepairLineService.deleteDvRepairLineByLineIds(lineIds));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.gear.mes.dv.controller.mobile;
|
||||
|
||||
import com.gear.common.annotation.Log;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.controller.BaseController;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.core.domain.R;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.enums.BusinessType;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvRepair;
|
||||
import com.gear.mes.dv.service.IDvRepairService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 设备维修单Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mobile/dv/repair")
|
||||
public class DvRepairMobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDvRepairService dvRepairService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询设备维修单列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvRepair dvRepair)
|
||||
{
|
||||
startPage();
|
||||
List<DvRepair> list = dvRepairService.selectDvRepairList(dvRepair);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取设备维修单详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{repairId}")
|
||||
public AjaxResult getInfo(@PathVariable("repairId") Long repairId)
|
||||
{
|
||||
return AjaxResult.success(dvRepairService.selectDvRepairByRepairId(repairId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DvRepair dvRepair)
|
||||
{
|
||||
if(StringUtils.isNotNull(dvRepair.getRepairCode())){
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvRepairService.checkCodeUnique(dvRepair))){
|
||||
return AjaxResult.error("维修单编号已存!");
|
||||
}
|
||||
} else{
|
||||
dvRepair.setRepairCode("REPAIR-" + UUID.randomUUID().toString().replace("-", "").substring(0, 12).toUpperCase());
|
||||
}
|
||||
|
||||
//根据sourceDocType和sourceDocId 生成对应的维修单项目
|
||||
|
||||
dvRepairService.insertDvRepair(dvRepair);
|
||||
return AjaxResult.success(dvRepair);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@RequestBody DvRepair dvRepair)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(dvRepairService.checkCodeUnique(dvRepair))){
|
||||
return R.fail("维修单编号已存!");
|
||||
}
|
||||
return toAjax(dvRepairService.updateDvRepair(dvRepair));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单
|
||||
*/
|
||||
|
||||
@Log(title = "设备维修单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{repairIds}")
|
||||
public R<Void> remove(@PathVariable Long[] repairIds)
|
||||
{
|
||||
return toAjax(dvRepairService.deleteDvRepairByRepairIds(repairIds));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 点检设备对象 dv_check_machinery
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-17
|
||||
*/
|
||||
@Data
|
||||
public class DvCheckMachinery extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 流水号 */
|
||||
private Long recordId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long planId;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long machineryId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String machineryCode;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String machineryName;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String machineryBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String machinerySpec;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备点检计划头对象 dv_check_plan
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
@Data
|
||||
public class DvCheckPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 计划ID */
|
||||
private Long planId;
|
||||
|
||||
/** 计划编码 */
|
||||
@Excel(name = "计划编码")
|
||||
private String planCode;
|
||||
|
||||
/** 计划名称 */
|
||||
@Excel(name = "计划名称")
|
||||
private String planName;
|
||||
|
||||
private String planType;
|
||||
|
||||
/** 开始日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
/** 结束日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
|
||||
/** 频率 */
|
||||
@Excel(name = "频率")
|
||||
private String cycleType;
|
||||
|
||||
/** 次数 */
|
||||
@Excel(name = "次数")
|
||||
private Long cycleCount;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备点检记录对象 dv_check_record
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Data
|
||||
public class DvCheckRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 计划ID */
|
||||
private Long recordId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long planId;
|
||||
|
||||
/** 计划编码 */
|
||||
@Excel(name = "计划编码")
|
||||
private String planCode;
|
||||
|
||||
/** 计划名称 */
|
||||
@Excel(name = "计划名称")
|
||||
private String planName;
|
||||
|
||||
/** 计划类型 */
|
||||
@Excel(name = "计划类型")
|
||||
private String planType;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long machineryId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String machineryCode;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String machineryName;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String machineryBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String machinerySpec;
|
||||
|
||||
/** 点检时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
@Excel(name = "点检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkTime;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String nickName;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备点检记录行对象 dv_check_record_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Data
|
||||
public class DvCheckRecordLine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 计划ID */
|
||||
private Long lineId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long recordId;
|
||||
|
||||
/** 项目ID */
|
||||
@Excel(name = "项目ID")
|
||||
private Long subjectId;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
private String subjectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String subjectName;
|
||||
|
||||
/** 项目类型 */
|
||||
@Excel(name = "项目类型")
|
||||
private String subjectType;
|
||||
|
||||
/** 项目内容 */
|
||||
@Excel(name = "项目内容")
|
||||
private String subjectContent;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
private String subjectStandard;
|
||||
|
||||
/** 点检结果 */
|
||||
@Excel(name = "点检结果")
|
||||
private String checkStatus;
|
||||
|
||||
/** 异常描述 */
|
||||
@Excel(name = "异常描述")
|
||||
private String checkResult;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 点检项目对象 dv_check_subject
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-18
|
||||
*/
|
||||
@Data
|
||||
public class DvCheckSubject extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 流水号 */
|
||||
private Long recordId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long planId;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long subjectId;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
private String subjectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String subjectName;
|
||||
|
||||
/** 项目类型 */
|
||||
@Excel(name = "项目类型")
|
||||
private String subjectType;
|
||||
|
||||
/** 项目内容 */
|
||||
@Excel(name = "项目内容")
|
||||
private String subjectContent;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
private String subjectStandard;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备对象 dv_machinery
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
@Data
|
||||
public class DvMachinery extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备类型ID */
|
||||
private Long machineryId;
|
||||
|
||||
/** 设备类型编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String machineryCode;
|
||||
|
||||
/** 设备类型名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String machineryName;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String machineryBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String machinerySpec;
|
||||
|
||||
/** 设备类型ID */
|
||||
@Excel(name = "设备类型ID")
|
||||
private Long machineryTypeId;
|
||||
|
||||
/** 设备类型编码 */
|
||||
@Excel(name = "设备类型编码")
|
||||
private String machineryTypeCode;
|
||||
|
||||
/** 设备类型名称 */
|
||||
@Excel(name = "设备类型名称")
|
||||
private String machineryTypeName;
|
||||
|
||||
/** 所属车间ID */
|
||||
@Excel(name = "所属车间ID")
|
||||
private Long workshopId;
|
||||
|
||||
/** 所属车间编码 */
|
||||
@Excel(name = "所属车间编码")
|
||||
private String workshopCode;
|
||||
|
||||
/** 所属车间名称 */
|
||||
@Excel(name = "所属车间名称")
|
||||
private String workshopName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
@Excel(name = "最近保养时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastMaintenTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
@Excel(name = "最近点检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastCheckTime;
|
||||
|
||||
/** 设备状态 */
|
||||
@Excel(name = "设备状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.TreeEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备类型对象 dv_machinery_type
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
@Data
|
||||
public class DvMachineryType extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备类型ID */
|
||||
private Long machineryTypeId;
|
||||
|
||||
/** 设备类型编码 */
|
||||
@Excel(name = "设备类型编码")
|
||||
private String machineryTypeCode;
|
||||
|
||||
/** 设备类型名称 */
|
||||
@Excel(name = "设备类型名称")
|
||||
private String machineryTypeName;
|
||||
|
||||
/** 父类型ID */
|
||||
@Excel(name = "父类型ID")
|
||||
private Long parentTypeId;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private String enableFlag;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
/** 祖级列表 */
|
||||
@TableField(exist = false)
|
||||
private String ancestors;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备保养记录对象 dv_mainten_record
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Data
|
||||
public class DvMaintenRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 计划ID */
|
||||
private Long recordId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long planId;
|
||||
|
||||
/** 计划编码 */
|
||||
@Excel(name = "计划编码")
|
||||
private String planCode;
|
||||
|
||||
/** 计划名称 */
|
||||
@Excel(name = "计划名称")
|
||||
private String planName;
|
||||
|
||||
/** 计划类型 */
|
||||
@Excel(name = "计划类型")
|
||||
private String planType;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long machineryId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String machineryCode;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String machineryName;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String machineryBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String machinerySpec;
|
||||
|
||||
/** 保养时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "保养时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date maintenTime;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 昵称 */
|
||||
@Excel(name = "昵称")
|
||||
private String nickName;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备保养记录行对象 dv_mainten_record_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Data
|
||||
public class DvMaintenRecordLine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 计划ID */
|
||||
private Long lineId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long recordId;
|
||||
|
||||
/** 项目ID */
|
||||
@Excel(name = "项目ID")
|
||||
private Long subjectId;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
private String subjectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String subjectName;
|
||||
|
||||
/** 项目类型 */
|
||||
@Excel(name = "项目类型")
|
||||
private String subjectType;
|
||||
|
||||
/** 项目内容 */
|
||||
@Excel(name = "项目内容")
|
||||
private String subjectContent;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
private String subjectStandard;
|
||||
|
||||
/** 保养结果 */
|
||||
@Excel(name = "保养结果")
|
||||
private String maintenStatus;
|
||||
|
||||
/** 异常描述 */
|
||||
@Excel(name = "异常描述")
|
||||
private String maintenResult;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
}
|
||||
116
gear-mes/src/main/java/com/gear/mes/dv/domain/DvRepair.java
Normal file
116
gear-mes/src/main/java/com/gear/mes/dv/domain/DvRepair.java
Normal file
@@ -0,0 +1,116 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备维修单对象 dv_repair
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-06
|
||||
*/
|
||||
@Data
|
||||
public class DvRepair extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 维修单ID */
|
||||
private Long repairId;
|
||||
|
||||
/** 维修单编号 */
|
||||
@Excel(name = "维修单编号")
|
||||
private String repairCode;
|
||||
|
||||
/** 维修单名称 */
|
||||
@Excel(name = "维修单名称")
|
||||
private String repairName;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long machineryId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String machineryCode;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String machineryName;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String machineryBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String machinerySpec;
|
||||
|
||||
/** 设备类型ID */
|
||||
@Excel(name = "设备类型ID")
|
||||
private Long machineryTypeId;
|
||||
|
||||
/** 报修日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报修日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date requireDate;
|
||||
|
||||
/** 维修完成日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "维修完成日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date finishDate;
|
||||
|
||||
/** 验收日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "验收日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date confirmDate;
|
||||
|
||||
/** 维修结果 */
|
||||
@Excel(name = "维修结果")
|
||||
private String repairResult;
|
||||
|
||||
private Long acceptedId;
|
||||
|
||||
private String acceptedName;
|
||||
|
||||
/** 维修人员 */
|
||||
@Excel(name = "维修人员")
|
||||
private String acceptedBy;
|
||||
|
||||
private Long confirmId;
|
||||
|
||||
private String confirmName;
|
||||
/** 验收人员 */
|
||||
@Excel(name = "验收人员")
|
||||
private String confirmBy;
|
||||
|
||||
private String sourceDocType;
|
||||
|
||||
private Long sourceDocId;
|
||||
|
||||
private String sourceDocCode;
|
||||
|
||||
|
||||
/** 单据状态 */
|
||||
@Excel(name = "单据状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备维修单行对象 dv_repair_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
@Data
|
||||
public class DvRepairLine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 行ID */
|
||||
private Long lineId;
|
||||
|
||||
/** 维修单ID */
|
||||
@Excel(name = "维修单ID")
|
||||
private Long repairId;
|
||||
|
||||
/** 项目ID */
|
||||
@Excel(name = "项目ID")
|
||||
private Long subjectId;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
private String subjectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String subjectName;
|
||||
|
||||
/** 项目类型 */
|
||||
@Excel(name = "项目类型")
|
||||
private String subjectType;
|
||||
|
||||
/** 项目内容 */
|
||||
@Excel(name = "项目内容")
|
||||
private String subjectContent;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
private String subjectStandard;
|
||||
|
||||
/** 故障描述 */
|
||||
@Excel(name = "故障描述")
|
||||
private String malfunction;
|
||||
|
||||
/** 故障描述资源 */
|
||||
@Excel(name = "故障描述资源")
|
||||
private String malfunctionUrl;
|
||||
|
||||
/** 维修情况 */
|
||||
@Excel(name = "维修情况")
|
||||
private String repairDes;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 特种设备(包含锅炉、压力管道、电梯等特种设备信息)对象 dv_special_equipment
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("dv_special_equipment")
|
||||
public class DvSpecialEquipment extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
@TableId(value = "equipment_id")
|
||||
private Long equipmentId;
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String equipmentCode;
|
||||
/**
|
||||
* 设备名称(如:锅炉、压力容器、压力管道、电梯、起重机械等)
|
||||
*/
|
||||
private String equipmentName;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String specificationModel;
|
||||
/**
|
||||
* 制造单位
|
||||
*/
|
||||
private String manufacturer;
|
||||
/**
|
||||
* 制造日期
|
||||
*/
|
||||
private Date productionDate;
|
||||
/**
|
||||
* 安装日期
|
||||
*/
|
||||
private Date installationDate;
|
||||
/**
|
||||
* 投入使用日期
|
||||
*/
|
||||
private Date useStartDate;
|
||||
/**
|
||||
* 特种设备注册编号
|
||||
*/
|
||||
private String registrationNo;
|
||||
/**
|
||||
* 安全负责人
|
||||
*/
|
||||
private String safetyManager;
|
||||
/**
|
||||
* 附件路径(多个附件用逗号分隔)
|
||||
*/
|
||||
private String attachment;
|
||||
/**
|
||||
* 检验周期(月)
|
||||
*/
|
||||
private Long inspectionCycle;
|
||||
/**
|
||||
* 上次检验时间
|
||||
*/
|
||||
private Date lastInspectionTime;
|
||||
/**
|
||||
* 下次检验时间
|
||||
*/
|
||||
private Date nextInspectionTime;
|
||||
/**
|
||||
* 当前状态(在用、停用、报废等)
|
||||
*/
|
||||
private String currentStatus;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
59
gear-mes/src/main/java/com/gear/mes/dv/domain/DvSubject.java
Normal file
59
gear-mes/src/main/java/com/gear/mes/dv/domain/DvSubject.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package com.gear.mes.dv.domain;
|
||||
|
||||
import com.gear.common.annotation.Excel;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备点检保养项目对象 dv_subject
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
@Data
|
||||
public class DvSubject extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 项目ID */
|
||||
private Long subjectId;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
private String subjectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String subjectName;
|
||||
|
||||
/** 项目类型 */
|
||||
@Excel(name = "项目类型")
|
||||
private String subjectType;
|
||||
|
||||
/** 项目内容 */
|
||||
@Excel(name = "项目内容")
|
||||
private String subjectContent;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
private String subjectStandard;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private String enableFlag;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.gear.mes.dv.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 特种设备(包含锅炉、压力管道、电梯等特种设备信息)业务对象 dv_special_equipment
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DvSpecialEquipmentBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String equipmentCode;
|
||||
|
||||
/**
|
||||
* 设备名称(如:锅炉、压力容器、压力管道、电梯、起重机械等)
|
||||
*/
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String specificationModel;
|
||||
|
||||
/**
|
||||
* 制造单位
|
||||
*/
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 制造日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date productionDate;
|
||||
|
||||
/**
|
||||
* 安装日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date installationDate;
|
||||
|
||||
/**
|
||||
* 投入使用日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date useStartDate;
|
||||
|
||||
/**
|
||||
* 特种设备注册编号
|
||||
*/
|
||||
private String registrationNo;
|
||||
|
||||
/**
|
||||
* 安全负责人
|
||||
*/
|
||||
private String safetyManager;
|
||||
|
||||
/**
|
||||
* 附件路径(多个附件用逗号分隔)
|
||||
*/
|
||||
private String attachment;
|
||||
|
||||
/**
|
||||
* 检验周期(月)
|
||||
*/
|
||||
private Long inspectionCycle;
|
||||
|
||||
/**
|
||||
* 上次检验时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastInspectionTime;
|
||||
|
||||
/**
|
||||
* 下次检验时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date nextInspectionTime;
|
||||
|
||||
/**
|
||||
* 当前状态(在用、停用、报废等)
|
||||
*/
|
||||
private String currentStatus;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.gear.mes.dv.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DvCheckPlanDTO {
|
||||
|
||||
private String planType;
|
||||
|
||||
private String machineryCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.gear.mes.dv.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DvRepairDTO {
|
||||
|
||||
private String machineryCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.gear.mes.dv.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gear.common.annotation.ExcelDictFormat;
|
||||
import com.gear.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 特种设备(包含锅炉、压力管道、电梯等特种设备信息)视图对象 dv_special_equipment
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-21
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class DvSpecialEquipmentVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
@ExcelProperty(value = "设备ID")
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@ExcelProperty(value = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/**
|
||||
* 设备名称(如:锅炉、压力容器、压力管道、电梯、起重机械等)
|
||||
*/
|
||||
@ExcelProperty(value = "设备名称", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "如=:锅炉、压力容器、压力管道、电梯、起重机械等")
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ExcelProperty(value = "规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
/**
|
||||
* 制造单位
|
||||
*/
|
||||
@ExcelProperty(value = "制造单位")
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 制造日期
|
||||
*/
|
||||
@ExcelProperty(value = "制造日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date productionDate;
|
||||
|
||||
/**
|
||||
* 安装日期
|
||||
*/
|
||||
@ExcelProperty(value = "安装日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date installationDate;
|
||||
|
||||
/**
|
||||
* 投入使用日期
|
||||
*/
|
||||
@ExcelProperty(value = "投入使用日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date useStartDate;
|
||||
|
||||
/**
|
||||
* 特种设备注册编号
|
||||
*/
|
||||
@ExcelProperty(value = "特种设备注册编号")
|
||||
private String registrationNo;
|
||||
|
||||
/**
|
||||
* 安全负责人
|
||||
*/
|
||||
@ExcelProperty(value = "安全负责人")
|
||||
private String safetyManager;
|
||||
|
||||
/**
|
||||
* 附件路径(多个附件用逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "附件路径", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "多=个附件用逗号分隔")
|
||||
private String attachment;
|
||||
|
||||
/**
|
||||
* 检验周期(月)
|
||||
*/
|
||||
@ExcelProperty(value = "检验周期", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "月=")
|
||||
private Long inspectionCycle;
|
||||
|
||||
/**
|
||||
* 上次检验时间
|
||||
*/
|
||||
@ExcelProperty(value = "上次检验时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastInspectionTime;
|
||||
|
||||
/**
|
||||
* 下次检验时间
|
||||
*/
|
||||
@ExcelProperty(value = "下次检验时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date nextInspectionTime;
|
||||
|
||||
/**
|
||||
* 当前状态(在用、停用、报废等)
|
||||
*/
|
||||
@ExcelProperty(value = "当前状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "在=用、停用、报废等")
|
||||
private String currentStatus;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckMachinery;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检设备Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-17
|
||||
*/
|
||||
public interface DvCheckMachineryMapper
|
||||
{
|
||||
/**
|
||||
* 查询点检设备
|
||||
*
|
||||
* @param recordId 点检设备主键
|
||||
* @return 点检设备
|
||||
*/
|
||||
public DvCheckMachinery selectDvCheckMachineryByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询点检设备列表
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 点检设备集合
|
||||
*/
|
||||
public List<DvCheckMachinery> selectDvCheckMachineryList(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
public DvCheckMachinery checkMachineryUnique(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
/**
|
||||
* 新增点检设备
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckMachinery(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
/**
|
||||
* 修改点检设备
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckMachinery(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
/**
|
||||
* 删除点检设备
|
||||
*
|
||||
* @param recordId 点检设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckMachineryByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 批量删除点检设备
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckMachineryByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 根据计划头ID删除对应的设备列表
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
public int deleteByPlanId(Long planId);
|
||||
|
||||
/**
|
||||
* 根据设备编码获取相关计划id
|
||||
* @param machineryCode
|
||||
* @return
|
||||
*/
|
||||
List<Long> getPlanId(@Param("machineryCode") String machineryCode);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckPlan;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检计划头Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
public interface DvCheckPlanMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备点检计划头
|
||||
*
|
||||
* @param planId 设备点检计划头主键
|
||||
* @return 设备点检计划头
|
||||
*/
|
||||
public DvCheckPlan selectDvCheckPlanByPlanId(Long planId);
|
||||
|
||||
/**
|
||||
* 查询设备点检计划头列表
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 设备点检计划头集合
|
||||
*/
|
||||
public List<DvCheckPlan> selectDvCheckPlanList(DvCheckPlan dvCheckPlan);
|
||||
|
||||
public DvCheckPlan checkPlanCodeUnique(DvCheckPlan dvCheckPlan);
|
||||
|
||||
/**
|
||||
* 新增设备点检计划头
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckPlan(DvCheckPlan dvCheckPlan);
|
||||
|
||||
/**
|
||||
* 修改设备点检计划头
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckPlan(DvCheckPlan dvCheckPlan);
|
||||
|
||||
/**
|
||||
* 删除设备点检计划头
|
||||
*
|
||||
* @param planId 设备点检计划头主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckPlanByPlanId(Long planId);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检计划头
|
||||
*
|
||||
* @param planIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckPlanByPlanIds(Long[] planIds);
|
||||
|
||||
DvCheckPlan selectDvCheckPlanByMachineryCodeAndType(@Param("machineryCode") String machineryCode, @Param("planType") String planType);
|
||||
|
||||
List<DvCheckPlan> getByIds(@Param("planIds") List<Long> planIds,@Param("planType") String planType);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckRecordLine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface DvCheckRecordLineMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
public DvCheckRecordLine selectDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 设备点检记录行集合
|
||||
*/
|
||||
public List<DvCheckRecordLine> selectDvCheckRecordLineList(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录行
|
||||
*
|
||||
* @param lineIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineIds(Long[] lineIds);
|
||||
|
||||
/**
|
||||
* 根据记录ID删除设备点检记录行信息
|
||||
*
|
||||
* @param recordId 记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByRecordId(Long recordId);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface DvCheckRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
public DvCheckRecord selectDvCheckRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 设备点检记录集合
|
||||
*/
|
||||
public List<DvCheckRecord> selectDvCheckRecordList(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordIds(Long[] recordIds);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckSubject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检项目Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-18
|
||||
*/
|
||||
public interface DvCheckSubjectMapper
|
||||
{
|
||||
/**
|
||||
* 查询点检项目
|
||||
*
|
||||
* @param recordId 点检项目主键
|
||||
* @return 点检项目
|
||||
*/
|
||||
public DvCheckSubject selectDvCheckSubjectByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询点检项目列表
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 点检项目集合
|
||||
*/
|
||||
public List<DvCheckSubject> selectDvCheckSubjectList(DvCheckSubject dvCheckSubject);
|
||||
|
||||
|
||||
public DvCheckSubject checkSubjectUnique(DvCheckSubject dvCheckSubject);
|
||||
|
||||
/**
|
||||
* 新增点检项目
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckSubject(DvCheckSubject dvCheckSubject);
|
||||
|
||||
/**
|
||||
* 修改点检项目
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckSubject(DvCheckSubject dvCheckSubject);
|
||||
|
||||
/**
|
||||
* 删除点检项目
|
||||
*
|
||||
* @param recordId 点检项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckSubjectByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 批量删除点检项目
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckSubjectByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 根据计划ID删除对应的计划项目
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
public int deleteByPlanId(Long planId);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvMachinery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
public interface DvMachineryMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备
|
||||
*
|
||||
* @param machineryId 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
public DvMachinery selectDvMachineryByMachineryId(Long machineryId);
|
||||
|
||||
/**
|
||||
* 依据设备编码查询设备
|
||||
*
|
||||
* @param machineryCode 设备编码
|
||||
* @return 设备
|
||||
*/
|
||||
public List<DvMachinery> selectByMachineryCode(String machineryCode);
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<DvMachinery> selectDvMachineryList(DvMachinery dvMachinery);
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvMachinery(DvMachinery dvMachinery);
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvMachinery(DvMachinery dvMachinery);
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*
|
||||
* @param machineryId 设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryByMachineryId(Long machineryId);
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*
|
||||
* @param machineryIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryByMachineryIds(Long[] machineryIds);
|
||||
|
||||
DvMachinery checkRecptCodeUnique(DvMachinery dvMachinery);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvMachineryType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备类型Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
public interface DvMachineryTypeMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备类型
|
||||
*
|
||||
* @param machineryTypeId 设备类型主键
|
||||
* @return 设备类型
|
||||
*/
|
||||
public DvMachineryType selectDvMachineryTypeByMachineryTypeId(Long machineryTypeId);
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 设备类型集合
|
||||
*/
|
||||
public List<DvMachineryType> selectDvMachineryTypeList(DvMachineryType dvMachineryType);
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvMachineryType(DvMachineryType dvMachineryType);
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvMachineryType(DvMachineryType dvMachineryType);
|
||||
|
||||
/**
|
||||
* 删除设备类型
|
||||
*
|
||||
* @param machineryTypeId 设备类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryTypeByMachineryTypeId(Long machineryTypeId);
|
||||
|
||||
/**
|
||||
* 批量删除设备类型
|
||||
*
|
||||
* @param machineryTypeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryTypeByMachineryTypeIds(Long[] machineryTypeIds);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvMaintenRecordLine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录行Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface DvMaintenRecordLineMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备保养记录行
|
||||
*
|
||||
* @param lineId 设备保养记录行主键
|
||||
* @return 设备保养记录行
|
||||
*/
|
||||
public DvMaintenRecordLine selectDvMaintenRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备保养记录行列表
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 设备保养记录行集合
|
||||
*/
|
||||
public List<DvMaintenRecordLine> selectDvMaintenRecordLineList(DvMaintenRecordLine dvMaintenRecordLine);
|
||||
|
||||
/**
|
||||
* 新增设备保养记录行
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
|
||||
|
||||
/**
|
||||
* 修改设备保养记录行
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
|
||||
|
||||
/**
|
||||
* 删除设备保养记录行
|
||||
*
|
||||
* @param lineId 设备保养记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 批量删除设备保养记录行
|
||||
*
|
||||
* @param lineIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordLineByLineIds(Long[] lineIds);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvMaintenRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface DvMaintenRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备保养记录
|
||||
*
|
||||
* @param recordId 设备保养记录主键
|
||||
* @return 设备保养记录
|
||||
*/
|
||||
public DvMaintenRecord selectDvMaintenRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询设备保养记录列表
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 设备保养记录集合
|
||||
*/
|
||||
public List<DvMaintenRecord> selectDvMaintenRecordList(DvMaintenRecord dvMaintenRecord);
|
||||
|
||||
/**
|
||||
* 新增设备保养记录
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
|
||||
|
||||
/**
|
||||
* 修改设备保养记录
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
|
||||
|
||||
/**
|
||||
* 删除设备保养记录
|
||||
*
|
||||
* @param recordId 设备保养记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 批量删除设备保养记录
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordByRecordIds(Long[] recordIds);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvRepairLine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单行Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
public interface DvRepairLineMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
public DvRepairLine selectDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 设备维修单行集合
|
||||
*/
|
||||
public List<DvRepairLine> selectDvRepairLineList(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 删除设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单行
|
||||
*
|
||||
* @param lineIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineIds(Long[] lineIds);
|
||||
|
||||
public int deleteByRepairId(Long repairId);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvRepair;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-06
|
||||
*/
|
||||
public interface DvRepairMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备维修单
|
||||
*
|
||||
* @param repairId 设备维修单主键
|
||||
* @return 设备维修单
|
||||
*/
|
||||
public DvRepair selectDvRepairByRepairId(Long repairId);
|
||||
|
||||
/**
|
||||
* 查询设备维修单列表
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 设备维修单集合
|
||||
*/
|
||||
public List<DvRepair> selectDvRepairList(DvRepair dvRepair);
|
||||
|
||||
public DvRepair checkCodeUnique(DvRepair dvRepair);
|
||||
|
||||
|
||||
/**
|
||||
* 新增设备维修单
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvRepair(DvRepair dvRepair);
|
||||
|
||||
/**
|
||||
* 修改设备维修单
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvRepair(DvRepair dvRepair);
|
||||
|
||||
/**
|
||||
* 删除设备维修单
|
||||
*
|
||||
* @param repairId 设备维修单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairByRepairId(Long repairId);
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单
|
||||
*
|
||||
* @param repairIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairByRepairIds(Long[] repairIds);
|
||||
|
||||
/**
|
||||
* 根据设备编码查询设备维修单列表
|
||||
*
|
||||
* @param machineryCode
|
||||
* @return
|
||||
*/
|
||||
List<DvRepair> getRepairList(@Param("machineryCode") String machineryCode);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.common.core.mapper.BaseMapperPlus;
|
||||
import com.gear.mes.dv.domain.DvSpecialEquipment;
|
||||
import com.gear.mes.dv.domain.vo.DvSpecialEquipmentVo;
|
||||
|
||||
/**
|
||||
* 特种设备(包含锅炉、压力管道、电梯等特种设备信息)Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-21
|
||||
*/
|
||||
public interface DvSpecialEquipmentMapper extends BaseMapperPlus<DvSpecialEquipmentMapper, DvSpecialEquipment, DvSpecialEquipmentVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.gear.mes.dv.mapper;
|
||||
|
||||
import com.gear.mes.dv.domain.DvSubject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检保养项目Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
public interface DvSubjectMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备点检保养项目
|
||||
*
|
||||
* @param subjectId 设备点检保养项目主键
|
||||
* @return 设备点检保养项目
|
||||
*/
|
||||
public DvSubject selectDvSubjectBySubjectId(Long subjectId);
|
||||
|
||||
/**
|
||||
* 查询设备点检保养项目列表
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 设备点检保养项目集合
|
||||
*/
|
||||
public List<DvSubject> selectDvSubjectList(DvSubject dvSubject);
|
||||
|
||||
|
||||
public DvSubject checkSubjectCodeUnique(DvSubject dvSubject);
|
||||
|
||||
/**
|
||||
* 新增设备点检保养项目
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvSubject(DvSubject dvSubject);
|
||||
|
||||
/**
|
||||
* 修改设备点检保养项目
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvSubject(DvSubject dvSubject);
|
||||
|
||||
/**
|
||||
* 删除设备点检保养项目
|
||||
*
|
||||
* @param subjectId 设备点检保养项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvSubjectBySubjectId(Long subjectId);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检保养项目
|
||||
*
|
||||
* @param subjectIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvSubjectBySubjectIds(Long[] subjectIds);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckMachinery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检设备Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-17
|
||||
*/
|
||||
public interface IDvCheckMachineryService
|
||||
{
|
||||
/**
|
||||
* 查询点检设备
|
||||
*
|
||||
* @param recordId 点检设备主键
|
||||
* @return 点检设备
|
||||
*/
|
||||
public DvCheckMachinery selectDvCheckMachineryByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询点检设备列表
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 点检设备集合
|
||||
*/
|
||||
public List<DvCheckMachinery> selectDvCheckMachineryList(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
public String checkMachineryUnique(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
/**
|
||||
* 新增点检设备
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckMachinery(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
/**
|
||||
* 修改点检设备
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckMachinery(DvCheckMachinery dvCheckMachinery);
|
||||
|
||||
/**
|
||||
* 批量删除点检设备
|
||||
*
|
||||
* @param recordIds 需要删除的点检设备主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckMachineryByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除点检设备信息
|
||||
*
|
||||
* @param recordId 点检设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckMachineryByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 根据计划头ID删除对应的设备列表
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
public int deleteByPlanId(Long planId);
|
||||
|
||||
/**
|
||||
* 根据设备编码获取相关计划id
|
||||
* @param machineryCode
|
||||
* @return
|
||||
*/
|
||||
List<Long> getPlanId(String machineryCode);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.mes.dv.domain.DvCheckPlan;
|
||||
import com.gear.mes.dv.domain.dto.DvCheckPlanDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检计划头Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
public interface IDvCheckPlanService
|
||||
{
|
||||
/**
|
||||
* 查询设备点检计划头
|
||||
*
|
||||
* @param planId 设备点检计划头主键
|
||||
* @return 设备点检计划头
|
||||
*/
|
||||
public DvCheckPlan selectDvCheckPlanByPlanId(Long planId);
|
||||
|
||||
/**
|
||||
* 查询设备点检计划头列表
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 设备点检计划头集合
|
||||
*/
|
||||
public List<DvCheckPlan> selectDvCheckPlanList(DvCheckPlan dvCheckPlan);
|
||||
|
||||
/**
|
||||
* 检查计划编码是否唯一
|
||||
* @param dvCheckPlan
|
||||
* @return
|
||||
*/
|
||||
public String checkPlanCodeUnique(DvCheckPlan dvCheckPlan);
|
||||
|
||||
/**
|
||||
* 新增设备点检计划头
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckPlan(DvCheckPlan dvCheckPlan);
|
||||
|
||||
/**
|
||||
* 修改设备点检计划头
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckPlan(DvCheckPlan dvCheckPlan);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检计划头
|
||||
*
|
||||
* @param planIds 需要删除的设备点检计划头主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckPlanByPlanIds(Long[] planIds);
|
||||
|
||||
/**
|
||||
* 删除设备点检计划头信息
|
||||
*
|
||||
* @param planId 设备点检计划头主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckPlanByPlanId(Long planId);
|
||||
|
||||
/**
|
||||
* 根据设备编码和计划类型查询设备点检计划头列表
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getCheckPlan(DvCheckPlanDTO checkPlanDTO);
|
||||
|
||||
|
||||
public DvCheckPlan selectDvCheckPlanByMachineryCodeAndType(String machineryCode, String planType);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckRecordLine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface IDvCheckRecordLineService
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
public DvCheckRecordLine selectDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 设备点检记录行集合
|
||||
*/
|
||||
public List<DvCheckRecordLine> selectDvCheckRecordLineList(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录行
|
||||
*
|
||||
* @param lineIds 需要删除的设备点检记录行主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineIds(Long[] lineIds);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行信息
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 根据记录ID删除设备点检记录行信息
|
||||
*
|
||||
* @param recordId 记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByRecordId(Long recordId);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface IDvCheckRecordService
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
public DvCheckRecord selectDvCheckRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 设备点检记录集合
|
||||
*/
|
||||
public List<DvCheckRecord> selectDvCheckRecordList(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录
|
||||
*
|
||||
* @param recordIds 需要删除的设备点检记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录信息
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordId(Long recordId);
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvCheckSubject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检项目Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-18
|
||||
*/
|
||||
public interface IDvCheckSubjectService
|
||||
{
|
||||
/**
|
||||
* 查询点检项目
|
||||
*
|
||||
* @param recordId 点检项目主键
|
||||
* @return 点检项目
|
||||
*/
|
||||
public DvCheckSubject selectDvCheckSubjectByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询点检项目列表
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 点检项目集合
|
||||
*/
|
||||
public List<DvCheckSubject> selectDvCheckSubjectList(DvCheckSubject dvCheckSubject);
|
||||
|
||||
|
||||
/**
|
||||
* 检查当前计划下,点检项目是否唯一
|
||||
* @param dvCheckSubject
|
||||
* @return
|
||||
*/
|
||||
public String checkSubjectUnique(DvCheckSubject dvCheckSubject);
|
||||
|
||||
/**
|
||||
* 新增点检项目
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckSubject(DvCheckSubject dvCheckSubject);
|
||||
|
||||
/**
|
||||
* 修改点检项目
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckSubject(DvCheckSubject dvCheckSubject);
|
||||
|
||||
/**
|
||||
* 批量删除点检项目
|
||||
*
|
||||
* @param recordIds 需要删除的点检项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckSubjectByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除点检项目信息
|
||||
*
|
||||
* @param recordId 点检项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckSubjectByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 根据计划ID删除对应的计划项目
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
public int deleteByPlanId(Long planId);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.mes.dv.domain.DvMachinery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
public interface IDvMachineryService
|
||||
{
|
||||
/**
|
||||
* 查询设备
|
||||
*
|
||||
* @param machineryId 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
public DvMachinery selectDvMachineryByMachineryId(Long machineryId);
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 设备集合
|
||||
*/
|
||||
public List<DvMachinery> selectDvMachineryList(DvMachinery dvMachinery);
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public AjaxResult insertDvMachinery(DvMachinery dvMachinery);
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 结果
|
||||
*/
|
||||
public AjaxResult updateDvMachinery(DvMachinery dvMachinery);
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*
|
||||
* @param machineryIds 需要删除的设备主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryByMachineryIds(Long[] machineryIds);
|
||||
|
||||
/**
|
||||
* 删除设备信息
|
||||
*
|
||||
* @param machineryId 设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryByMachineryId(Long machineryId);
|
||||
|
||||
/**
|
||||
* 依据上传的文件,批量导入或更新设备信息
|
||||
*
|
||||
* @param machineryList 设备信息列表
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
* @param operName 操作用户
|
||||
* @return 结果
|
||||
*/
|
||||
public String importMachinery(List<DvMachinery> machineryList, Boolean isUpdateSupport, String operName);
|
||||
|
||||
/**
|
||||
* 查询编码是否唯一
|
||||
* @param dvMachinery
|
||||
* @return
|
||||
*/
|
||||
String checkRecptCodeUnique(DvMachinery dvMachinery);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvMachineryType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备类型Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
public interface IDvMachineryTypeService
|
||||
{
|
||||
/**
|
||||
* 查询设备类型
|
||||
*
|
||||
* @param machineryTypeId 设备类型主键
|
||||
* @return 设备类型
|
||||
*/
|
||||
public DvMachineryType selectDvMachineryTypeByMachineryTypeId(Long machineryTypeId);
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 设备类型集合
|
||||
*/
|
||||
public List<DvMachineryType> selectDvMachineryTypeList(DvMachineryType dvMachineryType);
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvMachineryType(DvMachineryType dvMachineryType);
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvMachineryType(DvMachineryType dvMachineryType);
|
||||
|
||||
/**
|
||||
* 批量删除设备类型
|
||||
*
|
||||
* @param machineryTypeIds 需要删除的设备类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryTypeByMachineryTypeIds(Long[] machineryTypeIds);
|
||||
|
||||
/**
|
||||
* 删除设备类型信息
|
||||
*
|
||||
* @param machineryTypeId 设备类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMachineryTypeByMachineryTypeId(Long machineryTypeId);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvMaintenRecordLine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录行Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface IDvMaintenRecordLineService
|
||||
{
|
||||
/**
|
||||
* 查询设备保养记录行
|
||||
*
|
||||
* @param lineId 设备保养记录行主键
|
||||
* @return 设备保养记录行
|
||||
*/
|
||||
public DvMaintenRecordLine selectDvMaintenRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备保养记录行列表
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 设备保养记录行集合
|
||||
*/
|
||||
public List<DvMaintenRecordLine> selectDvMaintenRecordLineList(DvMaintenRecordLine dvMaintenRecordLine);
|
||||
|
||||
/**
|
||||
* 新增设备保养记录行
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
|
||||
|
||||
/**
|
||||
* 修改设备保养记录行
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine);
|
||||
|
||||
/**
|
||||
* 批量删除设备保养记录行
|
||||
*
|
||||
* @param lineIds 需要删除的设备保养记录行主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordLineByLineIds(Long[] lineIds);
|
||||
|
||||
/**
|
||||
* 删除设备保养记录行信息
|
||||
*
|
||||
* @param lineId 设备保养记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordLineByLineId(Long lineId);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvMaintenRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface IDvMaintenRecordService
|
||||
{
|
||||
/**
|
||||
* 查询设备保养记录
|
||||
*
|
||||
* @param recordId 设备保养记录主键
|
||||
* @return 设备保养记录
|
||||
*/
|
||||
public DvMaintenRecord selectDvMaintenRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询设备保养记录列表
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 设备保养记录集合
|
||||
*/
|
||||
public List<DvMaintenRecord> selectDvMaintenRecordList(DvMaintenRecord dvMaintenRecord);
|
||||
|
||||
/**
|
||||
* 新增设备保养记录
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
|
||||
|
||||
/**
|
||||
* 修改设备保养记录
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvMaintenRecord(DvMaintenRecord dvMaintenRecord);
|
||||
|
||||
/**
|
||||
* 批量删除设备保养记录
|
||||
*
|
||||
* @param recordIds 需要删除的设备保养记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除设备保养记录信息
|
||||
*
|
||||
* @param recordId 设备保养记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvMaintenRecordByRecordId(Long recordId);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvRepairLine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单行Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
public interface IDvRepairLineService
|
||||
{
|
||||
/**
|
||||
* 查询设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
public DvRepairLine selectDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 设备维修单行集合
|
||||
*/
|
||||
public List<DvRepairLine> selectDvRepairLineList(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单行
|
||||
*
|
||||
* @param lineIds 需要删除的设备维修单行主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineIds(Long[] lineIds);
|
||||
|
||||
/**
|
||||
* 删除设备维修单行信息
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 根据维修单头删除所有行信息
|
||||
* @param repairId
|
||||
* @return
|
||||
*/
|
||||
public int deleteByRepairId(Long repairId);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.mes.dv.domain.DvRepair;
|
||||
import com.gear.mes.dv.domain.dto.DvRepairDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-06
|
||||
*/
|
||||
public interface IDvRepairService
|
||||
{
|
||||
/**
|
||||
* 查询设备维修单
|
||||
*
|
||||
* @param repairId 设备维修单主键
|
||||
* @return 设备维修单
|
||||
*/
|
||||
public DvRepair selectDvRepairByRepairId(Long repairId);
|
||||
|
||||
/**
|
||||
* 查询设备维修单列表
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 设备维修单集合
|
||||
*/
|
||||
public List<DvRepair> selectDvRepairList(DvRepair dvRepair);
|
||||
|
||||
/**
|
||||
* 检测维修单编号是否唯一
|
||||
* @param dvRepair
|
||||
* @return
|
||||
*/
|
||||
public String checkCodeUnique(DvRepair dvRepair);
|
||||
|
||||
/**
|
||||
* 新增设备维修单
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvRepair(DvRepair dvRepair);
|
||||
|
||||
/**
|
||||
* 修改设备维修单
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvRepair(DvRepair dvRepair);
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单
|
||||
*
|
||||
* @param repairIds 需要删除的设备维修单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairByRepairIds(Long[] repairIds);
|
||||
|
||||
/**
|
||||
* 删除设备维修单信息
|
||||
*
|
||||
* @param repairId 设备维修单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairByRepairId(Long repairId);
|
||||
|
||||
/**
|
||||
* 根据设备编码查询设备维修单列表
|
||||
* @param repairDTO
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getRepairList(DvRepairDTO repairDTO);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.mes.dv.domain.bo.DvSpecialEquipmentBo;
|
||||
import com.gear.mes.dv.domain.vo.DvSpecialEquipmentVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特种设备(包含锅炉、压力管道、电梯等特种设备信息)Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-21
|
||||
*/
|
||||
public interface IDvSpecialEquipmentService {
|
||||
|
||||
/**
|
||||
* 查询特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
DvSpecialEquipmentVo queryById(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 查询特种设备(包含锅炉、压力管道、电梯等特种设备信息)列表
|
||||
*/
|
||||
TableDataInfo<DvSpecialEquipmentVo> queryPageList(DvSpecialEquipmentBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询特种设备(包含锅炉、压力管道、电梯等特种设备信息)列表
|
||||
*/
|
||||
List<DvSpecialEquipmentVo> queryList(DvSpecialEquipmentBo bo);
|
||||
|
||||
/**
|
||||
* 新增特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
Boolean insertByBo(DvSpecialEquipmentBo bo);
|
||||
|
||||
/**
|
||||
* 修改特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
Boolean updateByBo(DvSpecialEquipmentBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除特种设备(包含锅炉、压力管道、电梯等特种设备信息)信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.gear.mes.dv.service;
|
||||
|
||||
import com.gear.mes.dv.domain.DvSubject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检保养项目Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
public interface IDvSubjectService
|
||||
{
|
||||
/**
|
||||
* 查询设备点检保养项目
|
||||
*
|
||||
* @param subjectId 设备点检保养项目主键
|
||||
* @return 设备点检保养项目
|
||||
*/
|
||||
public DvSubject selectDvSubjectBySubjectId(Long subjectId);
|
||||
|
||||
/**
|
||||
* 查询设备点检保养项目列表
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 设备点检保养项目集合
|
||||
*/
|
||||
public List<DvSubject> selectDvSubjectList(DvSubject dvSubject);
|
||||
|
||||
/**
|
||||
* 检查项目编码是否重复
|
||||
* @param dvSubject
|
||||
* @return
|
||||
*/
|
||||
public String checkSubjectCodeUnique(DvSubject dvSubject);
|
||||
|
||||
/**
|
||||
* 新增设备点检保养项目
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvSubject(DvSubject dvSubject);
|
||||
|
||||
/**
|
||||
* 修改设备点检保养项目
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvSubject(DvSubject dvSubject);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检保养项目
|
||||
*
|
||||
* @param subjectIds 需要删除的设备点检保养项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvSubjectBySubjectIds(Long[] subjectIds);
|
||||
|
||||
/**
|
||||
* 删除设备点检保养项目信息
|
||||
*
|
||||
* @param subjectId 设备点检保养项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvSubjectBySubjectId(Long subjectId);
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvCheckMachinery;
|
||||
import com.gear.mes.dv.mapper.DvCheckMachineryMapper;
|
||||
import com.gear.mes.dv.service.IDvCheckMachineryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检设备Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-17
|
||||
*/
|
||||
@Service
|
||||
public class DvCheckMachineryServiceImpl implements IDvCheckMachineryService
|
||||
{
|
||||
@Autowired
|
||||
private DvCheckMachineryMapper dvCheckMachineryMapper;
|
||||
|
||||
/**
|
||||
* 查询点检设备
|
||||
*
|
||||
* @param recordId 点检设备主键
|
||||
* @return 点检设备
|
||||
*/
|
||||
@Override
|
||||
public DvCheckMachinery selectDvCheckMachineryByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckMachineryMapper.selectDvCheckMachineryByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询点检设备列表
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 点检设备
|
||||
*/
|
||||
@Override
|
||||
public List<DvCheckMachinery> selectDvCheckMachineryList(DvCheckMachinery dvCheckMachinery)
|
||||
{
|
||||
return dvCheckMachineryMapper.selectDvCheckMachineryList(dvCheckMachinery);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkMachineryUnique(DvCheckMachinery dvCheckMachinery) {
|
||||
DvCheckMachinery machinery = dvCheckMachineryMapper.checkMachineryUnique(dvCheckMachinery);
|
||||
Long recordId = dvCheckMachinery.getRecordId()==null?-1L:dvCheckMachinery.getRecordId();
|
||||
if(StringUtils.isNotNull(machinery) && machinery.getRecordId().longValue() != recordId.longValue()){
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点检设备
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvCheckMachinery(DvCheckMachinery dvCheckMachinery)
|
||||
{
|
||||
dvCheckMachinery.setCreateTime(DateUtils.getNowDate());
|
||||
return dvCheckMachineryMapper.insertDvCheckMachinery(dvCheckMachinery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点检设备
|
||||
*
|
||||
* @param dvCheckMachinery 点检设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvCheckMachinery(DvCheckMachinery dvCheckMachinery)
|
||||
{
|
||||
dvCheckMachinery.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvCheckMachineryMapper.updateDvCheckMachinery(dvCheckMachinery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除点检设备
|
||||
*
|
||||
* @param recordIds 需要删除的点检设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckMachineryByRecordIds(Long[] recordIds)
|
||||
{
|
||||
return dvCheckMachineryMapper.deleteDvCheckMachineryByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点检设备信息
|
||||
*
|
||||
* @param recordId 点检设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckMachineryByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckMachineryMapper.deleteDvCheckMachineryByRecordId(recordId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByPlanId(Long planId) {
|
||||
return dvCheckMachineryMapper.deleteByPlanId(planId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getPlanId(String machineryCode) {
|
||||
return dvCheckMachineryMapper.getPlanId(machineryCode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvCheckPlan;
|
||||
import com.gear.mes.dv.domain.dto.DvCheckPlanDTO;
|
||||
import com.gear.mes.dv.mapper.DvCheckPlanMapper;
|
||||
import com.gear.mes.dv.service.IDvCheckMachineryService;
|
||||
import com.gear.mes.dv.service.IDvCheckPlanService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检计划头Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
@Service
|
||||
public class DvCheckPlanServiceImpl implements IDvCheckPlanService
|
||||
{
|
||||
@Autowired
|
||||
private DvCheckPlanMapper dvCheckPlanMapper;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckMachineryService dvCheckMachineryService;
|
||||
|
||||
/**
|
||||
* 查询设备点检计划头
|
||||
*
|
||||
* @param planId 设备点检计划头主键
|
||||
* @return 设备点检计划头
|
||||
*/
|
||||
@Override
|
||||
public DvCheckPlan selectDvCheckPlanByPlanId(Long planId)
|
||||
{
|
||||
return dvCheckPlanMapper.selectDvCheckPlanByPlanId(planId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备点检计划头列表
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 设备点检计划头
|
||||
*/
|
||||
@Override
|
||||
public List<DvCheckPlan> selectDvCheckPlanList(DvCheckPlan dvCheckPlan)
|
||||
{
|
||||
return dvCheckPlanMapper.selectDvCheckPlanList(dvCheckPlan);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkPlanCodeUnique(DvCheckPlan dvCheckPlan) {
|
||||
DvCheckPlan plan = dvCheckPlanMapper.checkPlanCodeUnique(dvCheckPlan);
|
||||
Long planId = dvCheckPlan.getPlanId()==null?-1L:dvCheckPlan.getPlanId();
|
||||
if(StringUtils.isNotNull(plan) && plan.getPlanId().longValue()!=planId.longValue()){
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检计划头
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvCheckPlan(DvCheckPlan dvCheckPlan)
|
||||
{
|
||||
dvCheckPlan.setCreateTime(DateUtils.getNowDate());
|
||||
return dvCheckPlanMapper.insertDvCheckPlan(dvCheckPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检计划头
|
||||
*
|
||||
* @param dvCheckPlan 设备点检计划头
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvCheckPlan(DvCheckPlan dvCheckPlan)
|
||||
{
|
||||
dvCheckPlan.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvCheckPlanMapper.updateDvCheckPlan(dvCheckPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备点检计划头
|
||||
*
|
||||
* @param planIds 需要删除的设备点检计划头主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckPlanByPlanIds(Long[] planIds)
|
||||
{
|
||||
return dvCheckPlanMapper.deleteDvCheckPlanByPlanIds(planIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检计划头信息
|
||||
*
|
||||
* @param planId 设备点检计划头主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckPlanByPlanId(Long planId)
|
||||
{
|
||||
return dvCheckPlanMapper.deleteDvCheckPlanByPlanId(planId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据设备编码和计划类型查询设备点检计划头列表
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getCheckPlan(DvCheckPlanDTO checkPlanDTO) {
|
||||
// 根据设备编码获取相关计划id
|
||||
List<Long> planIds = dvCheckMachineryService.getPlanId(checkPlanDTO.getMachineryCode());
|
||||
if (planIds != null && planIds.size() > 0) {
|
||||
// 根据设备编码和计划类型获取相关设备点检计划头列表
|
||||
List<DvCheckPlan> list = dvCheckPlanMapper.getByIds(planIds, checkPlanDTO.getPlanType());
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DvCheckPlan selectDvCheckPlanByMachineryCodeAndType(String machineryCode, String planType) {
|
||||
return dvCheckPlanMapper.selectDvCheckPlanByMachineryCodeAndType(machineryCode, planType);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.gear.mes.dv.mapper.DvCheckRecordLineMapper;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Service
|
||||
public class DvCheckRecordLineServiceImpl implements IDvCheckRecordLineService
|
||||
{
|
||||
@Autowired
|
||||
private DvCheckRecordLineMapper dvCheckRecordLineMapper;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
@Override
|
||||
public DvCheckRecordLine selectDvCheckRecordLineByLineId(Long lineId)
|
||||
{
|
||||
return dvCheckRecordLineMapper.selectDvCheckRecordLineByLineId(lineId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
@Override
|
||||
public List<DvCheckRecordLine> selectDvCheckRecordLineList(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
return dvCheckRecordLineMapper.selectDvCheckRecordLineList(dvCheckRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
dvCheckRecordLine.setCreateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordLineMapper.insertDvCheckRecordLine(dvCheckRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
dvCheckRecordLine.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordLineMapper.updateDvCheckRecordLine(dvCheckRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录行
|
||||
*
|
||||
* @param lineIds 需要删除的设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordLineByLineIds(Long[] lineIds)
|
||||
{
|
||||
return dvCheckRecordLineMapper.deleteDvCheckRecordLineByLineIds(lineIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行信息
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordLineByLineId(Long lineId)
|
||||
{
|
||||
return dvCheckRecordLineMapper.deleteDvCheckRecordLineByLineId(lineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteDvCheckRecordLineByRecordId(Long recordId) {
|
||||
return dvCheckRecordLineMapper.deleteDvCheckRecordLineByRecordId(recordId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.mes.dv.domain.DvCheckRecord;
|
||||
import com.gear.mes.dv.mapper.DvCheckRecordMapper;
|
||||
import com.gear.mes.dv.service.IDvCheckRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检记录Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Service
|
||||
public class DvCheckRecordServiceImpl implements IDvCheckRecordService
|
||||
{
|
||||
@Autowired
|
||||
private DvCheckRecordMapper dvCheckRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
@Override
|
||||
public DvCheckRecord selectDvCheckRecordByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckRecordMapper.selectDvCheckRecordByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
@Override
|
||||
public List<DvCheckRecord> selectDvCheckRecordList(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
return dvCheckRecordMapper.selectDvCheckRecordList(dvCheckRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvCheckRecord(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
dvCheckRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordMapper.insertDvCheckRecord(dvCheckRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvCheckRecord(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
dvCheckRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordMapper.updateDvCheckRecord(dvCheckRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录
|
||||
*
|
||||
* @param recordIds 需要删除的设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordByRecordIds(Long[] recordIds)
|
||||
{
|
||||
return dvCheckRecordMapper.deleteDvCheckRecordByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录信息
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckRecordMapper.deleteDvCheckRecordByRecordId(recordId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvCheckSubject;
|
||||
import com.gear.mes.dv.mapper.DvCheckSubjectMapper;
|
||||
import com.gear.mes.dv.service.IDvCheckSubjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点检项目Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-18
|
||||
*/
|
||||
@Service
|
||||
public class DvCheckSubjectServiceImpl implements IDvCheckSubjectService
|
||||
{
|
||||
@Autowired
|
||||
private DvCheckSubjectMapper dvCheckSubjectMapper;
|
||||
|
||||
/**
|
||||
* 查询点检项目
|
||||
*
|
||||
* @param recordId 点检项目主键
|
||||
* @return 点检项目
|
||||
*/
|
||||
@Override
|
||||
public DvCheckSubject selectDvCheckSubjectByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckSubjectMapper.selectDvCheckSubjectByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询点检项目列表
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 点检项目
|
||||
*/
|
||||
@Override
|
||||
public List<DvCheckSubject> selectDvCheckSubjectList(DvCheckSubject dvCheckSubject)
|
||||
{
|
||||
return dvCheckSubjectMapper.selectDvCheckSubjectList(dvCheckSubject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkSubjectUnique(DvCheckSubject dvCheckSubject) {
|
||||
DvCheckSubject subject = dvCheckSubjectMapper.checkSubjectUnique(dvCheckSubject);
|
||||
Long recordId = dvCheckSubject.getRecordId()==null?-1L:dvCheckSubject.getRecordId();
|
||||
if(StringUtils.isNotNull(subject) && subject.getRecordId().longValue() != recordId.longValue()){
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点检项目
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvCheckSubject(DvCheckSubject dvCheckSubject)
|
||||
{
|
||||
dvCheckSubject.setCreateTime(DateUtils.getNowDate());
|
||||
return dvCheckSubjectMapper.insertDvCheckSubject(dvCheckSubject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点检项目
|
||||
*
|
||||
* @param dvCheckSubject 点检项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvCheckSubject(DvCheckSubject dvCheckSubject)
|
||||
{
|
||||
dvCheckSubject.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvCheckSubjectMapper.updateDvCheckSubject(dvCheckSubject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除点检项目
|
||||
*
|
||||
* @param recordIds 需要删除的点检项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckSubjectByRecordIds(Long[] recordIds)
|
||||
{
|
||||
return dvCheckSubjectMapper.deleteDvCheckSubjectByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点检项目信息
|
||||
*
|
||||
* @param recordId 点检项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckSubjectByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckSubjectMapper.deleteDvCheckSubjectByRecordId(recordId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByPlanId(Long planId) {
|
||||
return dvCheckSubjectMapper.deleteByPlanId(planId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvMachinery;
|
||||
import com.gear.mes.dv.mapper.DvMachineryMapper;
|
||||
import com.gear.mes.dv.service.IDvMachineryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
@Service
|
||||
public class DvMachineryServiceImpl implements IDvMachineryService
|
||||
{
|
||||
@Autowired
|
||||
private DvMachineryMapper dvMachineryMapper;
|
||||
|
||||
|
||||
// @Autowired
|
||||
// private WmBarCodeUtil wmBarCodeUtil;
|
||||
|
||||
/**
|
||||
* 查询设备
|
||||
*
|
||||
* @param machineryId 设备主键
|
||||
* @return 设备
|
||||
*/
|
||||
@Override
|
||||
public DvMachinery selectDvMachineryByMachineryId(Long machineryId)
|
||||
{
|
||||
return dvMachineryMapper.selectDvMachineryByMachineryId(machineryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 设备
|
||||
*/
|
||||
@Override
|
||||
public List<DvMachinery> selectDvMachineryList(DvMachinery dvMachinery)
|
||||
{
|
||||
return dvMachineryMapper.selectDvMachineryList(dvMachinery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult insertDvMachinery(DvMachinery dvMachinery)
|
||||
{
|
||||
List<DvMachinery> existing = dvMachineryMapper.selectByMachineryCode(dvMachinery.getMachineryCode());
|
||||
if (existing != null && existing.size() > 0) {
|
||||
return AjaxResult.error("设备编码重复");
|
||||
}
|
||||
dvMachinery.setCreateTime(DateUtils.getNowDate());
|
||||
dvMachineryMapper.insertDvMachinery(dvMachinery);
|
||||
// wmBarCodeUtil.generateBarCode(UserConstants.BARCODE_TYPE_MACHINERY,dvMachinery.getMachineryId(),dvMachinery.getMachineryCode(),dvMachinery.getMachineryName());
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备
|
||||
*
|
||||
* @param dvMachinery 设备
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult updateDvMachinery(DvMachinery dvMachinery)
|
||||
{
|
||||
dvMachinery.setUpdateTime(DateUtils.getNowDate());
|
||||
return AjaxResult.success(dvMachineryMapper.updateDvMachinery(dvMachinery));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备
|
||||
*
|
||||
* @param machineryIds 需要删除的设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMachineryByMachineryIds(Long[] machineryIds)
|
||||
{
|
||||
return dvMachineryMapper.deleteDvMachineryByMachineryIds(machineryIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备信息
|
||||
*
|
||||
* @param machineryId 设备主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMachineryByMachineryId(Long machineryId)
|
||||
{
|
||||
return dvMachineryMapper.deleteDvMachineryByMachineryId(machineryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 依据上传的文件更新或插入设备信息
|
||||
*/
|
||||
@Override
|
||||
public String importMachinery(List<DvMachinery> machineryList, Boolean isUpdateSupport, String operName) {
|
||||
if (machineryList == null || machineryList.isEmpty()) {
|
||||
return "导入数据为空";
|
||||
}
|
||||
int successCount = 0;
|
||||
int failureCount = 0;
|
||||
for (DvMachinery machinery : machineryList) {
|
||||
// 判断必填项是否为空
|
||||
if (ObjectUtil.isEmpty(machinery.getMachineryCode())) {
|
||||
failureCount++;
|
||||
continue;
|
||||
}
|
||||
if (ObjectUtil.isEmpty(machinery.getMachineryName())) {
|
||||
failureCount++;
|
||||
continue;
|
||||
}
|
||||
if (ObjectUtil.isEmpty(machinery.getMachineryTypeId())) {
|
||||
failureCount++;
|
||||
continue;
|
||||
}
|
||||
if (ObjectUtil.isEmpty(machinery.getWorkshopId())) {
|
||||
failureCount++;
|
||||
continue;
|
||||
}
|
||||
if (ObjectUtil.isEmpty(machinery.getStatus())) {
|
||||
failureCount++;
|
||||
continue;
|
||||
}
|
||||
// 去除空格
|
||||
String machineryCode = machinery.getMachineryCode().trim();
|
||||
machinery.setCreateTime(new Date());
|
||||
List<DvMachinery> existing = dvMachineryMapper.selectByMachineryCode(machineryCode);
|
||||
if (existing != null && existing.size() > 0) {
|
||||
if (isUpdateSupport) {
|
||||
// 更新数据
|
||||
machinery.setMachineryId(existing.get(0).getMachineryId()); // 确保使用现有 ID 进行更新
|
||||
dvMachineryMapper.updateDvMachinery(machinery);
|
||||
successCount++;
|
||||
} else {
|
||||
// 不更新数据
|
||||
failureCount++;
|
||||
}
|
||||
} else {
|
||||
// 新增数据
|
||||
dvMachineryMapper.insertDvMachinery(machinery);
|
||||
successCount++;
|
||||
}
|
||||
}
|
||||
return String.format("操作用户:%s,导入完成,成功 %d 条,失败 %d 条。", operName, successCount, failureCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkRecptCodeUnique(DvMachinery dvMachinery) {
|
||||
DvMachinery machinery = dvMachineryMapper.checkRecptCodeUnique(dvMachinery);
|
||||
Long machineryId = dvMachinery.getMachineryId() == null ? -1L : dvMachinery.getMachineryId();
|
||||
if (StringUtils.isNotNull(machinery) && machinery.getMachineryId().longValue() != machineryId.longValue()) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvMachineryType;
|
||||
import com.gear.mes.dv.mapper.DvMachineryTypeMapper;
|
||||
import com.gear.mes.dv.service.IDvMachineryTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备类型Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
@Service
|
||||
public class DvMachineryTypeServiceImpl implements IDvMachineryTypeService
|
||||
{
|
||||
@Autowired
|
||||
private DvMachineryTypeMapper dvMachineryTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询设备类型
|
||||
*
|
||||
* @param machineryTypeId 设备类型主键
|
||||
* @return 设备类型
|
||||
*/
|
||||
@Override
|
||||
public DvMachineryType selectDvMachineryTypeByMachineryTypeId(Long machineryTypeId)
|
||||
{
|
||||
return dvMachineryTypeMapper.selectDvMachineryTypeByMachineryTypeId(machineryTypeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 设备类型
|
||||
*/
|
||||
@Override
|
||||
public List<DvMachineryType> selectDvMachineryTypeList(DvMachineryType dvMachineryType)
|
||||
{
|
||||
return dvMachineryTypeMapper.selectDvMachineryTypeList(dvMachineryType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvMachineryType(DvMachineryType dvMachineryType)
|
||||
{
|
||||
if(dvMachineryType.getParentTypeId()!= null){
|
||||
DvMachineryType parent = dvMachineryTypeMapper.selectDvMachineryTypeByMachineryTypeId(dvMachineryType.getParentTypeId());
|
||||
if(StringUtils.isNotNull(parent)){
|
||||
dvMachineryType.setAncestors(parent.getAncestors()+","+parent.getMachineryTypeId());
|
||||
}
|
||||
}
|
||||
dvMachineryType.setCreateTime(DateUtils.getNowDate());
|
||||
return dvMachineryTypeMapper.insertDvMachineryType(dvMachineryType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*
|
||||
* @param dvMachineryType 设备类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvMachineryType(DvMachineryType dvMachineryType)
|
||||
{
|
||||
dvMachineryType.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvMachineryTypeMapper.updateDvMachineryType(dvMachineryType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备类型
|
||||
*
|
||||
* @param machineryTypeIds 需要删除的设备类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMachineryTypeByMachineryTypeIds(Long[] machineryTypeIds)
|
||||
{
|
||||
return dvMachineryTypeMapper.deleteDvMachineryTypeByMachineryTypeIds(machineryTypeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备类型信息
|
||||
*
|
||||
* @param machineryTypeId 设备类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMachineryTypeByMachineryTypeId(Long machineryTypeId)
|
||||
{
|
||||
return dvMachineryTypeMapper.deleteDvMachineryTypeByMachineryTypeId(machineryTypeId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.mes.dv.domain.DvMaintenRecordLine;
|
||||
import com.gear.mes.dv.mapper.DvMaintenRecordLineMapper;
|
||||
import com.gear.mes.dv.service.IDvMaintenRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录行Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Service
|
||||
public class DvMaintenRecordLineServiceImpl implements IDvMaintenRecordLineService
|
||||
{
|
||||
@Autowired
|
||||
private DvMaintenRecordLineMapper dvMaintenRecordLineMapper;
|
||||
|
||||
/**
|
||||
* 查询设备保养记录行
|
||||
*
|
||||
* @param lineId 设备保养记录行主键
|
||||
* @return 设备保养记录行
|
||||
*/
|
||||
@Override
|
||||
public DvMaintenRecordLine selectDvMaintenRecordLineByLineId(Long lineId)
|
||||
{
|
||||
return dvMaintenRecordLineMapper.selectDvMaintenRecordLineByLineId(lineId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备保养记录行列表
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 设备保养记录行
|
||||
*/
|
||||
@Override
|
||||
public List<DvMaintenRecordLine> selectDvMaintenRecordLineList(DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
return dvMaintenRecordLineMapper.selectDvMaintenRecordLineList(dvMaintenRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养记录行
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
dvMaintenRecordLine.setCreateTime(DateUtils.getNowDate());
|
||||
return dvMaintenRecordLineMapper.insertDvMaintenRecordLine(dvMaintenRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养记录行
|
||||
*
|
||||
* @param dvMaintenRecordLine 设备保养记录行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvMaintenRecordLine(DvMaintenRecordLine dvMaintenRecordLine)
|
||||
{
|
||||
dvMaintenRecordLine.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvMaintenRecordLineMapper.updateDvMaintenRecordLine(dvMaintenRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备保养记录行
|
||||
*
|
||||
* @param lineIds 需要删除的设备保养记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMaintenRecordLineByLineIds(Long[] lineIds)
|
||||
{
|
||||
return dvMaintenRecordLineMapper.deleteDvMaintenRecordLineByLineIds(lineIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养记录行信息
|
||||
*
|
||||
* @param lineId 设备保养记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMaintenRecordLineByLineId(Long lineId)
|
||||
{
|
||||
return dvMaintenRecordLineMapper.deleteDvMaintenRecordLineByLineId(lineId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.mes.dv.domain.DvMaintenRecord;
|
||||
import com.gear.mes.dv.mapper.DvMaintenRecordMapper;
|
||||
import com.gear.mes.dv.service.IDvMaintenRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养记录Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Service
|
||||
public class DvMaintenRecordServiceImpl implements IDvMaintenRecordService
|
||||
{
|
||||
@Autowired
|
||||
private DvMaintenRecordMapper dvMaintenRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询设备保养记录
|
||||
*
|
||||
* @param recordId 设备保养记录主键
|
||||
* @return 设备保养记录
|
||||
*/
|
||||
@Override
|
||||
public DvMaintenRecord selectDvMaintenRecordByRecordId(Long recordId)
|
||||
{
|
||||
return dvMaintenRecordMapper.selectDvMaintenRecordByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备保养记录列表
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 设备保养记录
|
||||
*/
|
||||
@Override
|
||||
public List<DvMaintenRecord> selectDvMaintenRecordList(DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
return dvMaintenRecordMapper.selectDvMaintenRecordList(dvMaintenRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养记录
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvMaintenRecord(DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
dvMaintenRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return dvMaintenRecordMapper.insertDvMaintenRecord(dvMaintenRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养记录
|
||||
*
|
||||
* @param dvMaintenRecord 设备保养记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvMaintenRecord(DvMaintenRecord dvMaintenRecord)
|
||||
{
|
||||
dvMaintenRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvMaintenRecordMapper.updateDvMaintenRecord(dvMaintenRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备保养记录
|
||||
*
|
||||
* @param recordIds 需要删除的设备保养记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMaintenRecordByRecordIds(Long[] recordIds)
|
||||
{
|
||||
return dvMaintenRecordMapper.deleteDvMaintenRecordByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养记录信息
|
||||
*
|
||||
* @param recordId 设备保养记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvMaintenRecordByRecordId(Long recordId)
|
||||
{
|
||||
return dvMaintenRecordMapper.deleteDvMaintenRecordByRecordId(recordId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.mes.dv.domain.DvRepairLine;
|
||||
import com.gear.mes.dv.mapper.DvRepairLineMapper;
|
||||
import com.gear.mes.dv.service.IDvRepairLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单行Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
@Service
|
||||
public class DvRepairLineServiceImpl implements IDvRepairLineService
|
||||
{
|
||||
@Autowired
|
||||
private DvRepairLineMapper dvRepairLineMapper;
|
||||
|
||||
/**
|
||||
* 查询设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
@Override
|
||||
public DvRepairLine selectDvRepairLineByLineId(Long lineId)
|
||||
{
|
||||
return dvRepairLineMapper.selectDvRepairLineByLineId(lineId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
@Override
|
||||
public List<DvRepairLine> selectDvRepairLineList(DvRepairLine dvRepairLine)
|
||||
{
|
||||
return dvRepairLineMapper.selectDvRepairLineList(dvRepairLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvRepairLine(DvRepairLine dvRepairLine)
|
||||
{
|
||||
dvRepairLine.setCreateTime(DateUtils.getNowDate());
|
||||
return dvRepairLineMapper.insertDvRepairLine(dvRepairLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvRepairLine(DvRepairLine dvRepairLine)
|
||||
{
|
||||
dvRepairLine.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvRepairLineMapper.updateDvRepairLine(dvRepairLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单行
|
||||
*
|
||||
* @param lineIds 需要删除的设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvRepairLineByLineIds(Long[] lineIds)
|
||||
{
|
||||
return dvRepairLineMapper.deleteDvRepairLineByLineIds(lineIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单行信息
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvRepairLineByLineId(Long lineId)
|
||||
{
|
||||
return dvRepairLineMapper.deleteDvRepairLineByLineId(lineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByRepairId(Long repairId) {
|
||||
return dvRepairLineMapper.deleteByRepairId(repairId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.core.domain.AjaxResult;
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvRepair;
|
||||
import com.gear.mes.dv.domain.dto.DvRepairDTO;
|
||||
import com.gear.mes.dv.mapper.DvRepairMapper;
|
||||
import com.gear.mes.dv.service.IDvRepairService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备维修单Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-06
|
||||
*/
|
||||
@Service
|
||||
public class DvRepairServiceImpl implements IDvRepairService
|
||||
{
|
||||
@Autowired
|
||||
private DvRepairMapper dvRepairMapper;
|
||||
|
||||
/**
|
||||
* 查询设备维修单
|
||||
*
|
||||
* @param repairId 设备维修单主键
|
||||
* @return 设备维修单
|
||||
*/
|
||||
@Override
|
||||
public DvRepair selectDvRepairByRepairId(Long repairId)
|
||||
{
|
||||
return dvRepairMapper.selectDvRepairByRepairId(repairId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备维修单列表
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 设备维修单
|
||||
*/
|
||||
@Override
|
||||
public List<DvRepair> selectDvRepairList(DvRepair dvRepair)
|
||||
{
|
||||
return dvRepairMapper.selectDvRepairList(dvRepair);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkCodeUnique(DvRepair dvRepair) {
|
||||
DvRepair rp = dvRepairMapper.checkCodeUnique(dvRepair);
|
||||
Long repairId = dvRepair.getRepairId() ==null?-1L: dvRepair.getRepairId();
|
||||
if(StringUtils.isNotNull(rp) && repairId.longValue() != rp.getRepairId().longValue()){
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvRepair(DvRepair dvRepair)
|
||||
{
|
||||
dvRepair.setCreateTime(DateUtils.getNowDate());
|
||||
return dvRepairMapper.insertDvRepair(dvRepair);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单
|
||||
*
|
||||
* @param dvRepair 设备维修单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvRepair(DvRepair dvRepair)
|
||||
{
|
||||
dvRepair.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvRepairMapper.updateDvRepair(dvRepair);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单
|
||||
*
|
||||
* @param repairIds 需要删除的设备维修单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvRepairByRepairIds(Long[] repairIds)
|
||||
{
|
||||
return dvRepairMapper.deleteDvRepairByRepairIds(repairIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单信息
|
||||
*
|
||||
* @param repairId 设备维修单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvRepairByRepairId(Long repairId)
|
||||
{
|
||||
return dvRepairMapper.deleteDvRepairByRepairId(repairId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据设备编码查询设备维修单列表
|
||||
* @param repairDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getRepairList(DvRepairDTO repairDTO) {
|
||||
List<DvRepair> list = dvRepairMapper.getRepairList(repairDTO.getMachineryCode());
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.gear.common.core.domain.PageQuery;
|
||||
import com.gear.common.core.page.TableDataInfo;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvSpecialEquipment;
|
||||
import com.gear.mes.dv.domain.bo.DvSpecialEquipmentBo;
|
||||
import com.gear.mes.dv.domain.vo.DvSpecialEquipmentVo;
|
||||
import com.gear.mes.dv.mapper.DvSpecialEquipmentMapper;
|
||||
import com.gear.mes.dv.service.IDvSpecialEquipmentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 特种设备(包含锅炉、压力管道、电梯等特种设备信息)Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-08-21
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class DvSpecialEquipmentServiceImpl implements IDvSpecialEquipmentService {
|
||||
|
||||
private final DvSpecialEquipmentMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
@Override
|
||||
public DvSpecialEquipmentVo queryById(Long equipmentId){
|
||||
return baseMapper.selectVoById(equipmentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询特种设备(包含锅炉、压力管道、电梯等特种设备信息)列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<DvSpecialEquipmentVo> queryPageList(DvSpecialEquipmentBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<DvSpecialEquipment> lqw = buildQueryWrapper(bo);
|
||||
Page<DvSpecialEquipmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询特种设备(包含锅炉、压力管道、电梯等特种设备信息)列表
|
||||
*/
|
||||
@Override
|
||||
public List<DvSpecialEquipmentVo> queryList(DvSpecialEquipmentBo bo) {
|
||||
LambdaQueryWrapper<DvSpecialEquipment> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<DvSpecialEquipment> buildQueryWrapper(DvSpecialEquipmentBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<DvSpecialEquipment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEquipmentCode()), DvSpecialEquipment::getEquipmentCode, bo.getEquipmentCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getEquipmentName()), DvSpecialEquipment::getEquipmentName, bo.getEquipmentName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecificationModel()), DvSpecialEquipment::getSpecificationModel, bo.getSpecificationModel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getManufacturer()), DvSpecialEquipment::getManufacturer, bo.getManufacturer());
|
||||
lqw.eq(bo.getProductionDate() != null, DvSpecialEquipment::getProductionDate, bo.getProductionDate());
|
||||
lqw.eq(bo.getInstallationDate() != null, DvSpecialEquipment::getInstallationDate, bo.getInstallationDate());
|
||||
lqw.eq(bo.getUseStartDate() != null, DvSpecialEquipment::getUseStartDate, bo.getUseStartDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRegistrationNo()), DvSpecialEquipment::getRegistrationNo, bo.getRegistrationNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSafetyManager()), DvSpecialEquipment::getSafetyManager, bo.getSafetyManager());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAttachment()), DvSpecialEquipment::getAttachment, bo.getAttachment());
|
||||
lqw.eq(bo.getInspectionCycle() != null, DvSpecialEquipment::getInspectionCycle, bo.getInspectionCycle());
|
||||
lqw.eq(bo.getLastInspectionTime() != null, DvSpecialEquipment::getLastInspectionTime, bo.getLastInspectionTime());
|
||||
lqw.eq(bo.getNextInspectionTime() != null, DvSpecialEquipment::getNextInspectionTime, bo.getNextInspectionTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCurrentStatus()), DvSpecialEquipment::getCurrentStatus, bo.getCurrentStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(DvSpecialEquipmentBo bo) {
|
||||
DvSpecialEquipment add = BeanUtil.toBean(bo, DvSpecialEquipment.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setEquipmentId(add.getEquipmentId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(DvSpecialEquipmentBo bo) {
|
||||
DvSpecialEquipment update = BeanUtil.toBean(bo, DvSpecialEquipment.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(DvSpecialEquipment entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除特种设备(包含锅炉、压力管道、电梯等特种设备信息)
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.gear.mes.dv.service.impl;
|
||||
|
||||
import com.gear.common.constant.UserConstants;
|
||||
import com.gear.common.utils.DateUtils;
|
||||
import com.gear.common.utils.StringUtils;
|
||||
import com.gear.mes.dv.domain.DvSubject;
|
||||
import com.gear.mes.dv.mapper.DvSubjectMapper;
|
||||
import com.gear.mes.dv.service.IDvSubjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备点检保养项目Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
@Service
|
||||
public class DvSubjectServiceImpl implements IDvSubjectService
|
||||
{
|
||||
@Autowired
|
||||
private DvSubjectMapper dvSubjectMapper;
|
||||
|
||||
/**
|
||||
* 查询设备点检保养项目
|
||||
*
|
||||
* @param subjectId 设备点检保养项目主键
|
||||
* @return 设备点检保养项目
|
||||
*/
|
||||
@Override
|
||||
public DvSubject selectDvSubjectBySubjectId(Long subjectId)
|
||||
{
|
||||
return dvSubjectMapper.selectDvSubjectBySubjectId(subjectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备点检保养项目列表
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 设备点检保养项目
|
||||
*/
|
||||
@Override
|
||||
public List<DvSubject> selectDvSubjectList(DvSubject dvSubject)
|
||||
{
|
||||
return dvSubjectMapper.selectDvSubjectList(dvSubject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkSubjectCodeUnique(DvSubject dvSubject) {
|
||||
DvSubject subject = dvSubjectMapper.checkSubjectCodeUnique(dvSubject);
|
||||
Long subjectId = dvSubject.getSubjectId()==null?-1L:dvSubject.getSubjectId();
|
||||
if(StringUtils.isNotNull(subject) && subject.getSubjectId().longValue() != subjectId.longValue()){
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检保养项目
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvSubject(DvSubject dvSubject)
|
||||
{
|
||||
dvSubject.setCreateTime(DateUtils.getNowDate());
|
||||
return dvSubjectMapper.insertDvSubject(dvSubject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检保养项目
|
||||
*
|
||||
* @param dvSubject 设备点检保养项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvSubject(DvSubject dvSubject)
|
||||
{
|
||||
dvSubject.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvSubjectMapper.updateDvSubject(dvSubject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备点检保养项目
|
||||
*
|
||||
* @param subjectIds 需要删除的设备点检保养项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvSubjectBySubjectIds(Long[] subjectIds)
|
||||
{
|
||||
return dvSubjectMapper.deleteDvSubjectBySubjectIds(subjectIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检保养项目信息
|
||||
*
|
||||
* @param subjectId 设备点检保养项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvSubjectBySubjectId(Long subjectId)
|
||||
{
|
||||
return dvSubjectMapper.deleteDvSubjectBySubjectId(subjectId);
|
||||
}
|
||||
}
|
||||
138
gear-mes/src/main/resources/mapper/dv/DvCheckMachineryMapper.xml
Normal file
138
gear-mes/src/main/resources/mapper/dv/DvCheckMachineryMapper.xml
Normal file
@@ -0,0 +1,138 @@
|
||||
<?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.gear.mes.dv.mapper.DvCheckMachineryMapper">
|
||||
|
||||
<resultMap type="DvCheckMachinery" id="DvCheckMachineryResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="machineryId" column="machinery_id" />
|
||||
<result property="machineryCode" column="machinery_code" />
|
||||
<result property="machineryName" column="machinery_name" />
|
||||
<result property="machineryBrand" column="machinery_brand" />
|
||||
<result property="machinerySpec" column="machinery_spec" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvCheckMachineryVo">
|
||||
select record_id, plan_id, machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_check_machinery
|
||||
</sql>
|
||||
|
||||
<select id="selectDvCheckMachineryList" parameterType="DvCheckMachinery" resultMap="DvCheckMachineryResult">
|
||||
<include refid="selectDvCheckMachineryVo"/>
|
||||
<where>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="machineryId != null "> and machinery_id = #{machineryId}</if>
|
||||
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
||||
<if test="machineryName != null and machineryName != ''"> and machinery_name like concat('%', #{machineryName}, '%')</if>
|
||||
<if test="machineryBrand != null and machineryBrand != ''"> and machinery_brand = #{machineryBrand}</if>
|
||||
<if test="machinerySpec != null and machinerySpec != ''"> and machinery_spec = #{machinerySpec}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckMachineryByRecordId" parameterType="Long" resultMap="DvCheckMachineryResult">
|
||||
<include refid="selectDvCheckMachineryVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<select id="checkMachineryUnique" parameterType="DvCheckMachinery" resultMap="DvCheckMachineryResult">
|
||||
select record_id, cm.plan_id, machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, cm.remark, cm.attr1, cm.attr2, cm.attr3, cm.attr4, cm.create_by, cm.create_time, cm.update_by, cm.update_time
|
||||
from dv_check_machinery cm
|
||||
left join dv_check_plan cp
|
||||
on cm.plan_id = cp.plan_id
|
||||
where cm.machinery_id = #{machineryId} and cp.plan_type = (
|
||||
select plan_type
|
||||
from dv_check_plan
|
||||
where plan_id = #{planId}
|
||||
) limit 1
|
||||
</select>
|
||||
<select id="getPlanId" resultType="java.lang.Long">
|
||||
select plan_id from dv_check_machinery
|
||||
where machinery_code = #{machineryCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckMachinery" parameterType="DvCheckMachinery" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into dv_check_machinery
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="machineryId != null">machinery_id,</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code,</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name,</if>
|
||||
<if test="machineryBrand != null">machinery_brand,</if>
|
||||
<if test="machinerySpec != null">machinery_spec,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="machineryId != null">#{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">#{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">#{machineryName},</if>
|
||||
<if test="machineryBrand != null">#{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">#{machinerySpec},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvCheckMachinery" parameterType="DvCheckMachinery">
|
||||
update dv_check_machinery
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="machineryId != null">machinery_id = #{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code = #{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name = #{machineryName},</if>
|
||||
<if test="machineryBrand != null">machinery_brand = #{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">machinery_spec = #{machinerySpec},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvCheckMachineryByRecordId" parameterType="Long">
|
||||
delete from dv_check_machinery where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckMachineryByRecordIds" parameterType="String">
|
||||
delete from dv_check_machinery where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPlanId" parameterType="Long">
|
||||
delete from dv_check_machinery where plan_id = #{planId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
150
gear-mes/src/main/resources/mapper/dv/DvCheckPlanMapper.xml
Normal file
150
gear-mes/src/main/resources/mapper/dv/DvCheckPlanMapper.xml
Normal file
@@ -0,0 +1,150 @@
|
||||
<?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.gear.mes.dv.mapper.DvCheckPlanMapper">
|
||||
|
||||
<resultMap type="DvCheckPlan" id="DvCheckPlanResult">
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="planName" column="plan_name" />
|
||||
<result property="planType" column="plan_type" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="endDate" column="end_date" />
|
||||
<result property="cycleType" column="cycle_type" />
|
||||
<result property="cycleCount" column="cycle_count" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvCheckPlanVo">
|
||||
select plan_id, plan_code, plan_name,plan_type, start_date, end_date, cycle_type, cycle_count,status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_check_plan
|
||||
</sql>
|
||||
|
||||
<select id="selectDvCheckPlanList" parameterType="DvCheckPlan" resultMap="DvCheckPlanResult">
|
||||
<include refid="selectDvCheckPlanVo"/>
|
||||
<where>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
|
||||
<if test="planType != null and planType != ''"> and plan_type = #{planType}</if>
|
||||
<if test="startDate != null "> and start_date = #{startDate}</if>
|
||||
<if test="endDate != null "> and end_date = #{endDate}</if>
|
||||
<if test="cycleType != null and cycleType != ''"> and cycle_type = #{cycleType}</if>
|
||||
<if test="cycleCount != null "> and cycle_count = #{cycleCount}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckPlanByPlanId" parameterType="Long" resultMap="DvCheckPlanResult">
|
||||
<include refid="selectDvCheckPlanVo"/>
|
||||
where plan_id = #{planId}
|
||||
</select>
|
||||
|
||||
<select id="checkPlanCodeUnique" parameterType="DvCheckPlan" resultMap="DvCheckPlanResult">
|
||||
<include refid="selectDvCheckPlanVo"/>
|
||||
where plan_code = #{planCode}
|
||||
</select>
|
||||
<select id="getByIds" resultType="com.gear.mes.dv.domain.DvCheckPlan" resultMap="DvCheckPlanResult">
|
||||
<include refid="selectDvCheckPlanVo"/>
|
||||
where plan_type = #{planType}
|
||||
and plan_id in
|
||||
<foreach collection="planIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckPlanByMachineryCodeAndType" resultMap="DvCheckPlanResult">
|
||||
select pl.plan_id, pl.plan_code, pl.plan_name,pl.plan_type, pl.start_date, pl.end_date, pl.cycle_type, pl.cycle_count,pl.status, pl.remark, pl.create_time, pl.update_by, pl.update_time
|
||||
from dv_check_plan pl
|
||||
left join dv_check_machinery dv
|
||||
on pl.plan_id = dv.plan_id
|
||||
where plan_type = #{planType}
|
||||
and dv.machinery_code = #{machineryCode}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckPlan" parameterType="DvCheckPlan" useGeneratedKeys="true" keyProperty="planId">
|
||||
insert into dv_check_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planCode != null and planCode != ''">plan_code,</if>
|
||||
<if test="planName != null">plan_name,</if>
|
||||
<if test="planType != null and planType != ''">plan_type,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="endDate != null">end_date,</if>
|
||||
<if test="cycleType != null">cycle_type,</if>
|
||||
<if test="cycleCount != null">cycle_count,</if>
|
||||
<if test="status != null and status !=''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planCode != null and planCode != ''">#{planCode},</if>
|
||||
<if test="planName != null">#{planName},</if>
|
||||
<if test="planType != null and planType != ''">#{planType},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="endDate != null">#{endDate},</if>
|
||||
<if test="cycleType != null">#{cycleType},</if>
|
||||
<if test="cycleCount != null">#{cycleCount},</if>
|
||||
<if test="status != null and status !=''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvCheckPlan" parameterType="DvCheckPlan">
|
||||
update dv_check_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planCode != null and planCode != ''">plan_code = #{planCode},</if>
|
||||
<if test="planName != null">plan_name = #{planName},</if>
|
||||
<if test="planType != null and planType != ''">plan_type = #{planType},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="endDate != null">end_date = #{endDate},</if>
|
||||
<if test="cycleType != null">cycle_type = #{cycleType},</if>
|
||||
<if test="cycleCount != null">cycle_count = #{cycleCount},</if>
|
||||
<if test="status != null and status !=''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where plan_id = #{planId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvCheckPlanByPlanId" parameterType="Long">
|
||||
delete from dv_check_plan where plan_id = #{planId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckPlanByPlanIds" parameterType="String">
|
||||
delete from dv_check_plan where plan_id in
|
||||
<foreach item="planId" collection="array" open="(" separator="," close=")">
|
||||
#{planId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?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.gear.mes.dv.mapper.DvCheckRecordLineMapper">
|
||||
|
||||
<resultMap type="DvCheckRecordLine" id="DvCheckRecordLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="subjectId" column="subject_id" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="subjectType" column="subject_type" />
|
||||
<result property="subjectContent" column="subject_content" />
|
||||
<result property="subjectStandard" column="subject_standard" />
|
||||
<result property="checkStatus" column="check_status" />
|
||||
<result property="checkResult" column="check_result" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvCheckRecordLineVo">
|
||||
select line_id, record_id, subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, check_status, check_result, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_check_record_line
|
||||
</sql>
|
||||
|
||||
<select id="selectDvCheckRecordLineList" parameterType="DvCheckRecordLine" resultMap="DvCheckRecordLineResult">
|
||||
<include refid="selectDvCheckRecordLineVo"/>
|
||||
<where>
|
||||
<if test="recordId != null "> and record_id = #{recordId}</if>
|
||||
<if test="subjectId != null "> and subject_id = #{subjectId}</if>
|
||||
<if test="subjectCode != null and subjectCode != ''"> and subject_code = #{subjectCode}</if>
|
||||
<if test="subjectName != null and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
|
||||
<if test="subjectType != null and subjectType != ''"> and subject_type = #{subjectType}</if>
|
||||
<if test="subjectContent != null and subjectContent != ''"> and subject_content = #{subjectContent}</if>
|
||||
<if test="subjectStandard != null and subjectStandard != ''"> and subject_standard = #{subjectStandard}</if>
|
||||
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
|
||||
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
|
||||
</where>
|
||||
order by line_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckRecordLineByLineId" parameterType="Long" resultMap="DvCheckRecordLineResult">
|
||||
<include refid="selectDvCheckRecordLineVo"/>
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckRecordLine" parameterType="DvCheckRecordLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||
insert into dv_check_record_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id,</if>
|
||||
<if test="subjectId != null">subject_id,</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code,</if>
|
||||
<if test="subjectName != null">subject_name,</if>
|
||||
<if test="subjectType != null">subject_type,</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content,</if>
|
||||
<if test="subjectStandard != null">subject_standard,</if>
|
||||
<if test="checkStatus != null and checkStatus != ''">check_status,</if>
|
||||
<if test="checkResult != null">check_result,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">#{recordId},</if>
|
||||
<if test="subjectId != null">#{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">#{subjectCode},</if>
|
||||
<if test="subjectName != null">#{subjectName},</if>
|
||||
<if test="subjectType != null">#{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">#{subjectContent},</if>
|
||||
<if test="subjectStandard != null">#{subjectStandard},</if>
|
||||
<if test="checkStatus != null and checkStatus != ''">#{checkStatus},</if>
|
||||
<if test="checkResult != null">#{checkResult},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvCheckRecordLine" parameterType="DvCheckRecordLine">
|
||||
update dv_check_record_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id = #{recordId},</if>
|
||||
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code = #{subjectCode},</if>
|
||||
<if test="subjectName != null">subject_name = #{subjectName},</if>
|
||||
<if test="subjectType != null">subject_type = #{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content = #{subjectContent},</if>
|
||||
<if test="subjectStandard != null">subject_standard = #{subjectStandard},</if>
|
||||
<if test="checkStatus != null and checkStatus != ''">check_status = #{checkStatus},</if>
|
||||
<if test="checkResult != null">check_result = #{checkResult},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where line_id = #{lineId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvCheckRecordLineByLineId" parameterType="Long">
|
||||
delete from dv_check_record_line where line_id = #{lineId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckRecordLineByLineIds" parameterType="String">
|
||||
delete from dv_check_record_line where line_id in
|
||||
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckRecordLineByRecordId" parameterType="Long">
|
||||
delete from dv_check_record_line where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
158
gear-mes/src/main/resources/mapper/dv/DvCheckRecordMapper.xml
Normal file
158
gear-mes/src/main/resources/mapper/dv/DvCheckRecordMapper.xml
Normal file
@@ -0,0 +1,158 @@
|
||||
<?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.gear.mes.dv.mapper.DvCheckRecordMapper">
|
||||
|
||||
<resultMap type="DvCheckRecord" id="DvCheckRecordResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="planName" column="plan_name" />
|
||||
<result property="planType" column="plan_type" />
|
||||
<result property="machineryId" column="machinery_id" />
|
||||
<result property="machineryCode" column="machinery_code" />
|
||||
<result property="machineryName" column="machinery_name" />
|
||||
<result property="machineryBrand" column="machinery_brand" />
|
||||
<result property="machinerySpec" column="machinery_spec" />
|
||||
<result property="checkTime" column="check_time" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvCheckRecordVo">
|
||||
select record_id, plan_id, plan_code, plan_name, plan_type, machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, check_time, user_id, user_name, nick_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_check_record
|
||||
</sql>
|
||||
|
||||
<select id="selectDvCheckRecordList" parameterType="DvCheckRecord" resultMap="DvCheckRecordResult">
|
||||
<include refid="selectDvCheckRecordVo"/>
|
||||
<where>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
|
||||
<if test="planType != null and planType != ''"> and plan_type = #{planType}</if>
|
||||
<if test="machineryId != null "> and machinery_id = #{machineryId}</if>
|
||||
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
||||
<if test="machineryName != null and machineryName != ''"> and machinery_name like concat('%', #{machineryName}, '%')</if>
|
||||
<if test="machineryBrand != null and machineryBrand != ''"> and machinery_brand = #{machineryBrand}</if>
|
||||
<if test="machinerySpec != null and machinerySpec != ''"> and machinery_spec = #{machinerySpec}</if>
|
||||
<if test="checkTime != null "> and check_time = #{checkTime}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckRecordByRecordId" parameterType="Long" resultMap="DvCheckRecordResult">
|
||||
<include refid="selectDvCheckRecordVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckRecord" parameterType="DvCheckRecord" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into dv_check_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="planCode != null">plan_code,</if>
|
||||
<if test="planName != null">plan_name,</if>
|
||||
<if test="planType != null">plan_type,</if>
|
||||
<if test="machineryId != null">machinery_id,</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code,</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name,</if>
|
||||
<if test="machineryBrand != null">machinery_brand,</if>
|
||||
<if test="machinerySpec != null">machinery_spec,</if>
|
||||
<if test="checkTime != null">check_time,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="planCode != null">#{planCode},</if>
|
||||
<if test="planName != null">#{planName},</if>
|
||||
<if test="planType != null">#{planType},</if>
|
||||
<if test="machineryId != null">#{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">#{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">#{machineryName},</if>
|
||||
<if test="machineryBrand != null">#{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">#{machinerySpec},</if>
|
||||
<if test="checkTime != null">#{checkTime},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvCheckRecord" parameterType="DvCheckRecord">
|
||||
update dv_check_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="planCode != null">plan_code = #{planCode},</if>
|
||||
<if test="planName != null">plan_name = #{planName},</if>
|
||||
<if test="planType != null">plan_type = #{planType},</if>
|
||||
<if test="machineryId != null">machinery_id = #{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code = #{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name = #{machineryName},</if>
|
||||
<if test="machineryBrand != null">machinery_brand = #{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">machinery_spec = #{machinerySpec},</if>
|
||||
<if test="checkTime != null">check_time = #{checkTime},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvCheckRecordByRecordId" parameterType="Long">
|
||||
delete from dv_check_record where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckRecordByRecordIds" parameterType="String">
|
||||
delete from dv_check_record where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
132
gear-mes/src/main/resources/mapper/dv/DvCheckSubjectMapper.xml
Normal file
132
gear-mes/src/main/resources/mapper/dv/DvCheckSubjectMapper.xml
Normal file
@@ -0,0 +1,132 @@
|
||||
<?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.gear.mes.dv.mapper.DvCheckSubjectMapper">
|
||||
|
||||
<resultMap type="DvCheckSubject" id="DvCheckSubjectResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="subjectId" column="subject_id" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="subjectType" column="subject_type" />
|
||||
<result property="subjectContent" column="subject_content" />
|
||||
<result property="subjectStandard" column="subject_standard" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvCheckSubjectVo">
|
||||
select record_id, plan_id, subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_check_subject
|
||||
</sql>
|
||||
|
||||
<select id="selectDvCheckSubjectList" parameterType="DvCheckSubject" resultMap="DvCheckSubjectResult">
|
||||
<include refid="selectDvCheckSubjectVo"/>
|
||||
<where>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="subjectId != null "> and subject_id = #{subjectId}</if>
|
||||
<if test="subjectCode != null and subjectCode != ''"> and subject_code = #{subjectCode}</if>
|
||||
<if test="subjectName != null and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
|
||||
<if test="subjectType != null and subjectType != ''"> and subject_type = #{subjectType}</if>
|
||||
<if test="subjectContent != null and subjectContent != ''"> and subject_content = #{subjectContent}</if>
|
||||
<if test="subjectStandard != null and subjectStandard != ''"> and subject_standard = #{subjectStandard}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckSubjectByRecordId" parameterType="Long" resultMap="DvCheckSubjectResult">
|
||||
<include refid="selectDvCheckSubjectVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<select id="checkSubjectUnique" parameterType="DvCheckSubject" resultMap="DvCheckSubjectResult">
|
||||
<include refid="selectDvCheckSubjectVo"/>
|
||||
where plan_id = #{planId} and subject_id = #{subjectId} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckSubject" parameterType="DvCheckSubject" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into dv_check_subject
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="subjectId != null">subject_id,</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code,</if>
|
||||
<if test="subjectName != null">subject_name,</if>
|
||||
<if test="subjectType != null">subject_type,</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content,</if>
|
||||
<if test="subjectStandard != null">subject_standard,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="subjectId != null">#{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">#{subjectCode},</if>
|
||||
<if test="subjectName != null">#{subjectName},</if>
|
||||
<if test="subjectType != null">#{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">#{subjectContent},</if>
|
||||
<if test="subjectStandard != null">#{subjectStandard},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvCheckSubject" parameterType="DvCheckSubject">
|
||||
update dv_check_subject
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code = #{subjectCode},</if>
|
||||
<if test="subjectName != null">subject_name = #{subjectName},</if>
|
||||
<if test="subjectType != null">subject_type = #{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content = #{subjectContent},</if>
|
||||
<if test="subjectStandard != null">subject_standard = #{subjectStandard},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvCheckSubjectByRecordId" parameterType="Long">
|
||||
delete from dv_check_subject where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckSubjectByRecordIds" parameterType="String">
|
||||
delete from dv_check_subject where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPlanId" parameterType="Long">
|
||||
delete from dv_check_subject where plan_id = #{planId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
158
gear-mes/src/main/resources/mapper/dv/DvMachineryMapper.xml
Normal file
158
gear-mes/src/main/resources/mapper/dv/DvMachineryMapper.xml
Normal file
@@ -0,0 +1,158 @@
|
||||
<?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.gear.mes.dv.mapper.DvMachineryMapper">
|
||||
|
||||
<resultMap type="DvMachinery" id="DvMachineryResult">
|
||||
<result property="machineryId" column="machinery_id" />
|
||||
<result property="machineryCode" column="machinery_code" />
|
||||
<result property="machineryName" column="machinery_name" />
|
||||
<result property="machineryBrand" column="machinery_brand" />
|
||||
<result property="machinerySpec" column="machinery_spec" />
|
||||
<result property="machineryTypeId" column="machinery_type_id" />
|
||||
<result property="machineryTypeCode" column="machinery_type_code" />
|
||||
<result property="machineryTypeName" column="machinery_type_name" />
|
||||
<result property="workshopId" column="workshop_id" />
|
||||
<result property="workshopCode" column="workshop_code" />
|
||||
<result property="workshopName" column="workshop_name" />
|
||||
<result property="lastMaintenTime" column="last_mainten_time" />
|
||||
<result property="lastCheckTime" column="last_check_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvMachineryVo">
|
||||
select machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, machinery_type_id, machinery_type_code, machinery_type_name, workshop_id, workshop_code, workshop_name, last_mainten_time, last_check_time, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_machinery
|
||||
</sql>
|
||||
|
||||
<select id="selectDvMachineryList" parameterType="DvMachinery" resultMap="DvMachineryResult">
|
||||
<include refid="selectDvMachineryVo"/>
|
||||
<where>
|
||||
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
||||
<if test="machineryName != null and machineryName != ''"> and machinery_name like concat('%', #{machineryName}, '%')</if>
|
||||
<if test="machineryBrand != null and machineryBrand != ''"> and machinery_brand = #{machineryBrand}</if>
|
||||
<if test="machinerySpec != null and machinerySpec != ''"> and machinery_spec = #{machinerySpec}</if>
|
||||
<if test="machineryTypeId != null ">
|
||||
AND (machinery_type_id = #{machineryTypeId} OR machinery_type_id in (select machinery_type_id from dv_machinery_type where find_in_set(#{machineryTypeId},ancestors)))
|
||||
</if>
|
||||
<if test="machineryTypeCode != null and machineryTypeCode != ''"> and machinery_type_code = #{machineryTypeCode}</if>
|
||||
<if test="machineryTypeName != null and machineryTypeName != ''"> and machinery_type_name like concat('%', #{machineryTypeName}, '%')</if>
|
||||
<if test="workshopId != null "> and workshop_id = #{workshopId}</if>
|
||||
<if test="workshopCode != null and workshopCode != ''"> and workshop_code = #{workshopCode}</if>
|
||||
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%', #{workshopName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvMachineryByMachineryId" parameterType="Long" resultMap="DvMachineryResult">
|
||||
<include refid="selectDvMachineryVo"/>
|
||||
where machinery_id = #{machineryId}
|
||||
</select>
|
||||
|
||||
<select id="selectByMachineryCode" parameterType="string" resultMap="DvMachineryResult">
|
||||
<include refid="selectDvMachineryVo"/>
|
||||
where machinery_code= #{machineryCode}
|
||||
</select>
|
||||
<select id="checkRecptCodeUnique" resultType="com.gear.mes.dv.domain.DvMachinery" resultMap="DvMachineryResult">
|
||||
<include refid="selectDvMachineryVo"/>
|
||||
where machinery_code = #{machineryCode}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDvMachinery" parameterType="DvMachinery" useGeneratedKeys="true" keyProperty="machineryId">
|
||||
insert into dv_machinery
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code,</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name,</if>
|
||||
<if test="machineryBrand != null">machinery_brand,</if>
|
||||
<if test="machinerySpec != null">machinery_spec,</if>
|
||||
<if test="machineryTypeId != null">machinery_type_id,</if>
|
||||
<if test="machineryTypeCode != null">machinery_type_code,</if>
|
||||
<if test="machineryTypeName != null">machinery_type_name,</if>
|
||||
<if test="workshopId != null">workshop_id,</if>
|
||||
<if test="workshopCode != null">workshop_code,</if>
|
||||
<if test="workshopName != null">workshop_name,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="machineryCode != null and machineryCode != ''">#{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">#{machineryName},</if>
|
||||
<if test="machineryBrand != null">#{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">#{machinerySpec},</if>
|
||||
<if test="machineryTypeId != null">#{machineryTypeId},</if>
|
||||
<if test="machineryTypeCode != null">#{machineryTypeCode},</if>
|
||||
<if test="machineryTypeName != null">#{machineryTypeName},</if>
|
||||
<if test="workshopId != null">#{workshopId},</if>
|
||||
<if test="workshopCode != null">#{workshopCode},</if>
|
||||
<if test="workshopName != null">#{workshopName},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvMachinery" parameterType="DvMachinery">
|
||||
update dv_machinery
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code = #{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name = #{machineryName},</if>
|
||||
<if test="machineryBrand != null">machinery_brand = #{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">machinery_spec = #{machinerySpec},</if>
|
||||
<if test="machineryTypeId != null">machinery_type_id = #{machineryTypeId},</if>
|
||||
<if test="machineryTypeCode != null">machinery_type_code = #{machineryTypeCode},</if>
|
||||
<if test="machineryTypeName != null">machinery_type_name = #{machineryTypeName},</if>
|
||||
<if test="workshopId != null">workshop_id = #{workshopId},</if>
|
||||
<if test="workshopCode != null">workshop_code = #{workshopCode},</if>
|
||||
<if test="workshopName != null">workshop_name = #{workshopName},</if>
|
||||
<if test="lastMaintenTime != null">last_mainten_time = #{lastMaintenTime},</if>
|
||||
<if test="lastCheckTime != null">last_check_time = #{lastCheckTime},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where machinery_id = #{machineryId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvMachineryByMachineryId" parameterType="Long">
|
||||
delete from dv_machinery where machinery_id = #{machineryId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvMachineryByMachineryIds" parameterType="String">
|
||||
delete from dv_machinery where machinery_id in
|
||||
<foreach item="machineryId" collection="array" open="(" separator="," close=")">
|
||||
#{machineryId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
112
gear-mes/src/main/resources/mapper/dv/DvMachineryTypeMapper.xml
Normal file
112
gear-mes/src/main/resources/mapper/dv/DvMachineryTypeMapper.xml
Normal file
@@ -0,0 +1,112 @@
|
||||
<?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.gear.mes.dv.mapper.DvMachineryTypeMapper">
|
||||
|
||||
<resultMap type="DvMachineryType" id="DvMachineryTypeResult">
|
||||
<result property="machineryTypeId" column="machinery_type_id" />
|
||||
<result property="machineryTypeCode" column="machinery_type_code" />
|
||||
<result property="machineryTypeName" column="machinery_type_name" />
|
||||
<result property="parentTypeId" column="parent_type_id" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="enableFlag" column="enable_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvMachineryTypeVo">
|
||||
select machinery_type_id, machinery_type_code, machinery_type_name, parent_type_id, ancestors, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_machinery_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDvMachineryTypeList" parameterType="DvMachineryType" resultMap="DvMachineryTypeResult">
|
||||
<include refid="selectDvMachineryTypeVo"/>
|
||||
<where>
|
||||
<if test="machineryTypeCode != null and machineryTypeCode != ''"> and machinery_type_code = #{machineryTypeCode}</if>
|
||||
<if test="machineryTypeName != null and machineryTypeName != ''"> and machinery_type_name like concat('%', #{machineryTypeName}, '%')</if>
|
||||
<if test="parentTypeId != null "> and parent_type_id = #{parentTypeId}</if>
|
||||
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
||||
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvMachineryTypeByMachineryTypeId" parameterType="Long" resultMap="DvMachineryTypeResult">
|
||||
<include refid="selectDvMachineryTypeVo"/>
|
||||
where machinery_type_id = #{machineryTypeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvMachineryType" parameterType="DvMachineryType" useGeneratedKeys="true" keyProperty="machineryTypeId">
|
||||
insert into dv_machinery_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="machineryTypeCode != null and machineryTypeCode != ''">machinery_type_code,</if>
|
||||
<if test="machineryTypeName != null and machineryTypeName != ''">machinery_type_name,</if>
|
||||
<if test="parentTypeId != null">parent_type_id,</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors,</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="machineryTypeCode != null and machineryTypeCode != ''">#{machineryTypeCode},</if>
|
||||
<if test="machineryTypeName != null and machineryTypeName != ''">#{machineryTypeName},</if>
|
||||
<if test="parentTypeId != null">#{parentTypeId},</if>
|
||||
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">#{enableFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvMachineryType" parameterType="DvMachineryType">
|
||||
update dv_machinery_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="machineryTypeCode != null and machineryTypeCode != ''">machinery_type_code = #{machineryTypeCode},</if>
|
||||
<if test="machineryTypeName != null and machineryTypeName != ''">machinery_type_name = #{machineryTypeName},</if>
|
||||
<if test="parentTypeId != null">parent_type_id = #{parentTypeId},</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag = #{enableFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where machinery_type_id = #{machineryTypeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvMachineryTypeByMachineryTypeId" parameterType="Long">
|
||||
delete from dv_machinery_type where machinery_type_id = #{machineryTypeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvMachineryTypeByMachineryTypeIds" parameterType="String">
|
||||
delete from dv_machinery_type where machinery_type_id in
|
||||
<foreach item="machineryTypeId" collection="array" open="(" separator="," close=")">
|
||||
#{machineryTypeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,128 @@
|
||||
<?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.gear.mes.dv.mapper.DvMaintenRecordLineMapper">
|
||||
|
||||
<resultMap type="DvMaintenRecordLine" id="DvMaintenRecordLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="subjectId" column="subject_id" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="subjectType" column="subject_type" />
|
||||
<result property="subjectContent" column="subject_content" />
|
||||
<result property="subjectStandard" column="subject_standard" />
|
||||
<result property="maintenStatus" column="mainten_status" />
|
||||
<result property="maintenResult" column="mainten_result" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvMaintenRecordLineVo">
|
||||
select line_id, record_id, subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, mainten_status, mainten_result, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_mainten_record_line
|
||||
</sql>
|
||||
|
||||
<select id="selectDvMaintenRecordLineList" parameterType="DvMaintenRecordLine" resultMap="DvMaintenRecordLineResult">
|
||||
<include refid="selectDvMaintenRecordLineVo"/>
|
||||
<where>
|
||||
<if test="recordId != null "> and record_id = #{recordId}</if>
|
||||
<if test="subjectId != null "> and subject_id = #{subjectId}</if>
|
||||
<if test="subjectCode != null and subjectCode != ''"> and subject_code = #{subjectCode}</if>
|
||||
<if test="subjectName != null and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
|
||||
<if test="subjectType != null and subjectType != ''"> and subject_type = #{subjectType}</if>
|
||||
<if test="subjectContent != null and subjectContent != ''"> and subject_content = #{subjectContent}</if>
|
||||
<if test="subjectStandard != null and subjectStandard != ''"> and subject_standard = #{subjectStandard}</if>
|
||||
<if test="maintenStatus != null and maintenStatus != ''"> and mainten_status = #{maintenStatus}</if>
|
||||
<if test="maintenResult != null and maintenResult != ''"> and mainten_result = #{maintenResult}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvMaintenRecordLineByLineId" parameterType="Long" resultMap="DvMaintenRecordLineResult">
|
||||
<include refid="selectDvMaintenRecordLineVo"/>
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvMaintenRecordLine" parameterType="DvMaintenRecordLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||
insert into dv_mainten_record_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id,</if>
|
||||
<if test="subjectId != null">subject_id,</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code,</if>
|
||||
<if test="subjectName != null">subject_name,</if>
|
||||
<if test="subjectType != null">subject_type,</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content,</if>
|
||||
<if test="subjectStandard != null">subject_standard,</if>
|
||||
<if test="maintenStatus != null and maintenStatus != ''">mainten_status,</if>
|
||||
<if test="maintenResult != null">mainten_result,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">#{recordId},</if>
|
||||
<if test="subjectId != null">#{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">#{subjectCode},</if>
|
||||
<if test="subjectName != null">#{subjectName},</if>
|
||||
<if test="subjectType != null">#{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">#{subjectContent},</if>
|
||||
<if test="subjectStandard != null">#{subjectStandard},</if>
|
||||
<if test="maintenStatus != null and maintenStatus != ''">#{maintenStatus},</if>
|
||||
<if test="maintenResult != null">#{maintenResult},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvMaintenRecordLine" parameterType="DvMaintenRecordLine">
|
||||
update dv_mainten_record_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id = #{recordId},</if>
|
||||
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code = #{subjectCode},</if>
|
||||
<if test="subjectName != null">subject_name = #{subjectName},</if>
|
||||
<if test="subjectType != null">subject_type = #{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content = #{subjectContent},</if>
|
||||
<if test="subjectStandard != null">subject_standard = #{subjectStandard},</if>
|
||||
<if test="maintenStatus != null and maintenStatus != ''">mainten_status = #{maintenStatus},</if>
|
||||
<if test="maintenResult != null">mainten_result = #{maintenResult},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where line_id = #{lineId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvMaintenRecordLineByLineId" parameterType="Long">
|
||||
delete from dv_mainten_record_line where line_id = #{lineId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvMaintenRecordLineByLineIds" parameterType="String">
|
||||
delete from dv_mainten_record_line where line_id in
|
||||
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
157
gear-mes/src/main/resources/mapper/dv/DvMaintenRecordMapper.xml
Normal file
157
gear-mes/src/main/resources/mapper/dv/DvMaintenRecordMapper.xml
Normal file
@@ -0,0 +1,157 @@
|
||||
<?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.gear.mes.dv.mapper.DvMaintenRecordMapper">
|
||||
|
||||
<resultMap type="DvMaintenRecord" id="DvMaintenRecordResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="planName" column="plan_name" />
|
||||
<result property="planType" column="plan_type" />
|
||||
<result property="machineryId" column="machinery_id" />
|
||||
<result property="machineryCode" column="machinery_code" />
|
||||
<result property="machineryName" column="machinery_name" />
|
||||
<result property="machineryBrand" column="machinery_brand" />
|
||||
<result property="machinerySpec" column="machinery_spec" />
|
||||
<result property="maintenTime" column="mainten_time" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvMaintenRecordVo">
|
||||
select record_id, plan_id, plan_code, plan_name, plan_type, machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, mainten_time, user_id, user_name, nick_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_mainten_record
|
||||
</sql>
|
||||
|
||||
<select id="selectDvMaintenRecordList" parameterType="DvMaintenRecord" resultMap="DvMaintenRecordResult">
|
||||
<include refid="selectDvMaintenRecordVo"/>
|
||||
<where>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
|
||||
<if test="planType != null and planType != ''"> and plan_type = #{planType}</if>
|
||||
<if test="machineryId != null "> and machinery_id = #{machineryId}</if>
|
||||
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
||||
<if test="machineryName != null and machineryName != ''"> and machinery_name like concat('%', #{machineryName}, '%')</if>
|
||||
<if test="machineryBrand != null and machineryBrand != ''"> and machinery_brand = #{machineryBrand}</if>
|
||||
<if test="machinerySpec != null and machinerySpec != ''"> and machinery_spec = #{machinerySpec}</if>
|
||||
<if test="maintenTime != null "> and mainten_time = #{maintenTime}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvMaintenRecordByRecordId" parameterType="Long" resultMap="DvMaintenRecordResult">
|
||||
<include refid="selectDvMaintenRecordVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvMaintenRecord" parameterType="DvMaintenRecord" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into dv_mainten_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="planCode != null">plan_code,</if>
|
||||
<if test="planName != null">plan_name,</if>
|
||||
<if test="planType != null">plan_type,</if>
|
||||
<if test="machineryId != null">machinery_id,</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code,</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name,</if>
|
||||
<if test="machineryBrand != null">machinery_brand,</if>
|
||||
<if test="machinerySpec != null">machinery_spec,</if>
|
||||
<if test="maintenTime != null">mainten_time,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="planCode != null">#{planCode},</if>
|
||||
<if test="planName != null">#{planName},</if>
|
||||
<if test="planType != null">#{planType},</if>
|
||||
<if test="machineryId != null">#{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">#{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">#{machineryName},</if>
|
||||
<if test="machineryBrand != null">#{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">#{machinerySpec},</if>
|
||||
<if test="maintenTime != null">#{maintenTime},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvMaintenRecord" parameterType="DvMaintenRecord">
|
||||
update dv_mainten_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="planCode != null">plan_code = #{planCode},</if>
|
||||
<if test="planName != null">plan_name = #{planName},</if>
|
||||
<if test="planType != null">plan_type = #{planType},</if>
|
||||
<if test="machineryId != null">machinery_id = #{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code = #{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name = #{machineryName},</if>
|
||||
<if test="machineryBrand != null">machinery_brand = #{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">machinery_spec = #{machinerySpec},</if>
|
||||
<if test="maintenTime != null">mainten_time = #{maintenTime},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvMaintenRecordByRecordId" parameterType="Long">
|
||||
delete from dv_mainten_record where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvMaintenRecordByRecordIds" parameterType="String">
|
||||
delete from dv_mainten_record where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
141
gear-mes/src/main/resources/mapper/dv/DvRepairLineMapper.xml
Normal file
141
gear-mes/src/main/resources/mapper/dv/DvRepairLineMapper.xml
Normal file
@@ -0,0 +1,141 @@
|
||||
<?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.gear.mes.dv.mapper.DvRepairLineMapper">
|
||||
|
||||
<resultMap type="DvRepairLine" id="DvRepairLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="repairId" column="repair_id" />
|
||||
<result property="subjectId" column="subject_id" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="subjectType" column="subject_type" />
|
||||
<result property="subjectContent" column="subject_content" />
|
||||
<result property="subjectStandard" column="subject_standard" />
|
||||
<result property="malfunction" column="malfunction" />
|
||||
<result property="malfunctionUrl" column="malfunction_url" />
|
||||
<result property="repairDes" column="repair_des" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvRepairLineVo">
|
||||
select line_id, repair_id, subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, malfunction, malfunction_url, repair_des, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_repair_line
|
||||
</sql>
|
||||
|
||||
<select id="selectDvRepairLineList" parameterType="DvRepairLine" resultMap="DvRepairLineResult">
|
||||
<include refid="selectDvRepairLineVo"/>
|
||||
<where>
|
||||
<if test="repairId != null "> and repair_id = #{repairId}</if>
|
||||
<if test="subjectId != null "> and subject_id = #{subjectId}</if>
|
||||
<if test="subjectCode != null and subjectCode != ''"> and subject_code = #{subjectCode}</if>
|
||||
<if test="subjectName != null and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
|
||||
<if test="subjectType != null and subjectType != ''"> and subject_type = #{subjectType}</if>
|
||||
<if test="subjectContent != null and subjectContent != ''"> and subject_content = #{subjectContent}</if>
|
||||
<if test="subjectStandard != null and subjectStandard != ''"> and subject_standard = #{subjectStandard}</if>
|
||||
<if test="malfunction != null and malfunction != ''"> and malfunction = #{malfunction}</if>
|
||||
<if test="malfunctionUrl != null and malfunctionUrl != ''"> and malfunction_url = #{malfunctionUrl}</if>
|
||||
<if test="repairDes != null and repairDes != ''"> and repair_des = #{repairDes}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvRepairLineByLineId" parameterType="Long" resultMap="DvRepairLineResult">
|
||||
<include refid="selectDvRepairLineVo"/>
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvRepairLine" parameterType="DvRepairLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||
insert into dv_repair_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="repairId != null">repair_id,</if>
|
||||
<if test="subjectId != null">subject_id,</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code,</if>
|
||||
<if test="subjectName != null">subject_name,</if>
|
||||
<if test="subjectType != null">subject_type,</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content,</if>
|
||||
<if test="subjectStandard != null">subject_standard,</if>
|
||||
<if test="malfunction != null">malfunction,</if>
|
||||
<if test="malfunctionUrl != null">malfunction_url,</if>
|
||||
<if test="repairDes != null">repair_des,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="repairId != null">#{repairId},</if>
|
||||
<if test="subjectId != null">#{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">#{subjectCode},</if>
|
||||
<if test="subjectName != null">#{subjectName},</if>
|
||||
<if test="subjectType != null">#{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">#{subjectContent},</if>
|
||||
<if test="subjectStandard != null">#{subjectStandard},</if>
|
||||
<if test="malfunction != null">#{malfunction},</if>
|
||||
<if test="malfunctionUrl != null">#{malfunctionUrl},</if>
|
||||
<if test="repairDes != null">#{repairDes},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvRepairLine" parameterType="DvRepairLine">
|
||||
update dv_repair_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="repairId != null">repair_id = #{repairId},</if>
|
||||
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code = #{subjectCode},</if>
|
||||
<if test="subjectName != null">subject_name = #{subjectName},</if>
|
||||
<if test="subjectType != null">subject_type = #{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content = #{subjectContent},</if>
|
||||
<if test="subjectStandard != null">subject_standard = #{subjectStandard},</if>
|
||||
<if test="malfunction != null">malfunction = #{malfunction},</if>
|
||||
<if test="malfunctionUrl != null">malfunction_url = #{malfunctionUrl},</if>
|
||||
<if test="repairDes != null">repair_des = #{repairDes},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where line_id = #{lineId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvRepairLineByLineId" parameterType="Long">
|
||||
delete from dv_repair_line where line_id = #{lineId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvRepairLineByLineIds" parameterType="String">
|
||||
delete from dv_repair_line where line_id in
|
||||
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByRepairId" parameterType="Long">
|
||||
delete from dv_repair_line where repair_id = #{repairId}
|
||||
</delete>
|
||||
</mapper>
|
||||
206
gear-mes/src/main/resources/mapper/dv/DvRepairMapper.xml
Normal file
206
gear-mes/src/main/resources/mapper/dv/DvRepairMapper.xml
Normal file
@@ -0,0 +1,206 @@
|
||||
<?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.gear.mes.dv.mapper.DvRepairMapper">
|
||||
|
||||
<resultMap type="DvRepair" id="DvRepairResult">
|
||||
<result property="repairId" column="repair_id" />
|
||||
<result property="repairCode" column="repair_code" />
|
||||
<result property="repairName" column="repair_name" />
|
||||
<result property="machineryId" column="machinery_id" />
|
||||
<result property="machineryCode" column="machinery_code" />
|
||||
<result property="machineryName" column="machinery_name" />
|
||||
<result property="machineryBrand" column="machinery_brand" />
|
||||
<result property="machinerySpec" column="machinery_spec" />
|
||||
<result property="machineryTypeId" column="machinery_type_id" />
|
||||
<result property="requireDate" column="require_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="confirmDate" column="confirm_date" />
|
||||
<result property="repairResult" column="repair_result" />
|
||||
<result property="acceptedId" column="accepted_id" />
|
||||
<result property="acceptedName" column="accepted_name" />
|
||||
<result property="acceptedBy" column="accepted_by" />
|
||||
<result property="confirmId" column="confirm_id" />
|
||||
<result property="confirmName" column="confirm_name" />
|
||||
<result property="confirmBy" column="confirm_by" />
|
||||
<result property="sourceDocType" column="source_doc_type" />
|
||||
<result property="sourceDocId" column="source_doc_id" />
|
||||
<result property="sourceDocCode" column="source_doc_code" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvRepairVo">
|
||||
select repair_id, repair_code, repair_name, machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, machinery_type_id, require_date, finish_date, confirm_date, repair_result, accepted_id, accepted_name, accepted_by, confirm_id, confirm_name, confirm_by, source_doc_type, source_doc_id, source_doc_code, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_repair
|
||||
</sql>
|
||||
|
||||
<select id="selectDvRepairList" parameterType="DvRepair" resultMap="DvRepairResult">
|
||||
<include refid="selectDvRepairVo"/>
|
||||
<where>
|
||||
<if test="repairCode != null and repairCode != ''"> and repair_code = #{repairCode}</if>
|
||||
<if test="repairName != null and repairName != ''"> and repair_name like concat('%', #{repairName}, '%')</if>
|
||||
<if test="machineryId != null "> and machinery_id = #{machineryId}</if>
|
||||
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
||||
<if test="machineryName != null and machineryName != ''"> and machinery_name like concat('%', #{machineryName}, '%')</if>
|
||||
<if test="machineryBrand != null and machineryBrand != ''"> and machinery_brand = #{machineryBrand}</if>
|
||||
<if test="machinerySpec != null and machinerySpec != ''"> and machinery_spec = #{machinerySpec}</if>
|
||||
<if test="machineryTypeId != null "> and machinery_type_id = #{machineryTypeId}</if>
|
||||
<if test="requireDate != null "> and require_date = #{requireDate}</if>
|
||||
<if test="finishDate != null "> and finish_date = #{finishDate}</if>
|
||||
<if test="confirmDate != null "> and confirm_date = #{confirmDate}</if>
|
||||
<if test="repairResult != null and repairResult != ''"> and repair_result = #{repairResult}</if>
|
||||
<if test="acceptedId != null "> and accepted_id = #{acceptedId}</if>
|
||||
<if test="acceptedName != null and acceptedName != ''"> and accepted_name = #{acceptedName}</if>
|
||||
<if test="acceptedBy != null and acceptedBy != ''"> and accepted_by = #{acceptedBy}</if>
|
||||
<if test="confirmId != null "> and confirm_id = #{confirmId}</if>
|
||||
<if test="confirmName != null and confirmName != ''"> and confirm_name = #{confirmName}</if>
|
||||
<if test="confirmBy != null and confirmBy != ''"> and confirm_by = #{confirmBy}</if>
|
||||
<if test="sourceDocType != null and sourceDocType != ''"> and source_doc_type = #{sourceDocType}</if>
|
||||
<if test="sourceDocId != null "> and source_doc_id = #{sourceDocId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectDvRepairByRepairId" parameterType="Long" resultMap="DvRepairResult">
|
||||
<include refid="selectDvRepairVo"/>
|
||||
where repair_id = #{repairId}
|
||||
</select>
|
||||
|
||||
<select id="checkCodeUnique" parameterType="DvRepair" resultMap="DvRepairResult">
|
||||
<include refid="selectDvRepairVo"/>
|
||||
where repair_code = #{repairCode} limit 1
|
||||
</select>
|
||||
<select id="getRepairList" resultType="com.gear.mes.dv.domain.DvRepair" resultMap="DvRepairResult">
|
||||
<include refid="selectDvRepairVo"/>
|
||||
where machinery_code = #{machineryCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvRepair" parameterType="DvRepair" useGeneratedKeys="true" keyProperty="repairId">
|
||||
insert into dv_repair
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="repairCode != null and repairCode != ''">repair_code,</if>
|
||||
<if test="repairName != null">repair_name,</if>
|
||||
<if test="machineryId != null">machinery_id,</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code,</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name,</if>
|
||||
<if test="machineryBrand != null">machinery_brand,</if>
|
||||
<if test="machinerySpec != null">machinery_spec,</if>
|
||||
<if test="machineryTypeId != null">machinery_type_id,</if>
|
||||
<if test="requireDate != null">require_date,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="confirmDate != null">confirm_date,</if>
|
||||
<if test="repairResult != null">repair_result,</if>
|
||||
<if test="acceptedId != null">accepted_id,</if>
|
||||
<if test="acceptedName != null">accepted_name,</if>
|
||||
<if test="acceptedBy != null">accepted_by,</if>
|
||||
<if test="confirmId != null">confirm_id,</if>
|
||||
<if test="confirmName != null">confirm_name,</if>
|
||||
<if test="confirmBy != null">confirm_by,</if>
|
||||
<if test="sourceDocType != null and sourceDocType != ''">source_doc_type,</if>
|
||||
<if test="sourceDocId != null">source_doc_id,</if>
|
||||
<if test="sourceDocCode != null and sourceDocCode != ''">source_doc_code,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="repairCode != null and repairCode != ''">#{repairCode},</if>
|
||||
<if test="repairName != null">#{repairName},</if>
|
||||
<if test="machineryId != null">#{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">#{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">#{machineryName},</if>
|
||||
<if test="machineryBrand != null">#{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">#{machinerySpec},</if>
|
||||
<if test="machineryTypeId != null">#{machineryTypeId},</if>
|
||||
<if test="requireDate != null">#{requireDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="confirmDate != null">#{confirmDate},</if>
|
||||
<if test="repairResult != null">#{repairResult},</if>
|
||||
<if test="acceptedId != null">#{acceptedId},</if>
|
||||
<if test="acceptedName != null">#{acceptedName},</if>
|
||||
<if test="acceptedBy != null">#{acceptedBy},</if>
|
||||
<if test="confirmId != null">#{confirmId},</if>
|
||||
<if test="confirmName != null">#{confirmName},</if>
|
||||
<if test="confirmBy != null">#{confirmBy},</if>
|
||||
<if test="sourceDocType != null and sourceDocType != ''">#{sourceDocType},</if>
|
||||
<if test="sourceDocId != null">#{sourceDocId},</if>
|
||||
<if test="sourceDocCode != null and sourceDocCode != ''">#{sourceDocCode},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvRepair" parameterType="DvRepair">
|
||||
update dv_repair
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="repairCode != null and repairCode != ''">repair_code = #{repairCode},</if>
|
||||
<if test="repairName != null">repair_name = #{repairName},</if>
|
||||
<if test="machineryId != null">machinery_id = #{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code = #{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name = #{machineryName},</if>
|
||||
<if test="machineryBrand != null">machinery_brand = #{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">machinery_spec = #{machinerySpec},</if>
|
||||
<if test="machineryTypeId != null">machinery_type_id = #{machineryTypeId},</if>
|
||||
<if test="requireDate != null">require_date = #{requireDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="confirmDate != null">confirm_date = #{confirmDate},</if>
|
||||
<if test="repairResult != null">repair_result = #{repairResult},</if>
|
||||
<if test="acceptedId != null">accepted_id = #{acceptedId},</if>
|
||||
<if test="acceptedName != null">accepted_name = #{acceptedName},</if>
|
||||
<if test="acceptedBy != null">accepted_by = #{acceptedBy},</if>
|
||||
<if test="confirmId != null">confirm_id = #{confirmId},</if>
|
||||
<if test="confirmName != null">confirm_name = #{confirmName},</if>
|
||||
<if test="confirmBy != null">confirm_by = #{confirmBy},</if>
|
||||
<if test="sourceDocType != null and sourceDocType != ''">source_doc_type = #{sourceDocType},</if>
|
||||
<if test="sourceDocId != null">source_doc_id = #{sourceDocId},</if>
|
||||
<if test="sourceDocCode != null and sourceDocCode != ''">source_doc_code = #{sourceDocCode},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where repair_id = #{repairId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvRepairByRepairId" parameterType="Long">
|
||||
delete from dv_repair where repair_id = #{repairId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvRepairByRepairIds" parameterType="String">
|
||||
delete from dv_repair where repair_id in
|
||||
<foreach item="repairId" collection="array" open="(" separator="," close=")">
|
||||
#{repairId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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.gear.mes.dv.mapper.DvSpecialEquipmentMapper">
|
||||
|
||||
<resultMap type="com.gear.mes.dv.domain.DvSpecialEquipment" id="DvSpecialEquipmentResult">
|
||||
<result property="equipmentId" column="equipment_id"/>
|
||||
<result property="equipmentCode" column="equipment_code"/>
|
||||
<result property="equipmentName" column="equipment_name"/>
|
||||
<result property="specificationModel" column="specification_model"/>
|
||||
<result property="manufacturer" column="manufacturer"/>
|
||||
<result property="productionDate" column="production_date"/>
|
||||
<result property="installationDate" column="installation_date"/>
|
||||
<result property="useStartDate" column="use_start_date"/>
|
||||
<result property="registrationNo" column="registration_no"/>
|
||||
<result property="safetyManager" column="safety_manager"/>
|
||||
<result property="attachment" column="attachment"/>
|
||||
<result property="inspectionCycle" column="inspection_cycle"/>
|
||||
<result property="lastInspectionTime" column="last_inspection_time"/>
|
||||
<result property="nextInspectionTime" column="next_inspection_time"/>
|
||||
<result property="currentStatus" column="current_status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<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>
|
||||
|
||||
|
||||
</mapper>
|
||||
122
gear-mes/src/main/resources/mapper/dv/DvSubjectMapper.xml
Normal file
122
gear-mes/src/main/resources/mapper/dv/DvSubjectMapper.xml
Normal file
@@ -0,0 +1,122 @@
|
||||
<?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.gear.mes.dv.mapper.DvSubjectMapper">
|
||||
|
||||
<resultMap type="DvSubject" id="DvSubjectResult">
|
||||
<result property="subjectId" column="subject_id" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="subjectType" column="subject_type" />
|
||||
<result property="subjectContent" column="subject_content" />
|
||||
<result property="subjectStandard" column="subject_standard" />
|
||||
<result property="enableFlag" column="enable_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvSubjectVo">
|
||||
select subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_subject
|
||||
</sql>
|
||||
|
||||
<select id="selectDvSubjectList" parameterType="DvSubject" resultMap="DvSubjectResult">
|
||||
<include refid="selectDvSubjectVo"/>
|
||||
<where>
|
||||
<if test="subjectCode != null and subjectCode != ''"> and subject_code = #{subjectCode}</if>
|
||||
<if test="subjectName != null and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
|
||||
<if test="subjectType != null and subjectType != ''"> and subject_type = #{subjectType}</if>
|
||||
<if test="subjectContent != null and subjectContent != ''"> and subject_content = #{subjectContent}</if>
|
||||
<if test="subjectStandard != null and subjectStandard != ''"> and subject_standard = #{subjectStandard}</if>
|
||||
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvSubjectBySubjectId" parameterType="Long" resultMap="DvSubjectResult">
|
||||
<include refid="selectDvSubjectVo"/>
|
||||
where subject_id = #{subjectId}
|
||||
</select>
|
||||
|
||||
<select id="checkSubjectCodeUnique" parameterType="DvSubject" resultMap="DvSubjectResult">
|
||||
<include refid="selectDvSubjectVo"/>
|
||||
where subject_code = #{subjectCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvSubject" parameterType="DvSubject" useGeneratedKeys="true" keyProperty="subjectId">
|
||||
insert into dv_subject
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code,</if>
|
||||
<if test="subjectName != null and subjectName != ''">subject_name,</if>
|
||||
<if test="subjectType != null">subject_type,</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content,</if>
|
||||
<if test="subjectStandard != null">subject_standard,</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="subjectCode != null and subjectCode != ''">#{subjectCode},</if>
|
||||
<if test="subjectName != null and subjectName != ''">#{subjectName},</if>
|
||||
<if test="subjectType != null">#{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">#{subjectContent},</if>
|
||||
<if test="subjectStandard != null">#{subjectStandard},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">#{enableFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvSubject" parameterType="DvSubject">
|
||||
update dv_subject
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code = #{subjectCode},</if>
|
||||
<if test="subjectName != null and subjectName != ''">subject_name = #{subjectName},</if>
|
||||
<if test="subjectType != null">subject_type = #{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content = #{subjectContent},</if>
|
||||
<if test="subjectStandard != null">subject_standard = #{subjectStandard},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag = #{enableFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where subject_id = #{subjectId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvSubjectBySubjectId" parameterType="Long">
|
||||
delete from dv_subject where subject_id = #{subjectId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvSubjectBySubjectIds" parameterType="String">
|
||||
delete from dv_subject where subject_id in
|
||||
<foreach item="subjectId" collection="array" open="(" separator="," close=")">
|
||||
#{subjectId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
0
gear-mes/src/main/resources/mapper/is
Normal file
0
gear-mes/src/main/resources/mapper/is
Normal file
Reference in New Issue
Block a user