Bladeren bron

巡检模块

zhayf 4 jaren geleden
bovenliggende
commit
8e9dfd2e90

+ 118 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseWarehousecheckController.java

@@ -0,0 +1,118 @@
+package com.ruoyi.web.controller.warehouse.warehouseBusiness;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseWarehousecheck;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseWarehousecheckService;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseWarehousecheckitemsService;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 巡检主Controller
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+@RestController
+@RequestMapping("/warehouseBusiness/warehouseCheck")
+public class TWarehouseWarehousecheckController extends BaseController
+{
+    @Autowired
+    private ITWarehouseWarehousecheckService tWarehouseWarehousecheckService;
+
+
+    @Autowired
+    private ITWarehouseWarehousecheckitemsService  itWarehouseWarehousecheckitemsService;
+
+    /**
+     * 查询巡检主列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheck:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TWarehouseWarehousecheck tWarehouseWarehousecheck)
+    {
+        startPage();
+        List<TWarehouseWarehousecheck> list = tWarehouseWarehousecheckService.selectTWarehouseWarehousecheckList(tWarehouseWarehousecheck);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出巡检主列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheck:export')")
+    @Log(title = "巡检主", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TWarehouseWarehousecheck tWarehouseWarehousecheck)
+    {
+        List<TWarehouseWarehousecheck> list = tWarehouseWarehousecheckService.selectTWarehouseWarehousecheckList(tWarehouseWarehousecheck);
+        ExcelUtil<TWarehouseWarehousecheck> util = new ExcelUtil<TWarehouseWarehousecheck>(TWarehouseWarehousecheck.class);
+        return util.exportExcel(list, "warehouseCheck");
+    }
+
+    /**
+     * 获取巡检主详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheck:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId)
+    {
+        return AjaxResult.success(tWarehouseWarehousecheckService.selectTWarehouseWarehousecheckById(fId));
+    }
+
+    /**
+     * 新增巡检主
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheck:add')")
+    @Log(title = "巡检主", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TWarehouseWarehousecheck tWarehouseWarehousecheck)
+    {
+        return toAjax(tWarehouseWarehousecheckService.insertTWarehouseWarehousecheck(tWarehouseWarehousecheck));
+    }
+
+    /**
+     * 修改巡检主
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheck:edit')")
+    @Log(title = "巡检主", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TWarehouseWarehousecheck tWarehouseWarehousecheck)
+    {
+        return toAjax(tWarehouseWarehousecheckService.updateTWarehouseWarehousecheck(tWarehouseWarehousecheck));
+    }
+
+    /**
+     * 删除巡检主子表信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheck:remove')")
+    @Log(title = "巡检主", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds)
+    {
+        Integer father=tWarehouseWarehousecheckService.deleteTWarehouseWarehousecheckByIds(fIds);
+
+        Integer child=itWarehouseWarehousecheckitemsService.deleteTWarehouseWarehousecheckitemsByIds(fIds);
+        if(father<=0||child<=0){
+            return toAjax(0);
+        }
+        else{
+            return toAjax(father);
+        }
+
+    }
+}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseWarehousecheckitemsController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.warehouse.warehouseBusiness;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseWarehousecheckitems;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseWarehousecheckitemsService;
+import org.springframework.security.access.prepost.PreAuthorize;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 巡检子Controller
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+@RestController
+@RequestMapping("/warehouseBusiness/warehouseCheckItems")
+public class TWarehouseWarehousecheckitemsController extends BaseController
+{
+    @Autowired
+    private ITWarehouseWarehousecheckitemsService tWarehouseWarehousecheckitemsService;
+
+    /**
+     * 查询巡检子列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheckItems:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems)
+    {
+        startPage();
+        List<TWarehouseWarehousecheckitems> list = tWarehouseWarehousecheckitemsService.selectTWarehouseWarehousecheckitemsList(tWarehouseWarehousecheckitems);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出巡检子列表
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheckItems:export')")
+    @Log(title = "巡检子", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems)
+    {
+        List<TWarehouseWarehousecheckitems> list = tWarehouseWarehousecheckitemsService.selectTWarehouseWarehousecheckitemsList(tWarehouseWarehousecheckitems);
+        ExcelUtil<TWarehouseWarehousecheckitems> util = new ExcelUtil<TWarehouseWarehousecheckitems>(TWarehouseWarehousecheckitems.class);
+        return util.exportExcel(list, "warehouseCheckItems");
+    }
+
+    /**
+     * 获取巡检子详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheckItems:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId)
+    {
+        return AjaxResult.success(tWarehouseWarehousecheckitemsService.selectTWarehouseWarehousecheckitemsById(fId));
+    }
+
+    /**
+     * 新增巡检子
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheckItems:add')")
+    @Log(title = "巡检子", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems)
+    {
+        return toAjax(tWarehouseWarehousecheckitemsService.insertTWarehouseWarehousecheckitems(tWarehouseWarehousecheckitems));
+    }
+
+    /**
+     * 修改巡检子
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheckItems:edit')")
+    @Log(title = "巡检子", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems)
+    {
+        return toAjax(tWarehouseWarehousecheckitemsService.updateTWarehouseWarehousecheckitems(tWarehouseWarehousecheckitems));
+    }
+
+    /**
+     * 删除巡检子
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:warehouseCheckItems:remove')")
+    @Log(title = "巡检子", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds)
+    {
+        return toAjax(tWarehouseWarehousecheckitemsService.deleteTWarehouseWarehousecheckitemsByIds(fIds));
+    }
+}

+ 143 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseWarehousecheck.java

@@ -0,0 +1,143 @@
+package com.ruoyi.warehouseBusiness.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;
+
+/**
+ * 巡检主对象 t_warehouse_warehousecheck
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+public class TWarehouseWarehousecheck extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long fId;
+
+    /** 仓库id */
+    @Excel(name = "仓库id")
+    private String fWarehouseid;
+
+    /** 仓库名称 */
+    @Excel(name = "仓库名称")
+    private String fWarehousename;
+
+    /** 计划日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计划日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date plannedDate;
+
+    /** 巡检日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "巡检日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date inspectionDate;
+
+    /** 巡检人 */
+    @Excel(name = "巡检人")
+    private String inspector;
+
+    /** 巡检备注 */
+    @Excel(name = "巡检备注")
+    private String inspectionRemark;
+
+    /** 删除状态 */
+    private String delFlag;
+
+    public void setfId(Long fId)
+    {
+        this.fId = fId;
+    }
+
+    public Long getfId()
+    {
+        return fId;
+    }
+    public void setfWarehouseid(String fWarehouseid)
+    {
+        this.fWarehouseid = fWarehouseid;
+    }
+
+    public String getfWarehouseid()
+    {
+        return fWarehouseid;
+    }
+    public void setfWarehousename(String fWarehousename)
+    {
+        this.fWarehousename = fWarehousename;
+    }
+
+    public String getfWarehousename()
+    {
+        return fWarehousename;
+    }
+    public void setPlannedDate(Date plannedDate)
+    {
+        this.plannedDate = plannedDate;
+    }
+
+    public Date getPlannedDate()
+    {
+        return plannedDate;
+    }
+    public void setInspectionDate(Date inspectionDate)
+    {
+        this.inspectionDate = inspectionDate;
+    }
+
+    public Date getInspectionDate()
+    {
+        return inspectionDate;
+    }
+    public void setInspector(String inspector)
+    {
+        this.inspector = inspector;
+    }
+
+    public String getInspector()
+    {
+        return inspector;
+    }
+    public void setInspectionRemark(String inspectionRemark)
+    {
+        this.inspectionRemark = inspectionRemark;
+    }
+
+    public String getInspectionRemark()
+    {
+        return inspectionRemark;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("fId", getfId())
+            .append("fWarehouseid", getfWarehouseid())
+            .append("fWarehousename", getfWarehousename())
+            .append("plannedDate", getPlannedDate())
+            .append("inspectionDate", getInspectionDate())
+            .append("inspector", getInspector())
+            .append("inspectionRemark", getInspectionRemark())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 154 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseWarehousecheckitems.java

@@ -0,0 +1,154 @@
+package com.ruoyi.warehouseBusiness.domain;
+
+import java.util.Arrays;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 巡检子对象 t_warehouse_warehousecheckitems
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+public class TWarehouseWarehousecheckitems<DataTypeWithBLOBs> extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long fId;
+
+    /** 对应主表id */
+    @Excel(name = "对应主表id")
+    private Long fPid;
+
+    /** 仓库id */
+    @Excel(name = "仓库id")
+    private String fWarehouseid;
+
+    /** 仓库名称 */
+    @Excel(name = "仓库名称")
+    private String fWarehousename;
+
+    /** 巡检照片 */
+    @Excel(name = "巡检照片")
+    private String inspectionPhotos;
+
+    /** 计划日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计划日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date plannedDate;
+
+    /** 巡检日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "巡检日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date inspectionDate;
+
+    /** 巡检人 */
+    @Excel(name = "巡检人")
+    private String inspector;
+
+    /** 巡检备注 */
+    @Excel(name = "巡检备注")
+    private String inspectionRemark;
+
+    /** 删除状态 */
+    private String delFlag;
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public Long getfPid() {
+        return fPid;
+    }
+
+    public void setfPid(Long fPid) {
+        this.fPid = fPid;
+    }
+
+    public String getfWarehouseid() {
+        return fWarehouseid;
+    }
+
+    public void setfWarehouseid(String fWarehouseid) {
+        this.fWarehouseid = fWarehouseid;
+    }
+
+    public String getfWarehousename() {
+        return fWarehousename;
+    }
+
+    public void setfWarehousename(String fWarehousename) {
+        this.fWarehousename = fWarehousename;
+    }
+
+    public String getInspectionPhotos() {
+        return inspectionPhotos;
+    }
+
+    public void setInspectionPhotos(String inspectionPhotos) {
+        this.inspectionPhotos = inspectionPhotos;
+    }
+
+    public Date getPlannedDate() {
+        return plannedDate;
+    }
+
+    public void setPlannedDate(Date plannedDate) {
+        this.plannedDate = plannedDate;
+    }
+
+    public Date getInspectionDate() {
+        return inspectionDate;
+    }
+
+    public void setInspectionDate(Date inspectionDate) {
+        this.inspectionDate = inspectionDate;
+    }
+
+    public String getInspector() {
+        return inspector;
+    }
+
+    public void setInspector(String inspector) {
+        this.inspector = inspector;
+    }
+
+    public String getInspectionRemark() {
+        return inspectionRemark;
+    }
+
+    public void setInspectionRemark(String inspectionRemark) {
+        this.inspectionRemark = inspectionRemark;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return "TWarehouseWarehousecheckitems{" +
+                "fId=" + fId +
+                ", fPid=" + fPid +
+                ", fWarehouseid='" + fWarehouseid + '\'' +
+                ", fWarehousename='" + fWarehousename + '\'' +
+                ", inspectionPhotos='" + inspectionPhotos + '\'' +
+                ", plannedDate=" + plannedDate +
+                ", inspectionDate=" + inspectionDate +
+                ", inspector='" + inspector + '\'' +
+                ", inspectionRemark='" + inspectionRemark + '\'' +
+                ", delFlag='" + delFlag + '\'' +
+                '}';
+    }
+}

+ 63 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseWarehousecheckMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.warehouseBusiness.mapper;
+
+import com.ruoyi.warehouseBusiness.domain.TWarehouseWarehousecheck;
+
+import java.util.List;
+
+
+/**
+ * 巡检主Mapper接口
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+public interface TWarehouseWarehousecheckMapper
+{
+    /**
+     * 查询巡检主
+     *
+     * @param fId 巡检主ID
+     * @return 巡检主
+     */
+    public TWarehouseWarehousecheck selectTWarehouseWarehousecheckById(Long fId);
+
+    /**
+     * 查询巡检主列表
+     *
+     * @param tWarehouseWarehousecheck 巡检主
+     * @return 巡检主集合
+     */
+    public List<TWarehouseWarehousecheck> selectTWarehouseWarehousecheckList(TWarehouseWarehousecheck tWarehouseWarehousecheck);
+
+    /**
+     * 新增巡检主
+     *
+     * @param tWarehouseWarehousecheck 巡检主
+     * @return 结果
+     */
+    public int insertTWarehouseWarehousecheck(TWarehouseWarehousecheck tWarehouseWarehousecheck);
+
+    /**
+     * 修改巡检主
+     *
+     * @param tWarehouseWarehousecheck 巡检主
+     * @return 结果
+     */
+    public int updateTWarehouseWarehousecheck(TWarehouseWarehousecheck tWarehouseWarehousecheck);
+
+    /**
+     * 删除巡检主
+     *
+     * @param fId 巡检主ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWarehousecheckById(Long fId);
+
+    /**
+     * 批量删除巡检主
+     *
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWarehousecheckByIds(Long[] fIds);
+}

+ 62 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseWarehousecheckitemsMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.warehouseBusiness.mapper;
+
+import com.ruoyi.warehouseBusiness.domain.TWarehouseWarehousecheckitems;
+
+import java.util.List;
+
+/**
+ * 巡检子Mapper接口
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+public interface TWarehouseWarehousecheckitemsMapper
+{
+    /**
+     * 查询巡检子
+     *
+     * @param fId 巡检子ID
+     * @return 巡检子
+     */
+    public TWarehouseWarehousecheckitems selectTWarehouseWarehousecheckitemsById(Long fId);
+
+    /**
+     * 查询巡检子列表
+     *
+     * @param tWarehouseWarehousecheckitems 巡检子
+     * @return 巡检子集合
+     */
+    public List<TWarehouseWarehousecheckitems> selectTWarehouseWarehousecheckitemsList(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems);
+
+    /**
+     * 新增巡检子
+     *
+     * @param tWarehouseWarehousecheckitems 巡检子
+     * @return 结果
+     */
+    public int insertTWarehouseWarehousecheckitems(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems);
+
+    /**
+     * 修改巡检子
+     *
+     * @param tWarehouseWarehousecheckitems 巡检子
+     * @return 结果
+     */
+    public int updateTWarehouseWarehousecheckitems(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems);
+
+    /**
+     * 删除巡检子
+     *
+     * @param fId 巡检子ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWarehousecheckitemsById(Long fId);
+
+    /**
+     * 批量删除巡检子
+     *
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTWarehouseWarehousecheckitemsByIds(Long[] fIds);
+}

+ 96 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseWarehousecheckServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.warehouseBusiness.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseWarehousecheck;
+import com.ruoyi.warehouseBusiness.mapper.TWarehouseWarehousecheckMapper;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseWarehousecheckService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 巡检主Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+@Service
+public class TWarehouseWarehousecheckServiceImpl implements ITWarehouseWarehousecheckService
+{
+    @Autowired
+    private TWarehouseWarehousecheckMapper tWarehouseWarehousecheckMapper;
+
+    /**
+     * 查询巡检主
+     *
+     * @param fId 巡检主ID
+     * @return 巡检主
+     */
+    @Override
+    public TWarehouseWarehousecheck selectTWarehouseWarehousecheckById(Long fId)
+    {
+        return tWarehouseWarehousecheckMapper.selectTWarehouseWarehousecheckById(fId);
+    }
+
+    /**
+     * 查询巡检主列表
+     *
+     * @param tWarehouseWarehousecheck 巡检主
+     * @return 巡检主
+     */
+    @Override
+    public List<TWarehouseWarehousecheck> selectTWarehouseWarehousecheckList(TWarehouseWarehousecheck tWarehouseWarehousecheck)
+    {
+        return tWarehouseWarehousecheckMapper.selectTWarehouseWarehousecheckList(tWarehouseWarehousecheck);
+    }
+
+    /**
+     * 新增巡检主
+     *
+     * @param tWarehouseWarehousecheck 巡检主
+     * @return 结果
+     */
+    @Override
+    public int insertTWarehouseWarehousecheck(TWarehouseWarehousecheck tWarehouseWarehousecheck)
+    {
+        tWarehouseWarehousecheck.setCreateTime(DateUtils.getNowDate());
+        return tWarehouseWarehousecheckMapper.insertTWarehouseWarehousecheck(tWarehouseWarehousecheck);
+    }
+
+    /**
+     * 修改巡检主
+     *
+     * @param tWarehouseWarehousecheck 巡检主
+     * @return 结果
+     */
+    @Override
+    public int updateTWarehouseWarehousecheck(TWarehouseWarehousecheck tWarehouseWarehousecheck)
+    {
+        tWarehouseWarehousecheck.setUpdateTime(DateUtils.getNowDate());
+        return tWarehouseWarehousecheckMapper.updateTWarehouseWarehousecheck(tWarehouseWarehousecheck);
+    }
+
+    /**
+     * 批量删除巡检主
+     *
+     * @param fIds 需要删除的巡检主ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTWarehouseWarehousecheckByIds(Long[] fIds)
+    {
+        return tWarehouseWarehousecheckMapper.deleteTWarehouseWarehousecheckByIds(fIds);
+    }
+
+    /**
+     * 删除巡检主信息
+     *
+     * @param fId 巡检主ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTWarehouseWarehousecheckById(Long fId)
+    {
+        return tWarehouseWarehousecheckMapper.deleteTWarehouseWarehousecheckById(fId);
+    }
+}

+ 96 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseWarehousecheckitemsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.warehouseBusiness.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.warehouseBusiness.domain.TWarehouseWarehousecheckitems;
+import com.ruoyi.warehouseBusiness.mapper.TWarehouseWarehousecheckitemsMapper;
+import com.ruoyi.warehouseBusiness.service.ITWarehouseWarehousecheckitemsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;;
+
+/**
+ * 巡检子Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2021-06-27
+ */
+@Service
+public class TWarehouseWarehousecheckitemsServiceImpl implements ITWarehouseWarehousecheckitemsService
+{
+    @Autowired
+    private TWarehouseWarehousecheckitemsMapper tWarehouseWarehousecheckitemsMapper;
+
+    /**
+     * 查询巡检子
+     *
+     * @param fId 巡检子ID
+     * @return 巡检子
+     */
+    @Override
+    public TWarehouseWarehousecheckitems selectTWarehouseWarehousecheckitemsById(Long fId)
+    {
+        return tWarehouseWarehousecheckitemsMapper.selectTWarehouseWarehousecheckitemsById(fId);
+    }
+
+    /**
+     * 查询巡检子列表
+     *
+     * @param tWarehouseWarehousecheckitems 巡检子
+     * @return 巡检子
+     */
+    @Override
+    public List<TWarehouseWarehousecheckitems> selectTWarehouseWarehousecheckitemsList(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems)
+    {
+        return tWarehouseWarehousecheckitemsMapper.selectTWarehouseWarehousecheckitemsList(tWarehouseWarehousecheckitems);
+    }
+
+    /**
+     * 新增巡检子
+     *
+     * @param tWarehouseWarehousecheckitems 巡检子
+     * @return 结果
+     */
+    @Override
+    public int insertTWarehouseWarehousecheckitems(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems)
+    {
+        tWarehouseWarehousecheckitems.setCreateTime(DateUtils.getNowDate());
+        return tWarehouseWarehousecheckitemsMapper.insertTWarehouseWarehousecheckitems(tWarehouseWarehousecheckitems);
+    }
+
+    /**
+     * 修改巡检子
+     *
+     * @param tWarehouseWarehousecheckitems 巡检子
+     * @return 结果
+     */
+    @Override
+    public int updateTWarehouseWarehousecheckitems(TWarehouseWarehousecheckitems tWarehouseWarehousecheckitems)
+    {
+        tWarehouseWarehousecheckitems.setUpdateTime(DateUtils.getNowDate());
+        return tWarehouseWarehousecheckitemsMapper.updateTWarehouseWarehousecheckitems(tWarehouseWarehousecheckitems);
+    }
+
+    /**
+     * 批量删除巡检子
+     *
+     * @param fIds 需要删除的巡检子ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTWarehouseWarehousecheckitemsByIds(Long[] fIds)
+    {
+        return tWarehouseWarehousecheckitemsMapper.deleteTWarehouseWarehousecheckitemsByIds(fIds);
+    }
+
+    /**
+     * 删除巡检子信息
+     *
+     * @param fId 巡检子ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTWarehouseWarehousecheckitemsById(Long fId)
+    {
+        return tWarehouseWarehousecheckitemsMapper.deleteTWarehouseWarehousecheckitemsById(fId);
+    }
+}

+ 106 - 0
ruoyi-warehouse/target/classes/mapper/warehouseBusiness/TWarehouseWarehousecheckMapper.xml

@@ -0,0 +1,106 @@
+<?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.warehouseBusiness.mapper.TWarehouseWarehousecheckMapper">
+
+    <resultMap type="TWarehouseWarehousecheck" id="TWarehouseWarehousecheckResult">
+        <result property="fId"    column="f_id"    />
+        <result property="fWarehouseid"    column="f_warehouseid"    />
+        <result property="fWarehousename"    column="f_warehousename"    />
+        <result property="plannedDate"    column="planned_date"    />
+        <result property="inspectionDate"    column="inspection_date"    />
+        <result property="inspector"    column="inspector"    />
+        <result property="inspectionRemark"    column="inspection_remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectTWarehouseWarehousecheckVo">
+        select f_id, f_warehouseid, f_warehousename, planned_date, inspection_date, inspector, inspection_remark, create_by, create_time, update_by, update_time, del_flag, remark from t_warehouse_warehousecheck
+    </sql>
+
+    <select id="selectTWarehouseWarehousecheckList" parameterType="TWarehouseWarehousecheck" resultMap="TWarehouseWarehousecheckResult">
+        <include refid="selectTWarehouseWarehousecheckVo"/>
+        <where>
+            <if test="fWarehouseid != null  and fWarehouseid != ''"> and f_warehouseid = #{fWarehouseid}</if>
+            <if test="fWarehousename != null  and fWarehousename != ''"> and f_warehousename like concat('%', #{fWarehousename}, '%')</if>
+            <if test="plannedDate != null "> and planned_date = #{plannedDate}</if>
+            <if test="inspectionDate != null "> and inspection_date = #{inspectionDate}</if>
+            <if test="inspector != null  and inspector != ''"> and inspector = #{inspector}</if>
+            <if test="inspectionRemark != null  and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
+        </where>
+    </select>
+
+    <select id="selectTWarehouseWarehousecheckById" parameterType="Long" resultMap="TWarehouseWarehousecheckResult">
+        <include refid="selectTWarehouseWarehousecheckVo"/>
+        where f_id = #{fId}
+    </select>
+
+    <insert id="insertTWarehouseWarehousecheck" parameterType="TWarehouseWarehousecheck" useGeneratedKeys="true" keyProperty="fId">
+        insert into t_warehouse_warehousecheck
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fWarehouseid != null">f_warehouseid,</if>
+            <if test="fWarehousename != null">f_warehousename,</if>
+            <if test="plannedDate != null">planned_date,</if>
+            <if test="inspectionDate != null">inspection_date,</if>
+            <if test="inspector != null">inspector,</if>
+            <if test="inspectionRemark != null">inspection_remark,</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>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fWarehouseid != null">#{fWarehouseid},</if>
+            <if test="fWarehousename != null">#{fWarehousename},</if>
+            <if test="plannedDate != null">#{plannedDate},</if>
+            <if test="inspectionDate != null">#{inspectionDate},</if>
+            <if test="inspector != null">#{inspector},</if>
+            <if test="inspectionRemark != null">#{inspectionRemark},</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>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTWarehouseWarehousecheck" parameterType="TWarehouseWarehousecheck">
+        update t_warehouse_warehousecheck
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
+            <if test="fWarehousename != null">f_warehousename = #{fWarehousename},</if>
+            <if test="plannedDate != null">planned_date = #{plannedDate},</if>
+            <if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
+            <if test="inspector != null">inspector = #{inspector},</if>
+            <if test="inspectionRemark != null">inspection_remark = #{inspectionRemark},</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>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTWarehouseWarehousecheckById" parameterType="Long">
+        delete from t_warehouse_warehousecheck where f_id = #{fId}
+    </delete>
+
+    <delete id="deleteTWarehouseWarehousecheckByIds" parameterType="String">
+        delete from t_warehouse_warehousecheck where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+
+</mapper>

+ 115 - 0
ruoyi-warehouse/target/classes/mapper/warehouseBusiness/TWarehouseWarehousecheckitemsMapper.xml

@@ -0,0 +1,115 @@
+<?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.warehouseBusiness.mapper.TWarehouseWarehousecheckitemsMapper">
+    <resultMap type="TWarehouseWarehousecheckitems" id="TWarehouseWarehousecheckitemsResult">
+        <result property="fId"    column="f_id"    />
+        <result property="fPid"    column="f_pid"    />
+        <result property="fWarehouseid"    column="f_warehouseid"    />
+        <result property="fWarehousename"    column="f_warehousename"    />
+        <result property="inspectionPhotos"    column="inspection_photos"    />
+        <result property="plannedDate"    column="planned_date"    />
+        <result property="inspectionDate"    column="inspection_date"    />
+        <result property="inspector"    column="inspector"    />
+        <result property="inspectionRemark"    column="inspection_remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectTWarehouseWarehousecheckitemsVo">
+        select f_id, f_pid, f_warehouseid, f_warehousename, inspection_photos, planned_date, inspection_date, inspector, inspection_remark, create_by, create_time, update_by, update_time, del_flag, remark from t_warehouse_warehousecheckitems
+    </sql>
+
+    <select id="selectTWarehouseWarehousecheckitemsList" parameterType="TWarehouseWarehousecheckitems" resultMap="TWarehouseWarehousecheckitemsResult">
+        <include refid="selectTWarehouseWarehousecheckitemsVo"/>
+        <where>
+            <if test="fPid != null "> and f_pid = #{fPid}</if>
+            <if test="fWarehouseid != null  and fWarehouseid != ''"> and f_warehouseid = #{fWarehouseid}</if>
+            <if test="fWarehousename != null  and fWarehousename != ''"> and f_warehousename like concat('%', #{fWarehousename}, '%')</if>
+            <if test="inspectionPhotos != null  and inspectionPhotos != ''"> and inspection_photos = #{inspectionPhotos}</if>
+            <if test="plannedDate != null "> and planned_date = #{plannedDate}</if>
+            <if test="inspectionDate != null "> and inspection_date = #{inspectionDate}</if>
+            <if test="inspector != null  and inspector != ''"> and inspector = #{inspector}</if>
+            <if test="inspectionRemark != null  and inspectionRemark != ''"> and inspection_remark = #{inspectionRemark}</if>
+        </where>
+    </select>
+
+    <select id="selectTWarehouseWarehousecheckitemsById" parameterType="Long" resultMap="TWarehouseWarehousecheckitemsResult">
+        <include refid="selectTWarehouseWarehousecheckitemsVo"/>
+        where f_id = #{fId}
+    </select>
+
+    <insert id="insertTWarehouseWarehousecheckitems" parameterType="TWarehouseWarehousecheckitems" useGeneratedKeys="true" keyProperty="fId">
+        insert into t_warehouse_warehousecheckitems
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fPid != null">f_pid,</if>
+            <if test="fWarehouseid != null">f_warehouseid,</if>
+            <if test="fWarehousename != null">f_warehousename,</if>
+            <if test="inspectionPhotos != null">inspection_photos,</if>
+            <if test="plannedDate != null">planned_date,</if>
+            <if test="inspectionDate != null">inspection_date,</if>
+            <if test="inspector != null">inspector,</if>
+            <if test="inspectionRemark != null">inspection_remark,</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>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="remark != null">remark,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fPid != null">#{fPid},</if>
+            <if test="fWarehouseid != null">#{fWarehouseid},</if>
+            <if test="fWarehousename != null">#{fWarehousename},</if>
+            <if test="inspectionPhotos != null">#{inspectionPhotos},</if>
+            <if test="plannedDate != null">#{plannedDate},</if>
+            <if test="inspectionDate != null">#{inspectionDate},</if>
+            <if test="inspector != null">#{inspector},</if>
+            <if test="inspectionRemark != null">#{inspectionRemark},</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>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="remark != null">#{remark},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTWarehouseWarehousecheckitems" parameterType="TWarehouseWarehousecheckitems">
+        update t_warehouse_warehousecheckitems
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fPid != null">f_pid = #{fPid},</if>
+            <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
+            <if test="fWarehousename != null">f_warehousename = #{fWarehousename},</if>
+            <if test="inspectionPhotos != null">inspection_photos = #{inspectionPhotos},</if>
+            <if test="plannedDate != null">planned_date = #{plannedDate},</if>
+            <if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
+            <if test="inspector != null">inspector = #{inspector},</if>
+            <if test="inspectionRemark != null">inspection_remark = #{inspectionRemark},</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>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTWarehouseWarehousecheckitemsById" parameterType="Long">
+        delete from t_warehouse_warehousecheckitems where f_id = #{fId}
+    </delete>
+
+    <delete id="deleteTWarehouseWarehousecheckitemsByIds" parameterType="String">
+        delete from t_warehouse_warehousecheckitems where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+
+</mapper>