Merge remote-tracking branch 'origin/master'
| | |
| | | "avatar": "", |
| | | "version": "4.9.2", |
| | | "createdTime": "2025-3-10 16:38:19", |
| | | "updatedTime": "2025-3-21 11:45:26", |
| | | "updatedTime": "2025-3-28 11:35:57", |
| | | "dbConns": [], |
| | | "profile": { |
| | | "default": { |
| | |
| | | "id": "E3DCF832-3942-40E3-A580-5F5E12DEEE1A" |
| | | }, |
| | | { |
| | | "defKey": "initial_date", |
| | | "defName": "åå§æ¥æ", |
| | | "comment": "ä»åªä¸å¤©å¼å§è®¡ç®ä¸æ¬¡ä¿å
»æ¥æ", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", |
| | | "extProps": {}, |
| | | "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", |
| | | "id": "EBB74A97-DCBD-4D07-925C-B764CC72D78E" |
| | | }, |
| | | { |
| | | "defKey": "maintenance_category", |
| | | "defName": "ä¿å
»åç±»", |
| | | "comment": "", |
| | |
| | | "extProps": {}, |
| | | "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", |
| | | "id": "DDF7469B-D370-47CD-B2ED-908EFB518712" |
| | | }, |
| | | { |
| | | "defKey": "file_code", |
| | | "defName": "æä»¶ç¼ç ", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6", |
| | | "id": "41E30E92-FC92-4E2C-AE7D-AFF4D9371B27" |
| | | }, |
| | | { |
| | | "defKey": "reference_file", |
| | | "defName": "åèæä»¶", |
| | | "comment": "ä¿å
»æ¶åèçä¿å
»æ¥éª¤", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", |
| | | "id": "5576D652-16B0-4098-A22E-0B2F5EF98107" |
| | | } |
| | | ], |
| | | "correlations": [], |
| | |
| | | "id": "2DCD0BA1-6667-4437-BCFF-435A35241D87" |
| | | }, |
| | | { |
| | | "defKey": "standard_id", |
| | | "defName": "æ åid", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "16120F75-6AA7-4483-868D-F07F511BB081", |
| | | "id": "3C255F33-FF50-4CCE-AE46-814FE2C49E17" |
| | | }, |
| | | { |
| | | "defKey": "item_code", |
| | | "defName": "项ç®åºå·", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", |
| | | "extProps": {}, |
| | | "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", |
| | | "id": "CEA9D86B-B482-47B7-977D-D9BA958F0E12" |
| | | }, |
| | | { |
| | | "defKey": "item_name", |
| | | "defName": "ä¿å
»é¡¹åç§°", |
| | | "defName": "ä¿å
»é¡¹ç®", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | |
| | | "id": "95BC61CF-E7E8-4252-B0A5-A18A99449834" |
| | | }, |
| | | { |
| | | "defKey": "sub_item_name", |
| | | "defName": "å项ç®", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", |
| | | "id": "8D5380F2-3F75-4123-81BA-7242CE698481" |
| | | }, |
| | | { |
| | | "defKey": "item_demand", |
| | | "defName": "ä¿å
»è¦æ±", |
| | | "comment": "", |
| | |
| | | String PROCESS_PARAMETERS_RULE = "ProcessParametersRule"; |
| | | //è®¾å¤æ
éåå ç¼ç è§å |
| | | String EQUIPMENT_FAULT_REASON_RULE = "EquipmentFaultReasonRule"; |
| | | //ä¿å
»æ åç¼ç è§å |
| | | String MAINTENANCE_STANDARD_CODE_RULE = "MaintenanceStandardCodeRule"; |
| | | /** |
| | | * å¤ä»¶è¯·è´åç¶æ 1:å·²å建 2:å·²æäº¤ 3:å·²éè¿ 4:已驳å 5:已宿 |
| | | */ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.constant; |
| | | |
| | | /** |
| | | * ä¿å
»åç±» |
| | | */ |
| | | public enum MaintenanceCategoryEnum { |
| | | POINT_INSPECTION, //ç¹æ£ |
| | | WEEK_MAINTENANCE, //å¨ä¿ |
| | | ; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.constant; |
| | | |
| | | /** |
| | | * ä¿å
»æ åç¶æ |
| | | */ |
| | | public enum MaintenanceStandardStatusEnum { |
| | | NORMAL, |
| | | ABOLISH,; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandard; |
| | | import org.jeecg.modules.eam.request.EamMaintenanceStandardRequest; |
| | | import org.jeecg.modules.eam.service.IEamMaintenanceStandardService; |
| | | import java.util.Date; |
| | | 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.common.system.base.controller.JeecgController; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | 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.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; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="ä¿å
»æ å") |
| | | @RestController |
| | | @RequestMapping("/eam/maintenanceStandard") |
| | | public class EamMaintenanceStandardController extends JeecgController<EamMaintenanceStandard, IEamMaintenanceStandardService> { |
| | | @Autowired |
| | | private IEamMaintenanceStandardService eamMaintenanceStandardService; |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param eamMaintenanceStandard |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ å-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="ä¿å
»æ å-å页å表æ¥è¯¢", notes="ä¿å
»æ å-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamMaintenanceStandard eamMaintenanceStandard, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamMaintenanceStandard> queryWrapper = QueryGenerator.initQueryWrapper(eamMaintenanceStandard, req.getParameterMap()); |
| | | Page<EamMaintenanceStandard> page = new Page<EamMaintenanceStandard>(pageNo, pageSize); |
| | | IPage<EamMaintenanceStandard> pageList = eamMaintenanceStandardService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param standardRequest |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ å-æ·»å ") |
| | | @ApiOperation(value="ä¿å
»æ å-æ·»å ", notes="ä¿å
»æ å-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamMaintenanceStandardRequest standardRequest) { |
| | | if(standardRequest == null){ |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if(CollectionUtil.isEmpty(standardRequest.getTableDetailList())) { |
| | | return Result.error("ä¿å
»é¡¹ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.MAINTENANCE_STANDARD_CODE_RULE); |
| | | standardRequest.setStandardCode(codeSeq); |
| | | boolean b = eamMaintenanceStandardService.addMaintenanceStandard(standardRequest); |
| | | if(!b) { |
| | | return Result.error("æ·»å 失败ï¼"); |
| | | } |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param standardRequest |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ å-ç¼è¾") |
| | | @ApiOperation(value="ä¿å
»æ å-ç¼è¾", notes="ä¿å
»æ å-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamMaintenanceStandardRequest standardRequest) { |
| | | // eamMaintenanceStandardService.updateById(eamMaintenanceStandard); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ å-éè¿idå é¤") |
| | | @ApiOperation(value="ä¿å
»æ å-éè¿idå é¤", notes="ä¿å
»æ å-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamMaintenanceStandardService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ å-æ¹éå é¤") |
| | | @ApiOperation(value="ä¿å
»æ å-æ¹éå é¤", notes="ä¿å
»æ å-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamMaintenanceStandardService.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<?> queryById(@RequestParam(name="id",required=true) String id) { |
| | | EamMaintenanceStandard eamMaintenanceStandard = eamMaintenanceStandardService.getById(id); |
| | | return Result.OK(eamMaintenanceStandard); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param eamMaintenanceStandard |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamMaintenanceStandard eamMaintenanceStandard) { |
| | | return super.exportXls(request, eamMaintenanceStandard, EamMaintenanceStandard.class, "ä¿å
»æ å"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamMaintenanceStandard.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | 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.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; |
| | | import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService; |
| | | import java.util.Date; |
| | | 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.common.system.base.controller.JeecgController; |
| | | 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.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; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ åæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="ä¿å
»æ åæç»") |
| | | @RestController |
| | | @RequestMapping("/eam/eamMaintenanceStandardDetail") |
| | | public class EamMaintenanceStandardDetailController extends JeecgController<EamMaintenanceStandardDetail, IEamMaintenanceStandardDetailService> { |
| | | @Autowired |
| | | private IEamMaintenanceStandardDetailService eamMaintenanceStandardDetailService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param eamMaintenanceStandardDetail |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ åæç»-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="ä¿å
»æ åæç»-å页å表æ¥è¯¢", notes="ä¿å
»æ åæç»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamMaintenanceStandardDetail eamMaintenanceStandardDetail, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamMaintenanceStandardDetail> queryWrapper = QueryGenerator.initQueryWrapper(eamMaintenanceStandardDetail, req.getParameterMap()); |
| | | Page<EamMaintenanceStandardDetail> page = new Page<EamMaintenanceStandardDetail>(pageNo, pageSize); |
| | | IPage<EamMaintenanceStandardDetail> pageList = eamMaintenanceStandardDetailService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param eamMaintenanceStandardDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ åæç»-æ·»å ") |
| | | @ApiOperation(value="ä¿å
»æ åæç»-æ·»å ", notes="ä¿å
»æ åæç»-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamMaintenanceStandardDetail eamMaintenanceStandardDetail) { |
| | | eamMaintenanceStandardDetailService.save(eamMaintenanceStandardDetail); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param eamMaintenanceStandardDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ åæç»-ç¼è¾") |
| | | @ApiOperation(value="ä¿å
»æ åæç»-ç¼è¾", notes="ä¿å
»æ åæç»-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamMaintenanceStandardDetail eamMaintenanceStandardDetail) { |
| | | eamMaintenanceStandardDetailService.updateById(eamMaintenanceStandardDetail); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ åæç»-éè¿idå é¤") |
| | | @ApiOperation(value="ä¿å
»æ åæç»-éè¿idå é¤", notes="ä¿å
»æ åæç»-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamMaintenanceStandardDetailService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ä¿å
»æ åæç»-æ¹éå é¤") |
| | | @ApiOperation(value="ä¿å
»æ åæç»-æ¹éå é¤", notes="ä¿å
»æ åæç»-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamMaintenanceStandardDetailService.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<?> queryById(@RequestParam(name="id",required=true) String id) { |
| | | EamMaintenanceStandardDetail eamMaintenanceStandardDetail = eamMaintenanceStandardDetailService.getById(id); |
| | | return Result.OK(eamMaintenanceStandardDetail); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param eamMaintenanceStandardDetail |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamMaintenanceStandardDetail eamMaintenanceStandardDetail) { |
| | | return super.exportXls(request, eamMaintenanceStandardDetail, EamMaintenanceStandardDetail.class, "ä¿å
»æ åæç»"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamMaintenanceStandardDetail.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * @Description: ä¿å
»æ å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("eam_maintenance_standard") |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="eam_maintenance_standard对象", description="ä¿å
»æ å") |
| | | public class EamMaintenanceStandard implements Serializable { |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @Excel(name = "å建人", width = 15) |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @Excel(name = "æ´æ°äºº", width = 15) |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private Integer delFlag; |
| | | /**æ åç¼ç */ |
| | | @Excel(name = "æ åç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "æ åç¼ç ") |
| | | private String standardCode; |
| | | /**æ ååç§°*/ |
| | | @Excel(name = "æ ååç§°", width = 15) |
| | | @ApiModelProperty(value = "æ ååç§°") |
| | | private String standardName; |
| | | /**ä¿å
»å¨æ;åä½:天*/ |
| | | @Excel(name = "ä¿å
»å¨æ;åä½:天", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»å¨æ;åä½:天") |
| | | private Integer maintenancePeriod; |
| | | /**åå§æ¥æ ä»åªä¸å¤©å¼å§è®¡ç®ä¸æ¬¡ä¿å
»æ¥æ*/ |
| | | @Excel(name = "åå§æ¥æ", width = 15, format = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "åå§æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date initialDate; |
| | | /**ä¿å
»åç±»*/ |
| | | @Excel(name = "ä¿å
»åç±»", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»åç±»") |
| | | private String maintenanceCategory; |
| | | /**设å¤ID*/ |
| | | @Excel(name = "设å¤ID", width = 15) |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /**æ åç¶æ*/ |
| | | @Excel(name = "æ åç¶æ", width = 15) |
| | | @ApiModelProperty(value = "æ åç¶æ") |
| | | private String standardStatus; |
| | | /**æ åçæ¬*/ |
| | | @Excel(name = "æ åçæ¬", width = 15) |
| | | @ApiModelProperty(value = "æ åçæ¬") |
| | | private Integer standardVersion; |
| | | /**æä»¶ç¼å·*/ |
| | | @Excel(name = "æä»¶ç¼å·", width = 15) |
| | | @ApiModelProperty(value = "æä»¶ç¼å·") |
| | | private String fileCode; |
| | | /**åèæä»¶*/ |
| | | @Excel(name = "åèæä»¶", width = 15) |
| | | @ApiModelProperty(value = "åèæä»¶") |
| | | private String referenceFile; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * @Description: ä¿å
»æ åæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("eam_maintenance_standard_detail") |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="eam_maintenance_standard_detail对象", description="ä¿å
»æ åæç»") |
| | | public class EamMaintenanceStandardDetail implements Serializable { |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**å建æ¶é´*/ |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¶é´*/ |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private Integer delFlag; |
| | | /**ä¿å
»æ åID*/ |
| | | @ApiModelProperty(value = "ä¿å
»æ åID") |
| | | private String standardId; |
| | | /**ä¿å
»é¡¹åºå·*/ |
| | | @ApiModelProperty(value = "ä¿å
»é¡¹åºå·") |
| | | private String itemCode; |
| | | /**ä¿å
»é¡¹*/ |
| | | @ApiModelProperty(value = "ä¿å
»é¡¹") |
| | | private String itemName; |
| | | /**åä¿å
»é¡¹*/ |
| | | @ApiModelProperty(value = "åä¿å
»é¡¹") |
| | | private String subItemName; |
| | | /**ä¿å
»è¦æ±*/ |
| | | @ApiModelProperty(value = "ä¿å
»è¦æ±") |
| | | private String itemDemand; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ åæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface EamMaintenanceStandardDetailMapper extends BaseMapper<EamMaintenanceStandardDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandard; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface EamMaintenanceStandardMapper extends BaseMapper<EamMaintenanceStandard> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.eam.mapper.EamMaintenanceStandardDetailMapper"> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.eam.mapper.EamMaintenanceStandardMapper"> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.api.vo.FileUploadResult; |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="eam_maintenance_standard对象", description="ä¿å
»æ å") |
| | | public class EamMaintenanceStandardRequest implements Serializable { |
| | | |
| | | /**主é®*/ |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**æ åç¼ç */ |
| | | @ApiModelProperty(value = "æ åç¼ç ") |
| | | private String standardCode; |
| | | /**æ ååç§°*/ |
| | | @ApiModelProperty(value = "æ ååç§°") |
| | | private String standardName; |
| | | /**ä¿å
»å¨æ;åä½:天*/ |
| | | @ApiModelProperty(value = "ä¿å
»å¨æ;åä½:天") |
| | | private Integer maintenancePeriod; |
| | | /**åå§æ¥æ ä»åªä¸å¤©å¼å§è®¡ç®ä¸æ¬¡ä¿å
»æ¥æ*/ |
| | | @ApiModelProperty(value = "åå§æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date initialDate; |
| | | /**ä¿å
»åç±»*/ |
| | | @ApiModelProperty(value = "ä¿å
»åç±»") |
| | | private String maintenanceCategory; |
| | | /**设å¤ID*/ |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /**æ åç¶æ*/ |
| | | @ApiModelProperty(value = "æ åç¶æ") |
| | | private String standardStatus; |
| | | /**æ åçæ¬*/ |
| | | @ApiModelProperty(value = "æ åçæ¬") |
| | | private Integer standardVersion; |
| | | /**æä»¶ç¼å·*/ |
| | | @ApiModelProperty(value = "æä»¶ç¼å·") |
| | | private String fileCode; |
| | | /**åèæä»¶*/ |
| | | @ApiModelProperty(value = "åèæä»¶") |
| | | private String referenceFile; |
| | | /**ä¸ä¼ æä»¶å¯¹ç³»*/ |
| | | @ApiModelProperty(value = "ä¸ä¼ æä»¶å¯¹è±¡") |
| | | private List<FileUploadResult> fileList; |
| | | /**å表 ä¿å
»é¡¹æç»*/ |
| | | @ApiModelProperty(value = "å表 ä¿å
»é¡¹æç»") |
| | | private List<EamMaintenanceStandardDetail> tableDetailList; |
| | | /**å é¤ ä¿å
»é¡¹æç»*/ |
| | | @ApiModelProperty(value = "å é¤ ä¿å
»é¡¹æç»") |
| | | private List<EamMaintenanceStandardDetail> removeDetailList; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ åæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IEamMaintenanceStandardDetailService extends IService<EamMaintenanceStandardDetail> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandard; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.eam.request.EamMaintenanceStandardRequest; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IEamMaintenanceStandardService extends IService<EamMaintenanceStandard> { |
| | | |
| | | /** |
| | | * æ°å¢ ä¿å
»æ å |
| | | * @param standardRequest |
| | | */ |
| | | boolean addMaintenanceStandard(EamMaintenanceStandardRequest standardRequest); |
| | | |
| | | /** |
| | | * æ°å¢ ä¿å
»æ å |
| | | * @param standardRequest |
| | | */ |
| | | boolean editMaintenanceStandard(EamMaintenanceStandardRequest standardRequest); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; |
| | | import org.jeecg.modules.eam.mapper.EamMaintenanceStandardDetailMapper; |
| | | import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ åæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class EamMaintenanceStandardDetailServiceImpl extends ServiceImpl<EamMaintenanceStandardDetailMapper, EamMaintenanceStandardDetail> implements IEamMaintenanceStandardDetailService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.json.JsonMapper; |
| | | import org.jeecg.common.api.vo.FileUploadResult; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum; |
| | | import org.jeecg.modules.eam.entity.EamMaintenanceStandard; |
| | | import org.jeecg.modules.eam.mapper.EamMaintenanceStandardMapper; |
| | | import org.jeecg.modules.eam.request.EamMaintenanceStandardRequest; |
| | | import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService; |
| | | import org.jeecg.modules.eam.service.IEamMaintenanceStandardService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-26 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class EamMaintenanceStandardServiceImpl extends ServiceImpl<EamMaintenanceStandardMapper, EamMaintenanceStandard> implements IEamMaintenanceStandardService { |
| | | |
| | | @Resource |
| | | private EamMaintenanceStandardMapper eamMaintenanceStandardMapper; |
| | | |
| | | @Autowired |
| | | private IEamMaintenanceStandardDetailService eamMaintenanceStandardDetailService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean addMaintenanceStandard(EamMaintenanceStandardRequest standardRequest) { |
| | | EamMaintenanceStandard entity = new EamMaintenanceStandard(); |
| | | entity.setStandardCode(standardRequest.getStandardCode()); |
| | | entity.setStandardName(standardRequest.getStandardName()); |
| | | entity.setMaintenanceCategory(standardRequest.getMaintenanceCategory()); |
| | | entity.setMaintenancePeriod(standardRequest.getMaintenancePeriod()); |
| | | entity.setInitialDate(standardRequest.getInitialDate()); |
| | | entity.setFileCode(standardRequest.getFileCode()); |
| | | entity.setStandardStatus(MaintenanceStandardStatusEnum.NORMAL.name()); |
| | | //çæ¬éå¢ |
| | | entity.setStandardVersion(CommonConstant.OPERATE_TYPE_1); |
| | | //设å¤å¤ç |
| | | entity.setEquipmentId(standardRequest.getEquipmentId()); |
| | | //é夿§æ ¡éª |
| | | //TODO |
| | | //å¤çéä»¶ |
| | | if(CollectionUtil.isNotEmpty(standardRequest.getFileList())) { |
| | | FileUploadResult fileUploadResult = standardRequest.getFileList().get(0); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | | String referenceFile = mapper.writeValueAsString(fileUploadResult); |
| | | entity.setReferenceFile(referenceFile); |
| | | } catch (JsonProcessingException e) { |
| | | log.error("JSON转æ¢å¤±è´¥ï¼" + e.getMessage(), e); |
| | | } |
| | | } |
| | | eamMaintenanceStandardMapper.insert(entity); |
| | | //å¤çæç»æ°æ® |
| | | if(CollectionUtil.isNotEmpty(standardRequest.getTableDetailList())) { |
| | | standardRequest.getTableDetailList().forEach(tableDetail -> { |
| | | tableDetail.setStandardId(entity.getId()); |
| | | }); |
| | | eamMaintenanceStandardDetailService.saveBatch(standardRequest.getTableDetailList()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean editMaintenanceStandard(EamMaintenanceStandardRequest standardRequest) { |
| | | return false; |
| | | } |
| | | } |