添加党组织下组织生活记录

This commit is contained in:
wans 2020-12-09 14:53:41 +08:00
parent b4f2fc4a34
commit f683754bc8
6 changed files with 118 additions and 4 deletions

View File

@ -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<Map<String, Object>> getOrgThreeMeetLessonCount(){
Map<String, Object> params = requestParams();
return threeMeetLessonService.getOrgThreeMeetLessonCount(params);
}
@ApiOperation(value = "当前用户id信息", notes = "当前用户id信息接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getcurrentuseridinfo")

View File

@ -87,4 +87,18 @@ public interface IThreeMeetLessonDao {
* @return
*/
List<ThreeMeetLessonDTO> countThreeMeetLessonDesc(Map<String, Object> params);
/**
* 查询组织下所有人员
* @param params
* @return
*/
List<String> listOrgUserId(Map<String, Object> params);
/**
* 查询各类会议数量
* @param params
* @return
*/
Integer getOrgThreeMeetLessonCount(Map<String, Object> params);
}

View File

@ -160,4 +160,11 @@ public interface IThreeMeetLessonService {
* @return
*/
SuccessResultData<List<ThreeMeetLessonDTO>> countThreeMeetLessonDesc(Map<String, Object> params);
/**
* 党组织下各类组织生活数量
* @param params
* @return
*/
List<Map<String, Object>> getOrgThreeMeetLessonCount(Map<String, Object> params);
}

View File

@ -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<Map<String, Object>> getOrgThreeMeetLessonCount(Map<String, Object> params) {
//查询党组织下所有人员列表
List<String> userIdsList = threeMeetLessonDao.listOrgUserId(params);
String userIds = userIdsList.size() == 0 ? "" : Joiner.on(",").join(userIdsList);
params.put("userIds",userIds);
List<Map<String, Object>> countList = new ArrayList<>();
//1支部委员会会议
params.put("category","1");
Integer oneCount = threeMeetLessonDao.getOrgThreeMeetLessonCount(params);
Map<String,Object> 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<String,Object> 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<String,Object> 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<String,Object> 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<String,Object> fiveDTO = new HashMap<>(4);
fiveDTO.put("categoryName","组织生活会");
fiveDTO.put("counts",fiveCount);
countList.add(fiveDTO);
return countList;
}
}

View File

@ -212,4 +212,25 @@
t1.category
ORDER BY counts DESC
</select>
<!--三会一课按类别查询-->
<select id="getOrgThreeMeetLessonCount" parameterType="map" resultType="Integer">
SELECT
COUNT(*)
FROM
gen_three_meet_lesson
WHERE
is_delete = '0'
AND category = #{category}
AND FIND_IN_SET(creator,#{userIds})
</select>
<select id="listOrgUserId" parameterType="map" resultType="String">
SELECT
user_id
FROM
gen_party_member_organize
WHERE
is_delete = '0'
AND belong_party_organize = #{partyOrganizeId}
</select>
</mapper>

View File

@ -47,6 +47,12 @@
<p><cite>{{tab.dataCount}}</cite></p>
</a>
</li>
<li class="layui-col-xs6" v-for="item in orgThreeMeetLessonCount" style="width: 236px;">
<a href="javascript:void(0)" class="layadmin-backlog-body">
<h3>{{item.categoryName}}</h3>
<p><cite>{{item.counts}}</cite></p>
</a>
</li>
</ul>
</div>
</div>
@ -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();
}
})
</script>