Browse Source

Merge branch 'dev' of depot-qinghai/depot-system-qinghai into master

gdd 5 months ago
parent
commit
80d49dd977

+ 3 - 1
src/main/java/com/chinaitop/depot/sqr/service/impl/BizSqrEnterpriseApplyServiceImpl.java

@@ -169,7 +169,9 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
169
 
169
 
170
                     if(bizSqrEnterpriseApply.getApplyType()!=4){
170
                     if(bizSqrEnterpriseApply.getApplyType()!=4){
171
                         auditRequestMapper.delete(bizSqrEnterpriseApply.getId()+"");
171
                         auditRequestMapper.delete(bizSqrEnterpriseApply.getId()+"");
172
-                        bizSqrEnterpriseService.delete(bizSqrEnterpriseApply.getSqrEnterpriseId());
172
+                        if(bizSqrEnterpriseApply.getApplyType()==1){
173
+                            bizSqrEnterpriseService.delete(bizSqrEnterpriseApply.getSqrEnterpriseId());
174
+                        }
173
                         bizSqrEnterpriseApplyMapper.delete(bizSqrEnterpriseApply.getId());
175
                         bizSqrEnterpriseApplyMapper.delete(bizSqrEnterpriseApply.getId());
174
                         saveAndcreatEbizSqrEnterprise(bizSqrEnterpriseApply,userName);
176
                         saveAndcreatEbizSqrEnterprise(bizSqrEnterpriseApply,userName);
175
                         saveAndcreatRequest(bizSqrEnterpriseApply,userName);
177
                         saveAndcreatRequest(bizSqrEnterpriseApply,userName);

+ 4 - 1
src/main/java/com/chinaitop/depot/system/controller/FuncInfoController.java

@@ -78,9 +78,12 @@ public class FuncInfoController {
78
 	 */
78
 	 */
79
 	@RequestMapping(value="/getFuncList", method = RequestMethod.GET)
79
 	@RequestMapping(value="/getFuncList", method = RequestMethod.GET)
80
 	@ApiOperation(value="功能列表", notes = "查询功能列表")
80
 	@ApiOperation(value="功能列表", notes = "查询功能列表")
81
-	public List<FuncInfo> getFuncInfo() {
81
+	public List<FuncInfo> getFuncInfo(String funcName) {
82
 		FuncInfoExample example = new FuncInfoExample();
82
 		FuncInfoExample example = new FuncInfoExample();
83
 		Criteria criteria = example.createCriteria();
83
 		Criteria criteria = example.createCriteria();
84
+		if (StringUtils.isNotBlank(funcName)) {
85
+			criteria.andFuncNameLike("%" + funcName + "%");
86
+		}
84
 		return funcInfoService.queryByExample(example);	
87
 		return funcInfoService.queryByExample(example);	
85
 	}
88
 	}
86
 	
89
 	

+ 15 - 9
src/main/java/com/chinaitop/depot/system/controller/UserInfoController.java

@@ -147,11 +147,11 @@ public class UserInfoController {
147
         	criteria.andOrgIdEqualTo(Integer.valueOf(orgIds));
147
         	criteria.andOrgIdEqualTo(Integer.valueOf(orgIds));
148
         }
148
         }
149
 		
149
 		
150
-		List<UserInfo> listAll = userInfoService.queryByExample(example);
151
-		
152
-		if (pageNum!=null && pageSize!=null) {
150
+        if (pageNum!=null && pageSize!=null) {
153
 			PageHelper.startPage(pageNum, pageSize);
151
 			PageHelper.startPage(pageNum, pageSize);
154
 		}
152
 		}
153
+        
154
+		List<UserInfo> listAll = userInfoService.queryByExample(example);
155
 		
155
 		
156
 		PageInfo<UserInfo> pageInfo = new PageInfo<UserInfo>(listAll);
156
 		PageInfo<UserInfo> pageInfo = new PageInfo<UserInfo>(listAll);
157
 		return pageInfo;
157
 		return pageInfo;
@@ -380,18 +380,24 @@ public class UserInfoController {
380
 		try {
380
 		try {
381
 			// JSON字符串转对象
381
 			// JSON字符串转对象
382
 			ObjectMapper mapper = new ObjectMapper();
382
 			ObjectMapper mapper = new ObjectMapper();
383
-			String userInfoObject = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
384
-			if(!userInfoObject.isEmpty()) {
385
-				UserInfo userInfo = mapper.readValue(userInfoObject, UserInfo.class);
386
-				//UserInfo userInfo = (UserInfo)request.getSession().getAttribute("userInfo");
387
-				modelMap.put("userInfo", userInfo);
388
-			}
383
+			
384
+			String orgName = "";
389
 			String orgInfoObject = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
385
 			String orgInfoObject = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
390
 			if(!orgInfoObject.isEmpty()) {
386
 			if(!orgInfoObject.isEmpty()) {
391
 				OrgInfo orgInfo = mapper.readValue(orgInfoObject, OrgInfo.class);
387
 				OrgInfo orgInfo = mapper.readValue(orgInfoObject, OrgInfo.class);
392
 				//OrgInfo orgInfo = (OrgInfo)request.getSession().getAttribute("orgInfo");
388
 				//OrgInfo orgInfo = (OrgInfo)request.getSession().getAttribute("orgInfo");
389
+				orgName = orgInfo.getOrgName();
393
 				modelMap.put("orgInfo", orgInfo);
390
 				modelMap.put("orgInfo", orgInfo);
394
 			}
391
 			}
392
+			
393
+			String userInfoObject = ObjectUtils.toString(request.getSession().getAttribute("userInfo"),"");
394
+			if(!userInfoObject.isEmpty()) {
395
+				UserInfo userInfo = mapper.readValue(userInfoObject, UserInfo.class);
396
+				//UserInfo userInfo = (UserInfo)request.getSession().getAttribute("userInfo");
397
+				userInfo.setOrgName(orgName);
398
+				modelMap.put("userInfo", userInfo);
399
+			}
400
+			
395
 			String depotInfoObject = ObjectUtils.toString(request.getSession().getAttribute("depotInfo"),"");
401
 			String depotInfoObject = ObjectUtils.toString(request.getSession().getAttribute("depotInfo"),"");
396
 			if(!depotInfoObject.isEmpty()) {
402
 			if(!depotInfoObject.isEmpty()) {
397
 				OrgInfo depotInfo = mapper.readValue(depotInfoObject, OrgInfo.class);
403
 				OrgInfo depotInfo = mapper.readValue(depotInfoObject, OrgInfo.class);

+ 8 - 0
src/main/java/com/chinaitop/depot/system/controller/UserRoleController.java

@@ -56,5 +56,13 @@ public class UserRoleController {
56
 		
56
 		
57
 		return userRoleService.getUserRoleFeign(userId);
57
 		return userRoleService.getUserRoleFeign(userId);
58
 	}
58
 	}
59
+	
60
+	/**
61
+	 * 给 特定的账号 赋予 管理员的角色
62
+	 */
63
+	@RequestMapping(value="/addRoleToUser", method=RequestMethod.GET)
64
+	public void addRoleToUser() {
65
+		 userRoleService.addRoleToUser();
66
+	}
59
 
67
 
60
 }
68
 }

+ 28 - 12
src/main/java/com/chinaitop/depot/system/mapper/OrgInfoMapper.xml

@@ -15,7 +15,7 @@
15
     <result column="charge_person" property="chargePerson" jdbcType="VARCHAR" />
15
     <result column="charge_person" property="chargePerson" jdbcType="VARCHAR" />
16
     <result column="longitude" property="longitude" jdbcType="VARCHAR" />
16
     <result column="longitude" property="longitude" jdbcType="VARCHAR" />
17
     <result column="latitude" property="latitude" jdbcType="VARCHAR" />
17
     <result column="latitude" property="latitude" jdbcType="VARCHAR" />
18
-    <result column="regist_capital" property="registCapital" jdbcType="INTEGER" />
18
+    <result column="regist_capital" property="registCapital" jdbcType="DECIMAL" />
19
     <result column="work_number" property="workNumber" jdbcType="INTEGER" />
19
     <result column="work_number" property="workNumber" jdbcType="INTEGER" />
20
     <result column="area_code" property="areaCode" jdbcType="INTEGER" />
20
     <result column="area_code" property="areaCode" jdbcType="INTEGER" />
21
     <result column="area_name" property="areaName" jdbcType="VARCHAR" />
21
     <result column="area_name" property="areaName" jdbcType="VARCHAR" />
@@ -68,6 +68,8 @@
68
     <result column="zc_city" property="zcCity" jdbcType="INTEGER" />
68
     <result column="zc_city" property="zcCity" jdbcType="INTEGER" />
69
     <result column="zc_county" property="zcCounty" jdbcType="INTEGER" />
69
     <result column="zc_county" property="zcCounty" jdbcType="INTEGER" />
70
     <result column="unit_info_id" property="unitInfoId" jdbcType="VARCHAR" />
70
     <result column="unit_info_id" property="unitInfoId" jdbcType="VARCHAR" />
71
+    
72
+    <result column="tykqbm" property="tykqbm" jdbcType="VARCHAR" />
71
   </resultMap>
73
   </resultMap>
72
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chinaitop.depot.system.model.OrgInfo">
74
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chinaitop.depot.system.model.OrgInfo">
73
     <result column="wjl" jdbcType="LONGVARCHAR" property="wjl" />
75
     <result column="wjl" jdbcType="LONGVARCHAR" property="wjl" />
@@ -139,7 +141,7 @@
139
     parent_id, status, del_flag, birds_eye, birds_Remote, brief_introduction, invoice_title, 
141
     parent_id, status, del_flag, birds_eye, birds_Remote, brief_introduction, invoice_title, 
140
     regist_number, bank_name, account_name, account_number,level_code,total_assets,corporate_capacity,
142
     regist_number, bank_name, account_name, account_number,level_code,total_assets,corporate_capacity,
141
     office_phone,registered_address,mail_box,official_website,house_number,tank_number,depot_property,updatetime,
143
     office_phone,registered_address,mail_box,official_website,house_number,tank_number,depot_property,updatetime,
142
-    cityCouncil_code,frlxfs,yxgr,kqbm,sfzk, kq_number, zc_province, zc_city, zc_county,unit_info_id
144
+    cityCouncil_code,frlxfs,yxgr,kqbm,sfzk, kq_number, zc_province, zc_city, zc_county,unit_info_id,tykqbm
143
   </sql>
145
   </sql>
144
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.system.model.OrgInfoExample" >
146
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.system.model.OrgInfoExample" >
145
     select
147
     select
@@ -191,12 +193,12 @@
191
       account_number,total_assets,corporate_capacity,
193
       account_number,total_assets,corporate_capacity,
192
       office_phone,registered_address,mail_box,official_website,
194
       office_phone,registered_address,mail_box,official_website,
193
       house_number,tank_number,depot_property,level_code,wjl,frlxfs,yxgr,kqbm,sfzk, kq_number, zc_province, zc_city, zc_county,
195
       house_number,tank_number,depot_property,level_code,wjl,frlxfs,yxgr,kqbm,sfzk, kq_number, zc_province, zc_city, zc_county,
194
-      unit_info_id)
196
+      unit_info_id,tykqbm)
195
     values (#{orgId,jdbcType=INTEGER}, #{orgName,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR}, 
197
     values (#{orgId,jdbcType=INTEGER}, #{orgName,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR}, 
196
       #{orgCode,jdbcType=VARCHAR}, #{orgClassId,jdbcType=INTEGER}, #{companyNature,jdbcType=INTEGER}, 
198
       #{orgCode,jdbcType=VARCHAR}, #{orgClassId,jdbcType=INTEGER}, #{companyNature,jdbcType=INTEGER}, 
197
       #{busiType,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{contact,jdbcType=VARCHAR}, 
199
       #{busiType,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{contact,jdbcType=VARCHAR}, 
198
       #{fax,jdbcType=VARCHAR}, #{chargePerson,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, 
200
       #{fax,jdbcType=VARCHAR}, #{chargePerson,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, 
199
-      #{latitude,jdbcType=VARCHAR}, #{registCapital,jdbcType=INTEGER}, #{workNumber,jdbcType=INTEGER}, 
201
+      #{latitude,jdbcType=VARCHAR}, #{registCapital,jdbcType=DECIMAL}, #{workNumber,jdbcType=INTEGER}, 
200
       #{areaCode,jdbcType=INTEGER}, #{areaName,jdbcType=VARCHAR}, #{post,jdbcType=VARCHAR}, 
202
       #{areaCode,jdbcType=INTEGER}, #{areaName,jdbcType=VARCHAR}, #{post,jdbcType=VARCHAR}, 
201
       #{depotClass,jdbcType=INTEGER}, #{designCapacity,jdbcType=DECIMAL}, #{effectiveCapacity,jdbcType=DECIMAL}, 
203
       #{depotClass,jdbcType=INTEGER}, #{designCapacity,jdbcType=DECIMAL}, #{effectiveCapacity,jdbcType=DECIMAL}, 
202
       #{depotArea,jdbcType=DECIMAL}, #{completeDate,jdbcType=TIMESTAMP}, #{useDate,jdbcType=TIMESTAMP}, 
204
       #{depotArea,jdbcType=DECIMAL}, #{completeDate,jdbcType=TIMESTAMP}, #{useDate,jdbcType=TIMESTAMP}, 
@@ -213,7 +215,7 @@
213
       #{depotProperty,jdbcType=VARCHAR}, #{levelCode,jdbcType=VARCHAR}, #{wjl,jdbcType=LONGVARCHAR},
215
       #{depotProperty,jdbcType=VARCHAR}, #{levelCode,jdbcType=VARCHAR}, #{wjl,jdbcType=LONGVARCHAR},
214
       #{frlxfs,jdbcType=VARCHAR}, #{yxgr,jdbcType=DECIMAL}, #{kqbm,jdbcType=VARCHAR}, #{sfzk,jdbcType=VARCHAR},
216
       #{frlxfs,jdbcType=VARCHAR}, #{yxgr,jdbcType=DECIMAL}, #{kqbm,jdbcType=VARCHAR}, #{sfzk,jdbcType=VARCHAR},
215
       #{kqNumber,jdbcType=INTEGER}, #{zcProvince,jdbcType=INTEGER},#{zcCity,jdbcType=INTEGER}, #{zcCounty,jdbcType=INTEGER},
217
       #{kqNumber,jdbcType=INTEGER}, #{zcProvince,jdbcType=INTEGER},#{zcCity,jdbcType=INTEGER}, #{zcCounty,jdbcType=INTEGER},
216
-      #{unitInfoId,jdbcType=VARCHAR})
218
+      #{unitInfoId,jdbcType=VARCHAR},#{tykqbm,jdbcType=VARCHAR})
217
   </insert>
219
   </insert>
218
   <insert id="insertSelective" parameterType="com.chinaitop.depot.system.model.OrgInfo" useGeneratedKeys="true" keyProperty="orgId">
220
   <insert id="insertSelective" parameterType="com.chinaitop.depot.system.model.OrgInfo" useGeneratedKeys="true" keyProperty="orgId">
219
     insert into org_info
221
     insert into org_info
@@ -383,6 +385,9 @@
383
       <if test="unitInfoId != null" >
385
       <if test="unitInfoId != null" >
384
         unit_info_id,
386
         unit_info_id,
385
       </if>
387
       </if>
388
+      <if test="tykqbm != null" >
389
+        tykqbm,
390
+      </if>
386
     </trim>
391
     </trim>
387
     <trim prefix="values (" suffix=")" suffixOverrides="," >
392
     <trim prefix="values (" suffix=")" suffixOverrides="," >
388
       <if test="orgId != null" >
393
       <if test="orgId != null" >
@@ -425,7 +430,7 @@
425
         #{latitude,jdbcType=VARCHAR},
430
         #{latitude,jdbcType=VARCHAR},
426
       </if>
431
       </if>
427
       <if test="registCapital != null" >
432
       <if test="registCapital != null" >
428
-        #{registCapital,jdbcType=INTEGER},
433
+        #{registCapital,jdbcType=DECIMAL},
429
       </if>
434
       </if>
430
       <if test="workNumber != null" >
435
       <if test="workNumber != null" >
431
         #{workNumber,jdbcType=INTEGER},
436
         #{workNumber,jdbcType=INTEGER},
@@ -550,6 +555,9 @@
550
       <if test="unitInfoId != null">
555
       <if test="unitInfoId != null">
551
         #{unitInfoId,jdbcType=VARCHAR},
556
         #{unitInfoId,jdbcType=VARCHAR},
552
       </if>
557
       </if>
558
+      <if test="tykqbm != null">
559
+        #{tykqbm,jdbcType=VARCHAR},
560
+      </if>
553
     </trim>
561
     </trim>
554
   </insert>
562
   </insert>
555
   <select id="countByExample" parameterType="com.chinaitop.depot.system.model.OrgInfoExample" resultType="java.lang.Integer" >
563
   <select id="countByExample" parameterType="com.chinaitop.depot.system.model.OrgInfoExample" resultType="java.lang.Integer" >
@@ -601,7 +609,7 @@
601
         latitude = #{record.latitude,jdbcType=VARCHAR},
609
         latitude = #{record.latitude,jdbcType=VARCHAR},
602
       </if>
610
       </if>
603
       <if test="record.registCapital != null" >
611
       <if test="record.registCapital != null" >
604
-        regist_capital = #{record.registCapital,jdbcType=INTEGER},
612
+        regist_capital = #{record.registCapital,jdbcType=DECIMAL},
605
       </if>
613
       </if>
606
       <if test="record.workNumber != null" >
614
       <if test="record.workNumber != null" >
607
         work_number = #{record.workNumber,jdbcType=INTEGER},
615
         work_number = #{record.workNumber,jdbcType=INTEGER},
@@ -729,6 +737,9 @@
729
       <if test="record.unitInfoId != null">
737
       <if test="record.unitInfoId != null">
730
         unit_info_id = #{record.unitInfoId,jdbcType=VARCHAR},
738
         unit_info_id = #{record.unitInfoId,jdbcType=VARCHAR},
731
       </if>
739
       </if>
740
+      <if test="record.tykqbm != null">
741
+        tykqbm = #{record.tykqbm,jdbcType=VARCHAR},
742
+      </if>
732
     </set>
743
     </set>
733
     <if test="_parameter != null" >
744
     <if test="_parameter != null" >
734
       <include refid="Update_By_Example_Where_Clause" />
745
       <include refid="Update_By_Example_Where_Clause" />
@@ -749,7 +760,7 @@
749
       charge_person = #{record.chargePerson,jdbcType=VARCHAR},
760
       charge_person = #{record.chargePerson,jdbcType=VARCHAR},
750
       longitude = #{record.longitude,jdbcType=VARCHAR},
761
       longitude = #{record.longitude,jdbcType=VARCHAR},
751
       latitude = #{record.latitude,jdbcType=VARCHAR},
762
       latitude = #{record.latitude,jdbcType=VARCHAR},
752
-      regist_capital = #{record.registCapital,jdbcType=INTEGER},
763
+      regist_capital = #{record.registCapital,jdbcType=DECIMAL},
753
       work_number = #{record.workNumber,jdbcType=INTEGER},
764
       work_number = #{record.workNumber,jdbcType=INTEGER},
754
       area_code = #{record.areaCode,jdbcType=INTEGER},
765
       area_code = #{record.areaCode,jdbcType=INTEGER},
755
       area_name = #{record.areaName,jdbcType=VARCHAR},
766
       area_name = #{record.areaName,jdbcType=VARCHAR},
@@ -790,7 +801,8 @@
790
       zc_province = #{record.zcProvince,jdbcType=INTEGER},
801
       zc_province = #{record.zcProvince,jdbcType=INTEGER},
791
       zc_city = #{record.zcCity,jdbcType=INTEGER},
802
       zc_city = #{record.zcCity,jdbcType=INTEGER},
792
       zc_county = #{record.zcCounty,jdbcType=INTEGER},
803
       zc_county = #{record.zcCounty,jdbcType=INTEGER},
793
-      unit_info_id = #{record.unitInfoId,jdbcType=VARCHAR}
804
+      unit_info_id = #{record.unitInfoId,jdbcType=VARCHAR},
805
+      tykqbm = #{record.tykqbm,jdbcType=VARCHAR}
794
     <if test="_parameter != null" >
806
     <if test="_parameter != null" >
795
       <include refid="Update_By_Example_Where_Clause" />
807
       <include refid="Update_By_Example_Where_Clause" />
796
     </if>
808
     </if>
@@ -835,7 +847,7 @@
835
         latitude = #{latitude,jdbcType=VARCHAR},
847
         latitude = #{latitude,jdbcType=VARCHAR},
836
       </if>
848
       </if>
837
       <if test="registCapital != null" >
849
       <if test="registCapital != null" >
838
-        regist_capital = #{registCapital,jdbcType=INTEGER},
850
+        regist_capital = #{registCapital,jdbcType=DECIMAL},
839
       </if>
851
       </if>
840
       <if test="workNumber != null" >
852
       <if test="workNumber != null" >
841
         work_number = #{workNumber,jdbcType=INTEGER},
853
         work_number = #{workNumber,jdbcType=INTEGER},
@@ -990,6 +1002,9 @@
990
       <if test="unitInfoId != null" >
1002
       <if test="unitInfoId != null" >
991
         unit_info_id = #{unitInfoId,jdbcType=VARCHAR},
1003
         unit_info_id = #{unitInfoId,jdbcType=VARCHAR},
992
       </if>
1004
       </if>
1005
+      <if test="tykqbm != null" >
1006
+        tykqbm = #{tykqbm,jdbcType=VARCHAR},
1007
+      </if>
993
     </set>
1008
     </set>
994
     where org_id = #{orgId,jdbcType=INTEGER}
1009
     where org_id = #{orgId,jdbcType=INTEGER}
995
   </update>
1010
   </update>
@@ -1007,7 +1022,7 @@
1007
       charge_person = #{chargePerson,jdbcType=VARCHAR},
1022
       charge_person = #{chargePerson,jdbcType=VARCHAR},
1008
       longitude = #{longitude,jdbcType=VARCHAR},
1023
       longitude = #{longitude,jdbcType=VARCHAR},
1009
       latitude = #{latitude,jdbcType=VARCHAR},
1024
       latitude = #{latitude,jdbcType=VARCHAR},
1010
-      regist_capital = #{registCapital,jdbcType=INTEGER},
1025
+      regist_capital = #{registCapital,jdbcType=DECIMAL},
1011
       work_number = #{workNumber,jdbcType=INTEGER},
1026
       work_number = #{workNumber,jdbcType=INTEGER},
1012
       area_code = #{areaCode,jdbcType=INTEGER},
1027
       area_code = #{areaCode,jdbcType=INTEGER},
1013
       area_name = #{areaName,jdbcType=VARCHAR},
1028
       area_name = #{areaName,jdbcType=VARCHAR},
@@ -1058,7 +1073,8 @@
1058
       zc_province = #{zcProvince,jdbcType=INTEGER},
1073
       zc_province = #{zcProvince,jdbcType=INTEGER},
1059
       zc_city = #{zcCity,jdbcType=INTEGER},
1074
       zc_city = #{zcCity,jdbcType=INTEGER},
1060
       zc_county = #{zcCounty,jdbcType=INTEGER},
1075
       zc_county = #{zcCounty,jdbcType=INTEGER},
1061
-      unit_info_id = #{unitInfoId,jdbcType=VARCHAR}
1076
+      unit_info_id = #{unitInfoId,jdbcType=VARCHAR},
1077
+      tykqbm = #{tykqbm,jdbcType=VARCHAR}
1062
     where org_id = #{orgId,jdbcType=INTEGER}
1078
     where org_id = #{orgId,jdbcType=INTEGER}
1063
   </update>
1079
   </update>
1064
   <update id="updateOrgLevel" parameterType="map" statementType="CALLABLE" >
1080
   <update id="updateOrgLevel" parameterType="map" statementType="CALLABLE" >

+ 17 - 3
src/main/java/com/chinaitop/depot/system/model/OrgInfo.java

@@ -12,6 +12,8 @@ public class OrgInfo implements Serializable {
12
     
12
     
13
     private String unitInfoId;
13
     private String unitInfoId;
14
     
14
     
15
+    private String tykqbm;
16
+    
15
     public String getUnitInfoId() {
17
     public String getUnitInfoId() {
16
 		return unitInfoId;
18
 		return unitInfoId;
17
 	}
19
 	}
@@ -19,6 +21,18 @@ public class OrgInfo implements Serializable {
19
 	public void setUnitInfoId(String unitInfoId) {
21
 	public void setUnitInfoId(String unitInfoId) {
20
 		this.unitInfoId = unitInfoId;
22
 		this.unitInfoId = unitInfoId;
21
 	}
23
 	}
24
+	
25
+	
26
+
27
+	public String getTykqbm() {
28
+		return tykqbm;
29
+	}
30
+
31
+	public void setTykqbm(String tykqbm) {
32
+		this.tykqbm = tykqbm;
33
+	}
34
+
35
+
22
 
36
 
23
 	private Integer orgId;
37
 	private Integer orgId;
24
 
38
 
@@ -46,7 +60,7 @@ public class OrgInfo implements Serializable {
46
 
60
 
47
     private String latitude;
61
     private String latitude;
48
 
62
 
49
-    private Integer registCapital;
63
+    private BigDecimal registCapital;
50
 
64
 
51
     private Integer workNumber;
65
     private Integer workNumber;
52
 
66
 
@@ -258,11 +272,11 @@ public class OrgInfo implements Serializable {
258
         this.latitude = latitude == null ? null : latitude.trim();
272
         this.latitude = latitude == null ? null : latitude.trim();
259
     }
273
     }
260
 
274
 
261
-    public Integer getRegistCapital() {
275
+    public BigDecimal getRegistCapital() {
262
         return registCapital;
276
         return registCapital;
263
     }
277
     }
264
 
278
 
265
-    public void setRegistCapital(Integer registCapital) {
279
+    public void setRegistCapital(BigDecimal registCapital) {
266
         this.registCapital = registCapital;
280
         this.registCapital = registCapital;
267
     }
281
     }
268
 
282
 

+ 2 - 0
src/main/java/com/chinaitop/depot/system/service/UserRoleService.java

@@ -16,4 +16,6 @@ public interface UserRoleService {
16
 
16
 
17
 	List<Map<String, String>> getUserRoleFeign(Integer userId);
17
 	List<Map<String, String>> getUserRoleFeign(Integer userId);
18
 
18
 
19
+	void addRoleToUser();
20
+
19
 }
21
 }

+ 1 - 1
src/main/java/com/chinaitop/depot/system/service/impl/DataDockingServiceImpl.java

@@ -136,7 +136,7 @@ public class DataDockingServiceImpl implements DataDockingService {
136
     	//注册资本zczb
136
     	//注册资本zczb
137
     	String zczb = obj.getString("zczb");
137
     	String zczb = obj.getString("zczb");
138
     	if (StringUtils.isNotBlank(zczb)) {
138
     	if (StringUtils.isNotBlank(zczb)) {
139
-    		orgInfo.setRegistCapital((int) Double.parseDouble(zczb.trim()));
139
+    		orgInfo.setRegistCapital(new BigDecimal(zczb));
140
     	}
140
     	}
141
 
141
 
142
     	//资产总额zcze
142
     	//资产总额zcze

+ 29 - 3
src/main/java/com/chinaitop/depot/system/service/impl/OrgInfoServiceImpl.java

@@ -9,7 +9,6 @@ import javax.annotation.Resource;
9
 
9
 
10
 import org.apache.commons.lang.StringUtils;
10
 import org.apache.commons.lang.StringUtils;
11
 import org.springframework.beans.factory.annotation.Value;
11
 import org.springframework.beans.factory.annotation.Value;
12
-import org.springframework.context.annotation.Bean;
13
 import org.springframework.stereotype.Service;
12
 import org.springframework.stereotype.Service;
14
 import org.springframework.util.LinkedMultiValueMap;
13
 import org.springframework.util.LinkedMultiValueMap;
15
 import org.springframework.util.MultiValueMap;
14
 import org.springframework.util.MultiValueMap;
@@ -19,8 +18,6 @@ import com.chinaitop.depot.system.mapper.OrgInfoMapper;
19
 import com.chinaitop.depot.system.model.OrgInfo;
18
 import com.chinaitop.depot.system.model.OrgInfo;
20
 import com.chinaitop.depot.system.model.OrgInfoExample;
19
 import com.chinaitop.depot.system.model.OrgInfoExample;
21
 import com.chinaitop.depot.system.service.OrgInfoService;
20
 import com.chinaitop.depot.system.service.OrgInfoService;
22
-import com.fasterxml.jackson.core.JsonProcessingException;
23
-import com.fasterxml.jackson.databind.ObjectMapper;
24
 
21
 
25
 @Service
22
 @Service
26
 public class OrgInfoServiceImpl implements OrgInfoService {
23
 public class OrgInfoServiceImpl implements OrgInfoService {
@@ -60,6 +57,8 @@ public class OrgInfoServiceImpl implements OrgInfoService {
60
 		
57
 		
61
 		this.gjjjk(orgInfo.getOrgId(), orgInfo.getOrgId(), "i");
58
 		this.gjjjk(orgInfo.getOrgId(), orgInfo.getOrgId(), "i");
62
 		
59
 		
60
+		this.gjjwjjk(orgInfo.getOrgId(), orgInfo.getOrgId(), "i");
61
+		
63
 	}
62
 	}
64
 
63
 
65
 	@Override
64
 	@Override
@@ -71,6 +70,8 @@ public class OrgInfoServiceImpl implements OrgInfoService {
71
 		 * 国家局数据
70
 		 * 国家局数据
72
 		 */
71
 		 */
73
 		this.gjjjk(orgInfo.getOrgId(), orgInfo.getOrgId(), "u");
72
 		this.gjjjk(orgInfo.getOrgId(), orgInfo.getOrgId(), "u");
73
+		
74
+		this.gjjwjjk(orgInfo.getOrgId(), orgInfo.getOrgId(), "u");
74
 	}
75
 	}
75
 
76
 
76
 	@Override
77
 	@Override
@@ -83,6 +84,9 @@ public class OrgInfoServiceImpl implements OrgInfoService {
83
 		 */
84
 		 */
84
 		
85
 		
85
 		this.gjjjk(orgId, orgId, "d");
86
 		this.gjjjk(orgId, orgId, "d");
87
+		
88
+		this.gjjwjjk(orgId, orgId, "d");
89
+		
86
 	}
90
 	}
87
 
91
 
88
 	@Override
92
 	@Override
@@ -239,4 +243,26 @@ public class OrgInfoServiceImpl implements OrgInfoService {
239
            
243
            
240
     	
244
     	
241
        }
245
        }
246
+       
247
+       public void gjjwjjk(Integer id, Integer orgId,String czbz) {
248
+           
249
+     	  String tableName = "ODS_UP_WJXXJK";
250
+    		/**
251
+             * restTemplate调用
252
+             */
253
+            //String url = "http://localhost:9022/recPublish/sendMessage";//
254
+            //发送post请求,并打印结果,以String类型接收响应结果JSON字符串
255
+    		
256
+            MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
257
+    		sendMap.add("tableName", tableName);
258
+    		sendMap.add("czbz", czbz);
259
+    		sendMap.add("ywId", id);
260
+    		sendMap.add("orgId", orgId);
261
+
262
+         restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
263
+            
264
+     	
265
+        }
266
+
267
+	
242
 }
268
 }

+ 98 - 0
src/main/java/com/chinaitop/depot/system/service/impl/UserRoleServiceImpl.java

@@ -1,8 +1,21 @@
1
 package com.chinaitop.depot.system.service.impl;
1
 package com.chinaitop.depot.system.service.impl;
2
 
2
 
3
+import com.chinaitop.depot.system.mapper.FuncInfoMapper;
4
+import com.chinaitop.depot.system.mapper.RoleFuncMapper;
5
+import com.chinaitop.depot.system.mapper.RoleInfoMapper;
6
+import com.chinaitop.depot.system.mapper.UserInfoMapper;
3
 import com.chinaitop.depot.system.mapper.UserRoleMapper;
7
 import com.chinaitop.depot.system.mapper.UserRoleMapper;
8
+import com.chinaitop.depot.system.model.FuncInfo;
9
+import com.chinaitop.depot.system.model.FuncInfoExample;
10
+import com.chinaitop.depot.system.model.RoleFunc;
11
+import com.chinaitop.depot.system.model.RoleFuncExample;
12
+import com.chinaitop.depot.system.model.RoleInfo;
13
+import com.chinaitop.depot.system.model.RoleInfoExample;
14
+import com.chinaitop.depot.system.model.UserInfo;
15
+import com.chinaitop.depot.system.model.UserInfoExample;
4
 import com.chinaitop.depot.system.model.UserRole;
16
 import com.chinaitop.depot.system.model.UserRole;
5
 import com.chinaitop.depot.system.model.UserRoleExample;
17
 import com.chinaitop.depot.system.model.UserRoleExample;
18
+import com.chinaitop.depot.system.model.RoleInfoExample.Criteria;
6
 import com.chinaitop.depot.system.service.UserRoleService;
19
 import com.chinaitop.depot.system.service.UserRoleService;
7
 import org.springframework.stereotype.Service;
20
 import org.springframework.stereotype.Service;
8
 
21
 
@@ -15,6 +28,18 @@ public class UserRoleServiceImpl implements UserRoleService {
15
 	
28
 	
16
 	@Resource
29
 	@Resource
17
 	private UserRoleMapper userRoleMapper;
30
 	private UserRoleMapper userRoleMapper;
31
+	
32
+	@Resource
33
+	private UserInfoMapper UserInfoMapper;
34
+	
35
+	@Resource
36
+	private RoleInfoMapper RoleInfoMapper;
37
+	
38
+	@Resource
39
+	private FuncInfoMapper funcInfoMapper;
40
+	
41
+	@Resource
42
+	private RoleFuncMapper roleFuncMapper;
18
 
43
 
19
 	@Override
44
 	@Override
20
 	public List<UserRole> queryByExample(UserRoleExample example) {
45
 	public List<UserRole> queryByExample(UserRoleExample example) {
@@ -41,4 +66,77 @@ public class UserRoleServiceImpl implements UserRoleService {
41
 		return userRoleMapper.getUserRoleFeign(userId);
66
 		return userRoleMapper.getUserRoleFeign(userId);
42
 	}
67
 	}
43
 
68
 
69
+	@Override
70
+	public void addRoleToUser() {
71
+		// TODO Auto-generated method stub
72
+		
73
+		//查询出 手动增加的 用户的信息
74
+		UserInfoExample example = new UserInfoExample();
75
+		example.createCriteria().andUserIdGreaterThanOrEqualTo(10);
76
+		example.createCriteria().andUserIdLessThanOrEqualTo(72);
77
+		List<UserInfo> userInfoList = UserInfoMapper.selectByExample(example);
78
+		
79
+		
80
+		//所有的权限信息
81
+		FuncInfoExample funcExample = new FuncInfoExample();
82
+		List<FuncInfo> funcInfoList = funcInfoMapper.selectByExample(funcExample);
83
+	  
84
+		for(UserInfo userInfo:userInfoList){
85
+			//查询 改单位下的 管理员 角色的  id
86
+			
87
+			RoleInfoExample example1 = new RoleInfoExample();
88
+			Criteria criteria1 = example1.createCriteria();
89
+			criteria1.andRoleNameEqualTo("系统管理员");
90
+			criteria1.andOrgIdEqualTo(userInfo.getOrgId());
91
+			List<RoleInfo> roleInfoList = RoleInfoMapper.selectByExample(example1);
92
+			
93
+			if(roleInfoList.size()>0){
94
+				/**
95
+				 * 人员加角色
96
+				 */
97
+				//查询 该人员 有没有该角色  有 不处理  无 则增加
98
+				UserRoleExample example2 = new UserRoleExample();
99
+				com.chinaitop.depot.system.model.UserRoleExample.Criteria criteria2 = example2.createCriteria();
100
+				criteria2.andRoleIdEqualTo(roleInfoList.get(0).getRoleId());
101
+				criteria2.andUserIdEqualTo(userInfo.getUserId());
102
+				List<UserRole> userRoleList = userRoleMapper.selectByExample(example2);
103
+				if(userRoleList.size()>0){
104
+				
105
+				}else{
106
+					UserRole userRole = new UserRole();
107
+					userRole.setUserId(userInfo.getUserId());
108
+					userRole.setRoleId(roleInfoList.get(0).getRoleId());
109
+					userRoleMapper.insert(userRole);
110
+				}
111
+				
112
+				/**
113
+				 * 角色 加 权限
114
+				 */
115
+				//查询 该角色 有没有该权限  有 不处理  无 则增加
116
+				
117
+				for(FuncInfo funcInfo:funcInfoList){
118
+					RoleFuncExample example3 = new RoleFuncExample();
119
+					com.chinaitop.depot.system.model.RoleFuncExample.Criteria criteria3 = example3.createCriteria();
120
+					criteria3.andRoleIdEqualTo(roleInfoList.get(0).getRoleId());
121
+					criteria3.andFuncIdEqualTo(funcInfo.getFuncId());
122
+					List<RoleFunc> roleFuncList = roleFuncMapper.selectByExample(example3); 
123
+					if(roleFuncList.size()>0){
124
+						
125
+					}else{
126
+						RoleFunc roleFunc = new RoleFunc();
127
+						roleFunc.setFuncId(funcInfo.getFuncId());
128
+						roleFunc.setRoleId(roleInfoList.get(0).getRoleId());
129
+						roleFuncMapper.insert(roleFunc);
130
+					}
131
+				}
132
+				
133
+			}
134
+		}
135
+		
136
+		
137
+		
138
+		
139
+		
140
+	}
141
+
44
 }
142
 }