Commit c87b5097 by caoyin

新增发起指令与请求发布指令时选定审批人的功能

parent 6f2b8794
......@@ -16,6 +16,7 @@ import java.util.List;
@SuppressWarnings("serial")
public class TbYwZczl extends BaseModel{
private String zdsprjh = null;//指定审批人警号
private List ywbhList;//业务编号list
private String ifFirst;//是否首次查询 no表示非第一次查询
private String zlfpdwHtml = "";//指令分派单位拼接用的html
......@@ -876,4 +877,12 @@ public class TbYwZczl extends BaseModel{
public void setYwbhList(List ywbhList) {
this.ywbhList = ywbhList;
}
public String getZdsprjh() {
return zdsprjh;
}
public void setZdsprjh(String zdsprjh) {
this.zdsprjh = zdsprjh;
}
}
......@@ -30,6 +30,8 @@ public class DictController {
if (type != null && !"".equals(type)) {
if(type.equals("CODE_JY")){
ZTreeNodeList = dicItemService.queryTypeUsercode(startId,name);//查询警员字典
}if(type.equals("CODE_SPJY")){
ZTreeNodeList = dicItemService.queryTypeSpUsercode(startId,name);//查询具有相应业务审批权限的警员字典
}else if("0".equals(isInit)){//非初始化调用
ZTreeNodeList = dicItemService.queryTypeCode(type,id,startId,yycj,name);
ZTreeNodeList=Sort(ZTreeNodeList);
......@@ -84,6 +86,8 @@ public class DictController {
if (code_type != null && !"".equals(code_type)) {
if("CODE_JY".equals(code_type)){
ZTreeNodeList = dicItemService.queryTypeUsercode(startId,name);//查询警员字典
}else if("CODE_SPJY".equals(code_type)){
ZTreeNodeList = dicItemService.queryTypeSpUsercode(startId,name);//查询具有相应业务审批权限的警员字典
}else{
ZTreeNodeList = dicItemService.getZtreeNodeByName(code_type,id,startId,yycj,unitcode,name);
}
......
......@@ -32,4 +32,6 @@ public interface IDictitemDao {
List<User> queryAllUnitUser(Map m);
String getNameByCode(HashMap<String, String> codeMap);
List<User> queryAllUserByUserIdList(List<String> userIdList);
}
......@@ -58,4 +58,6 @@ public interface IDicItemService {
List<ZTreeNode> queryTypeUsercode(String startId,String name);
List<ZTreeNode> queryAllCode(String type);
List<ZTreeNode> queryTypeSpUsercode(String startId, String name);
}
......@@ -116,6 +116,39 @@ public class IDicItemServiceImpl implements IDicItemService {
return zTreeNodeList;
}
/**
* 查询具有相应业务审批权限的警员字典
* @param startId
* @param name
* @return
*/
@Override
public List<ZTreeNode> queryTypeSpUsercode(String startId, String name) {
List<ZTreeNode> ztreeNodes = new ArrayList<ZTreeNode>();
List<User> users = new ArrayList<>();
//业务类型不为空时,拿到所有具备该业务权限的人的信息
if(startId!=null&&!"".equals(startId.trim())){
List<String> userIdList = zczlDao.queryAllUserIdByYwlx(startId);
if(userIdList!=null&&userIdList.size()>0){
users = dicItemDao.queryAllUserByUserIdList(userIdList);
}
}
if(users!=null&&users.size()>0){//封装成node对象
for(int i=0;i<users.size();i++){
ZTreeNode node = new ZTreeNode();
User user = users.get(i);
node.setState(null); //显示叶子图标
node.setIds(user.getId());
node.setName(user.getTrueName());
node.setCodeType("CODE_SPJY");
node.setText(user.getTrueName());
node.setId(user.getPolicemanid());
ztreeNodes.add(node);
}
}
return ztreeNodes;
}
@Override
public List<ZTreeNode> queryTypeCode(String type, String id, String startId, String yycj, String name) {
List<ZTreeNode> ztreeNodes = new ArrayList<ZTreeNode>();
......
......@@ -156,4 +156,6 @@ public interface ZczlDao {
void insertQxfp(TbYwZczlSpqx tbYwZczlSpqx);
int updateQxfp(TbYwZczlSpqx tbYwZczlSpqx);
List<String> queryAllUserIdByYwlx(String startId);
}
......@@ -73,4 +73,17 @@
<if test="code!=null and code!=''">and code = #{code}</if>
</select>
<select id="queryAllUserByUserIdList" resultType="com.founder.model.User" parameterType="java.util.List" >
select
ID as id,
TRUE_NAME as trueName,
POLICEMANID as policemanid
from sys_user where scbz='0' and OPEN_FLAG='1'
and id in
<foreach collection="list" item="userId" index="index"
open="(" close=")" separator=",">
#{userId, jdbcType=VARCHAR}
</foreach>
</select>
</mapper>
\ No newline at end of file
......@@ -196,6 +196,7 @@
zczl.XXSCPDBZ xxscpdbz,
<!-- zczl.DZWJWZ dzwjwz, -->
zczl.FQRJH fqrjh,
zczl.ZDSPRJH zdsprjh,
zczl.SPYJ spyj
from TB_YW_ZCZL zczl where 1=1 and zczl.xxscpdbz = '0'
<include refid="wfzdzczl-where"/>
......@@ -566,6 +567,7 @@
TSCLRDWMC tsclrdwmc,
XXSCPDBZ xxscpdbz,
FQRJH fqrjh,
ZDSPRJH zdsprjh,
SPYJ spyj
from TB_YW_ZCZL zczl where 1=1 and zczl.xxscpdbz = '0'
<include refid="wfqdzczl-where"/>
......@@ -669,6 +671,7 @@
TSCLRDWMC tsclrdwmc,
XXSCPDBZ xxscpdbz,
FQRJH fqrjh,
ZDSPRJH zdsprjh,
SPYJ spyj
from TB_YW_ZCZL zczl where 1=1 and zczl.xxscpdbz = '0'
<include refid="xywspdzczl-where"/>
......@@ -869,6 +872,7 @@
qqfqrgmsfhm,
qqrjh,
sfqqzl,
ZDSPRJH,
XXSCPDBZ
) values (
<if test="zczlbh!=null">#{zczlbh},</if>
......@@ -920,6 +924,8 @@
<if test="qqrjh==null">NULL,</if>
<if test="sfqqzl!=null">#{sfqqzl},</if>
<if test="sfqqzl==null">'0',</if>
<if test="zdsprjh!=null">#{zdsprjh},</if>
<if test="zdsprjh==null">NULL,</if>
0
)
<selectKey resultType="java.lang.String" keyProperty="zczlbh">
......@@ -983,6 +989,7 @@
(select name from sys_dictitem where groupid='CODE_UNIT' and code=zczl.qqfqrgajgdm) as qqfqrdwmc,
zczl.QQRJH qqrjh,
zczl.SFQQZL sfqqzl,
zczl.ZDSPRJH zdsprjh,
zczl.QQFQRGMSFHM qqfqrgmsfhm
from TB_YW_ZCZL zczl where 1=1 and zczl.xxscpdbz = '0' and zczl.zczlbh=#{zczlbh}
......@@ -1056,6 +1063,8 @@
<if test="zlsy==null || zlsy==''">,zlsy=NULL</if>
<if test="gzyq!=null and gzyq!=''">,gzyq=#{gzyq}</if>
<if test="gzyq==null || gzyq==''">,gzyq=NULL</if>
<if test="zdsprjh!=null and zdsprjh!=''">,ZDSPRJH=#{zdsprjh}</if>
<if test="zdsprjh==null || zdsprjh==''">,ZDSPRJH=NULL</if>
where zczlbh=#{zczlbh}
</update>
......@@ -1374,6 +1383,7 @@
zczl.TSCLRDWMC tsclrdwmc,
zczl.XXSCPDBZ xxscpdbz,
zczl.FQRJH fqrjh,
zczl.ZDSPRJH zdsprjh,
zczl.SPYJ spyj
from TB_YW_ZCZL zczl where 1=1 and zczl.xxscpdbz = '0'
<include refid="bxqjsdzczl-where"/>
......@@ -1619,6 +1629,7 @@
TSCLRDWMC tsclrdwmc,
XXSCPDBZ xxscpdbz,
FQRJH fqrjh,
ZDSPRJH zdsprjh,
SPYJ spyj
from TB_YW_ZCZL zczl where 1=1 and zczl.xxscpdbz = '0'
<include refid="wfqqdzczl-where"/>
......@@ -1823,6 +1834,11 @@
where USERID=#{userId,jdbcType=VARCHAR}
</update>
<select id="queryAllUserIdByYwlx" parameterType="java.lang.String" resultType="java.lang.String">
select USERID as userId
from TB_YW_ZCZL_SPQX where xxsc_pdbz=0 and ywlx like '%'||#{startId, jdbcType=VARCHAR}||'%'
</select>
<!-- 审批权限查询与设置end -->
......
......@@ -168,6 +168,13 @@
<input type="text" id="ywlx" name="ywlx" value="${tbYwZczl.ywlx}" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
<td class="ar" width="13.3%">审批人:</td>
<td width="20%">
<span class="textbox">
<input type="hidden" id="hiddenZpsprjh" value="${tbYwZczl.zdsprjh}">
<input type="text" id="zdsprjh" name="zdsprjh" value="" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_SPJY&startId=${tbYwZczl.ywlx}',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
<td class="ar necessary" width="13.3%">侦查指令类型:</td>
<td width="20%">
<span class="textbox">
......@@ -269,6 +276,22 @@
<script type="text/javascript">
$(document).ready(function(){
var hiddenZpsprjh = $("#hiddenZpsprjh").val();
$('#zdsprjh').combotree('setValue',hiddenZpsprjh);
$('#ywlx').combotree({
onChange: function (n,o) {
debugger
//控制类案中的代码值
$('#zdsprjh').combobox('clear');
//$('#zdsprjh').combobox('setValue','');
//$('#zdsprjh').combobox('selected',false);
// "selected":true
$('#zdsprjh').combobox({
url: "/queryTypeCode?type=CODE_SPJY&startId="+n
});
}
});
if("${flag}" == "1"){//添加成功
layer.alert("保存成功!","提示",function(res){
......
......@@ -168,6 +168,13 @@
<input type="text" id="ywlx" name="ywlx" value="${tbYwZczl.ywlx}" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
<td class="ar" width="13.3%">审批人:</td>
<td width="20%">
<span class="textbox">
<input type="hidden" id="hiddenZpsprjh" value="${tbYwZczl.zdsprjh}">
<input type="text" id="zdsprjh" name="zdsprjh" value="" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_SPJY&startId=${tbYwZczl.ywlx}',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
<td class="ar necessary" width="13.3%">侦查指令类型:</td>
<td width="20%">
<span class="textbox">
......@@ -269,6 +276,22 @@
<script type="text/javascript">
$(document).ready(function(){
var hiddenZpsprjh = $("#hiddenZpsprjh").val();
$('#zdsprjh').combotree('setValue',hiddenZpsprjh);
$('#ywlx').combotree({
onChange: function (n,o) {
debugger
//控制类案中的代码值
$('#zdsprjh').combobox('clear');
//$('#zdsprjh').combobox('setValue','');
//$('#zdsprjh').combobox('selected',false);
// "selected":true
$('#zdsprjh').combobox({
url: "/queryTypeCode?type=CODE_SPJY&startId="+n
});
}
});
if("${flag}" == "1"){//添加成功
layer.alert("保存成功!","提示",function(res){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment