From c81442b41d5b525332aa96a23a0b4c94dcf8c731 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期五, 12 七月 2024 18:02:56 +0800
Subject: [PATCH] 维修标准

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardCategoryMapper.java            |   17 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandard.java                          |   61 ++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardController.java            |  195 +++++++++++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandardCategory.java                  |   58 ++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardService.java                 |   14 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardServiceImpl.java         |   19 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardCategoryServiceImpl.java |  222 +++++++++++++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardMapper.java                    |   17 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardCategoryController.java    |  202 ++++++++++++++
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardCategoryMapper.xml         |    5 
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardMapper.xml                 |    5 
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardCategoryService.java         |   18 +
 12 files changed, 833 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardCategoryController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardCategoryController.java
new file mode 100644
index 0000000..efc2188
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardCategoryController.java
@@ -0,0 +1,202 @@
+package org.jeecg.modules.eam.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.CommonGenericTree;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.eam.entity.ProcessParameters;
+import org.jeecg.modules.eam.entity.ProcessParametersCategory;
+import org.jeecg.modules.eam.entity.RepairStandard;
+import org.jeecg.modules.eam.entity.RepairStandardCategory;
+import org.jeecg.modules.eam.service.IRepairStandardCategoryService;
+
+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.jeecg.modules.eam.service.IRepairStandardService;
+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: mom_eam_repair_standard_category
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+@Api(tags="mom_eam_repair_standard_category")
+@RestController
+@RequestMapping("/eam/repairStandardCategory")
+@Slf4j
+public class RepairStandardCategoryController extends JeecgController<RepairStandardCategory, IRepairStandardCategoryService> {
+	@Autowired
+	private IRepairStandardCategoryService repairStandardCategoryService;
+
+	 @Autowired
+	private IRepairStandardService repairStandardService;
+	
+	/**
+	 * 鍒嗛〉鍒楄〃鏌ヨ
+	 *
+	 * @param repairStandardCategory
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "mom_eam_repair_standard_category-鍒嗛〉鍒楄〃鏌ヨ")
+	@ApiOperation(value="mom_eam_repair_standard_category-鍒嗛〉鍒楄〃鏌ヨ", notes="mom_eam_repair_standard_category-鍒嗛〉鍒楄〃鏌ヨ")
+	@GetMapping(value = "/list")
+	public Result<IPage<RepairStandardCategory>> queryPageList(RepairStandardCategory repairStandardCategory,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<RepairStandardCategory> queryWrapper = QueryGenerator.initQueryWrapper(repairStandardCategory, req.getParameterMap());
+		Page<RepairStandardCategory> page = new Page<RepairStandardCategory>(pageNo, pageSize);
+		IPage<RepairStandardCategory> pageList = repairStandardCategoryService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   娣诲姞
+	 *
+	 * @param repairStandardCategory
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard_category-娣诲姞")
+	@ApiOperation(value="mom_eam_repair_standard_category-娣诲姞", notes="mom_eam_repair_standard_category-娣诲姞")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard_category:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody RepairStandardCategory repairStandardCategory) {
+		repairStandardCategoryService.save(repairStandardCategory);
+		return Result.OK("娣诲姞鎴愬姛锛�");
+	}
+	
+	/**
+	 *  缂栬緫
+	 *
+	 * @param repairStandardCategory
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard_category-缂栬緫")
+	@ApiOperation(value="mom_eam_repair_standard_category-缂栬緫", notes="mom_eam_repair_standard_category-缂栬緫")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard_category:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody RepairStandardCategory repairStandardCategory) {
+		repairStandardCategoryService.updateById(repairStandardCategory);
+		return Result.OK("缂栬緫鎴愬姛!");
+	}
+	
+	/**
+	 *   閫氳繃id鍒犻櫎
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard_category-閫氳繃id鍒犻櫎")
+	@ApiOperation(value="mom_eam_repair_standard_category-閫氳繃id鍒犻櫎", notes="mom_eam_repair_standard_category-閫氳繃id鍒犻櫎")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard_category:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		List<RepairStandard> repairStandardList = repairStandardService.lambdaQuery()
+				.eq(RepairStandard::getRepairStandardCategoryId, id)
+				.eq(RepairStandard::getDelFlag, "0").list();
+		if(repairStandardList.size()>0){
+			return Result.error(repairStandardList.size()+"");
+		}
+		repairStandardCategoryService.removeById(id);
+		return Result.OK("鍒犻櫎鎴愬姛!");
+	}
+	
+	/**
+	 *  鎵归噺鍒犻櫎
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard_category-鎵归噺鍒犻櫎")
+	@ApiOperation(value="mom_eam_repair_standard_category-鎵归噺鍒犻櫎", notes="mom_eam_repair_standard_category-鎵归噺鍒犻櫎")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard_category:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.repairStandardCategoryService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("鎵归噺鍒犻櫎鎴愬姛!");
+	}
+	
+	/**
+	 * 閫氳繃id鏌ヨ
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "mom_eam_repair_standard_category-閫氳繃id鏌ヨ")
+	@ApiOperation(value="mom_eam_repair_standard_category-閫氳繃id鏌ヨ", notes="mom_eam_repair_standard_category-閫氳繃id鏌ヨ")
+	@GetMapping(value = "/queryById")
+	public Result<RepairStandardCategory> queryById(@RequestParam(name="id",required=true) String id) {
+		RepairStandardCategory repairStandardCategory = repairStandardCategoryService.getById(id);
+		if(repairStandardCategory==null) {
+			return Result.error("鏈壘鍒板搴旀暟鎹�");
+		}
+		return Result.OK(repairStandardCategory);
+	}
+
+    /**
+    * 瀵煎嚭excel
+    *
+    * @param request
+    * @param repairStandardCategory
+    */
+    //@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard_category:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, RepairStandardCategory repairStandardCategory) {
+        return super.exportXls(request, repairStandardCategory, RepairStandardCategory.class, "mom_eam_repair_standard_category");
+    }
+
+    /**
+      * 閫氳繃excel瀵煎叆鏁版嵁
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    //@RequiresPermissions("mom_eam_repair_standard_category:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, RepairStandardCategory.class);
+    }
+
+	 /**
+	  * @MethodName: loadTree
+	  * @Description: 鏁呴殰鍘熷洜 鏍�
+	  */
+	 @GetMapping("/loadTree")
+	 public Result<?> loadTree(HttpServletRequest httpServletRequest) {
+		 List<CommonGenericTree> list = repairStandardCategoryService.loadTree();
+		 return Result.ok(list);
+	 }
+
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardController.java
new file mode 100644
index 0000000..848ed0c
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairStandardController.java
@@ -0,0 +1,195 @@
+package org.jeecg.modules.eam.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.eam.entity.ProcessParameters;
+import org.jeecg.modules.eam.entity.ProcessParametersCategory;
+import org.jeecg.modules.eam.entity.RepairStandard;
+import org.jeecg.modules.eam.entity.RepairStandardCategory;
+import org.jeecg.modules.eam.service.IRepairStandardCategoryService;
+import org.jeecg.modules.eam.service.IRepairStandardService;
+
+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: mom_eam_repair_standard
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+@Api(tags="mom_eam_repair_standard")
+@RestController
+@RequestMapping("/eam/repairStandard")
+@Slf4j
+public class RepairStandardController extends JeecgController<RepairStandard, IRepairStandardService> {
+	@Autowired
+	private IRepairStandardService repairStandardService;
+
+	 @Autowired
+	private IRepairStandardCategoryService repairStandardCategoryService;
+	
+	/**
+	 * 鍒嗛〉鍒楄〃鏌ヨ
+	 *
+	 * @param repairStandard
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "mom_eam_repair_standard-鍒嗛〉鍒楄〃鏌ヨ")
+	@ApiOperation(value="mom_eam_repair_standard-鍒嗛〉鍒楄〃鏌ヨ", notes="mom_eam_repair_standard-鍒嗛〉鍒楄〃鏌ヨ")
+	@GetMapping(value = "/list")
+	public Result<IPage<RepairStandard>> queryPageList(RepairStandard repairStandard,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+		QueryWrapper<RepairStandard> queryWrapper = QueryGenerator.initQueryWrapper(repairStandard, req.getParameterMap());
+		Page<RepairStandard> page = new Page<RepairStandard>(pageNo, pageSize);
+		IPage<RepairStandard> pageList = repairStandardService.page(page, queryWrapper);
+		List<RepairStandard> records = pageList.getRecords();
+		for (RepairStandard record : records) {
+			String repairStandardCategoryId = record.getRepairStandardCategoryId();
+			RepairStandardCategory standardCategory = repairStandardCategoryService.getById(repairStandardCategoryId);
+			if(standardCategory != null ){
+				record.setRepairStandardCategoryNumName(standardCategory.getNum()+"/"+ standardCategory.getName());
+			}else{
+				record.setRepairStandardCategoryNumName("/");
+			}
+
+		}
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   娣诲姞
+	 *
+	 * @param repairStandard
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard-娣诲姞")
+	@ApiOperation(value="mom_eam_repair_standard-娣诲姞", notes="mom_eam_repair_standard-娣诲姞")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody RepairStandard repairStandard) {
+		repairStandardService.save(repairStandard);
+		return Result.OK("娣诲姞鎴愬姛锛�");
+	}
+	
+	/**
+	 *  缂栬緫
+	 *
+	 * @param repairStandard
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard-缂栬緫")
+	@ApiOperation(value="mom_eam_repair_standard-缂栬緫", notes="mom_eam_repair_standard-缂栬緫")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody RepairStandard repairStandard) {
+		repairStandardService.updateById(repairStandard);
+		return Result.OK("缂栬緫鎴愬姛!");
+	}
+	
+	/**
+	 *   閫氳繃id鍒犻櫎
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard-閫氳繃id鍒犻櫎")
+	@ApiOperation(value="mom_eam_repair_standard-閫氳繃id鍒犻櫎", notes="mom_eam_repair_standard-閫氳繃id鍒犻櫎")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		repairStandardService.removeById(id);
+		return Result.OK("鍒犻櫎鎴愬姛!");
+	}
+	
+	/**
+	 *  鎵归噺鍒犻櫎
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "mom_eam_repair_standard-鎵归噺鍒犻櫎")
+	@ApiOperation(value="mom_eam_repair_standard-鎵归噺鍒犻櫎", notes="mom_eam_repair_standard-鎵归噺鍒犻櫎")
+	//@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.repairStandardService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("鎵归噺鍒犻櫎鎴愬姛!");
+	}
+	
+	/**
+	 * 閫氳繃id鏌ヨ
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "mom_eam_repair_standard-閫氳繃id鏌ヨ")
+	@ApiOperation(value="mom_eam_repair_standard-閫氳繃id鏌ヨ", notes="mom_eam_repair_standard-閫氳繃id鏌ヨ")
+	@GetMapping(value = "/queryById")
+	public Result<RepairStandard> queryById(@RequestParam(name="id",required=true) String id) {
+		RepairStandard repairStandard = repairStandardService.getById(id);
+		if(repairStandard==null) {
+			return Result.error("鏈壘鍒板搴旀暟鎹�");
+		}
+		return Result.OK(repairStandard);
+	}
+
+    /**
+    * 瀵煎嚭excel
+    *
+    * @param request
+    * @param repairStandard
+    */
+    //@RequiresPermissions("org.jeecg.modules.mdc:mom_eam_repair_standard:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, RepairStandard repairStandard) {
+        return super.exportXls(request, repairStandard, RepairStandard.class, "mom_eam_repair_standard");
+    }
+
+    /**
+      * 閫氳繃excel瀵煎叆鏁版嵁
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    //@RequiresPermissions("mom_eam_repair_standard:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, RepairStandard.class);
+    }
+
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandard.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandard.java
new file mode 100644
index 0000000..0af8d7a
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandard.java
@@ -0,0 +1,61 @@
+package org.jeecg.modules.eam.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.base.entity.JeecgEntity;
+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: mom_eam_repair_standard
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+@Data
+@TableName("mom_eam_repair_standard")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="mom_eam_repair_standard瀵硅薄", description="mom_eam_repair_standard")
+public class RepairStandard extends JeecgEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**num*/
+	@Excel(name = "num", width = 15)
+    @ApiModelProperty(value = "num")
+    private java.lang.String num;
+	/**name*/
+	@Excel(name = "name", width = 15)
+    @ApiModelProperty(value = "name")
+    private java.lang.String name;
+
+	/**delFlag*/
+	@Excel(name = "delFlag", width = 15)
+    @ApiModelProperty(value = "delFlag")
+    @TableLogic
+    private java.lang.Integer delFlag = CommonConstant.DEL_FLAG_0;
+	/**remark*/
+	@Excel(name = "remark", width = 15)
+    @ApiModelProperty(value = "remark")
+    private java.lang.String remark;
+	/**repairStandardCategoryId*/
+	@Excel(name = "repairStandardCategoryId", width = 15)
+    @ApiModelProperty(value = "repairStandardCategoryId")
+    private java.lang.String repairStandardCategoryId;
+
+    @ApiModelProperty(value = "缁翠慨鏍囧噯鍒嗙被缂栫爜/鍚嶇О")
+    @TableField(exist = false)
+    private String repairStandardCategoryNumName;
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandardCategory.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandardCategory.java
new file mode 100644
index 0000000..f866225
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairStandardCategory.java
@@ -0,0 +1,58 @@
+package org.jeecg.modules.eam.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.jeecg.common.constant.CommonConstant;
+import org.jeecg.common.system.base.entity.JeecgEntity;
+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: mom_eam_repair_standard_category
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+@Data
+@TableName("mom_eam_repair_standard_category")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="mom_eam_repair_standard_category瀵硅薄", description="mom_eam_repair_standard_category")
+public class RepairStandardCategory extends JeecgEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**鍒嗙被缂栫爜*/
+	@Excel(name = "鍒嗙被缂栫爜", width = 15)
+    @ApiModelProperty(value = "鍒嗙被缂栫爜")
+    private java.lang.String num;
+	/**鍒嗙被鍚嶇О*/
+	@Excel(name = "鍒嗙被鍚嶇О", width = 15)
+    @ApiModelProperty(value = "鍒嗙被鍚嶇О")
+    private java.lang.String name;
+	/**delFlag*/
+	@Excel(name = "delFlag", width = 15)
+    @ApiModelProperty(value = "delFlag")
+    @TableLogic
+    private java.lang.Integer delFlag = CommonConstant.DEL_FLAG_0;
+	/**remark*/
+	@Excel(name = "remark", width = 15)
+    @ApiModelProperty(value = "remark")
+    private java.lang.String remark;
+	/**parentId*/
+	@Excel(name = "parentId", width = 15)
+    @ApiModelProperty(value = "parentId")
+    private java.lang.String parentId;
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardCategoryMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardCategoryMapper.java
new file mode 100644
index 0000000..08797e4
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardCategoryMapper.java
@@ -0,0 +1,17 @@
+package org.jeecg.modules.eam.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.eam.entity.RepairStandardCategory;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: mom_eam_repair_standard_category
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+public interface RepairStandardCategoryMapper extends BaseMapper<RepairStandardCategory> {
+
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardMapper.java
new file mode 100644
index 0000000..4595493
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairStandardMapper.java
@@ -0,0 +1,17 @@
+package org.jeecg.modules.eam.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.eam.entity.RepairStandard;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: mom_eam_repair_standard
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+public interface RepairStandardMapper extends BaseMapper<RepairStandard> {
+
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardCategoryMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardCategoryMapper.xml
new file mode 100644
index 0000000..1f1773f
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardCategoryMapper.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.mdc.eam.mapper.RepairStandardCategoryMapper">
+
+</mapper>
\ No newline at end of file
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardMapper.xml
new file mode 100644
index 0000000..4cf2093
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairStandardMapper.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.mdc.eam.mapper.RepairStandardMapper">
+
+</mapper>
\ No newline at end of file
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardCategoryService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardCategoryService.java
new file mode 100644
index 0000000..8fe1ce4
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardCategoryService.java
@@ -0,0 +1,18 @@
+package org.jeecg.modules.eam.service;
+
+import org.jeecg.common.api.vo.CommonGenericTree;
+import org.jeecg.modules.eam.entity.RepairStandardCategory;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Description: mom_eam_repair_standard_category
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+public interface IRepairStandardCategoryService extends IService<RepairStandardCategory> {
+
+    public List<CommonGenericTree> loadTree();
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardService.java
new file mode 100644
index 0000000..93c32d0
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IRepairStandardService.java
@@ -0,0 +1,14 @@
+package org.jeecg.modules.eam.service;
+
+import org.jeecg.modules.eam.entity.RepairStandard;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: mom_eam_repair_standard
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+public interface IRepairStandardService extends IService<RepairStandard> {
+
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardCategoryServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardCategoryServiceImpl.java
new file mode 100644
index 0000000..920f842
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardCategoryServiceImpl.java
@@ -0,0 +1,222 @@
+package org.jeecg.modules.eam.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import org.jeecg.common.api.vo.CommonGenericTree;
+import org.jeecg.modules.eam.entity.ProcessParametersCategory;
+import org.jeecg.modules.eam.entity.RepairStandardCategory;
+import org.jeecg.modules.eam.mapper.RepairStandardCategoryMapper;
+import org.jeecg.modules.eam.service.IRepairStandardCategoryService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: mom_eam_repair_standard_category
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+@Service
+public class RepairStandardCategoryServiceImpl extends ServiceImpl<RepairStandardCategoryMapper, RepairStandardCategory> implements IRepairStandardCategoryService {
+
+    @Override
+    public List<CommonGenericTree> loadTree() {
+        List<RepairStandardCategory> repairStandardCategoryList = this.lambdaQuery().eq(RepairStandardCategory::getDelFlag, "0").list();
+        List<CommonGenericTree> commonGenericTrees = loadTree(repairStandardCategoryList);
+        return commonGenericTrees;
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<CommonGenericTree> loadTree(List<RepairStandardCategory> repairStandardCategoryList) {
+        @SuppressWarnings("unused")
+        RepairStandardCategory repairStandardCategory = new RepairStandardCategory();
+        List<CommonGenericTree> list = new ArrayList<>();
+        Map<String, CommonGenericTree> map = new HashMap<>();
+        Map<String, CommonGenericTree> map2 = new HashMap<>();
+        Map<String, CommonGenericTree> map3 = new HashMap<>();
+        Map<String, CommonGenericTree> map4 = new HashMap<>();
+        Map<String, CommonGenericTree> map5 = new HashMap<>();
+        Map<String, CommonGenericTree> map6 = new HashMap<>();
+        Map<String, CommonGenericTree> map7 = new HashMap<>();
+        CommonGenericTree<RepairStandardCategory> node = new CommonGenericTree<>();
+        node.setKey("-1");
+        node.setValue("-1");
+        node.setTitle("缁翠慨鏍囧噯鍒嗙被");
+        node.setRField1("");
+        node.setRField2("");
+        node.setDisabled(false);
+        node.setEntity(new RepairStandardCategory());
+        list.add(node);
+        if (CollectionUtils.isNotEmpty(list)) {
+            CommonGenericTree<RepairStandardCategory> pcNode;
+            for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                if (standardCategory.getParentId().equals("-1")) {
+                    pcNode = new CommonGenericTree<>();
+                    pcNode.setKey(standardCategory.getId());
+                    pcNode.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                    pcNode.setParentId(node.getKey());
+                    pcNode.setIcon("");
+                    pcNode.setType(0);
+                    pcNode.setValue(standardCategory.getId());
+                    pcNode.setDisabled(false);
+                    pcNode.setRField1(standardCategory.getNum());
+                    pcNode.setRField2(standardCategory.getName());
+                    pcNode.setEntity(standardCategory);
+                    node.addChildren(pcNode);
+                    map.put(standardCategory.getId(), pcNode);
+                }
+            }
+            CommonGenericTree<RepairStandardCategory> childNode;
+            for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                if (map.containsKey(standardCategory.getParentId())) {
+                    pcNode = map.get(standardCategory.getParentId());
+                    childNode = new CommonGenericTree<>();
+                    childNode.setKey(standardCategory.getId());
+                    childNode.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                    childNode.setParentId(standardCategory.getParentId());
+                    childNode.setIcon("");
+                    childNode.setType(0);
+                    childNode.setValue(standardCategory.getId());
+                    childNode.setDisabled(false);
+                    childNode.setRField1(standardCategory.getNum());
+                    childNode.setRField2(standardCategory.getName());
+                    childNode.setEntity(standardCategory);
+                    pcNode.addChildren(childNode);
+                    map2.put(standardCategory.getId(), childNode);
+                }
+            }
+            if(map2.size()>0){
+                CommonGenericTree<RepairStandardCategory> child2Node;
+                for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                    if (map2.containsKey(standardCategory.getParentId())) {
+                        pcNode = map2.get(standardCategory.getParentId());
+                        child2Node = new CommonGenericTree<>();
+                        child2Node.setKey(standardCategory.getId());
+                        child2Node.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                        child2Node.setParentId(standardCategory.getParentId());
+                        child2Node.setIcon("");
+                        child2Node.setType(0);
+                        child2Node.setValue(standardCategory.getId());
+                        child2Node.setDisabled(false);
+                        child2Node.setRField1(standardCategory.getNum());
+                        child2Node.setRField2(standardCategory.getName());
+                        child2Node.setEntity(standardCategory);
+                        pcNode.addChildren(child2Node);
+                        map3.put(standardCategory.getId(), child2Node);
+                    }
+                }
+                if(map3.size()>0){
+                    CommonGenericTree<RepairStandardCategory> child3Node;
+                    for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                        if (map3.containsKey(standardCategory.getParentId())) {
+                            pcNode = map3.get(standardCategory.getParentId());
+                            child3Node = new CommonGenericTree<>();
+                            child3Node.setKey(standardCategory.getId());
+                            child3Node.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                            child3Node.setParentId(standardCategory.getParentId());
+                            child3Node.setIcon("");
+                            child3Node.setType(0);
+                            child3Node.setValue(standardCategory.getId());
+                            child3Node.setDisabled(false);
+                            child3Node.setRField1(standardCategory.getNum());
+                            child3Node.setRField2(standardCategory.getName());
+                            child3Node.setEntity(standardCategory);
+                            pcNode.addChildren(child3Node);
+                            map4.put(standardCategory.getId(), child3Node);
+                        }
+                    }
+                    if(map4.size()>0){
+                        CommonGenericTree<RepairStandardCategory> child4Node;
+                        for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                            if (map4.containsKey(standardCategory.getParentId())) {
+                                pcNode = map4.get(standardCategory.getParentId());
+                                child4Node = new CommonGenericTree<>();
+                                child4Node.setKey(standardCategory.getId());
+                                child4Node.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                                child4Node.setParentId(standardCategory.getParentId());
+                                child4Node.setIcon("");
+                                child4Node.setType(0);
+                                child4Node.setValue(standardCategory.getId());
+                                child4Node.setDisabled(false);
+                                child4Node.setRField1(standardCategory.getNum());
+                                child4Node.setRField2(standardCategory.getName());
+                                child4Node.setEntity(standardCategory);
+                                pcNode.addChildren(child4Node);
+                                map5.put(standardCategory.getId(), child4Node);
+                            }
+                        }
+                        if(map5.size()>0){
+                            CommonGenericTree<RepairStandardCategory> child5Node;
+                            for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                                if (map5.containsKey(standardCategory.getParentId())) {
+                                    pcNode = map5.get(standardCategory.getParentId());
+                                    child5Node = new CommonGenericTree<>();
+                                    child5Node.setKey(standardCategory.getId());
+                                    child5Node.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                                    child5Node.setParentId(standardCategory.getParentId());
+                                    child5Node.setIcon("");
+                                    child5Node.setType(0);
+                                    child5Node.setValue(standardCategory.getId());
+                                    child5Node.setDisabled(false);
+                                    child5Node.setRField1(standardCategory.getNum());
+                                    child5Node.setRField2(standardCategory.getName());
+                                    child5Node.setEntity(standardCategory);
+                                    pcNode.addChildren(child5Node);
+                                    map6.put(standardCategory.getId(), child5Node);
+                                }
+                            }
+                            if(map6.size()>0){
+                                CommonGenericTree<RepairStandardCategory> child6Node;
+                                for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                                    if (map6.containsKey(standardCategory.getParentId())) {
+                                        pcNode = map6.get(standardCategory.getParentId());
+                                        child6Node = new CommonGenericTree<>();
+                                        child6Node.setKey(standardCategory.getId());
+                                        child6Node.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                                        child6Node.setParentId(standardCategory.getParentId());
+                                        child6Node.setIcon("");
+                                        child6Node.setType(0);
+                                        child6Node.setValue(standardCategory.getId());
+                                        child6Node.setDisabled(false);
+                                        child6Node.setRField1(standardCategory.getNum());
+                                        child6Node.setRField2(standardCategory.getName());
+                                        child6Node.setEntity(standardCategory);
+                                        pcNode.addChildren(child6Node);
+                                        map7.put(standardCategory.getId(), child6Node);
+                                    }
+                                }
+                                if(map7.size()>0){
+                                    CommonGenericTree<RepairStandardCategory> child7Node;
+                                    for (RepairStandardCategory standardCategory : repairStandardCategoryList) {
+                                        if (map.containsKey(standardCategory.getParentId())) {
+                                            pcNode = map7.get(standardCategory.getParentId());
+                                            child7Node = new CommonGenericTree<>();
+                                            child7Node.setKey(standardCategory.getId());
+                                            child7Node.setTitle(standardCategory.getNum() + "/" + standardCategory.getName());
+                                            child7Node.setParentId(standardCategory.getParentId());
+                                            child7Node.setIcon("");
+                                            child7Node.setType(0);
+                                            child7Node.setValue(standardCategory.getId());
+                                            child7Node.setDisabled(false);
+                                            child7Node.setRField1(standardCategory.getNum());
+                                            child7Node.setRField2(standardCategory.getName());
+                                            child7Node.setEntity(standardCategory);
+//                                            pcNode.addChildren(child7Node);
+//                                            map7.put(cause.getId(), child7Node);
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        return list;
+    }
+}
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardServiceImpl.java
new file mode 100644
index 0000000..ae720da
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairStandardServiceImpl.java
@@ -0,0 +1,19 @@
+package org.jeecg.modules.eam.service.impl;
+
+import org.jeecg.modules.eam.entity.RepairStandard;
+import org.jeecg.modules.eam.mapper.RepairStandardMapper;
+import org.jeecg.modules.eam.service.IRepairStandardService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: mom_eam_repair_standard
+ * @Author: jeecg-boot
+ * @Date:   2024-07-08
+ * @Version: V1.0
+ */
+@Service
+public class RepairStandardServiceImpl extends ServiceImpl<RepairStandardMapper, RepairStandard> implements IRepairStandardService {
+
+}

--
Gitblit v1.9.3