diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java index 8639b1a..0c77498 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/controller/scheme/WlRecordController.java @@ -195,5 +195,17 @@ public class WlRecordController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, record, methodDescribe); } + + + /** + * 每日处理没有结束时间的测试基础数据 + */ + @OperateInfo(info = LogEnum.SYSTEM_COMMON) + @PostMapping("/dayDealNoEndTimeEvent") + @ApiOperation("每日处理没有结束时间的测试基础数据") + public void dayDealNoEndTimeEvent() { + String methodDescribe = getMethodDescribe("dayDealNoEndTimeEvent"); + wlRecordService.dayDealNoEndTimeEvent(); + } } diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml index b4105e0..8424cf0 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/mapper/mapping/WlRecordMapper.xml @@ -23,7 +23,8 @@ select a.dev_id as id,b.name as name from wl_record a left join cs_equipment_delivery b on a.dev_id = b.id - where a.type=1 and a.state =1 and + where a.type=1 and a.state =1 and a.end_time is not null + and (select count(1) from wl_record wl where wl.dev_id = a.dev_id) > (select count(1) from wl_record_test_data wd where wd.test_item_id = #{wlRecordPageParam.id} and data_id in (select w.id from wl_record w where w.dev_id = a.dev_id)) @@ -32,7 +33,8 @@ select a.dev_id as id,b.name as name from wl_record a left join cs_equipment_delivery b on a.dev_id = b.id - where a.type=1 and a.state =1 and exists + where a.type=1 and a.state =1 and a.end_time is not null + and exists (select 1 from wl_record wl where wl.dev_id = a.dev_id and wl.type=1 and wl.state =1 and exists (select 1 from wl_record_test_data wd where wd.test_item_id = #{wlRecordPageParam.id} and wd.data_id = wl.id)) group by a.dev_id,b.name having a.dev_id is not null and b.name is not null @@ -55,7 +57,7 @@