From 6e006cb835fce4720139de0cc2ec3be734295ed9 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期六, 12 七月 2025 14:18:35 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java | 104 ++-------- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamSecondMaintenanceRequest.java | 115 ++++++++-- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamSecondMaintenanceOrderController.java | 6 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamThirdMaintenanceRequest.java | 13 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/util/DateUtils.java | 35 ++- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java | 69 ++---- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderDetailController.java | 3 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamEquipment.java | 2 /dev/null | 62 ------ lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java | 2 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrder.java | 90 +++----- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamSecondMaintenanceOrderMapper.xml | 4 lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrderDetail.java | 33 +-- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java | 13 + lxzn-module-eam/src/main/java/org/jeecg/modules/eam/job/ThirdMaintenanceOrderGenerateJob.java | 19 - 15 files changed, 233 insertions(+), 337 deletions(-) diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java index eb55e54..26b729f 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/aspect/EquipmentHistoryLogAspect.java @@ -106,7 +106,7 @@ log.setEquipmentId(order.getEquipmentId()); log.setBusinessId(order.getId()); log.setOperator(order.getOperator()); - log.setDescription(order.getConfirmComment()); + log.setDescription(order.getInspectConfirmComment()); log.setCreateTime(order.getActualEndTime()); } } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamEquipment.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamEquipment.java index 344c9bf..97be295 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamEquipment.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamEquipment.java @@ -120,7 +120,7 @@ */ @Excel(name = "涓績/宸ュ尯/宸ユ", width = 15, orderNum = "4") @ApiModelProperty(value = "涓績/宸ュ尯/宸ユ") - @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "factory_code") + @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code") private String factoryOrgCode; /** diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrder.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrder.java index 635a7d9..762c118 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrder.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrder.java @@ -78,7 +78,7 @@ */ @Excel(name = "鏍囧噯ID", width = 15) @ApiModelProperty(value = "鏍囧噯ID") - @Dict(dicCode = "eam_maintenance_standard, standard_name, id") + @Dict(dictTable = "eam_maintenance_standard", dicCode = "id", dicText = "standard_name") private String standardId; /** * 璁″垝淇濆吇鏃ユ湡 @@ -101,15 +101,14 @@ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date actualEndTime; + /** 鎿嶄綔宸� */ + @ApiModelProperty(value = "鎿嶄綔宸�") + private String operator ; + /** 缁翠慨宸� */ + @ApiModelProperty(value = "缁翠慨宸�") + private String repairman ; /** - * 淇濆吇浜� - */ - @Excel(name = "淇濆吇浜�", width = 15) - @ApiModelProperty(value = "淇濆吇浜�") - @Dict(dicCode = "sys_user, realname, username") - private String operator; - /** - * 淇濆吇鐘舵�� + * 淇濆吇鐘舵�� 寰呬繚鍏汇�佷繚鍏讳腑銆佺鐞嗗憳纭銆佹鏌ヤ汉纭銆佸凡瀹屾垚 */ @Excel(name = "淇濆吇鐘舵��", width = 15) @ApiModelProperty(value = "淇濆吇鐘舵��") @@ -123,55 +122,35 @@ @Dict(dicCode = "order_creation_method") private String creationMethod; /** - * 缁翠慨缁勯暱纭 + * 绠$悊鍛樼‘璁� */ - @Excel(name = "缁翠慨缁勯暱纭", width = 15) - @ApiModelProperty(value = "缁翠慨缁勯暱纭") + @Excel(name = "绠$悊鍛樼‘璁�", width = 15) + @ApiModelProperty(value = "绠$悊鍛樼‘璁�") @Dict(dicCode = "sys_user, realname, username") - private String confirmUser; - /** - * 纭鎰忚 - */ - @ApiModelProperty(value = "纭鎰忚") - private String confirmComment; - - /** 纭绫诲瀷 1 閫氳繃 2 椹冲洖 */ - @ApiModelProperty(value = "纭绫诲瀷") - @Dict(dicCode = "approved_rejected") - private String confirmDealType; - /** - * 纭鏃堕棿 - */ - @ApiModelProperty(value = "纭鏃堕棿") + private String manageUser; + /** 闂鎻忚堪;榛樿 鏃� */ + @ApiModelProperty(name = "闂鎻忚堪",notes = "榛樿 鏃�") + private String problemDescription ; + /** 澶勭悊鎻忚堪;榛樿 鏃� */ + @ApiModelProperty(name = "澶勭悊鎻忚堪",notes = "榛樿 鏃�") + private String dealDescription ; + /** 绠$悊鍛樼‘璁ゆ椂闂� */ + @ApiModelProperty(name = "绠$悊鍛樼‘璁ゆ椂闂�",notes = "") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date confirmTime; - /** - * 鍗曚綅棰嗗纭 - */ - @Excel(name = "鍗曚綅棰嗗纭", width = 15) - @ApiModelProperty(value = "鍗曚綅棰嗗纭") - @Dict(dicCode = "sys_user, realname, username") - private String confirmLeader; - /** - * 棰嗗鎰忚 - */ - @ApiModelProperty(value = "棰嗗鎰忚") - private String leaderConfirmComment; - /** - * 棰嗗纭鏃堕棿 - */ - @ApiModelProperty(value = "棰嗗纭鏃堕棿") - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date leaderConfirmTime; - - /** - * 淇濆吇涓婁紶鍥剧墖 - */ - @Excel(name = "淇濆吇涓婁紶鍥剧墖", width = 15) - @ApiModelProperty(value = "淇濆吇涓婁紶鍥剧墖") - private String imageFiles; + private Date confirmTime ; + /** 妫�鏌ヤ汉纭 */ + @ApiModelProperty(name = "妫�鏌ヤ汉纭",notes = "") + private String inspector; + /** 妫�鏌ヤ汉鎰忚 */ + @ApiModelProperty(name = "妫�鏌ヤ汉鎰忚",notes = "") + private String inspectConfirmComment; + /** 妫�鏌ヤ汉纭鏃堕棿 */ + @ApiModelProperty(name = "妫�鏌ヤ汉纭鏃堕棿",notes = "") + private String inspectConfirmTime; + /** HF缂栫爜 */ + @ApiModelProperty(name = "HF缂栫爜",notes = "") + private String hfCode; /** * 澶囨敞 */ @@ -184,4 +163,7 @@ private String equipmentCode; @TableField(exist = false) private String equipmentName; + //鍨嬪彿 + @TableField(exist = false) + private String equipmentModel; } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrderDetail.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrderDetail.java index 435c04f..6712847 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrderDetail.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamSecondMaintenanceOrderDetail.java @@ -24,7 +24,7 @@ @Accessors(chain = true) @ApiModel(value="eam_second_maintenance_order_detail瀵硅薄", description="璁惧浜岀骇淇濆吇鏄庣粏") public class EamSecondMaintenanceOrderDetail implements Serializable { - + /**涓婚敭*/ @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "涓婚敭") @@ -51,28 +51,19 @@ @Excel(name = "椤圭洰搴忓彿", width = 15) @ApiModelProperty(value = "椤圭洰搴忓彿") private Integer itemCode; - /**淇濆吇椤圭洰*/ - @Excel(name = "淇濆吇椤圭洰", width = 15) - @ApiModelProperty(value = "淇濆吇椤圭洰") + /** 淇濆吇鍒嗙被;鎿嶄綔宸ャ�佺淮淇伐 */ + @ApiModelProperty(name = "淇濆吇鍒嗙被",notes = "鎿嶄綔宸ャ�佺淮淇伐") + private String itemCategory; + /** 淇濆吇鍐呭 */ + @ApiModelProperty(name = "淇濆吇鍐呭",notes = "") private String itemName; - /**閮ㄤ綅*/ - @Excel(name = "閮ㄤ綅", width = 15) - @ApiModelProperty(value = "閮ㄤ綅") - private String itemPart; - /**淇濆吇瑕佹眰*/ - @Excel(name = "淇濆吇瑕佹眰", width = 15) - @ApiModelProperty(value = "淇濆吇瑕佹眰") - private String itemDemand; - /**淇濆吇缁撴灉*/ - @Excel(name = "淇濆吇缁撴灉", width = 15) - @ApiModelProperty(value = "淇濆吇缁撴灉") + /** 淇濆吇缁撴灉 */ + @ApiModelProperty(name = "淇濆吇缁撴灉",notes = "") private String maintenanceResult; - /**鎶ヤ慨鏍囪*/ - @Excel(name = "鎶ヤ慨鏍囪", width = 15) - @ApiModelProperty(value = "鎶ヤ慨鏍囪") + /** 鎶ヤ慨鏍囪 */ + @ApiModelProperty(name = "鎶ヤ慨鏍囪",notes = "") private String reportFlag; - /**寮傚父鎻忚堪*/ - @Excel(name = "寮傚父鎻忚堪", width = 15) - @ApiModelProperty(value = "寮傚父鎻忚堪") + /** 寮傚父鎻忚堪 */ + @ApiModelProperty(name = "寮傚父鎻忚堪",notes = "") private String exceptionDescription; } diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/util/DateUtils.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/util/DateUtils.java index de64074..b6dc8c5 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/util/DateUtils.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/util/DateUtils.java @@ -1099,8 +1099,8 @@ // 鑾峰彇鏈懆绗竴澶╋紙鍛ㄤ竴锛� LocalDate firstDayOfWeek = localDate.with(DayOfWeek.MONDAY); - // 杞崲鍥� java.sql.Date 绫诲瀷 - return java.sql.Date.valueOf(firstDayOfWeek); + // 杞崲鍥� Date 绫诲瀷 + return Date.from(firstDayOfWeek.atStartOfDay(ZoneId.systemDefault()).toInstant()); } /** @@ -1116,8 +1116,8 @@ // 鑾峰彇鏈懆绗竴澶╋紙鍛ㄤ竴锛� LocalDate firstDayOfWeek = localDate.with(DayOfWeek.MONDAY); - // 杞崲鍥� java.sql.Date 绫诲瀷 - return java.sql.Date.valueOf(firstDayOfWeek); + // 杞崲鍥� Date 绫诲瀷 + return Date.from(firstDayOfWeek.atStartOfDay(ZoneId.systemDefault()).toInstant()); } /** @@ -1128,11 +1128,11 @@ // 灏� java.util.Date 杞崲涓� LocalDate LocalDate localDate = LocalDate.parse(date); - // 鑾峰彇鏈懆绗竴澶╋紙鍛ㄤ竴锛� - LocalDate firstDayOfWeek = localDate.with(DayOfWeek.SUNDAY); + // 鑾峰彇鏈懆绗竴澶╋紙鍛ㄦ棩锛� + LocalDate lastDayOfWeek = localDate.with(DayOfWeek.SUNDAY); - // 杞崲鍥� java.sql.Date 绫诲瀷 - return java.sql.Date.valueOf(firstDayOfWeek); + // 杞崲鍥� Date 绫诲瀷 + return Date.from(lastDayOfWeek.atStartOfDay(ZoneId.systemDefault()).toInstant()); } /** @@ -1144,10 +1144,21 @@ LocalDate localDate = date.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDate(); - // 鑾峰彇鏈懆绗竴澶╋紙鍛ㄤ竴锛� - LocalDate firstDayOfWeek = localDate.with(DayOfWeek.SUNDAY); + // 鑾峰彇鏈懆绗竴澶╋紙鍛ㄦ棩锛� + LocalDate lastDayOfWeek = localDate.with(DayOfWeek.SUNDAY); - // 杞崲鍥� java.sql.Date 绫诲瀷 - return java.sql.Date.valueOf(firstDayOfWeek); + // 杞崲鍥� Date 绫诲瀷 + return Date.from(lastDayOfWeek.atStartOfDay(ZoneId.systemDefault()).toInstant()); + } + + public static boolean isSameDay(Date date1, Date date2) { + if (date1 == null || date2 == null) { + return false; + } + + LocalDate localDate1 = date1.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate localDate2 = date2.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + + return localDate1.equals(localDate2); } } diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentPrecisionParametersController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentPrecisionParametersController.java deleted file mode 100644 index b879e2f..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentPrecisionParametersController.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.jeecg.modules.eam.controller; - -import cn.hutool.core.collection.CollectionUtil; -import com.alibaba.fastjson.JSONObject; -import com.alibaba.fastjson.parser.Feature; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.common.util.TranslateDictTextUtils; -import org.jeecg.modules.eam.entity.EamEquipmentPrecisionParameters; -import org.jeecg.modules.eam.service.IEamEquipmentPrecisionParametersService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -/** - * @Description: 璁惧绮惧害鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -@Slf4j -@Api(tags="璁惧绮惧害鍙傛暟") -@RestController -@RequestMapping("/eam/equipmentPrecisionParameters") -public class EamEquipmentPrecisionParametersController extends JeecgController<EamEquipmentPrecisionParameters, IEamEquipmentPrecisionParametersService> { - @Autowired - private IEamEquipmentPrecisionParametersService eamEquipmentPrecisionParametersService; - @Autowired - private ObjectMapper objectMapper; - @Autowired - private TranslateDictTextUtils translateDictTextUtils; - - /** - * 鍒嗛〉鍒楄〃鏌ヨ - * - * @param pageNo - * @param pageSize - * @param req - * @return - */ - @AutoLog(value = "璁惧绮惧害鍙傛暟-鍒嗛〉鍒楄〃鏌ヨ") - @ApiOperation(value="璁惧绮惧害鍙傛暟-鍒嗛〉鍒楄〃鏌ヨ", notes="璁惧绮惧害鍙傛暟-鍒嗛〉鍒楄〃鏌ヨ") - @GetMapping(value = "/list") - public Result<?> queryPageList(String equipmentId, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - Page<EamEquipmentPrecisionParameters> page = new Page<EamEquipmentPrecisionParameters>(pageNo, pageSize); - IPage<EamEquipmentPrecisionParameters> pageList = eamEquipmentPrecisionParametersService.queryPageList(equipmentId, page); - return Result.OK(pageList); - } - - /** - * 娣诲姞 - * - * @param req - * @return - */ - @AutoLog(value = "璁惧绮惧害鍙傛暟-娣诲姞") - @ApiOperation(value="璁惧绮惧害鍙傛暟-娣诲姞", notes="璁惧绮惧害鍙傛暟-娣诲姞") - @PostMapping(value = "/add") - public Result<?> add(@RequestBody EamEquipmentPrecisionParameters req) { - EamEquipmentPrecisionParameters entity = eamEquipmentPrecisionParametersService.queryByEquipmentIdAndParameterId(req.getEquipmentId(), req.getParameterId()); - if(entity != null){ - return Result.error("鍙傛暟宸插瓨鍦紝涓嶈兘閲嶅娣诲姞锛�"); - } - eamEquipmentPrecisionParametersService.save(req); - return Result.OK("娣诲姞鎴愬姛锛�"); - } - - /** - * 缂栬緫 - * - * @param req - * @return - */ - @AutoLog(value = "璁惧绮惧害鍙傛暟-缂栬緫") - @ApiOperation(value="璁惧绮惧害鍙傛暟-缂栬緫", notes="璁惧绮惧害鍙傛暟-缂栬緫") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result<?> edit(@RequestBody EamEquipmentPrecisionParameters req) { - EamEquipmentPrecisionParameters entity = eamEquipmentPrecisionParametersService.getById(req.getId()); - if(entity == null){ - return Result.error("瑕佺紪杈戠殑鍙傛暟涓嶅瓨鍦紝璇峰埛鏂伴噸璇�!"); - } - eamEquipmentPrecisionParametersService.updateById(req); - 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) { - eamEquipmentPrecisionParametersService.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.eamEquipmentPrecisionParametersService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("鎵归噺鍒犻櫎鎴愬姛锛�"); - } - - - /** - * 鍒楄〃鏌ヨ - * - * @param equipmentId 璁惧ID - * @return - */ - @ApiOperation(value="璁惧绮惧害鍙傛暟-鍒楄〃鏌ヨ", notes="璁惧绮惧害鍙傛暟-鍒楄〃鏌ヨ") - @GetMapping(value = "/queryList") - public Result<?> queryList(@RequestParam(name="equipmentId") String equipmentId) { - List<EamEquipmentPrecisionParameters> list = eamEquipmentPrecisionParametersService.queryList(equipmentId); - if(CollectionUtil.isEmpty(list)) { - return Result.OK(Collections.emptyList()); - } - List<JSONObject> items = new ArrayList<>(); - try { - for(EamEquipmentPrecisionParameters vo : list) { - String json = objectMapper.writeValueAsString(vo); - JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); - translateDictTextUtils.translateField("parameterId", vo.getParameterId(), item, "eam_precision_parameters,parameter_name,id"); - translateDictTextUtils.translateField("parameterCode", vo.getParameterId(), item, "eam_precision_parameters,parameter_code,id"); - items.add(item); - } - return Result.OK(items); - }catch (Exception e) { - return Result.error("鏁版嵁杞瘧澶辫触锛�"); - } - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentProcessParametersController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentProcessParametersController.java deleted file mode 100644 index a2688aa..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentProcessParametersController.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.jeecg.modules.eam.controller; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.modules.eam.entity.EamEquipmentProcessParameters; -import org.jeecg.modules.eam.service.IEamEquipmentProcessParametersService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletRequest; -import java.util.Arrays; - - /** - * @Description: 璁惧宸ヨ壓鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -@Slf4j -@Api(tags="璁惧宸ヨ壓鍙傛暟") -@RestController -@RequestMapping("/eam/equipmentProcessParameters") -public class EamEquipmentProcessParametersController extends JeecgController<EamEquipmentProcessParameters, IEamEquipmentProcessParametersService> { - @Autowired - private IEamEquipmentProcessParametersService eamEquipmentProcessParametersService; - - /** - * 鍒嗛〉鍒楄〃鏌ヨ - * - * @param equipmentId - * @param pageNo - * @param pageSize - * @param req - * @return - */ - @AutoLog(value = "璁惧宸ヨ壓鍙傛暟-鍒嗛〉鍒楄〃鏌ヨ") - @ApiOperation(value="璁惧宸ヨ壓鍙傛暟-鍒嗛〉鍒楄〃鏌ヨ", notes="璁惧宸ヨ壓鍙傛暟-鍒嗛〉鍒楄〃鏌ヨ") - @GetMapping(value = "/list") - public Result<?> queryPageList(String equipmentId, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - Page<EamEquipmentProcessParameters> page = new Page<>(pageNo, pageSize); - IPage<EamEquipmentProcessParameters> pageList = eamEquipmentProcessParametersService.queryPageList(equipmentId, page); - return Result.OK(pageList); - } - - /** - * 娣诲姞 - * - * @param req - * @return - */ - @AutoLog(value = "璁惧宸ヨ壓鍙傛暟-娣诲姞") - @ApiOperation(value="璁惧宸ヨ壓鍙傛暟-娣诲姞", notes="璁惧宸ヨ壓鍙傛暟-娣诲姞") - @PostMapping(value = "/add") - public Result<?> add(@RequestBody EamEquipmentProcessParameters req) { - EamEquipmentProcessParameters entity = eamEquipmentProcessParametersService.queryByEquipmentIdAndParameterId(req.getEquipmentId(), req.getParameterId()); - if(entity != null){ - return Result.error("鍙傛暟宸插瓨鍦紝涓嶈兘閲嶅娣诲姞锛�"); - } - eamEquipmentProcessParametersService.save(req); - return Result.OK("娣诲姞鎴愬姛锛�"); - } - - /** - * 缂栬緫 - * - * @param req - * @return - */ - @AutoLog(value = "璁惧宸ヨ壓鍙傛暟-缂栬緫") - @ApiOperation(value="璁惧宸ヨ壓鍙傛暟-缂栬緫", notes="璁惧宸ヨ壓鍙傛暟-缂栬緫") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result<?> edit(@RequestBody EamEquipmentProcessParameters req) { - EamEquipmentProcessParameters entity = eamEquipmentProcessParametersService.getById(req.getId()); - if(entity == null){ - return Result.error("瑕佺紪杈戠殑鍙傛暟涓嶅瓨鍦紝璇峰埛鏂伴噸璇�!"); - } - eamEquipmentProcessParametersService.updateById(req); - 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) { - eamEquipmentProcessParametersService.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.eamEquipmentProcessParametersService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("鎵归噺鍒犻櫎鎴愬姛锛�"); - } - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentPurchasePlanController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentPurchasePlanController.java deleted file mode 100644 index a1b62a4..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentPurchasePlanController.java +++ /dev/null @@ -1,414 +0,0 @@ -package org.jeecg.modules.eam.controller; - -import java.io.File; -import java.io.InputStream; -import java.math.BigDecimal; -import java.text.ParseException; -import java.util.*; -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 cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUtil; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import org.apache.commons.lang3.time.DateUtils; -import org.apache.poi.ss.usermodel.*; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.constant.CommonConstant; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.util.PmsUtil; -import org.jeecg.common.util.StrUtils; -import org.jeecg.common.util.oConvertUtils; -import org.jeecg.modules.eam.constant.EquipmentPurchasePlanStatusEnum; -import org.jeecg.modules.eam.entity.EamEquipmentPurchasePlan; -import org.jeecg.modules.eam.service.IEamEquipmentPurchasePlanService; - -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.util.ExcelUtils; -import org.jeecg.modules.system.entity.MdcProduction; -import org.jeecg.modules.system.entity.SysUser; -import org.jeecg.modules.system.service.IMdcProductionService; -import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; -import org.jeecg.modules.system.service.ISysUserService; -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: eam_equipment_purchase_plan - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -@Api(tags="eam_equipment_purchase_plan") -@RestController -@RequestMapping("/eam/eamEquipmentPurchasePlan") -@Slf4j -public class EamEquipmentPurchasePlanController extends JeecgController<EamEquipmentPurchasePlan, IEamEquipmentPurchasePlanService> { - @Autowired - private IEamEquipmentPurchasePlanService eamEquipmentPurchasePlanService; - @Autowired - private ISysUserService sysUserService; - @Autowired - private IMdcProductionService mdcProductionService; - @Autowired - private ISysBusinessCodeRuleService sysBusinessCodeRuleService; - - /** - * 鍒嗛〉鍒楄〃鏌ヨ - * - * @param eamEquipmentPurchasePlan - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "eam_equipment_purchase_plan-鍒嗛〉鍒楄〃鏌ヨ") - @ApiOperation(value="eam_equipment_purchase_plan-鍒嗛〉鍒楄〃鏌ヨ", notes="eam_equipment_purchase_plan-鍒嗛〉鍒楄〃鏌ヨ") - @GetMapping(value = "/list") - public Result<IPage<EamEquipmentPurchasePlan>> queryPageList(EamEquipmentPurchasePlan eamEquipmentPurchasePlan, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper<EamEquipmentPurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(eamEquipmentPurchasePlan, req.getParameterMap()); - Page<EamEquipmentPurchasePlan> page = new Page<EamEquipmentPurchasePlan>(pageNo, pageSize); - IPage<EamEquipmentPurchasePlan> pageList = eamEquipmentPurchasePlanService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 娣诲姞 - * - * @param eamEquipmentPurchasePlan - * @return - */ - @AutoLog(value = "eam_equipment_purchase_plan-娣诲姞") - @ApiOperation(value="eam_equipment_purchase_plan-娣诲姞", notes="eam_equipment_purchase_plan-娣诲姞") - //@RequiresPermissions("org.jeecg.modules:eam_equipment_purchase_plan:add") - @PostMapping(value = "/add") - public Result<String> add(@RequestBody EamEquipmentPurchasePlan eamEquipmentPurchasePlan) { - eamEquipmentPurchasePlanService.savePurchasePlan(eamEquipmentPurchasePlan); - return Result.OK("娣诲姞鎴愬姛锛�"); - } - - /** - * 缂栬緫 - * - * @param eamEquipmentPurchasePlan - * @return - */ - @AutoLog(value = "eam_equipment_purchase_plan-缂栬緫") - @ApiOperation(value="eam_equipment_purchase_plan-缂栬緫", notes="eam_equipment_purchase_plan-缂栬緫") - //@RequiresPermissions("org.jeecg.modules:eam_equipment_purchase_plan:edit") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result<String> edit(@RequestBody EamEquipmentPurchasePlan eamEquipmentPurchasePlan) { - eamEquipmentPurchasePlanService.updateById(eamEquipmentPurchasePlan); - return Result.OK("缂栬緫鎴愬姛!"); - } - - @AutoLog(value = "eam_equipment_purchase_plan-鎻愪氦") - @ApiOperation(value="eam_equipment_purchase_plan-鎻愪氦", notes = "eam_equipment_purchase_plan-鎻愪氦") - //@RequiresPermissions("org.jeecg.modules:eam_equipment_purchase_plan:submit") - @GetMapping(value = "/submit") - public Result<String> submit(@RequestParam("id") String id) { - EamEquipmentPurchasePlan plan = eamEquipmentPurchasePlanService.getById(id); - if (Objects.isNull(plan) || !EquipmentPurchasePlanStatusEnum.NEWLY.name().equals(plan.getPlanStatus())) { - return Result.error("閲囪喘璁″垝涓嶅瓨鍦�/璁″垝宸叉彁浜わ紒"); - } - plan.setPlanStatus(EquipmentPurchasePlanStatusEnum.PENDING_AUDIT.name()); - eamEquipmentPurchasePlanService.updateById(plan); - return Result.OK("鎻愪氦鎴愬姛!"); - } - - @AutoLog(value = "eam_equipment_purchase_plan-瀹℃牳") - @ApiOperation(value="eam_equipment_purchase_plan-瀹℃牳", notes = "eam_equipment_purchase_plan-瀹℃牳") - //@RequiresPermissions("org.jeecg.modules:eam_equipment_purchase_plan:audit") - @RequestMapping(value = "/audit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result<String> audit(@RequestBody EamEquipmentPurchasePlan request) { - EamEquipmentPurchasePlan plan = eamEquipmentPurchasePlanService.getById(request.getId()); - if (Objects.isNull(plan)) { - return Result.error("閲囪喘璁″垝涓嶅瓨鍦紒"); - } - if (!EquipmentPurchasePlanStatusEnum.PENDING_AUDIT.name().equals(plan.getPlanStatus())) { - return Result.error("璁″垝鏈彁浜ゆ垨宸插鏍革紒"); - } - if (EquipmentPurchasePlanStatusEnum.COMPLETED.name().equals(request.getPlanStatus())) { - plan.setPlanStatus(EquipmentPurchasePlanStatusEnum.COMPLETED.name()); - } - if (EquipmentPurchasePlanStatusEnum.REJECT.name().equals(request.getPlanStatus())) { - //濡傛灉椹冲洖锛岀姸鎬佹敼涓烘柊寤猴紝閲嶆柊鎻愪氦瀹℃牳 - plan.setPlanStatus(EquipmentPurchasePlanStatusEnum.NEWLY.name()); - } - eamEquipmentPurchasePlanService.updateById(plan); - return Result.OK("瀹℃牳鎴愬姛!"); - } - - /** - * 閫氳繃id鍒犻櫎 - * - * @param id - * @return - */ - @AutoLog(value = "eam_equipment_purchase_plan-閫氳繃id鍒犻櫎") - @ApiOperation(value="eam_equipment_purchase_plan-閫氳繃id鍒犻櫎", notes="eam_equipment_purchase_plan-閫氳繃id鍒犻櫎") - //@RequiresPermissions("org.jeecg.modules:eam_equipment_purchase_plan:delete") - @DeleteMapping(value = "/delete") - public Result<String> delete(@RequestParam(name="id",required=true) String id) { - eamEquipmentPurchasePlanService.removeById(id); - return Result.OK("鍒犻櫎鎴愬姛!"); - } - - /** - * 鎵归噺鍒犻櫎 - * - * @param ids - * @return - */ - @AutoLog(value = "eam_equipment_purchase_plan-鎵归噺鍒犻櫎") - @ApiOperation(value="eam_equipment_purchase_plan-鎵归噺鍒犻櫎", notes="eam_equipment_purchase_plan-鎵归噺鍒犻櫎") - //@RequiresPermissions("org.jeecg.modules:eam_equipment_purchase_plan:deleteBatch") - @DeleteMapping(value = "/deleteBatch") - public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.eamEquipmentPurchasePlanService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("鎵归噺鍒犻櫎鎴愬姛!"); - } - - /** - * 閫氳繃id鏌ヨ - * - * @param id - * @return - */ - //@AutoLog(value = "eam_equipment_purchase_plan-閫氳繃id鏌ヨ") - @ApiOperation(value="eam_equipment_purchase_plan-閫氳繃id鏌ヨ", notes="eam_equipment_purchase_plan-閫氳繃id鏌ヨ") - @GetMapping(value = "/queryById") - public Result<EamEquipmentPurchasePlan> queryById(@RequestParam(name="id",required=true) String id) { - EamEquipmentPurchasePlan eamEquipmentPurchasePlan = eamEquipmentPurchasePlanService.getById(id); - if(eamEquipmentPurchasePlan==null) { - return Result.error("鏈壘鍒板搴旀暟鎹�"); - } - return Result.OK(eamEquipmentPurchasePlan); - } - - /** - * 瀵煎嚭excel - * - * @param request - * @param eamEquipmentPurchasePlan - */ - //@RequiresPermissions("org.jeecg.modules:eam_equipment_purchase_plan:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, EamEquipmentPurchasePlan eamEquipmentPurchasePlan) { - return super.exportXls(request, eamEquipmentPurchasePlan, EamEquipmentPurchasePlan.class, "璁惧閲囪喘璁″垝"); - } - - /** - * 閫氳繃excel瀵煎叆鏁版嵁 - * - * @param request - * @param response - * @return - */ - //@RequiresPermissions("eam_equipment_purchase_plan:importExcel") - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { - MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; - Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); - int successLines = 0,dataLines = 0; - List<String> errorMessage = CollectionUtil.newArrayList(); - List<EamEquipmentPurchasePlan> importList = CollectionUtil.newArrayList(); - try { - for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { - // 鑾峰彇涓婁紶鏂囦欢瀵硅薄 - MultipartFile file = entity.getValue(); - InputStream inputStream = file.getInputStream(); - Workbook workbook = WorkbookFactory.create(inputStream); - Sheet sheet = workbook.getSheetAt(0); - for (Row row : sheet) { - EamEquipmentPurchasePlan plan = new EamEquipmentPurchasePlan(); - int rowNum = row.getRowNum(); - int currentRowNum = rowNum + 1; - if (rowNum < 3 || ExcelUtils.isRowEmpty(row)) { - //璺宠繃琛ㄥご鍜岀┖琛� - continue; - } - dataLines++; - Cell cell0 = row.getCell(0); - if (cell0 == null || cell0.getCellType() == CellType.BLANK) { - errorMessage.add("绗�" + currentRowNum + "琛岄噰璐鍒掑悕绉颁负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - plan.setPlanName(ExcelUtils.getCellValueAsString(cell0)); - } - Cell cell1 = row.getCell(1); - if (cell1 == null || cell1.getCellType() == CellType.BLANK) { - //濡傛灉璁″垝鐘舵�佷负绌猴紝榛樿缁� 鏂板缓 鐘舵�� - plan.setPlanStatus(EquipmentPurchasePlanStatusEnum.NEWLY.name()); - } else { - String statusZh = ExcelUtils.getCellValueAsString(cell1).trim(); - EquipmentPurchasePlanStatusEnum planStatusEnum = EquipmentPurchasePlanStatusEnum.fromZhName(statusZh); - if (Objects.isNull(planStatusEnum)) { - errorMessage.add("绗� " + currentRowNum + " 琛岃鍒掔姸鎬佷笉鍚堟硶锛屾棤娉曞鍏ワ紝璇蜂娇鐢� [鏂板缓, 寰呭鏍�, 宸插畬鎴怾 涓殑涓�涓��"); - continue; - } - plan.setPlanStatus(planStatusEnum.name()); - } - Cell cell2 = row.getCell(2); - if (cell2 == null || cell2.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛屽瀷鍙蜂负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - plan.setEquipmentModel(ExcelUtils.getCellValueAsString(cell2)); - } - Cell cell3 = row.getCell(3); - if (cell3 == null || cell3.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛岄噰璐暟閲忎负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - plan.setPurchaseNumber(Integer.valueOf(ExcelUtils.getCellValueAsString(cell3))); - } - Cell cell4 = row.getCell(4); - if (cell4 == null || cell4.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛岄璁″崟浠蜂负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - plan.setEstimatedUnitPrice(new BigDecimal(ExcelUtils.getCellValueAsString(cell4))); - } - Cell cell5 = row.getCell(5); - if (cell5 == null || cell5.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛屾�讳环涓虹┖锛屾棤娉曞鍏�"); - continue; - } else { - plan.setTotalPrice(new BigDecimal(ExcelUtils.getCellValueAsString(cell5))); - } - Cell cell6 = row.getCell(6); - if (cell6 == null || cell6.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛屽悎鍚屾�婚噾棰濅负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - plan.setOverallContractAmount(new BigDecimal(ExcelUtils.getCellValueAsString(cell6))); - } - Cell cell7 = row.getCell(7); - if (cell7 == null || cell7.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛岀鐞嗗垎绫讳负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - plan.setEquipmentImportance(ExcelUtils.getCellValueAsString(cell7)); - } - Cell cell8 = row.getCell(8); - if (cell8 == null || cell8.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛岀敵璇蜂汉涓虹┖锛屾棤娉曞鍏�"); - continue; - } else { - String username = ExcelUtils.getCellValueAsString(cell8); - SysUser sysUser = sysUserService.getUserByName(username); - if (sysUser == null) { - errorMessage.add("绗� " + currentRowNum + " 琛岀敵璇蜂汉涓嶅瓨鍦紝鏃犳硶瀵煎叆"); - continue; - } - plan.setPlanCategory(username); - } - Cell cell9 = row.getCell(9); - if (cell9 == null || cell9.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛岀敵璇疯溅闂翠负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - String productionName = ExcelUtils.getCellValueAsString(cell9); - boolean present = mdcProductionService.list(new LambdaQueryWrapper<MdcProduction>() - .eq(MdcProduction::getProductionName, productionName) - .eq(MdcProduction::getDelFlag, CommonConstant.DEL_FLAG_0)) - .stream().findAny().isPresent(); - if (!present) { - errorMessage.add("绗� " + currentRowNum + " 琛岀敵璇疯溅闂翠笉瀛樺湪锛屾棤娉曞鍏�"); - continue; - } - plan.setApplicantProduction(productionName); - } - Cell cell10 = row.getCell(10); - if (cell10 == null || cell10.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛岃鍒掑紑濮嬫棩鏈熶负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - String planStartDateStr = ExcelUtils.getCellValueAsString(cell10); - try { - Date date = DateUtils.parseDate(planStartDateStr, "yyyy/MM/dd HH", "yyyy/MM/dd", "yyyy-MM-dd HH", "yyyy-MM-dd"); - plan.setPlanStartDate(date); - } catch (ParseException e) { - errorMessage.add("绗� " + currentRowNum + " 琛岃鍒掑紑濮嬫棩鏈熸牸寮忛敊璇紝鏃犳硶瀵煎叆锛岃浣跨敤 yyyy-MM-dd 鏍煎紡"); - continue; - } - } - Cell cell11 = row.getCell(11); - if (cell11 == null || cell11.getCellType() == CellType.BLANK) { - errorMessage.add("绗� " + currentRowNum + " 琛岃鍒掑畬鎴愭椂闂翠负绌猴紝鏃犳硶瀵煎叆"); - continue; - } else { - String planEndDateStr = ExcelUtils.getCellValueAsString(cell11); - try { - Date date = DateUtils.parseDate(planEndDateStr, "yyyy/MM/dd HH", "yyyy/MM/dd", "yyyy-MM-dd HH", "yyyy-MM-dd"); - plan.setPlanEndDate(date); - } catch (ParseException e) { - errorMessage.add("绗� " + currentRowNum + " 琛岃鍒掑畬鎴愭棩鏈熸牸寮忛敊璇紝鏃犳硶瀵煎叆锛岃浣跨敤 yyyy-MM-dd 鏍煎紡"); - continue; - } - } - Cell cell12 = row.getCell(12); - plan.setPlanDescription(ExcelUtils.getCellValueAsString(cell12)); - Cell cell13 = row.getCell(13); - plan.setRelatedDeparts(ExcelUtils.getCellValueAsString(cell13)); - Cell cell14 = row.getCell(14); - plan.setRemark(ExcelUtils.getCellValueAsString(cell14)); - plan.setPlanCode(sysBusinessCodeRuleService.generateBusinessCodeSeq("EquipmentPurchasePlanRule")); - plan.setDelFlag(CommonConstant.DEL_FLAG_0); - importList.add(plan); - successLines++; - } - } - eamEquipmentPurchasePlanService.saveBatch(importList); - if (successLines == dataLines) { - return Result.OK("鍏�" + dataLines + "琛屾暟鎹叏閮ㄥ鍏ユ垚鍔燂紒"); - } else { - JSONObject result = new JSONObject(5); - result.put("successCount", successLines); - result.put("msg", "鎬讳笂浼犺鏁帮細" + dataLines + "锛屾垚鍔熷鍏ヨ鏁帮細" + successLines); - result.put("errorMsg", errorMessage); - String fileUrl = PmsUtil.saveErrorMsgByList(errorMessage, "userImportExcelErrorLog"); - int lastIndex = fileUrl.lastIndexOf(File.separator); - String fileName = fileUrl.substring(lastIndex + 1); - result.put("fileUrl", "/sys/common/static/" + fileUrl); - result.put("fileName", fileName); - Result res = Result.ok(result); - res.setCode(201); - res.setMessage("鏂囦欢瀵煎叆鎴愬姛锛屼絾鏈夐敊璇��"); - return res; - } - } catch (IOException e) { - throw new RuntimeException(e); - } - } - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderDetailController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderDetailController.java index 3f9abb0..85cf570 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderDetailController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamInspectionOrderDetailController.java @@ -11,11 +11,8 @@ import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.modules.eam.constant.InspectionItemCategroyEnum; import org.jeecg.modules.eam.entity.EamInspectionOrderDetail; -import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; import org.jeecg.modules.eam.service.IEamInspectionOrderDetailService; -import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPrecisionCheckDetailController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPrecisionCheckDetailController.java deleted file mode 100644 index c4245dd..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPrecisionCheckDetailController.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.jeecg.modules.eam.controller; - -import cn.hutool.core.collection.CollectionUtil; -import com.alibaba.fastjson.JSONObject; -import com.alibaba.fastjson.parser.Feature; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.common.util.TranslateDictTextUtils; -import org.jeecg.modules.eam.entity.EamEquipmentPrecisionParameters; -import org.jeecg.modules.eam.entity.EamPrecisionCheckDetail; -import org.jeecg.modules.eam.service.IEamPrecisionCheckDetailService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * @Description: 璁惧绮惧害妫�娴嬫槑缁� - * @Author: jeecg-boot - * @Date: 2025-05-13 - * @Version: V1.0 - */ -@Slf4j -@Api(tags="璁惧绮惧害妫�娴嬫槑缁�") -@RestController -@RequestMapping("/eam/precisionCheckDetail") -public class EamPrecisionCheckDetailController extends JeecgController<EamPrecisionCheckDetail, IEamPrecisionCheckDetailService> { - @Autowired - private IEamPrecisionCheckDetailService eamPrecisionCheckDetailService; - @Autowired - private ObjectMapper objectMapper; - @Autowired - private TranslateDictTextUtils translateDictTextUtils; - - /** - * 鍒楄〃鏌ヨ - * - * @param orderId 宸ュ崟ID - * @return - */ - @ApiOperation(value="璁惧绮惧害鍙傛暟-鍒楄〃鏌ヨ", notes="璁惧绮惧害鍙傛暟-鍒楄〃鏌ヨ") - @GetMapping(value = "/queryList") - public Result<?> queryList(@RequestParam(name="orderId") String orderId) { - List<EamPrecisionCheckDetail> list = eamPrecisionCheckDetailService.getByOrderId(orderId); - if(CollectionUtil.isEmpty(list)) { - return Result.OK(Collections.emptyList()); - } - List<JSONObject> items = new ArrayList<>(); - try { - for(EamPrecisionCheckDetail vo : list) { - String json = objectMapper.writeValueAsString(vo); - JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); - translateDictTextUtils.translateField("parameterId", vo.getParameterId(), item, "eam_precision_parameters,parameter_name,id"); - translateDictTextUtils.translateField("parameterCode", vo.getParameterId(), item, "eam_precision_parameters,parameter_code,id"); - items.add(item); - } - return Result.OK(items); - }catch (Exception e) { - return Result.error("鏁版嵁杞瘧澶辫触锛�"); - } - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPrecisionParametersController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPrecisionParametersController.java deleted file mode 100644 index e213f3f..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPrecisionParametersController.java +++ /dev/null @@ -1,167 +0,0 @@ -package org.jeecg.modules.eam.controller; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.common.constant.CommonConstant; -import org.jeecg.common.system.base.controller.JeecgController; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.modules.eam.constant.BusinessCodeConst; -import org.jeecg.modules.eam.entity.EamPrecisionParameters; -import org.jeecg.modules.eam.entity.EamProcessParameters; -import org.jeecg.modules.eam.service.IEamPrecisionParametersService; -import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; -import java.util.List; - -/** - * @Description: 绮惧害鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -@Slf4j -@Api(tags = "绮惧害鍙傛暟缁存姢") -@RestController -@RequestMapping("/eam/precisionParameters") -public class EamPrecisionParametersController extends JeecgController<EamPrecisionParameters, IEamPrecisionParametersService> { - @Autowired - private IEamPrecisionParametersService eamPrecisionParametersService; - - @Autowired - private ISysBusinessCodeRuleService businessCodeRuleService; - - /** - * 鍒嗛〉鍒楄〃鏌ヨ - * - * @param eamPrecisionParameters - * @param pageNo - * @param pageSize - * @param req - * @return - */ - @ApiOperation(value = "绮惧害鍙傛暟缁存姢-鍒嗛〉鍒楄〃鏌ヨ", notes = "绮惧害鍙傛暟缁存姢-鍒嗛〉鍒楄〃鏌ヨ") - @GetMapping(value = "/list") - public Result<?> queryPageList(EamPrecisionParameters eamPrecisionParameters, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper<EamPrecisionParameters> queryWrapper = QueryGenerator.initQueryWrapper(eamPrecisionParameters, req.getParameterMap()); - Page<EamPrecisionParameters> page = new Page<EamPrecisionParameters>(pageNo, pageSize); - queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); - IPage<EamPrecisionParameters> pageList = eamPrecisionParametersService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 娣诲姞 - * - * @param eamPrecisionParameters - * @return - */ - @ApiOperation(value = "绮惧害鍙傛暟缁存姢-娣诲姞", notes = "绮惧害鍙傛暟缁存姢-娣诲姞") - @PostMapping(value = "/add") - public Result<?> add(@RequestBody EamPrecisionParameters eamPrecisionParameters) { - String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.PRECISION_PARAMETERS_RULE); - eamPrecisionParameters.setParameterCode(codeSeq); - eamPrecisionParameters.setDelFlag(CommonConstant.DEL_FLAG_0); - eamPrecisionParametersService.save(eamPrecisionParameters); - return Result.OK("娣诲姞鎴愬姛锛�"); - } - - /** - * 缂栬緫 - * - * @param eamPrecisionParameters - * @return - */ - @ApiOperation(value = "绮惧害鍙傛暟缁存姢-缂栬緫", notes = "绮惧害鍙傛暟缁存姢-缂栬緫") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) - public Result<?> edit(@RequestBody EamPrecisionParameters eamPrecisionParameters) { - eamPrecisionParametersService.updateById(eamPrecisionParameters); - return Result.OK("缂栬緫鎴愬姛!"); - } - - /** - * 閫氳繃id鍒犻櫎 - * - * @param id - * @return - */ - @ApiOperation(value = "绮惧害鍙傛暟缁存姢-閫氳繃id鍒犻櫎", notes = "绮惧害鍙傛暟缁存姢-閫氳繃id鍒犻櫎") - @DeleteMapping(value = "/delete") - public Result<?> delete(@RequestParam(name = "id", required = true) String id) { - eamPrecisionParametersService.removeById(id); - return Result.OK("鍒犻櫎鎴愬姛!"); - } - - /** - * 鎵归噺鍒犻櫎 - * - * @param ids - * @return - */ - @ApiOperation(value = "绮惧害鍙傛暟缁存姢-鎵归噺鍒犻櫎", notes = "绮惧害鍙傛暟缁存姢-鎵归噺鍒犻櫎") - @DeleteMapping(value = "/deleteBatch") - public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { - this.eamPrecisionParametersService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("鎵归噺鍒犻櫎鎴愬姛锛�"); - } - - /** - * 閫氳繃id鏌ヨ - * - * @param id - * @return - */ - @ApiOperation(value = "绮惧害鍙傛暟缁存姢-閫氳繃id鏌ヨ", notes = "绮惧害鍙傛暟缁存姢-閫氳繃id鏌ヨ") - @GetMapping(value = "/queryById") - public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { - EamPrecisionParameters eamPrecisionParameters = eamPrecisionParametersService.getById(id); - return Result.OK(eamPrecisionParameters); - } - - /** - * 瀵煎嚭excel - * - * @param request - * @param eamPrecisionParameters - */ - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, EamPrecisionParameters eamPrecisionParameters) { - return super.exportXls(request, eamPrecisionParameters, EamPrecisionParameters.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, EamPrecisionParameters.class); - } - - @ApiOperation(value = "绮惧害鍙傛暟缁存姢-鏌ヨ鎵�鏈�", notes = "绮惧害鍙傛暟缁存姢-鏌ヨ鎵�鏈�") - @GetMapping(value = "/listAll") - public Result<?> listAll() { - QueryWrapper<EamPrecisionParameters> queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); - List<EamPrecisionParameters> list = eamPrecisionParametersService.list(queryWrapper); - return Result.OK(list); - } - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamProcessParametersController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamProcessParametersController.java deleted file mode 100644 index e125fd0..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamProcessParametersController.java +++ /dev/null @@ -1,168 +0,0 @@ -package org.jeecg.modules.eam.controller; - -import java.util.Arrays; -import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.jeecg.common.api.vo.Result; -import org.jeecg.common.constant.CommonConstant; -import org.jeecg.common.system.query.QueryGenerator; -import org.jeecg.common.aspect.annotation.AutoLog; -import org.jeecg.modules.eam.constant.BusinessCodeConst; -import org.jeecg.modules.eam.entity.EamProcessParameters; -import org.jeecg.modules.eam.service.IEamProcessParametersService; -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.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; - -/** - * @Description: 宸ュ簭鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -@Slf4j -@Api(tags = "宸ュ簭鍙傛暟缁存姢") -@RestController -@RequestMapping("/eam/processParameters") -public class EamProcessParametersController extends JeecgController<EamProcessParameters, IEamProcessParametersService> { - @Autowired - private IEamProcessParametersService eamProcessParametersService; - - @Autowired - private ISysBusinessCodeRuleService businessCodeRuleService; - - /** - * 鍒嗛〉鍒楄〃鏌ヨ - * - * @param eamProcessParameters - * @param pageNo - * @param pageSize - * @param req - * @return - */ - @ApiOperation(value = "宸ュ簭鍙傛暟缁存姢-鍒嗛〉鍒楄〃鏌ヨ", notes = "宸ュ簭鍙傛暟缁存姢-鍒嗛〉鍒楄〃鏌ヨ") - @GetMapping(value = "/list") - public Result<?> queryPageList(EamProcessParameters eamProcessParameters, - @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper<EamProcessParameters> queryWrapper = QueryGenerator.initQueryWrapper(eamProcessParameters, req.getParameterMap()); - queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); - Page<EamProcessParameters> page = new Page<EamProcessParameters>(pageNo, pageSize); - IPage<EamProcessParameters> pageList = eamProcessParametersService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 娣诲姞 - * - * @param eamProcessParameters - * @return - */ - @ApiOperation(value = "宸ュ簭鍙傛暟缁存姢-娣诲姞", notes = "宸ュ簭鍙傛暟缁存姢-娣诲姞") - @PostMapping(value = "/add") - public Result<?> add(@RequestBody EamProcessParameters eamProcessParameters) { - String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.PROCESS_PARAMETERS_RULE); - eamProcessParameters.setParameterCode(codeSeq); - eamProcessParameters.setDelFlag(CommonConstant.DEL_FLAG_0); - eamProcessParametersService.save(eamProcessParameters); - return Result.OK("娣诲姞鎴愬姛锛�"); - } - - /** - * 缂栬緫 - * - * @param eamProcessParameters - * @return - */ - @ApiOperation(value = "宸ュ簭鍙傛暟缁存姢-缂栬緫", notes = "宸ュ簭鍙傛暟缁存姢-缂栬緫") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) - public Result<?> edit(@RequestBody EamProcessParameters eamProcessParameters) { - eamProcessParametersService.updateById(eamProcessParameters); - return Result.OK("缂栬緫鎴愬姛!"); - } - - /** - * 閫氳繃id鍒犻櫎 - * - * @param id - * @return - */ - @ApiOperation(value = "宸ュ簭鍙傛暟缁存姢-閫氳繃id鍒犻櫎", notes = "宸ュ簭鍙傛暟缁存姢-閫氳繃id鍒犻櫎") - @DeleteMapping(value = "/delete") - public Result<?> delete(@RequestParam(name = "id", required = true) String id) { - eamProcessParametersService.removeById(id); - return Result.OK("鍒犻櫎鎴愬姛!"); - } - - /** - * 鎵归噺鍒犻櫎 - * - * @param ids - * @return - */ - @ApiOperation(value = "宸ュ簭鍙傛暟缁存姢-鎵归噺鍒犻櫎", notes = "宸ュ簭鍙傛暟缁存姢-鎵归噺鍒犻櫎") - @DeleteMapping(value = "/deleteBatch") - public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { - this.eamProcessParametersService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("鎵归噺鍒犻櫎鎴愬姛锛�"); - } - - /** - * 閫氳繃id鏌ヨ - * - * @param id - * @return - */ - @ApiOperation(value = "宸ュ簭鍙傛暟缁存姢-閫氳繃id鏌ヨ", notes = "宸ュ簭鍙傛暟缁存姢-閫氳繃id鏌ヨ") - @GetMapping(value = "/queryById") - public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { - EamProcessParameters eamProcessParameters = eamProcessParametersService.getById(id); - return Result.OK(eamProcessParameters); - } - - /** - * 瀵煎嚭excel - * - * @param request - * @param eamProcessParameters - */ - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, EamProcessParameters eamProcessParameters) { - return super.exportXls(request, eamProcessParameters, EamProcessParameters.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, EamProcessParameters.class); - } - - - @ApiOperation(value = "宸ュ簭鍙傛暟缁存姢-鏌ヨ鎵�鏈�", notes = "宸ュ簭鍙傛暟缁存姢-鏌ヨ鎵�鏈�") - @GetMapping(value = "/listAll") - public Result<?> listAll() { - QueryWrapper<EamProcessParameters> queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); - List<EamProcessParameters> list = eamProcessParametersService.list(queryWrapper); - return Result.OK(list); - } - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPurchasePlanAttachmentController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPurchasePlanAttachmentController.java deleted file mode 100644 index c08412e..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamPurchasePlanAttachmentController.java +++ /dev/null @@ -1,182 +0,0 @@ -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.EamPurchasePlanAttachment; -import org.jeecg.modules.eam.request.EamPurchasePlanAttachmentRequest; -import org.jeecg.modules.eam.service.IEamPurchasePlanAttachmentService; - -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: eam_purchase_plan_attachment - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -@Api(tags="eam_purchase_plan_attachment") -@RestController -@RequestMapping("/eam/eamPurchasePlanAttachment") -@Slf4j -public class EamPurchasePlanAttachmentController extends JeecgController<EamPurchasePlanAttachment, IEamPurchasePlanAttachmentService> { - @Autowired - private IEamPurchasePlanAttachmentService eamPurchasePlanAttachmentService; - - /** - * 鍒嗛〉鍒楄〃鏌ヨ - * - * @param eamPurchasePlanAttachment - * @param pageNo - * @param pageSize - * @param req - * @return - */ - //@AutoLog(value = "eam_purchase_plan_attachment-鍒嗛〉鍒楄〃鏌ヨ") - @ApiOperation(value="eam_purchase_plan_attachment-鍒嗛〉鍒楄〃鏌ヨ", notes="eam_purchase_plan_attachment-鍒嗛〉鍒楄〃鏌ヨ") - @GetMapping(value = "/list") - public Result<IPage<EamPurchasePlanAttachment>> queryPageList(EamPurchasePlanAttachment eamPurchasePlanAttachment, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, - HttpServletRequest req) { - QueryWrapper<EamPurchasePlanAttachment> queryWrapper = QueryGenerator.initQueryWrapper(eamPurchasePlanAttachment, req.getParameterMap()); - Page<EamPurchasePlanAttachment> page = new Page<EamPurchasePlanAttachment>(pageNo, pageSize); - IPage<EamPurchasePlanAttachment> pageList = eamPurchasePlanAttachmentService.page(page, queryWrapper); - return Result.OK(pageList); - } - - /** - * 娣诲姞 - * - * @param request - * @return - */ - @AutoLog(value = "eam_purchase_plan_attachment-娣诲姞") - @ApiOperation(value="eam_purchase_plan_attachment-娣诲姞", notes="eam_purchase_plan_attachment-娣诲姞") - //@RequiresPermissions("org.jeecg.modules:eam_purchase_plan_attachment:add") - @PostMapping(value = "/add") - public Result<String> add(@RequestBody EamPurchasePlanAttachmentRequest request) { - eamPurchasePlanAttachmentService.saveAttachmentList(request); - return Result.OK("娣诲姞鎴愬姛锛�"); - } - - /** - * 缂栬緫 - * - * @param eamPurchasePlanAttachment - * @return - */ - @AutoLog(value = "eam_purchase_plan_attachment-缂栬緫") - @ApiOperation(value="eam_purchase_plan_attachment-缂栬緫", notes="eam_purchase_plan_attachment-缂栬緫") - //@RequiresPermissions("org.jeecg.modules:eam_purchase_plan_attachment:edit") - @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result<String> edit(@RequestBody EamPurchasePlanAttachment eamPurchasePlanAttachment) { - eamPurchasePlanAttachmentService.updateById(eamPurchasePlanAttachment); - return Result.OK("缂栬緫鎴愬姛!"); - } - - /** - * 閫氳繃id鍒犻櫎 - * - * @param id - * @return - */ - @AutoLog(value = "eam_purchase_plan_attachment-閫氳繃id鍒犻櫎") - @ApiOperation(value="eam_purchase_plan_attachment-閫氳繃id鍒犻櫎", notes="eam_purchase_plan_attachment-閫氳繃id鍒犻櫎") - //@RequiresPermissions("org.jeecg.modules:eam_purchase_plan_attachment:delete") - @DeleteMapping(value = "/delete") - public Result<String> delete(@RequestParam(name="id",required=true) String id) { - eamPurchasePlanAttachmentService.removeById(id); - return Result.OK("鍒犻櫎鎴愬姛!"); - } - - /** - * 鎵归噺鍒犻櫎 - * - * @param ids - * @return - */ - @AutoLog(value = "eam_purchase_plan_attachment-鎵归噺鍒犻櫎") - @ApiOperation(value="eam_purchase_plan_attachment-鎵归噺鍒犻櫎", notes="eam_purchase_plan_attachment-鎵归噺鍒犻櫎") - //@RequiresPermissions("org.jeecg.modules:eam_purchase_plan_attachment:deleteBatch") - @DeleteMapping(value = "/deleteBatch") - public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.eamPurchasePlanAttachmentService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("鎵归噺鍒犻櫎鎴愬姛!"); - } - - /** - * 閫氳繃id鏌ヨ - * - * @param id - * @return - */ - //@AutoLog(value = "eam_purchase_plan_attachment-閫氳繃id鏌ヨ") - @ApiOperation(value="eam_purchase_plan_attachment-閫氳繃id鏌ヨ", notes="eam_purchase_plan_attachment-閫氳繃id鏌ヨ") - @GetMapping(value = "/queryById") - public Result<EamPurchasePlanAttachment> queryById(@RequestParam(name="id",required=true) String id) { - EamPurchasePlanAttachment eamPurchasePlanAttachment = eamPurchasePlanAttachmentService.getById(id); - if(eamPurchasePlanAttachment==null) { - return Result.error("鏈壘鍒板搴旀暟鎹�"); - } - return Result.OK(eamPurchasePlanAttachment); - } - - /** - * 瀵煎嚭excel - * - * @param request - * @param eamPurchasePlanAttachment - */ - //@RequiresPermissions("org.jeecg.modules:eam_purchase_plan_attachment:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, EamPurchasePlanAttachment eamPurchasePlanAttachment) { - return super.exportXls(request, eamPurchasePlanAttachment, EamPurchasePlanAttachment.class, "eam_purchase_plan_attachment"); - } - - /** - * 閫氳繃excel瀵煎叆鏁版嵁 - * - * @param request - * @param response - * @return - */ - //@RequiresPermissions("eam_purchase_plan_attachment:importExcel") - @RequestMapping(value = "/importExcel", method = RequestMethod.POST) - public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { - return super.importExcel(request, response, EamPurchasePlanAttachment.class); - } - - @GetMapping("/downloadFile") - public void downloadFile(@RequestParam("id") String id, HttpServletResponse response) { - eamPurchasePlanAttachmentService.downloadFile(response, eamPurchasePlanAttachmentService.getById(id)); - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamSecondMaintenanceOrderController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamSecondMaintenanceOrderController.java index e12decb..c17443f 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamSecondMaintenanceOrderController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamSecondMaintenanceOrderController.java @@ -80,7 +80,7 @@ if (request == null) { return Result.error("娣诲姞鐨勫璞′笉鑳戒负绌猴紒"); } - if (CollectionUtil.isEmpty(request.getTableDetailList())) { + if (StrUtil.isEmpty(request.getStandardId())) { return Result.error("淇濆吇椤逛笉鑳戒负绌猴紒"); } String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.SECOND_MAINTENANCE_CODE_RULE); @@ -106,7 +106,7 @@ if (request == null) { return Result.error("娣诲姞鐨勫璞′笉鑳戒负绌猴紒"); } - if (CollectionUtil.isEmpty(request.getTableDetailList())) { + if (StrUtil.isEmpty(request.getStandardId())) { return Result.error("淇濆吇椤逛笉鑳戒负绌猴紒"); } boolean b = eamSecondMaintenanceOrderService.editMaintenance(request); @@ -228,7 +228,7 @@ if (request == null) { return Result.error("瀹℃壒鐨勫璞′笉鑳戒负绌猴紒"); } - if (CollectionUtil.isEmpty(request.getTableDetailList())) { + if (StrUtil.isEmpty(request.getStandardId())) { return Result.error("淇濆吇椤逛笉鑳戒负绌猴紒"); } // 妫�鏌ヨ姹傚弬鏁� diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentPrecisionParameters.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentPrecisionParameters.java deleted file mode 100644 index 481d6c7..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentPrecisionParameters.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.jeecg.modules.eam.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -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 org.jeecgframework.poi.excel.annotation.Excel; - -import java.io.Serializable; -import java.util.Date; -/** - * @Description: 璁惧绮惧害鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -@Data -@TableName("eam_equipment_precision_parameters") -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="eam_equipment_precision_parameters瀵硅薄", description="璁惧绮惧害鍙傛暟") -public class EamEquipmentPrecisionParameters 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; - /**璁惧id*/ - @Excel(name = "璁惧id", width = 15) - @ApiModelProperty(value = "璁惧id") - private String equipmentId; - /**鍙傛暟id*/ - @Excel(name = "鍙傛暟id", width = 15) - @ApiModelProperty(value = "鍙傛暟id") - private String parameterId; - /**鍏佸樊鍊�(mm)*/ - @Excel(name = "鍏佸樊鍊�(mm)", width = 15) - @ApiModelProperty(value = "鍏佸樊鍊�(mm)") - private String parameterValue; - /**瀹為檯鍊�(mm)*/ - @Excel(name = "瀹為檯鍊�(mm)", width = 15) - @ApiModelProperty(value = "瀹為檯鍊�(mm)") - private java.math.BigDecimal actualValue; - @TableField(exist = false) - private String parameterCode; -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentProcessParameters.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentProcessParameters.java deleted file mode 100644 index 19ecfc1..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentProcessParameters.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.jeecg.modules.eam.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -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 org.jeecgframework.poi.excel.annotation.Excel; - -import java.io.Serializable; -import java.util.Date; -/** - * @Description: 璁惧宸ヨ壓鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -@Data -@TableName("eam_equipment_process_parameters") -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="eam_equipment_process_parameters瀵硅薄", description="璁惧宸ヨ壓鍙傛暟") -public class EamEquipmentProcessParameters 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; - /**璁惧id*/ - @Excel(name = "璁惧id", width = 15) - @ApiModelProperty(value = "璁惧id") - private String equipmentId; - /**鍙傛暟id*/ - @Excel(name = "鍙傛暟id", width = 15) - @ApiModelProperty(value = "鍙傛暟id") - private String parameterId; - /**鍙傛暟鑼冨洿*/ - @Excel(name = "鍙傛暟鑼冨洿", width = 15) - @ApiModelProperty(value = "鍙傛暟鑼冨洿") - private String parameterPeriod; - @TableField(exist = false) - private String parameterCode; - @TableField(exist = false) - private String parameterUnit; -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentPurchasePlan.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentPurchasePlan.java deleted file mode 100644 index 8230968..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamEquipmentPurchasePlan.java +++ /dev/null @@ -1,132 +0,0 @@ -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.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: eam_equipment_purchase_plan - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -@Data -@TableName("eam_equipment_purchase_plan") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="eam_equipment_purchase_plan瀵硅薄", description="eam_equipment_purchase_plan") -public class EamEquipmentPurchasePlan implements Serializable { - private static final long serialVersionUID = 1L; - - /**涓婚敭*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "涓婚敭") - private String id; - /**閲囪喘璁″垝鍚嶇О*/ - @Excel(name = "閲囪喘璁″垝鍚嶇О", width = 20, orderNum = "2") - @ApiModelProperty(value = "閲囪喘璁″垝鍚嶇О") - private String planName; - /**閲囪喘璁″垝缂栫爜*/ - @Excel(name = "閲囪喘璁″垝缂栫爜", width = 20, orderNum = "1") - @ApiModelProperty(value = "閲囪喘璁″垝缂栫爜") - private String planCode; - /**璁″垝鐘舵��*/ - @Dict(dicCode = "equipment_purchase_plan_status") - @Excel(name = "璁″垝鐘舵��", width = 20, dicCode = "equipment_purchase_plan_status", orderNum = "3") - @ApiModelProperty(value = "璁″垝鐘舵��") - private String planStatus; - /**鍨嬪彿*/ - @Excel(name = "鍨嬪彿", width = 15, orderNum = "4") - @ApiModelProperty(value = "鍨嬪彿") - private String equipmentModel; - /**閲囪喘鏁伴噺*/ - @Excel(name = "閲囪喘鏁伴噺", width = 15, orderNum = "5") - @ApiModelProperty(value = "閲囪喘鏁伴噺") - private Integer purchaseNumber; - /**棰勮鍗曚环*/ - @Excel(name = "棰勮鍗曚环", width = 15, orderNum = "6") - @ApiModelProperty(value = "棰勮鍗曚环") - private BigDecimal estimatedUnitPrice; - /**鎬讳环*/ - @Excel(name = "鎬讳环", width = 15, orderNum = "7") - @ApiModelProperty(value = "鎬讳环") - private BigDecimal totalPrice; - /**鍚堝悓鎬婚噾棰�*/ - @Excel(name = "鍚堝悓鎬婚噾棰�", width = 15, orderNum = "8") - @ApiModelProperty(value = "鍚堝悓鎬婚噾棰�") - private BigDecimal overallContractAmount; - /**ABC鏍囪瘑(绠$悊鍒嗙被)*/ - @Excel(name = "绠$悊鍒嗙被", width = 10, orderNum = "9") - @ApiModelProperty(value = "ABC鏍囪瘑(绠$悊鍒嗙被)") - private String equipmentImportance; - /**璁″垝绫诲埆*/ - @ApiModelProperty(value = "璁″垝绫诲埆") - private String planCategory; - /**鐢宠浜�*/ - @Excel(name = "鐢宠浜�", width = 15, orderNum = "10") - @ApiModelProperty(value = "鐢宠浜�") - private String applicant; - /**鐢宠杞﹂棿*/ - @Excel(name = "鐢宠杞﹂棿", width = 15, dictTable = "mdc_production", dicText = "production_name", dicCode = "id", orderNum = "11") - @ApiModelProperty(value = "鐢宠杞﹂棿") - @Dict(dictTable = "mdc_production", dicText = "production_name", dicCode = "id") - private String applicantProduction; - /**璁″垝寮�濮嬫棩鏈�*/ - @Excel(name = "璁″垝寮�濮嬫棩鏈�", width = 15, format = "yyyy/MM/dd HH", orderNum = "12") - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH") - @DateTimeFormat(pattern="yyyy-MM-dd HH") - @ApiModelProperty(value = "璁″垝寮�濮嬫棩鏈�") - private Date planStartDate; - /**璁″垝瀹屾垚鏃ユ湡*/ - @Excel(name = "璁″垝瀹屾垚鏃ユ湡", width = 15, format = "yyyy/MM/dd HH", orderNum = "13") - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH") - @DateTimeFormat(pattern="yyyy-MM-dd HH") - @ApiModelProperty(value = "璁″垝瀹屾垚鏃ユ湡") - private Date planEndDate; - /**璁″垝鎻忚堪*/ - @Excel(name = "璁″垝鎻忚堪", width = 50, orderNum = "14") - @ApiModelProperty(value = "璁″垝鎻忚堪") - private String planDescription; - /**瀹炴柦鍙婂崗鍔╅儴闂�*/ - @Excel(name = "瀹炴柦鍙婂崗鍔╅儴闂�", width = 15, orderNum = "15") - @ApiModelProperty(value = "瀹炴柦鍙婂崗鍔╅儴闂�") - private String relatedDeparts; - /**澶囨敞*/ - @Excel(name = "澶囨敞", width = 50, orderNum = "16") - @ApiModelProperty(value = "澶囨敞") - private String remark; - /**鍒涘缓浜�*/ - @ApiModelProperty(value = "鍒涘缓浜�") - private String createBy; - /**鍒涘缓鏃堕棿*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH") - @DateTimeFormat(pattern="yyyy-MM-dd HH") - @ApiModelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - /**鏇存柊浜�*/ - @ApiModelProperty(value = "鏇存柊浜�") - private String updateBy; - /**鏇存柊鏃堕棿*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH") - @DateTimeFormat(pattern="yyyy-MM-dd HH") - @ApiModelProperty(value = "鏇存柊鏃堕棿") - private Date updateTime; - /**鍒犻櫎鏍囪*/ - @ApiModelProperty(value = "鍒犻櫎鏍囪") - @TableLogic - private Integer delFlag; -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPrecisionCheckDetail.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPrecisionCheckDetail.java deleted file mode 100644 index fcf65a8..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPrecisionCheckDetail.java +++ /dev/null @@ -1,79 +0,0 @@ -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-05-13 - * @Version: V1.0 - */ -@Data -@TableName("eam_precision_check_detail") -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value = "eam_precision_check_detail瀵硅薄", description = "璁惧绮惧害妫�娴嬫槑缁�") -public class EamPrecisionCheckDetail 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; - /** - * 宸ュ崟ID - */ - @ApiModelProperty(value = "宸ュ崟ID") - private String orderId; - /** - * 璁惧ID - */ - @ApiModelProperty(value = "璁惧ID") - private String equipmentId; - /** - * 鍙傛暟id - */ - @ApiModelProperty(value = "鍙傛暟id") - private String parameterId; - /** - * 鍏佸樊鍊�(mm) - */ - @ApiModelProperty(value = "鍏佸樊鍊�(mm)") - private String parameterValue; - /** - * 瀹炴祴鍊� - */ - @ApiModelProperty(value = "瀹炴祴鍊�") - private java.math.BigDecimal actualValue; -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPrecisionParameters.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPrecisionParameters.java deleted file mode 100644 index 4c72d1d..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPrecisionParameters.java +++ /dev/null @@ -1,61 +0,0 @@ -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 org.jeecg.common.aspect.annotation.Dict; -import org.jeecgframework.poi.excel.annotation.Excel; - -import java.io.Serializable; -import java.util.Date; -/** - * @Description: 绮惧害鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -@Data -@TableName("eam_precision_parameters") -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="eam_precision_parameters瀵硅薄", description="绮惧害鍙傛暟缁存姢") -public class EamPrecisionParameters 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; - /**鍙傛暟缂栫爜*/ - @Excel(name = "鍙傛暟缂栫爜", width = 25) - @ApiModelProperty(value = "鍙傛暟缂栫爜") - private String parameterCode; - /**妫�娴嬮」鐩�*/ - @Excel(name = "妫�娴嬮」鐩�", width = 25) - @ApiModelProperty(value = "妫�娴嬮」鐩�") - private String parameterName; - /**鍙傛暟鍒嗙被*/ - @Excel(name = "鍙傛暟鍒嗙被", width = 15, dicCode = "precision_parameters_category") - @ApiModelProperty(value = "鍙傛暟鍒嗙被") - @Dict(dicCode = "precision_parameters_category") - private String parameterCategory; -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamProcessParameters.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamProcessParameters.java deleted file mode 100644 index f313c9f..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamProcessParameters.java +++ /dev/null @@ -1,65 +0,0 @@ -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 org.jeecg.common.aspect.annotation.Dict; -import org.jeecgframework.poi.excel.annotation.Excel; - -import java.io.Serializable; -import java.util.Date; -/** - * @Description: 宸ュ簭鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -@Data -@TableName("eam_process_parameters") -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="eam_process_parameters瀵硅薄", description="宸ュ簭鍙傛暟缁存姢") -public class EamProcessParameters 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; - /**鍙傛暟缂栫爜*/ - @Excel(name = "鍙傛暟缂栫爜", width = 25) - @ApiModelProperty(value = "鍙傛暟缂栫爜") - private String parameterCode; - /**鍙傛暟鍚嶇О*/ - @Excel(name = "鍙傛暟鍚嶇О", width = 25) - @ApiModelProperty(value = "鍙傛暟鍚嶇О") - private String parameterName; - /**鍙傛暟鍒嗙被*/ - @Excel(name = "鍙傛暟鍒嗙被", width = 15, dicCode = "process_parameters_category") - @ApiModelProperty(value = "鍙傛暟鍒嗙被") - @Dict(dicCode = "process_parameters_category") - private String parameterCategory; - /**璁¢噺鍗曚綅*/ - @Excel(name = "璁¢噺鍗曚綅", width = 15) - @ApiModelProperty(value = "璁¢噺鍗曚綅") - private String parameterUnit; -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPurchasePlanAttachment.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPurchasePlanAttachment.java deleted file mode 100644 index dc9a391..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EamPurchasePlanAttachment.java +++ /dev/null @@ -1,83 +0,0 @@ -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.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: eam_purchase_plan_attachment - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -@Data -@TableName("eam_purchase_plan_attachment") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="eam_purchase_plan_attachment瀵硅薄", description="eam_purchase_plan_attachment") -public class EamPurchasePlanAttachment implements Serializable { - private static final long serialVersionUID = 1L; - - /**涓婚敭*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "涓婚敭") - private String id; - /**璁″垝ID*/ - @Excel(name = "璁″垝ID", width = 15) - @ApiModelProperty(value = "璁″垝ID") - private String planId; - /**鏂囦欢鍔犲瘑鍚�*/ - @Excel(name = "鏂囦欢鍔犲瘑鍚�", width = 15) - @ApiModelProperty(value = "鏂囦欢鍔犲瘑鍚�") - private String fileEncodeName; - /**鏂囦欢鍚嶇О*/ - @Excel(name = "鏂囦欢鍚嶇О", width = 15) - @ApiModelProperty(value = "鏂囦欢鍚嶇О") - private String fileName; - /**鏂囦欢淇濆瓨璺緞*/ - @Excel(name = "鏂囦欢淇濆瓨璺緞", width = 15) - @ApiModelProperty(value = "鏂囦欢淇濆瓨璺緞") - private String filePath; - /**鏂囦欢鍚庣紑鍚�*/ - @Excel(name = "鏂囦欢鍚庣紑鍚�", width = 15) - @ApiModelProperty(value = "鏂囦欢鍚庣紑鍚�") - private String fileSuffix; - /**鏂囦欢澶у皬*/ - @Excel(name = "鏂囦欢澶у皬", width = 15) - @ApiModelProperty(value = "鏂囦欢澶у皬") - private Long fileSize; - /**鎻忚堪*/ - @Excel(name = "鎻忚堪", width = 15) - @ApiModelProperty(value = "鎻忚堪") - private String description; - /**鍒涘缓浜�*/ - @ApiModelProperty(value = "鍒涘缓浜�") - private String createBy; - /**鍒涘缓鏃堕棿*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH") - @DateTimeFormat(pattern="yyyy-MM-dd HH") - @ApiModelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - /**鏇存柊浜�*/ - @ApiModelProperty(value = "鏇存柊浜�") - private String updateBy; - /**鏇存柊鏃堕棿*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH") - @DateTimeFormat(pattern="yyyy-MM-dd HH") - @ApiModelProperty(value = "鏇存柊鏃堕棿") - private Date updateTime; -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/job/ThirdMaintenanceOrderGenerateJob.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/job/ThirdMaintenanceOrderGenerateJob.java index b57a350..2241c37 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/job/ThirdMaintenanceOrderGenerateJob.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/job/ThirdMaintenanceOrderGenerateJob.java @@ -9,7 +9,6 @@ import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; import org.jeecg.modules.eam.entity.*; import org.jeecg.modules.eam.request.EamThirdMaintenanceRequest; -import org.jeecg.modules.eam.service.IEamEquipmentPrecisionParametersService; import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService; import org.jeecg.modules.eam.service.IEamMaintenanceStandardService; import org.jeecg.modules.eam.service.IEamThirdMaintenanceOrderService; @@ -34,8 +33,6 @@ @Slf4j public class ThirdMaintenanceOrderGenerateJob implements Job { - @Autowired - private IEamEquipmentPrecisionParametersService eamEquipmentPrecisionParametersService; @Autowired private IEamThirdMaintenanceOrderService eamThirdMaintenanceOrderService; @Autowired @@ -121,21 +118,7 @@ } // List<EamThirdMaintenanceOrderDetail> collect = standardDetailList.stream().map(EamThirdMaintenanceOrderDetail::new).collect(Collectors.toList()); request.setTableDetailList(tableDetailList); - - //閫氳繃璁惧 鑾峰彇璁惧绮惧害鍙傛暟 - List<EamEquipmentPrecisionParameters> precisionParametersList = eamEquipmentPrecisionParametersService - .lambdaQuery().eq(EamEquipmentPrecisionParameters::getEquipmentId, standard.getEquipmentId()).list(); - if(precisionParametersList.size()>0){ - List<EamPrecisionCheckDetail> precisionDetailList = new ArrayList<>(); - for (EamEquipmentPrecisionParameters epp : precisionParametersList) { - EamPrecisionCheckDetail pcd = new EamPrecisionCheckDetail(); - pcd.setParameterId(epp.getParameterId()); - pcd.setEquipmentId(standard.getEquipmentId()); - pcd.setParameterValue(epp.getParameterValue()); - precisionDetailList.add(pcd); - } - request.setPrecisionDetailList(precisionDetailList); - } + eamThirdMaintenanceOrderService.addMaintenance(request); // standard.setLastGenerateTime(new Date()); diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentPrecisionParametersMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentPrecisionParametersMapper.java deleted file mode 100644 index 0f9d295..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentPrecisionParametersMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.jeecg.modules.eam.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.eam.entity.EamEquipmentPrecisionParameters; - -/** - * @Description: 璁惧绮惧害鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -public interface EamEquipmentPrecisionParametersMapper extends BaseMapper<EamEquipmentPrecisionParameters> { - - /** - * 鍒嗛〉鏌ヨ - * @param page - * @param queryWrapper - * @return - */ - IPage<EamEquipmentPrecisionParameters> queryPageList(Page<EamEquipmentPrecisionParameters> page, @Param(Constants.WRAPPER) QueryWrapper<EamEquipmentPrecisionParameters> queryWrapper); -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentProcessParametersMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentProcessParametersMapper.java deleted file mode 100644 index d569156..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentProcessParametersMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.jeecg.modules.eam.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.eam.entity.EamEquipmentProcessParameters; - -/** - * @Description: 璁惧宸ヨ壓鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -public interface EamEquipmentProcessParametersMapper extends BaseMapper<EamEquipmentProcessParameters> { - - /** - * 鍒嗛〉鏌ヨ - * @param queryWrapper - * @param page - * @return - */ - IPage<EamEquipmentProcessParameters> queryPageList(Page<EamEquipmentProcessParameters> page, @Param(Constants.WRAPPER) QueryWrapper<EamEquipmentProcessParameters> queryWrapper); -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentPurchasePlanMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentPurchasePlanMapper.java deleted file mode 100644 index 7ae4072..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamEquipmentPurchasePlanMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.jeecg.modules.eam.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.eam.entity.EamEquipmentPurchasePlan; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: eam_equipment_purchase_plan - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -public interface EamEquipmentPurchasePlanMapper extends BaseMapper<EamEquipmentPurchasePlan> { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPrecisionCheckDetailMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPrecisionCheckDetailMapper.java deleted file mode 100644 index d95743b..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPrecisionCheckDetailMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.jeecg.modules.eam.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.eam.entity.EamPrecisionCheckDetail; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 璁惧绮惧害妫�娴嬫槑缁� - * @Author: jeecg-boot - * @Date: 2025-05-13 - * @Version: V1.0 - */ -public interface EamPrecisionCheckDetailMapper extends BaseMapper<EamPrecisionCheckDetail> { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPrecisionParametersMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPrecisionParametersMapper.java deleted file mode 100644 index a37cfe2..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPrecisionParametersMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.jeecg.modules.eam.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.eam.entity.EamPrecisionParameters; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 绮惧害鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -public interface EamPrecisionParametersMapper extends BaseMapper<EamPrecisionParameters> { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamProcessParametersMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamProcessParametersMapper.java deleted file mode 100644 index fdd61e0..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamProcessParametersMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.jeecg.modules.eam.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.eam.entity.EamProcessParameters; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: 宸ュ簭鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -public interface EamProcessParametersMapper extends BaseMapper<EamProcessParameters> { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPurchasePlanAttachmentMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPurchasePlanAttachmentMapper.java deleted file mode 100644 index 15e83ca..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/EamPurchasePlanAttachmentMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.jeecg.modules.eam.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import org.jeecg.modules.eam.entity.EamPurchasePlanAttachment; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * @Description: eam_purchase_plan_attachment - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -public interface EamPurchasePlanAttachmentMapper extends BaseMapper<EamPurchasePlanAttachment> { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentPrecisionParametersMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentPrecisionParametersMapper.xml deleted file mode 100644 index 955d277..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentPrecisionParametersMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?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.EamEquipmentPrecisionParametersMapper"> - - <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamEquipmentPrecisionParameters"> - select wmo.*, e.parameter_code - from eam_equipment_precision_parameters wmo - inner join eam_precision_parameters e - on wmo.parameter_id = e.id - ${ew.customSqlSegment} - </select> -</mapper> \ No newline at end of file diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentProcessParametersMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentProcessParametersMapper.xml deleted file mode 100644 index b8c7f5b..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentProcessParametersMapper.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?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.EamEquipmentProcessParametersMapper"> - - <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamEquipmentProcessParameters"> - select wmo.*, e.parameter_code, e.parameter_unit - from eam_equipment_process_parameters wmo - inner join eam_process_parameters e - on wmo.parameter_id = e.id - ${ew.customSqlSegment} - </select> -</mapper> \ No newline at end of file diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentPurchasePlanMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentPurchasePlanMapper.xml deleted file mode 100644 index b051fda..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentPurchasePlanMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?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.EamEquipmentPurchasePlanMapper"> - -</mapper> \ No newline at end of file diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPrecisionCheckDetailMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPrecisionCheckDetailMapper.xml deleted file mode 100644 index 37a420c..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPrecisionCheckDetailMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?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.EamPrecisionCheckDetailMapper"> - -</mapper> \ No newline at end of file diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPrecisionParametersMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPrecisionParametersMapper.xml deleted file mode 100644 index a1905e7..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPrecisionParametersMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?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.EamPrecisionParametersMapper"> - -</mapper> \ No newline at end of file diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamProcessParametersMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamProcessParametersMapper.xml deleted file mode 100644 index 413ccaf..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamProcessParametersMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?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.EamProcessParametersMapper"> - -</mapper> \ No newline at end of file diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPurchasePlanAttachmentMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPurchasePlanAttachmentMapper.xml deleted file mode 100644 index 98ccffb..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamPurchasePlanAttachmentMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?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.EamPurchasePlanAttachmentMapper"> - -</mapper> \ No newline at end of file diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamSecondMaintenanceOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamSecondMaintenanceOrderMapper.xml index a679294..5034d04 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamSecondMaintenanceOrderMapper.xml +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamSecondMaintenanceOrderMapper.xml @@ -3,10 +3,10 @@ <mapper namespace="org.jeecg.modules.eam.mapper.EamSecondMaintenanceOrderMapper"> <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamSecondMaintenanceOrder"> - select wmo.*, e.equipment_code, e.equipment_name + select wmo.*, e.equipment_code, e.equipment_name,e.equipment_model from eam_second_maintenance_order wmo inner join eam_equipment e on wmo.equipment_id = e.id ${ew.customSqlSegment} </select> -</mapper> \ No newline at end of file +</mapper> diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamSecondMaintenanceRequest.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamSecondMaintenanceRequest.java index 140cd99..8fbff40 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamSecondMaintenanceRequest.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamSecondMaintenanceRequest.java @@ -7,8 +7,10 @@ import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import org.jeecg.common.api.vo.FileUploadResult; +import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.modules.eam.entity.EamSecondMaintenanceOrderDetail; import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; +import org.jeecgframework.poi.excel.annotation.Excel; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; @@ -24,43 +26,100 @@ /**涓婚敭*/ @ApiModelProperty(value = "涓婚敭") private String id; - /**宸ュ崟鍙�*/ + /** + * 宸ュ崟鍙� + */ + @Excel(name = "宸ュ崟鍙�", width = 15) @ApiModelProperty(value = "宸ュ崟鍙�") private String orderNum; - /**璁惧ID*/ + /** + * 璁惧ID + */ + @Excel(name = "璁惧ID", width = 15) @ApiModelProperty(value = "璁惧ID") private String equipmentId; - /**鏍囧噯ID*/ + /** + * 鏍囧噯ID + */ + @Excel(name = "鏍囧噯ID", width = 15) @ApiModelProperty(value = "鏍囧噯ID") + @Dict(dicCode = "eam_maintenance_standard, standard_name, id") private String standardId; - /**淇濆吇鏃ユ湡*/ - @ApiModelProperty(value = "淇濆吇鏃ユ湡") + /** + * 璁″垝淇濆吇鏃ユ湡 + */ + @ApiModelProperty(value = "璁″垝淇濆吇鏃ユ湡") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") private Date maintenanceDate; - /**淇濆吇浜�*/ - @ApiModelProperty(value = "淇濆吇浜�") - private String operator; - /**澶囨敞*/ + /** + * 瀹為檯寮�濮嬫椂闂� + */ + @ApiModelProperty(value = "瀹為檯寮�濮嬫椂闂�") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date actualStartTime; + /** + * 瀹為檯缁撴潫鏃堕棿 + */ + @ApiModelProperty(value = "瀹為檯缁撴潫鏃堕棿") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date actualEndTime; + /** 鎿嶄綔宸� */ + @ApiModelProperty(value = "鎿嶄綔宸�") + private String operator ; + /** 缁翠慨宸� */ + @ApiModelProperty(value = "缁翠慨宸�") + private String repairman ; + /** + * 淇濆吇鐘舵�� 寰呬繚鍏汇�佷繚鍏讳腑銆佺鐞嗗憳纭銆佹鏌ヤ汉纭銆佸凡瀹屾垚 + */ + @Excel(name = "淇濆吇鐘舵��", width = 15) + @ApiModelProperty(value = "淇濆吇鐘舵��") + @Dict(dicCode = "second_maintenance_status") + private String maintenanceStatus; + /** + * 鍒涘缓鏂瑰紡 + */ + @Excel(name = "鍒涘缓鏂瑰紡", width = 15) + @ApiModelProperty(value = "鍒涘缓鏂瑰紡") + @Dict(dicCode = "order_creation_method") + private String creationMethod; + /** + * 绠$悊鍛樼‘璁� + */ + @Excel(name = "绠$悊鍛樼‘璁�", width = 15) + @ApiModelProperty(value = "绠$悊鍛樼‘璁�") + @Dict(dicCode = "sys_user, realname, username") + private String manageUser; + /** 闂鎻忚堪;榛樿 鏃� */ + @ApiModelProperty(name = "闂鎻忚堪",notes = "榛樿 鏃�") + private String problemDescription ; + /** 澶勭悊鎻忚堪;榛樿 鏃� */ + @ApiModelProperty(name = "澶勭悊鎻忚堪",notes = "榛樿 鏃�") + private String dealDescription ; + /** 绠$悊鍛樼‘璁ゆ椂闂� */ + @ApiModelProperty(name = "绠$悊鍛樼‘璁ゆ椂闂�",notes = "") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date confirmTime ; + /** 妫�鏌ヤ汉纭 */ + @ApiModelProperty(name = "妫�鏌ヤ汉纭",notes = "") + private String inspector; + /** 妫�鏌ヤ汉鎰忚 */ + @ApiModelProperty(name = "妫�鏌ヤ汉鎰忚",notes = "") + private String inspectConfirmComment; + /** 妫�鏌ヤ汉纭鏃堕棿 */ + @ApiModelProperty(name = "妫�鏌ヤ汉纭鏃堕棿",notes = "") + private String inspectConfirmTime; + /** HF缂栫爜 */ + @ApiModelProperty(name = "HF缂栫爜",notes = "") + private String hfCode; + /** + * 澶囨敞 + */ + @Excel(name = "澶囨敞", width = 15) @ApiModelProperty(value = "澶囨敞") private String remark; - /**鍒涘缓鏂瑰紡*/ - @ApiModelProperty(value = "鍒涘缓鏂瑰紡") - private String creationMethod; - /**鍒楄〃 淇濆吇椤规槑缁�*/ - @ApiModelProperty(value = "鍒楄〃 淇濆吇椤规槑缁�") - private List<EamSecondMaintenanceOrderDetail> tableDetailList; - /**鍒犻櫎 淇濆吇椤规槑缁�*/ - @ApiModelProperty(value = "鍒犻櫎 淇濆吇椤规槑缁�") - private List<EamSecondMaintenanceOrderDetail> removeDetailList; - - //纭鎿嶄綔 - /**纭鎰忚*/ - @ApiModelProperty(value = "纭鎰忚") - private String confirmComment; - @ApiModelProperty(value = "纭绫诲瀷") - private String confirmDealType; - /**棰嗗纭鎰忚*/ - @ApiModelProperty(value = "棰嗗纭鎰忚") - private String leaderConfirmComment; } diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamThirdMaintenanceRequest.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamThirdMaintenanceRequest.java index 8000851..a8d3c3e 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamThirdMaintenanceRequest.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/request/EamThirdMaintenanceRequest.java @@ -7,7 +7,6 @@ import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import org.jeecg.common.api.vo.FileUploadResult; -import org.jeecg.modules.eam.entity.EamPrecisionCheckDetail; import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrderDetail; import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; import org.springframework.format.annotation.DateTimeFormat; @@ -61,12 +60,12 @@ @ApiModelProperty(value = "鍒犻櫎 淇濆吇椤规槑缁�") private List<EamThirdMaintenanceOrderDetail> removeDetailList; - /**鍒楄〃 绮惧害鍙傛暟鏄庣粏*/ - @ApiModelProperty(value = "鍒楄〃 绮惧害鍙傛暟鏄庣粏") - private List<EamPrecisionCheckDetail> precisionDetailList; - /**鍒犻櫎 绮惧害鍙傛暟鏄庣粏*/ - @ApiModelProperty(value = "鍒犻櫎 绮惧害鍙傛暟鏄庣粏") - private List<EamPrecisionCheckDetail> removePrecisionDetailList; +// /**鍒楄〃 绮惧害鍙傛暟鏄庣粏*/ +// @ApiModelProperty(value = "鍒楄〃 绮惧害鍙傛暟鏄庣粏") +// private List<EamPrecisionCheckDetail> precisionDetailList; +// /**鍒犻櫎 绮惧害鍙傛暟鏄庣粏*/ +// @ApiModelProperty(value = "鍒犻櫎 绮惧害鍙傛暟鏄庣粏") +// private List<EamPrecisionCheckDetail> removePrecisionDetailList; //纭鎿嶄綔 diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentPrecisionParametersService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentPrecisionParametersService.java deleted file mode 100644 index bfefaa8..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentPrecisionParametersService.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.jeecg.modules.eam.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import org.jeecg.modules.eam.entity.EamEquipmentPrecisionParameters; - -import java.util.List; - -/** - * @Description: 璁惧绮惧害鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -public interface IEamEquipmentPrecisionParametersService extends IService<EamEquipmentPrecisionParameters> { - /** - * 鏌ヨ璁惧绮惧害鍙傛暟 - * @param equipmentId 璁惧ID - * @param parameterId 鍙傛暟ID - * @return - */ - EamEquipmentPrecisionParameters queryByEquipmentIdAndParameterId(String equipmentId, String parameterId); - - /** - * 鍒嗛〉鏌ヨ - * @param equipmentId - * @param page - * @return - */ - IPage<EamEquipmentPrecisionParameters> queryPageList(String equipmentId, Page<EamEquipmentPrecisionParameters> page); - - /** - * 鍒楄〃鏌ヨ - * @param equipmentId - * @return - */ - List<EamEquipmentPrecisionParameters> queryList(String equipmentId); -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentProcessParametersService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentProcessParametersService.java deleted file mode 100644 index 4f70bec..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentProcessParametersService.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.jeecg.modules.eam.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.jeecg.modules.eam.entity.EamEquipmentProcessParameters; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 璁惧宸ヨ壓鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -public interface IEamEquipmentProcessParametersService extends IService<EamEquipmentProcessParameters> { - - /** - * 鏌ヨ璁惧宸ヨ壓鍙傛暟 - * @param equipmentId 璁惧缂栧彿 - * @param parameterId 鍙傛暟缂栧彿 - * @return - */ - EamEquipmentProcessParameters queryByEquipmentIdAndParameterId(String equipmentId, String parameterId); - - /** - * 鍒嗛〉鏌ヨ - * @param equipmentId - * @param page - * @return - */ - IPage<EamEquipmentProcessParameters> queryPageList(String equipmentId, Page<EamEquipmentProcessParameters> page); -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentPurchasePlanService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentPurchasePlanService.java deleted file mode 100644 index d35fb64..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamEquipmentPurchasePlanService.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.jeecg.modules.eam.service; - -import org.jeecg.modules.eam.entity.EamEquipmentPurchasePlan; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: eam_equipment_purchase_plan - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -public interface IEamEquipmentPurchasePlanService extends IService<EamEquipmentPurchasePlan> { - - void savePurchasePlan(EamEquipmentPurchasePlan eamEquipmentPurchasePlan); -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPrecisionCheckDetailService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPrecisionCheckDetailService.java deleted file mode 100644 index 6728f04..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPrecisionCheckDetailService.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.jeecg.modules.eam.service; - -import org.jeecg.modules.eam.entity.EamPrecisionCheckDetail; -import com.baomidou.mybatisplus.extension.service.IService; - -import java.util.List; - -/** - * @Description: 璁惧绮惧害妫�娴嬫槑缁� - * @Author: jeecg-boot - * @Date: 2025-05-13 - * @Version: V1.0 - */ -public interface IEamPrecisionCheckDetailService extends IService<EamPrecisionCheckDetail> { - - /** - * 鏍规嵁宸ュ崟ID 鏌ヨ 绮惧害淇℃伅 - * @param orderId - * @return - */ - List<EamPrecisionCheckDetail> getByOrderId(String orderId); - - /** - * 鏍¢獙鏄惁瀛樺湪绮惧害妫�楠� - * @param orderId - * @return - */ - boolean hasPrecisionCheckDetail(String orderId); - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPrecisionParametersService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPrecisionParametersService.java deleted file mode 100644 index 428272f..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPrecisionParametersService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.jeecg.modules.eam.service; - -import org.jeecg.modules.eam.entity.EamPrecisionParameters; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 绮惧害鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -public interface IEamPrecisionParametersService extends IService<EamPrecisionParameters> { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamProcessParametersService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamProcessParametersService.java deleted file mode 100644 index 363e653..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamProcessParametersService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.jeecg.modules.eam.service; - -import org.jeecg.modules.eam.entity.EamProcessParameters; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * @Description: 宸ュ簭鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -public interface IEamProcessParametersService extends IService<EamProcessParameters> { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPurchasePlanAttachmentService.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPurchasePlanAttachmentService.java deleted file mode 100644 index 97b394c..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/IEamPurchasePlanAttachmentService.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.jeecg.modules.eam.service; - -import org.jeecg.modules.eam.entity.EamPurchasePlanAttachment; -import com.baomidou.mybatisplus.extension.service.IService; -import org.jeecg.modules.eam.request.EamPurchasePlanAttachmentRequest; - -import javax.servlet.http.HttpServletResponse; - -/** - * @Description: eam_purchase_plan_attachment - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -public interface IEamPurchasePlanAttachmentService extends IService<EamPurchasePlanAttachment> { - - void saveAttachmentList(EamPurchasePlanAttachmentRequest request); - - void downloadFile(HttpServletResponse response, EamPurchasePlanAttachment byId); -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentPrecisionParametersServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentPrecisionParametersServiceImpl.java deleted file mode 100644 index 835bcb7..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentPrecisionParametersServiceImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.jeecg.modules.eam.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.jeecg.modules.eam.entity.EamEquipmentPrecisionParameters; -import org.jeecg.modules.eam.mapper.EamEquipmentPrecisionParametersMapper; -import org.jeecg.modules.eam.service.IEamEquipmentPrecisionParametersService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.Collections; -import java.util.List; - -/** - * @Description: 璁惧绮惧害鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -@Service -public class EamEquipmentPrecisionParametersServiceImpl extends ServiceImpl<EamEquipmentPrecisionParametersMapper, EamEquipmentPrecisionParameters> implements IEamEquipmentPrecisionParametersService { - - @Resource - private EamEquipmentPrecisionParametersMapper eamEquipmentPrecisionParametersMapper; - - @Override - public EamEquipmentPrecisionParameters queryByEquipmentIdAndParameterId(String equipmentId, String parameterId) { - LambdaQueryWrapper<EamEquipmentPrecisionParameters> queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(EamEquipmentPrecisionParameters::getEquipmentId, equipmentId); - queryWrapper.eq(EamEquipmentPrecisionParameters::getParameterId, parameterId); - return eamEquipmentPrecisionParametersMapper.selectOne(queryWrapper); - } - - @Override - public IPage<EamEquipmentPrecisionParameters> queryPageList(String equipmentId, Page<EamEquipmentPrecisionParameters> page) { - QueryWrapper<EamEquipmentPrecisionParameters> queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("wmo.equipment_id", equipmentId); - queryWrapper.orderByDesc("wmo.create_time"); - return eamEquipmentPrecisionParametersMapper.queryPageList(page, queryWrapper); - } - - @Override - public List<EamEquipmentPrecisionParameters> queryList(String equipmentId) { - LambdaQueryWrapper<EamEquipmentPrecisionParameters> queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(EamEquipmentPrecisionParameters::getEquipmentId, equipmentId); - queryWrapper.orderByDesc(EamEquipmentPrecisionParameters::getCreateTime); - return eamEquipmentPrecisionParametersMapper.selectList(queryWrapper); - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentProcessParametersServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentProcessParametersServiceImpl.java deleted file mode 100644 index fe89c60..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentProcessParametersServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.jeecg.modules.eam.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.jeecg.modules.eam.entity.EamEquipmentProcessParameters; -import org.jeecg.modules.eam.mapper.EamEquipmentProcessParametersMapper; -import org.jeecg.modules.eam.service.IEamEquipmentProcessParametersService; -import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -import javax.annotation.Resource; - -/** - * @Description: 璁惧宸ヨ壓鍙傛暟 - * @Author: jeecg-boot - * @Date: 2025-04-27 - * @Version: V1.0 - */ -@Service -public class EamEquipmentProcessParametersServiceImpl extends ServiceImpl<EamEquipmentProcessParametersMapper, EamEquipmentProcessParameters> implements IEamEquipmentProcessParametersService { - - @Resource - private EamEquipmentProcessParametersMapper eamEquipmentProcessParametersMapper; - - @Override - public EamEquipmentProcessParameters queryByEquipmentIdAndParameterId(String equipmentId, String parameterId) { - LambdaQueryWrapper<EamEquipmentProcessParameters> queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(EamEquipmentProcessParameters::getEquipmentId, equipmentId); - queryWrapper.eq(EamEquipmentProcessParameters::getParameterId, parameterId); - return eamEquipmentProcessParametersMapper.selectOne(queryWrapper); - } - - @Override - public IPage<EamEquipmentProcessParameters> queryPageList(String equipmentId, Page<EamEquipmentProcessParameters> page) { - QueryWrapper<EamEquipmentProcessParameters> queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("wmo.equipment_id", equipmentId); - queryWrapper.orderByDesc("wmo.create_time"); - return eamEquipmentProcessParametersMapper.queryPageList(page, queryWrapper); - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentPurchasePlanServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentPurchasePlanServiceImpl.java deleted file mode 100644 index 9423de1..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentPurchasePlanServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.jeecg.modules.eam.service.impl; - -import org.jeecg.common.constant.CommonConstant; -import org.jeecg.modules.eam.constant.EquipmentPurchasePlanStatusEnum; -import org.jeecg.modules.eam.entity.EamEquipmentPurchasePlan; -import org.jeecg.modules.eam.mapper.EamEquipmentPurchasePlanMapper; -import org.jeecg.modules.eam.service.IEamEquipmentPurchasePlanService; -import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -/** - * @Description: eam_equipment_purchase_plan - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -@Service -public class EamEquipmentPurchasePlanServiceImpl extends ServiceImpl<EamEquipmentPurchasePlanMapper, EamEquipmentPurchasePlan> implements IEamEquipmentPurchasePlanService { - - @Autowired - private ISysBusinessCodeRuleService sysBusinessCodeRuleService; - - @Override - public void savePurchasePlan(EamEquipmentPurchasePlan eamEquipmentPurchasePlan) { - eamEquipmentPurchasePlan.setPlanCode(sysBusinessCodeRuleService.generateBusinessCodeSeq("EquipmentPurchasePlanRule")); - eamEquipmentPurchasePlan.setPlanStatus(EquipmentPurchasePlanStatusEnum.NEWLY.name()); - eamEquipmentPurchasePlan.setDelFlag(CommonConstant.DEL_FLAG_0); - save(eamEquipmentPurchasePlan); - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java index e90a510..ebddfb4 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java @@ -611,6 +611,19 @@ throw new JeecgBootException("璁惧涓嶅瓨鍦紝璇锋鏌ワ紒"); } + // 妫�鏌ュ懆淇濊繃鏈熸椂闂� + if (eamInspectionOrderRequest.getTableWeekDetailList() == null || eamInspectionOrderRequest.getTableWeekDetailList().isEmpty()) { + List<EamWeekInspectionDetail> weekInspectionDetailList = eamWeekInspectionDetailService.list(new LambdaQueryWrapper<EamWeekInspectionDetail>().eq(EamWeekInspectionDetail::getStandardId, eamInspectionOrderRequest.getStandardId()).between(EamWeekInspectionDetail::getPlanInspectionDate, DateUtils.getFirstDayOfWeek(eamInspectionOrderRequest.getInspectionDate()), DateUtils.getLastDayOfWeek(eamInspectionOrderRequest.getInspectionDate()))); + if (weekInspectionDetailList != null && !weekInspectionDetailList.isEmpty()) { + if (StrUtil.isEmpty(eamInspectionOrderRequest.getOperator())) { + Date lastDate = DateUtils.getLastDayOfWeek(eamInspectionOrderRequest.getInspectionDate()); + if (DateUtils.isSameDay(lastDate, new Date())) { + throw new JeecgBootException("鏈懆鐐规鏈畬鎴愶紝璇疯繘琛屽~鎶ワ紒"); + } + } + } + } + // 璁剧疆娴佺▼鍙橀噺 setupProcessVariables(eamInspectionOrderRequest, eamInspectionOrder, user, equipment); diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPrecisionCheckDetailServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPrecisionCheckDetailServiceImpl.java deleted file mode 100644 index cda6eb5..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPrecisionCheckDetailServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.jeecg.modules.eam.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.jeecg.modules.eam.entity.EamPrecisionCheckDetail; -import org.jeecg.modules.eam.mapper.EamPrecisionCheckDetailMapper; -import org.jeecg.modules.eam.service.IEamPrecisionCheckDetailService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.List; - -/** - * @Description: 璁惧绮惧害妫�娴嬫槑缁� - * @Author: jeecg-boot - * @Date: 2025-05-13 - * @Version: V1.0 - */ -@Service -public class EamPrecisionCheckDetailServiceImpl extends ServiceImpl<EamPrecisionCheckDetailMapper, EamPrecisionCheckDetail> implements IEamPrecisionCheckDetailService { - - @Resource - private EamPrecisionCheckDetailMapper eamPrecisionCheckDetailMapper; - - @Override - public List<EamPrecisionCheckDetail> getByOrderId(String orderId) { - LambdaQueryWrapper<EamPrecisionCheckDetail> queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(EamPrecisionCheckDetail::getOrderId, orderId); - return eamPrecisionCheckDetailMapper.selectList(queryWrapper); - } - - @Override - public boolean hasPrecisionCheckDetail(String orderId) { - LambdaQueryWrapper<EamPrecisionCheckDetail> wrapper = new LambdaQueryWrapper<>(); - wrapper.eq(EamPrecisionCheckDetail::getOrderId, orderId); - return eamPrecisionCheckDetailMapper.selectCount(wrapper) > 0; - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPrecisionParametersServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPrecisionParametersServiceImpl.java deleted file mode 100644 index d9e884b..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPrecisionParametersServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.jeecg.modules.eam.service.impl; - -import org.jeecg.modules.eam.entity.EamPrecisionParameters; -import org.jeecg.modules.eam.mapper.EamPrecisionParametersMapper; -import org.jeecg.modules.eam.service.IEamPrecisionParametersService; -import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -/** - * @Description: 绮惧害鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -@Service -public class EamPrecisionParametersServiceImpl extends ServiceImpl<EamPrecisionParametersMapper, EamPrecisionParameters> implements IEamPrecisionParametersService { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamProcessParametersServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamProcessParametersServiceImpl.java deleted file mode 100644 index 67d1826..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamProcessParametersServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.jeecg.modules.eam.service.impl; - -import org.jeecg.modules.eam.entity.EamProcessParameters; -import org.jeecg.modules.eam.mapper.EamProcessParametersMapper; -import org.jeecg.modules.eam.service.IEamProcessParametersService; -import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -/** - * @Description: 宸ュ簭鍙傛暟缁存姢 - * @Author: jeecg-boot - * @Date: 2025-03-17 - * @Version: V1.0 - */ -@Service -public class EamProcessParametersServiceImpl extends ServiceImpl<EamProcessParametersMapper, EamProcessParameters> implements IEamProcessParametersService { - -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPurchasePlanAttachmentServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPurchasePlanAttachmentServiceImpl.java deleted file mode 100644 index 0737137..0000000 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamPurchasePlanAttachmentServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.jeecg.modules.eam.service.impl; - -import cn.hutool.core.collection.CollectionUtil; -import org.jeecg.common.util.FileUtil; -import org.jeecg.modules.eam.entity.EamEquipmentPurchasePlan; -import org.jeecg.modules.eam.entity.EamPurchasePlanAttachment; -import org.jeecg.modules.eam.mapper.EamPurchasePlanAttachmentMapper; -import org.jeecg.modules.eam.request.EamPurchasePlanAttachmentRequest; -import org.jeecg.modules.eam.service.IEamEquipmentPurchasePlanService; -import org.jeecg.modules.eam.service.IEamPurchasePlanAttachmentService; -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.servlet.http.HttpServletResponse; -import java.util.ArrayList; -import java.util.Objects; - -/** - * @Description: eam_purchase_plan_attachment - * @Author: jeecg-boot - * @Date: 2025-06-18 - * @Version: V1.0 - */ -@Service -public class EamPurchasePlanAttachmentServiceImpl extends ServiceImpl<EamPurchasePlanAttachmentMapper, EamPurchasePlanAttachment> implements IEamPurchasePlanAttachmentService { - - @Autowired - private IEamEquipmentPurchasePlanService eamEquipmentPurchasePlanService; - - @Override - @Transactional(rollbackFor = Exception.class) - public void saveAttachmentList(EamPurchasePlanAttachmentRequest request) { - if (Objects.isNull(request) || CollectionUtil.isEmpty(request.getFileList())) { - throw new RuntimeException("璇烽�夋嫨鏂囨。鍐嶄笂浼狅紒"); - } - EamEquipmentPurchasePlan plan = eamEquipmentPurchasePlanService.getById(request.getPlanId()); - if (Objects.isNull(plan)) { - throw new RuntimeException("璇峰厛閫夋嫨璁惧閲囪喘璁″垝鍐嶄笂浼犳枃妗o紒"); - } - ArrayList<EamPurchasePlanAttachment> attachmentList = CollectionUtil.newArrayList(); - request.getFileList().forEach(fileUploadResult -> { - EamPurchasePlanAttachment attachment = new EamPurchasePlanAttachment() - .setPlanId(request.getPlanId()) - .setFilePath(fileUploadResult.getFilePath()) - .setFileName(fileUploadResult.getFileName()) - .setFileEncodeName(fileUploadResult.getFileEncodeName()) - .setFileSize(fileUploadResult.getFileSize()) - .setFileSuffix(fileUploadResult.getFileSuffix()) - .setDescription(request.getDescription()); - attachmentList.add(attachment); - }); - saveBatch(attachmentList); - } - - @Override - public void downloadFile(HttpServletResponse response, EamPurchasePlanAttachment entity) { - FileUtil.downLoadFile(response, entity.getFilePath(), entity.getFileName()); - } -} diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java index 1827589..b26bfbe 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamSecondMaintenanceOrderServiceImpl.java @@ -39,6 +39,7 @@ import org.jeecg.modules.system.service.IBaseFactoryUserService; import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.vo.UserSelector; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -82,6 +83,10 @@ private IEamReportRepairService eamReportRepairService; @Autowired private IEamEquipmentExtendService eamEquipmentExtendService; + @Autowired + private IEamBaseHFCodeService hfCodeService; + @Autowired + private IEamMaintenanceStandardDetailService eamMaintenanceStandardDetailService; @Override public IPage<EamSecondMaintenanceOrder> queryPageList(Page<EamSecondMaintenanceOrder> page, EamSecondMaintenanceQuery query) { @@ -155,6 +160,12 @@ order.setStandardId(request.getStandardId()); order.setMaintenanceDate(request.getMaintenanceDate()); order.setOperator(request.getOperator()); + //鎶�鏈姸鎬侀壌瀹氳〃 + EamBaseHFCode eamBaseHFCode = hfCodeService.selectByCategory(HfTemplateCategoryEnum.SECOND_MAINTENANCE.name()); + if(eamBaseHFCode == null) { + throw new JeecgBootException("鏈厤缃妧鏈姸鎬侀壌瀹氳〃鐨凥F缂栫爜锛屾坊鍔犲け璐ワ紒"); + } + order.setHfCode(eamBaseHFCode.getHfCode()); order.setRemark(request.getRemark()); //鐘舵�佸垵濮嬪寲 order.setMaintenanceStatus(SecondMaintenanceStatusEnum.WAIT_MAINTENANCE.name()); @@ -163,43 +174,17 @@ order.setDelFlag(CommonConstant.DEL_FLAG_0); eamSecondMaintenanceOrderMapper.insert(order); //澶勭悊鏄庣粏鏁版嵁 - if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { - request.getTableDetailList().forEach(tableDetail -> { - tableDetail.setId(null); - tableDetail.setOrderId(order.getId()); + List<EamMaintenanceStandardDetail> eamMaintenanceStandardDetailList= eamMaintenanceStandardDetailService.selectByStandardId(order.getStandardId()); + List<EamSecondMaintenanceOrderDetail> requestTableDetailList = new ArrayList<>(); + if (CollectionUtil.isNotEmpty(eamMaintenanceStandardDetailList)) { + eamMaintenanceStandardDetailList.forEach(item -> { + EamSecondMaintenanceOrderDetail detail = new EamSecondMaintenanceOrderDetail(); + BeanUtils.copyProperties(item, detail); + detail.setOrderId(order.getId()); + requestTableDetailList.add(detail); }); - secondMaintenanceOrderDetailService.saveBatch(request.getTableDetailList()); + secondMaintenanceOrderDetailService.saveBatch(requestTableDetailList); } - //鍒ゆ柇鏄惁瀛樺湪淇濆吇浜� 濡傛灉瀛樺湪鍒欏惎鍔ㄦ祦绋� - if (StringUtils.isNotBlank(order.getOperator())) { - //鍚姩娴佺▼ - flowCommonService.initActBusiness("宸ュ崟鍙�: " + order.getOrderNum() + ";璁惧缂栧彿: " + equipment.getEquipmentCode() + ";瀹夎浣嶇疆" + equipment.getInstallationPosition(), - order.getId(), "IEamSecondMaintenanceOrderService", "second_maintenance_process", null); - Map<String, Object> variables = new HashMap<>(); - variables.put("dataId", order.getId()); - if (StrUtil.isEmpty(order.getRemark())) { - variables.put("organization", "鏂板浜屼繚宸ュ崟榛樿鍚姩娴佺▼"); - variables.put("comment", "鏂板浜屼繚宸ュ崟榛樿鍚姩娴佺▼"); - } else { - variables.put("organization", order.getRemark()); - variables.put("comment", order.getRemark()); - } - variables.put("proofreading", true); - List<String> usernames = new ArrayList<>(); - usernames.add(order.getOperator()); - variables.put("NextAssignee", usernames); - Result result = flowDefinitionService.startProcessInstanceByKey("second_maintenance_process", variables); - if (result != null) { - //鏇存柊鍛ㄤ繚鐘舵�� - order.setMaintenanceStatus(SecondMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); - order.setActualStartTime(new Date()); - eamSecondMaintenanceOrderMapper.updateById(order); - //鏇存柊璁惧淇濆吇鐘舵�� - eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_SECOND_MAINTENANCE.name()); - return result.isSuccess(); - } - } - return true; } @@ -218,33 +203,9 @@ throw new JeecgBootException("鍙湁寰呬繚鍏荤姸鎬佺殑鏁版嵁鎵嶅彲缂栬緫锛�"); } entity.setMaintenanceDate(request.getMaintenanceDate()); - entity.setOperator(request.getOperator()); entity.setRemark(request.getRemark()); eamSecondMaintenanceOrderMapper.updateById(entity); - //澶勭悊璇︽儏 - if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { - List<EamSecondMaintenanceOrderDetail> addList = new ArrayList<>(); - List<EamSecondMaintenanceOrderDetail> updateList = new ArrayList<>(); - request.getTableDetailList().forEach(tableDetail -> { - tableDetail.setOrderId(entity.getId()); - if (tableDetail.getId() == null) { - addList.add(tableDetail); - } else { - updateList.add(tableDetail); - } - }); - if (CollectionUtil.isNotEmpty(addList)) { - secondMaintenanceOrderDetailService.saveBatch(addList); - } - if (CollectionUtil.isNotEmpty(updateList)) { - secondMaintenanceOrderDetailService.updateBatchById(updateList); - } - } - if (CollectionUtil.isNotEmpty(request.getRemoveDetailList())) { - List<String> ids = request.getRemoveDetailList().stream().map(EamSecondMaintenanceOrderDetail::getId).collect(Collectors.toList()); - secondMaintenanceOrderDetailService.removeBatchByIds(ids); - } //鍒ゆ柇鏄惁瀛樺湪淇濆吇浜� 濡傛灉瀛樺湪鍒欏惎鍔ㄦ祦绋� if (StringUtils.isNotBlank(entity.getOperator())) { //鍚姩娴佺▼ @@ -385,10 +346,6 @@ //璁剧疆entity entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.WAIT_CONFIRM.name()); entity.setActualEndTime(new Date()); - //澶勭悊璇︽儏 - if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { - secondMaintenanceOrderDetailService.updateBatchById(request.getTableDetailList()); - } //鏇存柊璁惧淇濆吇鐘舵�� eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.SECOND_MAINTENANCE_WAIT_CONFIRM.name()); break; @@ -399,33 +356,12 @@ } //鐝粍闀跨‘璁� userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); - values.put("dataId", entity.getId()); - values.put("organization", request.getConfirmComment()); - values.put("comment", request.getConfirmComment()); - values.put("NextAssignee", userApprovalList); - values.put("confirmation", request.getConfirmDealType()); - request.setComment(request.getConfirmComment()); //璁剧疆entity entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.WAIT_LEADER_CONFIRM.name()); entity.setConfirmTime(new Date()); - if (CommonConstant.HAS_CANCLE.equals(request.getConfirmDealType())) { - //椹冲洖 - userApprovalList = new ArrayList<>(); - userApprovalList.add(entity.getOperator()); - values.put("NextAssignee", userApprovalList); - entity.setMaintenanceStatus(WeekMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); - } - //澶勭悊鎶ヤ慨 - List<EamSecondMaintenanceOrderDetail> collect = request.getTableDetailList().stream().filter((detail) -> CommonConstant.DEFAULT_1.equals(detail.getReportFlag())).collect(Collectors.toList()); - if (CollectionUtil.isNotEmpty(collect)) { - eamReportRepairService.reportRepairFromSecondMaintenance(equipment.getId(), entity.getOperator(), collect); - } break; case WAIT_LEADER_CONFIRM: values.put("dataId", entity.getId()); - values.put("organization", request.getLeaderConfirmComment()); - values.put("comment", request.getLeaderConfirmComment()); - request.setComment(request.getLeaderConfirmComment()); //璁剧疆entity entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.COMPLETE.name()); //鏇存柊璁惧淇濆吇鐘舵�� diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java index fdff9fd..205dea0 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java @@ -9,13 +9,10 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.flowable.engine.TaskService; import org.flowable.task.api.Task; -import org.jeecg.common.api.vo.FileUploadResult; import org.jeecg.common.api.vo.Result; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.DataBaseConstant; @@ -45,7 +42,6 @@ import org.jeecg.modules.system.service.IBaseFactoryService; import org.jeecg.modules.system.service.IBaseFactoryUserService; import org.jeecg.modules.system.service.ISysUserService; -import org.jeecg.modules.system.vo.UserSelector; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -85,8 +81,6 @@ private IEamReportRepairService eamReportRepairService; @Autowired private IEamEquipmentExtendService eamEquipmentExtendService; - @Autowired - private IEamPrecisionCheckDetailService precisionCheckDetailService; @Resource private IBaseFactoryUserService baseFactoryUserService; @@ -175,44 +169,37 @@ //澶勭悊鏄庣粏鏁版嵁 if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { request.getTableDetailList().forEach(tableDetail -> { - tableDetail.setId(null); +// tableDetail.setId(null); tableDetail.setOrderId(order.getId()); }); thirdMaintenanceOrderDetailService.saveBatch(request.getTableDetailList()); } - //澶勭悊绮惧害鍙傛暟 - if (CollectionUtil.isNotEmpty(request.getPrecisionDetailList())) { - request.getPrecisionDetailList().forEach(tableDetail -> { - tableDetail.setId(null); - tableDetail.setOrderId(order.getId()); - }); - precisionCheckDetailService.saveBatch(request.getPrecisionDetailList()); - } + //鍒ゆ柇鏄惁瀛樺湪淇濆吇浜� 濡傛灉瀛樺湪鍒欏惎鍔ㄦ祦绋� - if (StringUtils.isNotBlank(order.getOperator())) { - //鍚姩娴佺▼ - flowCommonService.initActBusiness("宸ュ崟鍙�:" + order.getOrderNum() + ";璁惧缂栧彿: " + equipment.getEquipmentCode() + ";瀹夎浣嶇疆" + equipment.getInstallationPosition(), - order.getId(), "IEamThirdMaintenanceOrderService", "third_maintenance_process", null); - Map<String, Object> variables = new HashMap<>(); - variables.put("dataId", order.getId()); - if (StrUtil.isEmpty(order.getRemark())) { - variables.put("organization", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); - variables.put("comment", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); - } else { - variables.put("organization", order.getRemark()); - variables.put("comment", order.getRemark()); - } - variables.put("proofreading", true); - //骞惰浠诲姟浼氱 - variables.put("maintenance_execution", Collections.singletonList(request.getOperator())); -// variables.put("precision_check", Collections.singletonList(equipment.getEquipmentManager())); - Result result = flowDefinitionService.startProcessInstanceByKey("third_maintenance_process", variables); - if (result != null) { - //鏇存柊璁惧淇濆吇鐘舵�� - eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_THIRD_MAINTENANCE.name()); - return result.isSuccess(); - } - } +// if (StringUtils.isNotBlank(order.getOperator())) { +// //鍚姩娴佺▼ +// flowCommonService.initActBusiness("宸ュ崟鍙�:" + order.getOrderNum() + ";璁惧缂栧彿: " + equipment.getEquipmentCode() + ";瀹夎浣嶇疆" + equipment.getInstallationPosition(), +// order.getId(), "IEamThirdMaintenanceOrderService", "third_maintenance_process", null); +// Map<String, Object> variables = new HashMap<>(); +// variables.put("dataId", order.getId()); +// if (StrUtil.isEmpty(order.getRemark())) { +// variables.put("organization", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); +// variables.put("comment", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); +// } else { +// variables.put("organization", order.getRemark()); +// variables.put("comment", order.getRemark()); +// } +// variables.put("proofreading", true); +// //骞惰浠诲姟浼氱 +// variables.put("maintenance_execution", Collections.singletonList(request.getOperator())); +//// variables.put("precision_check", Collections.singletonList(equipment.getEquipmentManager())); +// Result result = flowDefinitionService.startProcessInstanceByKey("third_maintenance_process", variables); +// if (result != null) { +// //鏇存柊璁惧淇濆吇鐘舵�� +// eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_THIRD_MAINTENANCE.name()); +// return result.isSuccess(); +// } +// } return true; } @@ -318,8 +305,8 @@ flowCommonService.initActBusiness("宸ュ崟鍙�:" + entity.getOrderNum() + ";璁惧缂栧彿: " + equipment.getEquipmentCode() + ";瀹夎浣嶇疆" + equipment.getInstallationPosition(), entity.getId(), "IEamThirdMaintenanceOrderService", "third_maintenance_process", null); Map<String, Object> variables = new HashMap<>(); - boolean equipmentPrecisionFlag = precisionCheckDetailService.hasPrecisionCheckDetail(entity.getId()); - variables.put("equipmentPrecisionFlag", equipmentPrecisionFlag); +// boolean equipmentPrecisionFlag = precisionCheckDetailService.hasPrecisionCheckDetail(entity.getId()); +// variables.put("equipmentPrecisionFlag", equipmentPrecisionFlag); variables.put("dataId", entity.getId()); if (StrUtil.isEmpty(entity.getRemark())) { variables.put("organization", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); -- Gitblit v1.9.3