Quellcode durchsuchen

运维管理--巡检管理--巡检点

丁治程 vor 1 Jahr
Ursprung
Commit
420555ec70
19 geänderte Dateien mit 1087 neuen und 0 gelöschten Zeilen
  1. 189 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/controller/CmmsInspectSpotController.java
  2. 74 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/entity/CmmsInspectSpot.java
  3. 21 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/entity/CmmsInspectSpotVo.java
  4. 20 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/mapper/CmmsInspectSpotMapper.java
  5. 30 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/mapper/xml/CmmsInspectSpotMapper.xml
  6. 25 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/service/ICmmsInspectSpotService.java
  7. 132 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/service/impl/CmmsInspectSpotServiceImpl.java
  8. 177 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/controller/CmmsInspectSpotEquipController.java
  9. 54 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/entity/CmmsInspectSpotEquip.java
  10. 18 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/mapper/CmmsInspectSpotEquipMapper.java
  11. 18 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/mapper/xml/CmmsInspectSpotEquipMapper.xml
  12. 17 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/service/ICmmsInspectSpotEquipService.java
  13. 30 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/service/impl/CmmsInspectSpotEquipServiceImpl.java
  14. 177 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/controller/CmmsInspectSpotItemController.java
  15. 50 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/entity/CmmsInspectSpotItem.java
  16. 17 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/mapper/CmmsInspectSpotItemMapper.java
  17. 5 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/mapper/xml/CmmsInspectSpotItemMapper.xml
  18. 14 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/service/ICmmsInspectSpotItemService.java
  19. 19 0
      jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/service/impl/CmmsInspectSpotItemServiceImpl.java

+ 189 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/controller/CmmsInspectSpotController.java

@@ -0,0 +1,189 @@
+package org.jeecg.modules.cmmsInspectSpot.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpot;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpotVo;
+import org.jeecg.modules.cmmsInspectSpot.service.ICmmsInspectSpotService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 巡检点
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Api(tags="巡检点")
+@RestController
+@RequestMapping("/cmmsInspectSpot/cmmsInspectSpot")
+@Slf4j
+public class CmmsInspectSpotController extends JeecgController<CmmsInspectSpot, ICmmsInspectSpotService> {
+	@Autowired
+	private ICmmsInspectSpotService cmmsInspectSpotService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param cmmsInspectSpot
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "巡检点-分页列表查询")
+	@ApiOperation(value="巡检点-分页列表查询", notes="巡检点-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<CmmsInspectSpotVo>> queryPageList(CmmsInspectSpot cmmsInspectSpot,
+														  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+														  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+														  HttpServletRequest req) {
+		//QueryWrapper<CmmsInspectSpot> queryWrapper = QueryGenerator.initQueryWrapper(cmmsInspectSpot, req.getParameterMap());
+		Page<CmmsInspectSpotVo> page = new Page<CmmsInspectSpotVo>(pageNo, pageSize);
+		//IPage<CmmsInspectSpot> pageList = cmmsInspectSpotService.page(page, queryWrapper);
+		List<CmmsInspectSpotVo> list = cmmsInspectSpotService.getCmmsInspectSpotList(page, cmmsInspectSpot);
+		page.setRecords(list);
+		return Result.OK(page);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param cmmsInspectSpot
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-添加")
+	@ApiOperation(value="巡检点-添加", notes="巡检点-添加")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody CmmsInspectSpotVo cmmsInspectSpot) {
+		//cmmsInspectSpotService.save(cmmsInspectSpot);
+		boolean b = cmmsInspectSpotService.addCmmsInspectSpot(cmmsInspectSpot);
+		if (b) {
+			return Result.OK("添加成功!");
+		}
+		return Result.error("添加失败!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param cmmsInspectSpot
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-编辑")
+	@ApiOperation(value="巡检点-编辑", notes="巡检点-编辑")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody CmmsInspectSpotVo cmmsInspectSpot) {
+		//cmmsInspectSpotService.updateById(cmmsInspectSpot);
+		boolean b = cmmsInspectSpotService.updateCmmsInspectSpot(cmmsInspectSpot);
+		if (b) {
+			return Result.OK("编辑成功!");
+		}
+		return Result.error("编辑失败!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-通过id删除")
+	@ApiOperation(value="巡检点-通过id删除", notes="巡检点-通过id删除")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		cmmsInspectSpotService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-批量删除")
+	@ApiOperation(value="巡检点-批量删除", notes="巡检点-批量删除")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.cmmsInspectSpotService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "巡检点-通过id查询")
+	@ApiOperation(value="巡检点-通过id查询", notes="巡检点-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<CmmsInspectSpot> queryById(@RequestParam(name="id",required=true) String id) {
+		//CmmsInspectSpot cmmsInspectSpot = cmmsInspectSpotService.getById(id);
+		CmmsInspectSpotVo cmmsInspectSpot = cmmsInspectSpotService.getCmmsInspectSpotListById(id);
+		if(cmmsInspectSpot==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(cmmsInspectSpot);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param cmmsInspectSpot
+    */
+    //@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, CmmsInspectSpot cmmsInspectSpot) {
+        return super.exportXls(request, cmmsInspectSpot, CmmsInspectSpot.class, "巡检点");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    //@RequiresPermissions("ems_cmms_inspect_spot:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, CmmsInspectSpot.class);
+    }
+
+}

+ 74 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/entity/CmmsInspectSpot.java

@@ -0,0 +1,74 @@
+package org.jeecg.modules.cmmsInspectSpot.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 巡检点
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Data
+@TableName("ems_cmms_inspect_spot")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="ems_cmms_inspect_spot对象", description="巡检点")
+public class CmmsInspectSpot implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**巡检内容ID*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "巡检点ID")
+    private java.lang.String id;
+	/**创建者*/
+    @ApiModelProperty(value = "创建者")
+    private java.lang.String createBy;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "创建时间")
+    private java.util.Date createTime;
+	/**更新者*/
+    @ApiModelProperty(value = "更新者")
+    private java.lang.String updateBy;
+	/**更新时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "更新时间")
+    private java.util.Date updateTime;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private java.lang.String remark;
+	/**巡检内容编号*/
+	@Excel(name = "巡检内容编号", width = 15)
+    @ApiModelProperty(value = "巡检点编号")
+    private java.lang.String contentcode;
+	/**巡检内容名称*/
+	@Excel(name = "巡检内容名称", width = 15)
+    @ApiModelProperty(value = "巡检点名称")
+    private java.lang.String contentname;
+	/**设备类型*/
+	@Excel(name = "设备类型", width = 15)
+    @ApiModelProperty(value = "设备类型")
+    private java.lang.String equipdefid;
+	/**所属部门*/
+    @ApiModelProperty(value = "所属部门")
+    private java.lang.String sysOrgCode;
+}

+ 21 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/entity/CmmsInspectSpotVo.java

@@ -0,0 +1,21 @@
+package org.jeecg.modules.cmmsInspectSpot.entity;
+
+import lombok.Data;
+import org.jeecg.modules.cmmsInspectContent.entity.CmmsInspectContent;
+import org.jeecg.modules.cmmsInspectSpotEquip.entity.CmmsInspectSpotEquip;
+
+import java.util.List;
+
+/**
+ * @author dzc
+ * @date 2024/1/17 13:53
+ * @package org.jeecg.modules.cmmsInspectSpot.entity
+ * @project EMS_server
+ * @des
+ */
+@Data
+public class CmmsInspectSpotVo extends CmmsInspectSpot{
+    private String equipdefname;
+
+    private List<CmmsInspectContent> inspectContentList;
+}

+ 20 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/mapper/CmmsInspectSpotMapper.java

@@ -0,0 +1,20 @@
+package org.jeecg.modules.cmmsInspectSpot.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpot;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpotVo;
+
+/**
+ * @Description: 巡检点
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+public interface CmmsInspectSpotMapper extends BaseMapper<CmmsInspectSpot> {
+
+    List<CmmsInspectSpotVo> getCmmsInspectSpotList(@Param("page") Page<CmmsInspectSpotVo> page,@Param("cmmsInspectSpot") CmmsInspectSpot cmmsInspectSpot);
+}

+ 30 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/mapper/xml/CmmsInspectSpotMapper.xml

@@ -0,0 +1,30 @@
+<?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="org.jeecg.modules.cmmsInspectSpot.mapper.CmmsInspectSpotMapper">
+
+    <resultMap type="org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpotVo" id="CmmsInspectContentResult">
+        <result property="id"    column="id"    />
+        <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="remark"    column="remark"    />
+        <result property="contentcode"    column="contentcode"    />
+        <result property="contentname"    column="contentname"    />
+        <result property="equipdefid"    column="equipdefid"    />
+        <result property="equipdefname"    column="equipdefname"    />
+        <result property="sysOrgCode"    column="sys_org_code"    />
+    </resultMap>
+
+    <select id="getCmmsInspectSpotList" parameterType="org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpot" resultMap="CmmsInspectContentResult">
+        select c.id, c.create_by, c.create_time, c.update_by, c.update_time, c.remark,
+        c.contentcode, c.contentname, c.equipdefid, c.sys_org_code, t.name as equipdefname
+        from ems_cmms_inspect_spot as c
+        left join ems_tpm_equipment_tree as t
+        on c.equipdefid = t.id
+        <where>
+            <if test="cmmsInspectSpot.contentcode != null  and cmmsInspectSpot.contentcode != ''"> and (c.contentcode like concat('%', #{cmmsInspectSpot.contentcode}, '%') or c.contentname like concat('%', #{cmmsInspectSpot.contentcode}, '%'))</if>
+            <if test="cmmsInspectSpot.equipdefid != null "> and c.equipdefid = #{cmmsInspectSpot.equipdefid}</if>
+        </where>
+    </select>
+</mapper>

+ 25 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/service/ICmmsInspectSpotService.java

@@ -0,0 +1,25 @@
+package org.jeecg.modules.cmmsInspectSpot.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpot;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpotVo;
+
+import java.util.List;
+
+/**
+ * @Description: 巡检点
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+public interface ICmmsInspectSpotService extends IService<CmmsInspectSpot> {
+
+    List<CmmsInspectSpotVo> getCmmsInspectSpotList(Page<CmmsInspectSpotVo> page, CmmsInspectSpot cmmsInspectSpot);
+
+    boolean addCmmsInspectSpot(CmmsInspectSpotVo cmmsInspectSpot);
+
+    boolean updateCmmsInspectSpot(CmmsInspectSpotVo cmmsInspectSpot);
+
+    CmmsInspectSpotVo getCmmsInspectSpotListById(String id);
+}

+ 132 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpot/service/impl/CmmsInspectSpotServiceImpl.java

@@ -0,0 +1,132 @@
+package org.jeecg.modules.cmmsInspectSpot.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.jeecg.modules.cmmsInspectContent.entity.CmmsInspectContent;
+import org.jeecg.modules.cmmsInspectContent.entity.CmmsInspectContentVo;
+import org.jeecg.modules.cmmsInspectContent.service.ICmmsInspectContentService;
+import org.jeecg.modules.cmmsInspectContentItem.entity.CmmsInspectContentItem;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpot;
+import org.jeecg.modules.cmmsInspectSpot.entity.CmmsInspectSpotVo;
+import org.jeecg.modules.cmmsInspectSpot.mapper.CmmsInspectSpotMapper;
+import org.jeecg.modules.cmmsInspectSpot.service.ICmmsInspectSpotService;
+import org.jeecg.modules.cmmsInspectSpotEquip.entity.CmmsInspectSpotEquip;
+import org.jeecg.modules.cmmsInspectSpotEquip.mapper.CmmsInspectSpotEquipMapper;
+import org.jeecg.modules.cmmsInspectSpotEquip.service.ICmmsInspectSpotEquipService;
+import org.jeecg.modules.util.AutoCodeUtil;
+import org.jeecg.modules.util.UserConstants;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 巡检点
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Service
+public class CmmsInspectSpotServiceImpl extends ServiceImpl<CmmsInspectSpotMapper, CmmsInspectSpot> implements ICmmsInspectSpotService {
+
+    @Autowired
+    @SuppressWarnings("all")
+    private CmmsInspectSpotMapper inspectSpotMapper;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private AutoCodeUtil autoCodeUtil;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private ICmmsInspectSpotEquipService inspectSpotEquipService;
+
+    @Autowired
+    @SuppressWarnings("all")
+    private ICmmsInspectContentService iCmmsInspectContentService;
+
+
+    @Override
+    public List<CmmsInspectSpotVo> getCmmsInspectSpotList(Page<CmmsInspectSpotVo> page, CmmsInspectSpot cmmsInspectSpot) {
+        return inspectSpotMapper.getCmmsInspectSpotList(page, cmmsInspectSpot);
+    }
+
+    @Override
+    public boolean addCmmsInspectSpot(CmmsInspectSpotVo cmmsInspectSpot) {
+        if (cmmsInspectSpot.getContentcode() == null || "".equals(cmmsInspectSpot.getContentcode())){
+            cmmsInspectSpot.setContentcode(autoCodeUtil.genSerialCode(UserConstants.CMMSINSPECTCONT_CODE, null));
+        }
+        boolean b = this.save(cmmsInspectSpot);
+
+
+        //if (cmmsInspectSpot.getInspectContentList() != null && cmmsInspectSpot.getInspectContentList().size() > 0){
+        //    for (int i = 0; i < cmmsInspectSpot.getInspectContentList().size(); i++) {
+        //        cmmsInspectSpot.getInspectContentList().get(i).setInspectcontid(cmmsInspectSpot.getId());
+        //    }
+        //}
+        insertCmmsInspectcheckContentItem(cmmsInspectSpot);
+
+        return b;
+    }
+
+
+    @Override
+    public boolean updateCmmsInspectSpot(CmmsInspectSpotVo cmmsInspectSpot) {
+        // 根据 巡检点的id 删除巡检点-巡检内容
+        QueryWrapper<CmmsInspectSpotEquip> quer = new QueryWrapper<>();
+        quer.eq("inspectspotid",cmmsInspectSpot.getId());
+        boolean b = inspectSpotEquipService.remove(quer);
+
+        insertCmmsInspectcheckContentItem(cmmsInspectSpot);
+
+        return this.updateById(cmmsInspectSpot);
+    }
+
+
+    @Override
+    public CmmsInspectSpotVo getCmmsInspectSpotListById(String id) {
+        // 根据id查询出巡检点的信息
+        CmmsInspectSpot cmmsInspectSport = this.getById(id);
+
+        // 根据 巡检点的id 查询出巡检点-巡检内容的信息
+        List<CmmsInspectSpotEquip> list = inspectSpotEquipService.getInspectSpotEquipBySprtId(cmmsInspectSport.getId());
+        ArrayList<CmmsInspectContent> contList = new ArrayList<>();
+        for (CmmsInspectSpotEquip eq:list) {
+            String equipmentid = eq.getInspectcontid();
+            CmmsInspectContentVo cmmsInspectContent = iCmmsInspectContentService.getCmmsInspectContentById(equipmentid);
+            contList.add(cmmsInspectContent);
+        }
+        CmmsInspectSpotVo cmmsInspectSpotVo = new CmmsInspectSpotVo();
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getContentcode())) cmmsInspectSpotVo.setContentcode(cmmsInspectSport.getContentcode());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getContentname())) cmmsInspectSpotVo.setContentname(cmmsInspectSport.getContentname());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getEquipdefid())) cmmsInspectSpotVo.setEquipdefid(cmmsInspectSport.getEquipdefid());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getRemark())) cmmsInspectSpotVo.setRemark(cmmsInspectSport.getRemark());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getId())) cmmsInspectSpotVo.setId(cmmsInspectSport.getId());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getSysOrgCode())) cmmsInspectSpotVo.setSysOrgCode(cmmsInspectSport.getSysOrgCode());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getCreateBy())) cmmsInspectSpotVo.setCreateBy(cmmsInspectSport.getCreateBy());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getCreateTime())) cmmsInspectSpotVo.setCreateTime(cmmsInspectSport.getCreateTime());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getUpdateBy())) cmmsInspectSpotVo.setUpdateBy(cmmsInspectSport.getUpdateBy());
+        if (ObjectUtil.isNotNull(cmmsInspectSport.getUpdateTime())) cmmsInspectSpotVo.setUpdateTime(cmmsInspectSport.getUpdateTime());
+        cmmsInspectSpotVo.setInspectContentList(contList);
+        return cmmsInspectSpotVo;
+    }
+
+    private void insertCmmsInspectcheckContentItem(CmmsInspectSpotVo cmmsInspectSpot) {
+        List<CmmsInspectContent> list = cmmsInspectSpot.getInspectContentList();
+        String id = cmmsInspectSpot.getId();
+        if (ObjectUtil.isNotNull(list)){
+            ArrayList<CmmsInspectSpotEquip> list1 = new ArrayList<>();
+            for (CmmsInspectContent e:list) {
+                CmmsInspectSpotEquip cmmsInspectSpotEquip = new CmmsInspectSpotEquip();
+                cmmsInspectSpotEquip.setInspectspotid(id);  // 巡检点id
+                cmmsInspectSpotEquip.setInspectcontid(e.getId()); // 巡检内容id
+                list1.add(cmmsInspectSpotEquip);
+            }
+            inspectSpotEquipService.saveBatch(list1);
+        }
+    }
+}

+ 177 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/controller/CmmsInspectSpotEquipController.java

@@ -0,0 +1,177 @@
+package org.jeecg.modules.cmmsInspectSpotEquip.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.cmmsInspectSpotEquip.entity.CmmsInspectSpotEquip;
+import org.jeecg.modules.cmmsInspectSpotEquip.service.ICmmsInspectSpotEquipService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 巡检点-设备
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Api(tags="巡检点-设备")
+@RestController
+@RequestMapping("/cmmsInspectSpotEquip/cmmsInspectSpotEquip")
+@Slf4j
+public class CmmsInspectSpotEquipController extends JeecgController<CmmsInspectSpotEquip, ICmmsInspectSpotEquipService> {
+	@Autowired
+	private ICmmsInspectSpotEquipService cmmsInspectSpotEquipService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param cmmsInspectSpotEquip
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "巡检点-设备-分页列表查询")
+	@ApiOperation(value="巡检点-设备-分页列表查询", notes="巡检点-设备-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<CmmsInspectSpotEquip>> queryPageList(CmmsInspectSpotEquip cmmsInspectSpotEquip,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<CmmsInspectSpotEquip> queryWrapper = QueryGenerator.initQueryWrapper(cmmsInspectSpotEquip, req.getParameterMap());
+		Page<CmmsInspectSpotEquip> page = new Page<CmmsInspectSpotEquip>(pageNo, pageSize);
+		IPage<CmmsInspectSpotEquip> pageList = cmmsInspectSpotEquipService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param cmmsInspectSpotEquip
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-设备-添加")
+	@ApiOperation(value="巡检点-设备-添加", notes="巡检点-设备-添加")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_equip:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody CmmsInspectSpotEquip cmmsInspectSpotEquip) {
+		cmmsInspectSpotEquipService.save(cmmsInspectSpotEquip);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param cmmsInspectSpotEquip
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-设备-编辑")
+	@ApiOperation(value="巡检点-设备-编辑", notes="巡检点-设备-编辑")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_equip:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody CmmsInspectSpotEquip cmmsInspectSpotEquip) {
+		cmmsInspectSpotEquipService.updateById(cmmsInspectSpotEquip);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-设备-通过id删除")
+	@ApiOperation(value="巡检点-设备-通过id删除", notes="巡检点-设备-通过id删除")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_equip:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		cmmsInspectSpotEquipService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-设备-批量删除")
+	@ApiOperation(value="巡检点-设备-批量删除", notes="巡检点-设备-批量删除")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_equip:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.cmmsInspectSpotEquipService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "巡检点-设备-通过id查询")
+	@ApiOperation(value="巡检点-设备-通过id查询", notes="巡检点-设备-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<CmmsInspectSpotEquip> queryById(@RequestParam(name="id",required=true) String id) {
+		CmmsInspectSpotEquip cmmsInspectSpotEquip = cmmsInspectSpotEquipService.getById(id);
+		if(cmmsInspectSpotEquip==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(cmmsInspectSpotEquip);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param cmmsInspectSpotEquip
+    */
+    //@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_equip:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, CmmsInspectSpotEquip cmmsInspectSpotEquip) {
+        return super.exportXls(request, cmmsInspectSpotEquip, CmmsInspectSpotEquip.class, "巡检点-设备");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    //@RequiresPermissions("ems_cmms_inspect_spot_equip:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, CmmsInspectSpotEquip.class);
+    }
+
+}

+ 54 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/entity/CmmsInspectSpotEquip.java

@@ -0,0 +1,54 @@
+package org.jeecg.modules.cmmsInspectSpotEquip.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 巡检点-设备
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Data
+@TableName("ems_cmms_inspect_spot_equip")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="ems_cmms_inspect_spot_equip对象", description="巡检点-设备")
+public class CmmsInspectSpotEquip implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**巡检内容-设备ID*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "巡检点-设备ID")
+    private java.lang.String id;
+	/**巡检内容ID*/
+	@Excel(name = "巡检内容ID", width = 15)
+    @ApiModelProperty(value = "巡检点ID")
+    private java.lang.String inspectspotid;
+	/**设备ID*/
+	@Excel(name = "设备ID", width = 15)
+    @ApiModelProperty(value = "巡检内容ID")
+    private java.lang.String inspectcontid;
+	/**已配置巡检项数量*/
+	@Excel(name = "已配置巡检项数量", width = 15)
+    @ApiModelProperty(value = "已配置巡检项数量")
+    private java.lang.Integer itemnum;
+	/**所属部门*/
+    @ApiModelProperty(value = "所属部门")
+    private java.lang.String sysOrgCode;
+}

+ 18 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/mapper/CmmsInspectSpotEquipMapper.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.cmmsInspectSpotEquip.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.cmmsInspectSpotEquip.entity.CmmsInspectSpotEquip;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 巡检点-设备
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+public interface CmmsInspectSpotEquipMapper extends BaseMapper<CmmsInspectSpotEquip> {
+
+    List<CmmsInspectSpotEquip> getInspectSpotEquipBySprtId(@Param("id") String id);
+}

+ 18 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/mapper/xml/CmmsInspectSpotEquipMapper.xml

@@ -0,0 +1,18 @@
+<?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="org.jeecg.modules.cmmsInspectSpotEquip.mapper.CmmsInspectSpotEquipMapper">
+
+
+    <resultMap type="org.jeecg.modules.cmmsInspectSpotEquip.entity.CmmsInspectSpotEquip" id="CmmsInspectContentEquipResult">
+        <result property="id"    column="id"    />
+        <result property="inspectspotid"    column="inspectspotid"    />
+        <result property="inspectcontid"    column="inspectcontid"    />
+        <result property="itemnum"    column="itemnum"    />
+    </resultMap>
+
+    <select id="getInspectSpotEquipBySprtId" parameterType="String" resultMap="CmmsInspectContentEquipResult">
+        select * from ems_cmms_inspect_spot_equip where inspectspotid = #{id}
+    </select>
+
+
+</mapper>

+ 17 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/service/ICmmsInspectSpotEquipService.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.cmmsInspectSpotEquip.service;
+
+import org.jeecg.modules.cmmsInspectSpotEquip.entity.CmmsInspectSpotEquip;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Description: 巡检点-设备
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+public interface ICmmsInspectSpotEquipService extends IService<CmmsInspectSpotEquip> {
+
+    List<CmmsInspectSpotEquip> getInspectSpotEquipBySprtId(String id);
+}

+ 30 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotEquip/service/impl/CmmsInspectSpotEquipServiceImpl.java

@@ -0,0 +1,30 @@
+package org.jeecg.modules.cmmsInspectSpotEquip.service.impl;
+
+import org.jeecg.modules.cmmsInspectSpotEquip.entity.CmmsInspectSpotEquip;
+import org.jeecg.modules.cmmsInspectSpotEquip.mapper.CmmsInspectSpotEquipMapper;
+import org.jeecg.modules.cmmsInspectSpotEquip.service.ICmmsInspectSpotEquipService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.List;
+
+/**
+ * @Description: 巡检点-设备
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Service
+public class CmmsInspectSpotEquipServiceImpl extends ServiceImpl<CmmsInspectSpotEquipMapper, CmmsInspectSpotEquip> implements ICmmsInspectSpotEquipService {
+
+    @Autowired
+    @SuppressWarnings("all")
+    private CmmsInspectSpotEquipMapper inspectSpotEquipMapper;
+
+    @Override
+    public List<CmmsInspectSpotEquip> getInspectSpotEquipBySprtId(String id) {
+        return inspectSpotEquipMapper.getInspectSpotEquipBySprtId(id);
+    }
+}

+ 177 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/controller/CmmsInspectSpotItemController.java

@@ -0,0 +1,177 @@
+package org.jeecg.modules.cmmsInspectSpotItem.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.cmmsInspectSpotItem.entity.CmmsInspectSpotItem;
+import org.jeecg.modules.cmmsInspectSpotItem.service.ICmmsInspectSpotItemService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 巡检点-巡检项
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Api(tags="巡检点-巡检项")
+@RestController
+@RequestMapping("/cmmsInspectSpotItem/cmmsInspectSpotItem")
+@Slf4j
+public class CmmsInspectSpotItemController extends JeecgController<CmmsInspectSpotItem, ICmmsInspectSpotItemService> {
+	@Autowired
+	private ICmmsInspectSpotItemService cmmsInspectSpotItemService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param cmmsInspectSpotItem
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "巡检点-巡检项-分页列表查询")
+	@ApiOperation(value="巡检点-巡检项-分页列表查询", notes="巡检点-巡检项-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<CmmsInspectSpotItem>> queryPageList(CmmsInspectSpotItem cmmsInspectSpotItem,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<CmmsInspectSpotItem> queryWrapper = QueryGenerator.initQueryWrapper(cmmsInspectSpotItem, req.getParameterMap());
+		Page<CmmsInspectSpotItem> page = new Page<CmmsInspectSpotItem>(pageNo, pageSize);
+		IPage<CmmsInspectSpotItem> pageList = cmmsInspectSpotItemService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param cmmsInspectSpotItem
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-巡检项-添加")
+	@ApiOperation(value="巡检点-巡检项-添加", notes="巡检点-巡检项-添加")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_item:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody CmmsInspectSpotItem cmmsInspectSpotItem) {
+		cmmsInspectSpotItemService.save(cmmsInspectSpotItem);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param cmmsInspectSpotItem
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-巡检项-编辑")
+	@ApiOperation(value="巡检点-巡检项-编辑", notes="巡检点-巡检项-编辑")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_item:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody CmmsInspectSpotItem cmmsInspectSpotItem) {
+		cmmsInspectSpotItemService.updateById(cmmsInspectSpotItem);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-巡检项-通过id删除")
+	@ApiOperation(value="巡检点-巡检项-通过id删除", notes="巡检点-巡检项-通过id删除")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_item:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		cmmsInspectSpotItemService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "巡检点-巡检项-批量删除")
+	@ApiOperation(value="巡检点-巡检项-批量删除", notes="巡检点-巡检项-批量删除")
+	//@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_item:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.cmmsInspectSpotItemService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "巡检点-巡检项-通过id查询")
+	@ApiOperation(value="巡检点-巡检项-通过id查询", notes="巡检点-巡检项-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<CmmsInspectSpotItem> queryById(@RequestParam(name="id",required=true) String id) {
+		CmmsInspectSpotItem cmmsInspectSpotItem = cmmsInspectSpotItemService.getById(id);
+		if(cmmsInspectSpotItem==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(cmmsInspectSpotItem);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param cmmsInspectSpotItem
+    */
+    //@RequiresPermissions("org.jeecg.modules:ems_cmms_inspect_spot_item:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, CmmsInspectSpotItem cmmsInspectSpotItem) {
+        return super.exportXls(request, cmmsInspectSpotItem, CmmsInspectSpotItem.class, "巡检点-巡检项");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    //@RequiresPermissions("ems_cmms_inspect_spot_item:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, CmmsInspectSpotItem.class);
+    }
+
+}

+ 50 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/entity/CmmsInspectSpotItem.java

@@ -0,0 +1,50 @@
+package org.jeecg.modules.cmmsInspectSpotItem.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 巡检点-巡检项
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Data
+@TableName("ems_cmms_inspect_spot_item")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="ems_cmms_inspect_spot_item对象", description="巡检点-巡检项")
+public class CmmsInspectSpotItem implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**巡检内容-巡检项ID*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "巡检内容-巡检项ID")
+    private java.lang.String id;
+	/**巡检内容-设备ID*/
+	@Excel(name = "巡检内容-设备ID", width = 15)
+    @ApiModelProperty(value = "巡检内容-设备ID")
+    private java.lang.String contequiptid;
+	/**巡检项ID*/
+	@Excel(name = "巡检项ID", width = 15)
+    @ApiModelProperty(value = "巡检项ID")
+    private java.lang.String inspectitemid;
+	/**所属部门*/
+    @ApiModelProperty(value = "所属部门")
+    private java.lang.String sysOrgCode;
+}

+ 17 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/mapper/CmmsInspectSpotItemMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.cmmsInspectSpotItem.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.cmmsInspectSpotItem.entity.CmmsInspectSpotItem;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 巡检点-巡检项
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+public interface CmmsInspectSpotItemMapper extends BaseMapper<CmmsInspectSpotItem> {
+
+}

+ 5 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/mapper/xml/CmmsInspectSpotItemMapper.xml

@@ -0,0 +1,5 @@
+<?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="org.jeecg.modules.cmmsInspectSpotItem.mapper.CmmsInspectSpotItemMapper">
+
+</mapper>

+ 14 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/service/ICmmsInspectSpotItemService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.cmmsInspectSpotItem.service;
+
+import org.jeecg.modules.cmmsInspectSpotItem.entity.CmmsInspectSpotItem;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 巡检点-巡检项
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+public interface ICmmsInspectSpotItemService extends IService<CmmsInspectSpotItem> {
+
+}

+ 19 - 0
jeecg_module_ems/src/main/java/org/jeecg/modules/cmmsInspectSpotItem/service/impl/CmmsInspectSpotItemServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.cmmsInspectSpotItem.service.impl;
+
+import org.jeecg.modules.cmmsInspectSpotItem.entity.CmmsInspectSpotItem;
+import org.jeecg.modules.cmmsInspectSpotItem.mapper.CmmsInspectSpotItemMapper;
+import org.jeecg.modules.cmmsInspectSpotItem.service.ICmmsInspectSpotItemService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 巡检点-巡检项
+ * @Author: jeecg-boot
+ * @Date:   2024-01-17
+ * @Version: V1.0
+ */
+@Service
+public class CmmsInspectSpotItemServiceImpl extends ServiceImpl<CmmsInspectSpotItemMapper, CmmsInspectSpotItem> implements ICmmsInspectSpotItemService {
+
+}