Merge branch 'refs/heads/pet' into dev
commit
0d53cd65d9
|
@ -3,6 +3,7 @@ package com.zcloud.controller.openApi;
|
|||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Department;
|
||||
import com.zcloud.service.bus.ClassInfoService;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
|
@ -32,6 +33,8 @@ public class OpenApiController extends BaseController {
|
|||
private UsersService usersService;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
@Autowired
|
||||
private ClassInfoService classInfoService;
|
||||
/**
|
||||
* 显示列表ztree
|
||||
* @return
|
||||
|
@ -152,4 +155,17 @@ public class OpenApiController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/class/getInfo")
|
||||
@ResponseBody
|
||||
public Object getInfo() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
map.put("list", classInfoService.getCountGroupByCorpInfoId(this.getPageData()));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,5 +30,6 @@ public interface ClassInfoMapper {
|
|||
List<PageData> findinfoByCondition(PageData pd);
|
||||
|
||||
|
||||
List<PageData> getCountGroupByCorpInfoId(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ public interface ClassInfoService {
|
|||
List<PageData> findinfoByCondition(PageData condition) throws Exception;
|
||||
|
||||
|
||||
|
||||
|
||||
List<PageData> getCountGroupByCorpInfoId(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,14 @@ public class ClassInfoServiceImpl implements ClassInfoService {
|
|||
return classInfoMapper.findinfoByCondition(condition);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据CORPINFO_ID分组获取合格/不合格人数统计
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getCountGroupByCorpInfoId(PageData pd) {
|
||||
return classInfoMapper.getCountGroupByCorpInfoId(pd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,5 +139,9 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getCountGroupByCorpInfoId" resultType="com.zcloud.entity.PageData">
|
||||
select CORPINFO_ID, COUNT(1) TOTAL, COUNT(if(STATUS = '1', 1 , null)) PASS, COUNT(if(STATUS = '0', 1 , null)) NOPASS
|
||||
from <include refid="tableName"></include>
|
||||
GROUP BY CORPINFO_ID
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue