From 70aac257c014517e8118c7afdce59ec220b119ef Mon Sep 17 00:00:00 2001 From: shih <510524130@qq.com> Date: Mon, 23 Mar 2026 18:59:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=85=BB=E7=AE=A1=E7=90=86-=E4=BF=9D?= =?UTF-8?q?=E5=85=BB=E8=AE=A1=E5=88=92=E3=80=81=E4=BF=9D=E5=85=BB=E6=96=B9?= =?UTF-8?q?=E6=A1=88=E3=80=81=E4=BF=9D=E5=85=BB=E5=B7=A5=E5=8D=95=E3=80=81?= =?UTF-8?q?=E4=BF=9D=E5=85=BB=E8=AE=B0=E5=BD=95=E3=80=81=E4=BF=9D=E5=85=BB?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=9B=B8=E5=85=B3=E5=90=8E=E5=8F=B0=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/report/bygl/ByglByfaPlugin.java | 70 +++++++ .../example/report/bygl/ByglBygdBjPlugin.java | 176 ++++++++++++++++++ .../example/report/bygl/ByglBygdPlugin.java | 68 +++++++ .../example/report/bygl/ByglByjhLbPlugin.java | 43 +++++ .../example/report/bygl/ByglByjhPlugin.java | 70 +++++++ .../core/framework/entity/ByManagementGd.java | 114 ++++++++++++ .../core/framework/entity/ByManagementJl.java | 77 ++++++++ .../core/framework/entity/ByManagementYs.java | 68 +++++++ .../mapper/ByManagementGdMapper.java | 13 ++ .../mapper/ByManagementJlMapper.java | 13 ++ .../mapper/ByManagementYsMapper.java | 13 ++ .../core/framework/mapper/ByglByjhMapper.java | 23 +++ .../resources/mapper/bygl/ByglByjhMapper.xml | 50 +++++ .../common/constant/ByglConstant.java | 30 +++ 14 files changed, 828 insertions(+) create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByfaPlugin.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdBjPlugin.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdPlugin.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhLbPlugin.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhPlugin.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementGd.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementJl.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementYs.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementGdMapper.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementJlMapper.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementYsMapper.java create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByjhMapper.java create mode 100644 lidee-core/src/main/resources/mapper/bygl/ByglByjhMapper.xml create mode 100644 lidee-tool/tool-common/src/main/java/com/lideeyunji/tool/framework/common/constant/ByglConstant.java diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByfaPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByfaPlugin.java new file mode 100644 index 0000000..58c3795 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByfaPlugin.java @@ -0,0 +1,70 @@ + +package com.lideeyunji.core.framework.enhance.example.report.bygl; + +import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext; +import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin; +import com.lideeyunji.core.framework.mapper.ByglByjhMapper; +import com.lideeyunji.core.framework.utils.Func; +import com.lideeyunji.tool.framework.common.constant.ByglConstant; +import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; + +/** + * 保养管理-保养方案 + */ +@Slf4j +@Component("byglByfaPlugin") +public class ByglByfaPlugin implements AroundAdvicePlugin { + + private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); + + private static final String SCHEME_ID_PREFIX = "FA"; + + @Autowired + private ByglByjhMapper byglByjhMapper; + + @Override + public void beforeExecute(EnhanceContext enhanceContext) { + Map params = enhanceContext.getParam().getParams(); + //新增方法默认状态字段(1启用) + params.put("state", ByglConstant.FA_STATE_QY); + // 获取并验证scheme_id + String scheme_id = lideeYunJiUtils.getMap2Str(params, "scheme_id"); + boolean needGenerateNewId = shouldGenerateNewSchemeId(scheme_id); + if(needGenerateNewId){ + String newSchemeId = generateSchemeId(); + params.put("scheme_id", newSchemeId); + log.info("生成新方案ID: {}", newSchemeId); + } + } + + @Override + public void afterExecute(EnhanceContext enhanceContext) { + + } + + /** + * 判断是否需要生成新的方案ID + */ + private boolean shouldGenerateNewSchemeId(String scheme_id) { + if(StringUtils.isBlank(scheme_id)){ + return true; + } + Map existingScheme = byglByjhMapper.getSchemeBySchemeId(scheme_id); + return Func.isNotEmpty(existingScheme); + } + /** + * 生成方案ID + * 格式:FA + 时间戳(yyyyMMddHHmmss) + */ + private String generateSchemeId() { + return SCHEME_ID_PREFIX + LocalDateTime.now().format(DATE_TIME_FORMATTER); + } +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdBjPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdBjPlugin.java new file mode 100644 index 0000000..1f25552 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdBjPlugin.java @@ -0,0 +1,176 @@ +package com.lideeyunji.core.framework.enhance.example.report.bygl; + +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; +import com.lideeyunji.core.framework.adapter.FrameWorkAdapter; +import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext; +import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin; +import com.lideeyunji.core.framework.entity.ByManagementGd; +import com.lideeyunji.core.framework.entity.ByManagementJl; +import com.lideeyunji.core.framework.entity.ByManagementYs; +import com.lideeyunji.core.framework.mapper.ByManagementGdMapper; +import com.lideeyunji.core.framework.mapper.ByManagementJlMapper; +import com.lideeyunji.core.framework.mapper.ByManagementYsMapper; +import com.lideeyunji.core.framework.mapper.ByglByjhMapper; +import com.lideeyunji.tool.framework.common.constant.ByglConstant; +import com.lideeyunji.tool.framework.common.util.object.BeanUtils; +import com.lideeyunji.tool.framework.yunji.tool.spring.SpringUtils; +import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.util.Map; + +/** + * 保养管理-保养工单编辑 + */ +@Slf4j +@Component("byglBygdBjPlugin") +public class ByglBygdBjPlugin implements AroundAdvicePlugin { + + /** + * 操作类型常量 + */ + private static final String SUBMIT_TYPE_CL = "cl"; + private static final String SUBMIT_TYPE_YS = "ys"; + + /** + * 状态常量 + */ + private static final int NOT_DELETED = 0; + + @Autowired + private ByglByjhMapper byglByjhMapper; + + @Autowired + private ByManagementJlMapper byManagementJlMapper; + + @Autowired + private ByManagementYsMapper byManagementYsMapper; + + @Autowired + private ByManagementGdMapper byManagementGdMapper; + + @Override + public void beforeExecute(EnhanceContext enhanceContext) { + Map params = enhanceContext.getParam().getParams(); + String submit_type = lideeYunJiUtils.getMap2Str(params, "submit_type"); + log.info("开始处理工单操作,submit_type: {}", submit_type); + if(StringUtils.isBlank(submit_type)){ + log.info("submit_type为空,跳过处理"); + return; + } + String id = lideeYunJiUtils.getMap2Str(params, "id"); + validateParams(id, submit_type); + FrameWorkAdapter adapter = SpringUtils.getBean(FrameWorkAdapter.class); + + switch (submit_type) { + case SUBMIT_TYPE_CL://处理操作 + handleClOperation(id, params, adapter); + break; + case SUBMIT_TYPE_YS://验收操作 + handleYsOperation(id, params, adapter); + break; + } + } + + @Override + public void afterExecute(EnhanceContext enhanceContext) { + + } + + + /** + * 验收操作 + */ + private void handleYsOperation(String id, Map params, FrameWorkAdapter adapter) { + String gdys_yj = lideeYunJiUtils.getMap2Str(params, "gdys_yj"); + String pjxj = lideeYunJiUtils.getMap2Str(params, "pjxj"); + + ByManagementJl jl = byManagementJlMapper.selectById(id); + + jl.setYsTime(DateUtil.now()); + jl.setPjxj(pjxj); + jl.setState(ByglConstant.YSZT_STATE_YYS); + jl.setGdysYj(gdys_yj); + jl.setUpdateTime(LocalDateTime.now()); + jl.setUpdateUser(adapter.getOnlineUserId()); + + byManagementJlMapper.updateById(jl); + + ByManagementYs ys = BeanUtils.toBean(jl, ByManagementYs.class); + if(ys == null){ + throw new RuntimeException("对象转换失败"); + } + byManagementYsMapper.updateById(ys); + + log.info("工单验收成功,ID: {}", id); + } + + + /** + * 处理操作 + */ + private void handleClOperation(String id, Map params, FrameWorkAdapter adapter) { + String bygd_cljg = lideeYunJiUtils.getMap2Str(params, "bygd_cljg"); + + int result = byglByjhMapper.updateClBygd(id, bygd_cljg, ByglConstant.BY_STATE_YWC); + + if (result <= 0) { + log.info("工单处理失败,ID: {}", id); + return; + } + ByManagementGd gd = byManagementGdMapper.selectById(id); + ByManagementJl jl = createByManagementJl(gd, adapter); + byManagementJlMapper.insert(jl); + syncToYsTable(jl); + + log.info("工单处理成功,ID: {}", id); + } + + /** + * 创建保养记录 + */ + private ByManagementJl createByManagementJl(ByManagementGd gd, FrameWorkAdapter adapter) { + ByManagementJl jl = new ByManagementJl(); + jl.setId(IdWorker.getId()); + jl.setOrderId(gd.getOrderId()); + jl.setOrderName(gd.getOrderName()); + jl.setEquipmentInfo(gd.getEquipmentInfo()); + jl.setUpkeepLevel(gd.getUpkeepLevel()); + jl.setUpkeepTime(gd.getUpkeepTime()); + jl.setPriority(gd.getPriority()); + jl.setState(ByglConstant.YSZT_STATE_DYS); + jl.setExecutor(gd.getExecutor()); + jl.setCreateTime(LocalDateTime.now()); + jl.setCreateUser(adapter.getOnlineUserId()); + jl.setIsDeleted(NOT_DELETED); + return jl; + } + + /** + * 同步到验收表 + */ + private void syncToYsTable(ByManagementJl jl) { + ByManagementYs ys = BeanUtils.toBean(jl, ByManagementYs.class); + if(ys == null){ + throw new RuntimeException("对象转换失败"); + } + byManagementYsMapper.insert(ys); + } + + /** + * 参数校验 + */ + private void validateParams(String id, String submit_type) { + if(StringUtils.isBlank(id)){ + throw new IllegalArgumentException("工单ID不能为空"); + } + if(!SUBMIT_TYPE_CL.equals(submit_type) && !SUBMIT_TYPE_YS.equals(submit_type)){ + throw new IllegalArgumentException("不支持的操作类型: " + submit_type); + } + } +} \ No newline at end of file diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdPlugin.java new file mode 100644 index 0000000..4203533 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglBygdPlugin.java @@ -0,0 +1,68 @@ + +package com.lideeyunji.core.framework.enhance.example.report.bygl; + +import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext; +import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin; +import com.lideeyunji.core.framework.mapper.ByglByjhMapper; +import com.lideeyunji.core.framework.utils.Func; +import com.lideeyunji.tool.framework.common.constant.ByglConstant; +import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; + +/** + * 保养管理-保养工单 + */ +@Slf4j +@Component("byglBygdPlugin") +public class ByglBygdPlugin implements AroundAdvicePlugin { + + private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); + + private static final String ORDER_ID_PREFIX = "GD"; + + @Autowired + private ByglByjhMapper byglByjhMapper; + + @Override + public void beforeExecute(EnhanceContext enhanceContext) { + Map params = enhanceContext.getParam().getParams(); + //新增方法默认状态字段 + params.put("order_state",ByglConstant.GD_STATE_DKS); + String order_id = lideeYunJiUtils.getMap2Str(params, "order_id"); + boolean needGenerateNewId = shouldGenerateNewOrderId(order_id); + if(needGenerateNewId){ + String newOrderId = generateOrderId(); + params.put("order_id",newOrderId); + log.info("生成新工单ID: {}", newOrderId); + } + } + + @Override + public void afterExecute(EnhanceContext enhanceContext) { + + } + /** + * 判断是否需要生成新的工单ID + */ + private boolean shouldGenerateNewOrderId(String order_id) { + if(StringUtils.isBlank(order_id)){ + return true; + } + Map existingOrder = byglByjhMapper.getOrderByPlanId(order_id); + return Func.isNotEmpty(existingOrder); + } + /** + * 生成工单ID + * 格式:GD + 时间戳(yyyyMMddHHmmss) + */ + private String generateOrderId() { + return ORDER_ID_PREFIX + LocalDateTime.now().format(DATE_TIME_FORMATTER); + } +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhLbPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhLbPlugin.java new file mode 100644 index 0000000..16ea1ca --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhLbPlugin.java @@ -0,0 +1,43 @@ +package com.lideeyunji.core.framework.enhance.example.report.bygl; + +import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext; +import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin; +import com.lideeyunji.core.framework.mapper.ByglByjhMapper; +import com.lideeyunji.core.framework.utils.Func; +import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; + +/** + * 保养管理-保养计划-列表 + */ +@Slf4j +@Component("byglByjlLbPlugin") +public class ByglByjhLbPlugin implements AroundAdvicePlugin { + + @Autowired + private ByglByjhMapper byglByjhMapper; + + @Override + public void beforeExecute(EnhanceContext enhanceContext) { + + } + + @Override + public void afterExecute(EnhanceContext enhanceContext) { + List> records = enhanceContext.getResult().getRecords(); + if (Func.isEmpty(records)) { + return; + } + for (Map record : records) { + String plan_id = lideeYunJiUtils.getMap2Str(record, "plan_id"); + Map countByPlanId = byglByjhMapper.getCountByPlanId(plan_id); + record.put("plan_count",lideeYunJiUtils.getMap2Long(countByPlanId,"jhs")); + record.put("completed_count",lideeYunJiUtils.getMap2Long(countByPlanId,"wcs")); + } + } +} \ No newline at end of file diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhPlugin.java new file mode 100644 index 0000000..759a7ee --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/bygl/ByglByjhPlugin.java @@ -0,0 +1,70 @@ + +package com.lideeyunji.core.framework.enhance.example.report.bygl; + +import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext; +import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin; +import com.lideeyunji.core.framework.mapper.ByglByjhMapper; +import com.lideeyunji.core.framework.utils.Func; +import com.lideeyunji.tool.framework.common.constant.ByglConstant; +import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; + +/** + * 保养管理-保养计划-新增 + */ +@Slf4j +@Component("byglByjhPlugin") +public class ByglByjhPlugin implements AroundAdvicePlugin { + + private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); + + private static final String PLAN_ID_PREFIX = "BYJH"; + + @Autowired + private ByglByjhMapper byglByjhMapper; + + @Override + public void beforeExecute(EnhanceContext enhanceContext) { + Map params = enhanceContext.getParam().getParams(); + //新增方法默认状态字段 + params.put("plan_state", ByglConstant.JH_STATE_JXZ); + String plan_id = lideeYunJiUtils.getMap2Str(params, "plan_id"); + boolean needGenerateNewId = shouldGenerateNewPlanId(plan_id); + if(needGenerateNewId){ + String newPlanId = generatePlanId(); + params.put("plan_id",newPlanId); + log.info("生成新计划ID: {}", newPlanId); + } + } + + @Override + public void afterExecute(EnhanceContext enhanceContext) { + + } + + /** + * 判断是否需要生成新的计划ID + */ + private boolean shouldGenerateNewPlanId(String plan_id) { + if(StringUtils.isBlank(plan_id)){ + return true; + } + Map existingPlan = byglByjhMapper.getPlanByPlanId(plan_id); + return Func.isNotEmpty(existingPlan); + } + /** + * 生成计划ID + * 格式:BYJH + 时间戳(yyyyMMddHHmmss) + */ + private String generatePlanId() { + return PLAN_ID_PREFIX + LocalDateTime.now().format(DATE_TIME_FORMATTER); + } + +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementGd.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementGd.java new file mode 100644 index 0000000..006d690 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementGd.java @@ -0,0 +1,114 @@ + +package com.lideeyunji.core.framework.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 保养管理-保养工单 + */ +@TableName("by_management_gd") +@Data +@EqualsAndHashCode +public class ByManagementGd extends BaseTenantEntity { + /** + * ID + */ + private Long id; + + /** + * 工单编号 + */ + private String orderId; + + /** + * 工单名称 + */ + private String orderName; + + /** + * 设备类型 + */ + private String deviceTypeName; + + /** + *设备 + */ + private String equipmentInfo; + + /** + *设备编号 + */ + private String equipmentCode; + + /** + *保养级别 + */ + private String upkeepLevel; + + + /** + *优先级 + */ + private String priority; + + /** + *可能更换零件 + */ + private String possibleReplacements; + + /** + *计划保养时间 + */ + private String planUpkeepTime; + + /** + *是否申请备件 + */ + private String applyForParts; + + /** + *是否已停机 + */ + private String isStopped; + + + /** + *执行人 + */ + private String executor; + + /** + *状态 + */ + private String orderState; + + /** + * 备注 + */ + private String remark; + + /** + * 完成时间 + */ + private String upkeepTime; + + /** + * 保养方案 + */ + private String schemeId; + + /** + * 处理结果 + */ + private String bygdCljg; + + /** + * 计划id + */ + private String planId; + +} + diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementJl.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementJl.java new file mode 100644 index 0000000..fe65454 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementJl.java @@ -0,0 +1,77 @@ + +package com.lideeyunji.core.framework.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 保养管理-保养记录 + */ +@TableName("by_management_jl") +@Data +@EqualsAndHashCode +public class ByManagementJl extends BaseTenantEntity { + /** + * ID + */ + private Long id; + + /** + * 工单编号 + */ + private String orderId; + + /** + * 工单名称 + */ + private String orderName; + + /** + *设备 + */ + private String equipmentInfo; + + /** + *优先级 + */ + private String priority; + + /** + *保养级别 + */ + private String upkeepLevel; + + /** + *完成时间 + */ + private String upkeepTime; + + /** + *状态 + */ + private String state; + + /** + *执行人 + */ + private String executor; + + /** + *验收时间 + */ + private String ysTime; + + /** + *评价星级 + */ + private String pjxj; + + /** + *验收意见 + */ + private String gdysYj; + +} + diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementYs.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementYs.java new file mode 100644 index 0000000..781c88f --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/ByManagementYs.java @@ -0,0 +1,68 @@ + +package com.lideeyunji.core.framework.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 保养管理-保养验收 + */ +@TableName("by_management_ys") +@Data +@EqualsAndHashCode +public class ByManagementYs extends BaseTenantEntity { + + /** + * ID + */ + private Long id; + + /** + * 工单编号 + */ + private String orderId; + + /** + * 工单名称 + */ + private String orderName; + + /** + *设备 + */ + private String equipmentInfo; + + /** + *优先级 + */ + private String priority; + + /** + *保养级别 + */ + private String upkeepLevel; + + /** + *完成时间 + */ + private String upkeepTime; + + /** + *状态 + */ + private String state; + + /** + *执行人 + */ + private String executor; + + /** + *验收时间 + */ + private String ysTime; + +} + diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementGdMapper.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementGdMapper.java new file mode 100644 index 0000000..190c5a8 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementGdMapper.java @@ -0,0 +1,13 @@ +package com.lideeyunji.core.framework.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lideeyunji.core.framework.entity.ByManagementGd; + +/** + * 保养管理-保养工单Mapper接口 + * + * @date 2026-03-20 + */ +public interface ByManagementGdMapper extends BaseMapper { + +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementJlMapper.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementJlMapper.java new file mode 100644 index 0000000..36b7434 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementJlMapper.java @@ -0,0 +1,13 @@ +package com.lideeyunji.core.framework.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lideeyunji.core.framework.entity.ByManagementJl; + +/** + * 保养管理-保养记录Mapper接口 + * + * @date 2026-03-20 + */ +public interface ByManagementJlMapper extends BaseMapper { + +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementYsMapper.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementYsMapper.java new file mode 100644 index 0000000..2597af1 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByManagementYsMapper.java @@ -0,0 +1,13 @@ +package com.lideeyunji.core.framework.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lideeyunji.core.framework.entity.ByManagementYs; + +/** + * 保养管理-保养验收Mapper接口 + * + * @date 2026-03-20 + */ +public interface ByManagementYsMapper extends BaseMapper { + +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByjhMapper.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByjhMapper.java new file mode 100644 index 0000000..6661600 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/mapper/ByglByjhMapper.java @@ -0,0 +1,23 @@ + +package com.lideeyunji.core.framework.mapper; + +import com.baomidou.dynamic.datasource.annotation.Master; + +import java.util.Map; + +/** + * + */ +@Master +public interface ByglByjhMapper{ + + Map getCountByPlanId(String plan_id); + + Map getPlanByPlanId(String plan_id); + + Map getOrderByPlanId(String order_id); + + Map getSchemeBySchemeId(String scheme_id); + + int updateClBygd(String id, String bygd_cljg, String order_state); +} diff --git a/lidee-core/src/main/resources/mapper/bygl/ByglByjhMapper.xml b/lidee-core/src/main/resources/mapper/bygl/ByglByjhMapper.xml new file mode 100644 index 0000000..0307378 --- /dev/null +++ b/lidee-core/src/main/resources/mapper/bygl/ByglByjhMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + update by_management_gd set bygd_cljg = #{bygd_cljg}, order_state = #{order_state}, upkeep_time = DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%s') where id = #{id} + + diff --git a/lidee-tool/tool-common/src/main/java/com/lideeyunji/tool/framework/common/constant/ByglConstant.java b/lidee-tool/tool-common/src/main/java/com/lideeyunji/tool/framework/common/constant/ByglConstant.java new file mode 100644 index 0000000..c7d2cf1 --- /dev/null +++ b/lidee-tool/tool-common/src/main/java/com/lideeyunji/tool/framework/common/constant/ByglConstant.java @@ -0,0 +1,30 @@ + +package com.lideeyunji.tool.framework.common.constant; + +/** + * 保养管理 + */ +public interface ByglConstant { + + /**进行中*/ + String JH_STATE_JXZ = "0"; + /**已完成*/ + String JH_STATE_YWC = "1"; + + /**待开始*/ + String GD_STATE_DKS = "0"; + /**已完成*/ + String BY_STATE_YWC = "1"; + + /**方案停用*/ + String FA_STATE_TY = "0"; + /**方案启用*/ + String FA_STATE_QY = "1"; + + /**待验收*/ + String YSZT_STATE_DYS = "0"; + /**已验收*/ + String YSZT_STATE_YYS = "1"; + + +}