提交 63f81a83 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 部署微服务接口

上级 12e39fc1
......@@ -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:
......
......@@ -23,6 +23,10 @@ zuul:
path: /eamlocations/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eammonitorpoint:
path: /eammonitorpoints/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
eamassetstate:
path: /eamassetstates/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
......
......@@ -153,6 +153,13 @@ public class EAMPlan extends EntityMP implements Serializable {
@JSONField(name = "mdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("mdate")
private Timestamp mdate;
/**
* 内容
*/
@TableField(value = "content")
@JSONField(name = "content")
@JsonProperty("content")
private String content;
/**
*
......@@ -246,6 +253,14 @@ public class EAMPlan extends EntityMP implements Serializable {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(mdate);
}
/**
* 设置 [内容]
*/
public void setContent(String content){
this.content = content ;
this.modify("content",content);
}
}
......
......@@ -110,6 +110,55 @@ public class EAMPlanLine extends EntityMP implements Serializable {
@JSONField(name = "assetid")
@JsonProperty("assetid")
private String assetid;
/**
* 序号
*/
@TableField(value = "sortnumber")
@JSONField(name = "sortnumber")
@JsonProperty("sortnumber")
private Integer sortnumber;
/**
* 内容
*/
@TableField(value = "content")
@JSONField(name = "content")
@JsonProperty("content")
private String content;
/**
* 维护计划
*/
@TableField(exist = false)
@JSONField(name = "eamplanname")
@JsonProperty("eamplanname")
private String eamplanname;
/**
* 资产
*/
@TableField(exist = false)
@JSONField(name = "assetname")
@JsonProperty("assetname")
private String assetname;
/**
* 功能位置
*/
@TableField(exist = false)
@JSONField(name = "eamlocationname")
@JsonProperty("eamlocationname")
private String eamlocationname;
/**
* 测点标识
*/
@TableField(value = "eammonitorpointid")
@JSONField(name = "eammonitorpointid")
@JsonProperty("eammonitorpointid")
private String eammonitorpointid;
/**
* 测点
*/
@TableField(exist = false)
@JSONField(name = "eammonitorpointname")
@JsonProperty("eammonitorpointname")
private String eammonitorpointname;
/**
*
......@@ -127,6 +176,14 @@ public class EAMPlanLine 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.EAMMonitorPoint eammonitorpoint;
/**
*
*/
......@@ -169,6 +226,30 @@ public class EAMPlanLine extends EntityMP implements Serializable {
this.modify("assetid",assetid);
}
/**
* 设置 [序号]
*/
public void setSortnumber(Integer sortnumber){
this.sortnumber = sortnumber ;
this.modify("sortnumber",sortnumber);
}
/**
* 设置 [内容]
*/
public void setContent(String content){
this.content = content ;
this.modify("content",content);
}
/**
* 设置 [测点标识]
*/
public void setEammonitorpointid(String eammonitorpointid){
this.eammonitorpointid = eammonitorpointid ;
this.modify("eammonitorpointid",eammonitorpointid);
}
}
......
......@@ -55,6 +55,69 @@ public class EAMPlanLineSearchContext extends QueryWrapperContext<EAMPlanLine> {
this.getSearchCond().eq("assetid", n_assetid_eq);
}
}
private String n_eamplanname_eq;//[维护计划]
public void setN_eamplanname_eq(String n_eamplanname_eq) {
this.n_eamplanname_eq = n_eamplanname_eq;
if(!ObjectUtils.isEmpty(this.n_eamplanname_eq)){
this.getSearchCond().eq("eamplanname", n_eamplanname_eq);
}
}
private String n_eamplanname_like;//[维护计划]
public void setN_eamplanname_like(String n_eamplanname_like) {
this.n_eamplanname_like = n_eamplanname_like;
if(!ObjectUtils.isEmpty(this.n_eamplanname_like)){
this.getSearchCond().like("eamplanname", n_eamplanname_like);
}
}
private String n_assetname_eq;//[资产]
public void setN_assetname_eq(String n_assetname_eq) {
this.n_assetname_eq = n_assetname_eq;
if(!ObjectUtils.isEmpty(this.n_assetname_eq)){
this.getSearchCond().eq("assetname", n_assetname_eq);
}
}
private String n_assetname_like;//[资产]
public void setN_assetname_like(String n_assetname_like) {
this.n_assetname_like = n_assetname_like;
if(!ObjectUtils.isEmpty(this.n_assetname_like)){
this.getSearchCond().like("assetname", n_assetname_like);
}
}
private String n_eamlocationname_eq;//[功能位置]
public void setN_eamlocationname_eq(String n_eamlocationname_eq) {
this.n_eamlocationname_eq = n_eamlocationname_eq;
if(!ObjectUtils.isEmpty(this.n_eamlocationname_eq)){
this.getSearchCond().eq("eamlocationname", n_eamlocationname_eq);
}
}
private String n_eamlocationname_like;//[功能位置]
public void setN_eamlocationname_like(String n_eamlocationname_like) {
this.n_eamlocationname_like = n_eamlocationname_like;
if(!ObjectUtils.isEmpty(this.n_eamlocationname_like)){
this.getSearchCond().like("eamlocationname", n_eamlocationname_like);
}
}
private String n_eammonitorpointid_eq;//[测点标识]
public void setN_eammonitorpointid_eq(String n_eammonitorpointid_eq) {
this.n_eammonitorpointid_eq = n_eammonitorpointid_eq;
if(!ObjectUtils.isEmpty(this.n_eammonitorpointid_eq)){
this.getSearchCond().eq("eammonitorpointid", n_eammonitorpointid_eq);
}
}
private String n_eammonitorpointname_eq;//[测点]
public void setN_eammonitorpointname_eq(String n_eammonitorpointname_eq) {
this.n_eammonitorpointname_eq = n_eammonitorpointname_eq;
if(!ObjectUtils.isEmpty(this.n_eammonitorpointname_eq)){
this.getSearchCond().eq("eammonitorpointname", n_eammonitorpointname_eq);
}
}
private String n_eammonitorpointname_like;//[测点]
public void setN_eammonitorpointname_like(String n_eammonitorpointname_like) {
this.n_eammonitorpointname_like = n_eammonitorpointname_like;
if(!ObjectUtils.isEmpty(this.n_eammonitorpointname_like)){
this.getSearchCond().like("eammonitorpointname", n_eammonitorpointname_like);
}
}
/**
* 启用快速搜索
......
......@@ -66,6 +66,8 @@ public interface EAMPlanLineMapper extends BaseMapper<EAMPlanLine>{
List<EAMPlanLine> selectByEamlocationid(@Param("eamlocationid") Serializable eamlocationid) ;
List<EAMPlanLine> selectByEammonitorpointid(@Param("eammonitorpointid") Serializable eammonitorpointid) ;
List<EAMPlanLine> selectByEamplanid(@Param("eamplanid") Serializable eamplanid) ;
}
......@@ -41,6 +41,8 @@ public interface IEAMPlanLineService extends IService<EAMPlanLine>{
void removeByAssetid(String assetid) ;
List<EAMPlanLine> selectByEamlocationid(String eamlocationid) ;
void removeByEamlocationid(String eamlocationid) ;
List<EAMPlanLine> selectByEammonitorpointid(String eammonitorpointid) ;
void removeByEammonitorpointid(String eammonitorpointid) ;
List<EAMPlanLine> selectByEamplanid(String eamplanid) ;
void removeByEamplanid(String eamplanid) ;
/**
......
......@@ -53,6 +53,9 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
protected cn.ibizlab.assetmanagement.core.location.service.IEAMLocationService eamlocationService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.workorder.service.IEAMMonitorPointService eammonitorpointService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.plan.service.IEAMPlanService eamplanService;
protected int batchSize = 500;
......@@ -60,6 +63,7 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
@Override
@Transactional
public boolean create(EAMPlanLine et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getEamplanlineid()),et);
......@@ -68,12 +72,14 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
@Override
public void createBatch(List<EAMPlanLine> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(EAMPlanLine et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("eamplanlineid",et.getEamplanlineid())))
return false;
CachedBeanCopier.copy(get(et.getEamplanlineid()),et);
......@@ -82,6 +88,7 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
@Override
public void updateBatch(List<EAMPlanLine> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
......@@ -112,6 +119,7 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
@Override
public EAMPlanLine getDraft(EAMPlanLine et) {
fillParentData(et);
return et;
}
......@@ -139,12 +147,14 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
@Override
public boolean saveBatch(Collection<EAMPlanLine> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<EAMPlanLine> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
......@@ -169,6 +179,16 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
this.remove(new QueryWrapper<EAMPlanLine>().eq("eamlocationid",eamlocationid));
}
@Override
public List<EAMPlanLine> selectByEammonitorpointid(String eammonitorpointid) {
return baseMapper.selectByEammonitorpointid(eammonitorpointid);
}
@Override
public void removeByEammonitorpointid(String eammonitorpointid) {
this.remove(new QueryWrapper<EAMPlanLine>().eq("eammonitorpointid",eammonitorpointid));
}
@Override
public List<EAMPlanLine> selectByEamplanid(String eamplanid) {
return baseMapper.selectByEamplanid(eamplanid);
......@@ -191,6 +211,52 @@ public class EAMPlanLineServiceImpl extends ServiceImpl<EAMPlanLineMapper, EAMPl
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(EAMPlanLine et){
//实体关系[DER1N_EAMPLANLINE_EAMASSET_ASSETID]
if(!ObjectUtils.isEmpty(et.getAssetid())){
cn.ibizlab.assetmanagement.core.asset.domain.EAMAsset asset=et.getAsset();
if(ObjectUtils.isEmpty(asset)){
cn.ibizlab.assetmanagement.core.asset.domain.EAMAsset majorEntity=eamassetService.get(et.getAssetid());
et.setAsset(majorEntity);
asset=majorEntity;
}
et.setAssetname(asset.getAssetname());
}
//实体关系[DER1N_EAMPLANLINE_EAMLOCATION_EAMLOCATIONID]
if(!ObjectUtils.isEmpty(et.getEamlocationid())){
cn.ibizlab.assetmanagement.core.location.domain.EAMLocation eamlocation=et.getEamlocation();
if(ObjectUtils.isEmpty(eamlocation)){
cn.ibizlab.assetmanagement.core.location.domain.EAMLocation majorEntity=eamlocationService.get(et.getEamlocationid());
et.setEamlocation(majorEntity);
eamlocation=majorEntity;
}
et.setEamlocationname(eamlocation.getEamlocationname());
}
//实体关系[DER1N_EAMPLANLINE_EAMMONITORPOINT_EAMMONITORPOINTID]
if(!ObjectUtils.isEmpty(et.getEammonitorpointid())){
cn.ibizlab.assetmanagement.core.workorder.domain.EAMMonitorPoint eammonitorpoint=et.getEammonitorpoint();
if(ObjectUtils.isEmpty(eammonitorpoint)){
cn.ibizlab.assetmanagement.core.workorder.domain.EAMMonitorPoint majorEntity=eammonitorpointService.get(et.getEammonitorpointid());
et.setEammonitorpoint(majorEntity);
eammonitorpoint=majorEntity;
}
et.setEammonitorpointname(eammonitorpoint.getEammonitorpointname());
}
//实体关系[DER1N_EAMPLANLINE_EAMPLAN_EAMPLANID]
if(!ObjectUtils.isEmpty(et.getEamplanid())){
cn.ibizlab.assetmanagement.core.plan.domain.EAMPlan eamplan=et.getEamplan();
if(ObjectUtils.isEmpty(eamplan)){
cn.ibizlab.assetmanagement.core.plan.domain.EAMPlan majorEntity=eamplanService.get(et.getEamplanid());
et.setEamplan(majorEntity);
eamplan=majorEntity;
}
et.setEamplanname(eamplan.getEamplanname());
}
}
......
......@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service("EAMMonitorPointServiceImpl")
public class EAMMonitorPointServiceImpl extends ServiceImpl<EAMMonitorPointMapper, EAMMonitorPoint> implements IEAMMonitorPointService {
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.plan.service.IEAMPlanLineService eamplanlineService;
@Autowired
@Lazy
protected cn.ibizlab.assetmanagement.core.plan.service.IEAMPlanService eamplanService;
......
......@@ -394,7 +394,7 @@
<!--输出实体[EAMMONITORPOINT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eammonitorpoint-6-17">
<changeSet author="a_LAB01_e85d8801c" id="tab-eammonitorpoint-10-17">
<createTable tableName="EAMMONITORPOINT">
<column name="EAMMONITORPOINTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_EAMMONITORPOINT_EAMMONITORP"/>
......@@ -436,7 +436,7 @@
<!--输出实体[EAMPLAN]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamplan-44-19">
<changeSet author="a_LAB01_e85d8801c" id="tab-eamplan-49-19">
<createTable tableName="EAMPLAN">
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
......@@ -463,6 +463,8 @@
</column>
<column name="MDATE" remarks="" type="DATETIME">
</column>
<column name="CONTENT" remarks="" type="VARCHAR(2000)">
</column>
</createTable>
</changeSet>
......@@ -490,7 +492,7 @@
<!--输出实体[EAMPLANLINE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamplanline-9-21">
<changeSet author="a_LAB01_e85d8801c" id="tab-eamplanline-22-21">
<createTable tableName="EAMPLANLINE">
<column name="EAMPLANLINEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_EAMPLANLINE_EAMPLANLINEID"/>
......@@ -511,6 +513,12 @@
</column>
<column name="ASSETID" remarks="" type="VARCHAR(100)">
</column>
<column name="SORTNUMBER" remarks="" type="INT">
</column>
<column name="CONTENT" remarks="" type="VARCHAR(2000)">
</column>
<column name="EAMMONITORPOINTID" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
......@@ -834,13 +842,13 @@
<!--输出实体[EAMMONITORPOINT]外键关系 -->
<!--输出实体[EAMPRODUCT]外键关系 -->
<!--输出实体[EAMPLAN]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-44-54">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-49-54">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="EAMPLAN" constraintName="DER1N_EAMPLAN_EAMASSET_ASSETID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-44-55">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-49-55">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="EAMPLAN" constraintName="DER1N_EAMPLAN_EAMLOCATION_EAML" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-44-56">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplan-49-56">
<addForeignKeyConstraint baseColumnNames="EAMMONITORPOINTID" baseTableName="EAMPLAN" constraintName="DER1N_EAMPLAN_EAMMONITORPOINT_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMMONITORPOINTID" referencedTableName="EAMMONITORPOINT" validate="true"/>
</changeSet>
<!--输出实体[EAMPLANCDT]外键关系 -->
......@@ -848,55 +856,58 @@
<addForeignKeyConstraint baseColumnNames="EAMPLANID" baseTableName="EAMPLANCDT" constraintName="DER1N_EAMPLANCDT_EAMPLAN_EAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMPLANID" referencedTableName="EAMPLAN" validate="true"/>
</changeSet>
<!--输出实体[EAMPLANLINE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanline-9-58">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanline-22-58">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="EAMPLANLINE" constraintName="DER1N_EAMPLANLINE_EAMASSET_ASS" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanline-9-59">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanline-22-59">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="EAMPLANLINE" constraintName="DER1N_EAMPLANLINE_EAMLOCATION_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanline-9-60">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanline-22-60">
<addForeignKeyConstraint baseColumnNames="EAMMONITORPOINTID" baseTableName="EAMPLANLINE" constraintName="DER1N_EAMPLANLINE_EAMMONITORPO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMMONITORPOINTID" referencedTableName="EAMMONITORPOINT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanline-22-61">
<addForeignKeyConstraint baseColumnNames="EAMPLANID" baseTableName="EAMPLANLINE" constraintName="DER1N_EAMPLANLINE_EAMPLAN_EAMP" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMPLANID" referencedTableName="EAMPLAN" validate="true"/>
</changeSet>
<!--输出实体[EAMPLANSCHEDULE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanschedule-7-61">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamplanschedule-7-62">
<addForeignKeyConstraint baseColumnNames="EAMPLANID" baseTableName="EAMPLANSCHEDULE" constraintName="DER1N_EAMPLANSCHEDULE_EAMPLAN_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMPLANID" referencedTableName="EAMPLAN" validate="true"/>
</changeSet>
<!--输出实体[EAMSERVICELEVEL]外键关系 -->
<!--输出实体[EAMSPAREPARTSGROUP]外键关系 -->
<!--输出实体[EAMSPAREPARTSPRO]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamsparepartspro-20-62">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamsparepartspro-20-63">
<addForeignKeyConstraint baseColumnNames="PRODUCTID" baseTableName="EAMSPAREPARTSPRO" constraintName="DER1N_EAMSPAREPARTSPRO_EAMPROD" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRODUCTID" referencedTableName="PRODUCT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamsparepartspro-20-63">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamsparepartspro-20-64">
<addForeignKeyConstraint baseColumnNames="EAMSPAREPARTSGROUPID" baseTableName="EAMSPAREPARTSPRO" constraintName="DER1N_EAMSPAREPARTSPRO_EAMSPAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMSPAREPARTSGROUPID" referencedTableName="EAMSPAREPARTSGROUP" validate="true"/>
</changeSet>
<!--输出实体[EAMWOSTATE]外键关系 -->
<!--输出实体[EAMWOSTATEMODEL]外键关系 -->
<!--输出实体[EAMWOSTATEMODELLINE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamwostatemodelline-7-64">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamwostatemodelline-7-65">
<addForeignKeyConstraint baseColumnNames="EAMWOSTATEMODELID" baseTableName="EAMWOSTATEMODELLINE" constraintName="DER1N_EAMWOSTATEMODELLINE_EAMW" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOSTATEMODELID" referencedTableName="EAMWOSTATEMODEL" validate="true"/>
</changeSet>
<!--输出实体[EAMWOTYPE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamwotype-17-66">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamwotype-17-67">
<addForeignKeyConstraint baseColumnNames="EAMWOSTATEMODELID" baseTableName="EAMWOTYPE" constraintName="DER1N_EAMWOTYPE_EAMWOSTATEMODE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOSTATEMODELID" referencedTableName="EAMWOSTATEMODEL" validate="true"/>
</changeSet>
<!--输出实体[EAMWORKORDER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-67">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-68">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMASSET_AS" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-68">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-69">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMLOCATION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-69">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-70">
<addForeignKeyConstraint baseColumnNames="EAMSERVICELEVELID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMSERVICEL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMSERVICELEVELID" referencedTableName="EAMSERVICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-70">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-71">
<addForeignKeyConstraint baseColumnNames="EAMWOORIGINID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWOORIGIN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOORIGINID" referencedTableName="EAMWOORIGIN" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-71">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-72">
<addForeignKeyConstraint baseColumnNames="PWORKORDERID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWORKORDE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WORKORDERID" referencedTableName="WORKORDER" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-72">
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-81-73">
<addForeignKeyConstraint baseColumnNames="EAMWOTYPEID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWOTYPE_E" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOTYPEID" referencedTableName="EAMWOTYPE" validate="true"/>
</changeSet>
<!--输出实体[EAMWOORIGIN]外键关系 -->
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="EAMPlanResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t31.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANNAME`, t1.`MDATE`, t1.`PLANNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLAN` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t31 ON t1.EAMMONITORPOINTID = t31.EAMMONITORPOINTID ) t1 where eamplanid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`CONTENT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t31.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANNAME`, t1.`MDATE`, t1.`PLANNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLAN` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t31 ON t1.EAMMONITORPOINTID = t31.EAMMONITORPOINTID ) t1 where eamplanid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -57,12 +57,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t31.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANNAME`, t1.`MDATE`, t1.`PLANNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLAN` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t31 ON t1.EAMMONITORPOINTID = t31.EAMMONITORPOINTID
<![CDATA[ SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`CONTENT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t31.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANNAME`, t1.`MDATE`, t1.`PLANNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLAN` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t31 ON t1.EAMMONITORPOINTID = t31.EAMMONITORPOINTID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t31.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANNAME`, t1.`MDATE`, t1.`PLANNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLAN` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t31 ON t1.EAMMONITORPOINTID = t31.EAMMONITORPOINTID
<![CDATA[ SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`CONTENT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t31.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANNAME`, t1.`MDATE`, t1.`PLANNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLAN` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t31 ON t1.EAMMONITORPOINTID = t31.EAMMONITORPOINTID
]]>
</sql>
</mapper>
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="EAMPlanLineResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMPLANID`, t1.`EAMPLANLINEID`, t1.`EAMPLANLINENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLANLINE` t1 ) t1 where eamplanlineid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`ASSETID`, t21.`ASSETNAME`, t1.`CONTENT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t31.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t41.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANLINEID`, t1.`EAMPLANLINENAME`, t11.`EAMPLANNAME`, t1.`SORTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLANLINE` t1 LEFT JOIN EAMPLAN t11 ON t1.EAMPLANID = t11.EAMPLANID LEFT JOIN ASSET t21 ON t1.ASSETID = t21.ASSETID LEFT JOIN EAMLOCATION t31 ON t1.EAMLOCATIONID = t31.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t41 ON t1.EAMMONITORPOINTID = t41.EAMMONITORPOINTID ) t1 where eamplanlineid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -14,6 +14,7 @@
<result property="eamplanid" column="eamplanid" />
<result property="eamlocationid" column="eamlocationid" />
<result property="assetid" column="assetid" />
<result property="eammonitorpointid" column="eammonitorpointid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
......@@ -21,6 +22,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="eammonitorpoint" javaType="cn.ibizlab.assetmanagement.core.workorder.domain.EAMMonitorPoint" column="eammonitorpointid" select="cn.ibizlab.assetmanagement.core.workorder.mapper.EAMMonitorPointMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="eamplan" javaType="cn.ibizlab.assetmanagement.core.plan.domain.EAMPlan" column="eamplanid" select="cn.ibizlab.assetmanagement.core.plan.mapper.EAMPlanMapper.selectById" fetchType="lazy"></association>
</resultMap>
......@@ -37,6 +40,13 @@
<include refid="Default" />
) t1
where eamlocationid=#{eamlocationid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMPLANLINE_EAMMONITORPOINT_EAMMONITORPOINTID] -->
<select id="selectByEammonitorpointid" resultMap="EAMPlanLineResultMap">
select t1.* from (
<include refid="Default" />
) t1
where eammonitorpointid=#{eammonitorpointid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_EAMPLANLINE_EAMPLAN_EAMPLANID] -->
<select id="selectByEamplanid" resultMap="EAMPlanLineResultMap">
......@@ -57,12 +67,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMPLANID`, t1.`EAMPLANLINEID`, t1.`EAMPLANLINENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLANLINE` t1
<![CDATA[ SELECT t1.`ASSETID`, t21.`ASSETNAME`, t1.`CONTENT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t31.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t41.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANLINEID`, t1.`EAMPLANLINENAME`, t11.`EAMPLANNAME`, t1.`SORTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLANLINE` t1 LEFT JOIN EAMPLAN t11 ON t1.EAMPLANID = t11.EAMPLANID LEFT JOIN ASSET t21 ON t1.ASSETID = t21.ASSETID LEFT JOIN EAMLOCATION t31 ON t1.EAMLOCATIONID = t31.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t41 ON t1.EAMMONITORPOINTID = t41.EAMMONITORPOINTID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t1.`EAMPLANID`, t1.`EAMPLANLINEID`, t1.`EAMPLANLINENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLANLINE` t1
<![CDATA[ SELECT t1.`ASSETID`, t21.`ASSETNAME`, t1.`CONTENT`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t31.`EAMLOCATIONNAME`, t1.`EAMMONITORPOINTID`, t41.`EAMMONITORPOINTNAME`, t1.`EAMPLANID`, t1.`EAMPLANLINEID`, t1.`EAMPLANLINENAME`, t11.`EAMPLANNAME`, t1.`SORTNUMBER`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `EAMPLANLINE` t1 LEFT JOIN EAMPLAN t11 ON t1.EAMPLANID = t11.EAMPLANID LEFT JOIN ASSET t21 ON t1.ASSETID = t21.ASSETID LEFT JOIN EAMLOCATION t31 ON t1.EAMLOCATIONID = t31.EAMLOCATIONID LEFT JOIN EAMMONITORPOINT t41 ON t1.EAMMONITORPOINTID = t41.EAMMONITORPOINTID
]]>
</sql>
</mapper>
......
......@@ -36,6 +36,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"EAMMonitorPoint",
"delogicname":"测点",
"sysmoudle":{"id":"WORKORDER","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":"EAMAssetState",
"delogicname":"资产状态",
"sysmoudle":{"id":"ASSET","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 cn.ibizlab.assetmanagement.util.domain.DTOClient;
import lombok.Data;
/**
* 服务DTO对象[EAMMonitorPointDTO]
*/
@Data
public class EAMMonitorPointDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [EAMMONITORPOINTID]
*
*/
@JSONField(name = "eammonitorpointid")
@JsonProperty("eammonitorpointid")
private String eammonitorpointid;
/**
* 属性 [EAMMONITORPOINTNAME]
*
*/
@JSONField(name = "eammonitorpointname")
@JsonProperty("eammonitorpointname")
private String eammonitorpointname;
/**
* 属性 [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;
/**
* 属性 [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;
/**
* 设置 [EAMMONITORPOINTNAME]
*/
public void setEammonitorpointname(String eammonitorpointname){
this.eammonitorpointname = eammonitorpointname ;
this.modify("eammonitorpointname",eammonitorpointname);
}
}
......@@ -147,6 +147,14 @@ public class EAMPlanDTO extends DTOBase implements Serializable {
@JsonProperty("mdate")
private Timestamp mdate;
/**
* 属性 [CONTENT]
*
*/
@JSONField(name = "content")
@JsonProperty("content")
private String content;
/**
* 设置 [EAMPLANNAME]
......@@ -204,6 +212,14 @@ public class EAMPlanDTO extends DTOBase implements Serializable {
this.modify("mdate",mdate);
}
/**
* 设置 [CONTENT]
*/
public void setContent(String content){
this.content = content ;
this.modify("content",content);
}
}
......@@ -98,6 +98,62 @@ public class EAMPlanLineDTO extends DTOBase implements Serializable {
@JsonProperty("assetid")
private String assetid;
/**
* 属性 [SORTNUMBER]
*
*/
@JSONField(name = "sortnumber")
@JsonProperty("sortnumber")
private Integer sortnumber;
/**
* 属性 [CONTENT]
*
*/
@JSONField(name = "content")
@JsonProperty("content")
private String content;
/**
* 属性 [EAMPLANNAME]
*
*/
@JSONField(name = "eamplanname")
@JsonProperty("eamplanname")
private String eamplanname;
/**
* 属性 [ASSETNAME]
*
*/
@JSONField(name = "assetname")
@JsonProperty("assetname")
private String assetname;
/**
* 属性 [EAMLOCATIONNAME]
*
*/
@JSONField(name = "eamlocationname")
@JsonProperty("eamlocationname")
private String eamlocationname;
/**
* 属性 [EAMMONITORPOINTID]
*
*/
@JSONField(name = "eammonitorpointid")
@JsonProperty("eammonitorpointid")
private String eammonitorpointid;
/**
* 属性 [EAMMONITORPOINTNAME]
*
*/
@JSONField(name = "eammonitorpointname")
@JsonProperty("eammonitorpointname")
private String eammonitorpointname;
/**
* 设置 [EAMPLANLINENAME]
......@@ -131,6 +187,30 @@ public class EAMPlanLineDTO extends DTOBase implements Serializable {
this.modify("assetid",assetid);
}
/**
* 设置 [SORTNUMBER]
*/
public void setSortnumber(Integer sortnumber){
this.sortnumber = sortnumber ;
this.modify("sortnumber",sortnumber);
}
/**
* 设置 [CONTENT]
*/
public void setContent(String content){
this.content = content ;
this.modify("content",content);
}
/**
* 设置 [EAMMONITORPOINTID]
*/
public void setEammonitorpointid(String eammonitorpointid){
this.eammonitorpointid = eammonitorpointid ;
this.modify("eammonitorpointid",eammonitorpointid);
}
}
package cn.ibizlab.assetmanagement.assetapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.assetmanagement.core.workorder.domain.EAMMonitorPoint;
import cn.ibizlab.assetmanagement.assetapi.dto.EAMMonitorPointDTO;
import cn.ibizlab.assetmanagement.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="AssetApiEAMMonitorPointMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface EAMMonitorPointMapping extends MappingBase<EAMMonitorPointDTO, EAMMonitorPoint> {
}
package cn.ibizlab.assetmanagement.assetapi.rest;
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 lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.assetmanagement.assetapi.dto.*;
import cn.ibizlab.assetmanagement.assetapi.mapping.*;
import cn.ibizlab.assetmanagement.core.workorder.domain.EAMMonitorPoint;
import cn.ibizlab.assetmanagement.core.workorder.service.IEAMMonitorPointService;
import cn.ibizlab.assetmanagement.core.workorder.filter.EAMMonitorPointSearchContext;
import cn.ibizlab.assetmanagement.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"测点" })
@RestController("AssetApi-eammonitorpoint")
@RequestMapping("")
public class EAMMonitorPointResource {
@Autowired
public IEAMMonitorPointService eammonitorpointService;
@Autowired
@Lazy
public EAMMonitorPointMapping eammonitorpointMapping;
@PreAuthorize("hasPermission(this.eammonitorpointMapping.toDomain(#eammonitorpointdto),'iBizAssetManagement-EAMMonitorPoint-Create')")
@ApiOperation(value = "新建测点", tags = {"测点" }, notes = "新建测点")
@RequestMapping(method = RequestMethod.POST, value = "/eammonitorpoints")
@Transactional
public ResponseEntity<EAMMonitorPointDTO> create(@RequestBody EAMMonitorPointDTO eammonitorpointdto) {
EAMMonitorPoint domain = eammonitorpointMapping.toDomain(eammonitorpointdto);
eammonitorpointService.create(domain);
EAMMonitorPointDTO dto = eammonitorpointMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eammonitorpointMapping.toDomain(#eammonitorpointdtos),'iBizAssetManagement-EAMMonitorPoint-Create')")
@ApiOperation(value = "批量新建测点", tags = {"测点" }, notes = "批量新建测点")
@RequestMapping(method = RequestMethod.POST, value = "/eammonitorpoints/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<EAMMonitorPointDTO> eammonitorpointdtos) {
eammonitorpointService.createBatch(eammonitorpointMapping.toDomain(eammonitorpointdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eammonitorpoint" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eammonitorpointService.get(#eammonitorpoint_id),'iBizAssetManagement-EAMMonitorPoint-Update')")
@ApiOperation(value = "更新测点", tags = {"测点" }, notes = "更新测点")
@RequestMapping(method = RequestMethod.PUT, value = "/eammonitorpoints/{eammonitorpoint_id}")
@Transactional
public ResponseEntity<EAMMonitorPointDTO> update(@PathVariable("eammonitorpoint_id") String eammonitorpoint_id, @RequestBody EAMMonitorPointDTO eammonitorpointdto) {
EAMMonitorPoint domain = eammonitorpointMapping.toDomain(eammonitorpointdto);
domain .setEammonitorpointid(eammonitorpoint_id);
eammonitorpointService.update(domain );
EAMMonitorPointDTO dto = eammonitorpointMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eammonitorpointService.getEammonitorpointByEntities(this.eammonitorpointMapping.toDomain(#eammonitorpointdtos)),'iBizAssetManagement-EAMMonitorPoint-Update')")
@ApiOperation(value = "批量更新测点", tags = {"测点" }, notes = "批量更新测点")
@RequestMapping(method = RequestMethod.PUT, value = "/eammonitorpoints/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<EAMMonitorPointDTO> eammonitorpointdtos) {
eammonitorpointService.updateBatch(eammonitorpointMapping.toDomain(eammonitorpointdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eammonitorpointService.get(#eammonitorpoint_id),'iBizAssetManagement-EAMMonitorPoint-Remove')")
@ApiOperation(value = "删除测点", tags = {"测点" }, notes = "删除测点")
@RequestMapping(method = RequestMethod.DELETE, value = "/eammonitorpoints/{eammonitorpoint_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("eammonitorpoint_id") String eammonitorpoint_id) {
return ResponseEntity.status(HttpStatus.OK).body(eammonitorpointService.remove(eammonitorpoint_id));
}
@PreAuthorize("hasPermission(this.eammonitorpointService.getEammonitorpointByIds(#ids),'iBizAssetManagement-EAMMonitorPoint-Remove')")
@ApiOperation(value = "批量删除测点", tags = {"测点" }, notes = "批量删除测点")
@RequestMapping(method = RequestMethod.DELETE, value = "/eammonitorpoints/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
eammonitorpointService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eammonitorpointMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMMonitorPoint-Get')")
@ApiOperation(value = "获取测点", tags = {"测点" }, notes = "获取测点")
@RequestMapping(method = RequestMethod.GET, value = "/eammonitorpoints/{eammonitorpoint_id}")
public ResponseEntity<EAMMonitorPointDTO> get(@PathVariable("eammonitorpoint_id") String eammonitorpoint_id) {
EAMMonitorPoint domain = eammonitorpointService.get(eammonitorpoint_id);
EAMMonitorPointDTO dto = eammonitorpointMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取测点草稿", tags = {"测点" }, notes = "获取测点草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eammonitorpoints/getdraft")
public ResponseEntity<EAMMonitorPointDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(eammonitorpointMapping.toDto(eammonitorpointService.getDraft(new EAMMonitorPoint())));
}
@ApiOperation(value = "检查测点", tags = {"测点" }, notes = "检查测点")
@RequestMapping(method = RequestMethod.POST, value = "/eammonitorpoints/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody EAMMonitorPointDTO eammonitorpointdto) {
return ResponseEntity.status(HttpStatus.OK).body(eammonitorpointService.checkKey(eammonitorpointMapping.toDomain(eammonitorpointdto)));
}
@PreAuthorize("hasPermission(this.eammonitorpointMapping.toDomain(#eammonitorpointdto),'iBizAssetManagement-EAMMonitorPoint-Save')")
@ApiOperation(value = "保存测点", tags = {"测点" }, notes = "保存测点")
@RequestMapping(method = RequestMethod.POST, value = "/eammonitorpoints/save")
public ResponseEntity<Boolean> save(@RequestBody EAMMonitorPointDTO eammonitorpointdto) {
return ResponseEntity.status(HttpStatus.OK).body(eammonitorpointService.save(eammonitorpointMapping.toDomain(eammonitorpointdto)));
}
@PreAuthorize("hasPermission(this.eammonitorpointMapping.toDomain(#eammonitorpointdtos),'iBizAssetManagement-EAMMonitorPoint-Save')")
@ApiOperation(value = "批量保存测点", tags = {"测点" }, notes = "批量保存测点")
@RequestMapping(method = RequestMethod.POST, value = "/eammonitorpoints/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<EAMMonitorPointDTO> eammonitorpointdtos) {
eammonitorpointService.saveBatch(eammonitorpointMapping.toDomain(eammonitorpointdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMMonitorPoint-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMMonitorPoint-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"测点" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eammonitorpoints/fetchdefault")
public ResponseEntity<List<EAMMonitorPointDTO>> fetchDefault(EAMMonitorPointSearchContext context) {
Page<EAMMonitorPoint> domains = eammonitorpointService.searchDefault(context) ;
List<EAMMonitorPointDTO> list = eammonitorpointMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMMonitorPoint-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMMonitorPoint-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"测点" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eammonitorpoints/searchdefault")
public ResponseEntity<Page<EAMMonitorPointDTO>> searchDefault(@RequestBody EAMMonitorPointSearchContext context) {
Page<EAMMonitorPoint> domains = eammonitorpointService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eammonitorpointMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -160,5 +160,138 @@ public class EAMPlanLineResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamplanlineMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.eamplanlineMapping.toDomain(#eamplanlinedto),'iBizAssetManagement-EAMPlanLine-Create')")
@ApiOperation(value = "根据维护计划建立计划步骤", tags = {"计划步骤" }, notes = "根据维护计划建立计划步骤")
@RequestMapping(method = RequestMethod.POST, value = "/eamplans/{eamplan_id}/eamplanlines")
@Transactional
public ResponseEntity<EAMPlanLineDTO> createByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @RequestBody EAMPlanLineDTO eamplanlinedto) {
EAMPlanLine domain = eamplanlineMapping.toDomain(eamplanlinedto);
domain.setEamplanid(eamplan_id);
eamplanlineService.create(domain);
EAMPlanLineDTO dto = eamplanlineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamplanlineMapping.toDomain(#eamplanlinedtos),'iBizAssetManagement-EAMPlanLine-Create')")
@ApiOperation(value = "根据维护计划批量建立计划步骤", tags = {"计划步骤" }, notes = "根据维护计划批量建立计划步骤")
@RequestMapping(method = RequestMethod.POST, value = "/eamplans/{eamplan_id}/eamplanlines/batch")
public ResponseEntity<Boolean> createBatchByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @RequestBody List<EAMPlanLineDTO> eamplanlinedtos) {
List<EAMPlanLine> domainlist=eamplanlineMapping.toDomain(eamplanlinedtos);
for(EAMPlanLine domain:domainlist){
domain.setEamplanid(eamplan_id);
}
eamplanlineService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eamplanline" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eamplanlineService.get(#eamplanline_id),'iBizAssetManagement-EAMPlanLine-Update')")
@ApiOperation(value = "根据维护计划更新计划步骤", tags = {"计划步骤" }, notes = "根据维护计划更新计划步骤")
@RequestMapping(method = RequestMethod.PUT, value = "/eamplans/{eamplan_id}/eamplanlines/{eamplanline_id}")
@Transactional
public ResponseEntity<EAMPlanLineDTO> updateByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @PathVariable("eamplanline_id") String eamplanline_id, @RequestBody EAMPlanLineDTO eamplanlinedto) {
EAMPlanLine domain = eamplanlineMapping.toDomain(eamplanlinedto);
domain.setEamplanid(eamplan_id);
domain.setEamplanlineid(eamplanline_id);
eamplanlineService.update(domain);
EAMPlanLineDTO dto = eamplanlineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamplanlineService.getEamplanlineByEntities(this.eamplanlineMapping.toDomain(#eamplanlinedtos)),'iBizAssetManagement-EAMPlanLine-Update')")
@ApiOperation(value = "根据维护计划批量更新计划步骤", tags = {"计划步骤" }, notes = "根据维护计划批量更新计划步骤")
@RequestMapping(method = RequestMethod.PUT, value = "/eamplans/{eamplan_id}/eamplanlines/batch")
public ResponseEntity<Boolean> updateBatchByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @RequestBody List<EAMPlanLineDTO> eamplanlinedtos) {
List<EAMPlanLine> domainlist=eamplanlineMapping.toDomain(eamplanlinedtos);
for(EAMPlanLine domain:domainlist){
domain.setEamplanid(eamplan_id);
}
eamplanlineService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eamplanlineService.get(#eamplanline_id),'iBizAssetManagement-EAMPlanLine-Remove')")
@ApiOperation(value = "根据维护计划删除计划步骤", tags = {"计划步骤" }, notes = "根据维护计划删除计划步骤")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamplans/{eamplan_id}/eamplanlines/{eamplanline_id}")
@Transactional
public ResponseEntity<Boolean> removeByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @PathVariable("eamplanline_id") String eamplanline_id) {
return ResponseEntity.status(HttpStatus.OK).body(eamplanlineService.remove(eamplanline_id));
}
@PreAuthorize("hasPermission(this.eamplanlineService.getEamplanlineByIds(#ids),'iBizAssetManagement-EAMPlanLine-Remove')")
@ApiOperation(value = "根据维护计划批量删除计划步骤", tags = {"计划步骤" }, notes = "根据维护计划批量删除计划步骤")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamplans/{eamplan_id}/eamplanlines/batch")
public ResponseEntity<Boolean> removeBatchByEAMPlan(@RequestBody List<String> ids) {
eamplanlineService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eamplanlineMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMPlanLine-Get')")
@ApiOperation(value = "根据维护计划获取计划步骤", tags = {"计划步骤" }, notes = "根据维护计划获取计划步骤")
@RequestMapping(method = RequestMethod.GET, value = "/eamplans/{eamplan_id}/eamplanlines/{eamplanline_id}")
public ResponseEntity<EAMPlanLineDTO> getByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @PathVariable("eamplanline_id") String eamplanline_id) {
EAMPlanLine domain = eamplanlineService.get(eamplanline_id);
EAMPlanLineDTO dto = eamplanlineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "根据维护计划获取计划步骤草稿", tags = {"计划步骤" }, notes = "根据维护计划获取计划步骤草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eamplans/{eamplan_id}/eamplanlines/getdraft")
public ResponseEntity<EAMPlanLineDTO> getDraftByEAMPlan(@PathVariable("eamplan_id") String eamplan_id) {
EAMPlanLine domain = new EAMPlanLine();
domain.setEamplanid(eamplan_id);
return ResponseEntity.status(HttpStatus.OK).body(eamplanlineMapping.toDto(eamplanlineService.getDraft(domain)));
}
@ApiOperation(value = "根据维护计划检查计划步骤", tags = {"计划步骤" }, notes = "根据维护计划检查计划步骤")
@RequestMapping(method = RequestMethod.POST, value = "/eamplans/{eamplan_id}/eamplanlines/checkkey")
public ResponseEntity<Boolean> checkKeyByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @RequestBody EAMPlanLineDTO eamplanlinedto) {
return ResponseEntity.status(HttpStatus.OK).body(eamplanlineService.checkKey(eamplanlineMapping.toDomain(eamplanlinedto)));
}
@PreAuthorize("hasPermission(this.eamplanlineMapping.toDomain(#eamplanlinedto),'iBizAssetManagement-EAMPlanLine-Save')")
@ApiOperation(value = "根据维护计划保存计划步骤", tags = {"计划步骤" }, notes = "根据维护计划保存计划步骤")
@RequestMapping(method = RequestMethod.POST, value = "/eamplans/{eamplan_id}/eamplanlines/save")
public ResponseEntity<Boolean> saveByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @RequestBody EAMPlanLineDTO eamplanlinedto) {
EAMPlanLine domain = eamplanlineMapping.toDomain(eamplanlinedto);
domain.setEamplanid(eamplan_id);
return ResponseEntity.status(HttpStatus.OK).body(eamplanlineService.save(domain));
}
@PreAuthorize("hasPermission(this.eamplanlineMapping.toDomain(#eamplanlinedtos),'iBizAssetManagement-EAMPlanLine-Save')")
@ApiOperation(value = "根据维护计划批量保存计划步骤", tags = {"计划步骤" }, notes = "根据维护计划批量保存计划步骤")
@RequestMapping(method = RequestMethod.POST, value = "/eamplans/{eamplan_id}/eamplanlines/savebatch")
public ResponseEntity<Boolean> saveBatchByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @RequestBody List<EAMPlanLineDTO> eamplanlinedtos) {
List<EAMPlanLine> domainlist=eamplanlineMapping.toDomain(eamplanlinedtos);
for(EAMPlanLine domain:domainlist){
domain.setEamplanid(eamplan_id);
}
eamplanlineService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMPlanLine-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMPlanLine-Get')")
@ApiOperation(value = "根据维护计划获取DEFAULT", tags = {"计划步骤" } ,notes = "根据维护计划获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamplans/{eamplan_id}/eamplanlines/fetchdefault")
public ResponseEntity<List<EAMPlanLineDTO>> fetchEAMPlanLineDefaultByEAMPlan(@PathVariable("eamplan_id") String eamplan_id,EAMPlanLineSearchContext context) {
context.setN_eamplanid_eq(eamplan_id);
Page<EAMPlanLine> domains = eamplanlineService.searchDefault(context) ;
List<EAMPlanLineDTO> list = eamplanlineMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMPlanLine-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMPlanLine-Get')")
@ApiOperation(value = "根据维护计划查询DEFAULT", tags = {"计划步骤" } ,notes = "根据维护计划查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eamplans/{eamplan_id}/eamplanlines/searchdefault")
public ResponseEntity<Page<EAMPlanLineDTO>> searchEAMPlanLineDefaultByEAMPlan(@PathVariable("eamplan_id") String eamplan_id, @RequestBody EAMPlanLineSearchContext context) {
context.setN_eamplanid_eq(eamplan_id);
Page<EAMPlanLine> domains = eamplanlineService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamplanlineMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册