Browse Source

修改bug

minitiger 8 years ago
parent
commit
66de893f03

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/FeeStation.java

@@ -28,4 +28,5 @@ public class FeeStation {
     private String deptid;
     private String deptid;
     //是否显示,0:不显示,1:显示
     //是否显示,0:不显示,1:显示
     private String isshow;
     private String isshow;
+    private String parentid;
 }
 }

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/User.java

@@ -84,6 +84,9 @@ public class User implements UserDetails {
 	
 	
 	private String fee_station_name ;
 	private String fee_station_name ;
 	
 	
+	//道管中心ID
+	private Integer road_manager_id;
+	
 	private List<String> roleids;
 	private List<String> roleids;
 
 
 	private List<Role> roles;
 	private List<Role> roles;

+ 6 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/DepartmentController.java

@@ -149,6 +149,12 @@ public class DepartmentController extends BaseController {
     	return returnResult(0, "获取成功", organs);
     	return returnResult(0, "获取成功", organs);
     }
     }
     
     
+    @RequestMapping(value = "/getAllRM",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
+    public String getAllRM(){
+    	List<FeeStation> organs = departmentService.getAllRM();
+    	return returnResult(0, "获取成功", organs);
+    }
+    
     @RequestMapping(value = "/getFsByDept",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
     @RequestMapping(value = "/getFsByDept",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
     public String getAFsByDeptId(HttpServletRequest request){
     public String getAFsByDeptId(HttpServletRequest request){
     	User u = getCurrentUser(request);
     	User u = getCurrentUser(request);

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/cluster/DepartmentDao.java

@@ -21,6 +21,7 @@ public interface DepartmentDao  {
     public void update(Organ organ);
     public void update(Organ organ);
     public void delete(Integer id);
     public void delete(Integer id);
     public List<FeeStation> getAllFS();
     public List<FeeStation> getAllFS();
+    public List<FeeStation> getAllRM();
     public FeeStation getFsBydeptId(Integer id);
     public FeeStation getFsBydeptId(Integer id);
     
     
     public List<StatisticsBean> selectFeeStationGroup(User obj);
     public List<StatisticsBean> selectFeeStationGroup(User obj);

+ 6 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml

@@ -22,6 +22,7 @@
         <result column="exit_etc" property="exit_etc" jdbcType="VARCHAR" />
         <result column="exit_etc" property="exit_etc" jdbcType="VARCHAR" />
         <result column="entrance_etc" property="entrance_etc" jdbcType="VARCHAR" />
         <result column="entrance_etc" property="entrance_etc" jdbcType="VARCHAR" />
         <result column="organ_id" property="deptid" jdbcType="VARCHAR" />
         <result column="organ_id" property="deptid" jdbcType="VARCHAR" />
+        <result column="parentid" property="parentid" jdbcType="INTEGER" />
     </resultMap>
     </resultMap>
     <select id="getAll" resultMap="BaseResultMap"  >
     <select id="getAll" resultMap="BaseResultMap"  >
         SELECT * 
         SELECT * 
@@ -35,7 +36,11 @@
         WHERE id = #{id}
         WHERE id = #{id}
     </select> -->
     </select> -->
     <select id="getAllFS" resultMap="FeeStationMap">
     <select id="getAllFS" resultMap="FeeStationMap">
-        SELECT * FROM t_br_layer_fee_station
+        SELECT *, b.parentid FROM t_br_layer_fee_station a left join t_sys_organ b on a.organ_id=b.id
+    </select>
+    
+    <select id="getAllRM" resultMap="FeeStationMap">
+        SELECT *, b.parentid FROM t_br_layer_road_manager a left join t_sys_organ b on a.organ_id=b.id
     </select>
     </select>
     
     
     <select id="getFsBydeptId" parameterType="java.lang.Integer" resultMap="FeeStationMap">
     <select id="getFsBydeptId" parameterType="java.lang.Integer" resultMap="FeeStationMap">

+ 3 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml

@@ -22,6 +22,7 @@
         <result column="organid" property="organid" jdbcType="INTEGER" />
         <result column="organid" property="organid" jdbcType="INTEGER" />
         <result property="truename" column="truename" jdbcType="VARCHAR"/>
         <result property="truename" column="truename" jdbcType="VARCHAR"/>
         <result property="positionid" column="positionid" jdbcType="INTEGER"/>
         <result property="positionid" column="positionid" jdbcType="INTEGER"/>
+        <result property="road_manager_id" column="road_manager_id" jdbcType="INTEGER"/>
         <result property="idno" column="idno" jdbcType="VARCHAR"/>
         <result property="idno" column="idno" jdbcType="VARCHAR"/>
         <result property="pic" column="pic" jdbcType="VARCHAR"/>
         <result property="pic" column="pic" jdbcType="VARCHAR"/>
         <result column="workno" property="workno" jdbcType="VARCHAR" />
         <result column="workno" property="workno" jdbcType="VARCHAR" />
@@ -90,8 +91,8 @@
 
 
 
 
     <select id="findByUserName" parameterType="String" resultMap="userMap">
     <select id="findByUserName" parameterType="String" resultMap="userMap">
-        select u.*
-        from t_sys_users u
+        select u.*,o.parentid as road_manager_id
+        from t_sys_users u left join t_sys_organ o on u.organid=o.id
         where username= #{username}
         where username= #{username}
     </select>
     </select>
     
     

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/DepartmentService.java

@@ -22,6 +22,8 @@ public interface DepartmentService {
 	
 	
 	public List<FeeStation> getAllFS();
 	public List<FeeStation> getAllFS();
 	
 	
+	public List<FeeStation> getAllRM();
+	
 	public FeeStation getFSByDeptId(Integer dept_id);
 	public FeeStation getFSByDeptId(Integer dept_id);
 	
 	
 	// 根据条件获取公司下道管或者收费站信息
 	// 根据条件获取公司下道管或者收费站信息

+ 6 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/DepartmentServiceImpl.java

@@ -148,4 +148,10 @@ public class DepartmentServiceImpl extends BaseService implements DepartmentServ
 		}
 		}
 	}
 	}
 
 
+	@Override
+	public List<FeeStation> getAllRM() {
+		// TODO Auto-generated method stub
+		return departmentDao.getAllRM();
+	}
+
 }
 }