diff --git a/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java b/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java index 9767137..415b1db 100644 --- a/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java +++ b/src/main/java/com/cm/partybuilding/controller/apis/threemeetlesson/ThreeMeetLessonController.java @@ -120,6 +120,14 @@ public class ThreeMeetLessonController extends AbstractController { return threeMeetLessonService.countThreeMeetLessonDesc(params); } + @ApiOperation(value = "党组织下各类组织生活数量", notes = "党组织下各类组织生活数量接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("getorgthreemeetlessoncount") + public List> getOrgThreeMeetLessonCount(){ + Map params = requestParams(); + return threeMeetLessonService.getOrgThreeMeetLessonCount(params); + } + @ApiOperation(value = "当前用户id信息", notes = "当前用户id信息接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("getcurrentuseridinfo") diff --git a/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java b/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java index 9406f1c..c1d5b11 100644 --- a/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java +++ b/src/main/java/com/cm/partybuilding/dao/threemeetlesson/IThreeMeetLessonDao.java @@ -87,4 +87,18 @@ public interface IThreeMeetLessonDao { * @return */ List countThreeMeetLessonDesc(Map params); + + /** + * 查询组织下所有人员 + * @param params + * @return + */ + List listOrgUserId(Map params); + + /** + * 查询各类会议数量 + * @param params + * @return + */ + Integer getOrgThreeMeetLessonCount(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java b/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java index 89d1841..00d7633 100644 --- a/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java +++ b/src/main/java/com/cm/partybuilding/service/threemeetlesson/IThreeMeetLessonService.java @@ -160,4 +160,11 @@ public interface IThreeMeetLessonService { * @return */ SuccessResultData> countThreeMeetLessonDesc(Map params); + + /** + * 党组织下各类组织生活数量 + * @param params + * @return + */ + List> getOrgThreeMeetLessonCount(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java b/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java index 004a2e6..dcc39a9 100644 --- a/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java +++ b/src/main/java/com/cm/partybuilding/service/threemeetlesson/impl/ThreeMeetLessonServiceImpl.java @@ -16,13 +16,11 @@ import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO; import com.cm.partybuilding.service.threemeetlesson.IThreeMeetLessonService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.google.common.base.Joiner; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @ClassName: ThreeMeetLessonServiceImpl @@ -196,4 +194,48 @@ public class ThreeMeetLessonServiceImpl extends AbstractService implements IThre return new SuccessResultData<>(countNumberThreeMeetLesson(params)); } + @Override + public List> getOrgThreeMeetLessonCount(Map params) { + //查询党组织下所有人员列表 + List userIdsList = threeMeetLessonDao.listOrgUserId(params); + String userIds = userIdsList.size() == 0 ? "" : Joiner.on(",").join(userIdsList); + params.put("userIds",userIds); + List> countList = new ArrayList<>(); + //1支部委员会会议 + params.put("category","1"); + Integer oneCount = threeMeetLessonDao.getOrgThreeMeetLessonCount(params); + Map oneDTO = new HashMap<>(4); + oneDTO.put("categoryName","支部委员会会议"); + oneDTO.put("counts",oneCount); + countList.add(oneDTO); + //2全体党员大会 + params.put("category","2"); + Integer twoCount = threeMeetLessonDao.getOrgThreeMeetLessonCount(params); + Map towDTO = new HashMap<>(4); + towDTO.put("categoryName","全体党员大会"); + towDTO.put("counts",twoCount); + countList.add(towDTO); + //3党小组会议 + params.put("category","3"); + Integer threeCount = threeMeetLessonDao.getOrgThreeMeetLessonCount(params); + Map threeDTO = new HashMap<>(4); + threeDTO.put("categoryName","党小组会议"); + threeDTO.put("counts",threeCount); + countList.add(threeDTO); + //4民主评议党员 + params.put("category","4"); + Integer fourCount = threeMeetLessonDao.getOrgThreeMeetLessonCount(params); + Map fourDTO = new HashMap<>(4); + fourDTO.put("categoryName","民主评议党员"); + fourDTO.put("counts",fourCount); + countList.add(fourDTO); + //5组织生活会 + params.put("category","5"); + Integer fiveCount = threeMeetLessonDao.getOrgThreeMeetLessonCount(params); + Map fiveDTO = new HashMap<>(4); + fiveDTO.put("categoryName","组织生活会"); + fiveDTO.put("counts",fiveCount); + countList.add(fiveDTO); + return countList; + } } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml b/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml index ba2ab94..9410a32 100644 --- a/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml +++ b/src/main/resources/mybatis/mapper/threemeetlesson/threemeetlesson-mapper.xml @@ -212,4 +212,25 @@ t1.category ORDER BY counts DESC + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/defaultindex/include.html b/src/main/resources/static/route/defaultindex/include.html index f977277..7d3e9e9 100644 --- a/src/main/resources/static/route/defaultindex/include.html +++ b/src/main/resources/static/route/defaultindex/include.html @@ -47,6 +47,12 @@

{{tab.dataCount}}

+
  • + +

    {{item.categoryName}}

    +

    {{item.counts}}

    +
    +
  • @@ -139,6 +145,7 @@ location: '' // 详细地址 }, // 党组织信息数据 partyMemberCount: 0, // 当前党组织中党员数量 + orgThreeMeetLessonCount :[]//组织生活各类会议数量 }, methods: { // 党组织信息 @@ -171,6 +178,20 @@ top.dialog.close(loadLayerIndex); }); }, + //组织生活各类会议数量 + getOrgThreeMeetLessonCount: function(){ + var self = this; + var loadLayerIndex; + top.restAjax.get('api/threemeetlesson/getorgthreemeetlessoncount', {partyOrganizeId: self.partyOrganizeId}, null, function(code, data) { + self.orgThreeMeetLessonCount = data; + }, function(code, data) { + top.dialog.msg(data.msg); + }, function() { + loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3}); + }, function() { + top.dialog.close(loadLayerIndex); + }); + }, showPartyMemberList: function (url, count, msgTitle, openTitle) { var self = this; if(count <= 0) { @@ -192,6 +213,7 @@ var self = this; self.showPartyOrganize(); self.getPartyMemberCount(); + self.getOrgThreeMeetLessonCount(); } })