Commit b203e0c6 authored by zhengjiawei's avatar zhengjiawei

bug

parent 347f64ed
...@@ -25,6 +25,7 @@ import org.eclipse.paho.client.mqttv3.MqttException; ...@@ -25,6 +25,7 @@ import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
...@@ -64,6 +65,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -64,6 +65,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Qualifier("contingencyAction") @Qualifier("contingencyAction")
@Autowired @Autowired
private CustomerAction customerAction; private CustomerAction customerAction;
@Value("${now.gateway.address}")
private String gateWayAddress;
// @Value("${number.plan.projectName}") // @Value("${number.plan.projectName}")
// private String projectName; // private String projectName;
private final PlanOperationRecordMapper planOperationRecordMapper; private final PlanOperationRecordMapper planOperationRecordMapper;
...@@ -539,6 +542,13 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -539,6 +542,13 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
if (ValidationUtil.isEmpty(planList)) { if (ValidationUtil.isEmpty(planList)) {
return; return;
} }
planList.forEach(x->{
String picture = x.getPicture();
if (StringUtils.isNotEmpty(picture)) {
x.setPicture(gateWayAddress+picture);
}
});
List<Long> idList = new ArrayList<>(); List<Long> idList = new ArrayList<>();
planList.forEach(e -> idList.add(e.getId())); planList.forEach(e -> idList.add(e.getId()));
Map<Object, List<PlanDoc>> docMapList = null; Map<Object, List<PlanDoc>> docMapList = null;
......
...@@ -33,4 +33,6 @@ public class PlanDetailVo extends PlanDetail { ...@@ -33,4 +33,6 @@ public class PlanDetailVo extends PlanDetail {
* 执行次数 * 执行次数
*/ */
private int executionTimes; private int executionTimes;
private String picture;
} }
...@@ -32,9 +32,9 @@ spring.redis.jedis.pool.max-idle=10 ...@@ -32,9 +32,9 @@ spring.redis.jedis.pool.max-idle=10
spring.redis.jedis.pool.min-idle=0 spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000 spring.redis.timeout=1000
#picture upload #picture upload
windows.img.path = E:\\ windows.img.path = G:\\
linux.img.path = / linux.img.path = /
file.uploadUrl=E:\\upload\\files\\ file.uploadUrl=G:\\upload\\files\\
#picture read #picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in= file.readUrl=http://172.16.3.89:8083/file/getFile?in=
params.isPush=true params.isPush=true
......
...@@ -103,6 +103,9 @@ outSystem.fegin.name=unKnow ...@@ -103,6 +103,9 @@ outSystem.fegin.name=unKnow
outSystem.user.password=a1234560 outSystem.user.password=a1234560
privilege.fegin.name=AMOS-API-PRIVILEGE privilege.fegin.name=AMOS-API-PRIVILEGE
#当前gateway的IP地址
now.gateway.address=http://172.16.3.32:10055/
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<select id="filterList" parameterType="string" resultType="com.yeejoin.amos.fas.business.vo.PlanDetailVo"> <select id="filterList" parameterType="string" resultType="com.yeejoin.amos.fas.business.vo.PlanDetailVo">
SELECT SELECT
id cpd.id
, create_date createDate , cpd.create_date createDate
, plan_name planName , plan_name planName
, code , code
, classify_id classifyId , classify_id classifyId
...@@ -61,46 +61,49 @@ ...@@ -61,46 +61,49 @@
, edit_org_name editOrgName , edit_org_name editOrgName
, edition , edition
, implementation_time implementationTime , implementation_time implementationTime
, remark , cpd.remark
, status , status
, creator , creator
, reviser , reviser
, update_time updateTime , update_time updateTime
, org_code orgCode , org_code orgCode
, is_delete isDelete , cpd.is_delete isDelete
, input_time inputTime , input_time inputTime
, (SELECT classify_name FROM c_plan_classify_tree cpct WHERE id = cpd.classify_id) classifyName , (SELECT classify_name FROM c_plan_classify_tree cpct WHERE id = cpd.classify_id) classifyName
, (SELECT count(1) FROM c_plan_operation_record cpor WHERE plan_id = cpd.id) executionTimes , (SELECT count(1) FROM c_plan_operation_record cpor WHERE plan_id = cpd.id) executionTimes
,fpp.picture
FROM FROM
c_plan_detail cpd c_plan_detail cpd
left join c_plan_equipment as cpe on cpd.id = cpe.plan_id and cpe.is_delete = 0
left join f_preplan_picture as fpp on fpp.equipment_id = cpe.fire_equipment_id and fpp.`type` =5
<where> <where>
<if test="planName != null and planName.length > 0"> <if test="planName != null and planName.length > 0">
AND plan_name LIKE concat('%', #{planName}, '%') AND cpd.plan_name LIKE concat('%', #{cpd.planName}, '%')
</if> </if>
<if test="classifyId != null and classifyId.size > 0"> <if test="classifyId != null and classifyId.size > 0">
AND classify_id IN AND cpd.classify_id IN
<foreach collection="classifyId" separator="," item="cid" open="(" close=")"> <foreach collection="classifyId" separator="," item="cid" open="(" close=")">
#{cid} #{cid}
</foreach> </foreach>
</if> </if>
<if test="planRange != null and planRange.size > 0"> <if test="planRange != null and planRange.size > 0">
AND plan_range IN AND cpd.plan_range IN
<foreach collection="planRange" separator="," item="pr" open="(" close=")"> <foreach collection="planRange" separator="," item="pr" open="(" close=")">
#{pr} #{pr}
</foreach> </foreach>
</if> </if>
<if test="editOrgName != null and editOrgName.length > 0"> <if test="editOrgName != null and editOrgName.length > 0">
AND edit_org_name LIKE concat('%', #{editOrgName}, '%') AND cpd.edit_org_name LIKE concat('%', #{editOrgName}, '%')
</if> </if>
<if test="implementationTimeLeft != null"> <if test="implementationTimeLeft != null">
AND implementation_time <![CDATA[ >= ]]> #{implementationTimeLeft} AND cpd.implementation_time <![CDATA[ >= ]]> #{implementationTimeLeft}
</if> </if>
<if test="implementationTimeRight != null"> <if test="implementationTimeRight != null">
AND implementation_time <![CDATA[ < ]]> #{implementationTimeRight} AND cpd.implementation_time <![CDATA[ < ]]> #{implementationTimeRight}
</if> </if>
AND is_delete = 0 AND cpd.is_delete = 0
</where> </where>
ORDER BY create_date ASC ORDER BY cpd.create_date ASC
LIMIT #{start}, #{size} LIMIT #{start}, #{size}
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment