Commit 8b2f5ebc by mayunfei

侦查指令移交时 人员选择问题

parent 7fc0cec5
package com.founder.redis.controller;
import com.alibaba.fastjson.JSONArray;
import com.founder.model.User;
import com.founder.model.ZTreeNode;
import com.founder.redis.service.IDicItemService;
import com.founder.redis.service.impl.ImportCode;
......@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
......@@ -25,12 +27,14 @@ public class DictController {
@RequestMapping(value = "/queryTypeCode", method = RequestMethod.GET)
@ResponseBody
public List<ZTreeNode> queryTypeCode(String type, String id,String startId, String yycj, String name,String isInit) {
public List<ZTreeNode> queryTypeCode(HttpServletRequest request,String type, String id,String startId, String yycj, String name,String isInit) {
List<ZTreeNode> ZTreeNodeList = new ArrayList<ZTreeNode>();
if (type != null && !"".equals(type)) {
if(type.equals("CODE_JY")){
ZTreeNodeList = dicItemService.queryTypeUsercode(startId,name);//查询警员字典
}if(type.equals("CODE_SPJY")){
User user = (User)request.getSession().getAttribute("user");
ZTreeNodeList = dicItemService.queryTypeUsercode(startId,name,user.getPolicemanid());//查询警员字典
}else if(type.equals("CODE_SPJY")){
ZTreeNodeList = dicItemService.queryTypeSpUsercode(startId,name);//查询具有相应业务审批权限的警员字典
}else if("0".equals(isInit)){//非初始化调用
ZTreeNodeList = dicItemService.queryTypeCode(type,id,startId,yycj,name);
......@@ -85,7 +89,7 @@ public class DictController {
List<ZTreeNode> ZTreeNodeList = new ArrayList<ZTreeNode>();
if (code_type != null && !"".equals(code_type)) {
if("CODE_JY".equals(code_type)){
ZTreeNodeList = dicItemService.queryTypeUsercode(startId,name);//查询警员字典
ZTreeNodeList = dicItemService.queryTypeUsercode(startId,name,"");//查询警员字典
}else if("CODE_SPJY".equals(code_type)){
ZTreeNodeList = dicItemService.queryTypeSpUsercode(startId,name);//查询具有相应业务审批权限的警员字典
}else{
......
......@@ -55,7 +55,7 @@ public interface IDicItemService {
*/
public List<ZTreeNode> getXalbdmbcmsJson(String codeVal);
List<ZTreeNode> queryTypeUsercode(String startId,String name);
List<ZTreeNode> queryTypeUsercode(String startId,String name,String policeId);
List<ZTreeNode> queryAllCode(String type);
......
......@@ -68,11 +68,12 @@ public class IDicItemServiceImpl implements IDicItemService {
* @return
*/
@Override
public List<ZTreeNode> queryTypeUsercode(String startId,String name) {
public List<ZTreeNode> queryTypeUsercode(String startId,String name,String policeId) {
List<ZTreeNode> ztreeNodes = new ArrayList<ZTreeNode>();
Map m = new HashMap<>();
m.put("unitcode",startId);
m.put("true_name",name);
m.put("policeId",policeId);
//拿到对应单位下的警员信息
List<User> users = dicItemDao.queryAllUnitUser(m);
if(users!=null&&users.size()>0){//封装成node对象
......
......@@ -65,6 +65,7 @@
POLICEMANID as policemanid
from sys_user where scbz='0' and UNITCODE = #{unitcode } and OPEN_FLAG='1'
<if test="true_name!=null and true_name!=''">and TRUE_NAME like '%'||#{true_name, jdbcType=VARCHAR}||'%'</if>
<if test="policeId!=null and policeId!=''">and policemanid <![CDATA[<>]]> #{policeId, jdbcType=VARCHAR}</if>
</select>
<select id="getNameByCode" parameterType="java.util.Map" resultType="java.lang.String">
......
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