import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Select("SELECT\n"
+ " ${ew.sqlSelect} \n"
+ "FROM\n"
+ " TEST_SAMPLE ts\n"
+ " INNER JOIN TEST_SAMPLE_PROJECT tsp ON tsp.SAMPLE_NUM = ts.SAMPLE_NUM"
+ " ${ew.customSqlSegment}")
List<TestSampleProject> queryInspectNum(@Param(Constants.WRAPPER)QueryWrapper<TestSampleProject> queryWrapper);
QueryWrapper<TestSampleProject> queryWrapper = new QueryWrapper<TestSampleProject>();
queryWrapper.select("tsp.dept,count(1) quantity");
queryWrapper.apply("tsp.sample_num in (select sample_num from test_sample where entrust_dept = {0})",entrustDept);
queryWrapper.eq("tsp.project_name",projectName);
queryWrapper.between("ts.create_time", DateUtil.parseDateTime(testDateArr[0]+" 00:00:00"),DateUtil.parseDateTime(testDateArr[1]+" 23:59:59"));
queryWrapper.groupBy("tsp.dept");