增加新模块klp-mes制造执行下面的设备管理功能的后端实现
This commit is contained in:
28
klp-mes/pom.xml
Normal file
28
klp-mes/pom.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.klp</groupId>
|
||||
<artifactId>klp-oa</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</parent>
|
||||
<artifactId>klp-mes</artifactId>
|
||||
<name>klp-mes</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.klp</groupId>
|
||||
<artifactId>klp-common</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.klp</groupId>
|
||||
<artifactId>klp-system</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvCheckMachinery;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvCheckMachinery;
|
||||
import com.klp.mes.dv.domain.DvCheckPlan;
|
||||
import com.klp.mes.dv.domain.DvCheckSubject;
|
||||
import com.klp.mes.dv.domain.dto.DvCheckPlanDTO;
|
||||
import com.klp.mes.dv.service.IDvCheckMachineryService;
|
||||
import com.klp.mes.dv.service.IDvCheckPlanService;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvCheckRecord;
|
||||
import com.klp.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.klp.mes.dv.domain.DvCheckSubject;
|
||||
import com.klp.mes.dv.service.IDvCheckRecordLineService;
|
||||
import com.klp.mes.dv.service.IDvCheckRecordService;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvCheckSubject;
|
||||
import com.klp.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,130 @@
|
||||
package com.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.helper.LoginHelper;
|
||||
import com.klp.common.excel.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvMachinery;
|
||||
import com.klp.mes.dv.service.IDvMachineryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
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,115 @@
|
||||
package com.klp.mes.dv.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.excel.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvMachinery;
|
||||
import com.klp.mes.dv.domain.DvMachineryType;
|
||||
import com.klp.mes.dv.service.IDvMachineryService;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.excel.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvMaintenRecord;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.excel.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvMaintenRecordLine;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.excel.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvRepair;
|
||||
import com.klp.mes.dv.domain.dto.DvRepairDTO;
|
||||
import com.klp.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.klp.mes.dv.controller;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.excel.ExcelUtil;
|
||||
import com.klp.mes.dv.domain.DvRepairLine;
|
||||
import com.klp.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,60 @@
|
||||
package com.klp.mes.dv.controller.mobile;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.klp.mes.dv.service.IDvCheckRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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,185 @@
|
||||
package com.klp.mes.dv.controller.mobile;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvCheckPlan;
|
||||
import com.klp.mes.dv.domain.DvCheckRecord;
|
||||
import com.klp.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.klp.mes.dv.domain.DvCheckSubject;
|
||||
import com.klp.mes.dv.service.IDvCheckPlanService;
|
||||
import com.klp.mes.dv.service.IDvCheckRecordLineService;
|
||||
import com.klp.mes.dv.service.IDvCheckRecordService;
|
||||
import com.klp.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 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,63 @@
|
||||
package com.klp.mes.dv.controller.mobile;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.mes.dv.domain.DvMachinery;
|
||||
import com.klp.mes.dv.service.IDvMachineryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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,60 @@
|
||||
package com.klp.mes.dv.controller.mobile;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.mes.dv.domain.DvMaintenRecordLine;
|
||||
import com.klp.mes.dv.service.IDvMaintenRecordLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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,84 @@
|
||||
package com.klp.mes.dv.controller.mobile;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.mes.dv.domain.DvMaintenRecord;
|
||||
import com.klp.mes.dv.service.IDvMaintenRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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,82 @@
|
||||
package com.klp.mes.dv.controller.mobile;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.mes.dv.domain.DvRepairLine;
|
||||
import com.klp.mes.dv.service.IDvRepairLineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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,105 @@
|
||||
package com.klp.mes.dv.controller.mobile;
|
||||
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvRepair;
|
||||
import com.klp.mes.dv.service.IDvRepairService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
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,178 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 点检设备对象 dv_check_machinery
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-17
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setPlanId(Long planId)
|
||||
{
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public Long getPlanId()
|
||||
{
|
||||
return planId;
|
||||
}
|
||||
public void setMachineryId(Long machineryId)
|
||||
{
|
||||
this.machineryId = machineryId;
|
||||
}
|
||||
|
||||
public Long getMachineryId()
|
||||
{
|
||||
return machineryId;
|
||||
}
|
||||
public void setMachineryCode(String machineryCode)
|
||||
{
|
||||
this.machineryCode = machineryCode;
|
||||
}
|
||||
|
||||
public String getMachineryCode()
|
||||
{
|
||||
return machineryCode;
|
||||
}
|
||||
public void setMachineryName(String machineryName)
|
||||
{
|
||||
this.machineryName = machineryName;
|
||||
}
|
||||
|
||||
public String getMachineryName()
|
||||
{
|
||||
return machineryName;
|
||||
}
|
||||
public void setMachineryBrand(String machineryBrand)
|
||||
{
|
||||
this.machineryBrand = machineryBrand;
|
||||
}
|
||||
|
||||
public String getMachineryBrand()
|
||||
{
|
||||
return machineryBrand;
|
||||
}
|
||||
public void setMachinerySpec(String machinerySpec)
|
||||
{
|
||||
this.machinerySpec = machinerySpec;
|
||||
}
|
||||
|
||||
public String getMachinerySpec()
|
||||
{
|
||||
return machinerySpec;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("planId", getPlanId())
|
||||
.append("machineryId", getMachineryId())
|
||||
.append("machineryCode", getMachineryCode())
|
||||
.append("machineryName", getMachineryName())
|
||||
.append("machineryBrand", getMachineryBrand())
|
||||
.append("machinerySpec", getMachinerySpec())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
201
klp-mes/src/main/java/com/klp/mes/dv/domain/DvCheckPlan.java
Normal file
201
klp-mes/src/main/java/com/klp/mes/dv/domain/DvCheckPlan.java
Normal file
@@ -0,0 +1,201 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备点检计划头对象 dv_check_plan
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setPlanId(Long planId)
|
||||
{
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public Long getPlanId()
|
||||
{
|
||||
return planId;
|
||||
}
|
||||
public void setPlanCode(String planCode)
|
||||
{
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode()
|
||||
{
|
||||
return planCode;
|
||||
}
|
||||
public void setPlanName(String planName)
|
||||
{
|
||||
this.planName = planName;
|
||||
}
|
||||
|
||||
public String getPlanName()
|
||||
{
|
||||
return planName;
|
||||
}
|
||||
public void setStartDate(Date startDate)
|
||||
{
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getPlanType() {
|
||||
return planType;
|
||||
}
|
||||
|
||||
public void setPlanType(String planType) {
|
||||
this.planType = planType;
|
||||
}
|
||||
|
||||
public Date getStartDate()
|
||||
{
|
||||
return startDate;
|
||||
}
|
||||
public void setEndDate(Date endDate)
|
||||
{
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public Date getEndDate()
|
||||
{
|
||||
return endDate;
|
||||
}
|
||||
public void setCycleType(String cycleType)
|
||||
{
|
||||
this.cycleType = cycleType;
|
||||
}
|
||||
|
||||
public String getCycleType()
|
||||
{
|
||||
return cycleType;
|
||||
}
|
||||
public void setCycleCount(Long cycleCount)
|
||||
{
|
||||
this.cycleCount = cycleCount;
|
||||
}
|
||||
|
||||
public Long getCycleCount()
|
||||
{
|
||||
return cycleCount;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DvCheckPlan{" +
|
||||
"planId=" + planId +
|
||||
", planCode='" + planCode + '\'' +
|
||||
", planName='" + planName + '\'' +
|
||||
", planType='" + planType + '\'' +
|
||||
", startDate=" + startDate +
|
||||
", endDate=" + endDate +
|
||||
", cycleType='" + cycleType + '\'' +
|
||||
", cycleCount=" + cycleCount +
|
||||
", status='" + status + '\'' +
|
||||
", attr1='" + attr1 + '\'' +
|
||||
", attr2='" + attr2 + '\'' +
|
||||
", attr3=" + attr3 +
|
||||
", attr4=" + attr4 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
283
klp-mes/src/main/java/com/klp/mes/dv/domain/DvCheckRecord.java
Normal file
283
klp-mes/src/main/java/com/klp/mes/dv/domain/DvCheckRecord.java
Normal file
@@ -0,0 +1,283 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备点检记录对象 dv_check_record
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setPlanId(Long planId)
|
||||
{
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public Long getPlanId()
|
||||
{
|
||||
return planId;
|
||||
}
|
||||
public void setPlanCode(String planCode)
|
||||
{
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode()
|
||||
{
|
||||
return planCode;
|
||||
}
|
||||
public void setPlanName(String planName)
|
||||
{
|
||||
this.planName = planName;
|
||||
}
|
||||
|
||||
public String getPlanName()
|
||||
{
|
||||
return planName;
|
||||
}
|
||||
public void setPlanType(String planType)
|
||||
{
|
||||
this.planType = planType;
|
||||
}
|
||||
|
||||
public String getPlanType()
|
||||
{
|
||||
return planType;
|
||||
}
|
||||
public void setMachineryId(Long machineryId)
|
||||
{
|
||||
this.machineryId = machineryId;
|
||||
}
|
||||
|
||||
public Long getMachineryId()
|
||||
{
|
||||
return machineryId;
|
||||
}
|
||||
public void setMachineryCode(String machineryCode)
|
||||
{
|
||||
this.machineryCode = machineryCode;
|
||||
}
|
||||
|
||||
public String getMachineryCode()
|
||||
{
|
||||
return machineryCode;
|
||||
}
|
||||
public void setMachineryName(String machineryName)
|
||||
{
|
||||
this.machineryName = machineryName;
|
||||
}
|
||||
|
||||
public String getMachineryName()
|
||||
{
|
||||
return machineryName;
|
||||
}
|
||||
public void setMachineryBrand(String machineryBrand)
|
||||
{
|
||||
this.machineryBrand = machineryBrand;
|
||||
}
|
||||
|
||||
public String getMachineryBrand()
|
||||
{
|
||||
return machineryBrand;
|
||||
}
|
||||
public void setMachinerySpec(String machinerySpec)
|
||||
{
|
||||
this.machinerySpec = machinerySpec;
|
||||
}
|
||||
|
||||
public String getMachinerySpec()
|
||||
{
|
||||
return machinerySpec;
|
||||
}
|
||||
public void setCheckTime(Date checkTime)
|
||||
{
|
||||
this.checkTime = checkTime;
|
||||
}
|
||||
|
||||
public Date getCheckTime()
|
||||
{
|
||||
return checkTime;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("planId", getPlanId())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("planName", getPlanName())
|
||||
.append("planType", getPlanType())
|
||||
.append("machineryId", getMachineryId())
|
||||
.append("machineryCode", getMachineryCode())
|
||||
.append("machineryName", getMachineryName())
|
||||
.append("machineryBrand", getMachineryBrand())
|
||||
.append("machinerySpec", getMachinerySpec())
|
||||
.append("checkTime", getCheckTime())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 设备点检记录行对象 dv_check_record_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setLineId(Long lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public Long getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setSubjectId(Long subjectId)
|
||||
{
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public Long getSubjectId()
|
||||
{
|
||||
return subjectId;
|
||||
}
|
||||
public void setSubjectCode(String subjectCode)
|
||||
{
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public String getSubjectCode()
|
||||
{
|
||||
return subjectCode;
|
||||
}
|
||||
public void setSubjectName(String subjectName)
|
||||
{
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
|
||||
public String getSubjectName()
|
||||
{
|
||||
return subjectName;
|
||||
}
|
||||
public void setSubjectType(String subjectType)
|
||||
{
|
||||
this.subjectType = subjectType;
|
||||
}
|
||||
|
||||
public String getSubjectType()
|
||||
{
|
||||
return subjectType;
|
||||
}
|
||||
public void setSubjectContent(String subjectContent)
|
||||
{
|
||||
this.subjectContent = subjectContent;
|
||||
}
|
||||
|
||||
public String getSubjectContent()
|
||||
{
|
||||
return subjectContent;
|
||||
}
|
||||
public void setSubjectStandard(String subjectStandard)
|
||||
{
|
||||
this.subjectStandard = subjectStandard;
|
||||
}
|
||||
|
||||
public String getSubjectStandard()
|
||||
{
|
||||
return subjectStandard;
|
||||
}
|
||||
public void setCheckStatus(String checkStatus)
|
||||
{
|
||||
this.checkStatus = checkStatus;
|
||||
}
|
||||
|
||||
public String getCheckStatus()
|
||||
{
|
||||
return checkStatus;
|
||||
}
|
||||
public void setCheckResult(String checkResult)
|
||||
{
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public String getCheckResult()
|
||||
{
|
||||
return checkResult;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("lineId", getLineId())
|
||||
.append("recordId", getRecordId())
|
||||
.append("subjectId", getSubjectId())
|
||||
.append("subjectCode", getSubjectCode())
|
||||
.append("subjectName", getSubjectName())
|
||||
.append("subjectType", getSubjectType())
|
||||
.append("subjectContent", getSubjectContent())
|
||||
.append("subjectStandard", getSubjectStandard())
|
||||
.append("checkStatus", getCheckStatus())
|
||||
.append("checkResult", getCheckResult())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
192
klp-mes/src/main/java/com/klp/mes/dv/domain/DvCheckSubject.java
Normal file
192
klp-mes/src/main/java/com/klp/mes/dv/domain/DvCheckSubject.java
Normal file
@@ -0,0 +1,192 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 点检项目对象 dv_check_subject
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-18
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setPlanId(Long planId)
|
||||
{
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public Long getPlanId()
|
||||
{
|
||||
return planId;
|
||||
}
|
||||
public void setSubjectId(Long subjectId)
|
||||
{
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public Long getSubjectId()
|
||||
{
|
||||
return subjectId;
|
||||
}
|
||||
public void setSubjectCode(String subjectCode)
|
||||
{
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public String getSubjectCode()
|
||||
{
|
||||
return subjectCode;
|
||||
}
|
||||
public void setSubjectName(String subjectName)
|
||||
{
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
|
||||
public String getSubjectName()
|
||||
{
|
||||
return subjectName;
|
||||
}
|
||||
public void setSubjectType(String subjectType)
|
||||
{
|
||||
this.subjectType = subjectType;
|
||||
}
|
||||
|
||||
public String getSubjectType()
|
||||
{
|
||||
return subjectType;
|
||||
}
|
||||
public void setSubjectContent(String subjectContent)
|
||||
{
|
||||
this.subjectContent = subjectContent;
|
||||
}
|
||||
|
||||
public String getSubjectContent()
|
||||
{
|
||||
return subjectContent;
|
||||
}
|
||||
public void setSubjectStandard(String subjectStandard)
|
||||
{
|
||||
this.subjectStandard = subjectStandard;
|
||||
}
|
||||
|
||||
public String getSubjectStandard()
|
||||
{
|
||||
return subjectStandard;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("planId", getPlanId())
|
||||
.append("subjectId", getSubjectId())
|
||||
.append("subjectCode", getSubjectCode())
|
||||
.append("subjectName", getSubjectName())
|
||||
.append("subjectType", getSubjectType())
|
||||
.append("subjectContent", getSubjectContent())
|
||||
.append("subjectStandard", getSubjectStandard())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
276
klp-mes/src/main/java/com/klp/mes/dv/domain/DvMachinery.java
Normal file
276
klp-mes/src/main/java/com/klp/mes/dv/domain/DvMachinery.java
Normal file
@@ -0,0 +1,276 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备对象 dv_machinery
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setMachineryId(Long machineryId)
|
||||
{
|
||||
this.machineryId = machineryId;
|
||||
}
|
||||
|
||||
public Long getMachineryId()
|
||||
{
|
||||
return machineryId;
|
||||
}
|
||||
public void setMachineryCode(String machineryCode)
|
||||
{
|
||||
this.machineryCode = machineryCode;
|
||||
}
|
||||
|
||||
public String getMachineryCode()
|
||||
{
|
||||
return machineryCode;
|
||||
}
|
||||
public void setMachineryName(String machineryName)
|
||||
{
|
||||
this.machineryName = machineryName;
|
||||
}
|
||||
|
||||
public String getMachineryName()
|
||||
{
|
||||
return machineryName;
|
||||
}
|
||||
public void setMachineryBrand(String machineryBrand)
|
||||
{
|
||||
this.machineryBrand = machineryBrand;
|
||||
}
|
||||
|
||||
public String getMachineryBrand()
|
||||
{
|
||||
return machineryBrand;
|
||||
}
|
||||
public void setMachinerySpec(String machinerySpec)
|
||||
{
|
||||
this.machinerySpec = machinerySpec;
|
||||
}
|
||||
|
||||
public String getMachinerySpec()
|
||||
{
|
||||
return machinerySpec;
|
||||
}
|
||||
public void setMachineryTypeId(Long machineryTypeId)
|
||||
{
|
||||
this.machineryTypeId = machineryTypeId;
|
||||
}
|
||||
|
||||
public Long getMachineryTypeId()
|
||||
{
|
||||
return machineryTypeId;
|
||||
}
|
||||
public void setMachineryTypeCode(String machineryTypeCode)
|
||||
{
|
||||
this.machineryTypeCode = machineryTypeCode;
|
||||
}
|
||||
|
||||
public String getMachineryTypeCode()
|
||||
{
|
||||
return machineryTypeCode;
|
||||
}
|
||||
public void setMachineryTypeName(String machineryTypeName)
|
||||
{
|
||||
this.machineryTypeName = machineryTypeName;
|
||||
}
|
||||
|
||||
public String getMachineryTypeName()
|
||||
{
|
||||
return machineryTypeName;
|
||||
}
|
||||
public void setWorkshopId(Long workshopId)
|
||||
{
|
||||
this.workshopId = workshopId;
|
||||
}
|
||||
|
||||
public Long getWorkshopId()
|
||||
{
|
||||
return workshopId;
|
||||
}
|
||||
public void setWorkshopCode(String workshopCode)
|
||||
{
|
||||
this.workshopCode = workshopCode;
|
||||
}
|
||||
|
||||
public String getWorkshopCode()
|
||||
{
|
||||
return workshopCode;
|
||||
}
|
||||
public void setWorkshopName(String workshopName)
|
||||
{
|
||||
this.workshopName = workshopName;
|
||||
}
|
||||
|
||||
public String getWorkshopName()
|
||||
{
|
||||
return workshopName;
|
||||
}
|
||||
|
||||
public Date getLastMaintenTime() {
|
||||
return lastMaintenTime;
|
||||
}
|
||||
|
||||
public void setLastMaintenTime(Date lastMaintenTime) {
|
||||
this.lastMaintenTime = lastMaintenTime;
|
||||
}
|
||||
|
||||
public Date getLastCheckTime() {
|
||||
return lastCheckTime;
|
||||
}
|
||||
|
||||
public void setLastCheckTime(Date lastCheckTime) {
|
||||
this.lastCheckTime = lastCheckTime;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("machineryId", getMachineryId())
|
||||
.append("machineryCode", getMachineryCode())
|
||||
.append("machineryName", getMachineryName())
|
||||
.append("machineryBrand", getMachineryBrand())
|
||||
.append("machinerySpec", getMachinerySpec())
|
||||
.append("machineryTypeId", getMachineryTypeId())
|
||||
.append("machineryTypeCode", getMachineryTypeCode())
|
||||
.append("machineryTypeName", getMachineryTypeName())
|
||||
.append("workshopId", getWorkshopId())
|
||||
.append("workshopCode", getWorkshopCode())
|
||||
.append("workshopName", getWorkshopName())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.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;
|
||||
|
||||
|
||||
}
|
||||
294
klp-mes/src/main/java/com/klp/mes/dv/domain/DvMaintenRecord.java
Normal file
294
klp-mes/src/main/java/com/klp/mes/dv/domain/DvMaintenRecord.java
Normal file
@@ -0,0 +1,294 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备保养记录对象 dv_mainten_record
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setPlanId(Long planId)
|
||||
{
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public Long getPlanId()
|
||||
{
|
||||
return planId;
|
||||
}
|
||||
public void setPlanCode(String planCode)
|
||||
{
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode()
|
||||
{
|
||||
return planCode;
|
||||
}
|
||||
public void setPlanName(String planName)
|
||||
{
|
||||
this.planName = planName;
|
||||
}
|
||||
|
||||
public String getPlanName()
|
||||
{
|
||||
return planName;
|
||||
}
|
||||
public void setPlanType(String planType)
|
||||
{
|
||||
this.planType = planType;
|
||||
}
|
||||
|
||||
public String getPlanType()
|
||||
{
|
||||
return planType;
|
||||
}
|
||||
public void setMachineryId(Long machineryId)
|
||||
{
|
||||
this.machineryId = machineryId;
|
||||
}
|
||||
|
||||
public Long getMachineryId()
|
||||
{
|
||||
return machineryId;
|
||||
}
|
||||
public void setMachineryCode(String machineryCode)
|
||||
{
|
||||
this.machineryCode = machineryCode;
|
||||
}
|
||||
|
||||
public String getMachineryCode()
|
||||
{
|
||||
return machineryCode;
|
||||
}
|
||||
public void setMachineryName(String machineryName)
|
||||
{
|
||||
this.machineryName = machineryName;
|
||||
}
|
||||
|
||||
public String getMachineryName()
|
||||
{
|
||||
return machineryName;
|
||||
}
|
||||
public void setMachineryBrand(String machineryBrand)
|
||||
{
|
||||
this.machineryBrand = machineryBrand;
|
||||
}
|
||||
|
||||
public String getMachineryBrand()
|
||||
{
|
||||
return machineryBrand;
|
||||
}
|
||||
public void setMachinerySpec(String machinerySpec)
|
||||
{
|
||||
this.machinerySpec = machinerySpec;
|
||||
}
|
||||
|
||||
public String getMachinerySpec()
|
||||
{
|
||||
return machinerySpec;
|
||||
}
|
||||
public void setMaintenTime(Date maintenTime)
|
||||
{
|
||||
this.maintenTime = maintenTime;
|
||||
}
|
||||
|
||||
public Date getMaintenTime()
|
||||
{
|
||||
return maintenTime;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setNickName(String nickName)
|
||||
{
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getNickName()
|
||||
{
|
||||
return nickName;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("planId", getPlanId())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("planName", getPlanName())
|
||||
.append("planType", getPlanType())
|
||||
.append("machineryId", getMachineryId())
|
||||
.append("machineryCode", getMachineryCode())
|
||||
.append("machineryName", getMachineryName())
|
||||
.append("machineryBrand", getMachineryBrand())
|
||||
.append("machinerySpec", getMachinerySpec())
|
||||
.append("maintenTime", getMaintenTime())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("nickName", getNickName())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 设备保养记录行对象 dv_mainten_record_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setLineId(Long lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public Long getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setSubjectId(Long subjectId)
|
||||
{
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public Long getSubjectId()
|
||||
{
|
||||
return subjectId;
|
||||
}
|
||||
public void setSubjectCode(String subjectCode)
|
||||
{
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public String getSubjectCode()
|
||||
{
|
||||
return subjectCode;
|
||||
}
|
||||
public void setSubjectName(String subjectName)
|
||||
{
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
|
||||
public String getSubjectName()
|
||||
{
|
||||
return subjectName;
|
||||
}
|
||||
public void setSubjectType(String subjectType)
|
||||
{
|
||||
this.subjectType = subjectType;
|
||||
}
|
||||
|
||||
public String getSubjectType()
|
||||
{
|
||||
return subjectType;
|
||||
}
|
||||
public void setSubjectContent(String subjectContent)
|
||||
{
|
||||
this.subjectContent = subjectContent;
|
||||
}
|
||||
|
||||
public String getSubjectContent()
|
||||
{
|
||||
return subjectContent;
|
||||
}
|
||||
public void setSubjectStandard(String subjectStandard)
|
||||
{
|
||||
this.subjectStandard = subjectStandard;
|
||||
}
|
||||
|
||||
public String getSubjectStandard()
|
||||
{
|
||||
return subjectStandard;
|
||||
}
|
||||
public void setMaintenStatus(String maintenStatus)
|
||||
{
|
||||
this.maintenStatus = maintenStatus;
|
||||
}
|
||||
|
||||
public String getMaintenStatus()
|
||||
{
|
||||
return maintenStatus;
|
||||
}
|
||||
public void setMaintenResult(String maintenResult)
|
||||
{
|
||||
this.maintenResult = maintenResult;
|
||||
}
|
||||
|
||||
public String getMaintenResult()
|
||||
{
|
||||
return maintenResult;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("lineId", getLineId())
|
||||
.append("recordId", getRecordId())
|
||||
.append("subjectId", getSubjectId())
|
||||
.append("subjectCode", getSubjectCode())
|
||||
.append("subjectName", getSubjectName())
|
||||
.append("subjectType", getSubjectType())
|
||||
.append("subjectContent", getSubjectContent())
|
||||
.append("subjectStandard", getSubjectStandard())
|
||||
.append("maintenStatus", getMaintenStatus())
|
||||
.append("maintenResult", getMaintenResult())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
380
klp-mes/src/main/java/com/klp/mes/dv/domain/DvRepair.java
Normal file
380
klp-mes/src/main/java/com/klp/mes/dv/domain/DvRepair.java
Normal file
@@ -0,0 +1,380 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备维修单对象 dv_repair
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-06
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setRepairId(Long repairId)
|
||||
{
|
||||
this.repairId = repairId;
|
||||
}
|
||||
|
||||
public Long getRepairId()
|
||||
{
|
||||
return repairId;
|
||||
}
|
||||
public void setRepairCode(String repairCode)
|
||||
{
|
||||
this.repairCode = repairCode;
|
||||
}
|
||||
|
||||
public String getRepairCode()
|
||||
{
|
||||
return repairCode;
|
||||
}
|
||||
public void setRepairName(String repairName)
|
||||
{
|
||||
this.repairName = repairName;
|
||||
}
|
||||
|
||||
public String getRepairName()
|
||||
{
|
||||
return repairName;
|
||||
}
|
||||
public void setMachineryId(Long machineryId)
|
||||
{
|
||||
this.machineryId = machineryId;
|
||||
}
|
||||
|
||||
public Long getMachineryId()
|
||||
{
|
||||
return machineryId;
|
||||
}
|
||||
public void setMachineryCode(String machineryCode)
|
||||
{
|
||||
this.machineryCode = machineryCode;
|
||||
}
|
||||
|
||||
public String getMachineryCode()
|
||||
{
|
||||
return machineryCode;
|
||||
}
|
||||
public void setMachineryName(String machineryName)
|
||||
{
|
||||
this.machineryName = machineryName;
|
||||
}
|
||||
|
||||
public String getMachineryName()
|
||||
{
|
||||
return machineryName;
|
||||
}
|
||||
public void setMachineryBrand(String machineryBrand)
|
||||
{
|
||||
this.machineryBrand = machineryBrand;
|
||||
}
|
||||
|
||||
public String getMachineryBrand()
|
||||
{
|
||||
return machineryBrand;
|
||||
}
|
||||
public void setMachinerySpec(String machinerySpec)
|
||||
{
|
||||
this.machinerySpec = machinerySpec;
|
||||
}
|
||||
|
||||
public String getMachinerySpec()
|
||||
{
|
||||
return machinerySpec;
|
||||
}
|
||||
public void setMachineryTypeId(Long machineryTypeId)
|
||||
{
|
||||
this.machineryTypeId = machineryTypeId;
|
||||
}
|
||||
|
||||
public Long getMachineryTypeId()
|
||||
{
|
||||
return machineryTypeId;
|
||||
}
|
||||
public void setRequireDate(Date requireDate)
|
||||
{
|
||||
this.requireDate = requireDate;
|
||||
}
|
||||
|
||||
public Date getRequireDate()
|
||||
{
|
||||
return requireDate;
|
||||
}
|
||||
public void setFinishDate(Date finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public Date getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
public void setConfirmDate(Date confirmDate)
|
||||
{
|
||||
this.confirmDate = confirmDate;
|
||||
}
|
||||
|
||||
public Date getConfirmDate()
|
||||
{
|
||||
return confirmDate;
|
||||
}
|
||||
public void setRepairResult(String repairResult)
|
||||
{
|
||||
this.repairResult = repairResult;
|
||||
}
|
||||
|
||||
public String getRepairResult()
|
||||
{
|
||||
return repairResult;
|
||||
}
|
||||
public void setAcceptedBy(String acceptedBy)
|
||||
{
|
||||
this.acceptedBy = acceptedBy;
|
||||
}
|
||||
|
||||
public String getAcceptedBy()
|
||||
{
|
||||
return acceptedBy;
|
||||
}
|
||||
public void setConfirmBy(String confirmBy)
|
||||
{
|
||||
this.confirmBy = confirmBy;
|
||||
}
|
||||
|
||||
public String getConfirmBy()
|
||||
{
|
||||
return confirmBy;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getAcceptedId() {
|
||||
return acceptedId;
|
||||
}
|
||||
|
||||
public void setAcceptedId(Long acceptedId) {
|
||||
this.acceptedId = acceptedId;
|
||||
}
|
||||
|
||||
public String getAcceptedName() {
|
||||
return acceptedName;
|
||||
}
|
||||
|
||||
public void setAcceptedName(String acceptedName) {
|
||||
this.acceptedName = acceptedName;
|
||||
}
|
||||
|
||||
public Long getConfirmId() {
|
||||
return confirmId;
|
||||
}
|
||||
|
||||
public void setConfirmId(Long confirmId) {
|
||||
this.confirmId = confirmId;
|
||||
}
|
||||
|
||||
public String getSourceDocType() {
|
||||
return sourceDocType;
|
||||
}
|
||||
|
||||
public void setSourceDocType(String sourceDocType) {
|
||||
this.sourceDocType = sourceDocType;
|
||||
}
|
||||
|
||||
public Long getSourceDocId() {
|
||||
return sourceDocId;
|
||||
}
|
||||
|
||||
public void setSourceDocId(Long sourceDocId) {
|
||||
this.sourceDocId = sourceDocId;
|
||||
}
|
||||
|
||||
public String getSourceDocCode() {
|
||||
return sourceDocCode;
|
||||
}
|
||||
|
||||
public void setSourceDocCode(String sourceDocCode) {
|
||||
this.sourceDocCode = sourceDocCode;
|
||||
}
|
||||
|
||||
public String getConfirmName() {
|
||||
return confirmName;
|
||||
}
|
||||
|
||||
public void setConfirmName(String confirmName) {
|
||||
this.confirmName = confirmName;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("repairId", getRepairId())
|
||||
.append("repairCode", getRepairCode())
|
||||
.append("repairName", getRepairName())
|
||||
.append("machineryId", getMachineryId())
|
||||
.append("machineryCode", getMachineryCode())
|
||||
.append("machineryName", getMachineryName())
|
||||
.append("machineryBrand", getMachineryBrand())
|
||||
.append("machinerySpec", getMachinerySpec())
|
||||
.append("machineryTypeId", getMachineryTypeId())
|
||||
.append("requireDate", getRequireDate())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("confirmDate", getConfirmDate())
|
||||
.append("repairResult", getRepairResult())
|
||||
.append("acceptedBy", getAcceptedBy())
|
||||
.append("confirmBy", getConfirmBy())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
234
klp-mes/src/main/java/com/klp/mes/dv/domain/DvRepairLine.java
Normal file
234
klp-mes/src/main/java/com/klp/mes/dv/domain/DvRepairLine.java
Normal file
@@ -0,0 +1,234 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 设备维修单行对象 dv_repair_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setLineId(Long lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public Long getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
public void setRepairId(Long repairId)
|
||||
{
|
||||
this.repairId = repairId;
|
||||
}
|
||||
|
||||
public Long getRepairId()
|
||||
{
|
||||
return repairId;
|
||||
}
|
||||
public void setSubjectId(Long subjectId)
|
||||
{
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public Long getSubjectId()
|
||||
{
|
||||
return subjectId;
|
||||
}
|
||||
public void setSubjectCode(String subjectCode)
|
||||
{
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public String getSubjectCode()
|
||||
{
|
||||
return subjectCode;
|
||||
}
|
||||
public void setSubjectName(String subjectName)
|
||||
{
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
|
||||
public String getSubjectName()
|
||||
{
|
||||
return subjectName;
|
||||
}
|
||||
public void setSubjectType(String subjectType)
|
||||
{
|
||||
this.subjectType = subjectType;
|
||||
}
|
||||
|
||||
public String getSubjectType()
|
||||
{
|
||||
return subjectType;
|
||||
}
|
||||
public void setSubjectContent(String subjectContent)
|
||||
{
|
||||
this.subjectContent = subjectContent;
|
||||
}
|
||||
|
||||
public String getSubjectContent()
|
||||
{
|
||||
return subjectContent;
|
||||
}
|
||||
public void setSubjectStandard(String subjectStandard)
|
||||
{
|
||||
this.subjectStandard = subjectStandard;
|
||||
}
|
||||
|
||||
public String getSubjectStandard()
|
||||
{
|
||||
return subjectStandard;
|
||||
}
|
||||
public void setMalfunction(String malfunction)
|
||||
{
|
||||
this.malfunction = malfunction;
|
||||
}
|
||||
|
||||
public String getMalfunction()
|
||||
{
|
||||
return malfunction;
|
||||
}
|
||||
public void setMalfunctionUrl(String malfunctionUrl)
|
||||
{
|
||||
this.malfunctionUrl = malfunctionUrl;
|
||||
}
|
||||
|
||||
public String getMalfunctionUrl()
|
||||
{
|
||||
return malfunctionUrl;
|
||||
}
|
||||
public void setRepairDes(String repairDes)
|
||||
{
|
||||
this.repairDes = repairDes;
|
||||
}
|
||||
|
||||
public String getRepairDes()
|
||||
{
|
||||
return repairDes;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("lineId", getLineId())
|
||||
.append("repairId", getRepairId())
|
||||
.append("subjectId", getSubjectId())
|
||||
.append("subjectCode", getSubjectCode())
|
||||
.append("subjectName", getSubjectName())
|
||||
.append("subjectType", getSubjectType())
|
||||
.append("subjectContent", getSubjectContent())
|
||||
.append("subjectStandard", getSubjectStandard())
|
||||
.append("malfunction", getMalfunction())
|
||||
.append("malfunctionUrl", getMalfunctionUrl())
|
||||
.append("repairDes", getRepairDes())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
178
klp-mes/src/main/java/com/klp/mes/dv/domain/DvSubject.java
Normal file
178
klp-mes/src/main/java/com/klp/mes/dv/domain/DvSubject.java
Normal file
@@ -0,0 +1,178 @@
|
||||
package com.klp.mes.dv.domain;
|
||||
|
||||
import com.klp.common.annotation.Excel;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 设备点检保养项目对象 dv_subject
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-06-16
|
||||
*/
|
||||
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;
|
||||
|
||||
public void setSubjectId(Long subjectId)
|
||||
{
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public Long getSubjectId()
|
||||
{
|
||||
return subjectId;
|
||||
}
|
||||
public void setSubjectCode(String subjectCode)
|
||||
{
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public String getSubjectCode()
|
||||
{
|
||||
return subjectCode;
|
||||
}
|
||||
public void setSubjectName(String subjectName)
|
||||
{
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
|
||||
public String getSubjectName()
|
||||
{
|
||||
return subjectName;
|
||||
}
|
||||
public void setSubjectType(String subjectType)
|
||||
{
|
||||
this.subjectType = subjectType;
|
||||
}
|
||||
|
||||
public String getSubjectType()
|
||||
{
|
||||
return subjectType;
|
||||
}
|
||||
public void setSubjectContent(String subjectContent)
|
||||
{
|
||||
this.subjectContent = subjectContent;
|
||||
}
|
||||
|
||||
public String getSubjectContent()
|
||||
{
|
||||
return subjectContent;
|
||||
}
|
||||
public void setSubjectStandard(String subjectStandard)
|
||||
{
|
||||
this.subjectStandard = subjectStandard;
|
||||
}
|
||||
|
||||
public String getSubjectStandard()
|
||||
{
|
||||
return subjectStandard;
|
||||
}
|
||||
public void setEnableFlag(String enableFlag)
|
||||
{
|
||||
this.enableFlag = enableFlag;
|
||||
}
|
||||
|
||||
public String getEnableFlag()
|
||||
{
|
||||
return enableFlag;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("subjectId", getSubjectId())
|
||||
.append("subjectCode", getSubjectCode())
|
||||
.append("subjectName", getSubjectName())
|
||||
.append("subjectType", getSubjectType())
|
||||
.append("subjectContent", getSubjectContent())
|
||||
.append("subjectStandard", getSubjectStandard())
|
||||
.append("enableFlag", getEnableFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.klp.mes.dv.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DvCheckPlanDTO {
|
||||
|
||||
private String planType;
|
||||
|
||||
private String machineryCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.klp.mes.dv.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DvRepairDTO {
|
||||
|
||||
private String machineryCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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,65 @@
|
||||
package com.klp.mes.dv.mapper;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.mes.dv.domain.DvCheckPlan;
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service;
|
||||
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.mes.dv.domain.DvRepair;
|
||||
import com.klp.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,69 @@
|
||||
package com.klp.mes.dv.service;
|
||||
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvCheckMachinery;
|
||||
import com.klp.mes.dv.mapper.DvCheckMachineryMapper;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvCheckPlan;
|
||||
import com.klp.mes.dv.domain.dto.DvCheckPlanDTO;
|
||||
import com.klp.mes.dv.mapper.DvCheckPlanMapper;
|
||||
import com.klp.mes.dv.service.IDvCheckMachineryService;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.klp.mes.dv.mapper.DvCheckRecordLineMapper;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.mes.dv.domain.DvCheckRecord;
|
||||
import com.klp.mes.dv.mapper.DvCheckRecordMapper;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvCheckSubject;
|
||||
import com.klp.mes.dv.mapper.DvCheckSubjectMapper;
|
||||
import com.klp.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,178 @@
|
||||
package com.klp.mes.dv.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvMachinery;
|
||||
import com.klp.mes.dv.mapper.DvMachineryMapper;
|
||||
import com.klp.mes.dv.service.IDvMachineryService;
|
||||
//import com.klp.mes.wm.utils.WmBarCodeUtil;
|
||||
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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvMachineryType;
|
||||
import com.klp.mes.dv.mapper.DvMachineryTypeMapper;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.mes.dv.domain.DvMaintenRecordLine;
|
||||
import com.klp.mes.dv.mapper.DvMaintenRecordLineMapper;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.mes.dv.domain.DvMaintenRecord;
|
||||
import com.klp.mes.dv.mapper.DvMaintenRecordMapper;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.mes.dv.domain.DvRepairLine;
|
||||
import com.klp.mes.dv.mapper.DvRepairLineMapper;
|
||||
import com.klp.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.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.core.domain.AjaxResult;
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvRepair;
|
||||
import com.klp.mes.dv.domain.dto.DvRepairDTO;
|
||||
import com.klp.mes.dv.mapper.DvRepairMapper;
|
||||
import com.klp.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,109 @@
|
||||
package com.klp.mes.dv.service.impl;
|
||||
|
||||
import com.klp.common.constant.UserConstants;
|
||||
import com.klp.common.utils.DateUtils;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.dv.domain.DvSubject;
|
||||
import com.klp.mes.dv.mapper.DvSubjectMapper;
|
||||
import com.klp.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
klp-mes/src/main/resources/mapper/dv/DvCheckMachineryMapper.xml
Normal file
138
klp-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.klp.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
klp-mes/src/main/resources/mapper/dv/DvCheckPlanMapper.xml
Normal file
150
klp-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.klp.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.klp.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>
|
||||
134
klp-mes/src/main/resources/mapper/dv/DvCheckRecordLineMapper.xml
Normal file
134
klp-mes/src/main/resources/mapper/dv/DvCheckRecordLineMapper.xml
Normal file
@@ -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.klp.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
klp-mes/src/main/resources/mapper/dv/DvCheckRecordMapper.xml
Normal file
158
klp-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.klp.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
klp-mes/src/main/resources/mapper/dv/DvCheckSubjectMapper.xml
Normal file
132
klp-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.klp.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
klp-mes/src/main/resources/mapper/dv/DvMachineryMapper.xml
Normal file
158
klp-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.klp.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.klp.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
klp-mes/src/main/resources/mapper/dv/DvMachineryTypeMapper.xml
Normal file
112
klp-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.klp.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.klp.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
klp-mes/src/main/resources/mapper/dv/DvMaintenRecordMapper.xml
Normal file
157
klp-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.klp.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
klp-mes/src/main/resources/mapper/dv/DvRepairLineMapper.xml
Normal file
141
klp-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.klp.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
klp-mes/src/main/resources/mapper/dv/DvRepairMapper.xml
Normal file
206
klp-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.klp.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.klp.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>
|
||||
122
klp-mes/src/main/resources/mapper/dv/DvSubjectMapper.xml
Normal file
122
klp-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.klp.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>
|
||||
Reference in New Issue
Block a user