提交 546ae8d6 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 部署微服务接口

上级 613e258e
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-app-assetmanagement.jar 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 ADD assetmanagement-app-assetmanagement.jar /assetmanagement-app-assetmanagement.jar
...@@ -3,25 +3,9 @@ services: ...@@ -3,25 +3,9 @@ services:
assetmanagement-app-assetmanagement: assetmanagement-app-assetmanagement:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest
ports: ports:
- "10325:10325" - "8080:8080"
networks: networks:
- agent_network - 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: deploy:
resources: resources:
limits: limits:
......
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface EAMWorkOrderMapper extends BaseMapper<EAMWorkOrder>{ public interface EAMWorkOrderMapper extends BaseMapper<EAMWorkOrder>{
Page<EAMWorkOrder> searchChildWO(IPage page, @Param("srf") EAMWorkOrderSearchContext context, @Param("ew") Wrapper<EAMWorkOrder> wrapper) ;
Page<EAMWorkOrder> searchDefault(IPage page, @Param("srf") EAMWorkOrderSearchContext context, @Param("ew") Wrapper<EAMWorkOrder> wrapper) ; Page<EAMWorkOrder> searchDefault(IPage page, @Param("srf") EAMWorkOrderSearchContext context, @Param("ew") Wrapper<EAMWorkOrder> wrapper) ;
@Override @Override
EAMWorkOrder selectById(Serializable id); EAMWorkOrder selectById(Serializable id);
......
...@@ -36,6 +36,7 @@ public interface IEAMWorkOrderService extends IService<EAMWorkOrder>{ ...@@ -36,6 +36,7 @@ public interface IEAMWorkOrderService extends IService<EAMWorkOrder>{
boolean checkKey(EAMWorkOrder et) ; boolean checkKey(EAMWorkOrder et) ;
boolean save(EAMWorkOrder et) ; boolean save(EAMWorkOrder et) ;
void saveBatch(List<EAMWorkOrder> list) ; void saveBatch(List<EAMWorkOrder> list) ;
Page<EAMWorkOrder> searchChildWO(EAMWorkOrderSearchContext context) ;
Page<EAMWorkOrder> searchDefault(EAMWorkOrderSearchContext context) ; Page<EAMWorkOrder> searchDefault(EAMWorkOrderSearchContext context) ;
List<EAMWorkOrder> selectByAssetid(String assetid) ; List<EAMWorkOrder> selectByAssetid(String assetid) ;
void removeByAssetid(String assetid) ; void removeByAssetid(String assetid) ;
......
...@@ -225,6 +225,15 @@ public class EAMWorkOrderServiceImpl extends ServiceImpl<EAMWorkOrderMapper, EAM ...@@ -225,6 +225,15 @@ public class EAMWorkOrderServiceImpl extends ServiceImpl<EAMWorkOrderMapper, EAM
} }
/**
* 查询集合 下级工单
*/
@Override
public Page<EAMWorkOrder> searchChildWO(EAMWorkOrderSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<EAMWorkOrder> pages=baseMapper.searchChildWO(context.getPages(),context,context.getSelectCond());
return new PageImpl<EAMWorkOrder>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/** /**
* 查询集合 DEFAULT * 查询集合 DEFAULT
*/ */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[EAMAPPLY]数据结构 --> <!--输出实体[EAMAPPLY]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamapply-41-1"> <changeSet author="a_LAB01_e85d8801c" id="tab-eamapply-51-1">
<createTable tableName="EAMAPPLY"> <createTable tableName="EAMAPPLY">
<column name="UPDATEMAN" remarks="" type="VARCHAR(60)"> <column name="UPDATEMAN" remarks="" type="VARCHAR(60)">
</column> </column>
...@@ -642,7 +642,7 @@ ...@@ -642,7 +642,7 @@
<!--输出实体[EAMWOTYPE]数据结构 --> <!--输出实体[EAMWOTYPE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamwotype-8-28"> <changeSet author="a_LAB01_e85d8801c" id="tab-eamwotype-10-28">
<createTable tableName="EAMWOTYPE"> <createTable tableName="EAMWOTYPE">
<column name="EAMWOTYPENAME" remarks="" type="VARCHAR(200)"> <column name="EAMWOTYPENAME" remarks="" type="VARCHAR(200)">
</column> </column>
...@@ -664,7 +664,7 @@ ...@@ -664,7 +664,7 @@
<!--输出实体[EAMWORKORDER]数据结构 --> <!--输出实体[EAMWORKORDER]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-eamworkorder-33-29"> <changeSet author="a_LAB01_e85d8801c" id="tab-eamworkorder-69-29">
<createTable tableName="WORKORDER"> <createTable tableName="WORKORDER">
<column name="WORKORDERID" remarks="" type="VARCHAR(100)"> <column name="WORKORDERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_EAMWORKORDER_WORKORDERID"/> <constraints primaryKey="true" primaryKeyName="PK_EAMWORKORDER_WORKORDERID"/>
...@@ -729,16 +729,16 @@ ...@@ -729,16 +729,16 @@
</changeSet> </changeSet>
<!--输出实体[EAMAPPLY]外键关系 --> <!--输出实体[EAMAPPLY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-41-31"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-31">
<addForeignKeyConstraint baseColumnNames="EAMAPPLYTYPEID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMAPPLYTYPE_EA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMAPPLYTYPEID" referencedTableName="EAMAPPLYTYPE" validate="true"/> <addForeignKeyConstraint baseColumnNames="EAMAPPLYTYPEID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMAPPLYTYPE_EA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMAPPLYTYPEID" referencedTableName="EAMAPPLYTYPE" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-41-32"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-32">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMASSET_ASSETI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/> <addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMASSET_ASSETI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-41-33"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-33">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMLOCATION_EAM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/> <addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMLOCATION_EAM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-41-34"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamapply-51-34">
<addForeignKeyConstraint baseColumnNames="EAMSERVICELEVELID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMSERVICELEVEL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMSERVICELEVELID" referencedTableName="EAMSERVICELEVEL" validate="true"/> <addForeignKeyConstraint baseColumnNames="EAMSERVICELEVELID" baseTableName="EAMAPPLY" constraintName="DER1N_EAMAPPLY_EAMSERVICELEVEL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMSERVICELEVELID" referencedTableName="EAMSERVICELEVEL" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[EAMAPPLYSTATE]外键关系 --> <!--输出实体[EAMAPPLYSTATE]外键关系 -->
...@@ -843,26 +843,26 @@ ...@@ -843,26 +843,26 @@
<addForeignKeyConstraint baseColumnNames="EAMWOSTATEMODELID" baseTableName="EAMWOSTATEMODELLINE" constraintName="DER1N_EAMWOSTATEMODELLINE_EAMW" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOSTATEMODELID" referencedTableName="EAMWOSTATEMODEL" validate="true"/> <addForeignKeyConstraint baseColumnNames="EAMWOSTATEMODELID" baseTableName="EAMWOSTATEMODELLINE" constraintName="DER1N_EAMWOSTATEMODELLINE_EAMW" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOSTATEMODELID" referencedTableName="EAMWOSTATEMODEL" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[EAMWOTYPE]外键关系 --> <!--输出实体[EAMWOTYPE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamwotype-8-64"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamwotype-10-64">
<addForeignKeyConstraint baseColumnNames="EAMWOSTATEMODELID" baseTableName="EAMWOTYPE" constraintName="DER1N_EAMWOTYPE_EAMWOSTATEMODE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOSTATEMODELID" referencedTableName="EAMWOSTATEMODEL" validate="true"/> <addForeignKeyConstraint baseColumnNames="EAMWOSTATEMODELID" baseTableName="EAMWOTYPE" constraintName="DER1N_EAMWOTYPE_EAMWOSTATEMODE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOSTATEMODELID" referencedTableName="EAMWOSTATEMODEL" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[EAMWORKORDER]外键关系 --> <!--输出实体[EAMWORKORDER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-33-65"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-69-65">
<addForeignKeyConstraint baseColumnNames="ASSETID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMASSET_AS" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ASSETID" referencedTableName="ASSET" validate="true"/> <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>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-33-66"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-69-66">
<addForeignKeyConstraint baseColumnNames="EAMLOCATIONID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMLOCATION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMLOCATIONID" referencedTableName="EAMLOCATION" validate="true"/> <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>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-33-67"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-69-67">
<addForeignKeyConstraint baseColumnNames="EAMSERVICELEVELID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMSERVICEL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMSERVICELEVELID" referencedTableName="EAMSERVICELEVEL" validate="true"/> <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>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-33-68"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-69-68">
<addForeignKeyConstraint baseColumnNames="EAMWOORIGINID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWOORIGIN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOORIGINID" referencedTableName="EAMWOORIGIN" validate="true"/> <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>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-33-69"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-69-69">
<addForeignKeyConstraint baseColumnNames="PWORKORDERID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWORKORDE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WORKORDERID" referencedTableName="WORKORDER" validate="true"/> <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>
<changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-33-70"> <changeSet author="a_LAB01_e85d8801c" id="fk-eamworkorder-69-70">
<addForeignKeyConstraint baseColumnNames="EAMWOTYPEID" baseTableName="WORKORDER" constraintName="DER1N_EAMWORKORDER_EAMWOTYPE_E" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EAMWOTYPEID" referencedTableName="EAMWOTYPE" validate="true"/> <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> </changeSet>
<!--输出实体[EAMWOORIGIN]外键关系 --> <!--输出实体[EAMWOORIGIN]外键关系 -->
......
...@@ -77,6 +77,15 @@ ...@@ -77,6 +77,15 @@
where eamwotypeid=#{eamwotypeid} where eamwotypeid=#{eamwotypeid}
</select> </select>
<!--数据集合[ChildWO]-->
<select id="searchChildWO" parameterType="cn.ibizlab.assetmanagement.core.workorder.filter.EAMWorkOrderSearchContext" resultMap="EAMWorkOrderResultMap">
select t1.* from (
<include refid="ChildWO" />
)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]--> <!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.assetmanagement.core.workorder.filter.EAMWorkOrderSearchContext" resultMap="EAMWorkOrderResultMap"> <select id="searchDefault" parameterType="cn.ibizlab.assetmanagement.core.workorder.filter.EAMWorkOrderSearchContext" resultMap="EAMWorkOrderResultMap">
select t1.* from ( select t1.* from (
...@@ -86,6 +95,12 @@ ...@@ -86,6 +95,12 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if> <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select> </select>
<!--数据查询[ChildWO]-->
<sql id="ChildWO" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMSERVICELEVELID`, t31.`EAMSERVICELEVELNAME`, t1.`EAMWOORIGINID`, t41.`EAMWOORIGINNAME`, t1.`EAMWOTYPEID`, t51.`EAMWOTYPENAME`, t1.`ENDTIME`, t1.`MDATE`, t1.`PWORKORDERID`, t61.`WORKORDERNAME` AS `PWORKORDERNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WODATE`, t1.`WONUMBER`, t1.`WORKLENGTH`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMSERVICELEVEL t31 ON t1.EAMSERVICELEVELID = t31.EAMSERVICELEVELID LEFT JOIN EAMWOORIGIN t41 ON t1.EAMWOORIGINID = t41.EAMWOORIGINID LEFT JOIN EAMWOTYPE t51 ON t1.EAMWOTYPEID = t51.EAMWOTYPEID LEFT JOIN WORKORDER t61 ON t1.PWORKORDERID = t61.WORKORDERID
WHERE ( t1.`PWORKORDERID` = #{srf.datacontext.srfparentkey} )
]]>
</sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMSERVICELEVELID`, t31.`EAMSERVICELEVELNAME`, t1.`EAMWOORIGINID`, t41.`EAMWOORIGINNAME`, t1.`EAMWOTYPEID`, t51.`EAMWOTYPENAME`, t1.`ENDTIME`, t1.`MDATE`, t1.`PWORKORDERID`, t61.`WORKORDERNAME` AS `PWORKORDERNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WODATE`, t1.`WONUMBER`, t1.`WORKLENGTH`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMSERVICELEVEL t31 ON t1.EAMSERVICELEVELID = t31.EAMSERVICELEVELID LEFT JOIN EAMWOORIGIN t41 ON t1.EAMWOORIGINID = t41.EAMWOORIGINID LEFT JOIN EAMWOTYPE t51 ON t1.EAMWOTYPEID = t51.EAMWOTYPEID LEFT JOIN WORKORDER t61 ON t1.PWORKORDERID = t61.WORKORDERID <![CDATA[ SELECT t1.`ASSETID`, t11.`ASSETNAME`, t1.`BEGINTIME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`EAMLOCATIONID`, t21.`EAMLOCATIONNAME`, t1.`EAMSERVICELEVELID`, t31.`EAMSERVICELEVELNAME`, t1.`EAMWOORIGINID`, t41.`EAMWOORIGINNAME`, t1.`EAMWOTYPEID`, t51.`EAMWOTYPENAME`, t1.`ENDTIME`, t1.`MDATE`, t1.`PWORKORDERID`, t61.`WORKORDERNAME` AS `PWORKORDERNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WODATE`, t1.`WONUMBER`, t1.`WORKLENGTH`, t1.`WORKORDERID`, t1.`WORKORDERNAME` FROM `WORKORDER` t1 LEFT JOIN ASSET t11 ON t1.ASSETID = t11.ASSETID LEFT JOIN EAMLOCATION t21 ON t1.EAMLOCATIONID = t21.EAMLOCATIONID LEFT JOIN EAMSERVICELEVEL t31 ON t1.EAMSERVICELEVELID = t31.EAMSERVICELEVELID LEFT JOIN EAMWOORIGIN t41 ON t1.EAMWOORIGINID = t41.EAMWOORIGINID LEFT JOIN EAMWOTYPE t51 ON t1.EAMWOTYPEID = t51.EAMWOTYPEID LEFT JOIN WORKORDER t61 ON t1.PWORKORDERID = t61.WORKORDERID
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"dename":"EAMWorkOrder", "dename":"EAMWorkOrder",
"delogicname":"工单", "delogicname":"工单",
"sysmoudle":{"id":"WORKORDER","name":"工单管理"}, "sysmoudle":{"id":"WORKORDER","name":"工单管理"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}], "dedataset":[{"id":"ChildWO" , "name":"下级工单"},{"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" }], "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":"创建人"}] "datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
} }
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
{ {
"appid":"AssetManagement", "appid":"AssetManagement",
"appname":"资产管理", "appname":"资产管理",
"appmenu":[{"menuid":"AppIndexView", "menuname":"AppIndexView", "menuitem":[{ "id":"user_menus" , "name":"用户菜单" },{ "id":"top_menus" , "name":"顶部菜单" , "items":[{ "id":"menuitem15" , "name":"系统设置" , "items":[{ "id":"menuitem16" , "name":"服务等级" },{ "id":"menuitem17" , "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":"menuitem4" , "name":"工单管理" , "items":[{ "id":"menuitem3" , "name":"维护申请" }]},{ "id":"menuitem5" , "name":"维护计划" }]}] }] "appmenu":[{"menuid":"AppIndexView", "menuname":"AppIndexView", "menuitem":[{ "id":"user_menus" , "name":"用户菜单" },{ "id":"top_menus" , "name":"顶部菜单" , "items":[{ "id":"menuitem15" , "name":"系统设置" , "items":[{ "id":"menuitem16" , "name":"服务等级" },{ "id":"menuitem17" , "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":"menuitem4" , "name":"工单管理" , "items":[{ "id":"menuitem3" , "name":"维护申请" },{ "id":"menuitem18" , "name":"工单" }]},{ "id":"menuitem5" , "name":"维护计划" }]}] }]
} }
] ]
} }
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /assetmanagement-provider-assetapi.jar 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 ADD assetmanagement-provider-assetapi.jar /assetmanagement-provider-assetapi.jar
...@@ -3,9 +3,25 @@ services: ...@@ -3,9 +3,25 @@ services:
assetmanagement-provider-assetapi: assetmanagement-provider-assetapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest
ports: ports:
- "8081:8081" - "10315:10315"
networks: networks:
- agent_network - 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: deploy:
resources: resources:
limits: limits:
......
...@@ -139,6 +139,27 @@ public class EAMWorkOrderResource { ...@@ -139,6 +139,27 @@ public class EAMWorkOrderResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMWorkOrder-searchChildWO-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')")
@ApiOperation(value = "获取下级工单", tags = {"工单" } ,notes = "获取下级工单")
@RequestMapping(method= RequestMethod.GET , value="/eamworkorders/fetchchildwo")
public ResponseEntity<List<EAMWorkOrderDTO>> fetchChildWO(EAMWorkOrderSearchContext context) {
Page<EAMWorkOrder> domains = eamworkorderService.searchChildWO(context) ;
List<EAMWorkOrderDTO> list = eamworkorderMapping.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-EAMWorkOrder-searchChildWO-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')")
@ApiOperation(value = "查询下级工单", tags = {"工单" } ,notes = "查询下级工单")
@RequestMapping(method= RequestMethod.POST , value="/eamworkorders/searchchildwo")
public ResponseEntity<Page<EAMWorkOrderDTO>> searchChildWO(@RequestBody EAMWorkOrderSearchContext context) {
Page<EAMWorkOrder> domains = eamworkorderService.searchChildWO(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamworkorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMWorkOrder-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMWorkOrder-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"工单" } ,notes = "获取DEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"工单" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamworkorders/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/eamworkorders/fetchdefault")
...@@ -270,6 +291,29 @@ public class EAMWorkOrderResource { ...@@ -270,6 +291,29 @@ public class EAMWorkOrderResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMWorkOrder-searchChildWO-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')")
@ApiOperation(value = "根据维护申请获取下级工单", tags = {"工单" } ,notes = "根据维护申请获取下级工单")
@RequestMapping(method= RequestMethod.GET , value="/eamapplies/{eamapply_id}/eamworkorders/fetchchildwo")
public ResponseEntity<List<EAMWorkOrderDTO>> fetchEAMWorkOrderChildWOByEAMApply(@PathVariable("eamapply_id") String eamapply_id,EAMWorkOrderSearchContext context) {
context.setN_eamwooriginid_eq(eamapply_id);
Page<EAMWorkOrder> domains = eamworkorderService.searchChildWO(context) ;
List<EAMWorkOrderDTO> list = eamworkorderMapping.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-EAMWorkOrder-searchChildWO-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')")
@ApiOperation(value = "根据维护申请查询下级工单", tags = {"工单" } ,notes = "根据维护申请查询下级工单")
@RequestMapping(method= RequestMethod.POST , value="/eamapplies/{eamapply_id}/eamworkorders/searchchildwo")
public ResponseEntity<Page<EAMWorkOrderDTO>> searchEAMWorkOrderChildWOByEAMApply(@PathVariable("eamapply_id") String eamapply_id, @RequestBody EAMWorkOrderSearchContext context) {
context.setN_eamwooriginid_eq(eamapply_id);
Page<EAMWorkOrder> domains = eamworkorderService.searchChildWO(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamworkorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMWorkOrder-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMWorkOrder-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMWorkOrder-Get')")
@ApiOperation(value = "根据维护申请获取DEFAULT", tags = {"工单" } ,notes = "根据维护申请获取DEFAULT") @ApiOperation(value = "根据维护申请获取DEFAULT", tags = {"工单" } ,notes = "根据维护申请获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamapplies/{eamapply_id}/eamworkorders/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/eamapplies/{eamapply_id}/eamworkorders/fetchdefault")
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
git clone -b master $para2 ibizassetmanagement/ git clone -b master $para2 ibizassetmanagement/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibizassetmanagement/ cd ibizassetmanagement/
mvn clean package -Passetmanagement mvn clean package -Passetapi
cd assetmanagement-app/assetmanagement-app-assetmanagement cd assetmanagement-provider/assetmanagement-provider-assetapi
mvn -Passetmanagement docker:build mvn -Passetapi docker:build
mvn -Passetmanagement docker:push mvn -Passetapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-app-assetmanagement.yaml iBizEE --with-registry-auth docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-provider-assetapi.yaml iBizEE --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册