Commit 19ac43e2 authored by maoying's avatar maoying

Merge branch 'dev_upgrade' of…

Merge branch 'dev_upgrade' of http://39.98.45.134:8090/station/YeeAmosFireAutoSysRoot into dev_upgrade
parents c2f2c985 de7feb91
......@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
@RestController
@RequestMapping("/api/contingencyPlan")
......@@ -224,4 +225,11 @@ public class ContingencyPlanController extends BaseController {
return CommonResponseUtil2.success(List);
}
@ApiOperation(value = "预案重置")
@RequestMapping(value = "/reset", method = RequestMethod.GET)
public ResponseModel planReset() {
AtomicBoolean bool = contingencyPlanService.planReset();
return CommonResponseUtil2.success(bool);
}
}
......@@ -49,4 +49,6 @@ public interface PlanDetailMapper {
PlanDetailVo getPlanDetailByEquipmentId(@Param("fireEquipmentId") Long fireEquipmentId);
Integer planReset();
}
......@@ -36,6 +36,7 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @program: YeeAmosFireAutoSysRoot
......@@ -673,4 +674,16 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
}
@Override
public AtomicBoolean planReset() {
AtomicBoolean bool = new AtomicBoolean(true);
try {
planDetailMapper.planReset();
} catch (Exception e) {
bool.set(false);
e.printStackTrace();
}
return bool;
}
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @author wjk
......@@ -130,4 +131,6 @@ public interface IContingencyPlanService {
Page recordListByPage(Page page, Long planId, String planName, List<Long> classifyId, Date startTimeLeft, Date startTimeRight, Integer executionType, Integer planPattern);
AtomicBoolean planReset();
}
......@@ -10,11 +10,11 @@ spring.datasource.validationQuery = SELECT 1
#系统服务账号,用户后端服务调用
security.password=a1234560
security.loginId=fas_autosys
security.loginId=fas_system
#应用product appkey
security.productWeb=STUDIO_APP_WEB
security.appKey =studio_normalapp_2681691
security.appKey=studio_normalapp_3056965
eureka.client.serviceUrl.defaultZone=http://172.16.11.20:10001/eureka/
eureka.client.register-with-eureka = true
......
......@@ -133,4 +133,9 @@
and d.is_delete = false
limit 1
</select>
<update id="planReset">
UPDATE c_plan_detail SET `status` = 2;
UPDATE c_plan_operation_record SET `status`=1;
</update>
</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