|
@@ -0,0 +1,42 @@
|
|
|
+package com.pig4cloud.pigx.qa.service.impl;
|
|
|
+
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.pig4cloud.pigx.qa.entity.InspectionApply;
|
|
|
+import com.pig4cloud.pigx.qa.mapper.InspectionApplyMapper;
|
|
|
+import com.pig4cloud.pigx.qa.service.InspectionApplyService;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.*;
|
|
|
+
|
|
|
+
|
|
|
+@Service
|
|
|
+public class InspectionApplyServiceImpl extends ServiceImpl<InspectionApplyMapper, InspectionApply> implements InspectionApplyService {
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<InspectionApply> getbyScIdBetweenThisWeek(Integer scId) {
|
|
|
+ QueryWrapper query=new QueryWrapper();
|
|
|
+ query.eq("sc_id",scId);
|
|
|
+ query.between("create_time", DateUtil.beginOfWeek(new Date()), DateUtil.endOfWeek(new Date()));
|
|
|
+
|
|
|
+ return baseMapper.selectList(query);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page getByParm(String scCode, String poCode, Integer sId, Integer eId, String dateStart, String dateEnd, String createTime, String areaCode, Page page) {
|
|
|
+ List<InspectionApply> byParm = baseMapper.getByParm(scCode, poCode, sId, eId, dateStart, dateEnd, createTime,areaCode, page);
|
|
|
+
|
|
|
+
|
|
|
+ page.setRecords(byParm);
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|