相关方 - 相关方统计报表相关接口

pet-图片单独上传接口-2024.8.28-徐绎丰
water_xu 2024-07-30 16:11:51 +08:00
parent 9709c99b30
commit f579b75a92
5 changed files with 32 additions and 5 deletions

View File

@ -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;
}
}

View File

@ -30,5 +30,6 @@ public interface ClassInfoMapper {
List<PageData> findinfoByCondition(PageData pd);
List<PageData> getCountGroupByCorpInfoId(PageData pd);
}

View File

@ -21,7 +21,6 @@ public interface ClassInfoService {
List<PageData> findinfoByCondition(PageData condition) throws Exception;
List<PageData> getCountGroupByCorpInfoId(PageData pd);
}

View File

@ -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);
}
}

View File

@ -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>