提交 602ddbc0 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 部署微服务接口

上级 b3d8553e
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-app-assetmanagement.jar
EXPOSE 10325
EXPOSE 8080
ADD assetmanagement-app-assetmanagement.jar /assetmanagement-app-assetmanagement.jar
......@@ -3,25 +3,9 @@ services:
assetmanagement-app-assetmanagement:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest
ports:
- "10325:10325"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10325
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -35,14 +35,34 @@ zuul:
path: /eamassetstatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamapplytype:
path: /eamapplytypes/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamproduct:
path: /eamproducts/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamsparepartspro:
path: /eamsparepartspros/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamapplystatemodelline:
path: /eamapplystatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamsparepartsgroup:
path: /eamsparepartsgroups/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamlocationstatemodelline:
path: /eamlocationstatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamassetpartsgroup:
path: /eamassetpartsgroups/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamasset:
path: /eamassets/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
......
package cn.ibizlab.assetmanagement.core.apply.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApply;
import cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin;
import java.util.List;
@Mapper(componentModel = "spring", uses = {})
public interface EAMApplyInheritMapping {
@Mappings({
@Mapping(source ="eamapplyid",target = "wooriginid"),
@Mapping(source ="eamapplyname",target = "wooriginname"),
@Mapping(target ="focusNull",ignore = true),
})
WOOrigin toWoorigin(EAMApply eamapply);
@Mappings({
@Mapping(source ="wooriginid" ,target = "eamapplyid"),
@Mapping(source ="wooriginname" ,target = "eamapplyname"),
@Mapping(target ="focusNull",ignore = true),
})
EAMApply toEamapply(WOOrigin woorigin);
List<WOOrigin> toWoorigin(List<EAMApply> eamapply);
List<EAMApply> toEamapply(List<WOOrigin> woorigin);
}
......@@ -60,6 +60,7 @@ public class EAMApplyServiceImpl extends ServiceImpl<EAMApplyMapper, EAMApply> i
@Override
@Transactional
public boolean create(EAMApply et) {
createIndexMajorEntityData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamapplyid()),et);
......@@ -74,6 +75,7 @@ public class EAMApplyServiceImpl extends ServiceImpl<EAMApplyMapper, EAMApply> i
@Override
@Transactional
public boolean update(EAMApply et) {
wooriginService.update(eamapplyInheritMapping.toWoorigin(et));
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamapplyid",et.getEamapplyid())))
return false;
CachedBeanCopier.copy(get(et.getEamapplyid()),et);
......@@ -88,6 +90,7 @@ public class EAMApplyServiceImpl extends ServiceImpl<EAMApplyMapper, EAMApply> i
@Override
@Transactional
public boolean remove(String key) {
wooriginService.remove(key);
boolean result=removeById(key);
return result ;
}
......@@ -194,6 +197,23 @@ public class EAMApplyServiceImpl extends ServiceImpl<EAMApplyMapper, EAMApply> i
@Autowired
cn.ibizlab.assetmanagement.core.apply.mapping.EAMApplyInheritMapping eamapplyInheritMapping;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.workorder.service.IWOOriginService wooriginService;
/**
* 创建索引主实体数据
* @param et
*/
private void createIndexMajorEntityData(EAMApply et){
if(ObjectUtils.isEmpty(et.getEamapplyid()))
et.setEamapplyid((String)et.getDefaultKey(true));
cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin woorigin =eamapplyInheritMapping.toWoorigin(et);
woorigin.set("woorigintype","APPLY");
wooriginService.create(woorigin);
}
@Override
public List<JSONObject> select(String sql, Map param){
......
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[资产备件包]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMASSETPARTSGROUP",resultMap = "EAMAssetPartsGroupResultMap")
public class EAMAssetPartsGroup extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 资产类型标识
*/
@TableField(value = "eamassettypeid")
@JSONField(name = "eamassettypeid")
@JsonProperty("eamassettypeid")
private String eamassettypeid;
/**
* 备件包标识
*/
@TableField(value = "eamsparepartsgroupid")
@JSONField(name = "eamsparepartsgroupid")
@JsonProperty("eamsparepartsgroupid")
private String eamsparepartsgroupid;
/**
* 资产备件包标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamassetpartsgroupid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamassetpartsgroupid")
@JsonProperty("eamassetpartsgroupid")
private String eamassetpartsgroupid;
/**
* 资产备件包名称
*/
@TableField(value = "eamassetpartsgroupname")
@JSONField(name = "eamassetpartsgroupname")
@JsonProperty("eamassetpartsgroupname")
private String eamassetpartsgroupname;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 备件包
*/
@TableField(exist = false)
@JSONField(name = "eamsparepartsgroupname")
@JsonProperty("eamsparepartsgroupname")
private String eamsparepartsgroupname;
/**
* 资产类型
*/
@TableField(exist = false)
@JSONField(name = "eamassettypename")
@JsonProperty("eamassettypename")
private String eamassettypename;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetType eamassettype;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup eamsparepartsgroup;
/**
* 设置 [资产类型标识]
*/
public void setEamassettypeid(String eamassettypeid){
this.eamassettypeid = eamassettypeid ;
this.modify("eamassettypeid",eamassettypeid);
}
/**
* 设置 [备件包标识]
*/
public void setEamsparepartsgroupid(String eamsparepartsgroupid){
this.eamsparepartsgroupid = eamsparepartsgroupid ;
this.modify("eamsparepartsgroupid",eamsparepartsgroupid);
}
/**
* 设置 [资产备件包名称]
*/
public void setEamassetpartsgroupname(String eamassetpartsgroupname){
this.eamassetpartsgroupname = eamassetpartsgroupname ;
this.modify("eamassetpartsgroupname",eamassetpartsgroupname);
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[产品]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "PRODUCT",resultMap = "EAMPRODUCTResultMap")
public class EAMPRODUCT extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 产品标识
*/
@DEField(isKeyField=true)
@TableId(value= "productid",type=IdType.ASSIGN_UUID)
@JSONField(name = "productid")
@JsonProperty("productid")
private String productid;
/**
* 产品名称
*/
@TableField(value = "productname")
@JSONField(name = "productname")
@JsonProperty("productname")
private String productname;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 产品编号
*/
@TableField(value = "productnumber")
@JSONField(name = "productnumber")
@JsonProperty("productnumber")
private String productnumber;
/**
* 设置 [产品名称]
*/
public void setProductname(String productname){
this.productname = productname ;
this.modify("productname",productname);
}
/**
* 设置 [产品编号]
*/
public void setProductnumber(String productnumber){
this.productnumber = productnumber ;
this.modify("productnumber",productnumber);
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[备件包]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMSPAREPARTSGROUP",resultMap = "EAMSparePartsGroupResultMap")
public class EAMSparePartsGroup extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 备件包标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamsparepartsgroupid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamsparepartsgroupid")
@JsonProperty("eamsparepartsgroupid")
private String eamsparepartsgroupid;
/**
* 备件包名称
*/
@TableField(value = "eamsparepartsgroupname")
@JSONField(name = "eamsparepartsgroupname")
@JsonProperty("eamsparepartsgroupname")
private String eamsparepartsgroupname;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 备件包编号
*/
@TableField(value = "sparepartsgrpnumber")
@JSONField(name = "sparepartsgrpnumber")
@JsonProperty("sparepartsgrpnumber")
private String sparepartsgrpnumber;
/**
* 设置 [备件包名称]
*/
public void setEamsparepartsgroupname(String eamsparepartsgroupname){
this.eamsparepartsgroupname = eamsparepartsgroupname ;
this.modify("eamsparepartsgroupname",eamsparepartsgroupname);
}
/**
* 设置 [备件包编号]
*/
public void setSparepartsgrpnumber(String sparepartsgrpnumber){
this.sparepartsgrpnumber = sparepartsgrpnumber ;
this.modify("sparepartsgrpnumber",sparepartsgrpnumber);
}
}
package cn.ibizlab.assetmanagement.core.asset.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[备件包物料]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMSPAREPARTSPRO",resultMap = "EAMSparePartsPROResultMap")
public class EAMSparePartsPRO extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 备件包标识
*/
@TableField(value = "eamsparepartsgroupid")
@JSONField(name = "eamsparepartsgroupid")
@JsonProperty("eamsparepartsgroupid")
private String eamsparepartsgroupid;
/**
* 产品标识
*/
@TableField(value = "productid")
@JSONField(name = "productid")
@JsonProperty("productid")
private String productid;
/**
* 备件包物料标识
*/
@DEField(isKeyField=true)
@TableId(value= "eamsparepartsproid",type=IdType.ASSIGN_UUID)
@JSONField(name = "eamsparepartsproid")
@JsonProperty("eamsparepartsproid")
private String eamsparepartsproid;
/**
* 备件包物料名称
*/
@TableField(value = "eamsparepartsproname")
@JSONField(name = "eamsparepartsproname")
@JsonProperty("eamsparepartsproname")
private String eamsparepartsproname;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 备件包
*/
@TableField(exist = false)
@JSONField(name = "eamsparepartsgroupname")
@JsonProperty("eamsparepartsgroupname")
private String eamsparepartsgroupname;
/**
* 产品
*/
@TableField(exist = false)
@JSONField(name = "productname")
@JsonProperty("productname")
private String productname;
/**
* 产品编号
*/
@TableField(exist = false)
@JSONField(name = "productnumber")
@JsonProperty("productnumber")
private String productnumber;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT product;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup eamsparepartsgroup;
/**
* 设置 [备件包标识]
*/
public void setEamsparepartsgroupid(String eamsparepartsgroupid){
this.eamsparepartsgroupid = eamsparepartsgroupid ;
this.modify("eamsparepartsgroupid",eamsparepartsgroupid);
}
/**
* 设置 [产品标识]
*/
public void setProductid(String productid){
this.productid = productid ;
this.modify("productid",productid);
}
/**
* 设置 [备件包物料名称]
*/
public void setEamsparepartsproname(String eamsparepartsproname){
this.eamsparepartsproname = eamsparepartsproname ;
this.modify("eamsparepartsproname",eamsparepartsproname);
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetPartsGroup;
/**
* 关系型数据实体[EAMAssetPartsGroup] 查询条件对象
*/
@Slf4j
@Data
public class EAMAssetPartsGroupSearchContext extends QueryWrapperContext<EAMAssetPartsGroup> {
private String n_eamassettypeid_eq;//[资产类型标识]
public void setN_eamassettypeid_eq(String n_eamassettypeid_eq) {
this.n_eamassettypeid_eq = n_eamassettypeid_eq;
if(!ObjectUtils.isEmpty(this.n_eamassettypeid_eq)){
this.getSearchCond().eq("eamassettypeid", n_eamassettypeid_eq);
}
}
private String n_eamsparepartsgroupid_eq;//[备件包标识]
public void setN_eamsparepartsgroupid_eq(String n_eamsparepartsgroupid_eq) {
this.n_eamsparepartsgroupid_eq = n_eamsparepartsgroupid_eq;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsgroupid_eq)){
this.getSearchCond().eq("eamsparepartsgroupid", n_eamsparepartsgroupid_eq);
}
}
private String n_eamassetpartsgroupname_like;//[资产备件包名称]
public void setN_eamassetpartsgroupname_like(String n_eamassetpartsgroupname_like) {
this.n_eamassetpartsgroupname_like = n_eamassetpartsgroupname_like;
if(!ObjectUtils.isEmpty(this.n_eamassetpartsgroupname_like)){
this.getSearchCond().like("eamassetpartsgroupname", n_eamassetpartsgroupname_like);
}
}
private String n_eamsparepartsgroupname_eq;//[备件包]
public void setN_eamsparepartsgroupname_eq(String n_eamsparepartsgroupname_eq) {
this.n_eamsparepartsgroupname_eq = n_eamsparepartsgroupname_eq;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsgroupname_eq)){
this.getSearchCond().eq("eamsparepartsgroupname", n_eamsparepartsgroupname_eq);
}
}
private String n_eamsparepartsgroupname_like;//[备件包]
public void setN_eamsparepartsgroupname_like(String n_eamsparepartsgroupname_like) {
this.n_eamsparepartsgroupname_like = n_eamsparepartsgroupname_like;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsgroupname_like)){
this.getSearchCond().like("eamsparepartsgroupname", n_eamsparepartsgroupname_like);
}
}
private String n_eamassettypename_eq;//[资产类型]
public void setN_eamassettypename_eq(String n_eamassettypename_eq) {
this.n_eamassettypename_eq = n_eamassettypename_eq;
if(!ObjectUtils.isEmpty(this.n_eamassettypename_eq)){
this.getSearchCond().eq("eamassettypename", n_eamassettypename_eq);
}
}
private String n_eamassettypename_like;//[资产类型]
public void setN_eamassettypename_like(String n_eamassettypename_like) {
this.n_eamassettypename_like = n_eamassettypename_like;
if(!ObjectUtils.isEmpty(this.n_eamassettypename_like)){
this.getSearchCond().like("eamassettypename", n_eamassettypename_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamassetpartsgroupname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT;
/**
* 关系型数据实体[EAMPRODUCT] 查询条件对象
*/
@Slf4j
@Data
public class EAMPRODUCTSearchContext extends QueryWrapperContext<EAMPRODUCT> {
private String n_productname_like;//[产品名称]
public void setN_productname_like(String n_productname_like) {
this.n_productname_like = n_productname_like;
if(!ObjectUtils.isEmpty(this.n_productname_like)){
this.getSearchCond().like("productname", n_productname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("productname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup;
/**
* 关系型数据实体[EAMSparePartsGroup] 查询条件对象
*/
@Slf4j
@Data
public class EAMSparePartsGroupSearchContext extends QueryWrapperContext<EAMSparePartsGroup> {
private String n_eamsparepartsgroupname_like;//[备件包名称]
public void setN_eamsparepartsgroupname_like(String n_eamsparepartsgroupname_like) {
this.n_eamsparepartsgroupname_like = n_eamsparepartsgroupname_like;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsgroupname_like)){
this.getSearchCond().like("eamsparepartsgroupname", n_eamsparepartsgroupname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamsparepartsgroupname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsPRO;
/**
* 关系型数据实体[EAMSparePartsPRO] 查询条件对象
*/
@Slf4j
@Data
public class EAMSparePartsPROSearchContext extends QueryWrapperContext<EAMSparePartsPRO> {
private String n_eamsparepartsgroupid_eq;//[备件包标识]
public void setN_eamsparepartsgroupid_eq(String n_eamsparepartsgroupid_eq) {
this.n_eamsparepartsgroupid_eq = n_eamsparepartsgroupid_eq;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsgroupid_eq)){
this.getSearchCond().eq("eamsparepartsgroupid", n_eamsparepartsgroupid_eq);
}
}
private String n_productid_eq;//[产品标识]
public void setN_productid_eq(String n_productid_eq) {
this.n_productid_eq = n_productid_eq;
if(!ObjectUtils.isEmpty(this.n_productid_eq)){
this.getSearchCond().eq("productid", n_productid_eq);
}
}
private String n_eamsparepartsproname_like;//[备件包物料名称]
public void setN_eamsparepartsproname_like(String n_eamsparepartsproname_like) {
this.n_eamsparepartsproname_like = n_eamsparepartsproname_like;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsproname_like)){
this.getSearchCond().like("eamsparepartsproname", n_eamsparepartsproname_like);
}
}
private String n_eamsparepartsgroupname_eq;//[备件包]
public void setN_eamsparepartsgroupname_eq(String n_eamsparepartsgroupname_eq) {
this.n_eamsparepartsgroupname_eq = n_eamsparepartsgroupname_eq;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsgroupname_eq)){
this.getSearchCond().eq("eamsparepartsgroupname", n_eamsparepartsgroupname_eq);
}
}
private String n_eamsparepartsgroupname_like;//[备件包]
public void setN_eamsparepartsgroupname_like(String n_eamsparepartsgroupname_like) {
this.n_eamsparepartsgroupname_like = n_eamsparepartsgroupname_like;
if(!ObjectUtils.isEmpty(this.n_eamsparepartsgroupname_like)){
this.getSearchCond().like("eamsparepartsgroupname", n_eamsparepartsgroupname_like);
}
}
private String n_productname_eq;//[产品]
public void setN_productname_eq(String n_productname_eq) {
this.n_productname_eq = n_productname_eq;
if(!ObjectUtils.isEmpty(this.n_productname_eq)){
this.getSearchCond().eq("productname", n_productname_eq);
}
}
private String n_productname_like;//[产品]
public void setN_productname_like(String n_productname_like) {
this.n_productname_like = n_productname_like;
if(!ObjectUtils.isEmpty(this.n_productname_like)){
this.getSearchCond().like("productname", n_productname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamsparepartsproname", query)
);
}
}
}
package cn.ibizlab.assetmanagement.core.asset.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetPartsGroup;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMAssetPartsGroupSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMAssetPartsGroupMapper extends BaseMapper<EAMAssetPartsGroup>{
Page<EAMAssetPartsGroup> searchDefault(IPage page, @Param("srf") EAMAssetPartsGroupSearchContext context, @Param("ew") Wrapper<EAMAssetPartsGroup> wrapper) ;
@Override
EAMAssetPartsGroup selectById(Serializable id);
@Override
int insert(EAMAssetPartsGroup entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMAssetPartsGroup entity);
@Override
int update(@Param(Constants.ENTITY) EAMAssetPartsGroup entity, @Param("ew") Wrapper<EAMAssetPartsGroup> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<EAMAssetPartsGroup> selectByEamassettypeid(@Param("eamassettypeid") Serializable eamassettypeid) ;
List<EAMAssetPartsGroup> selectByEamsparepartsgroupid(@Param("eamsparepartsgroupid") Serializable eamsparepartsgroupid) ;
}
package cn.ibizlab.assetmanagement.core.asset.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMPRODUCTSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMPRODUCTMapper extends BaseMapper<EAMPRODUCT>{
Page<EAMPRODUCT> searchDefault(IPage page, @Param("srf") EAMPRODUCTSearchContext context, @Param("ew") Wrapper<EAMPRODUCT> wrapper) ;
@Override
EAMPRODUCT selectById(Serializable id);
@Override
int insert(EAMPRODUCT entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMPRODUCT entity);
@Override
int update(@Param(Constants.ENTITY) EAMPRODUCT entity, @Param("ew") Wrapper<EAMPRODUCT> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.assetmanagement.core.asset.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsGroupSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMSparePartsGroupMapper extends BaseMapper<EAMSparePartsGroup>{
Page<EAMSparePartsGroup> searchDefault(IPage page, @Param("srf") EAMSparePartsGroupSearchContext context, @Param("ew") Wrapper<EAMSparePartsGroup> wrapper) ;
@Override
EAMSparePartsGroup selectById(Serializable id);
@Override
int insert(EAMSparePartsGroup entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMSparePartsGroup entity);
@Override
int update(@Param(Constants.ENTITY) EAMSparePartsGroup entity, @Param("ew") Wrapper<EAMSparePartsGroup> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.assetmanagement.core.asset.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsPRO;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsPROSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface EAMSparePartsPROMapper extends BaseMapper<EAMSparePartsPRO>{
Page<EAMSparePartsPRO> searchDefault(IPage page, @Param("srf") EAMSparePartsPROSearchContext context, @Param("ew") Wrapper<EAMSparePartsPRO> wrapper) ;
@Override
EAMSparePartsPRO selectById(Serializable id);
@Override
int insert(EAMSparePartsPRO entity);
@Override
int updateById(@Param(Constants.ENTITY) EAMSparePartsPRO entity);
@Override
int update(@Param(Constants.ENTITY) EAMSparePartsPRO entity, @Param("ew") Wrapper<EAMSparePartsPRO> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<EAMSparePartsPRO> selectByProductid(@Param("productid") Serializable productid) ;
List<EAMSparePartsPRO> selectByEamsparepartsgroupid(@Param("eamsparepartsgroupid") Serializable eamsparepartsgroupid) ;
}
package cn.ibizlab.assetmanagement.core.asset.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetPartsGroup;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMAssetPartsGroupSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMAssetPartsGroup] 服务对象接口
*/
public interface IEAMAssetPartsGroupService extends IService<EAMAssetPartsGroup>{
boolean create(EAMAssetPartsGroup et) ;
void createBatch(List<EAMAssetPartsGroup> list) ;
boolean update(EAMAssetPartsGroup et) ;
void updateBatch(List<EAMAssetPartsGroup> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMAssetPartsGroup get(String key) ;
EAMAssetPartsGroup getDraft(EAMAssetPartsGroup et) ;
boolean checkKey(EAMAssetPartsGroup et) ;
boolean save(EAMAssetPartsGroup et) ;
void saveBatch(List<EAMAssetPartsGroup> list) ;
Page<EAMAssetPartsGroup> searchDefault(EAMAssetPartsGroupSearchContext context) ;
List<EAMAssetPartsGroup> selectByEamassettypeid(String eamassettypeid) ;
void removeByEamassettypeid(String eamassettypeid) ;
List<EAMAssetPartsGroup> selectByEamsparepartsgroupid(String eamsparepartsgroupid) ;
void removeByEamsparepartsgroupid(String eamsparepartsgroupid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMAssetPartsGroup> getEamassetpartsgroupByIds(List<String> ids) ;
List<EAMAssetPartsGroup> getEamassetpartsgroupByEntities(List<EAMAssetPartsGroup> entities) ;
}
package cn.ibizlab.assetmanagement.core.asset.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMPRODUCTSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMPRODUCT] 服务对象接口
*/
public interface IEAMPRODUCTService extends IService<EAMPRODUCT>{
boolean create(EAMPRODUCT et) ;
void createBatch(List<EAMPRODUCT> list) ;
boolean update(EAMPRODUCT et) ;
void updateBatch(List<EAMPRODUCT> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMPRODUCT get(String key) ;
EAMPRODUCT getDraft(EAMPRODUCT et) ;
boolean checkKey(EAMPRODUCT et) ;
boolean save(EAMPRODUCT et) ;
void saveBatch(List<EAMPRODUCT> list) ;
Page<EAMPRODUCT> searchDefault(EAMPRODUCTSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMPRODUCT> getEamproductByIds(List<String> ids) ;
List<EAMPRODUCT> getEamproductByEntities(List<EAMPRODUCT> entities) ;
}
package cn.ibizlab.assetmanagement.core.asset.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsGroupSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMSparePartsGroup] 服务对象接口
*/
public interface IEAMSparePartsGroupService extends IService<EAMSparePartsGroup>{
boolean create(EAMSparePartsGroup et) ;
void createBatch(List<EAMSparePartsGroup> list) ;
boolean update(EAMSparePartsGroup et) ;
void updateBatch(List<EAMSparePartsGroup> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMSparePartsGroup get(String key) ;
EAMSparePartsGroup getDraft(EAMSparePartsGroup et) ;
boolean checkKey(EAMSparePartsGroup et) ;
boolean save(EAMSparePartsGroup et) ;
void saveBatch(List<EAMSparePartsGroup> list) ;
Page<EAMSparePartsGroup> searchDefault(EAMSparePartsGroupSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMSparePartsGroup> getEamsparepartsgroupByIds(List<String> ids) ;
List<EAMSparePartsGroup> getEamsparepartsgroupByEntities(List<EAMSparePartsGroup> entities) ;
}
package cn.ibizlab.assetmanagement.core.asset.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsPRO;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsPROSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[EAMSparePartsPRO] 服务对象接口
*/
public interface IEAMSparePartsPROService extends IService<EAMSparePartsPRO>{
boolean create(EAMSparePartsPRO et) ;
void createBatch(List<EAMSparePartsPRO> list) ;
boolean update(EAMSparePartsPRO et) ;
void updateBatch(List<EAMSparePartsPRO> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
EAMSparePartsPRO get(String key) ;
EAMSparePartsPRO getDraft(EAMSparePartsPRO et) ;
boolean checkKey(EAMSparePartsPRO et) ;
boolean save(EAMSparePartsPRO et) ;
void saveBatch(List<EAMSparePartsPRO> list) ;
Page<EAMSparePartsPRO> searchDefault(EAMSparePartsPROSearchContext context) ;
List<EAMSparePartsPRO> selectByProductid(String productid) ;
void removeByProductid(String productid) ;
List<EAMSparePartsPRO> selectByEamsparepartsgroupid(String eamsparepartsgroupid) ;
void removeByEamsparepartsgroupid(String eamsparepartsgroupid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<EAMSparePartsPRO> getEamsparepartsproByIds(List<String> ids) ;
List<EAMSparePartsPRO> getEamsparepartsproByEntities(List<EAMSparePartsPRO> entities) ;
}
package cn.ibizlab.assetmanagement.core.asset.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetPartsGroup;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMAssetPartsGroupSearchContext;
import cn.ibizlab.assetmanagement.core.asset.service.IEAMAssetPartsGroupService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.asset.mapper.EAMAssetPartsGroupMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[资产备件包] 服务对象接口实现
*/
@Slf4j
@Service("EAMAssetPartsGroupServiceImpl")
public class EAMAssetPartsGroupServiceImpl extends ServiceImpl<EAMAssetPartsGroupMapper, EAMAssetPartsGroup> implements IEAMAssetPartsGroupService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMAssetTypeService eamassettypeService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMSparePartsGroupService eamsparepartsgroupService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMAssetPartsGroup et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamassetpartsgroupid()),et);
return true;
}
@Override
public void createBatch(List<EAMAssetPartsGroup> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMAssetPartsGroup et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamassetpartsgroupid",et.getEamassetpartsgroupid())))
return false;
CachedBeanCopier.copy(get(et.getEamassetpartsgroupid()),et);
return true;
}
@Override
public void updateBatch(List<EAMAssetPartsGroup> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMAssetPartsGroup get(String key) {
EAMAssetPartsGroup et = getById(key);
if(et==null){
et=new EAMAssetPartsGroup();
et.setEamassetpartsgroupid(key);
}
else{
}
return et;
}
@Override
public EAMAssetPartsGroup getDraft(EAMAssetPartsGroup et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(EAMAssetPartsGroup et) {
return (!ObjectUtils.isEmpty(et.getEamassetpartsgroupid()))&&(!Objects.isNull(this.getById(et.getEamassetpartsgroupid())));
}
@Override
@Transactional
public boolean save(EAMAssetPartsGroup et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(EAMAssetPartsGroup et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMAssetPartsGroup> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMAssetPartsGroup> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<EAMAssetPartsGroup> selectByEamassettypeid(String eamassettypeid) {
return baseMapper.selectByEamassettypeid(eamassettypeid);
}
@Override
public void removeByEamassettypeid(String eamassettypeid) {
this.remove(new QueryWrapper<EAMAssetPartsGroup>().eq("eamassettypeid",eamassettypeid));
}
@Override
public List<EAMAssetPartsGroup> selectByEamsparepartsgroupid(String eamsparepartsgroupid) {
return baseMapper.selectByEamsparepartsgroupid(eamsparepartsgroupid);
}
@Override
public void removeByEamsparepartsgroupid(String eamsparepartsgroupid) {
this.remove(new QueryWrapper<EAMAssetPartsGroup>().eq("eamsparepartsgroupid",eamsparepartsgroupid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMAssetPartsGroup> searchDefault(EAMAssetPartsGroupSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMAssetPartsGroup> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMAssetPartsGroup>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(EAMAssetPartsGroup et){
//实体关系[DER1N_EAMASSETPARTSGROUP_EAMASSETTYPE_EAMASSETTYPEID]
if(!ObjectUtils.isEmpty(et.getEamassettypeid())){
cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetType eamassettype=et.getEamassettype();
if(ObjectUtils.isEmpty(eamassettype)){
cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetType majorEntity=eamassettypeService.get(et.getEamassettypeid());
et.setEamassettype(majorEntity);
eamassettype=majorEntity;
}
et.setEamassettypename(eamassettype.getEamassettypename());
}
//实体关系[DER1N_EAMASSETPARTSGROUP_EAMSPAREPARTSGROUP_EAMSPAREPARTSGROUPID]
if(!ObjectUtils.isEmpty(et.getEamsparepartsgroupid())){
cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup eamsparepartsgroup=et.getEamsparepartsgroup();
if(ObjectUtils.isEmpty(eamsparepartsgroup)){
cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup majorEntity=eamsparepartsgroupService.get(et.getEamsparepartsgroupid());
et.setEamsparepartsgroup(majorEntity);
eamsparepartsgroup=majorEntity;
}
et.setEamsparepartsgroupname(eamsparepartsgroup.getEamsparepartsgroupname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMAssetPartsGroup> getEamassetpartsgroupByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMAssetPartsGroup> getEamassetpartsgroupByEntities(List<EAMAssetPartsGroup> entities) {
List ids =new ArrayList();
for(EAMAssetPartsGroup entity : entities){
Serializable id=entity.getEamassetpartsgroupid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
......@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service("EAMAssetTypeServiceImpl")
public class EAMAssetTypeServiceImpl extends ServiceImpl<EAMAssetTypeMapper, EAMAssetType> implements IEAMAssetTypeService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMAssetPartsGroupService eamassetpartsgroupService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMAssetService eamassetService;
......
package cn.ibizlab.assetmanagement.core.asset.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMPRODUCTSearchContext;
import cn.ibizlab.assetmanagement.core.asset.service.IEAMPRODUCTService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.asset.mapper.EAMPRODUCTMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[产品] 服务对象接口实现
*/
@Slf4j
@Service("EAMPRODUCTServiceImpl")
public class EAMPRODUCTServiceImpl extends ServiceImpl<EAMPRODUCTMapper, EAMPRODUCT> implements IEAMPRODUCTService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMSparePartsPROService eamsparepartsproService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMPRODUCT et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getProductid()),et);
return true;
}
@Override
public void createBatch(List<EAMPRODUCT> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMPRODUCT et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("productid",et.getProductid())))
return false;
CachedBeanCopier.copy(get(et.getProductid()),et);
return true;
}
@Override
public void updateBatch(List<EAMPRODUCT> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMPRODUCT get(String key) {
EAMPRODUCT et = getById(key);
if(et==null){
et=new EAMPRODUCT();
et.setProductid(key);
}
else{
}
return et;
}
@Override
public EAMPRODUCT getDraft(EAMPRODUCT et) {
return et;
}
@Override
public boolean checkKey(EAMPRODUCT et) {
return (!ObjectUtils.isEmpty(et.getProductid()))&&(!Objects.isNull(this.getById(et.getProductid())));
}
@Override
@Transactional
public boolean save(EAMPRODUCT et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(EAMPRODUCT et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMPRODUCT> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMPRODUCT> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMPRODUCT> searchDefault(EAMPRODUCTSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMPRODUCT> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMPRODUCT>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMPRODUCT> getEamproductByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMPRODUCT> getEamproductByEntities(List<EAMPRODUCT> entities) {
List ids =new ArrayList();
for(EAMPRODUCT entity : entities){
Serializable id=entity.getProductid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.asset.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsGroupSearchContext;
import cn.ibizlab.assetmanagement.core.asset.service.IEAMSparePartsGroupService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.asset.mapper.EAMSparePartsGroupMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[备件包] 服务对象接口实现
*/
@Slf4j
@Service("EAMSparePartsGroupServiceImpl")
public class EAMSparePartsGroupServiceImpl extends ServiceImpl<EAMSparePartsGroupMapper, EAMSparePartsGroup> implements IEAMSparePartsGroupService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMAssetPartsGroupService eamassetpartsgroupService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMSparePartsPROService eamsparepartsproService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMSparePartsGroup et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamsparepartsgroupid()),et);
return true;
}
@Override
public void createBatch(List<EAMSparePartsGroup> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMSparePartsGroup et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamsparepartsgroupid",et.getEamsparepartsgroupid())))
return false;
CachedBeanCopier.copy(get(et.getEamsparepartsgroupid()),et);
return true;
}
@Override
public void updateBatch(List<EAMSparePartsGroup> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMSparePartsGroup get(String key) {
EAMSparePartsGroup et = getById(key);
if(et==null){
et=new EAMSparePartsGroup();
et.setEamsparepartsgroupid(key);
}
else{
}
return et;
}
@Override
public EAMSparePartsGroup getDraft(EAMSparePartsGroup et) {
return et;
}
@Override
public boolean checkKey(EAMSparePartsGroup et) {
return (!ObjectUtils.isEmpty(et.getEamsparepartsgroupid()))&&(!Objects.isNull(this.getById(et.getEamsparepartsgroupid())));
}
@Override
@Transactional
public boolean save(EAMSparePartsGroup et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(EAMSparePartsGroup et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMSparePartsGroup> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMSparePartsGroup> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMSparePartsGroup> searchDefault(EAMSparePartsGroupSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMSparePartsGroup> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMSparePartsGroup>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMSparePartsGroup> getEamsparepartsgroupByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMSparePartsGroup> getEamsparepartsgroupByEntities(List<EAMSparePartsGroup> entities) {
List ids =new ArrayList();
for(EAMSparePartsGroup entity : entities){
Serializable id=entity.getEamsparepartsgroupid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.asset.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsPRO;
import cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsPROSearchContext;
import cn.ibizlab.assetmanagement.core.asset.service.IEAMSparePartsPROService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.asset.mapper.EAMSparePartsPROMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[备件包物料] 服务对象接口实现
*/
@Slf4j
@Service("EAMSparePartsPROServiceImpl")
public class EAMSparePartsPROServiceImpl extends ServiceImpl<EAMSparePartsPROMapper, EAMSparePartsPRO> implements IEAMSparePartsPROService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMPRODUCTService eamproductService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.asset.service.IEAMSparePartsGroupService eamsparepartsgroupService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(EAMSparePartsPRO et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamsparepartsproid()),et);
return true;
}
@Override
public void createBatch(List<EAMSparePartsPRO> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMSparePartsPRO et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamsparepartsproid",et.getEamsparepartsproid())))
return false;
CachedBeanCopier.copy(get(et.getEamsparepartsproid()),et);
return true;
}
@Override
public void updateBatch(List<EAMSparePartsPRO> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public EAMSparePartsPRO get(String key) {
EAMSparePartsPRO et = getById(key);
if(et==null){
et=new EAMSparePartsPRO();
et.setEamsparepartsproid(key);
}
else{
}
return et;
}
@Override
public EAMSparePartsPRO getDraft(EAMSparePartsPRO et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(EAMSparePartsPRO et) {
return (!ObjectUtils.isEmpty(et.getEamsparepartsproid()))&&(!Objects.isNull(this.getById(et.getEamsparepartsproid())));
}
@Override
@Transactional
public boolean save(EAMSparePartsPRO et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(EAMSparePartsPRO et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<EAMSparePartsPRO> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMSparePartsPRO> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<EAMSparePartsPRO> selectByProductid(String productid) {
return baseMapper.selectByProductid(productid);
}
@Override
public void removeByProductid(String productid) {
this.remove(new QueryWrapper<EAMSparePartsPRO>().eq("productid",productid));
}
@Override
public List<EAMSparePartsPRO> selectByEamsparepartsgroupid(String eamsparepartsgroupid) {
return baseMapper.selectByEamsparepartsgroupid(eamsparepartsgroupid);
}
@Override
public void removeByEamsparepartsgroupid(String eamsparepartsgroupid) {
this.remove(new QueryWrapper<EAMSparePartsPRO>().eq("eamsparepartsgroupid",eamsparepartsgroupid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<EAMSparePartsPRO> searchDefault(EAMSparePartsPROSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMSparePartsPRO> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMSparePartsPRO>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(EAMSparePartsPRO et){
//实体关系[DER1N_EAMSPAREPARTSPRO_EAMPRODUCT_PRODUCTID]
if(!ObjectUtils.isEmpty(et.getProductid())){
cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT product=et.getProduct();
if(ObjectUtils.isEmpty(product)){
cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT majorEntity=eamproductService.get(et.getProductid());
et.setProduct(majorEntity);
product=majorEntity;
}
et.setProductname(product.getProductname());
et.setProductnumber(product.getProductnumber());
}
//实体关系[DER1N_EAMSPAREPARTSPRO_EAMSPAREPARTSGROUP_EAMSPAREPARTSGROUPID]
if(!ObjectUtils.isEmpty(et.getEamsparepartsgroupid())){
cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup eamsparepartsgroup=et.getEamsparepartsgroup();
if(ObjectUtils.isEmpty(eamsparepartsgroup)){
cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup majorEntity=eamsparepartsgroupService.get(et.getEamsparepartsgroupid());
et.setEamsparepartsgroup(majorEntity);
eamsparepartsgroup=majorEntity;
}
et.setEamsparepartsgroupname(eamsparepartsgroup.getEamsparepartsgroupname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<EAMSparePartsPRO> getEamsparepartsproByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<EAMSparePartsPRO> getEamsparepartsproByEntities(List<EAMSparePartsPRO> entities) {
List ids =new ArrayList();
for(EAMSparePartsPRO entity : entities){
Serializable id=entity.getEamsparepartsproid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.assetmanagement.core.plan.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.plan.domain.EAMPlan;
import cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin;
import java.util.List;
@Mapper(componentModel = "spring", uses = {})
public interface EAMPlanInheritMapping {
@Mappings({
@Mapping(source ="eamplanid",target = "wooriginid"),
@Mapping(source ="eamplanname",target = "wooriginname"),
@Mapping(target ="focusNull",ignore = true),
})
WOOrigin toWoorigin(EAMPlan eamplan);
@Mappings({
@Mapping(source ="wooriginid" ,target = "eamplanid"),
@Mapping(source ="wooriginname" ,target = "eamplanname"),
@Mapping(target ="focusNull",ignore = true),
})
EAMPlan toEamplan(WOOrigin woorigin);
List<WOOrigin> toWoorigin(List<EAMPlan> eamplan);
List<EAMPlan> toEamplan(List<WOOrigin> woorigin);
}
......@@ -66,6 +66,7 @@ public class EAMPlanServiceImpl extends ServiceImpl<EAMPlanMapper, EAMPlan> impl
@Override
@Transactional
public boolean create(EAMPlan et) {
createIndexMajorEntityData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamplanid()),et);
......@@ -80,6 +81,7 @@ public class EAMPlanServiceImpl extends ServiceImpl<EAMPlanMapper, EAMPlan> impl
@Override
@Transactional
public boolean update(EAMPlan et) {
wooriginService.update(eamplanInheritMapping.toWoorigin(et));
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamplanid",et.getEamplanid())))
return false;
CachedBeanCopier.copy(get(et.getEamplanid()),et);
......@@ -94,6 +96,7 @@ public class EAMPlanServiceImpl extends ServiceImpl<EAMPlanMapper, EAMPlan> impl
@Override
@Transactional
public boolean remove(String key) {
wooriginService.remove(key);
boolean result=removeById(key);
return result ;
}
......@@ -190,6 +193,23 @@ public class EAMPlanServiceImpl extends ServiceImpl<EAMPlanMapper, EAMPlan> impl
@Autowired
cn.ibizlab.assetmanagement.core.plan.mapping.EAMPlanInheritMapping eamplanInheritMapping;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.workorder.service.IWOOriginService wooriginService;
/**
* 创建索引主实体数据
* @param et
*/
private void createIndexMajorEntityData(EAMPlan et){
if(ObjectUtils.isEmpty(et.getEamplanid()))
et.setEamplanid((String)et.getDefaultKey(true));
cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin woorigin =eamplanInheritMapping.toWoorigin(et);
woorigin.set("woorigintype","PLAN");
wooriginService.create(woorigin);
}
@Override
public List<JSONObject> select(String sql, Map param){
......
......@@ -117,6 +117,14 @@ public class EAMWorkOrder extends EntityMP implements Serializable {
@JSONField(name = "pworkorderid")
@JsonProperty("pworkorderid")
private String pworkorderid;
/**
* 工单来源标识
*/
@DEField(name = "eamwooriginid")
@TableField(value = "eamwooriginid")
@JSONField(name = "wooriginid")
@JsonProperty("wooriginid")
private String wooriginid;
/**
*
......@@ -134,6 +142,14 @@ public class EAMWorkOrder extends EntityMP implements Serializable {
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.location.domain.EAMLocation eamlocation;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin eamwoorigin;
/**
*
*/
......@@ -192,6 +208,14 @@ public class EAMWorkOrder extends EntityMP implements Serializable {
this.modify("pworkorderid",pworkorderid);
}
/**
* 设置 [工单来源标识]
*/
public void setWooriginid(String wooriginid){
this.wooriginid = wooriginid ;
this.modify("eamwooriginid",wooriginid);
}
}
......
package cn.ibizlab.assetmanagement.core.workorder.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.assetmanagement.util.domain.EntityBase;
import cn.ibizlab.assetmanagement.util.annotation.DEField;
import cn.ibizlab.assetmanagement.util.enums.DEPredefinedFieldType;
import cn.ibizlab.assetmanagement.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.assetmanagement.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.assetmanagement.util.domain.EntityMP;
/**
* 实体[工单来源]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "EAMWOORIGIN",resultMap = "WOOriginResultMap")
public class WOOrigin extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 工单来源标识
*/
@DEField(name = "eamwooriginid" , isKeyField=true)
@TableId(value= "eamwooriginid",type=IdType.ASSIGN_UUID)
@JSONField(name = "wooriginid")
@JsonProperty("wooriginid")
private String wooriginid;
/**
* 工单来源名称
*/
@DEField(name = "eamwooriginname")
@TableField(value = "eamwooriginname")
@JSONField(name = "wooriginname")
@JsonProperty("wooriginname")
private String wooriginname;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 工单来源类型
*/
@DEField(name = "eamwoorigintype")
@TableField(value = "eamwoorigintype")
@JSONField(name = "woorigintype")
@JsonProperty("woorigintype")
private String woorigintype;
/**
* 设置 [工单来源名称]
*/
public void setWooriginname(String wooriginname){
this.wooriginname = wooriginname ;
this.modify("eamwooriginname",wooriginname);
}
/**
* 设置 [工单来源类型]
*/
public void setWoorigintype(String woorigintype){
this.woorigintype = woorigintype ;
this.modify("eamwoorigintype",woorigintype);
}
}
......@@ -62,6 +62,13 @@ public class EAMWorkOrderSearchContext extends QueryWrapperContext<EAMWorkOrder>
this.getSearchCond().eq("pworkorderid", n_pworkorderid_eq);
}
}
private String n_eamwooriginid_eq;//[工单来源标识]
public void setN_eamwooriginid_eq(String n_eamwooriginid_eq) {
this.n_eamwooriginid_eq = n_eamwooriginid_eq;
if(!ObjectUtils.isEmpty(this.n_eamwooriginid_eq)){
this.getSearchCond().eq("eamwooriginid", n_eamwooriginid_eq);
}
}
/**
* 启用快速搜索
......
package cn.ibizlab.assetmanagement.core.workorder.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.assetmanagement.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin;
/**
* 关系型数据实体[WOOrigin] 查询条件对象
*/
@Slf4j
@Data
public class WOOriginSearchContext extends QueryWrapperContext<WOOrigin> {
private String n_eamwooriginname_like;//[工单来源名称]
public void setN_eamwooriginname_like(String n_eamwooriginname_like) {
this.n_eamwooriginname_like = n_eamwooriginname_like;
if(!ObjectUtils.isEmpty(this.n_eamwooriginname_like)){
this.getSearchCond().like("eamwooriginname", n_eamwooriginname_like);
}
}
private String n_eamwoorigintype_eq;//[工单来源类型]
public void setN_eamwoorigintype_eq(String n_eamwoorigintype_eq) {
this.n_eamwoorigintype_eq = n_eamwoorigintype_eq;
if(!ObjectUtils.isEmpty(this.n_eamwoorigintype_eq)){
this.getSearchCond().eq("eamwoorigintype", n_eamwoorigintype_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("eamwooriginname", query)
);
}
}
}
......@@ -66,6 +66,8 @@ public interface EAMWorkOrderMapper extends BaseMapper<EAMWorkOrder>{
List<EAMWorkOrder> selectByEamlocationid(@Param("eamlocationid") Serializable eamlocationid) ;
List<EAMWorkOrder> selectByWooriginid(@Param("wooriginid") Serializable wooriginid) ;
List<EAMWorkOrder> selectByPworkorderid(@Param("workorderid") Serializable workorderid) ;
List<EAMWorkOrder> selectByEamwotypeid(@Param("eamwotypeid") Serializable eamwotypeid) ;
......
package cn.ibizlab.assetmanagement.core.workorder.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin;
import cn.ibizlab.assetmanagement.core.workorder.filter.WOOriginSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface WOOriginMapper extends BaseMapper<WOOrigin>{
Page<WOOrigin> searchDefault(IPage page, @Param("srf") WOOriginSearchContext context, @Param("ew") Wrapper<WOOrigin> wrapper) ;
@Override
WOOrigin selectById(Serializable id);
@Override
int insert(WOOrigin entity);
@Override
int updateById(@Param(Constants.ENTITY) WOOrigin entity);
@Override
int update(@Param(Constants.ENTITY) WOOrigin entity, @Param("ew") Wrapper<WOOrigin> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
......@@ -41,6 +41,8 @@ public interface IEAMWorkOrderService extends IService<EAMWorkOrder>{
void removeByAssetid(String assetid) ;
List<EAMWorkOrder> selectByEamlocationid(String eamlocationid) ;
void removeByEamlocationid(String eamlocationid) ;
List<EAMWorkOrder> selectByWooriginid(String wooriginid) ;
void removeByWooriginid(String wooriginid) ;
List<EAMWorkOrder> selectByPworkorderid(String workorderid) ;
void removeByPworkorderid(String workorderid) ;
List<EAMWorkOrder> selectByEamwotypeid(String eamwotypeid) ;
......
package cn.ibizlab.assetmanagement.core.workorder.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin;
import cn.ibizlab.assetmanagement.core.workorder.filter.WOOriginSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[WOOrigin] 服务对象接口
*/
public interface IWOOriginService extends IService<WOOrigin>{
boolean create(WOOrigin et) ;
void createBatch(List<WOOrigin> list) ;
boolean update(WOOrigin et) ;
void updateBatch(List<WOOrigin> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
WOOrigin get(String key) ;
WOOrigin getDraft(WOOrigin et) ;
boolean checkKey(WOOrigin et) ;
boolean save(WOOrigin et) ;
void saveBatch(List<WOOrigin> list) ;
Page<WOOrigin> searchDefault(WOOriginSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<WOOrigin> getWooriginByIds(List<String> ids) ;
List<WOOrigin> getWooriginByEntities(List<WOOrigin> entities) ;
}
......@@ -55,6 +55,9 @@ public class EAMWorkOrderServiceImpl extends ServiceImpl<EAMWorkOrderMapper, EAM
protected cn.ibizlab.assetmanagement.core.location.service.IEAMLocationService eamlocationService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.workorder.service.IWOOriginService wooriginService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.workorder.service.IEAMWOTypeService eamwotypeService;
protected int batchSize = 500;
......@@ -171,6 +174,16 @@ public class EAMWorkOrderServiceImpl extends ServiceImpl<EAMWorkOrderMapper, EAM
this.remove(new QueryWrapper<EAMWorkOrder>().eq("eamlocationid",eamlocationid));
}
@Override
public List<EAMWorkOrder> selectByWooriginid(String wooriginid) {
return baseMapper.selectByWooriginid(wooriginid);
}
@Override
public void removeByWooriginid(String wooriginid) {
this.remove(new QueryWrapper<EAMWorkOrder>().eq("eamwooriginid",wooriginid));
}
@Override
public List<EAMWorkOrder> selectByPworkorderid(String workorderid) {
return baseMapper.selectByPworkorderid(workorderid);
......
package cn.ibizlab.assetmanagement.core.workorder.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin;
import cn.ibizlab.assetmanagement.core.workorder.filter.WOOriginSearchContext;
import cn.ibizlab.assetmanagement.core.workorder.service.IWOOriginService;
import cn.ibizlab.assetmanagement.util.helper.CachedBeanCopier;
import cn.ibizlab.assetmanagement.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.assetmanagement.core.workorder.mapper.WOOriginMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[工单来源] 服务对象接口实现
*/
@Slf4j
@Service("WOOriginServiceImpl")
public class WOOriginServiceImpl extends ServiceImpl<WOOriginMapper, WOOrigin> implements IWOOriginService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.workorder.service.IEAMWorkOrderService eamworkorderService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(WOOrigin et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getWooriginid()),et);
return true;
}
@Override
public void createBatch(List<WOOrigin> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(WOOrigin et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamwooriginid",et.getWooriginid())))
return false;
CachedBeanCopier.copy(get(et.getWooriginid()),et);
return true;
}
@Override
public void updateBatch(List<WOOrigin> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public WOOrigin get(String key) {
WOOrigin et = getById(key);
if(et==null){
et=new WOOrigin();
et.setWooriginid(key);
}
else{
}
return et;
}
@Override
public WOOrigin getDraft(WOOrigin et) {
return et;
}
@Override
public boolean checkKey(WOOrigin et) {
return (!ObjectUtils.isEmpty(et.getWooriginid()))&&(!Objects.isNull(this.getById(et.getWooriginid())));
}
@Override
@Transactional
public boolean save(WOOrigin et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(WOOrigin et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<WOOrigin> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<WOOrigin> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<WOOrigin> searchDefault(WOOriginSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WOOrigin> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<WOOrigin>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<WOOrigin> getWooriginByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<WOOrigin> getWooriginByEntities(List<WOOrigin> entities) {
List ids =new ArrayList();
for(WOOrigin entity : entities){
Serializable id=entity.getWooriginid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
<?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="cn.ibizlab.assetmanagement.core.asset.mapper.EAMAssetPartsGroupMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="EAMAssetPartsGroupResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMASSETPARTSGROUPID`, t1.`EAMASSETPARTSGROUPNAME`, t1.`EAMASSETTYPEID`, t21.`EAMASSETTYPENAME`, t1.`EAMSPAREPARTSGROUPID`, t11.`EAMSPAREPARTSGROUPNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMASSETPARTSGROUP` t1 LEFT JOIN EAMSPAREPARTSGROUP t11 ON t1.EAMSPAREPARTSGROUPID = t11.EAMSPAREPARTSGROUPID LEFT JOIN EAMASSETTYPE t21 ON t1.EAMASSETTYPEID = t21.EAMASSETTYPEID ) t1 where eamassetpartsgroupid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="EAMAssetPartsGroupResultMap" type="cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetPartsGroup" autoMapping="true">
<id property="eamassetpartsgroupid" column="eamassetpartsgroupid" /><!--主键字段映射-->
<result property="eamassettypeid" column="eamassettypeid" />
<result property="eamsparepartsgroupid" column="eamsparepartsgroupid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="eamassettype" javaType="cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetType" column="eamassettypeid" select="cn.ibizlab.assetmanagement.core.asset.mapper.EAMAssetTypeMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="eamsparepartsgroup" javaType="cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup" column="eamsparepartsgroupid" select="cn.ibizlab.assetmanagement.core.asset.mapper.EAMSparePartsGroupMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMASSETPARTSGROUP_EAMASSETTYPE_EAMASSETTYPEID] -->
<select id="selectByEamassettypeid" resultMap="EAMAssetPartsGroupResultMap">
select t1.* from (
<include refid="Default" />
) t1
where eamassettypeid=#{eamassettypeid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMASSETPARTSGROUP_EAMSPAREPARTSGROUP_EAMSPAREPARTSGROUPID] -->
<select id="selectByEamsparepartsgroupid" resultMap="EAMAssetPartsGroupResultMap">
select t1.* from (
<include refid="Default" />
) t1
where eamsparepartsgroupid=#{eamsparepartsgroupid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.assetmanagement.core.asset.filter.EAMAssetPartsGroupSearchContext" resultMap="EAMAssetPartsGroupResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMASSETPARTSGROUPID`, t1.`EAMASSETPARTSGROUPNAME`, t1.`EAMASSETTYPEID`, t21.`EAMASSETTYPENAME`, t1.`EAMSPAREPARTSGROUPID`, t11.`EAMSPAREPARTSGROUPNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMASSETPARTSGROUP` t1 LEFT JOIN EAMSPAREPARTSGROUP t11 ON t1.EAMSPAREPARTSGROUPID = t11.EAMSPAREPARTSGROUPID LEFT JOIN EAMASSETTYPE t21 ON t1.EAMASSETTYPEID = t21.EAMASSETTYPEID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMASSETPARTSGROUPID`, t1.`EAMASSETPARTSGROUPNAME`, t1.`EAMASSETTYPEID`, t21.`EAMASSETTYPENAME`, t1.`EAMSPAREPARTSGROUPID`, t11.`EAMSPAREPARTSGROUPNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMASSETPARTSGROUP` t1 LEFT JOIN EAMSPAREPARTSGROUP t11 ON t1.EAMSPAREPARTSGROUPID = t11.EAMSPAREPARTSGROUPID LEFT JOIN EAMASSETTYPE t21 ON t1.EAMASSETTYPEID = t21.EAMASSETTYPEID
]]>
</sql>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.assetmanagement.core.asset.mapper.EAMPRODUCTMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="EAMPRODUCTResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `PRODUCT` t1 ) t1 where productid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="EAMPRODUCTResultMap" type="cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT" autoMapping="true">
<id property="productid" column="productid" /><!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.assetmanagement.core.asset.filter.EAMPRODUCTSearchContext" resultMap="EAMPRODUCTResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `PRODUCT` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `PRODUCT` t1
]]>
</sql>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.assetmanagement.core.asset.mapper.EAMSparePartsGroupMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="EAMSparePartsGroupResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMSPAREPARTSGROUPID`, t1.`EAMSPAREPARTSGROUPNAME`, t1.`SPAREPARTSGRPNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMSPAREPARTSGROUP` t1 ) t1 where eamsparepartsgroupid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="EAMSparePartsGroupResultMap" type="cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup" autoMapping="true">
<id property="eamsparepartsgroupid" column="eamsparepartsgroupid" /><!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsGroupSearchContext" resultMap="EAMSparePartsGroupResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMSPAREPARTSGROUPID`, t1.`EAMSPAREPARTSGROUPNAME`, t1.`SPAREPARTSGRPNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMSPAREPARTSGROUP` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMSPAREPARTSGROUPID`, t1.`EAMSPAREPARTSGROUPNAME`, t1.`SPAREPARTSGRPNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMSPAREPARTSGROUP` t1
]]>
</sql>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.assetmanagement.core.asset.mapper.EAMSparePartsPROMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="EAMSparePartsPROResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMSPAREPARTSGROUPID`, t11.`EAMSPAREPARTSGROUPNAME`, t1.`EAMSPAREPARTSPROID`, t1.`EAMSPAREPARTSPRONAME`, t1.`PRODUCTID`, t21.`PRODUCTNAME`, t21.`PRODUCTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMSPAREPARTSPRO` t1 LEFT JOIN EAMSPAREPARTSGROUP t11 ON t1.EAMSPAREPARTSGROUPID = t11.EAMSPAREPARTSGROUPID LEFT JOIN PRODUCT t21 ON t1.PRODUCTID = t21.PRODUCTID ) t1 where eamsparepartsproid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="EAMSparePartsPROResultMap" type="cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsPRO" autoMapping="true">
<id property="eamsparepartsproid" column="eamsparepartsproid" /><!--主键字段映射-->
<result property="eamsparepartsgroupid" column="eamsparepartsgroupid" />
<result property="productid" column="productid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="product" javaType="cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT" column="productid" select="cn.ibizlab.assetmanagement.core.asset.mapper.EAMPRODUCTMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="eamsparepartsgroup" javaType="cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup" column="eamsparepartsgroupid" select="cn.ibizlab.assetmanagement.core.asset.mapper.EAMSparePartsGroupMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMSPAREPARTSPRO_EAMPRODUCT_PRODUCTID] -->
<select id="selectByProductid" resultMap="EAMSparePartsPROResultMap">
select t1.* from (
<include refid="Default" />
) t1
where productid=#{productid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMSPAREPARTSPRO_EAMSPAREPARTSGROUP_EAMSPAREPARTSGROUPID] -->
<select id="selectByEamsparepartsgroupid" resultMap="EAMSparePartsPROResultMap">
select t1.* from (
<include refid="Default" />
) t1
where eamsparepartsgroupid=#{eamsparepartsgroupid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.assetmanagement.core.asset.filter.EAMSparePartsPROSearchContext" resultMap="EAMSparePartsPROResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMSPAREPARTSGROUPID`, t11.`EAMSPAREPARTSGROUPNAME`, t1.`EAMSPAREPARTSPROID`, t1.`EAMSPAREPARTSPRONAME`, t1.`PRODUCTID`, t21.`PRODUCTNAME`, t21.`PRODUCTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMSPAREPARTSPRO` t1 LEFT JOIN EAMSPAREPARTSGROUP t11 ON t1.EAMSPAREPARTSGROUPID = t11.EAMSPAREPARTSGROUPID LEFT JOIN PRODUCT t21 ON t1.PRODUCTID = t21.PRODUCTID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMSPAREPARTSGROUPID`, t11.`EAMSPAREPARTSGROUPNAME`, t1.`EAMSPAREPARTSPROID`, t1.`EAMSPAREPARTSPRONAME`, t1.`PRODUCTID`, t21.`PRODUCTNAME`, t21.`PRODUCTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMSPAREPARTSPRO` t1 LEFT JOIN EAMSPAREPARTSGROUP t11 ON t1.EAMSPAREPARTSGROUPID = t11.EAMSPAREPARTSGROUPID LEFT JOIN PRODUCT t21 ON t1.PRODUCTID = t21.PRODUCTID
]]>
</sql>
</mapper>
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="EAMWorkOrderResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMWOTYPEID`, t1.`PWORKORDERID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1 ) t1 where workorderid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMWOORIGINID`, t1.`EAMWOTYPEID`, t1.`PWORKORDERID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1 ) t1 where workorderid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -15,6 +15,7 @@
<result property="assetid" column="assetid" />
<result property="eamlocationid" column="eamlocationid" />
<result property="pworkorderid" column="pworkorderid" />
<result property="wooriginid" column="eamwooriginid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
......@@ -22,6 +23,8 @@
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="eamlocation" javaType="cn.ibizlab.assetmanagement.core.location.domain.EAMLocation" column="eamlocationid" select="cn.ibizlab.assetmanagement.core.location.mapper.EAMLocationMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="eamwoorigin" javaType="cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin" column="eamwooriginid" select="cn.ibizlab.assetmanagement.core.workorder.mapper.WOOriginMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="pworkorder" javaType="cn.ibizlab.assetmanagement.core.workorder.domain.EAMWorkOrder" column="pworkorderid" select="cn.ibizlab.assetmanagement.core.workorder.mapper.EAMWorkOrderMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="eamwotype" javaType="cn.ibizlab.assetmanagement.core.workorder.domain.EAMWOType" column="eamwotypeid" select="cn.ibizlab.assetmanagement.core.workorder.mapper.EAMWOTypeMapper.selectById" fetchType="lazy"></association>
......@@ -40,6 +43,13 @@
<include refid="Default" />
) t1
where eamlocationid=#{eamlocationid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMWORKORDER_EAMWOORIGIN_EAMWOORIGINID] -->
<select id="selectByWooriginid" resultMap="EAMWorkOrderResultMap">
select t1.* from (
<include refid="Default" />
) t1
where eamwooriginid=#{wooriginid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMWORKORDER_EAMWORKORDER_PWORKORDERID] -->
<select id="selectByPworkorderid" resultMap="EAMWorkOrderResultMap">
......@@ -67,12 +77,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMWOTYPEID`, t1.`PWORKORDERID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1
<![CDATA[ SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMWOORIGINID`, t1.`EAMWOTYPEID`, t1.`PWORKORDERID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMWOTYPEID`, t1.`PWORKORDERID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1
<![CDATA[ SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMWOORIGINID`, t1.`EAMWOTYPEID`, t1.`PWORKORDERID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1
]]>
</sql>
</mapper>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.assetmanagement.core.workorder.mapper.WOOriginMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="WOOriginResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMWOORIGINID`, t1.`EAMWOORIGINNAME`, t1.`EAMWOORIGINTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMWOORIGIN` t1 ) t1 where eamwooriginid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="WOOriginResultMap" type="cn.ibizlab.assetmanagement.core.workorder.domain.WOOrigin" autoMapping="true">
<id property="wooriginid" column="eamwooriginid" /><!--主键字段映射-->
<result property="wooriginname" column="eamwooriginname" />
<result property="woorigintype" column="eamwoorigintype" />
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.assetmanagement.core.workorder.filter.WOOriginSearchContext" resultMap="WOOriginResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMWOORIGINID`, t1.`EAMWOORIGINNAME`, t1.`EAMWOORIGINTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMWOORIGIN` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMWOORIGINID`, t1.`EAMWOORIGINNAME`, t1.`EAMWOORIGINTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMWOORIGIN` t1
]]>
</sql>
</mapper>
......@@ -60,6 +60,30 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMApplyType",
"delogicname":"维护申请类型",
"sysmoudle":{"id":"APPLY","name":"维护申请"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMPRODUCT",
"delogicname":"产品",
"sysmoudle":{"id":"ASSET","name":"资产管理"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMSparePartsPRO",
"delogicname":"备件包物料",
"sysmoudle":{"id":"ASSET","name":"资产管理"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMApplyStateModelLine",
"delogicname":"维护申请状态模型明细",
"sysmoudle":{"id":"APPLY","name":"维护申请"},
......@@ -68,6 +92,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMSparePartsGroup",
"delogicname":"备件包",
"sysmoudle":{"id":"ASSET","name":"资产管理"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMLocationStateModelLine",
"delogicname":"功能位置状态模型明细",
"sysmoudle":{"id":"LOCATION","name":"功能位置"},
......@@ -76,6 +108,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMAssetPartsGroup",
"delogicname":"资产备件包",
"sysmoudle":{"id":"ASSET","name":"资产管理"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMAsset",
"delogicname":"资产",
"sysmoudle":{"id":"ASSET","name":"资产管理"},
......@@ -113,7 +153,7 @@
{
"appid":"AssetManagement",
"appname":"资产管理",
"appmenu":[{"menuid":"AppIndexView", "menuname":"AppIndexView", "menuitem":[{ "id":"user_menus" , "name":"用户菜单" },{ "id":"top_menus" , "name":"顶部菜单" },{ "id":"left_exp" , "name":"左侧菜单" , "items":[{ "id":"menuitem1" , "name":"功能位置" , "items":[{ "id":"menuitem6" , "name":"功能位置状态" },{ "id":"menuitem7" , "name":"功能位置状态模型" },{ "id":"menuitem8" , "name":"功能位置类型" },{ "id":"menuitem9" , "name":"功能位置" }]},{ "id":"menuitem2" , "name":"资产管理" , "items":[{ "id":"menuitem10" , "name":"资产状态" },{ "id":"menuitem11" , "name":"资产状态模型" },{ "id":"menuitem12" , "name":"资产类型" },{ "id":"menuitem13" , "name":"资产管理" }]},{ "id":"menuitem3" , "name":"维护申请" },{ "id":"menuitem4" , "name":"工单管理" },{ "id":"menuitem5" , "name":"维护计划" }]}] }]
"appmenu":[{"menuid":"AppIndexView", "menuname":"AppIndexView", "menuitem":[{ "id":"user_menus" , "name":"用户菜单" },{ "id":"top_menus" , "name":"顶部菜单" },{ "id":"left_exp" , "name":"左侧菜单" , "items":[{ "id":"menuitem1" , "name":"功能位置" , "items":[{ "id":"menuitem6" , "name":"功能位置状态" },{ "id":"menuitem7" , "name":"功能位置状态模型" },{ "id":"menuitem8" , "name":"功能位置类型" },{ "id":"menuitem9" , "name":"功能位置" }]},{ "id":"menuitem2" , "name":"资产管理" , "items":[{ "id":"menuitem10" , "name":"资产状态" },{ "id":"menuitem11" , "name":"资产状态模型" },{ "id":"menuitem12" , "name":"资产类型" },{ "id":"menuitem13" , "name":"资产管理" },{ "id":"menuitem14" , "name":"备件包" }]},{ "id":"menuitem3" , "name":"维护申请" },{ "id":"menuitem4" , "name":"工单管理" },{ "id":"menuitem5" , "name":"维护计划" }]}] }]
}
]
}
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-provider-assetapi.jar
EXPOSE 8081
EXPOSE 10315
ADD assetmanagement-provider-assetapi.jar /assetmanagement-provider-assetapi.jar
......@@ -3,9 +3,25 @@ services:
assetmanagement-provider-assetapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest
ports:
- "8081:8081"
- "10315:10315"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10315
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
package cn.ibizlab.assetmanagement.assetapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.assetmanagement.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[EAMApplyTypeDTO]
*/
@Data
public class EAMApplyTypeDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [EAMAPPLYTYPEID]
*
*/
@JSONField(name = "eamapplytypeid")
@JsonProperty("eamapplytypeid")
private String eamapplytypeid;
/**
* 属性 [EAMAPPLYTYPENAME]
*
*/
@JSONField(name = "eamapplytypename")
@JsonProperty("eamapplytypename")
private String eamapplytypename;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [EAMAPPLYSTATEMODELID]
*
*/
@JSONField(name = "eamapplystatemodelid")
@JsonProperty("eamapplystatemodelid")
private String eamapplystatemodelid;
/**
* 设置 [EAMAPPLYTYPENAME]
*/
public void setEamapplytypename(String eamapplytypename){
this.eamapplytypename = eamapplytypename ;
this.modify("eamapplytypename",eamapplytypename);
}
/**
* 设置 [EAMAPPLYSTATEMODELID]
*/
public void setEamapplystatemodelid(String eamapplystatemodelid){
this.eamapplystatemodelid = eamapplystatemodelid ;
this.modify("eamapplystatemodelid",eamapplystatemodelid);
}
}
package cn.ibizlab.assetmanagement.assetapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.assetmanagement.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[EAMAssetPartsGroupDTO]
*/
@Data
public class EAMAssetPartsGroupDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [EAMASSETTYPEID]
*
*/
@JSONField(name = "eamassettypeid")
@JsonProperty("eamassettypeid")
private String eamassettypeid;
/**
* 属性 [EAMSPAREPARTSGROUPID]
*
*/
@JSONField(name = "eamsparepartsgroupid")
@JsonProperty("eamsparepartsgroupid")
private String eamsparepartsgroupid;
/**
* 属性 [EAMASSETPARTSGROUPID]
*
*/
@JSONField(name = "eamassetpartsgroupid")
@JsonProperty("eamassetpartsgroupid")
private String eamassetpartsgroupid;
/**
* 属性 [EAMASSETPARTSGROUPNAME]
*
*/
@JSONField(name = "eamassetpartsgroupname")
@JsonProperty("eamassetpartsgroupname")
private String eamassetpartsgroupname;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [EAMSPAREPARTSGROUPNAME]
*
*/
@JSONField(name = "eamsparepartsgroupname")
@JsonProperty("eamsparepartsgroupname")
private String eamsparepartsgroupname;
/**
* 属性 [EAMASSETTYPENAME]
*
*/
@JSONField(name = "eamassettypename")
@JsonProperty("eamassettypename")
private String eamassettypename;
/**
* 设置 [EAMASSETTYPEID]
*/
public void setEamassettypeid(String eamassettypeid){
this.eamassettypeid = eamassettypeid ;
this.modify("eamassettypeid",eamassettypeid);
}
/**
* 设置 [EAMSPAREPARTSGROUPID]
*/
public void setEamsparepartsgroupid(String eamsparepartsgroupid){
this.eamsparepartsgroupid = eamsparepartsgroupid ;
this.modify("eamsparepartsgroupid",eamsparepartsgroupid);
}
/**
* 设置 [EAMASSETPARTSGROUPNAME]
*/
public void setEamassetpartsgroupname(String eamassetpartsgroupname){
this.eamassetpartsgroupname = eamassetpartsgroupname ;
this.modify("eamassetpartsgroupname",eamassetpartsgroupname);
}
}
package cn.ibizlab.assetmanagement.assetapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.assetmanagement.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[EAMPRODUCTDTO]
*/
@Data
public class EAMPRODUCTDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [PRODUCTID]
*
*/
@JSONField(name = "productid")
@JsonProperty("productid")
private String productid;
/**
* 属性 [PRODUCTNAME]
*
*/
@JSONField(name = "productname")
@JsonProperty("productname")
private String productname;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [PRODUCTNUMBER]
*
*/
@JSONField(name = "productnumber")
@JsonProperty("productnumber")
private String productnumber;
/**
* 设置 [PRODUCTNAME]
*/
public void setProductname(String productname){
this.productname = productname ;
this.modify("productname",productname);
}
/**
* 设置 [PRODUCTNUMBER]
*/
public void setProductnumber(String productnumber){
this.productnumber = productnumber ;
this.modify("productnumber",productnumber);
}
}
package cn.ibizlab.assetmanagement.assetapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.assetmanagement.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[EAMSparePartsGroupDTO]
*/
@Data
public class EAMSparePartsGroupDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [EAMSPAREPARTSGROUPID]
*
*/
@JSONField(name = "eamsparepartsgroupid")
@JsonProperty("eamsparepartsgroupid")
private String eamsparepartsgroupid;
/**
* 属性 [EAMSPAREPARTSGROUPNAME]
*
*/
@JSONField(name = "eamsparepartsgroupname")
@JsonProperty("eamsparepartsgroupname")
private String eamsparepartsgroupname;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [SPAREPARTSGRPNUMBER]
*
*/
@JSONField(name = "sparepartsgrpnumber")
@JsonProperty("sparepartsgrpnumber")
private String sparepartsgrpnumber;
/**
* 设置 [EAMSPAREPARTSGROUPNAME]
*/
public void setEamsparepartsgroupname(String eamsparepartsgroupname){
this.eamsparepartsgroupname = eamsparepartsgroupname ;
this.modify("eamsparepartsgroupname",eamsparepartsgroupname);
}
/**
* 设置 [SPAREPARTSGRPNUMBER]
*/
public void setSparepartsgrpnumber(String sparepartsgrpnumber){
this.sparepartsgrpnumber = sparepartsgrpnumber ;
this.modify("sparepartsgrpnumber",sparepartsgrpnumber);
}
}
package cn.ibizlab.assetmanagement.assetapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.assetmanagement.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[EAMSparePartsPRODTO]
*/
@Data
public class EAMSparePartsPRODTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [EAMSPAREPARTSGROUPID]
*
*/
@JSONField(name = "eamsparepartsgroupid")
@JsonProperty("eamsparepartsgroupid")
private String eamsparepartsgroupid;
/**
* 属性 [PRODUCTID]
*
*/
@JSONField(name = "productid")
@JsonProperty("productid")
private String productid;
/**
* 属性 [EAMSPAREPARTSPROID]
*
*/
@JSONField(name = "eamsparepartsproid")
@JsonProperty("eamsparepartsproid")
private String eamsparepartsproid;
/**
* 属性 [EAMSPAREPARTSPRONAME]
*
*/
@JSONField(name = "eamsparepartsproname")
@JsonProperty("eamsparepartsproname")
private String eamsparepartsproname;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [EAMSPAREPARTSGROUPNAME]
*
*/
@JSONField(name = "eamsparepartsgroupname")
@JsonProperty("eamsparepartsgroupname")
private String eamsparepartsgroupname;
/**
* 属性 [PRODUCTNAME]
*
*/
@JSONField(name = "productname")
@JsonProperty("productname")
private String productname;
/**
* 属性 [PRODUCTNUMBER]
*
*/
@JSONField(name = "productnumber")
@JsonProperty("productnumber")
private String productnumber;
/**
* 设置 [EAMSPAREPARTSGROUPID]
*/
public void setEamsparepartsgroupid(String eamsparepartsgroupid){
this.eamsparepartsgroupid = eamsparepartsgroupid ;
this.modify("eamsparepartsgroupid",eamsparepartsgroupid);
}
/**
* 设置 [PRODUCTID]
*/
public void setProductid(String productid){
this.productid = productid ;
this.modify("productid",productid);
}
/**
* 设置 [EAMSPAREPARTSPRONAME]
*/
public void setEamsparepartsproname(String eamsparepartsproname){
this.eamsparepartsproname = eamsparepartsproname ;
this.modify("eamsparepartsproname",eamsparepartsproname);
}
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.apply.domain.EAMApplyType;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMApplyTypeDTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMApplyTypeMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMApplyTypeMapping extends MappingBase<EAMApplyTypeDTO, EAMApplyType> {
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMAssetPartsGroup;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMAssetPartsGroupDTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMAssetPartsGroupMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMAssetPartsGroupMapping extends MappingBase<EAMAssetPartsGroupDTO, EAMAssetPartsGroup> {
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMPRODUCT;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMPRODUCTDTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMPRODUCTMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMPRODUCTMapping extends MappingBase<EAMPRODUCTDTO, EAMPRODUCT> {
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsGroup;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMSparePartsGroupDTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMSparePartsGroupMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMSparePartsGroupMapping extends MappingBase<EAMSparePartsGroupDTO, EAMSparePartsGroup> {
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.asset.domain.EAMSparePartsPRO;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMSparePartsPRODTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMSparePartsPROMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMSparePartsPROMapping extends MappingBase<EAMSparePartsPRODTO, EAMSparePartsPRO> {
}
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizassetmanagement/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizassetmanagement/
mvn clean package -Passetmanagement
cd assetmanagement-app/assetmanagement-app-assetmanagement
mvn -Passetmanagement docker:build
mvn -Passetmanagement docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-app-assetmanagement.yaml iBizEE --with-registry-auth
mvn clean package -Passetapi
cd assetmanagement-provider/assetmanagement-provider-assetapi
mvn -Passetapi docker:build
mvn -Passetapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-provider-assetapi.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册