Commit 7e4d39b7 authored by KeYong's avatar KeYong

更新

parent d034e375
......@@ -45,4 +45,6 @@ public interface PlanOperationRecordMapper {
Map<String, Object> getLatestFireEquipId();
PlanRule getPlanRuleByBatchNo(String batchNo);
int getLastPlanPattern();
}
......@@ -290,15 +290,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
public boolean judgeIfPlanDataMock(String batchNo) {
PlanOperationRecord planOperationRecord = planOperationRecordDao.findByBatchNo(batchNo);
if (planOperationRecord == null) {
throw new YeeException("执行记录不存在");
if (StringUtil.isNotEmpty(batchNo)) {
PlanOperationRecord planOperationRecord = planOperationRecordDao.findByBatchNo(batchNo);
return planOperationRecord.getPlanPattern() == 4 ? true : false;
} else {
PlanDetail planDetail = planDetailDao.getOne(planOperationRecord.getPlanId());
if (planDetail == null) {
throw new YeeException("数字预案模型被删除");
}
return planDetail.getStatus() == 4 ? true : false;
int planPattern = getLastPlanPattern();
return planPattern == 4 ? true : false;
}
}
......@@ -688,4 +685,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
public String getLastBatchNo() {
return planOperationRecordMapper.getLastBatchNo();
}
public int getLastPlanPattern() {
return planOperationRecordMapper.getLastPlanPattern();
}
}
......@@ -136,4 +136,8 @@
<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>
<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>
\ 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