Explorar el Código

Merge remote-tracking branch 'origin/master'

tjf hace 3 años
padre
commit
1234d7e8dc

+ 4 - 3
boman-web-core/src/main/java/com/boman/web/core/controller/CzrkController.java

@@ -9,6 +9,7 @@ import com.boman.common.log.annotation.Log;
 import com.boman.common.log.enums.BusinessType;
 import com.boman.common.security.annotation.PreAuthorize;
 import com.boman.domain.Czrk;
+import com.boman.domain.CzrkJzdz;
 import com.boman.domain.SysRole;
 import com.boman.domain.TableDataInfo;
 import com.boman.domain.dto.AjaxResult;
@@ -219,10 +220,10 @@ public class CzrkController extends BaseController {
     @Log(title = "人员信息", businessType = BusinessType.EXPORT)
     @PreAuthorize(hasPermi = "system:czrk:export")
     @PostMapping("/export")
-    public void export(HttpServletResponse response, Czrk czrk) throws IOException
+    public void export(HttpServletResponse response, @RequestBody Czrk czrk) throws IOException
     {
         List<Czrk> czrkList = czrkService.getAllCzrk(czrk);
-        ExcelUtil<Czrk> util = new ExcelUtil<Czrk>(Czrk.class);
-        util.exportExcel(response, czrkList, "梅城镇人员数据");
+        ExcelUtil<Czrk> util = new ExcelUtil<>(Czrk.class);
+        util.exportExcel(response, czrkList, "人员数据");
     }
 }

+ 20 - 0
boman-web-core/src/main/java/com/boman/web/core/service/czrk/CzrkServiceImpl.java

@@ -2,6 +2,7 @@ package com.boman.web.core.service.czrk;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
 import com.boman.common.core.utils.DateUtils;
 import com.boman.common.core.utils.StringUtils;
 import com.boman.common.core.utils.constant.HttpStatus;
@@ -417,6 +418,25 @@ public class CzrkServiceImpl implements ICzrkService {
             childCount += czrkJzdzService.insertCzrkJzdz(czrkJzdz);
 
         }
+
+        //人员信息新增成功
+        /*if(childCount > 0){
+            //同步修改redis缓存数据
+            //修改潜山市总数居
+            //从redis取出潜山市数据
+            JSONObject jsonObject = redisService.getCacheObject(packRedisKey("1"));
+            //将JSONObject转为map
+            Map<String,Object> parMap =  JSONObject.parseObject(jsonObject.toJSONString(), new TypeReference<Map<String, Object>>(){});
+            //判断新增的是否是潜山市人口
+            if(czrk.getRegionId().equals("340882000000")){
+
+
+            }else{
+
+            }
+
+        }*/
+
         return childCount > 0 ? AjaxResult.success() : AjaxResult.error();
     }
 

+ 6 - 6
boman-web-core/src/main/resources/mapper/CzrkMapper.xml

@@ -1136,7 +1136,7 @@
         where region_id = #{regionId};
     </select>
     <select id="getAllCzrk" resultMap="CzrkResult">
-        select  c.user_name, STUFF(c.id_card,1,14,'*********') as id_card,  c.province, c.city, c.region,
+        select  c.user_name, STUFF(c.id_card,7,8,'********') as id_card,  c.province, c.city, c.region,
         c.village_towns, c.village, c.villager_group,c.now_in,c.key_industries,
         cj.province as province_jzdz,cj.city as city_jzdz,
         cj.region as region_jzdz,cj.town as town_jzdz,
@@ -1191,11 +1191,11 @@
                     #{idCard}
                 </foreach>
             </if>
-            <if test="czrkJzdz.provinceId != null">and z.province_id = #{czrkJzdz.provinceId}</if>
-            <if test="czrkJzdz.cityId != null">and z.city_id = #{czrkJzdz.cityId}</if>
-            <if test="czrkJzdz.regionId != null">and z.region_id = #{czrkJzdz.regionId}</if>
-            <if test="czrkJzdz.townId != null">and z.town_id = #{czrkJzdz.townId}</if>
-            <if test="czrkJzdz.villageId != null">and z.village_id = #{czrkJzdz.villageId}</if>
+            <if test="provinceIdXjd != null">and cj.province_id = #{provinceIdXjd}</if>
+            <if test="cityIdXjd != null">and cj.city_id = #{cityIdXjd}</if>
+            <if test="regionIdXjd != null">and cj.region_id = #{regionIdXjd}</if>
+            <if test="villageTownsIdXjd != null">and cj.town_id = #{villageTownsIdXjd}</if>
+            <if test="villageIdXjd != null">and cj.village_id = #{villageIdXjd}</if>
         </where>
         order by c.create_time DESC
     </select>