新增接口
This commit is contained in:
parent
6296dc4265
commit
e756906ffa
@ -26,7 +26,7 @@ import java.util.Map;
|
||||
/**
|
||||
* @ClassName: PartyOrganizeController
|
||||
* @Description: 党组织
|
||||
* @Author: WenG
|
||||
* @Author: renpc
|
||||
* @Date: 2020-10-16 14:24
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@ -118,4 +118,12 @@ public class PartyOrganizeController extends AbstractController {
|
||||
return securityComponent.getCurrentUserIdInfo();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "该党组织中党员人数统计", notes = "该党组织中党员人数统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("countpartymember")
|
||||
SuccessResultData<Integer> countPartyMember() throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
return partyOrganizeService.countPartyMember(params);
|
||||
}
|
||||
|
||||
}
|
@ -116,4 +116,12 @@ public class PartyOrganizeAppController extends AbstractController {
|
||||
return partyOrganizeService.countPartyOrganize(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "该党组织中党员人数统计", notes = "该党组织中党员人数统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("countpartymember")
|
||||
SuccessResultData<Integer> countPartyMember() throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
return partyOrganizeService.countPartyMember(params);
|
||||
}
|
||||
|
||||
}
|
@ -117,4 +117,12 @@ public class PartyOrganizeResourceController extends AbstractController {
|
||||
return partyOrganizeService.countPartyOrganize(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "该党组织中党员人数统计", notes = "该党组织中党员人数统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("countpartymember")
|
||||
SuccessResultData<Integer> countPartyMember() throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
return partyOrganizeService.countPartyMember(params);
|
||||
}
|
||||
|
||||
}
|
@ -80,4 +80,11 @@ public interface IPartyOrganizeDao {
|
||||
*/
|
||||
Integer countPartyOrganize(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 计算党组织中的党员数量
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer countPartyMemberOfPartyOrganize(Map<String, Object> params) throws SearchException;
|
||||
}
|
@ -153,4 +153,11 @@ public interface IPartyOrganizeService {
|
||||
*/
|
||||
SuccessResultData<Integer> countPartyOrganize(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 该党组织中党员人数统计
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
SuccessResultData<Integer> countPartyMember(Map<String, Object> params) throws SearchException;
|
||||
}
|
@ -189,4 +189,20 @@ public class PartyOrganizeServiceImpl extends AbstractService implements IPartyO
|
||||
return new SuccessResultData<>(countNumberPartyOrganize(params));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<Integer> countPartyMember(Map<String, Object> params) throws SearchException {
|
||||
return new SuccessResultData<>(countPartyMemberOfPartyOrganize(params));
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算党组织中的党员数量(私有方法)
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
private Integer countPartyMemberOfPartyOrganize(Map<String, Object> params) throws SearchException {
|
||||
Integer count = partyOrganizeDao.countPartyMemberOfPartyOrganize(params);
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
}
|
@ -398,4 +398,16 @@
|
||||
t1.is_delete = 0
|
||||
</select>
|
||||
|
||||
<select id="countPartyMemberOfPartyOrganize" parameterType="map" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
gen_party_organize t1
|
||||
LEFT JOIN gen_party_member_organize t2 ON t1.party_organize_id = t2.belong_party_organize
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
AND t2.is_delete = 0
|
||||
AND t1.party_organize_id = #{partyOrganizeId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -61,9 +61,9 @@
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">组织类型<span style="color:red;">*</span></label>
|
||||
<div class="layui-input-block layui-form" id="typeSelectTemplateBox" lay-filter="typeSelectTemplateBox" lay-verify="required"></div>
|
||||
<div class="layui-input-block layui-form" id="typeSelectTemplateBox" lay-filter="typeSelectTemplateBox"></div>
|
||||
<script id="typeSelectTemplate" type="text/html">
|
||||
<select id="type" name="type">
|
||||
<select id="type" name="type" lay-verify="required">
|
||||
<option value="">请选择组织类型</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
|
@ -266,7 +266,7 @@
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm" id="submitBtn">提交编辑</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -290,11 +290,16 @@
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var partyOrganizeId = top.restAjax.params(window.location.href).partyOrganizeId;
|
||||
var show = top.restAjax.params(window.location.href).show;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
if(show) {
|
||||
$('#submitBtn').hide();
|
||||
}
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user