Commit 4abe7fd72f97d74f819b17fc19984794500ce527

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 5 changed files

platform-biz-service/src/main/java/com/lyms/platform/permission/model/Organization.java View file @ 4abe7fd
... ... @@ -17,6 +17,7 @@
17 17 private String provinceId;
18 18 private String cityId;
19 19 private String areaId;
  20 + private String streetId; //½ÖµÀ ³ÇÕò
20 21 private String address;
21 22 private String description;
22 23 private Integer publishId;
... ... @@ -35,6 +36,14 @@
35 36  
36 37 Map<String, Departments> departmentsMap = new HashMap<>();
37 38  
  39 + public String getStreetId() {
  40 + return streetId;
  41 + }
  42 +
  43 + public void setStreetId(String streetId) {
  44 + this.streetId = streetId;
  45 + }
  46 +
38 47 public Map<String, Departments> getDepartmentsMap() {
39 48 return departmentsMap;
40 49 }
41 50  
... ... @@ -252,14 +261,6 @@
252 261  
253 262 }
254 263  
255   - public String getShortcode() {
256   - return shortCode;
257   - }
258 264  
259   -
260   - public void setShortcode(String shortCode) {
261   - this.shortCode = shortCode;
262   -
263   - }
264 265 }
platform-biz-service/src/main/java/com/lyms/platform/permission/model/OrganizationQuery.java View file @ 4abe7fd
... ... @@ -15,6 +15,7 @@
15 15 private String provinceId;
16 16 private String cityId;
17 17 private String areaId;
  18 + private String streetId; //½ÖµÀ ³ÇÕò
18 19 private String address;
19 20 private String description;
20 21 private Integer publishId;
... ... @@ -25,6 +26,15 @@
25 26 private String shortCode;
26 27 private String keyword;
27 28 private String foreignId;
  29 +
  30 +
  31 + public String getStreetId() {
  32 + return streetId;
  33 + }
  34 +
  35 + public void setStreetId(String streetId) {
  36 + this.streetId = streetId;
  37 + }
28 38  
29 39 public String getForeignId() {
30 40 return foreignId;
platform-biz-service/src/main/java/com/lyms/platform/permission/service/OrganizationService.java View file @ 4abe7fd
... ... @@ -5,7 +5,18 @@
5 5  
6 6 import java.util.List;
7 7  
8   -public interface OrganizationService {public void addOrganization(Organization obj);public void updateOrganization(Organization obj);public void deleteOrganization(Integer id);public Organization getOrganization(Integer id);public int queryOrganizationCount(OrganizationQuery query);public List<Organization> queryOrganization(OrganizationQuery query);
  8 +public interface OrganizationService {
  9 + public void addOrganization(Organization obj);
  10 +
  11 + public void updateOrganization(Organization obj);
  12 +
  13 + public void deleteOrganization(Integer id);
  14 +
  15 + public Organization getOrganization(Integer id);
  16 +
  17 + public int queryOrganizationCount(OrganizationQuery query);
  18 +
  19 + public List<Organization> queryOrganization(OrganizationQuery query);
9 20  
10 21 }
platform-biz-service/src/main/resources/mainOrm/Organization.xml View file @ 4abe7fd
... ... @@ -10,6 +10,7 @@
10 10 <result column="area_manage" property="areaManage" jdbcType="INTEGER"/>
11 11 <result column="province_id" property="provinceId" jdbcType="VARCHAR"/>
12 12 <result column="city_id" property="cityId" jdbcType="VARCHAR"/>
  13 + <result column="street_id" property="streetId" jdbcType="VARCHAR"/>
13 14 <result column="area_id" property="areaId" jdbcType="VARCHAR"/>
14 15 <result column="address" property="address" jdbcType="VARCHAR"/>
15 16 <result column="description" property="description" jdbcType="VARCHAR"/>
... ... @@ -25,8 +26,8 @@
25 26  
26 27 <insert id="addOrganization" parameterType="com.lyms.platform.permission.model.Organization">
27 28 <selectKey order="AFTER" keyProperty="id" resultType="java.lang.Integer"> SELECT LAST_INSERT_ID() </selectKey>
28   -insert into organization (foreign_id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode)
29   -values (#{foreignId},#{name},#{type},#{level},#{areaManage},#{provinceId},#{cityId},#{areaId},#{address},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{shortCode})
  29 +insert into organization (foreign_id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,street_id)
  30 +values (#{foreignId},#{name},#{type},#{level},#{areaManage},#{provinceId},#{cityId},#{areaId},#{address},#{description},#{publishId},#{publishName},#{yn},#{modified},#{created},#{shortCode},#{streetId})
30 31 </insert>
31 32  
32 33  
... ... @@ -57,6 +58,9 @@
57 58 <if test="areaId != null">
58 59 area_id = #{areaId,jdbcType=INTEGER},
59 60 </if>
  61 + <if test="streetId != null">
  62 + street_id = #{streetId,jdbcType=INTEGER},
  63 + </if>
60 64 <if test="address != null and address != ''">
61 65 address = #{address,jdbcType=VARCHAR},
62 66 </if>
... ... @@ -92,7 +96,7 @@
92 96  
93 97  
94 98 <select id="getOrganization" resultMap="OrganizationResultMap" parameterType="java.lang.Integer">
95   -select id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id
  99 +select id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id,street_id
96 100 from organization where id = #{id,jdbcType=INTEGER}
97 101 </select>
98 102  
... ... @@ -137,6 +141,9 @@
137 141 <if test="areaId != null">
138 142 and area_id = #{areaId,jdbcType=INTEGER}
139 143 </if>
  144 + <if test="streetId != null">
  145 + and street_id = #{streetId,jdbcType=INTEGER}
  146 + </if>
140 147 <if test="address != null and address != ''">
141 148 and address = #{address,jdbcType=VARCHAR}
142 149 </if>
... ... @@ -171,7 +178,7 @@
171 178 <select id="queryOrganization" resultMap="OrganizationResultMap"
172 179 parameterType="com.lyms.platform.permission.model.OrganizationQuery">
173 180 select
174   - id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id
  181 + id,name,type,level,area_manage,province_id,city_id,area_id,address,description,publish_id,publish_name,yn,modified,created,shortCode,foreign_id,street_id
175 182 from organization
176 183 <include refid="OrganizationCondition"/>
177 184 <include refid="orderAndLimit"/>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java View file @ 4abe7fd
... ... @@ -100,6 +100,7 @@
100 100 @RequestParam(value = "provinceId", required = false) String provinceId,
101 101 @RequestParam(value = "cityId", required = false) String cityId,
102 102 @RequestParam(value = "areaId", required = false) String areaId,
  103 + @RequestParam(value = "streetId", required = false) String streetId,
103 104 @RequestParam(value = "address", required = false) String address,
104 105 @RequestParam(value = "description", required = false) String description,
105 106 @RequestParam(value = "shortCode", required = false) String shortCode) {
106 107  
107 108  
... ... @@ -124,10 +125,11 @@
124 125 organization.setProvinceId(provinceId);
125 126 organization.setCityId(cityId);
126 127 organization.setAreaId(areaId);
  128 + organization.setStreetId(streetId);
127 129 organization.setAddress(address);
128 130 organization.setDescription(description);
129   - organization.setShortcode(shortCode);
130 131 organization.setModified(new Date());
  132 + organization.setShortCode(shortCode);
131 133 organizationService.updateOrganization(organization);
132 134  
133 135 ResultUtils.buildSuccessResultAndWrite(response);
... ... @@ -149,6 +151,7 @@
149 151 @RequestParam(value = "provinceId") String provinceId,
150 152 @RequestParam(value = "cityId") String cityId,
151 153 @RequestParam(value = "areaId") String areaId,
  154 + @RequestParam(value = "streetId") String streetId,
152 155 @RequestParam(value = "address") String address,
153 156 @RequestParam(value = "description", required = false) String description,
154 157 @RequestParam(value = "shortCode", required = false) String shortCode) {
155 158  
... ... @@ -178,9 +181,10 @@
178 181 organization.setProvinceId(provinceId);
179 182 organization.setCityId(cityId);
180 183 organization.setAreaId(areaId);
  184 + organization.setStreetId(streetId);
181 185 organization.setAddress(address);
182 186 organization.setDescription(description);
183   - organization.setShortcode(shortCode);
  187 + organization.setShortCode(shortCode);
184 188 organization.setYn(YnEnums.YES.getId());
185 189 organization.setCreated(new Date());
186 190 organization.setModified(new Date());
... ... @@ -238,6 +242,11 @@
238 242 BasicConfig p2 = basicConfigService.getOneBasicConfigById(p1.getParentId());
239 243 if (p2 != null && SystemConfig.CHINA_BASIC_ID.equals(p2.getParentId())) {
240 244 organizationQuery.setAreaId(areaId);
  245 + } else {
  246 +// BasicConfig p3 = basicConfigService.getOneBasicConfigById(p1.getParentId());
  247 +// if (p2 != null && SystemConfig.CHINA_BASIC_ID.equals(p3.getParentId())) {
  248 + organizationQuery.setStreetId(areaId);
  249 +// }
241 250 }
242 251 }
243 252 }