|
@@ -4,14 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.bizmatics.common.core.bean.CommonPage;
|
|
|
import com.bizmatics.model.PatrolInspectionRecord;
|
|
|
-import com.bizmatics.model.PatrolInspectionScheme;
|
|
|
import com.bizmatics.model.PatrolInspectors;
|
|
|
import com.bizmatics.model.PatrolRecordRoute;
|
|
|
+import com.bizmatics.model.system.SysUser;
|
|
|
import com.bizmatics.model.vo.*;
|
|
|
import com.bizmatics.persistence.mapper.PatrolInspectionRecordMapper;
|
|
|
import com.bizmatics.service.PatrolInspectionRecordService;
|
|
|
import com.bizmatics.common.mvc.base.AbstractCrudService;
|
|
|
import com.bizmatics.service.PatrolRecordRouteService;
|
|
|
+import com.bizmatics.service.util.SecurityUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -33,14 +34,14 @@ public class PatrolInspectionRecordServiceImpl extends AbstractCrudService<Patro
|
|
|
private PatrolRecordRouteService patrolRecordRouteService;
|
|
|
|
|
|
@Override
|
|
|
- public CommonPage<PatrolInspectionRecordVo> patrolInspectionRecordList(String inspectionSchemeName, Integer siteId, Integer size, Integer current) {
|
|
|
- List<PatrolInspectionRecordVo> patrolInspectionRecordListOne = baseMapper.patrolInspectionRecordList(inspectionSchemeName, siteId, 0, 0, 0);
|
|
|
+ public CommonPage<PatrolInspectionRecordVo> patrolInspectionRecordList(Integer inspectionSchemeId, Integer siteId, Integer size, Integer current) {
|
|
|
+ List<PatrolInspectionRecordVo> patrolInspectionRecordListOne = baseMapper.patrolInspectionRecordList(inspectionSchemeId, siteId, 0, 0, 0);
|
|
|
int total = 0;
|
|
|
if (patrolInspectionRecordListOne.size() > 0) {
|
|
|
total = patrolInspectionRecordListOne.size();
|
|
|
}
|
|
|
int startCurrent = (size - 1) * current;
|
|
|
- List<PatrolInspectionRecordVo> correspondDeviceList = baseMapper.patrolInspectionRecordList(inspectionSchemeName, siteId, 0, startCurrent, current);
|
|
|
+ List<PatrolInspectionRecordVo> correspondDeviceList = baseMapper.patrolInspectionRecordList(inspectionSchemeId, siteId, 0, startCurrent, current);
|
|
|
return new CommonPage<>(correspondDeviceList, total, current, size);
|
|
|
}
|
|
|
|
|
@@ -104,4 +105,18 @@ public class PatrolInspectionRecordServiceImpl extends AbstractCrudService<Patro
|
|
|
|
|
|
return list;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<CurrencyDroplistVo> patrolInspectionRecordSiteDroplist(){
|
|
|
+ SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
+ List<CurrencyDroplistVo> list = baseMapper.patrolInspectionRecordSiteDroplist(new Long(user.getUserId()).intValue());
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<CurrencyDroplistVo> patrolInspectionRecordPlanDroplist(){
|
|
|
+ List<CurrencyDroplistVo> list = baseMapper.patrolInspectionRecordPlanDroplist();
|
|
|
+ return list;
|
|
|
+ }
|
|
|
}
|