添加党组建设内容考核数量接口
This commit is contained in:
parent
8b685c9507
commit
7fa4e46888
@ -5,6 +5,7 @@ import com.cm.common.constants.ISystemConstant;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.result.ErrorResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.partybuilding.pojo.dtos.resourcesexamine.StreetThreeMeetLesson;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO;
|
||||
import com.cm.partybuilding.service.threemeetlesson.IThreeMeetLessonService;
|
||||
import io.swagger.annotations.*;
|
||||
@ -56,4 +57,16 @@ public class ThreeMeetLessonResourcesController extends AbstractController {
|
||||
return threeMeetLessonService.getThreeMeetLessonWeekCount(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询街镇村下党组织内组织生活数量", notes = "查询街镇村下党组织内组织生活数量")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "startDate", value = "发布时间始", paramType = "query"),
|
||||
@ApiImplicitParam(name = "endDate", value = "发布时间止", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("getexaminestreetcounts")
|
||||
public List<StreetThreeMeetLesson> getExamineStreetCounts(){
|
||||
Map<String, Object> params = requestParams();
|
||||
return threeMeetLessonService.getExamineStreetCounts(params);
|
||||
}
|
||||
|
||||
}
|
@ -101,4 +101,10 @@ public interface IThreeMeetLessonDao {
|
||||
* @return
|
||||
*/
|
||||
Integer getOrgThreeMeetLessonCount(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 查询街道下所有党组织
|
||||
* @return
|
||||
*/
|
||||
List<String> listOrgBelongStreet(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.cm.partybuilding.pojo.dtos.resourcesexamine;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 组织生活resources接口实体类
|
||||
* @author xwangs
|
||||
* @create 2020-12-30 18:10
|
||||
* @description
|
||||
*/
|
||||
@ApiModel
|
||||
public class CountThreeMeetLesson {
|
||||
|
||||
@ApiModelProperty(name = "categoryName", value = "分类名称")
|
||||
private String categoryName;
|
||||
@ApiModelProperty(name = "category", value = "分类编码")
|
||||
private String category;
|
||||
@ApiModelProperty(name = "counts", value = "发布数量")
|
||||
private String counts;
|
||||
|
||||
public String getCategoryName() {
|
||||
return categoryName == null ? "" : categoryName;
|
||||
}
|
||||
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category == null ? "" : category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCounts() {
|
||||
return counts == null ? "" : counts;
|
||||
}
|
||||
|
||||
public void setCounts(String counts) {
|
||||
this.counts = counts;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.cm.partybuilding.pojo.dtos.resourcesexamine;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 街镇组织生活集合
|
||||
* @author xwangs
|
||||
* @create 2020-12-30 18:19
|
||||
* @description
|
||||
*/
|
||||
@ApiModel
|
||||
public class StreetThreeMeetLesson {
|
||||
|
||||
@ApiModelProperty(name = "areaId", value = "镇街ID")
|
||||
private String areaId;
|
||||
@ApiModelProperty(name = "areaName", value = "镇街名称")
|
||||
private String areaName;
|
||||
@ApiModelProperty(name = "countThreeMeetLesson", value = "各类组织生活发布数量")
|
||||
private List<CountThreeMeetLesson> countThreeMeetLesson;
|
||||
|
||||
public String getAreaId() {
|
||||
return areaId == null ? "" : areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName == null ? "" : areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public List<CountThreeMeetLesson> getCountThreeMeetLesson() {
|
||||
if (countThreeMeetLesson == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return countThreeMeetLesson;
|
||||
}
|
||||
|
||||
public void setCountThreeMeetLesson(List<CountThreeMeetLesson> countThreeMeetLesson) {
|
||||
this.countThreeMeetLesson = countThreeMeetLesson;
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@ import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.partybuilding.pojo.dtos.resourcesexamine.StreetThreeMeetLesson;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO;
|
||||
import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO;
|
||||
@ -174,4 +175,11 @@ public interface IThreeMeetLessonService {
|
||||
* @return
|
||||
*/
|
||||
List<List<String>> getThreeMeetLessonWeekCount(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 查询街镇村下党组织内组织生活数量
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<StreetThreeMeetLesson> getExamineStreetCounts(Map<String, Object> params);
|
||||
}
|
@ -11,6 +11,8 @@ import com.cm.common.utils.DateUtil;
|
||||
import com.cm.common.utils.HashMapUtil;
|
||||
import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.partybuilding.dao.threemeetlesson.IThreeMeetLessonDao;
|
||||
import com.cm.partybuilding.pojo.dtos.resourcesexamine.CountThreeMeetLesson;
|
||||
import com.cm.partybuilding.pojo.dtos.resourcesexamine.StreetThreeMeetLesson;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO;
|
||||
import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO;
|
||||
@ -287,4 +289,93 @@ public class ThreeMeetLessonServiceImpl extends AbstractService implements IThre
|
||||
result.add(weekCount);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StreetThreeMeetLesson> getExamineStreetCounts(Map<String, Object> params) {
|
||||
String[] categoryName = {"支部委员会会议","全体党员大会","党小组会议","民主评议党员",
|
||||
"组织生活会","谈心谈话","党员教育培训","党课"};
|
||||
List<String> orgList = new ArrayList<>();
|
||||
List<String> userIdsList = new ArrayList<>();
|
||||
//根据街道查询所有党组织
|
||||
//民馨路
|
||||
StreetThreeMeetLesson minXin = new StreetThreeMeetLesson();
|
||||
minXin.setAreaId("6e922367-f21f-4daf-b38c-c55a67d9a35b");
|
||||
minXin.setAreaName("民馨路街道办事处");
|
||||
params.put("areaId",minXin.getAreaId());
|
||||
orgList = threeMeetLessonDao.listOrgBelongStreet(params);
|
||||
userIdsList.clear();
|
||||
for(String partyOrganizeId : orgList){
|
||||
params.put("partyOrganizeId",partyOrganizeId);
|
||||
List<String> tempUserIds = threeMeetLessonDao.listOrgUserId(params);
|
||||
userIdsList.addAll(tempUserIds);
|
||||
}
|
||||
String minXinUserIds = userIdsList.size() == 0 ? "" : Joiner.on(",").join(userIdsList);
|
||||
List<CountThreeMeetLesson> minXinCounts = new ArrayList<>();
|
||||
for(int i = 0; i < categoryName.length; i++){
|
||||
CountThreeMeetLesson item = new CountThreeMeetLesson();
|
||||
item.setCategoryName(categoryName[i]);
|
||||
item.setCategory((i + 1) + "");
|
||||
params.put("category",i + 1);
|
||||
params.put("userIds",minXinUserIds);
|
||||
Integer counts = threeMeetLessonDao.getOrgThreeMeetLessonCount(params);
|
||||
item.setCounts(counts + "");
|
||||
minXinCounts.add(item);
|
||||
}
|
||||
minXin.setCountThreeMeetLesson(minXinCounts);
|
||||
//万水泉
|
||||
StreetThreeMeetLesson wanShui = new StreetThreeMeetLesson();
|
||||
wanShui.setAreaId("8d62a0cc-2c15-4355-906c-6720f8f3617e");
|
||||
wanShui.setAreaName("万水泉镇");
|
||||
params.put("areaId",wanShui.getAreaId());
|
||||
orgList = threeMeetLessonDao.listOrgBelongStreet(params);
|
||||
userIdsList.clear();
|
||||
for(String partyOrganizeId : orgList){
|
||||
params.put("partyOrganizeId",partyOrganizeId);
|
||||
List<String> tempUserIds = threeMeetLessonDao.listOrgUserId(params);
|
||||
userIdsList.addAll(tempUserIds);
|
||||
}
|
||||
String wanShuiUserIds = userIdsList.size() == 0 ? "" : Joiner.on(",").join(userIdsList);
|
||||
List<CountThreeMeetLesson> wanShuiCounts = new ArrayList<>();
|
||||
for(int i = 0; i < categoryName.length; i++){
|
||||
CountThreeMeetLesson item = new CountThreeMeetLesson();
|
||||
item.setCategoryName(categoryName[i]);
|
||||
item.setCategory((i + 1) + "");
|
||||
params.put("category",i + 1);
|
||||
params.put("userIds",wanShuiUserIds);
|
||||
Integer counts = threeMeetLessonDao.getOrgThreeMeetLessonCount(params);
|
||||
item.setCounts(counts + "");
|
||||
wanShuiCounts.add(item);
|
||||
}
|
||||
wanShui.setCountThreeMeetLesson(wanShuiCounts);
|
||||
//稀土
|
||||
StreetThreeMeetLesson xiTu = new StreetThreeMeetLesson();
|
||||
xiTu.setAreaId("7ed23f06-566d-43b7-acd9-4f0b5db08974");
|
||||
xiTu.setAreaName("稀土路街道办事处");
|
||||
params.put("areaId",xiTu.getAreaId());
|
||||
orgList = threeMeetLessonDao.listOrgBelongStreet(params);
|
||||
userIdsList.clear();
|
||||
for(String partyOrganizeId : orgList){
|
||||
params.put("partyOrganizeId",partyOrganizeId);
|
||||
List<String> tempUserIds = threeMeetLessonDao.listOrgUserId(params);
|
||||
userIdsList.addAll(tempUserIds);
|
||||
}
|
||||
String xiTuUserIds = userIdsList.size() == 0 ? "" : Joiner.on(",").join(userIdsList);
|
||||
List<CountThreeMeetLesson> xiTuCounts = new ArrayList<>();
|
||||
for(int i = 0; i < categoryName.length; i++){
|
||||
CountThreeMeetLesson item = new CountThreeMeetLesson();
|
||||
item.setCategoryName(categoryName[i]);
|
||||
item.setCategory((i + 1) + "");
|
||||
params.put("category",i + 1);
|
||||
params.put("userIds",xiTuUserIds);
|
||||
Integer counts = threeMeetLessonDao.getOrgThreeMeetLessonCount(params);
|
||||
item.setCounts(counts + "");
|
||||
xiTuCounts.add(item);
|
||||
}
|
||||
xiTu.setCountThreeMeetLesson(xiTuCounts);
|
||||
List<StreetThreeMeetLesson> result = new ArrayList<>();
|
||||
result.add(minXin);
|
||||
result.add(wanShui);
|
||||
result.add(xiTu);
|
||||
return result;
|
||||
}
|
||||
}
|
@ -232,6 +232,7 @@
|
||||
AND gmt_create <![CDATA[<=]]> #{endDate}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="listOrgUserId" parameterType="map" resultType="String">
|
||||
SELECT
|
||||
user_id
|
||||
@ -241,4 +242,14 @@
|
||||
is_delete = '0'
|
||||
AND belong_party_organize = #{partyOrganizeId}
|
||||
</select>
|
||||
|
||||
<select id="listOrgBelongStreet" parameterType="map" resultType="String">
|
||||
SELECT
|
||||
t1.party_organize_id
|
||||
FROM
|
||||
gen_party_organize t1
|
||||
WHERE
|
||||
t1.is_delete = '0'
|
||||
AND t1.belong_street = #{areaId}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user