Commit 7e4d39b7 authored by KeYong's avatar KeYong

更新

parent d034e375
...@@ -45,4 +45,6 @@ public interface PlanOperationRecordMapper { ...@@ -45,4 +45,6 @@ public interface PlanOperationRecordMapper {
Map<String, Object> getLatestFireEquipId(); Map<String, Object> getLatestFireEquipId();
PlanRule getPlanRuleByBatchNo(String batchNo); PlanRule getPlanRuleByBatchNo(String batchNo);
int getLastPlanPattern();
} }
...@@ -290,15 +290,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -290,15 +290,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
} }
public boolean judgeIfPlanDataMock(String batchNo) { public boolean judgeIfPlanDataMock(String batchNo) {
PlanOperationRecord planOperationRecord = planOperationRecordDao.findByBatchNo(batchNo); if (StringUtil.isNotEmpty(batchNo)) {
if (planOperationRecord == null) { PlanOperationRecord planOperationRecord = planOperationRecordDao.findByBatchNo(batchNo);
throw new YeeException("执行记录不存在"); return planOperationRecord.getPlanPattern() == 4 ? true : false;
} else { } else {
PlanDetail planDetail = planDetailDao.getOne(planOperationRecord.getPlanId()); int planPattern = getLastPlanPattern();
if (planDetail == null) { return planPattern == 4 ? true : false;
throw new YeeException("数字预案模型被删除");
}
return planDetail.getStatus() == 4 ? true : false;
} }
} }
...@@ -688,4 +685,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -688,4 +685,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
public String getLastBatchNo() { public String getLastBatchNo() {
return planOperationRecordMapper.getLastBatchNo(); return planOperationRecordMapper.getLastBatchNo();
} }
public int getLastPlanPattern() {
return planOperationRecordMapper.getLastPlanPattern();
}
} }
...@@ -136,4 +136,8 @@ ...@@ -136,4 +136,8 @@
<select id="getLatestFireEquipId" resultType="map"> <select id="getLatestFireEquipId" resultType="map">
select fire_equipment_id AS fireEquipId, batch_no AS batchNo from c_plan_operation_record where is_delete = 0 order by create_date desc limit 1 select fire_equipment_id AS fireEquipId, batch_no AS batchNo from c_plan_operation_record where is_delete = 0 order by create_date desc limit 1
</select> </select>
<select id="getLastPlanPattern" resultType="java.lang.Integer">
select plan_pattern as planPattern from c_plan_operation_record where is_delete = 0 order by create_date desc limit 1
</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