From 0d06048c5d560e301bf17fad476975c8ffffcb56 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期五, 05 九月 2025 16:07:31 +0800 Subject: [PATCH] 添加三级保养工作计划单生成规则 --- lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceChange.java | 71 +++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 1 deletions(-) diff --git a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceChange.java b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceChange.java index 28b0887..79f98c8 100644 --- a/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceChange.java +++ b/lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamThirdMaintenanceChange.java @@ -1,5 +1,8 @@ package org.jeecg.modules.eam.entity; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.FieldStrategy; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; @@ -8,6 +11,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; +import org.apache.ibatis.type.JdbcType; import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.system.base.entity.JeecgEntity; import org.jeecgframework.poi.excel.annotation.Excel; @@ -37,6 +41,18 @@ @Excel(name = "鍒犻櫎鏍囪", width = 15) @ApiModelProperty(value = "鍒犻櫎鏍囪") private Integer delFlag; + /** + * 澶囨敞 + */ + @Excel(name = "澶囨敞", width = 15) + @ApiModelProperty(value = "澶囨敞") + private String remark; + /** + * 璁惧ID + */ + @Excel(name = "璁惧ID", width = 15) + @ApiModelProperty(value = "璁惧ID") + private String equipmentId; /** * 涓変繚宸ュ崟ID */ @@ -106,7 +122,8 @@ @Excel(name = "寤惰繜淇濆吇鏃ユ湡", width = 20, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date deferredMaintenanceDate; + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String deferredMaintenanceDate; /** * 涓荤棰嗗绛惧瓧 */ @@ -196,4 +213,56 @@ private String equipmentName; @TableField(exist = false) private String equipmentModel; + + /** + * 鍏徃 + */ + @ApiModelProperty(value = "鍏徃") + @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code") + @TableField(exist = false) + private transient String gsfactoryOrgCode; + + /** + * 涓績 + */ + @ApiModelProperty(value = "涓績") + @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code") + @TableField(exist = false) + private transient String zxfactoryOrgCode; + + /** + * 宸ュ尯 + */ + @ApiModelProperty(value = "宸ュ尯") + @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code") + @TableField(exist = false) + private transient String gqfactoryOrgCode; + + /** + * 宸ユ + */ + @ApiModelProperty(value = "涓績/宸ュ尯/宸ユ") + @Dict(dictTable = "eam_base_factory",dicText = "factory_name",dicCode = "org_code") + @TableField(exist = false) + private String factoryCode; + + public void setFactoryCode(String factoryCode){ + this.factoryCode = factoryCode; + if(StrUtil.isNotEmpty(factoryCode)){ + if(factoryCode.length()==12){ + this.factoryCode = factoryCode.substring(0,9); + this.zxfactoryOrgCode = factoryCode.substring(0,6); + this.gsfactoryOrgCode = factoryCode.substring(0,3); + } + + if(factoryCode.length()==9){ + this.zxfactoryOrgCode = factoryCode.substring(0,6); + this.gsfactoryOrgCode = factoryCode.substring(0,3); + } + + if(factoryCode.length()==6){ + this.gsfactoryOrgCode = factoryCode.substring(0,3); + } + } + } } -- Gitblit v1.9.3