Explorar el Código

Merge remote-tracking branch 'origin/master'

LIVE_YE hace 3 años
padre
commit
622ee77bac

+ 10 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/CzrkController.java

@@ -16,6 +16,7 @@ import com.boman.web.core.domain.JsonRequest;
 import com.boman.web.core.service.czrk.ICzrkService;
 import com.boman.web.core.utils.AuthUtils;
 import lombok.extern.slf4j.Slf4j;
+import org.aspectj.weaver.loadtime.Aj;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -337,4 +338,13 @@ public class CzrkController extends BaseController {
     public AjaxResult vaccineStatistics(String code,String lenth) {
         return czrkService.vaccineStatistics(code,lenth);
     }
+
+
+    /**
+     * 一键未认领(把未填写到村级别的户籍用户设置为未认领,根据不同镇来操作)
+     */
+    @GetMapping("/setNoRl")
+    public AjaxResult setNoRl() {
+        return  toAjax(czrkService.setNoRl()) ;
+    }
 }

+ 2 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/CzrkMapper.java

@@ -248,4 +248,6 @@ public interface CzrkMapper {
     List<Czrk> getAllCzrkNoTownCz();
 
     List<Czrk> getAllCzrkHjVillage(Czrk czrk);
+
+    int setNoRl(@Param("czrk") Czrk czrk);
 }

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

@@ -30,6 +30,7 @@ import com.github.pagehelper.PageHelper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.tomcat.util.buf.HexUtils;
+import org.checkerframework.checker.units.qual.C;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
@@ -1551,6 +1552,20 @@ public class CzrkServiceImpl implements ICzrkService {
         return czrkList;
     }
 
+    /**
+     * 一键未认领(把未填写到村级别的户籍用户设置为未认领,根据不同镇来操作)
+     * @return
+     */
+    @Override
+    public int setNoRl() {
+        SysUser sysUser = AuthUtils.getLoginUser().getSysUser();
+        log.info("{}于{}一键设置未认领表"
+                , sysUser.getUserName(), DateUtils.dateTimeNow() );
+        Czrk czrk = new Czrk();
+        CzrkUtils.setQueryRole(czrk,sysUser, Czrk.HJ);
+        return  czrkMapper.setNoRl(czrk);
+    }
+
 
     private void townStsvaccine(JSONObject result, SysDept sysDept, List<Czrk> czrkList) {
         String deptName = sysDept.getDeptName();

+ 2 - 0
boman-web-core/src/main/java/com/boman/web/core/service/czrk/ICzrkService.java

@@ -159,4 +159,6 @@ public interface ICzrkService {
     List<Czrk> exportQianShan();
 
     List<Czrk> getAllCzrkHjVillage(Czrk czrk);
+
+    int setNoRl();
 }

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

@@ -1552,4 +1552,17 @@
     <select id="getCzrkByIdCard" resultMap="CzrkResult">
         select id,id_card,house_type from czrk where is_del = 'N' and id_card = #{idCard}
     </select>
+    <update id="setNoRl">
+        update czrk set is_rl = '否',is_confirm = 'N'
+        <where>
+            (village_id = '' or village_id is null or village_id = '0')
+            and is_del = 'N'
+            and  `status` = '1'
+            <if test="provinceId != null  and provinceId != ''">and province_id = #{provinceId}</if>
+            <if test="cityId != null  and cityId != ''">and city_id = #{cityId}</if>
+            <if test="regionId != null  and regionId != ''">and region_id = #{regionId}</if>
+            <if test="villageTownsId != null  and villageTownsId != ''">and village_towns_id = #{villageTownsId}</if>
+            <if test="villageId != null  and villageId != ''">and village_id = #{villageId}</if>
+        </where>
+    </update>
 </mapper>