Commit 48875fcd by mayunfei

侦查指令字典bug处理

parent ea9ee4d0
......@@ -31,14 +31,19 @@ public class DictController {
if(type.equals("CODE_JY")){
ZTreeNodeList = dicItemService.queryTypeUsercode(startId,name);//查询警员字典
}else if(type.equals("CODE_ZLLXDM")){
ZTreeNodeList = dicItemService.queryZllxdmcode(type,startId);//查询具有相应业务审批权限的警员字典
if(id==null || "".equals(id)){
id = startId;
startId = "";
}else{
startId = "";
}
ZTreeNodeList = dicItemService.queryTypeCode(type,id,startId,yycj,name);//查询具有相应业务审批权限的警员字典
}else if(type.equals("CODE_SPJY")){
ZTreeNodeList = dicItemService.queryTypeSpUsercode(startId,name);//查询具有相应业务审批权限的警员字典
}else if("0".equals(isInit)){//非初始化调用
}else{
// ZTreeNodeList = dicItemService.queryAllCode(type);//拿到指定代码类型的所有字典信息
ZTreeNodeList = dicItemService.queryTypeCode(type,id,startId,yycj,name);
ZTreeNodeList=Sort(ZTreeNodeList);
}else{
ZTreeNodeList = dicItemService.queryAllCode(type);//拿到指定代码类型的所有字典信息
}
}
......
......@@ -179,40 +179,34 @@ public class IDicItemServiceImpl implements IDicItemService {
if (null != ssdw && !"".equals(ssdw) && ssdw.length() >= 2) {
ssdw = ssdw.substring(0, 2);
}
//String key = "zzjgdm_"+ssdw+":"+node.getCodeType()+":"+node.getpId()+":"+node.getId()+":"+node.getName()+":"+node.getId()+" | "+node.getName();
if(id==null||"".equals(id)){//根节点
id=null;
if("CODE_UNIT".equals(type)||"CODE_XZUNIT".equals(type) ){//单位代码增加起始单位过滤功能
if(startId!=null){
id=String.format("%-12s", startId).replace(' ', '0');//后位补零
}
}else if("CODE_AJXZLB".equals(type)||"CODE_XALBDMBCMS".equals(type)){
id=startId;
}
}
if(name==null||"".equals(name)){
name="*";
}
boolean isFirst = true;//是否第一次进入
//id这个参数在进入代码框的时候没有
if("CODE_XZUNIT".equals(type)){//警员代码框
if(startId!=null&&!"".equals(startId.trim())){//所属单位不为空
if(id==null||"".equals(id)){//根节点
//通过startId 拿到其父节点的code值
id = zczlDao.getParentCode(startId);
isFirst = false;
}
}else{
if(id==null||"".equals(id)){//根节点
id=null;
}
}
if(startId==null||"".equals(startId)){
startId="*";
}else{
if(id==null||"".equals(id)){//根节点
id=null;
}
startId=startId+"*";
}
//获取符合条件的key
String keys = ssdw + ":" + type + ":"+id+":*:"+name;
String keys = ssdw + ":" + type + ":"+id+":"+startId+":"+name+":*";
System.out.println("keys=="+keys);
Set<String> set = redisTemplate.keys(keys);
Iterator<String> iterator = set.iterator();
while(iterator.hasNext()){
String str = iterator.next();
System.out.println("key============"+str);
String jsonStr=redisTemplate.opsForValue().get(str);
//System.out.println("jsonStr="+jsonStr);
jsonStr=jsonStr.replaceAll("\\\\","");
if(jsonStr.startsWith("\"")){
jsonStr=jsonStr.substring(1,jsonStr.length());
......@@ -220,25 +214,56 @@ public class IDicItemServiceImpl implements IDicItemService {
if(jsonStr.endsWith("\"")){
jsonStr=jsonStr.substring(0,jsonStr.length()-1);
}
//System.out.println("jsonStr="+jsonStr);
SysDictitem sysDictitem=JSON.parseObject(jsonStr,SysDictitem.class);
ZTreeNode node=new ZTreeNode();
node=parseSysDictitemToNode(node,sysDictitem);
if(node.isIsParent()){
if(node.getpId()==null||"".equals(node.getpId())||node.isIsParent()){
node.setState("closed"); //显示文件夹图标
}else{
node.setState(null); //显示叶子图标
}
if(isFirst){
ztreeNodes.add(node);
}else{
//本单位才add
if(startId.equals(node.getId())){
if("magl".equals(yycj)){
if(yycj.equals(node.getYycj1())){
ztreeNodes.add(node);
}
}else if("gmfnetgl".equals(yycj)){
if(yycj.equals(node.getYycj2())){
ztreeNodes.add(node);
}
}else if("dqcgl".equals(yycj)){
if(yycj.equals(node.getYycj3())){
ztreeNodes.add(node);
}
}else if("sqgl".equals(yycj)){
if(yycj.equals(node.getYycj4())){
ztreeNodes.add(node);
}
}else if("shgl".equals(yycj)){
if(yycj.equals(node.getYycj5())){
ztreeNodes.add(node);
}
}else if("segl".equals(yycj)){
if(yycj.equals(node.getYycj6())){
ztreeNodes.add(node);
}
}else if("kqyxlthaj".equals(yycj)){
if(yycj.equals(node.getYycj7())){
ztreeNodes.add(node);
}
}else if("wwajgl".equals(yycj)){
if(yycj.equals(node.getYycj8())){
ztreeNodes.add(node);
}
}else if("shcegl".equals(yycj)){
if(yycj.equals(node.getYycj9())){ //涉黑扫恶中案件类别只显示yycj9=shcegl
ztreeNodes.add(node);
}
}else{
ztreeNodes.add(node);
}
}
System.out.println(ztreeNodes.size());
return ztreeNodes;
}
......
......@@ -1646,7 +1646,7 @@ function openCombotree(ID) {
//初始化字典树
$('#' + dictTreeID).tree({
method: 'get',
url: dictUrl+"&&isInit=0",
url: dictUrl,
checkbox: true,
lines: true,
onBeforeCheck: function (node, checked) {
......
......@@ -139,13 +139,13 @@
<td class="ar" width="13.3%">业务类型:</td>
<td width="20%">
<span class="textbox">
<input type="text" id="ywlx" name="ywlx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="ywlx" name="ywlx" class="val easyui-combobox" 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="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_ZLLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
</tr>
......@@ -214,8 +214,18 @@
<script type="text/javascript" src="/js/listBxqjsdzczl.js"></script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
<script>
openCombotree('ywlx');
openCombotree('zllx');
$(document).ready(function() {
$('#ywlx').combotree({
onChange: function (n, o) {
$('#zllx').combotree('clear');
$('#zllx').combotree({
url: "/queryTypeCode?type=CODE_ZLLXDM&startId=" + n
});
openCombotree('zllx');
}
});
});
</script>
</body>
</html>
\ No newline at end of file
......@@ -204,7 +204,6 @@
<script type="text/javascript" src="/js/spqxszList.js"></script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
<script>
openCombotree('ywlx');
openCombotree('unitcode');
</script>
</body>
......@@ -238,4 +237,17 @@
</div>
</form>
</div>
</html>
\ No newline at end of file
</html>
<script>
$(document).ready(function() {
$('#ywlx').combotree({
onChange: function (n, o) {
$('#zllx').combotree('clear');
$('#zllx').combotree({
url: "/queryTypeCode?type=CODE_ZLLXDM&startId=" + n
});
openCombotree('zllx');
}
});
});
</script>
\ No newline at end of file
......@@ -145,13 +145,13 @@
<td class="ar" width="13.3%">业务类型:</td>
<td width="20%">
<span class="textbox">
<input type="text" id="ywlx" name="ywlx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="ywlx" name="ywlx" class="val easyui-combobox" 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="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_ZLLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
</tr>
......@@ -252,10 +252,22 @@
<script type="text/javascript" src="/js/listWfqdzczl.js"></script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
<script>
openCombotree('ywlx');
openCombotree('zllx');
openCombotree('zljsdwdm');
</script>
</body>
</html>
\ No newline at end of file
</html>
<script>
$(document).ready(function() {
$('#ywlx').combotree({
onChange: function (n, o) {
$('#zllx').combotree('clear');
$('#zllx').combotree({
url: "/queryTypeCode?type=CODE_ZLLXDM&startId=" + n
});
openCombotree('zllx');
}
});
});
</script>
\ No newline at end of file
......@@ -154,13 +154,13 @@
<td class="ar" width="13.3%">业务类型:</td>
<td width="20%">
<span class="textbox">
<input type="text" id="ywlx" name="ywlx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="ywlx" name="ywlx" class="val easyui-combobox" 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="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_ZLLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
</tr>
......@@ -267,7 +267,6 @@
<script type="text/javascript" src="/js/listWfzdzczl.js"></script>
<script>
openCombotree('ywlx');
openCombotree('zllx');
</script>
</body>
......@@ -522,5 +521,16 @@
openCombotree('qsrgajgdm');
openCombotree('qsrjh');
openCombotree('qsrjh_yj');
$(document).ready(function() {
$('#ywlx').combotree({
onChange: function (n, o) {
$('#zllx').combotree('clear');
$('#zllx').combotree({
url: "/queryTypeCode?type=CODE_ZLLXDM&startId=" + n
});
openCombotree('zllx');
}
});
});
</script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
\ No newline at end of file
......@@ -139,13 +139,13 @@
<td class="ar" width="13.3%">业务类型:</td>
<td width="20%">
<span class="textbox">
<input type="text" id="ywlx" name="ywlx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="ywlx" name="ywlx" class="val easyui-combobox" 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="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_ZLLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
</tr>
......@@ -246,9 +246,19 @@
<script type="text/javascript" src="/js/listWqqfbdzczl.js"></script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
<script>
openCombotree('ywlx');
openCombotree('zllx');
openCombotree('zljsdwdm');
$(document).ready(function() {
$('#ywlx').combotree({
onChange: function (n, o) {
$('#zllx').combotree('clear');
$('#zllx').combotree({
url: "/queryTypeCode?type=CODE_ZLLXDM&startId=" + n
});
openCombotree('zllx');
}
});
});
</script>
</body>
......
......@@ -189,13 +189,13 @@
<td class="ar" width="13.3%">业务类型:</td>
<td width="20%">
<span class="textbox">
<input type="text" id="ywlx" name="ywlx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="ywlx" name="ywlx" class="val easyui-combobox" 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="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="url: '/queryTypeCode?type=CODE_ZLLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
<input type="text" id="zllx" name="zllx" class="val easyui-combotree" data-options="method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
</tr>
......@@ -286,7 +286,6 @@
<script type="text/javascript" src="/js/listXywspdzczl.js"></script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
<script>
openCombotree('ywlx');
openCombotree('zllx');
openCombotree('zljsdwdm');
</script>
......@@ -371,4 +370,17 @@
</div>
</form>
</div>
</html>
\ No newline at end of file
</html>
<script>
$(document).ready(function() {
$('#ywlx').combotree({
onChange: function (n, o) {
$('#zllx').combotree('clear');
$('#zllx').combotree({
url: "/queryTypeCode?type=CODE_ZLLXDM&startId=" + n
});
openCombotree('zllx');
}
});
});
</script>
\ No newline at end of file
......@@ -167,7 +167,7 @@
<td class="ar necessary" width="13.3%">业务类型:</td>
<td width="20%">
<span class="textbox">
<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'"/>
<input type="text" id="ywlx" name="ywlx" value="${tbYwZczl.ywlx}" class="val easyui-combobox" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
<td class="ar" width="13.3%">审批人:</td>
......@@ -348,7 +348,6 @@
<script src="/common/js/jquery.alert.js"></script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
<script>
openCombotree('ywlx');
openCombotree('zllx');
openCombotree('zljsdwdm');
</script>
......
......@@ -166,7 +166,7 @@
<td class="ar necessary" width="13.3%">业务类型:</td>
<td width="20%">
<span class="textbox">
<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'"/>
<input type="text" id="ywlx" name="ywlx" value="${tbYwZczl.ywlx}" class="val easyui-combobox" data-options="url: '/queryTypeCode?type=CODE_YWLXDM',method:'get',fit:true,textField : 'text', valueField : 'id'"/>
</span>
</td>
<td class="ar" width="13.3%">审批人:</td>
......@@ -346,7 +346,6 @@
<script src="/common/js/jquery.alert.js"></script>
<script id="scripturlid" src="/common/js/checkurl.js?url=${perurl}" type="text/javascript"></script>
<script>
openCombotree('ywlx');
openCombotree('zllx');
openCombotree('zljsdwdm');
</script>
......
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