Commit ff755922 authored by KeYong's avatar KeYong

更新鄱阳湖现场问提

parent 2f97d1c8
...@@ -43,5 +43,5 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla ...@@ -43,5 +43,5 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
long countWater(@Param("bizOrgCode") String bizOrgCode); long countWater(@Param("bizOrgCode") String bizOrgCode);
Integer getPlanInstanceCountByCondition(@Param("category") String category, @Param("recordType") String recordType, @Param("batchNo") String batchNo); Integer getPlanInstanceCountByCondition(@Param("category") String category, @Param("recordType") String recordType, @Param("batchNo") String batchNo, @Param("content") String content);
} }
...@@ -157,7 +157,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -157,7 +157,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
int count = repository.countByBatchNo(instanceNo); int count = repository.countByBatchNo(instanceNo);
planInstance.setSort(++count); planInstance.setSort(++count);
ContingencyPlanInstance contingencyPlanInstance = contingencyInstance.updateExtendColumn(planInstance); ContingencyPlanInstance contingencyPlanInstance = contingencyInstance.updateExtendColumn(planInstance);
Integer num = contingencyPlanInstanceMapper.getPlanInstanceCountByCondition(contingencyPlanInstance.getCategory(), contingencyPlanInstance.getRecordType(), contingencyPlanInstance.getBatchNo()); Integer num = contingencyPlanInstanceMapper.getPlanInstanceCountByCondition(contingencyPlanInstance.getCategory(),
contingencyPlanInstance.getRecordType(),
contingencyPlanInstance.getBatchNo(),
contingencyPlanInstance.getContent());
ContingencyPlanInstance instance = new ContingencyPlanInstance(); ContingencyPlanInstance instance = new ContingencyPlanInstance();
if (0 == num) { if (0 == num) {
instance = this.repository.save(contingencyPlanInstance); instance = this.repository.save(contingencyPlanInstance);
......
...@@ -173,6 +173,9 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen ...@@ -173,6 +173,9 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
@Override @Override
public Object automaticExecutePoint(Integer index) { public Object automaticExecutePoint(Integer index) {
if (index == null) {
return false;
}
String json; String json;
try { try {
json = IOUtils.toString(planStepResource.getInputStream(), String.valueOf(StandardCharsets.UTF_8)); json = IOUtils.toString(planStepResource.getInputStream(), String.valueOf(StandardCharsets.UTF_8));
......
...@@ -393,6 +393,19 @@ ...@@ -393,6 +393,19 @@
<select id="getPlanInstanceCountByCondition" resultType="java.lang.Integer"> <select id="getPlanInstanceCountByCondition" resultType="java.lang.Integer">
select count(1) from select count(1) from
contingency_plan_instance contingency_plan_instance
where category = #{category} AND record_type = #{recordType} AND batch_no = #{batchNo} AND is_delete = 0 where
is_delete = 0
<if test="category!=null and category!=''">
AND category = #{category}
</if>
<if test="recordType!=null and recordType!=''">
AND record_type = #{recordType}
</if>
<if test="batchNo!=null and batchNo!=''">
AND batch_no = #{batchNo}
</if>
<if test="content!=null and content!=''">
AND content = #{content}
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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