完成 巡检
parent
bb6ec4c7ef
commit
d8db57ef15
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.manage.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.manage.domain.RecordInspection;
|
||||
import com.ruoyi.manage.service.IRecordInspectionService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 巡检记录Controller
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/manage/record_inspection")
|
||||
public class RecordInspectionController extends BaseController
|
||||
{
|
||||
private String prefix = "manage/record_inspection";
|
||||
|
||||
@Autowired
|
||||
private IRecordInspectionService recordInspectionService;
|
||||
|
||||
@RequiresPermissions("manage:record_inspection:view")
|
||||
@GetMapping()
|
||||
public String record_inspection()
|
||||
{
|
||||
return prefix + "/record_inspection";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询巡检记录列表
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(RecordInspection recordInspection)
|
||||
{
|
||||
startPage();
|
||||
List<RecordInspection> list = recordInspectionService.selectRecordInspectionList(recordInspection);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检记录列表
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection:export")
|
||||
@Log(title = "巡检记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(RecordInspection recordInspection)
|
||||
{
|
||||
List<RecordInspection> list = recordInspectionService.selectRecordInspectionList(recordInspection);
|
||||
ExcelUtil<RecordInspection> util = new ExcelUtil<RecordInspection>(RecordInspection.class);
|
||||
return util.exportExcel(list, "巡检记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检记录
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存巡检记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection:add")
|
||||
@Log(title = "巡检记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(RecordInspection recordInspection)
|
||||
{
|
||||
return toAjax(recordInspectionService.insertRecordInspection(recordInspection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection:edit")
|
||||
@GetMapping("/edit/{inspectionId}")
|
||||
public String edit(@PathVariable("inspectionId") Long inspectionId, ModelMap mmap)
|
||||
{
|
||||
RecordInspection recordInspection = recordInspectionService.selectRecordInspectionByInspectionId(inspectionId);
|
||||
mmap.put("recordInspection", recordInspection);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存巡检记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection:edit")
|
||||
@Log(title = "巡检记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(RecordInspection recordInspection)
|
||||
{
|
||||
return toAjax(recordInspectionService.updateRecordInspection(recordInspection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection:remove")
|
||||
@Log(title = "巡检记录", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(recordInspectionService.deleteRecordInspectionByInspectionIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.manage.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.manage.domain.RecordInspectionInfo;
|
||||
import com.ruoyi.manage.service.IRecordInspectionInfoService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 盘点数据记录Controller
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/manage/record_inspection_info")
|
||||
public class RecordInspectionInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "manage/record_inspection_info";
|
||||
|
||||
@Autowired
|
||||
private IRecordInspectionInfoService recordInspectionInfoService;
|
||||
|
||||
@RequiresPermissions("manage:record_inspection_info:view")
|
||||
@GetMapping()
|
||||
public String record_inspection_info()
|
||||
{
|
||||
return prefix + "/record_inspection_info";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询盘点数据记录列表
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection_info:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(RecordInspectionInfo recordInspectionInfo)
|
||||
{
|
||||
startPage();
|
||||
List<RecordInspectionInfo> list = recordInspectionInfoService.selectRecordInspectionInfoList(recordInspectionInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出盘点数据记录列表
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection_info:export")
|
||||
@Log(title = "盘点数据记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(RecordInspectionInfo recordInspectionInfo)
|
||||
{
|
||||
List<RecordInspectionInfo> list = recordInspectionInfoService.selectRecordInspectionInfoList(recordInspectionInfo);
|
||||
ExcelUtil<RecordInspectionInfo> util = new ExcelUtil<RecordInspectionInfo>(RecordInspectionInfo.class);
|
||||
return util.exportExcel(list, "盘点数据记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增盘点数据记录
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存盘点数据记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection_info:add")
|
||||
@Log(title = "盘点数据记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(RecordInspectionInfo recordInspectionInfo)
|
||||
{
|
||||
return toAjax(recordInspectionInfoService.insertRecordInspectionInfo(recordInspectionInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改盘点数据记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection_info:edit")
|
||||
@GetMapping("/edit/{inspectionId}")
|
||||
public String edit(@PathVariable("inspectionId") Long inspectionId, ModelMap mmap)
|
||||
{
|
||||
RecordInspectionInfo recordInspectionInfo = recordInspectionInfoService.selectRecordInspectionInfoByInspectionId(inspectionId);
|
||||
mmap.put("recordInspectionInfo", recordInspectionInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存盘点数据记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection_info:edit")
|
||||
@Log(title = "盘点数据记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(RecordInspectionInfo recordInspectionInfo)
|
||||
{
|
||||
return toAjax(recordInspectionInfoService.updateRecordInspectionInfo(recordInspectionInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除盘点数据记录
|
||||
*/
|
||||
@RequiresPermissions("manage:record_inspection_info:remove")
|
||||
@Log(title = "盘点数据记录", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(recordInspectionInfoService.deleteRecordInspectionInfoByInspectionIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.manage.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 巡检记录对象 record_inspection
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
public class RecordInspection extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long inspectionId;
|
||||
|
||||
/** 巡检时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date inspectionTime;
|
||||
|
||||
/** 巡检人 */
|
||||
@Excel(name = "巡检人")
|
||||
private String inspectionUser;
|
||||
|
||||
private int totalNumber;
|
||||
private int normalNumber;
|
||||
private int abnormalNumber;
|
||||
private int skipNumber;
|
||||
|
||||
public void setInspectionId(Long inspectionId)
|
||||
{
|
||||
this.inspectionId = inspectionId;
|
||||
}
|
||||
|
||||
public Long getInspectionId()
|
||||
{
|
||||
return inspectionId;
|
||||
}
|
||||
public void setInspectionTime(Date inspectionTime)
|
||||
{
|
||||
this.inspectionTime = inspectionTime;
|
||||
}
|
||||
|
||||
public Date getInspectionTime()
|
||||
{
|
||||
return inspectionTime;
|
||||
}
|
||||
public void setInspectionUser(String inspectionUser)
|
||||
{
|
||||
this.inspectionUser = inspectionUser;
|
||||
}
|
||||
|
||||
public String getInspectionUser()
|
||||
{
|
||||
return inspectionUser;
|
||||
}
|
||||
|
||||
public int getTotalNumber() {
|
||||
return totalNumber;
|
||||
}
|
||||
|
||||
public void setTotalNumber(int totalNumber) {
|
||||
this.totalNumber = totalNumber;
|
||||
}
|
||||
|
||||
public int getNormalNumber() {
|
||||
return normalNumber;
|
||||
}
|
||||
|
||||
public void setNormalNumber(int normalNumber) {
|
||||
this.normalNumber = normalNumber;
|
||||
}
|
||||
|
||||
public int getAbnormalNumber() {
|
||||
return abnormalNumber;
|
||||
}
|
||||
|
||||
public void setAbnormalNumber(int abnormalNumber) {
|
||||
this.abnormalNumber = abnormalNumber;
|
||||
}
|
||||
|
||||
public int getSkipNumber() {
|
||||
return skipNumber;
|
||||
}
|
||||
|
||||
public void setSkipNumber(int skipNumber) {
|
||||
this.skipNumber = skipNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("inspectionId", getInspectionId())
|
||||
.append("inspectionTime", getInspectionTime())
|
||||
.append("inspectionUser", getInspectionUser())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.ruoyi.manage.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 盘点数据记录对象 record_inspection_info
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
public class RecordInspectionInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 外键 */
|
||||
@Excel(name = "外键")
|
||||
private Long inspectionId;
|
||||
|
||||
/** RFID */
|
||||
@Excel(name = "RFID")
|
||||
private String epcCode;
|
||||
|
||||
/** 机位码 */
|
||||
@Excel(name = "机位码")
|
||||
private String locationCode;
|
||||
|
||||
/** 巡检结果 */
|
||||
@Excel(name = "巡检结果")
|
||||
private String inspectionState;
|
||||
|
||||
/** 异常原因 */
|
||||
@Excel(name = "异常原因")
|
||||
private String inspectionRemark;
|
||||
|
||||
public void setInspectionId(Long inspectionId)
|
||||
{
|
||||
this.inspectionId = inspectionId;
|
||||
}
|
||||
|
||||
public Long getInspectionId()
|
||||
{
|
||||
return inspectionId;
|
||||
}
|
||||
public void setEpcCode(String epcCode)
|
||||
{
|
||||
this.epcCode = epcCode;
|
||||
}
|
||||
|
||||
public String getEpcCode()
|
||||
{
|
||||
return epcCode;
|
||||
}
|
||||
public void setLocationCode(String locationCode)
|
||||
{
|
||||
this.locationCode = locationCode;
|
||||
}
|
||||
|
||||
public String getLocationCode()
|
||||
{
|
||||
return locationCode;
|
||||
}
|
||||
public void setInspectionState(String inspectionState)
|
||||
{
|
||||
this.inspectionState = inspectionState;
|
||||
}
|
||||
|
||||
public String getInspectionState()
|
||||
{
|
||||
return inspectionState;
|
||||
}
|
||||
public void setInspectionRemark(String inspectionRemark)
|
||||
{
|
||||
this.inspectionRemark = inspectionRemark;
|
||||
}
|
||||
|
||||
public String getInspectionRemark()
|
||||
{
|
||||
return inspectionRemark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("inspectionId", getInspectionId())
|
||||
.append("epcCode", getEpcCode())
|
||||
.append("locationCode", getLocationCode())
|
||||
.append("inspectionState", getInspectionState())
|
||||
.append("inspectionRemark", getInspectionRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manage.domain.RecordInspectionInfo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
/**
|
||||
* 盘点数据记录Mapper接口
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Repository
|
||||
public interface RecordInspectionInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询盘点数据记录
|
||||
*
|
||||
* @param inspectionId 盘点数据记录主键
|
||||
* @return 盘点数据记录
|
||||
*/
|
||||
public RecordInspectionInfo selectRecordInspectionInfoByInspectionId(Long inspectionId);
|
||||
|
||||
/**
|
||||
* 查询盘点数据记录列表
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 盘点数据记录集合
|
||||
*/
|
||||
public List<RecordInspectionInfo> selectRecordInspectionInfoList(RecordInspectionInfo recordInspectionInfo);
|
||||
|
||||
/**
|
||||
* 新增盘点数据记录
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordInspectionInfo(RecordInspectionInfo recordInspectionInfo);
|
||||
|
||||
/**
|
||||
* 修改盘点数据记录
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordInspectionInfo(RecordInspectionInfo recordInspectionInfo);
|
||||
|
||||
/**
|
||||
* 删除盘点数据记录
|
||||
*
|
||||
* @param inspectionId 盘点数据记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionInfoByInspectionId(Long inspectionId);
|
||||
|
||||
/**
|
||||
* 批量删除盘点数据记录
|
||||
*
|
||||
* @param inspectionIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionInfoByInspectionIds(String[] inspectionIds);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manage.domain.RecordInspection;
|
||||
import org.springframework.stereotype.Repository;
|
||||
/**
|
||||
* 巡检记录Mapper接口
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Repository
|
||||
public interface RecordInspectionMapper
|
||||
{
|
||||
/**
|
||||
* 查询巡检记录
|
||||
*
|
||||
* @param inspectionId 巡检记录主键
|
||||
* @return 巡检记录
|
||||
*/
|
||||
public RecordInspection selectRecordInspectionByInspectionId(Long inspectionId);
|
||||
|
||||
/**
|
||||
* 查询巡检记录列表
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 巡检记录集合
|
||||
*/
|
||||
public List<RecordInspection> selectRecordInspectionList(RecordInspection recordInspection);
|
||||
|
||||
/**
|
||||
* 新增巡检记录
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordInspection(RecordInspection recordInspection);
|
||||
|
||||
/**
|
||||
* 修改巡检记录
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordInspection(RecordInspection recordInspection);
|
||||
|
||||
/**
|
||||
* 删除巡检记录
|
||||
*
|
||||
* @param inspectionId 巡检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionByInspectionId(Long inspectionId);
|
||||
|
||||
/**
|
||||
* 批量删除巡检记录
|
||||
*
|
||||
* @param inspectionIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionByInspectionIds(String[] inspectionIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manage.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manage.domain.RecordInspectionInfo;
|
||||
|
||||
/**
|
||||
* 盘点数据记录Service接口
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
public interface IRecordInspectionInfoService
|
||||
{
|
||||
/**
|
||||
* 查询盘点数据记录
|
||||
*
|
||||
* @param inspectionId 盘点数据记录主键
|
||||
* @return 盘点数据记录
|
||||
*/
|
||||
public RecordInspectionInfo selectRecordInspectionInfoByInspectionId(Long inspectionId);
|
||||
|
||||
/**
|
||||
* 查询盘点数据记录列表
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 盘点数据记录集合
|
||||
*/
|
||||
public List<RecordInspectionInfo> selectRecordInspectionInfoList(RecordInspectionInfo recordInspectionInfo);
|
||||
|
||||
/**
|
||||
* 新增盘点数据记录
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordInspectionInfo(RecordInspectionInfo recordInspectionInfo);
|
||||
|
||||
/**
|
||||
* 修改盘点数据记录
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordInspectionInfo(RecordInspectionInfo recordInspectionInfo);
|
||||
|
||||
/**
|
||||
* 批量删除盘点数据记录
|
||||
*
|
||||
* @param inspectionIds 需要删除的盘点数据记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionInfoByInspectionIds(String inspectionIds);
|
||||
|
||||
/**
|
||||
* 删除盘点数据记录信息
|
||||
*
|
||||
* @param inspectionId 盘点数据记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionInfoByInspectionId(Long inspectionId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.manage.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.manage.domain.RecordInspection;
|
||||
|
||||
/**
|
||||
* 巡检记录Service接口
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
public interface IRecordInspectionService
|
||||
{
|
||||
/**
|
||||
* 查询巡检记录
|
||||
*
|
||||
* @param inspectionId 巡检记录主键
|
||||
* @return 巡检记录
|
||||
*/
|
||||
public RecordInspection selectRecordInspectionByInspectionId(Long inspectionId);
|
||||
|
||||
/**
|
||||
* 查询巡检记录列表
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 巡检记录集合
|
||||
*/
|
||||
public List<RecordInspection> selectRecordInspectionList(RecordInspection recordInspection);
|
||||
|
||||
/**
|
||||
* 新增巡检记录
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecordInspection(RecordInspection recordInspection);
|
||||
|
||||
/**
|
||||
* 修改巡检记录
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecordInspection(RecordInspection recordInspection);
|
||||
|
||||
/**
|
||||
* 批量删除巡检记录
|
||||
*
|
||||
* @param inspectionIds 需要删除的巡检记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionByInspectionIds(String inspectionIds);
|
||||
|
||||
/**
|
||||
* 删除巡检记录信息
|
||||
*
|
||||
* @param inspectionId 巡检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecordInspectionByInspectionId(Long inspectionId);
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.manage.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.manage.mapper.RecordInspectionInfoMapper;
|
||||
import com.ruoyi.manage.domain.RecordInspectionInfo;
|
||||
import com.ruoyi.manage.service.IRecordInspectionInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 盘点数据记录Service业务层处理
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Service
|
||||
public class RecordInspectionInfoServiceImpl implements IRecordInspectionInfoService {
|
||||
@Autowired
|
||||
private RecordInspectionInfoMapper recordInspectionInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询盘点数据记录
|
||||
*
|
||||
* @param inspectionId 盘点数据记录主键
|
||||
* @return 盘点数据记录
|
||||
*/
|
||||
@Override
|
||||
public RecordInspectionInfo selectRecordInspectionInfoByInspectionId(Long inspectionId) {
|
||||
return recordInspectionInfoMapper.selectRecordInspectionInfoByInspectionId(inspectionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询盘点数据记录列表
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 盘点数据记录
|
||||
*/
|
||||
@Override
|
||||
public List<RecordInspectionInfo> selectRecordInspectionInfoList(RecordInspectionInfo recordInspectionInfo) {
|
||||
return recordInspectionInfoMapper.selectRecordInspectionInfoList(recordInspectionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增盘点数据记录
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecordInspectionInfo(RecordInspectionInfo recordInspectionInfo) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return recordInspectionInfoMapper.insertRecordInspectionInfo(recordInspectionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改盘点数据记录
|
||||
*
|
||||
* @param recordInspectionInfo 盘点数据记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordInspectionInfo(RecordInspectionInfo recordInspectionInfo) {
|
||||
return recordInspectionInfoMapper.updateRecordInspectionInfo(recordInspectionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除盘点数据记录
|
||||
*
|
||||
* @param inspectionIds 需要删除的盘点数据记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordInspectionInfoByInspectionIds(String inspectionIds) {
|
||||
return recordInspectionInfoMapper.deleteRecordInspectionInfoByInspectionIds(Convert.toStrArray(inspectionIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除盘点数据记录信息
|
||||
*
|
||||
* @param inspectionId 盘点数据记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordInspectionInfoByInspectionId(Long inspectionId) {
|
||||
return recordInspectionInfoMapper.deleteRecordInspectionInfoByInspectionId(inspectionId);
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.manage.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import com.ruoyi.manage.mapper.RecordInspectionInfoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.manage.mapper.RecordInspectionMapper;
|
||||
import com.ruoyi.manage.domain.RecordInspection;
|
||||
import com.ruoyi.manage.service.IRecordInspectionService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 巡检记录Service业务层处理
|
||||
*
|
||||
* @author wangh
|
||||
* @date 2024-02-18
|
||||
*/
|
||||
@Service
|
||||
public class RecordInspectionServiceImpl implements IRecordInspectionService {
|
||||
@Autowired
|
||||
private RecordInspectionMapper recordInspectionMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检记录
|
||||
*
|
||||
* @param inspectionId 巡检记录主键
|
||||
* @return 巡检记录
|
||||
*/
|
||||
@Override
|
||||
public RecordInspection selectRecordInspectionByInspectionId(Long inspectionId) {
|
||||
return recordInspectionMapper.selectRecordInspectionByInspectionId(inspectionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询巡检记录列表
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 巡检记录
|
||||
*/
|
||||
@Override
|
||||
public List<RecordInspection> selectRecordInspectionList(RecordInspection recordInspection) {
|
||||
return recordInspectionMapper.selectRecordInspectionList(recordInspection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检记录
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecordInspection(RecordInspection recordInspection) {
|
||||
return recordInspectionMapper.insertRecordInspection(recordInspection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检记录
|
||||
*
|
||||
* @param recordInspection 巡检记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecordInspection(RecordInspection recordInspection) {
|
||||
return recordInspectionMapper.updateRecordInspection(recordInspection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除巡检记录
|
||||
*
|
||||
* @param inspectionIds 需要删除的巡检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Autowired
|
||||
private RecordInspectionInfoMapper infoMapper;
|
||||
@Override
|
||||
public int deleteRecordInspectionByInspectionIds(String inspectionIds) {
|
||||
String[] inspectionIds1 = Convert.toStrArray(inspectionIds);
|
||||
infoMapper.deleteRecordInspectionInfoByInspectionIds(inspectionIds1);
|
||||
return recordInspectionMapper.deleteRecordInspectionByInspectionIds(inspectionIds1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检记录信息
|
||||
*
|
||||
* @param inspectionId 巡检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecordInspectionByInspectionId(Long inspectionId) {
|
||||
infoMapper.deleteRecordInspectionInfoByInspectionId(inspectionId);
|
||||
return recordInspectionMapper.deleteRecordInspectionByInspectionId(inspectionId);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('巡检记录', '2026', '6', '/manage/record_inspection', 'C', '0', 'manage:record_inspection:view', '#', 'admin', sysdate(), '', null, '巡检记录菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('巡检记录查询', @parentId, '1', '#', 'F', '0', 'manage:record_inspection:list', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('巡检记录新增', @parentId, '2', '#', 'F', '0', 'manage:record_inspection:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('巡检记录修改', @parentId, '3', '#', 'F', '0', 'manage:record_inspection:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('巡检记录删除', @parentId, '4', '#', 'F', '0', 'manage:record_inspection:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('巡检记录导出', @parentId, '5', '#', 'F', '0', 'manage:record_inspection:export', '#', 'admin', sysdate(), '', null, '');
|
@ -0,0 +1,22 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('盘点数据记录', '2026', '1', '/manage/record_inspection_info', 'C', '0', 'manage:record_inspection_info:view', '#', 'admin', sysdate(), '', null, '盘点数据记录菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('盘点数据记录查询', @parentId, '1', '#', 'F', '0', 'manage:record_inspection_info:list', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('盘点数据记录新增', @parentId, '2', '#', 'F', '0', 'manage:record_inspection_info:add', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('盘点数据记录修改', @parentId, '3', '#', 'F', '0', 'manage:record_inspection_info:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('盘点数据记录删除', @parentId, '4', '#', 'F', '0', 'manage:record_inspection_info:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('盘点数据记录导出', @parentId, '5', '#', 'F', '0', 'manage:record_inspection_info:export', '#', 'admin', sysdate(), '', null, '');
|
@ -0,0 +1,75 @@
|
||||
<?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.ruoyi.manage.mapper.RecordInspectionInfoMapper">
|
||||
|
||||
<resultMap type="RecordInspectionInfo" id="RecordInspectionInfoResult">
|
||||
<result property="inspectionId" column="inspection_id" />
|
||||
<result property="epcCode" column="epc_code" />
|
||||
<result property="locationCode" column="location_code" />
|
||||
<result property="inspectionState" column="inspection_state" />
|
||||
<result property="inspectionRemark" column="inspection_remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecordInspectionInfoVo">
|
||||
select inspection_id, epc_code, location_code, inspection_state, inspection_remark from record_inspection_info
|
||||
</sql>
|
||||
|
||||
<select id="selectRecordInspectionInfoList" parameterType="RecordInspectionInfo" resultMap="RecordInspectionInfoResult">
|
||||
<include refid="selectRecordInspectionInfoVo"/>
|
||||
<where>
|
||||
<if test="inspectionId != null "> and inspection_id = #{inspectionId}</if>
|
||||
<if test="epcCode != null and epcCode != ''"> and epc_code = #{epcCode}</if>
|
||||
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||
<if test="inspectionState != null and inspectionState != ''"> and inspection_state = #{inspectionState}</if>
|
||||
<if test="inspectionRemark != null and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRecordInspectionInfoByInspectionId" parameterType="Long" resultMap="RecordInspectionInfoResult">
|
||||
<include refid="selectRecordInspectionInfoVo"/>
|
||||
where inspection_id = #{inspectionId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordInspectionInfo" parameterType="RecordInspectionInfo">
|
||||
insert into record_inspection_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="inspectionId != null">inspection_id,</if>
|
||||
<if test="epcCode != null">epc_code,</if>
|
||||
<if test="locationCode != null">location_code,</if>
|
||||
<if test="inspectionState != null">inspection_state,</if>
|
||||
<if test="inspectionRemark != null">inspection_remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="inspectionId != null">#{inspectionId},</if>
|
||||
<if test="epcCode != null">#{epcCode},</if>
|
||||
<if test="locationCode != null">#{locationCode},</if>
|
||||
<if test="inspectionState != null">#{inspectionState},</if>
|
||||
<if test="inspectionRemark != null">#{inspectionRemark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordInspectionInfo" parameterType="RecordInspectionInfo">
|
||||
update record_inspection_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="epcCode != null">epc_code = #{epcCode},</if>
|
||||
<if test="locationCode != null">location_code = #{locationCode},</if>
|
||||
<if test="inspectionState != null">inspection_state = #{inspectionState},</if>
|
||||
<if test="inspectionRemark != null">inspection_remark = #{inspectionRemark},</if>
|
||||
</trim>
|
||||
where inspection_id = #{inspectionId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordInspectionInfoByInspectionId" parameterType="Long">
|
||||
delete from record_inspection_info where inspection_id = #{inspectionId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordInspectionInfoByInspectionIds" parameterType="String">
|
||||
delete from record_inspection_info where inspection_id in
|
||||
<foreach item="inspectionId" collection="array" open="(" separator="," close=")">
|
||||
#{inspectionId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,81 @@
|
||||
<?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.ruoyi.manage.mapper.RecordInspectionMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.manage.domain.RecordInspection" id="RecordInspectionResult">
|
||||
<result property="inspectionId" column="inspection_id"/>
|
||||
<result property="inspectionTime" column="inspection_time"/>
|
||||
<result property="inspectionUser" column="inspection_user"/>
|
||||
<result property="totalNumber" column="total_number"/>
|
||||
<result property="normalNumber" column="normal_number"/>
|
||||
<result property="abnormalNumber" column="abnormal_number"/>
|
||||
<result property="skipNumber" column="skip_number"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecordInspectionVo">
|
||||
select inspection_id, inspection_time, inspection_user
|
||||
from record_inspection
|
||||
</sql>
|
||||
|
||||
<select id="selectRecordInspectionList" parameterType="RecordInspection" resultMap="RecordInspectionResult">
|
||||
select ri.inspection_id,
|
||||
inspection_time,
|
||||
inspection_user,
|
||||
count(rii.inspection_id) as total_number,
|
||||
count(if(inspection_state = '正常', true, null)) as normal_number,
|
||||
count(if(inspection_state = '异常', true, null)) as abnormal_number,
|
||||
count(if(inspection_state = '跳过', true, null)) as skip_number
|
||||
from record_inspection ri
|
||||
left join record_inspection_info rii on ri.inspection_id = rii.inspection_id
|
||||
<where>
|
||||
<if test="params.beginInspectionTime != null and params.beginInspectionTime != '' and params.endInspectionTime != null and params.endInspectionTime != ''">
|
||||
and inspection_time between #{params.beginInspectionTime} and #{params.endInspectionTime}
|
||||
</if>
|
||||
<if test="inspectionUser != null ">and inspection_user = #{inspectionUser}</if>
|
||||
</where>
|
||||
group by ri.inspection_id
|
||||
</select>
|
||||
|
||||
<select id="selectRecordInspectionByInspectionId" parameterType="Long" resultMap="RecordInspectionResult">
|
||||
<include refid="selectRecordInspectionVo"/>
|
||||
where inspection_id = #{inspectionId}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecordInspection" parameterType="RecordInspection" useGeneratedKeys="true"
|
||||
keyProperty="inspectionId">
|
||||
insert into record_inspection
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="inspectionTime != null">inspection_time,</if>
|
||||
<if test="inspectionUser != null">inspection_user,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="inspectionTime != null">#{inspectionTime},</if>
|
||||
<if test="inspectionUser != null">#{inspectionUser},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecordInspection" parameterType="RecordInspection">
|
||||
update record_inspection
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
|
||||
<if test="inspectionUser != null">inspection_user = #{inspectionUser},</if>
|
||||
</trim>
|
||||
where inspection_id = #{inspectionId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecordInspectionByInspectionId" parameterType="Long">
|
||||
delete
|
||||
from record_inspection
|
||||
where inspection_id = #{inspectionId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecordInspectionByInspectionIds" parameterType="String">
|
||||
delete from record_inspection where inspection_id in
|
||||
<foreach item="inspectionId" collection="array" open="(" separator="," close=")">
|
||||
#{inspectionId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增巡检记录')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-record_inspection-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">巡检时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="inspectionTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">巡检人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="inspectionUser" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "manage/record_inspection"
|
||||
$("#form-record_inspection-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-record_inspection-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='inspectionTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改巡检记录')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-record_inspection-edit" th:object="${recordInspection}">
|
||||
<input name="inspectionId" th:field="*{inspectionId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">巡检时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="inspectionTime" th:value="${#dates.format(recordInspection.inspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">巡检人:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="inspectionUser" th:field="*{inspectionUser}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "manage/record_inspection";
|
||||
$("#form-record_inspection-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-record_inspection-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='inspectionTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,154 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('巡检记录列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li class="select-time">
|
||||
<label>巡检时间:</label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginInspectionTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endInspectionTime]"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>巡检人:</label>
|
||||
<input type="text" name="inspectionUser"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="manage:record_inspection:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="manage:record_inspection:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="manage:record_inspection:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="manage:record_inspection:export">-->
|
||||
<!-- <i class="fa fa-download"></i> 导出-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('manage:record_inspection:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('manage:record_inspection:remove')}]];
|
||||
var prefix = ctx + "manage/record_inspection";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "巡检记录",
|
||||
detailView: true,
|
||||
onExpandRow: function (index, row, $detail) {
|
||||
initinspectionTable(index, row, $detail);
|
||||
},
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'inspectionId',
|
||||
title: '主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'inspectionTime',
|
||||
title: '巡检时间'
|
||||
},
|
||||
{
|
||||
field: 'inspectionUser',
|
||||
title: '巡检人'
|
||||
},
|
||||
{
|
||||
field: 'totalNumber',
|
||||
title: '巡检数量'
|
||||
},
|
||||
{
|
||||
field: 'normalNumber',
|
||||
title: '正常数量'
|
||||
},
|
||||
{
|
||||
field: 'abnormalNumber',
|
||||
title: '异常数量'
|
||||
},
|
||||
{
|
||||
field: 'skipNumber',
|
||||
title: '跳过数量'
|
||||
},
|
||||
|
||||
|
||||
/* {
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.inspectionId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.inspectionId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}*/]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
initinspectionTable = function (index, row, $detail) {
|
||||
var childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
|
||||
|
||||
$(childTable).bootstrapTable({
|
||||
url: ctx + "manage/record_inspection_info/list",
|
||||
method: 'post',
|
||||
sidePagination: "server",
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
queryParams: {
|
||||
inspectionId: row.inspectionId
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function (value, row, index) {
|
||||
return index+1
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'epcCode',
|
||||
title: 'RFID'
|
||||
},
|
||||
{
|
||||
field: 'locationCode',
|
||||
title: '机位码'
|
||||
},
|
||||
{
|
||||
field: 'inspectionState',
|
||||
title: '巡检结果'
|
||||
},
|
||||
{
|
||||
field: 'inspectionRemark',
|
||||
title: '异常原因'
|
||||
}]
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue