Ver código fonte

fix 修改疫苗权限查询

Administrator 3 anos atrás
pai
commit
22ff7eb95d

+ 8 - 8
boman-modules/boman-system/src/main/java/com/boman/system/controller/SysDeptController.java

@@ -212,10 +212,10 @@ public class SysDeptController extends BaseController
     }
     }
 
 
 
 
-    @GetMapping("/moveData/{limit}/{offset}")
-    public String moveYmjzData(@PathVariable("limit") int limit, @PathVariable("offset") int offset) throws Exception {
-//        List<String> idCardList = mapper.listIdCard(limit, offset);
-        List<JSONObject> ymjzList = deptService.syncData();
+    @GetMapping("/auth/moveData/{limit}")
+    public String moveYmjzData( @PathVariable("limit") int limit) throws Exception {
+        //List<String> idCardList = mapper.listIdCard(limit, offset);
+        List<JSONObject> ymjzList = deptService.syncData(limit);
         int moveData = 0;
         int moveData = 0;
         StringBuilder stringBuilder = new StringBuilder();
         StringBuilder stringBuilder = new StringBuilder();
         List<String> enpty = new ArrayList<>();
         List<String> enpty = new ArrayList<>();
@@ -235,7 +235,7 @@ public class SysDeptController extends BaseController
             System.err.println("count: " + i + ", " + sql);
             System.err.println("count: " + i + ", " + sql);
             moveData++;
             moveData++;
         }
         }
-        File file = new File("E:\\\\work\\vainfo.sql");
+/*        File file = new File("E:\\\\work\\vainfo.sql");
 //        File file = new File("//home//vainfo_update.sql");
 //        File file = new File("//home//vainfo_update.sql");
         if (!file.exists()) {
         if (!file.exists()) {
             file.createNewFile();
             file.createNewFile();
@@ -244,7 +244,7 @@ public class SysDeptController extends BaseController
         FileWriter fileWriter = new FileWriter(file, true);
         FileWriter fileWriter = new FileWriter(file, true);
         BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
         BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
         bufferedWriter.write(stringBuilder.toString());
         bufferedWriter.write(stringBuilder.toString());
-        bufferedWriter.close();
+        bufferedWriter.close();*/
         for (String s : enpty) {
         for (String s : enpty) {
             System.out.println(s);
             System.out.println(s);
         }
         }
@@ -305,13 +305,13 @@ public class SysDeptController extends BaseController
         return AjaxResult.success();
         return AjaxResult.success();
     }
     }
 
 
-    @GetMapping("/auth")
+/*    @GetMapping("/auth/syncData")
     public void syncData() {
     public void syncData() {
             try {
             try {
                 deptService.syncData();
                 deptService.syncData();
             } catch (Exception e) {
             } catch (Exception e) {
                 e.printStackTrace();
                 e.printStackTrace();
             }
             }
-        }
+        }*/
 
 
 }
 }

+ 1 - 1
boman-modules/boman-system/src/main/java/com/boman/system/service/ISysDeptService.java

@@ -140,7 +140,7 @@ public interface ISysDeptService
 
 
     List<SysDept> getByParentId(Long deptId);
     List<SysDept> getByParentId(Long deptId);
 
 
-    public List<JSONObject> syncData() throws Exception;
+    public List<JSONObject> syncData(int limit) throws Exception;
 
 
     /**
     /**
      * 功能描述: 只找父亲,不招爷爷
      * 功能描述: 只找父亲,不招爷爷

+ 4 - 4
boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysDeptServiceImpl.java

@@ -389,7 +389,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
     }
     }
 
 
     @Override
     @Override
-    public List<JSONObject> syncData() throws Exception {
+    public List<JSONObject> syncData(int limit) throws Exception {
         List<JSONObject> datas = new ArrayList<>();
         List<JSONObject> datas = new ArrayList<>();
         try {
         try {
             SysDept sysDept = new SysDept();
             SysDept sysDept = new SysDept();
@@ -416,7 +416,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
                 villegeMap.put(deptName, deptId);
                 villegeMap.put(deptName, deptId);
             }
             }
 
 
-            List<JSONObject> vaccInfos = this.getVaccInfo();
+            List<JSONObject> vaccInfos = this.getVaccInfo(limit);
             for (JSONObject vanninfo : vaccInfos) {
             for (JSONObject vanninfo : vaccInfos) {
                 String idCard = vanninfo.getString("zjhm");
                 String idCard = vanninfo.getString("zjhm");
                 String dz = vanninfo.getString("hjdxz");
                 String dz = vanninfo.getString("hjdxz");
@@ -443,8 +443,8 @@ public class SysDeptServiceImpl implements ISysDeptService {
     @Resource
     @Resource
     private SyncMapper syncMapper;
     private SyncMapper syncMapper;
 
 
-    private List<JSONObject> getVaccInfo() {
-        String sql = "select * from hj_hj";
+    private List<JSONObject> getVaccInfo(int limit) {
+        String sql = "select zjhm,hjdxz,akmdz from hj_hj   limit " + limit+", 100000";
         List<JSONObject> objs = syncMapper.selectBySql(sql);
         List<JSONObject> objs = syncMapper.selectBySql(sql);
         return objs;
         return objs;
     }
     }

+ 0 - 1
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoServiceImpl.java

@@ -117,7 +117,6 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
     @Override
     @Override
     public List<VaccineInfoOperation> selectVaccineInfoList(VaccineInfoOperation vaccineInfoOperation) {
     public List<VaccineInfoOperation> selectVaccineInfoList(VaccineInfoOperation vaccineInfoOperation) {
         Long deptId = AuthUtils.getLoginUser().getSysUser().getDeptId();
         Long deptId = AuthUtils.getLoginUser().getSysUser().getDeptId();
-        vaccineInfoOperation.setDeptId(deptId);
         Map<String, Object> params = vaccineInfoOperation.getParams();
         Map<String, Object> params = vaccineInfoOperation.getParams();
         if (params != null) {
         if (params != null) {
             Object age = params.get("age");
             Object age = params.get("age");

+ 1 - 0
boman-web-core/src/main/resources/mapper/VaccineInfoMapper.xml

@@ -116,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="manufacturer != null  and manufacturer != ''"> and vi.manufacturer = #{manufacturer}</if>
             <if test="manufacturer != null  and manufacturer != ''"> and vi.manufacturer = #{manufacturer}</if>
             <if test="nowIn != null  and nowIn != ''"> and vi.now_in = #{nowIn}</if>
             <if test="nowIn != null  and nowIn != ''"> and vi.now_in = #{nowIn}</if>
             <if test="shouldSlow != null  and shouldSlow != ''"> and vi.should_slow = #{shouldSlow}</if>
             <if test="shouldSlow != null  and shouldSlow != ''"> and vi.should_slow = #{shouldSlow}</if>
+            <if test="deptId != null"> and vi.dept_id = #{deptId}</if>
             <if test="idCardS != null  and idCardS.size() > 0">
             <if test="idCardS != null  and idCardS.size() > 0">
              and vi.id_card in
              and vi.id_card in
             <foreach item="idCard" collection="idCardS" open="(" separator="," close=")">
             <foreach item="idCard" collection="idCardS" open="(" separator="," close=")">