Commit 386cc251 authored by 耿迪迪's avatar 耿迪迪

产品

parent 858a6594
package com.zehong.web.controller.track;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.track.TProductDevice;
import com.zehong.system.service.track.ITProductDeviceService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 设备Controller
*
* @author zehong
* @date 2024-08-28
*/
@RestController
@RequestMapping("/track/device")
public class TProductDeviceController extends BaseController
{
@Autowired
private ITProductDeviceService tProductDeviceService;
/**
* 查询设备列表
*/
// @PreAuthorize("@ss.hasPermi('system:device:list')")
@GetMapping("/list")
public TableDataInfo list(TProductDevice tProductDevice)
{
startPage();
List<TProductDevice> list = tProductDeviceService.selectTProductDeviceList(tProductDevice);
return getDataTable(list);
}
/**
* 导出设备列表
*/
//@PreAuthorize("@ss.hasPermi('system:device:export')")
@Log(title = "设备", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TProductDevice tProductDevice)
{
List<TProductDevice> list = tProductDeviceService.selectTProductDeviceList(tProductDevice);
ExcelUtil<TProductDevice> util = new ExcelUtil<TProductDevice>(TProductDevice.class);
return util.exportExcel(list, "设备数据");
}
/**
* 获取设备详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:device:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tProductDeviceService.selectTProductDeviceById(id));
}
/**
* 新增设备
*/
//@PreAuthorize("@ss.hasPermi('system:device:add')")
@Log(title = "设备", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TProductDevice tProductDevice)
{
return toAjax(tProductDeviceService.insertTProductDevice(tProductDevice));
}
/**
* 修改设备
*/
//@PreAuthorize("@ss.hasPermi('system:device:edit')")
@Log(title = "设备", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TProductDevice tProductDevice)
{
return toAjax(tProductDeviceService.updateTProductDevice(tProductDevice));
}
/**
* 删除设备
*/
//@PreAuthorize("@ss.hasPermi('system:device:remove')")
@Log(title = "设备", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tProductDeviceService.deleteTProductDeviceByIds(ids));
}
}
package com.zehong.web.controller.track;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.track.TProductDeviceMark;
import com.zehong.system.service.track.ITProductDeviceMarkService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 设备装配记录Controller
*
* @author zehong
* @date 2024-08-28
*/
@RestController
@RequestMapping("/track/deviceMark")
public class TProductDeviceMarkController extends BaseController
{
@Autowired
private ITProductDeviceMarkService tProductDeviceMarkService;
/**
* 查询设备装配记录列表
*/
// @PreAuthorize("@ss.hasPermi('system:mark:list')")
@GetMapping("/list")
public TableDataInfo list(TProductDeviceMark tProductDeviceMark)
{
startPage();
List<TProductDeviceMark> list = tProductDeviceMarkService.selectTProductDeviceMarkList(tProductDeviceMark);
return getDataTable(list);
}
/**
* 导出设备装配记录列表
*/
//@PreAuthorize("@ss.hasPermi('system:mark:export')")
@Log(title = "设备装配记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TProductDeviceMark tProductDeviceMark)
{
List<TProductDeviceMark> list = tProductDeviceMarkService.selectTProductDeviceMarkList(tProductDeviceMark);
ExcelUtil<TProductDeviceMark> util = new ExcelUtil<TProductDeviceMark>(TProductDeviceMark.class);
return util.exportExcel(list, "设备装配记录数据");
}
/**
* 获取设备装配记录详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:mark:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tProductDeviceMarkService.selectTProductDeviceMarkById(id));
}
/**
* 新增设备装配记录
*/
//@PreAuthorize("@ss.hasPermi('system:mark:add')")
@Log(title = "设备装配记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TProductDeviceMark tProductDeviceMark)
{
return toAjax(tProductDeviceMarkService.insertTProductDeviceMark(tProductDeviceMark));
}
/**
* 修改设备装配记录
*/
//@PreAuthorize("@ss.hasPermi('system:mark:edit')")
@Log(title = "设备装配记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TProductDeviceMark tProductDeviceMark)
{
return toAjax(tProductDeviceMarkService.updateTProductDeviceMark(tProductDeviceMark));
}
/**
* 删除设备装配记录
*/
//@PreAuthorize("@ss.hasPermi('system:mark:remove')")
@Log(title = "设备装配记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tProductDeviceMarkService.deleteTProductDeviceMarkByIds(ids));
}
}
......@@ -45,6 +45,13 @@ public class TProductInspectController extends BaseController
return getDataTable(list);
}
@GetMapping("/executeInfoList")
public AjaxResult executeInfoList(TProductInspect tProductInspect)
{
List<TProductInspect> list = tProductInspectService.selectTProductInspectList(tProductInspect);
return AjaxResult.success(list);
}
/**
* 导出生产执行列表
*/
......
package com.zehong.system.domain.track;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 设备对象 t_product_device
*
* @author zehong
* @date 2024-08-28
*/
public class TProductDevice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 计划编号 */
private Long planId;
/** 执行编号 */
private Long inspectId;
@Excel(name = "批次号")
private String batchNo;
/** 设备编号 */
@Excel(name = "设备编号")
private String deviceNo;
/** 设备名称 */
@Excel(name = "设备名称")
private String title;
/** 设备状态 */
@Excel(name = "设备状态",dictType = "t_produce_device_status")
private String status;
/** 创建人 */
private Long createId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPlanId(Long planId)
{
this.planId = planId;
}
public Long getPlanId()
{
return planId;
}
public void setInspectId(Long inspectId)
{
this.inspectId = inspectId;
}
public Long getInspectId()
{
return inspectId;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public void setDeviceNo(String deviceNo)
{
this.deviceNo = deviceNo;
}
public String getDeviceNo()
{
return deviceNo;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setCreateId(Long createId)
{
this.createId = createId;
}
public Long getCreateId()
{
return createId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("planId", getPlanId())
.append("inspectId", getInspectId())
.append("deviceNo", getDeviceNo())
.append("title", getTitle())
.append("status", getStatus())
.append("remark", getRemark())
.append("createTime", getCreateTime())
.append("createId", getCreateId())
.toString();
}
}
package com.zehong.system.domain.track;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 设备装配记录对象 t_product_device_mark
*
* @author zehong
* @date 2024-08-28
*/
public class TProductDeviceMark extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 设备编号 */
@Excel(name = "设备编号")
private Long deviceId;
/** 装配编号 */
@Excel(name = "装配编号")
private Long markId;
/** 装配步骤编号 */
@Excel(name = "装配步骤编号")
private Long detailId;
/** 装配图片 */
@Excel(name = "装配图片")
private String imgUrl;
/** 装配视频 */
@Excel(name = "装配视频")
private String videoUrl;
/** $column.columnComment */
@Excel(name = "装配视频")
private Long createId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setMarkId(Long markId)
{
this.markId = markId;
}
public Long getMarkId()
{
return markId;
}
public void setDetailId(Long detailId)
{
this.detailId = detailId;
}
public Long getDetailId()
{
return detailId;
}
public void setImgUrl(String imgUrl)
{
this.imgUrl = imgUrl;
}
public String getImgUrl()
{
return imgUrl;
}
public void setVideoUrl(String videoUrl)
{
this.videoUrl = videoUrl;
}
public String getVideoUrl()
{
return videoUrl;
}
public void setCreateId(Long createId)
{
this.createId = createId;
}
public Long getCreateId()
{
return createId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceId", getDeviceId())
.append("markId", getMarkId())
.append("detailId", getDetailId())
.append("imgUrl", getImgUrl())
.append("videoUrl", getVideoUrl())
.append("remark", getRemark())
.append("createTime", getCreateTime())
.append("createId", getCreateId())
.toString();
}
}
......@@ -29,6 +29,8 @@ public class TProductMark extends BaseEntity
/** $column.columnComment */
private Long createId;
private String isDel;
public void setId(Long id)
{
this.id = id;
......@@ -66,6 +68,14 @@ public class TProductMark extends BaseEntity
return createId;
}
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -41,6 +41,8 @@ public class TProductPlan extends BaseEntity
/** 创建人 */
private Long createId;
private String isDel;
public void setId(Long id)
{
this.id = id;
......@@ -105,6 +107,14 @@ public class TProductPlan extends BaseEntity
return createId;
}
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.mapper.track;
import java.util.List;
import com.zehong.system.domain.track.TProductDevice;
/**
* 设备Mapper接口
*
* @author zehong
* @date 2024-08-28
*/
public interface TProductDeviceMapper
{
/**
* 查询设备
*
* @param id 设备ID
* @return 设备
*/
public TProductDevice selectTProductDeviceById(Long id);
/**
* 查询设备列表
*
* @param tProductDevice 设备
* @return 设备集合
*/
public List<TProductDevice> selectTProductDeviceList(TProductDevice tProductDevice);
/**
* 新增设备
*
* @param tProductDevice 设备
* @return 结果
*/
public int insertTProductDevice(TProductDevice tProductDevice);
/**
* 修改设备
*
* @param tProductDevice 设备
* @return 结果
*/
public int updateTProductDevice(TProductDevice tProductDevice);
/**
* 删除设备
*
* @param id 设备ID
* @return 结果
*/
public int deleteTProductDeviceById(Long id);
/**
* 批量删除设备
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTProductDeviceByIds(Long[] ids);
}
package com.zehong.system.mapper.track;
import java.util.List;
import com.zehong.system.domain.track.TProductDeviceMark;
/**
* 设备装配记录Mapper接口
*
* @author zehong
* @date 2024-08-28
*/
public interface TProductDeviceMarkMapper
{
/**
* 查询设备装配记录
*
* @param id 设备装配记录ID
* @return 设备装配记录
*/
public TProductDeviceMark selectTProductDeviceMarkById(Long id);
/**
* 查询设备装配记录列表
*
* @param tProductDeviceMark 设备装配记录
* @return 设备装配记录集合
*/
public List<TProductDeviceMark> selectTProductDeviceMarkList(TProductDeviceMark tProductDeviceMark);
/**
* 新增设备装配记录
*
* @param tProductDeviceMark 设备装配记录
* @return 结果
*/
public int insertTProductDeviceMark(TProductDeviceMark tProductDeviceMark);
/**
* 修改设备装配记录
*
* @param tProductDeviceMark 设备装配记录
* @return 结果
*/
public int updateTProductDeviceMark(TProductDeviceMark tProductDeviceMark);
/**
* 删除设备装配记录
*
* @param id 设备装配记录ID
* @return 结果
*/
public int deleteTProductDeviceMarkById(Long id);
/**
* 批量删除设备装配记录
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTProductDeviceMarkByIds(Long[] ids);
}
package com.zehong.system.mapper;
package com.zehong.system.mapper.track;
import java.util.List;
import com.zehong.system.domain.track.TProductInspectDetail;
......
package com.zehong.system.mapper;
package com.zehong.system.mapper.track;
import java.util.List;
import com.zehong.system.domain.track.TProductInspect;
......
package com.zehong.system.service.impl.track;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.track.TProductDeviceMarkMapper;
import com.zehong.system.domain.track.TProductDeviceMark;
import com.zehong.system.service.track.ITProductDeviceMarkService;
/**
* 设备装配记录Service业务层处理
*
* @author zehong
* @date 2024-08-28
*/
@Service
public class TProductDeviceMarkServiceImpl implements ITProductDeviceMarkService
{
@Autowired
private TProductDeviceMarkMapper tProductDeviceMarkMapper;
/**
* 查询设备装配记录
*
* @param id 设备装配记录ID
* @return 设备装配记录
*/
@Override
public TProductDeviceMark selectTProductDeviceMarkById(Long id)
{
return tProductDeviceMarkMapper.selectTProductDeviceMarkById(id);
}
/**
* 查询设备装配记录列表
*
* @param tProductDeviceMark 设备装配记录
* @return 设备装配记录
*/
@Override
public List<TProductDeviceMark> selectTProductDeviceMarkList(TProductDeviceMark tProductDeviceMark)
{
return tProductDeviceMarkMapper.selectTProductDeviceMarkList(tProductDeviceMark);
}
/**
* 新增设备装配记录
*
* @param tProductDeviceMark 设备装配记录
* @return 结果
*/
@Override
public int insertTProductDeviceMark(TProductDeviceMark tProductDeviceMark)
{
tProductDeviceMark.setCreateTime(DateUtils.getNowDate());
tProductDeviceMark.setCreateId(SecurityUtils.getLoginUser().getUser().getUserId());
return tProductDeviceMarkMapper.insertTProductDeviceMark(tProductDeviceMark);
}
/**
* 修改设备装配记录
*
* @param tProductDeviceMark 设备装配记录
* @return 结果
*/
@Override
public int updateTProductDeviceMark(TProductDeviceMark tProductDeviceMark)
{
return tProductDeviceMarkMapper.updateTProductDeviceMark(tProductDeviceMark);
}
/**
* 批量删除设备装配记录
*
* @param ids 需要删除的设备装配记录ID
* @return 结果
*/
@Override
public int deleteTProductDeviceMarkByIds(Long[] ids)
{
return tProductDeviceMarkMapper.deleteTProductDeviceMarkByIds(ids);
}
/**
* 删除设备装配记录信息
*
* @param id 设备装配记录ID
* @return 结果
*/
@Override
public int deleteTProductDeviceMarkById(Long id)
{
return tProductDeviceMarkMapper.deleteTProductDeviceMarkById(id);
}
}
package com.zehong.system.service.impl.track;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.track.TProductDevice;
import com.zehong.system.mapper.track.TProductDeviceMapper;
import com.zehong.system.service.track.ITProductDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
/**
* 设备Service业务层处理
*
* @author zehong
* @date 2024-08-28
*/
@Service
public class TProductDeviceServiceImpl implements ITProductDeviceService
{
@Autowired
private TProductDeviceMapper tProductDeviceMapper;
/**
* 查询设备
*
* @param id 设备ID
* @return 设备
*/
@Override
public TProductDevice selectTProductDeviceById(Long id)
{
return tProductDeviceMapper.selectTProductDeviceById(id);
}
/**
* 查询设备列表
*
* @param tProductDevice 设备
* @return 设备
*/
@Override
public List<TProductDevice> selectTProductDeviceList(TProductDevice tProductDevice)
{
return tProductDeviceMapper.selectTProductDeviceList(tProductDevice);
}
/**
* 新增设备
*
* @param tProductDevice 设备
* @return 结果
*/
@Override
public int insertTProductDevice(TProductDevice tProductDevice)
{
try{
tProductDevice.setCreateTime(DateUtils.getNowDate());
tProductDevice.setCreateId(SecurityUtils.getLoginUser().getUser().getUserId());
return tProductDeviceMapper.insertTProductDevice(tProductDevice);
}catch (Exception e){
Throwable cause = e.getCause();
if (cause instanceof SQLIntegrityConstraintViolationException){
String errMsg = cause.getMessage();
if (StringUtils.isNotEmpty(errMsg) && errMsg.contains("index_unique_device_no")){
throw new CustomException("设备编号不能重复");
}
}
throw e;
}
}
/**
* 修改设备
*
* @param tProductDevice 设备
* @return 结果
*/
@Override
public int updateTProductDevice(TProductDevice tProductDevice)
{
return tProductDeviceMapper.updateTProductDevice(tProductDevice);
}
/**
* 批量删除设备
*
* @param ids 需要删除的设备ID
* @return 结果
*/
@Override
public int deleteTProductDeviceByIds(Long[] ids)
{
return tProductDeviceMapper.deleteTProductDeviceByIds(ids);
}
/**
* 删除设备信息
*
* @param id 设备ID
* @return 结果
*/
@Override
public int deleteTProductDeviceById(Long id)
{
return tProductDeviceMapper.deleteTProductDeviceById(id);
}
}
......@@ -5,7 +5,7 @@ import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.track.TProductInspectDetail;
import com.zehong.system.domain.vo.HouseVo;
import com.zehong.system.mapper.TProductInspectDetailMapper;
import com.zehong.system.mapper.track.TProductInspectDetailMapper;
import com.zehong.system.service.track.ITProductInspectDetailService;
import com.zehong.system.service.track.ITProductStoreService;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -9,7 +9,7 @@ import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TProductInspectMapper;
import com.zehong.system.mapper.track.TProductInspectMapper;
import com.zehong.system.domain.track.TProductInspect;
import com.zehong.system.service.track.ITProductInspectService;
......
package com.zehong.system.service.track;
import java.util.List;
import com.zehong.system.domain.track.TProductDeviceMark;
/**
* 设备装配记录Service接口
*
* @author zehong
* @date 2024-08-28
*/
public interface ITProductDeviceMarkService
{
/**
* 查询设备装配记录
*
* @param id 设备装配记录ID
* @return 设备装配记录
*/
public TProductDeviceMark selectTProductDeviceMarkById(Long id);
/**
* 查询设备装配记录列表
*
* @param tProductDeviceMark 设备装配记录
* @return 设备装配记录集合
*/
public List<TProductDeviceMark> selectTProductDeviceMarkList(TProductDeviceMark tProductDeviceMark);
/**
* 新增设备装配记录
*
* @param tProductDeviceMark 设备装配记录
* @return 结果
*/
public int insertTProductDeviceMark(TProductDeviceMark tProductDeviceMark);
/**
* 修改设备装配记录
*
* @param tProductDeviceMark 设备装配记录
* @return 结果
*/
public int updateTProductDeviceMark(TProductDeviceMark tProductDeviceMark);
/**
* 批量删除设备装配记录
*
* @param ids 需要删除的设备装配记录ID
* @return 结果
*/
public int deleteTProductDeviceMarkByIds(Long[] ids);
/**
* 删除设备装配记录信息
*
* @param id 设备装配记录ID
* @return 结果
*/
public int deleteTProductDeviceMarkById(Long id);
}
package com.zehong.system.service.track;
import java.util.List;
import com.zehong.system.domain.track.TProductDevice;
/**
* 设备Service接口
*
* @author zehong
* @date 2024-08-28
*/
public interface ITProductDeviceService
{
/**
* 查询设备
*
* @param id 设备ID
* @return 设备
*/
public TProductDevice selectTProductDeviceById(Long id);
/**
* 查询设备列表
*
* @param tProductDevice 设备
* @return 设备集合
*/
public List<TProductDevice> selectTProductDeviceList(TProductDevice tProductDevice);
/**
* 新增设备
*
* @param tProductDevice 设备
* @return 结果
*/
public int insertTProductDevice(TProductDevice tProductDevice);
/**
* 修改设备
*
* @param tProductDevice 设备
* @return 结果
*/
public int updateTProductDevice(TProductDevice tProductDevice);
/**
* 批量删除设备
*
* @param ids 需要删除的设备ID
* @return 结果
*/
public int deleteTProductDeviceByIds(Long[] ids);
/**
* 删除设备信息
*
* @param id 设备ID
* @return 结果
*/
public int deleteTProductDeviceById(Long id);
}
<?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.zehong.system.mapper.track.TProductDeviceMapper">
<resultMap type="TProductDevice" id="TProductDeviceResult">
<result property="id" column="id" />
<result property="planId" column="plan_id" />
<result property="inspectId" column="inspect_id" />
<result property="deviceNo" column="device_no" />
<result property="title" column="title" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="createTime" column="create_time" />
<result property="createId" column="create_id" />
</resultMap>
<sql id="selectTProductDeviceVo">
SELECT
device.id,
device.plan_id,
device.inspect_id,
device.device_no,
device.title,
device.`STATUS`,
device.remark,
device.create_time,
device.create_id,
ins.batch_no as batchNo,
(select nick_name from sys_user us where us.user_id = device.create_id) as createBy
FROM
t_product_device device
LEFT JOIN t_product_inspect ins ON ins.id = device.inspect_id
</sql>
<select id="selectTProductDeviceList" parameterType="TProductDevice" resultMap="TProductDeviceResult">
<include refid="selectTProductDeviceVo"/>
<where>
<if test="inspectId != null "> and device.inspect_id like concat('%', #{inspectId}, '%')</if>
<if test="deviceNo != null and deviceNo != ''"> and device.device_no like concat('%', #{deviceNo}, '%')</if>
<if test="title != null and title != ''"> and device.title like concat('%', #{title}, '%')</if>
<if test="status != null and status != ''"> and device.status = #{status}</if>
</where>
order by device.create_time desc
</select>
<select id="selectTProductDeviceById" parameterType="Long" resultMap="TProductDeviceResult">
<include refid="selectTProductDeviceVo"/>
where device.id = #{id}
</select>
<insert id="insertTProductDevice" parameterType="TProductDevice" useGeneratedKeys="true" keyProperty="id">
insert into t_product_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="planId != null">plan_id,</if>
<if test="inspectId != null">inspect_id,</if>
<if test="deviceNo != null and deviceNo != ''">device_no,</if>
<if test="title != null and title != ''">title,</if>
<if test="status != null">status,</if>
<if test="remark != null">remark,</if>
<if test="createTime != null">create_time,</if>
<if test="createId != null">create_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="planId != null">#{planId},</if>
<if test="inspectId != null">#{inspectId},</if>
<if test="deviceNo != null and deviceNo != ''">#{deviceNo},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="status != null">#{status},</if>
<if test="remark != null">#{remark},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createId != null">#{createId},</if>
</trim>
</insert>
<update id="updateTProductDevice" parameterType="TProductDevice">
update t_product_device
<trim prefix="SET" suffixOverrides=",">
<if test="planId != null">plan_id = #{planId},</if>
<if test="inspectId != null">inspect_id = #{inspectId},</if>
<if test="deviceNo != null and deviceNo != ''">device_no = #{deviceNo},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createId != null">create_id = #{createId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTProductDeviceById" parameterType="Long">
delete from t_product_device where id = #{id}
</delete>
<delete id="deleteTProductDeviceByIds" parameterType="String">
delete from t_product_device where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.zehong.system.mapper.track.TProductDeviceMarkMapper">
<resultMap type="TProductDeviceMark" id="TProductDeviceMarkResult">
<result property="id" column="id" />
<result property="deviceId" column="device_id" />
<result property="markId" column="mark_id" />
<result property="detailId" column="detail_id" />
<result property="imgUrl" column="img_url" />
<result property="videoUrl" column="video_url" />
<result property="remark" column="remark" />
<result property="createTime" column="create_time" />
<result property="createId" column="create_id" />
</resultMap>
<sql id="selectTProductDeviceMarkVo">
select id, device_id, mark_id, detail_id, img_url, video_url, remark, create_time, create_id from t_product_device_mark
</sql>
<select id="selectTProductDeviceMarkList" parameterType="TProductDeviceMark" resultMap="TProductDeviceMarkResult">
<include refid="selectTProductDeviceMarkVo"/>
<where>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="markId != null "> and mark_id = #{markId}</if>
<if test="detailId != null "> and detail_id = #{detailId}</if>
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
<if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
<if test="createId != null "> and create_id = #{createId}</if>
</where>
</select>
<select id="selectTProductDeviceMarkById" parameterType="Long" resultMap="TProductDeviceMarkResult">
<include refid="selectTProductDeviceMarkVo"/>
where id = #{id}
</select>
<insert id="insertTProductDeviceMark" parameterType="TProductDeviceMark" useGeneratedKeys="true" keyProperty="id">
insert into t_product_device_mark
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceId != null">device_id,</if>
<if test="markId != null">mark_id,</if>
<if test="detailId != null">detail_id,</if>
<if test="imgUrl != null">img_url,</if>
<if test="videoUrl != null">video_url,</if>
<if test="remark != null">remark,</if>
<if test="createTime != null">create_time,</if>
<if test="createId != null">create_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceId != null">#{deviceId},</if>
<if test="markId != null">#{markId},</if>
<if test="detailId != null">#{detailId},</if>
<if test="imgUrl != null">#{imgUrl},</if>
<if test="videoUrl != null">#{videoUrl},</if>
<if test="remark != null">#{remark},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createId != null">#{createId},</if>
</trim>
</insert>
<update id="updateTProductDeviceMark" parameterType="TProductDeviceMark">
update t_product_device_mark
<trim prefix="SET" suffixOverrides=",">
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="markId != null">mark_id = #{markId},</if>
<if test="detailId != null">detail_id = #{detailId},</if>
<if test="imgUrl != null">img_url = #{imgUrl},</if>
<if test="videoUrl != null">video_url = #{videoUrl},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createId != null">create_id = #{createId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTProductDeviceMarkById" parameterType="Long">
delete from t_product_device_mark where id = #{id}
</delete>
<delete id="deleteTProductDeviceMarkByIds" parameterType="String">
delete from t_product_device_mark where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -35,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="source != null and source != ''"> and source = #{source}</if>
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
<if test="createId != null "> and create_id = #{createId}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
and is_del = '0'
</where>
order by create_time desc
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TProductInspectDetailMapper">
<mapper namespace="com.zehong.system.mapper.track.TProductInspectDetailMapper">
<resultMap type="TProductInspectDetail" id="TProductInspectDetailResult">
<result property="id" column="id" />
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TProductInspectMapper">
<mapper namespace="com.zehong.system.mapper.track.TProductInspectMapper">
<resultMap type="TProductInspect" id="TProductInspectResult">
<result property="id" column="id" />
......@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="status" column="status" />
<result property="createTime" column="create_time" />
<result property="createId" column="create_id" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTProductInspectVo">
......@@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="batchNo != null and batchNo != ''"> and ins.batch_no = #{batchNo}</if>
<if test="status != null and status != ''"> and ins.status = #{status}</if>
and ins.is_del = '0'
</where>
order by ins.create_time desc
</select>
......@@ -59,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
<if test="createId != null">create_id,</if>
<if test="isDel != null">is_del,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="planId != null">#{planId},</if>
......@@ -69,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createId != null">#{createId},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</insert>
......@@ -83,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createId != null">create_id = #{createId},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where id = #{id}
</update>
......@@ -92,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTProductInspectByIds" parameterType="String">
delete from t_product_inspect where id in
update t_product_inspect set is_del = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
......
......@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="content" column="content" />
<result property="createTime" column="create_time" />
<result property="createId" column="create_id" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTProductMarkVo">
......@@ -20,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTProductMarkVo"/>
<where>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
and is_del = '0'
</where>
order by create_time desc
</select>
......@@ -36,12 +38,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''">content,</if>
<if test="createTime != null">create_time,</if>
<if test="createId != null">create_id,</if>
<if test="isDel != null">is_del,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createId != null">#{createId},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</insert>
......@@ -52,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content != null and content != ''">content = #{content},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createId != null">create_id = #{createId},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where id = #{id}
</update>
......@@ -61,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTProductMarkByIds" parameterType="String">
delete from t_product_mark where id in
update t_product_mark set is_del = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
......
......@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="status" column="status" />
<result property="createTime" column="create_time" />
<result property="createId" column="create_id" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTProductPlanVo">
......@@ -25,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="planNo != null and planNo != ''"> and plan_no like concat('%', #{planNo}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
and is_del = '0'
</where>
order by create_time desc
</select>
......@@ -44,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
<if test="createId != null">create_id,</if>
<if test="isDel != null">is_del,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">#{title},</if>
......@@ -53,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createId != null">#{createId},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</insert>
......@@ -66,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createId != null">create_id = #{createId},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where id = #{id}
</update>
......@@ -75,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTProductPlanByIds" parameterType="String">
delete from t_product_plan where id in
update t_product_plan set is_del = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
......
import request from '@/utils/request'
// 查询设备列表
export function listDevice(query) {
return request({
url: '/track/device/list',
method: 'get',
params: query
})
}
// 查询设备详细
export function getDevice(id) {
return request({
url: '/track/device/' + id,
method: 'get'
})
}
// 新增设备
export function addDevice(data) {
return request({
url: '/track/device',
method: 'post',
data: data
})
}
// 修改设备
export function updateDevice(data) {
return request({
url: '/track/device',
method: 'put',
data: data
})
}
// 删除设备
export function delDevice(id) {
return request({
url: '/track/device/' + id,
method: 'delete'
})
}
// 导出设备
export function exportDevice(query) {
return request({
url: '/track/device/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询设备装配记录列表
export function listMark(query) {
return request({
url: '/track/deviceMark/list',
method: 'get',
params: query
})
}
// 查询设备装配记录详细
export function getMark(id) {
return request({
url: '/track/deviceMark/' + id,
method: 'get'
})
}
// 新增设备装配记录
export function addMark(data) {
return request({
url: '/track/deviceMark',
method: 'post',
data: data
})
}
// 修改设备装配记录
export function updateMark(data) {
return request({
url: '/track/deviceMark',
method: 'put',
data: data
})
}
// 删除设备装配记录
export function delMark(id) {
return request({
url: '/track/deviceMark/' + id,
method: 'delete'
})
}
// 导出设备装配记录
export function exportMark(query) {
return request({
url: '/track/deviceMark/export',
method: 'get',
params: query
})
}
......@@ -51,3 +51,12 @@ export function exportInspect(query) {
params: query
})
}
//所有执行
export function executeInfoList(query) {
return request({
url: '/track/execute/executeInfoList',
method: 'get',
params: query
})
}
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="800px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="90px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="批次号">
<span v-if="detailInfo.batchNo">{{ detailInfo.batchNo }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备编号">
<span v-if="detailInfo.deviceNo">{{ detailInfo.deviceNo }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备名称">
<span v-if="detailInfo.title">{{ detailInfo.title }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备状态">
<span v-if="detailInfo.title">{{ $parent.statusFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间">
<span v-if="detailInfo.createTime">{{ detailInfo.createTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建人">
<span v-if="detailInfo.createBy">{{ detailInfo.createBy }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="设备备注">
<span v-if="detailInfo.remark">{{ detailInfo.remark }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script>
import { getDevice } from "@/api/track/device";
export default {
name: "detail-info",
data(){
return{
detailOpen: false,
detailInfo: {}
}
},
methods:{
getDetailInfo(id){
getDevice(id).then(res =>{
if(res.code == 200){
this.detailInfo = res.data;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
......@@ -176,7 +176,7 @@
<el-col :span="12">
<el-form-item label="执行状态" prop="status">
<el-select style="width: 100%" v-model="form.status" placeholder="请选择执行状态" clearable size="small">
<el-select style="width: 100% " v-model="form.status" placeholder="请选择执行状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment