Commit 62156ef23637502842190c755903c27de54c5faa
1 parent
50565778
数据分析
Showing
75 changed files
with
2198 additions
and
710 deletions
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/AnalyzeController.java
| 1 | package org.jeecg.modules.system.controller; | 1 | package org.jeecg.modules.system.controller; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 4 | +import com.google.common.collect.Sets; | ||
| 4 | import io.swagger.annotations.Api; | 5 | import io.swagger.annotations.Api; |
| 5 | import io.swagger.annotations.ApiOperation; | 6 | import io.swagger.annotations.ApiOperation; |
| 6 | import lombok.extern.slf4j.Slf4j; | 7 | import lombok.extern.slf4j.Slf4j; |
| 8 | +import org.apache.logging.log4j.util.Strings; | ||
| 9 | +import org.apache.shiro.SecurityUtils; | ||
| 10 | +import org.jeecg.common.api.vo.Result; | ||
| 7 | import org.jeecg.common.aspect.annotation.AutoLog; | 11 | import org.jeecg.common.aspect.annotation.AutoLog; |
| 8 | import org.jeecg.common.system.base.controller.JeecgController; | 12 | import org.jeecg.common.system.base.controller.JeecgController; |
| 13 | +import org.jeecg.common.system.vo.DictModel; | ||
| 14 | +import org.jeecg.common.system.vo.LoginUser; | ||
| 9 | import org.jeecg.common.util.oConvertUtils; | 15 | import org.jeecg.common.util.oConvertUtils; |
| 10 | -import org.jeecg.modules.system.entity.Family; | ||
| 11 | -import org.jeecg.modules.system.entity.GaDemographic; | ||
| 12 | -import org.jeecg.modules.system.entity.Minor; | ||
| 13 | -import org.jeecg.modules.system.entity.SysDepart; | 16 | +import org.jeecg.modules.system.entity.*; |
| 14 | import org.jeecg.modules.system.service.*; | 17 | import org.jeecg.modules.system.service.*; |
| 18 | +import org.jeecg.modules.system.util.DoTaskThread; | ||
| 15 | import org.jeecg.modules.system.util.IDNumberUtil; | 19 | import org.jeecg.modules.system.util.IDNumberUtil; |
| 16 | import org.jeecg.modules.system.util.MultiThreadUtil; | 20 | import org.jeecg.modules.system.util.MultiThreadUtil; |
| 21 | +import org.jeecg.modules.system.util.TaskThreadQuery; | ||
| 17 | import org.jeecg.modules.system.vo.FamilyVo; | 22 | import org.jeecg.modules.system.vo.FamilyVo; |
| 18 | import org.jeecg.modules.system.vo.GaPunishVo; | 23 | import org.jeecg.modules.system.vo.GaPunishVo; |
| 19 | import org.jeecg.modules.system.vo.SpecialStudentVo; | 24 | import org.jeecg.modules.system.vo.SpecialStudentVo; |
| 20 | import org.springframework.web.bind.annotation.*; | 25 | import org.springframework.web.bind.annotation.*; |
| 21 | 26 | ||
| 22 | import javax.annotation.Resource; | 27 | import javax.annotation.Resource; |
| 23 | -import java.util.ArrayList; | ||
| 24 | -import java.util.List; | ||
| 25 | -import java.util.concurrent.CountDownLatch; | ||
| 26 | -import java.util.concurrent.ExecutorService; | ||
| 27 | -import java.util.concurrent.Executors; | 28 | +import java.text.SimpleDateFormat; |
| 29 | +import java.util.*; | ||
| 30 | +import java.util.concurrent.*; | ||
| 31 | +import java.util.stream.Collectors; | ||
| 32 | +import java.util.stream.Stream; | ||
| 33 | + | ||
| 28 | 34 | ||
| 29 | /** | 35 | /** |
| 30 | -* @Description: 数据分析 | ||
| 31 | -* @Author: jeecg-boot | ||
| 32 | -* @Date: 2022-07-13 | ||
| 33 | -* @Version: V1.0 | ||
| 34 | -*/ | ||
| 35 | -@Api(tags="数据分析") | 36 | + * @Description: 数据分析 |
| 37 | + * @Author: jeecg-boot | ||
| 38 | + * @Date: 2022-07-13 | ||
| 39 | + * @Version: V1.0 | ||
| 40 | + */ | ||
| 41 | +@Api(tags = "数据分析") | ||
| 36 | @RestController | 42 | @RestController |
| 37 | @RequestMapping("/sys/analyze") | 43 | @RequestMapping("/sys/analyze") |
| 38 | @Slf4j | 44 | @Slf4j |
| 39 | public class AnalyzeController extends JeecgController<GaDemographic, IGaDemographicService> { | 45 | public class AnalyzeController extends JeecgController<GaDemographic, IGaDemographicService> { |
| 40 | - @Resource | ||
| 41 | - private IGaDemographicService gaDemographicService; | ||
| 42 | - @Resource | ||
| 43 | - private IGaHouseholdService gaHouseholdService; | ||
| 44 | - @Resource | ||
| 45 | - private ISysDepartService sysDepartService; | ||
| 46 | - @Resource | ||
| 47 | - private IGaPunishService gaPunishService; | ||
| 48 | - @Resource | ||
| 49 | - private IGaJuvenilesStayService gaJuvenilesStayService; | ||
| 50 | - @Resource | ||
| 51 | - private IMzAdoptionService mzAdoptionService; | ||
| 52 | - @Resource | ||
| 53 | - private IMzLeftBehindChildrenService mzLeftBehindChildrenService; | ||
| 54 | - @Resource | ||
| 55 | - private IMzOrphanService mzOrphanService; | ||
| 56 | - @Resource | ||
| 57 | - private IMzUnsupportedService mzUnsupportedService; | ||
| 58 | - @Resource | ||
| 59 | - private ISpecialStudentService specialStudentService; | ||
| 60 | - @Resource | ||
| 61 | - private IFamilyService familyService; | ||
| 62 | - @Resource | ||
| 63 | - private IMinorService minorService; | ||
| 64 | - @Resource | ||
| 65 | - private IMrSchoolService schoolService; | ||
| 66 | - | ||
| 67 | - private Integer queryNum=0; | ||
| 68 | - private Integer pageSize=200000; | ||
| 69 | - private List<GaPunishVo> gaPunishVos=new ArrayList<>(); | ||
| 70 | - private List<Family> rasultFamily=new ArrayList<>();//分析后家庭的数据 | ||
| 71 | - private List<Minor> rasultMinor=new ArrayList<>();//分析后未成年人的信息 | ||
| 72 | - private List<SpecialStudentVo> specialStudentVos=new ArrayList<>(); | 46 | + @Resource |
| 47 | + private IGaDemographicService gaDemographicService; | ||
| 48 | + @Resource | ||
| 49 | + private IGaHouseholdService gaHouseholdService; | ||
| 50 | + @Resource | ||
| 51 | + private ISysDepartService sysDepartService; | ||
| 52 | + @Resource | ||
| 53 | + private IGaPunishService gaPunishService; | ||
| 54 | + @Resource | ||
| 55 | + private IGaJuvenilesStayService gaJuvenilesStayService; | ||
| 56 | + @Resource | ||
| 57 | + private IMzAdoptionService mzAdoptionService; | ||
| 58 | + @Resource | ||
| 59 | + private IMzLeftBehindChildrenService mzLeftBehindChildrenService; | ||
| 60 | + @Resource | ||
| 61 | + private IMzOrphanService mzOrphanService; | ||
| 62 | + @Resource | ||
| 63 | + private IMzUnsupportedService mzUnsupportedService; | ||
| 64 | + @Resource | ||
| 65 | + private ISpecialStudentService specialStudentService; | ||
| 66 | + @Resource | ||
| 67 | + private IFamilyService familyService; | ||
| 68 | + @Resource | ||
| 69 | + private IMinorService minorService; | ||
| 70 | + @Resource | ||
| 71 | + private IMrSchoolService schoolService; | ||
| 72 | + @Resource | ||
| 73 | + private IHighSchoolService highSchoolService; | ||
| 74 | + @Resource | ||
| 75 | + private IPrimarySchoolService primarySchoolService; | ||
| 76 | + @Resource | ||
| 77 | + private ISourceService sourceService; | ||
| 78 | + @Resource | ||
| 79 | + private ISysDictService dictService; | ||
| 80 | + | ||
| 81 | + private final List<Family> resultFamily = new ArrayList<>();//分析后家庭的数据 | ||
| 82 | + private final List<Minor> resultMinor = new ArrayList<>();//分析后未成年人的信息 | ||
| 83 | + private final List<MrSchool> resultSchools = new ArrayList<>();//分析后学籍的信息 | ||
| 84 | + private static final int corePoolSize = Runtime.getRuntime().availableProcessors(); | ||
| 85 | + private static final ThreadPoolExecutor executor = new ThreadPoolExecutor(corePoolSize, corePoolSize + 1, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(1000)); | ||
| 86 | + | ||
| 87 | + | ||
| 73 | @AutoLog(value = "来源数据管理-分页列表查询") | 88 | @AutoLog(value = "来源数据管理-分页列表查询") |
| 74 | - @ApiOperation(value="来源数据管理-分页列表查询", notes="来源数据管理-分页列表查询") | ||
| 75 | - @GetMapping(value = "/doAnalyzeData") | ||
| 76 | - public void doAnalyzeData() { | ||
| 77 | - | ||
| 78 | -// List<FamilyVo> allData=new ArrayList<>() | ||
| 79 | - LambdaQueryWrapper<SysDepart> cfq = new LambdaQueryWrapper<>(); | ||
| 80 | - cfq.isNotNull(SysDepart::getParentId); | ||
| 81 | - List<SysDepart> departs= sysDepartService.list(cfq); | ||
| 82 | - gaPunishVos.addAll(gaPunishService.queryAll()); | ||
| 83 | - specialStudentVos.addAll(specialStudentService.queryList()); | ||
| 84 | - | ||
| 85 | -// List<FamilyVo> familyVos=queryByThread(new ArrayList<>(),departs); | ||
| 86 | - //获取当前系统时间 | ||
| 87 | -// long startTime = System.currentTimeMillis(); | ||
| 88 | - queryByThread(departs); | ||
| 89 | -// long endTime = System.currentTimeMillis(); | ||
| 90 | -// System.out.println(endTime-startTime); | ||
| 91 | -// long startTime1 = System.currentTimeMillis(); | ||
| 92 | -// long endTime1 = System.currentTimeMillis(); | ||
| 93 | -// System.out.println("***********************结束时间"+(endTime1-startTime1)); | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | - /** | ||
| 97 | - * 分页列表查询 | ||
| 98 | - * @param allData | ||
| 99 | - * @return | ||
| 100 | - */ | ||
| 101 | - public List<FamilyVo> queryPageList(List<FamilyVo> allData,List<SysDepart> departs){ | ||
| 102 | - try { | ||
| 103 | -// List<FamilyVo> familyVos=gaDemographicService.queryPageList(queryNum,pageSize); | ||
| 104 | -//// allData.addAll(familyVos); | ||
| 105 | -// if(oConvertUtils.isNotEmpty(familyVos)){ | ||
| 106 | -// //当查出来的数据等于分页的数量说明还有数据需要查询 | ||
| 107 | -// if(familyVos.size() == pageSize){ | ||
| 108 | -// queryNum=queryNum+pageSize; | ||
| 109 | -//// queryPageList(allData); | ||
| 110 | -// analyzeData(familyVos,departs); | ||
| 111 | -// }else { | ||
| 112 | -// | ||
| 113 | -// } | ||
| 114 | -// } | ||
| 115 | - | ||
| 116 | - }catch (Exception e){ | ||
| 117 | - System.out.println(e); | ||
| 118 | - } | ||
| 119 | - return allData; | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | - public void analyzeData(List<Family> allData,List<SysDepart> departs){ | ||
| 123 | - List<Family> familyMajors=new ArrayList<>();//户籍信息里的成年人 | ||
| 124 | - List<Family> familyMinors=new ArrayList<>();//户籍信息里的未成年人 | ||
| 125 | - if(oConvertUtils.isNotEmpty(allData) && oConvertUtils.isNotEmpty(departs)){ | ||
| 126 | - for(SysDepart d:departs){ | ||
| 127 | - for(Family f:allData){ | ||
| 128 | - if(d.getAbbreviation().contains(f.getDivision())){ | ||
| 129 | - f.setSysOrgCode(d.getId()); | ||
| 130 | - } | ||
| 131 | - if(oConvertUtils.isNotEmpty(f.getIdentity())){ | ||
| 132 | - f.setGender(Integer.valueOf(IDNumberUtil.judgeGender(f.getIdentity()))); | ||
| 133 | - Integer age=IDNumberUtil.countAge(f.getIdentity()); | ||
| 134 | - if(age<18){ | ||
| 135 | - familyMinors.add(f); | ||
| 136 | - }else { | ||
| 137 | - familyMajors.add(f); | ||
| 138 | - } | ||
| 139 | - } | 89 | + @ApiOperation(value = "来源数据管理-分页列表查询", notes = "来源数据管理-分页列表查询") |
| 90 | + @PutMapping(value = "/doAnalyzeData") | ||
| 91 | + public Result<?> doAnalyzeData() { | ||
| 92 | + try { | ||
| 93 | + System.out.println("开始数据分析"); | ||
| 94 | + long startTime = System.currentTimeMillis(); | ||
| 95 | + List<SysDepart> departs = sysDepartService.querySysDeparts(); | ||
| 96 | + getData(departs); | ||
| 97 | + System.out.println("开始数据分析" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 98 | + System.out.println("家庭成员数据批量新增总条数" + resultFamily.size()); | ||
| 99 | + System.out.println("未成年人数据批量新增总条数" + resultMinor.size()); | ||
| 100 | + System.out.println("学籍信息数据批量新增总条数" + resultSchools.size()); | ||
| 101 | + long startTime2 = System.currentTimeMillis(); | ||
| 102 | +// minorService.insertBatch(resultMinor,departs); | ||
| 103 | + System.out.println("未成年人数据批量新增所用时间" + (System.currentTimeMillis() - startTime2) / 1000 + "秒"); | ||
| 104 | + long startTime1 = System.currentTimeMillis(); | ||
| 105 | +// familyService.insertBatch(resultFamily,departs); | ||
| 106 | + System.out.println("家庭成员数据批量新增所用时间" + (System.currentTimeMillis() - startTime1) / 1000 + "秒"); | ||
| 107 | + long startTime3 = System.currentTimeMillis(); | ||
| 108 | +// schoolService.insertBatch(resultSchools,); | ||
| 109 | + System.out.println("学籍信息入库时间" + (System.currentTimeMillis() - startTime3) / 1000 + "秒"); | ||
| 110 | + long startTime4 = System.currentTimeMillis(); | ||
| 111 | + getSourceData(); | ||
| 112 | + System.out.println("来源数据入库时间" + (System.currentTimeMillis() - startTime4) / 1000 + "秒"); | ||
| 113 | + System.out.println("*********************************总用时" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 114 | + return Result.OK("操作成功"); | ||
| 115 | + } catch (Exception e) { | ||
| 116 | + e.printStackTrace(); | ||
| 117 | + log.info(String.valueOf(e)); | ||
| 118 | + return Result.OK("操作失败"); | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public void getData(List<SysDepart> departs) { | ||
| 123 | + try { | ||
| 124 | + System.out.println("开始数据分析"); | ||
| 125 | + long startTime = System.currentTimeMillis(); | ||
| 126 | + ExecutorService pool = Executors.newFixedThreadPool(50); | ||
| 127 | + CompletableFuture<Map<String, GaPunishVo>> f1 = CompletableFuture.supplyAsync(() -> gaPunishService.queryAll(), executor); | ||
| 128 | + CompletableFuture<List<SpecialStudentVo>> f2 = CompletableFuture.supplyAsync(() -> specialStudentService.queryList(), executor); | ||
| 129 | + CompletableFuture<List<String>> f3 = CompletableFuture.supplyAsync(() -> mzOrphanService.getIdentityS(), executor); | ||
| 130 | + CompletableFuture<List<String>> f4 = CompletableFuture.supplyAsync(() -> mzUnsupportedService.getIdentityS(), executor); | ||
| 131 | + CompletableFuture<List<String>> f5 = CompletableFuture.supplyAsync(() -> mzLeftBehindChildrenService.getIdentityS(), executor); | ||
| 132 | + CompletableFuture<List<String>> f6 = CompletableFuture.supplyAsync(() -> mzAdoptionService.getIdentityS(), executor); | ||
| 133 | + CompletableFuture<List<MrSchool>> f7 = CompletableFuture.supplyAsync(() -> highSchoolService.getList(), executor); | ||
| 134 | + CompletableFuture<List<MrSchool>> f8 = CompletableFuture.supplyAsync(() -> primarySchoolService.getList(), executor); | ||
| 135 | +// CompletableFuture<Map<String,String>> f9 = CompletableFuture.supplyAsync(() -> gaDemographicService.getIdentityS(), executor); | ||
| 136 | + //行政处罚数据 | ||
| 137 | +// Map<String,GaPunishVo> gaPunishVos = gaPunishService.queryAll(); | ||
| 138 | + Map<String, GaPunishVo> gaPunishVos = new HashMap<>(); | ||
| 139 | + gaPunishVos.putAll(f1.get()); | ||
| 140 | +// List<SpecialStudentVo> specialStudentVos = specialStudentService.queryList(); | ||
| 141 | + List<SpecialStudentVo> specialStudentVos = new ArrayList<>(); | ||
| 142 | + specialStudentVos.addAll(f2.get()); | ||
| 143 | + //孤儿数据 | ||
| 144 | +// List<String> mzOrphans = mzOrphanService.getIdentityS(); | ||
| 145 | + List<String> mzOrphans = new ArrayList<>(); | ||
| 146 | + mzOrphans.addAll(f3.get()); | ||
| 147 | + //无人抚养 | ||
| 148 | +// List<String> mzUnsupporteds = mzUnsupportedService.getIdentityS(); | ||
| 149 | + List<String> mzUnsupporteds = new ArrayList<>(); | ||
| 150 | + mzUnsupporteds.addAll(f4.get()); | ||
| 151 | + //留守儿童 | ||
| 152 | +// List<String> mzLeftBehinds =mzLeftBehindChildrenService.getIdentityS(); | ||
| 153 | + List<String> mzLeftBehinds = new ArrayList<>(); | ||
| 154 | + mzLeftBehinds.addAll(f5.get()); | ||
| 155 | + //领养 | ||
| 156 | +// List<String> mzAdoptions =mzAdoptionService.getIdentityS(); | ||
| 157 | + List<String> mzAdoptions = new ArrayList<>(); | ||
| 158 | + mzAdoptions.addAll(f6.get()); | ||
| 159 | + //获取初高中学生信息 | ||
| 160 | +// List<MrSchool> highSchools = highSchoolService.getList(); | ||
| 161 | + List<MrSchool> highSchools = new ArrayList<>(); | ||
| 162 | + highSchools.addAll(f7.get()); | ||
| 163 | + //获取幼小学生信息 | ||
| 164 | +// List<MrSchool> primarySchools = primarySchoolService.getList(); | ||
| 165 | + List<MrSchool> primarySchools = new ArrayList<>(); | ||
| 166 | + primarySchools.addAll(f8.get()); | ||
| 167 | + //人口基本信息小于18岁 | ||
| 168 | +// Map<String,String> gaDemographics =gaDemographicService.getIdentityS(); | ||
| 169 | +// Map<String,String> gaDemographics =new HashMap<>(); | ||
| 170 | +// gaDemographics.putAll(f9.get()); | ||
| 171 | + //关闭线程池 | ||
| 172 | + pool.shutdown(); | ||
| 173 | + Map<String, String> gaDemographics = gaDemographicService.getIdentityS(); | ||
| 174 | + System.out.println("线程池查询用时" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 175 | + long startTime1 = System.currentTimeMillis(); | ||
| 176 | + //户籍信息 | ||
| 177 | + Map<String,Family> familyMap = gaHouseholdService.getGaHouseholds(gaDemographics); | ||
| 178 | +// Map<String,Family> familyMap = queryByThread(); | ||
| 179 | + System.out.println("户籍信息数据查询时间" + (System.currentTimeMillis() - startTime1) / 1000 + "秒"); | ||
| 180 | + System.out.println("判断初高中学生信息和人口基本信息的交集和差集开始时间" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 181 | + judgeHighSchoolsAndDemographics(highSchools, gaDemographics, departs, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, familyMap, gaPunishVos, mzOrphans); | ||
| 182 | + System.out.println("判断初高中学生信息和人口基本信息的交集和差集结束时间" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 183 | + System.out.println("判断幼小学生信息和人口基本信息的交集和差集开始时间" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 184 | + judgePrimarySchoolsAndDemographics(primarySchools, gaDemographics, departs, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, familyMap, gaPunishVos, mzOrphans); | ||
| 185 | + System.out.println("判断幼小学生信息和人口基本信息的交集和差集结束时间" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 186 | + System.out.println("所有时间" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 187 | + } catch (Exception e) { | ||
| 188 | + e.printStackTrace(); | ||
| 189 | + } | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + public Map<String,Family> queryByThread() { | ||
| 193 | + Map<String,Family> familyMap = new HashMap<>(); | ||
| 194 | + try { | ||
| 195 | + long startTime = System.currentTimeMillis(); | ||
| 196 | + // 数据集合大小,由调用者自己指定 | ||
| 197 | + int listSize = gaDemographicService.count(); | ||
| 198 | + // 开启的线程数 | ||
| 199 | + int runSize = 25; | ||
| 200 | + // 一个线程处理数据条数,如果库中有100条数据,开启20个线程,那么每一个线程执行的条数就是5条 | ||
| 201 | + int count = listSize / runSize;//5 | ||
| 202 | + // 创建一个线程池,数量和开启线程的数量一样 | ||
| 203 | + ExecutorService executor = MultiThreadUtil.createThread(runSize); | ||
| 204 | + // 计算sql语句中每个分页查询的起始和结束数据下标 | ||
| 205 | + // 循环创建线程 | ||
| 206 | + //此处调用具体的查询方法 | ||
| 207 | + List<Callable<Map<String,Family>>> taskList = new ArrayList<Callable<Map<String,Family>>>();//创建任务 | ||
| 208 | + System.out.println("开始查询线程总数" + runSize); | ||
| 209 | + for (int i = 0; i < runSize; i++) { | ||
| 210 | + int index = i * count; | ||
| 211 | + int num = count; | ||
| 212 | + Callable<Map<String,Family>> task= new DoTaskThread(gaDemographicService,index, num);//条件查询,name没有就给null | ||
| 213 | + taskList.add(task); | ||
| 214 | + } | ||
| 215 | + List<Future<Map<String,Family>>> futureList = executor.invokeAll(taskList); | ||
| 216 | + System.out.println(futureList.size()); | ||
| 217 | + if (futureList != null && futureList.size() > 0){ | ||
| 218 | + for (Future<Map<String,Family>> future:futureList) { | ||
| 219 | + if(future.get() != null) { | ||
| 220 | + familyMap.putAll(future.get()); | ||
| 221 | + } | ||
| 222 | + } | ||
| 223 | + } | ||
| 224 | + executor.shutdown();//关闭线程 | ||
| 225 | + long endTime = System.currentTimeMillis(); | ||
| 226 | + long s = ((endTime - startTime) / 1000); | ||
| 227 | + System.out.println(runSize + "个线程查询花了" + s + "秒" ); | ||
| 228 | + System.out.println("总条数"+familyMap.size() ); | ||
| 229 | + } catch (Exception e) { | ||
| 230 | + e.printStackTrace(); | ||
| 231 | + log.info(String.valueOf(e)); | ||
| 232 | + } | ||
| 233 | + return familyMap; | ||
| 234 | + } | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 来源数据 | ||
| 238 | + */ | ||
| 239 | + public void getSourceData() { | ||
| 240 | + long startTime = System.currentTimeMillis(); | ||
| 241 | + List<SourceData> sourceDataList = new ArrayList<>(); | ||
| 242 | + try { | ||
| 243 | + System.out.println("来源数据查询"); | ||
| 244 | + | ||
| 245 | + //公安 | ||
| 246 | + Integer gaTotal = gaDemographicService.count() + gaHouseholdService.count() + gaPunishService.count() + gaJuvenilesStayService.count(); | ||
| 247 | + LambdaQueryWrapper<SourceData> ga = new LambdaQueryWrapper<>(); | ||
| 248 | + ga.eq(SourceData::getName, SourceData.SOURCE_UNIT_GA); | ||
| 249 | + ga.orderByDesc(SourceData::getBatch); | ||
| 250 | + ga.last("limit 1"); | ||
| 251 | + SourceData gaS = sourceService.getOne(ga); | ||
| 252 | + SourceData gaData = new SourceData(); | ||
| 253 | + if (oConvertUtils.isNotEmpty(gaS) && oConvertUtils.isNotEmpty(gaS.getBatch())) { | ||
| 254 | + gaData.setBatch(gaS.getBatch() + 1); | ||
| 255 | + } else { | ||
| 256 | + gaData.setBatch(1); | ||
| 257 | + } | ||
| 258 | + gaData.setTotal(gaTotal); | ||
| 259 | + gaData.setCreateTime(new Date()); | ||
| 260 | + gaData.setName(SourceData.SOURCE_UNIT_GA); | ||
| 261 | + sourceDataList.add(gaData); | ||
| 262 | + //民政 | ||
| 263 | + Integer mzTotal = mzAdoptionService.count() + mzUnsupportedService.count() + mzLeftBehindChildrenService.count() + mzOrphanService.count(); | ||
| 264 | + SourceData mzData = new SourceData(); | ||
| 265 | + LambdaQueryWrapper<SourceData> mz = new LambdaQueryWrapper<>(); | ||
| 266 | + mz.eq(SourceData::getName, SourceData.SOURCE_UNIT_MZ); | ||
| 267 | + mz.orderByDesc(SourceData::getBatch); | ||
| 268 | + mz.last("limit 1"); | ||
| 269 | + SourceData mzS = sourceService.getOne(mz); | ||
| 270 | + if (oConvertUtils.isNotEmpty(mzS) && oConvertUtils.isNotEmpty(mzS.getBatch())) { | ||
| 271 | + mzData.setBatch(mzS.getBatch() + 1); | ||
| 272 | + } else { | ||
| 273 | + mzData.setBatch(1); | ||
| 274 | + } | ||
| 275 | + mzData.setTotal(mzTotal); | ||
| 276 | + mzData.setCreateTime(new Date()); | ||
| 277 | + mzData.setName(SourceData.SOURCE_UNIT_MZ); | ||
| 278 | + sourceDataList.add(mzData); | ||
| 279 | + //学校 | ||
| 280 | + Integer schoolTotal = highSchoolService.count() + primarySchoolService.count() + specialStudentService.count(); | ||
| 281 | + SourceData schoolData = new SourceData(); | ||
| 282 | + LambdaQueryWrapper<SourceData> school = new LambdaQueryWrapper<>(); | ||
| 283 | + school.eq(SourceData::getName, SourceData.SOURCE_UNIT_SCHOOL); | ||
| 284 | + school.orderByDesc(SourceData::getBatch); | ||
| 285 | + school.last("limit 1"); | ||
| 286 | + SourceData schoolS = sourceService.getOne(school); | ||
| 287 | + if (oConvertUtils.isNotEmpty(schoolS) && oConvertUtils.isNotEmpty(schoolS.getBatch())) { | ||
| 288 | + schoolData.setBatch(schoolS.getBatch() + 1); | ||
| 289 | + } else { | ||
| 290 | + schoolData.setBatch(1); | ||
| 291 | + } | ||
| 292 | + schoolData.setTotal(schoolTotal); | ||
| 293 | + schoolData.setCreateTime(new Date()); | ||
| 294 | + schoolData.setName(SourceData.SOURCE_UNIT_SCHOOL); | ||
| 295 | + sourceDataList.add(schoolData); | ||
| 296 | + sourceService.saveBatch(sourceDataList); | ||
| 297 | + } catch (Exception e) { | ||
| 298 | + e.printStackTrace(); | ||
| 299 | + log.info(String.valueOf(e)); | ||
| 300 | + } | ||
| 301 | + System.out.println("来源数据查询" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 302 | +// return sourceDataList; | ||
| 303 | + } | ||
| 304 | + | ||
| 305 | + | ||
| 306 | + /** | ||
| 307 | + * 判断初高中学生信息和人口基本信息的交集和差集 | ||
| 308 | + */ | ||
| 309 | + public void judgeHighSchoolsAndDemographics(List<MrSchool> highSchools, Map<String, String> gaDemographics, List<SysDepart> departs, | ||
| 310 | + List<SpecialStudentVo> specialStudentVos, List<String> mzUnsupporteds, List<String> mzLeftBehinds, | ||
| 311 | + List<String> mzAdoptions, Map<String, Family> gaHouseholds, Map<String, GaPunishVo> gaPunishVos, List<String> mzOrphans | ||
| 312 | + ) { | ||
| 313 | + try { | ||
| 314 | + System.out.println("判断初高中学生信息和人口基本信息的交集和差集zongsuo"+highSchools.size()); | ||
| 315 | + long startTime = System.currentTimeMillis(); | ||
| 316 | + //不在人口基本信息的初高中学生信息 | ||
| 317 | + List<MrSchool> highSchoolDifference = new ArrayList<>(); | ||
| 318 | + //不在初高中学生信息里的的人口基本信息 | ||
| 319 | + List<String> gaDemographicDifference = new ArrayList<>(); | ||
| 320 | + //初高中学生信息和人口基本信息的交集 | ||
| 321 | + List<MrSchool> highSchoolIntersection = new ArrayList<>(); | ||
| 322 | + if (oConvertUtils.isNotEmpty(highSchools)) { | ||
| 323 | + highSchools.parallelStream().forEach(h -> { | ||
| 324 | + if (oConvertUtils.isNotEmpty(gaDemographics) && oConvertUtils.isNotEmpty(gaDemographics.get(h.getIdentity()))) { | ||
| 325 | + if (h.getIdentity().equals(gaDemographics.get(h.getIdentity()))) { | ||
| 326 | + //交集 | ||
| 327 | + highSchoolIntersection.add(h); | ||
| 328 | + } else { | ||
| 329 | + //差集 | ||
| 330 | + gaDemographicDifference.add(gaDemographics.get(h.getIdentity())); | ||
| 331 | + } | ||
| 332 | + } else { | ||
| 333 | + //差集 | ||
| 334 | + highSchoolDifference.add(h); | ||
| 335 | + } | ||
| 336 | + }); | ||
| 337 | + } | ||
| 338 | + System.out.println("初高中交集数"+highSchoolIntersection.size()); | ||
| 339 | + System.out.println("不在初高中学生信息里的的人口基本信息"+gaDemographicDifference.size()); | ||
| 340 | + System.out.println("不在人口基本信息的初高中学生信息"+highSchoolDifference.size()); | ||
| 341 | + doSchoolDifference(highSchoolDifference, departs, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 342 | + doIntersection(highSchoolIntersection, departs, gaHouseholds, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans); | ||
| 343 | + doDemographicDifference(gaDemographicDifference, departs, gaHouseholds, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans); | ||
| 344 | + } catch (Exception e) { | ||
| 345 | + e.printStackTrace(); | ||
| 346 | + log.info(String.valueOf(e)); | ||
| 347 | + } | ||
| 348 | + } | ||
| 349 | + | ||
| 350 | + /** | ||
| 351 | + * 判断幼小学生信息和人口基本信息的交集和差集 | ||
| 352 | + */ | ||
| 353 | + public void judgePrimarySchoolsAndDemographics(List<MrSchool> primarySchools, Map<String, String> gaDemographics, List<SysDepart> departs, | ||
| 354 | + List<SpecialStudentVo> specialStudentVos, List<String> mzUnsupporteds, List<String> mzLeftBehinds, | ||
| 355 | + List<String> mzAdoptions, Map<String, Family> gaHouseholds, Map<String, GaPunishVo> gaPunishVos, List<String> mzOrphans | ||
| 356 | + ) { | ||
| 357 | + try { | ||
| 358 | + System.out.println("判断幼小学生信息和人口基本信息的交集和差集总数"+primarySchools.size()); | ||
| 359 | + long startTime = System.currentTimeMillis(); | ||
| 360 | + //不在人口基本信息的幼小学生信息 | ||
| 361 | + List<MrSchool> primarySchoolDifference = new ArrayList<>(); | ||
| 362 | + //不在幼小学生信息里的的人口基本信息 | ||
| 363 | + List<String> gaDemographicDifference = new ArrayList<>(); | ||
| 364 | + //幼小学生信息和人口基本信息的交集 | ||
| 365 | + List<MrSchool> primarySchoolIntersection = new ArrayList<>(); | ||
| 366 | + if (oConvertUtils.isNotEmpty(primarySchools)) { | ||
| 367 | + primarySchools.parallelStream().forEach(p -> { | ||
| 368 | + if (oConvertUtils.isNotEmpty(gaDemographics) && oConvertUtils.isNotEmpty(p) && oConvertUtils.isNotEmpty(gaDemographics.get(p.getIdentity()))) { | ||
| 369 | + if (p.getIdentity().equals(gaDemographics.get(p.getIdentity()))) { | ||
| 370 | + //交集 | ||
| 371 | + primarySchoolIntersection.add(p); | ||
| 372 | + } else { | ||
| 373 | + //差集 | ||
| 374 | + gaDemographicDifference.add(gaDemographics.get(p.getIdentity())); | ||
| 375 | + } | ||
| 376 | + } else { | ||
| 377 | + //差集 | ||
| 378 | + primarySchoolDifference.add(p); | ||
| 379 | + } | ||
| 380 | + }); | ||
| 381 | + } | ||
| 382 | + System.out.println("不在人口基本信息的幼小学生信息"+primarySchoolDifference.size()); | ||
| 383 | + System.out.println("不在幼小学生信息里的的人口基本信息"+gaDemographicDifference.size()); | ||
| 384 | + System.out.println("幼小学生信息和人口基本信息的交集"+primarySchoolIntersection.size()); | ||
| 385 | + doSchoolDifference(primarySchoolDifference, departs, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 386 | + doIntersection(primarySchoolIntersection, departs, gaHouseholds, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans); | ||
| 387 | + doDemographicDifference(gaDemographicDifference, departs, gaHouseholds, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans); | ||
| 388 | + } catch (Exception e) { | ||
| 389 | + e.printStackTrace(); | ||
| 390 | + log.info(String.valueOf(e)); | ||
| 391 | + } | ||
| 392 | + } | ||
| 393 | + | ||
| 394 | + //处理有人口基本信息但没有学籍信息的数据 | ||
| 395 | + public void doDemographicDifference(List<String> gaDemographicDifference, List<SysDepart> departs, Map<String, Family> gaHouseholds, List<SpecialStudentVo> specialStudentVos, | ||
| 396 | + List<String> mzUnsupporteds, List<String> mzLeftBehinds, List<String> mzAdoptions, Map<String, GaPunishVo> gaPunishVos, | ||
| 397 | + List<String> mzOrphans) { | ||
| 398 | + try { | ||
| 399 | + long startTime = System.currentTimeMillis(); | ||
| 400 | + System.out.println("处理有人口基本信息但没有学籍信息的数据开始***********************" + gaDemographicDifference.size()); | ||
| 401 | + Map<String, Minor> minorMap = new HashMap<>(); | ||
| 402 | + if (oConvertUtils.isNotEmpty(gaDemographicDifference) && oConvertUtils.isNotEmpty(gaHouseholds)) { | ||
| 403 | + gaDemographicDifference.parallelStream().forEach(idCard -> { | ||
| 404 | + if (oConvertUtils.isNotEmpty(idCard) && oConvertUtils.isNotEmpty(gaHouseholds.get(idCard))) { | ||
| 405 | + Minor minor = new Minor(); | ||
| 406 | + minor.setSchool(Minor.SCHOOL_STATUS_YES); | ||
| 407 | + minor.setName(gaHouseholds.get(idCard).getName()); | ||
| 408 | + minor.setGender(Integer.parseInt(IDNumberUtil.judgeGender(idCard))); | ||
| 409 | + minor.setAddress(gaHouseholds.get(idCard).getAddress()); | ||
| 410 | + minor.setIdentity(idCard); | ||
| 411 | + minor.setNumber(gaHouseholds.get(idCard).getNumber()); | ||
| 412 | + minor.setHouseholdNum(gaHouseholds.get(idCard).getHouseholdNum()); | ||
| 413 | + minor.setDivision(gaHouseholds.get(idCard).getDivision()); | ||
| 414 | + minorMap.put(idCard, minor); | ||
| 415 | + } | ||
| 416 | + }); | ||
| 417 | + } | ||
| 418 | + System.out.println("处理有人口基本信息但没有学籍信息的数据的所属单位开始" + (System.currentTimeMillis() - startTime) / 1000); | ||
| 419 | + if (oConvertUtils.isNotEmpty(minorMap) && oConvertUtils.isNotEmpty(departs) && departs.size() > 0) { | ||
| 420 | + for (SysDepart d : departs) { | ||
| 421 | + for (Map.Entry<String, Minor> ga : minorMap.entrySet()) { | ||
| 422 | + Minor minor = ga.getValue(); | ||
| 423 | + if (oConvertUtils.isNotEmpty(d) && oConvertUtils.isNotEmpty(d.getAbbreviation()) && oConvertUtils.isNotEmpty(minor) && oConvertUtils.isNotEmpty(minor.getDivision())) { | ||
| 424 | + if (d.getAbbreviation().contains(minor.getDivision())) { | ||
| 425 | + minor.setSysOrgCode(d.getOrgCode()); | ||
| 426 | + } | ||
| 427 | + } | ||
| 428 | + } | ||
| 429 | + } | ||
| 430 | + } | ||
| 431 | + System.out.println("处理有人口基本信息但没有学籍信息的数据的所属单位结束" + (System.currentTimeMillis() - startTime) / 1000); | ||
| 432 | + System.out.println("处理有人口基本信息但没有学籍信息的数据jieshu**********************" + minorMap.size()); | ||
| 433 | + getSpecialStudent(minorMap, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 434 | + } catch (Exception e) { | ||
| 435 | + e.printStackTrace(); | ||
| 436 | + log.info(String.valueOf(e)); | ||
| 437 | + } | ||
| 438 | + } | ||
| 439 | + | ||
| 440 | + //处理交集数据 | ||
| 441 | + public void doIntersection(List<MrSchool> intersection, List<SysDepart> departs, Map<String, Family> gaHouseholds, List<SpecialStudentVo> specialStudentVos, | ||
| 442 | + List<String> mzUnsupporteds, List<String> mzLeftBehinds, List<String> mzAdoptions, Map<String, GaPunishVo> gaPunishVos, | ||
| 443 | + List<String> mzOrphans) { | ||
| 444 | + long startTime = System.currentTimeMillis(); | ||
| 445 | + try { | ||
| 446 | + Map<String, Minor> minorMap = new HashMap<>(); | ||
| 447 | + System.out.println("***********************交集总数**********************************************" + intersection.size()); | ||
| 448 | + System.out.println("***********************人口信息总数**********************************************" + gaHouseholds.size()); | ||
| 449 | + System.out.println("交集数据里的所属单位开始" + (System.currentTimeMillis() - startTime) / 1000); | ||
| 450 | + if (oConvertUtils.isNotEmpty(intersection) && oConvertUtils.isNotEmpty(departs) && departs.size() > 0) { | ||
| 451 | + for (SysDepart d : departs) { | ||
| 452 | + intersection.parallelStream().forEach(i -> { | ||
| 453 | + if (oConvertUtils.isNotEmpty(i) && oConvertUtils.isNotEmpty(i.getSchool()) && oConvertUtils.isNotEmpty(d) && oConvertUtils.isNotEmpty(d.getCommonCode())) { | ||
| 454 | + if (d.getCommonCode().contains(i.getSchool())) { | ||
| 455 | + i.setSysOrgCode(d.getOrgCode()); | ||
| 456 | + } | ||
| 457 | + } | ||
| 458 | + }); | ||
| 459 | + } | ||
| 460 | + } | ||
| 461 | + System.out.println("交集数据里的所属单位结束总数"+intersection.size()+"交集数据里的所属单位结束" + (System.currentTimeMillis() - startTime) / 1000); | ||
| 462 | + Date creatDate = new Date(); | ||
| 463 | + if (oConvertUtils.isNotEmpty(intersection)) { | ||
| 464 | + intersection.parallelStream().forEach(i -> { | ||
| 465 | + if (oConvertUtils.isNotEmpty(i) && oConvertUtils.isNotEmpty(i.getIdentity())) { | ||
| 466 | + Minor minor = new Minor(); | ||
| 467 | + //身份证号 | ||
| 468 | + String idCard = i.getIdentity(); | ||
| 469 | + if (oConvertUtils.isNotEmpty(gaHouseholds) && oConvertUtils.isNotEmpty(gaHouseholds.get(idCard))) { | ||
| 470 | + minor.setSchool(Minor.SCHOOL_STATUS_NO); | ||
| 471 | + minor.setSchoolName(i.getSchool()); | ||
| 472 | + minor.setStartYear(i.getAdmissionDate()); | ||
| 473 | + minor.setNumber(gaHouseholds.get(idCard).getNumber()); | ||
| 474 | + minor.setHouseholdNum(gaHouseholds.get(idCard).getHouseholdNum()); | ||
| 475 | + } else { | ||
| 476 | + minor.setSchool(Minor.SCHOOL_STATUS_YES); | ||
| 477 | + } | ||
| 478 | + if (oConvertUtils.isNotEmpty(i.getName())) { | ||
| 479 | + minor.setName(i.getName()); | ||
| 480 | + } | ||
| 481 | + if (oConvertUtils.isNotEmpty(i.getAddress())) { | ||
| 482 | + minor.setAddress(i.getAddress()); | ||
| 483 | + } | ||
| 484 | + if (oConvertUtils.isNotEmpty(idCard)) { | ||
| 485 | + minor.setGender(Integer.parseInt(IDNumberUtil.judgeGender(idCard))); | ||
| 486 | + } | ||
| 487 | + minor.setIdentity(idCard); | ||
| 488 | + minor.setSysOrgCode(i.getSysOrgCode()); | ||
| 489 | + minor.setCreateTime(creatDate); | ||
| 490 | + i.setCreateTime(creatDate); | ||
| 491 | + minorMap.put(idCard, minor); | ||
| 492 | + } | ||
| 493 | + }); | ||
| 494 | + } | ||
| 495 | + System.out.println("户籍信息里的未成年人的单位" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 496 | + long startTime1 = System.currentTimeMillis(); | ||
| 497 | +// schoolService.insertBatch(intersection); | ||
| 498 | + resultSchools.addAll(intersection); | ||
| 499 | + System.out.println("人口信息he交集总数总数" + minorMap.size()); | ||
| 500 | + getSpecialStudent(minorMap, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 501 | + } catch (Exception e) { | ||
| 502 | + e.printStackTrace(); | ||
| 503 | + log.info(String.valueOf(e)); | ||
| 504 | + } | ||
| 505 | + } | ||
| 506 | + | ||
| 507 | + //处理有学籍信息但没有人口基本信息的数据 | ||
| 508 | + public void doSchoolDifference(List<MrSchool> difference, List<SysDepart> departs, List<SpecialStudentVo> specialStudentVos, | ||
| 509 | + List<String> mzUnsupporteds, List<String> mzLeftBehinds, List<String> mzAdoptions, Map<String, GaPunishVo> gaPunishVos, | ||
| 510 | + List<String> mzOrphans, Map<String, Family> gaHouseholds) { | ||
| 511 | + try { | ||
| 512 | + Map<String, Minor> minorMap = new HashMap<>(); | ||
| 513 | + long startTime = System.currentTimeMillis(); | ||
| 514 | + System.out.println("根据差集数据判断所属单位" + difference.size()); | ||
| 515 | + System.out.println("未成年人总数" + difference.size()); | ||
| 516 | + Date creatTime = new Date(); | ||
| 517 | + if (oConvertUtils.isNotEmpty(difference) && oConvertUtils.isNotEmpty(departs) && departs.size() > 0) { | ||
| 518 | + for (SysDepart d : departs) { | ||
| 519 | + difference.parallelStream().forEach(m -> { | ||
| 520 | + Minor minor = new Minor(); | ||
| 521 | + if (oConvertUtils.isNotEmpty(m)) { | ||
| 522 | + if (oConvertUtils.isNotEmpty(d) && oConvertUtils.isNotEmpty(d.getCommonCode()) && oConvertUtils.isNotEmpty(m.getSchool())) { | ||
| 523 | + if (d.getCommonCode().contains(m.getSchool()) && oConvertUtils.isNotEmpty(minorMap.get(m.getIdentity()))) { | ||
| 524 | + minor.setSysOrgCode(d.getOrgCode()); | ||
| 525 | + m.setSysOrgCode(d.getOrgCode()); | ||
| 526 | + } | ||
| 527 | + } | ||
| 528 | + minor.setSchool(Minor.SCHOOL_STATUS_NO); | ||
| 529 | + if (oConvertUtils.isNotEmpty(m.getName())) { | ||
| 530 | + minor.setName(m.getName()); | ||
| 531 | + } | ||
| 532 | + minor.setGender(Integer.valueOf(IDNumberUtil.judgeGender(m.getIdentity()))); | ||
| 533 | + if (oConvertUtils.isNotEmpty(m.getAddress())) { | ||
| 534 | + minor.setAddress(m.getAddress()); | ||
| 535 | + } | ||
| 536 | + if (oConvertUtils.isNotEmpty(m.getSchool())) { | ||
| 537 | + minor.setAddress(m.getSchool()); | ||
| 538 | + } | ||
| 539 | + if (oConvertUtils.isNotEmpty(m.getAdmissionDate())) { | ||
| 540 | + minor.setAddress(m.getAdmissionDate()); | ||
| 541 | + } | ||
| 542 | + minor.setIdentity(m.getIdentity()); | ||
| 543 | + minor.setCreateTime(creatTime); | ||
| 544 | + m.setCreateTime(creatTime); | ||
| 545 | + minorMap.put(m.getIdentity(), minor); | ||
| 546 | + } | ||
| 547 | + | ||
| 548 | + }); | ||
| 549 | + } | ||
| 550 | + } | ||
| 551 | + System.out.println("根据不在人口基础信息里的学生和单位信息判断所属单位" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 552 | + long startTime1 = System.currentTimeMillis(); | ||
| 553 | +// schoolService.insertBatch(difference); | ||
| 554 | + resultSchools.addAll(difference); | ||
| 555 | + System.out.println("有学籍信息但没有人口基本信息的数据" + minorMap.size()); | ||
| 556 | + getSpecialStudent(minorMap, specialStudentVos, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 557 | + } catch (Exception e) { | ||
| 558 | + e.printStackTrace(); | ||
| 559 | + log.info(String.valueOf(e)); | ||
| 560 | + } | ||
| 561 | + | ||
| 562 | + } | ||
| 563 | + | ||
| 564 | + /** | ||
| 565 | + * 根据特殊学校信息判断未成年人特殊原因和备注 | ||
| 566 | + * | ||
| 567 | + * @param minors | ||
| 568 | + */ | ||
| 569 | + public void getSpecialStudent(Map<String, Minor> minors, List<SpecialStudentVo> specialStudentVos, List<String> mzUnsupporteds, List<String> mzLeftBehinds, | ||
| 570 | + List<String> mzAdoptions, Map<String, GaPunishVo> gaPunishVos, List<String> mzOrphans, Map<String, Family> gaHouseholds) { | ||
| 571 | + long startTime = System.currentTimeMillis(); | ||
| 572 | + try { | ||
| 573 | + System.out.println("根据特殊学校信息判断未成年人重点关注原因和备注"); | ||
| 574 | + if (oConvertUtils.isNotEmpty(specialStudentVos) && oConvertUtils.isNotEmpty(minors)) { | ||
| 575 | + for (SpecialStudentVo s : specialStudentVos) { | ||
| 576 | + if (oConvertUtils.isNotEmpty(s.getIdentity()) && oConvertUtils.isNotEmpty(minors.get(s.getIdentity()))) { | ||
| 577 | +// if (minors.get(s.getIdentity()).getIdentity().equals(s.getIdentity())) { | ||
| 578 | + minors.get(s.getIdentity()).setSpecialReason(s.getReason()); | ||
| 579 | + minors.get(s.getIdentity()).setRemark(s.getRemark()); | ||
| 580 | +// } | ||
| 581 | + } | ||
| 582 | + } | ||
| 583 | + } | ||
| 584 | + System.out.println("根据特殊学校信息判断未成年人重点关注原因和备注" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 585 | + getUnsupported(minors, mzUnsupporteds, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 586 | + } catch (Exception e) { | ||
| 587 | + e.printStackTrace(); | ||
| 588 | + log.info(String.valueOf(e)); | ||
| 589 | + } | ||
| 590 | + | ||
| 591 | + } | ||
| 592 | + | ||
| 593 | + /** | ||
| 594 | + * 无人抚养 | ||
| 595 | + */ | ||
| 596 | + public void getUnsupported(Map<String, Minor> minors, List<String> mzUnsupporteds, List<String> mzLeftBehinds, | ||
| 597 | + List<String> mzAdoptions, Map<String, GaPunishVo> gaPunishVos, List<String> mzOrphans, Map<String, Family> gaHouseholds) { | ||
| 598 | + long startTime = System.currentTimeMillis(); | ||
| 599 | + try { | ||
| 600 | + System.out.println("无人抚养"); | ||
| 601 | + | ||
| 602 | + if (oConvertUtils.isNotEmpty(minors) && oConvertUtils.isNotEmpty(mzUnsupporteds)) { | ||
| 603 | + for (String s : mzUnsupporteds) { | ||
| 604 | + if (oConvertUtils.isNotEmpty(s) && oConvertUtils.isNotEmpty(minors.get(s))) { | ||
| 605 | + minors.get(s).setReason(Minor.ATTENTION_REASON_UNSUPPORTED); | ||
| 606 | + } | ||
| 607 | + } | ||
| 608 | + } | ||
| 609 | + System.out.println("无人抚养" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 610 | + getAdoption(minors, mzLeftBehinds, mzAdoptions, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 611 | + } catch (Exception e) { | ||
| 612 | + e.printStackTrace(); | ||
| 613 | + log.info(String.valueOf(e)); | ||
| 614 | + } | ||
| 615 | + | ||
| 616 | + } | ||
| 617 | + | ||
| 618 | + /** | ||
| 619 | + * 收养 | ||
| 620 | + */ | ||
| 621 | + public void getAdoption(Map<String, Minor> minors, List<String> mzLeftBehinds, List<String> mzAdoptions, Map<String, GaPunishVo> gaPunishVos, List<String> mzOrphans, Map<String, Family> gaHouseholds) { | ||
| 622 | + long startTime = System.currentTimeMillis(); | ||
| 623 | + try { | ||
| 624 | + System.out.println("收养"); | ||
| 625 | + if (oConvertUtils.isNotEmpty(minors) && oConvertUtils.isNotEmpty(mzAdoptions)) { | ||
| 626 | + for (String s : mzAdoptions) { | ||
| 627 | + if (oConvertUtils.isNotEmpty(s) && oConvertUtils.isNotEmpty(minors.get(s)) ) { | ||
| 628 | + minors.get(s).setReason(Minor.ATTENTION_REASON_UNSUPPORTED); | ||
| 629 | + } | ||
| 630 | + } | ||
| 140 | } | 631 | } |
| 141 | - } | ||
| 142 | - } | ||
| 143 | - doFamilyMajors(familyMajors);//处理成年人 | ||
| 144 | - doFamilyMinors(familyMinors);//处理成年人 | ||
| 145 | - } | ||
| 146 | - | ||
| 147 | - public void doFamilyMajors(List<Family> familyMajors){ | ||
| 148 | - if(oConvertUtils.isNotEmpty(gaPunishVos) && oConvertUtils.isNotEmpty(familyMajors)){ | ||
| 149 | - for(GaPunishVo p:gaPunishVos){ | ||
| 150 | - for(Family f:familyMajors){ | ||
| 151 | - if(p.getDxsfzh().equals(f.getIdentity())){ | ||
| 152 | - f.setOther(p.getAjmc()); | ||
| 153 | - f.setReason(p.getSldwmc()); | ||
| 154 | - f.setCrime(Family.IS_CRIME); | ||
| 155 | - gaPunishVos.remove(p); | ||
| 156 | - }else { | ||
| 157 | - f.setCrime(Family.IS_NOT_CRIME); | ||
| 158 | - } | 632 | + System.out.println("收养" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); |
| 633 | + getChildren(minors, mzLeftBehinds, gaPunishVos, mzOrphans,gaHouseholds); | ||
| 634 | + } catch (Exception e) { | ||
| 635 | + e.printStackTrace(); | ||
| 636 | + log.info(String.valueOf(e)); | ||
| 637 | + } | ||
| 638 | + | ||
| 639 | + } | ||
| 640 | + | ||
| 641 | + /** | ||
| 642 | + * 留守儿童 | ||
| 643 | + */ | ||
| 644 | + public void getChildren(Map<String, Minor> minors, List<String> mzLeftBehinds, Map<String, GaPunishVo> gaPunishVos, List<String> mzOrphans, Map<String, Family> gaHouseholds) { | ||
| 645 | + long startTime = System.currentTimeMillis(); | ||
| 646 | + try { | ||
| 647 | + System.out.println("留守儿童"); | ||
| 648 | + if (oConvertUtils.isNotEmpty(minors) && oConvertUtils.isNotEmpty(mzLeftBehinds)) { | ||
| 649 | + for (String s : mzLeftBehinds) { | ||
| 650 | + if (oConvertUtils.isNotEmpty(s) && oConvertUtils.isNotEmpty(minors.get(s)) ) { | ||
| 651 | + minors.get(s).setReason(Minor.ATTENTION_REASON_CHILDREN); | ||
| 652 | + } | ||
| 653 | + } | ||
| 654 | + } | ||
| 655 | + System.out.println("留守儿童" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 656 | + getOrphan(minors, mzOrphans, gaPunishVos,gaHouseholds); | ||
| 657 | + } catch (Exception e) { | ||
| 658 | + e.printStackTrace(); | ||
| 659 | + log.info(String.valueOf(e)); | ||
| 660 | + } | ||
| 661 | + | ||
| 662 | + } | ||
| 663 | + | ||
| 664 | + /** | ||
| 665 | + * 孤儿 | ||
| 666 | + */ | ||
| 667 | + public void getOrphan(Map<String, Minor> minors, List<String> mzOrphans, Map<String, GaPunishVo> gaPunishVos, Map<String, Family> gaHouseholds) { | ||
| 668 | + long startTime = System.currentTimeMillis(); | ||
| 669 | + try { | ||
| 670 | + System.out.println("孤儿"); | ||
| 671 | + if (oConvertUtils.isNotEmpty(minors) && oConvertUtils.isNotEmpty(mzOrphans)) { | ||
| 672 | + for (String s : mzOrphans) { | ||
| 673 | + if (oConvertUtils.isNotEmpty(s) && oConvertUtils.isNotEmpty(minors.get(s)) ) { | ||
| 674 | + minors.get(s).setReason(Minor.ATTENTION_REASON_ORPHAN); | ||
| 675 | + } | ||
| 676 | + } | ||
| 159 | } | 677 | } |
| 160 | - } | ||
| 161 | - } | ||
| 162 | -// familyService.saveBatch(familyMajors); | ||
| 163 | - } | ||
| 164 | - | ||
| 165 | - public void doFamilyMinors(List<Family> familyMinors){ | ||
| 166 | - if(oConvertUtils.isNotEmpty(specialStudentVos) && oConvertUtils.isNotEmpty(familyMinors)){ | ||
| 167 | - for (SpecialStudentVo s:specialStudentVos){ | ||
| 168 | - for(Family f:familyMinors){ | ||
| 169 | - Minor minor=new Minor(); | ||
| 170 | - if(s.getIdentity().equals(f.getIdentity())){ | ||
| 171 | - minor.setReason(s.getReason()); | ||
| 172 | - minor.setRemark(s.getRemark()); | ||
| 173 | - specialStudentVos.remove(s); | ||
| 174 | - } | ||
| 175 | - minor.setAddress(f.getAddress()); | ||
| 176 | - minor.setGender(f.getGender()); | ||
| 177 | - minor.setHouseholdNum(f.getHouseholdNum()); | ||
| 178 | - minor.setName(f.getName()); | ||
| 179 | - minor.setRelation(f.getRelation()); | ||
| 180 | - minor.setNumber(f.getNumber()); | ||
| 181 | - minor.setSysOrgCode(f.getSysOrgCode()); | 678 | + System.out.println("孤儿" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); |
| 679 | + getFamilyRelationship(minors, gaHouseholds,gaPunishVos); | ||
| 680 | + } catch (Exception e) { | ||
| 681 | + e.printStackTrace(); | ||
| 682 | + log.info(String.valueOf(e)); | ||
| 683 | + } | ||
| 684 | + | ||
| 685 | + } | ||
| 686 | + | ||
| 687 | + | ||
| 688 | + /** | ||
| 689 | + * 建立未成年人和家庭成员关系 | ||
| 690 | + */ | ||
| 691 | + public void getFamilyRelationship(Map<String, Minor> minors, Map<String, Family> gaHouseholds, Map<String, GaPunishVo> gaPunishVos) { | ||
| 692 | + long startTime = System.currentTimeMillis(); | ||
| 693 | + try { | ||
| 694 | + List<Family> familys = new ArrayList<>(); | ||
| 695 | + //犯罪人员身份证号-户号关系 | ||
| 696 | + Map<String, String> idCards = new HashMap<>(); | ||
| 697 | + //户号-家庭成员关系 | ||
| 698 | + Map<String, List<Family>> familyMaps = new HashMap<>(); | ||
| 699 | + //人员身份证号-与监护人的关系 | ||
| 700 | + Map<String, String> relations = new HashMap<>(); | ||
| 701 | + //户号-与监护人 | ||
| 702 | + Map<String, Family> guardians = new HashMap<>(); | ||
| 703 | + if (oConvertUtils.isNotEmpty(gaHouseholds)) { | ||
| 704 | + for (Map.Entry<String, Family> m : gaHouseholds.entrySet()) { | ||
| 705 | + String mapKey = m.getKey(); | ||
| 706 | + Family family = m.getValue(); | ||
| 707 | + if (oConvertUtils.isNotEmpty(family) && oConvertUtils.isNotEmpty(family.getHouseholdNum()) && oConvertUtils.isNotEmpty(family.getIdentity())) { | ||
| 708 | + String houseNum = family.getHouseholdNum(); | ||
| 709 | + List<Family> list = new ArrayList<>(); | ||
| 710 | + if (oConvertUtils.isNotEmpty(family.getRelation())) { | ||
| 711 | + relations.put(family.getIdentity(), family.getRelation()); | ||
| 712 | + } | ||
| 713 | + if (oConvertUtils.isNotEmpty(familyMaps) && oConvertUtils.isNotEmpty(familyMaps.get(houseNum))) { | ||
| 714 | + list.addAll(familyMaps.get(houseNum)); | ||
| 715 | + | ||
| 716 | + } else { | ||
| 717 | + list.add(family); | ||
| 718 | + } | ||
| 719 | + if (oConvertUtils.isNotEmpty(family.getCrime()) && family.getCrime().equals(Family.IS_CRIME)) { | ||
| 720 | + idCards.put(family.getIdentity(), houseNum); | ||
| 721 | + } | ||
| 722 | + if (oConvertUtils.isNotEmpty(family.getRelation()) && family.getRelation().contains("户主")) { | ||
| 723 | + guardians.put(houseNum, family); | ||
| 724 | + } | ||
| 725 | + familyMaps.put(houseNum, list); | ||
| 726 | + } | ||
| 727 | + if (oConvertUtils.isNotEmpty(family)) { | ||
| 728 | + if (oConvertUtils.isNotEmpty(gaPunishVos) && oConvertUtils.isNotEmpty(gaPunishVos.get(mapKey))) { | ||
| 729 | + family.setCrime(Family.IS_CRIME); | ||
| 730 | + if (oConvertUtils.isNotEmpty(gaPunishVos.get(mapKey).getAjmc())) { | ||
| 731 | + family.setOther(gaPunishVos.get(mapKey).getAjmc()); | ||
| 732 | + } | ||
| 733 | + if (oConvertUtils.isNotEmpty(gaPunishVos.get(mapKey).getSldwmc())) { | ||
| 734 | + family.setReason(gaPunishVos.get(mapKey).getSldwmc()); | ||
| 735 | + } | ||
| 736 | + } else { | ||
| 737 | + family.setCrime(Family.IS_NOT_CRIME); | ||
| 738 | + } | ||
| 739 | + } | ||
| 740 | + } | ||
| 182 | } | 741 | } |
| 183 | - } | ||
| 184 | - } | ||
| 185 | - familyService.saveBatch(familyMinors); | ||
| 186 | -// minorService.saveBatch(); | ||
| 187 | - } | ||
| 188 | - | ||
| 189 | - public void queryByThread(List<SysDepart> departs) { | ||
| 190 | - long startTime = System.currentTimeMillis(); | ||
| 191 | - // 数据集合大小,由调用者自己指定 | ||
| 192 | - int listSize = gaDemographicService.count(); | ||
| 193 | - // 开启的线程数 | ||
| 194 | - int runSize = 20; | ||
| 195 | - // 一个线程处理数据条数,如果库中有100条数据,开启20个线程,那么每一个线程执行的条数就是5条 | ||
| 196 | - int count = listSize / runSize;//5 | ||
| 197 | - // 创建一个线程池,数量和开启线程的数量一样 | ||
| 198 | - ExecutorService executor = MultiThreadUtil.createThread(runSize); | ||
| 199 | - // 计算sql语句中每个分页查询的起始和结束数据下标 | ||
| 200 | - // 循环创建线程 | ||
| 201 | - //此处调用具体的查询方法 | ||
| 202 | - System.out.println("开始查询线程总数"+runSize); | ||
| 203 | - for (int i = 0; i < runSize; i++) { | ||
| 204 | - int index = i * count; | ||
| 205 | - int num = count; | ||
| 206 | - executor.execute(new Runnable() { | ||
| 207 | - @Override | ||
| 208 | - public void run() { | ||
| 209 | - try { | ||
| 210 | - //查询的结果如何保存下来,会不会存在覆盖的问题 | ||
| 211 | - System.out.println("每次查询的下标:" + index + ",条数:" + num); | ||
| 212 | - List<Family> familyVos=gaDemographicService.queryPageList(index,num); | ||
| 213 | - //行政处罚数据查询 | ||
| 214 | -// gaPunishService | ||
| 215 | - //这里做处理信息的方法 | ||
| 216 | - analyzeData(familyVos,departs); | ||
| 217 | - } catch (Exception e) { | ||
| 218 | - System.out.println("查询失败" + e); | ||
| 219 | - } | 742 | + |
| 743 | + System.out.println("建立未成年人和家庭成员关系"); | ||
| 744 | + getFamilyCrime(minors, idCards, familyMaps, guardians, relations); | ||
| 745 | + } catch (Exception e) { | ||
| 746 | + e.printStackTrace(); | ||
| 747 | + log.info(String.valueOf(e)); | ||
| 748 | + } | ||
| 749 | + } | ||
| 750 | + | ||
| 751 | + /** | ||
| 752 | + * 家庭成员是否犯罪 | ||
| 753 | + * | ||
| 754 | + * @param minors | ||
| 755 | + * @param idCards | ||
| 756 | + * @param familyMaps | ||
| 757 | + */ | ||
| 758 | + public void getFamilyCrime(Map<String, Minor> minors, Map<String, String> idCards, Map<String, List<Family>> familyMaps, Map<String, Family> guardians, Map<String, String> relations) { | ||
| 759 | + long startTime = System.currentTimeMillis(); | ||
| 760 | + try { | ||
| 761 | + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); | ||
| 762 | + System.out.println("家庭成员是否犯罪"); | ||
| 763 | + List<Minor> minorList = new ArrayList<>(); | ||
| 764 | + List<Family> familys = new ArrayList<>(); | ||
| 765 | + Date createTime = new Date(); | ||
| 766 | + if (oConvertUtils.isNotEmpty(minors)) { | ||
| 767 | + for (Map.Entry<String, Minor> m : minors.entrySet()) { | ||
| 768 | + String idCard = m.getKey(); | ||
| 769 | + Minor minor = m.getValue(); | ||
| 770 | + minor.setCreateTime(createTime); | ||
| 771 | + if (oConvertUtils.isNotEmpty(user) && oConvertUtils.isNotEmpty(user.getId())) { | ||
| 772 | + minor.setCreateBy(user.getId()); | ||
| 773 | + } | ||
| 774 | + //判断家庭成员是否犯罪 | ||
| 775 | + if (oConvertUtils.isNotEmpty(idCard) && oConvertUtils.isNotEmpty(idCards) && oConvertUtils.isNotEmpty(idCards.get(idCard))) { | ||
| 776 | + minor.setReason(Minor.ATTENTION_REASON_CRIME); | ||
| 777 | + } | ||
| 778 | + //判断是否是一个家庭的人员 | ||
| 779 | + if (oConvertUtils.isNotEmpty(minor.getHouseholdNum())) { | ||
| 780 | + String houseNum = minor.getHouseholdNum(); | ||
| 781 | + if (oConvertUtils.isNotEmpty(familyMaps) && oConvertUtils.isNotEmpty(familyMaps.get(houseNum))) { | ||
| 782 | + familys.addAll(familyMaps.get(houseNum)); | ||
| 783 | + } | ||
| 784 | + } | ||
| 785 | + //获取与监护人关系 | ||
| 786 | + if (oConvertUtils.isNotEmpty(idCard) && oConvertUtils.isNotEmpty(relations) && oConvertUtils.isNotEmpty(relations.get(idCard))) { | ||
| 787 | + minor.setRelation(relations.get(idCard)); | ||
| 788 | + } | ||
| 789 | + //获取监护人 | ||
| 790 | + if (oConvertUtils.isNotEmpty(idCard) && oConvertUtils.isNotEmpty(guardians) && oConvertUtils.isNotEmpty(guardians.get(idCard))) { | ||
| 791 | + minor.setGuardian(guardians.get(idCard).getName()); | ||
| 792 | + } | ||
| 793 | + minorList.add(minor); | ||
| 794 | + } | ||
| 220 | } | 795 | } |
| 221 | - }); | ||
| 222 | - } | ||
| 223 | - // 执行完关闭线程池 | ||
| 224 | - executor.shutdown(); | ||
| 225 | - long endTime = System.currentTimeMillis(); | ||
| 226 | - System.out.println(endTime-startTime); | ||
| 227 | - } | ||
| 228 | - | ||
| 229 | - | ||
| 230 | -// public static void exec(List<String> list) throws InterruptedException{ | ||
| 231 | -// int count = 300; //一个线程处理300条数据 | ||
| 232 | -// int listSize = list.size(); //数据集合大小 | ||
| 233 | -// int runSize = (listSize/count)+1; //开启的线程数 | ||
| 234 | -// List<String> newlist = null; //存放每个线程的执行数据 | ||
| 235 | -// ExecutorService executor = Executors.newFixedThreadPool(runSize); //创建一个线程池,数量和开启线程的数量一样 | ||
| 236 | -// //创建两个个计数器 | ||
| 237 | -// CountDownLatch begin = new CountDownLatch(1); | ||
| 238 | -// CountDownLatch end = new CountDownLatch(runSize); | ||
| 239 | -// //循环创建线程 | ||
| 240 | -// for (int i = 0; i < runSize ; i++) { | ||
| 241 | -// //计算每个线程执行的数据 | ||
| 242 | -// if((i+1)==runSize){ | ||
| 243 | -// int startIndex = (i*count); | ||
| 244 | -// int endIndex = list.size(); | ||
| 245 | -// newlist= list.subList(startIndex, endIndex); | ||
| 246 | -// }else{ | ||
| 247 | -// int startIndex = (i*count); | ||
| 248 | -// int endIndex = (i+1)*count; | ||
| 249 | -// newlist= list.subList(startIndex, endIndex); | ||
| 250 | -// } | ||
| 251 | -// //线程类 | ||
| 252 | -// MyThread mythead = new MyThread(newlist,begin,end); | ||
| 253 | -// //这里执行线程的方式是调用线程池里的executor.execute(mythead)方法。 | ||
| 254 | -// | ||
| 255 | -// executor.execute(mythead); | ||
| 256 | -// } | ||
| 257 | -// | ||
| 258 | -// begin.countDown(); | ||
| 259 | -// end.await(); | ||
| 260 | -// | ||
| 261 | -// //执行完关闭线程池 | ||
| 262 | -// executor.shutdown(); | ||
| 263 | -// } | ||
| 264 | - | ||
| 265 | -// /** | ||
| 266 | -// * 分割list集合 | ||
| 267 | -// * | ||
| 268 | -// * @param dataList | ||
| 269 | -// * @return | ||
| 270 | -// */ | ||
| 271 | -// public List<FamilyVo> subList(List<FamilyVo> dataList) { | ||
| 272 | -// List<FamilyVo> resultlist = new ArrayList<>();//存放批量数据处理的总结果集 | ||
| 273 | -// if (null != dataList && dataList.size() > 0) { | ||
| 274 | -// int pointsDataLimit = 100;//限制条数 10条一批 也是线程池线程数量 | ||
| 275 | -// Integer size = dataList.size(); | ||
| 276 | -// List<FamilyVo> cardlist=new ArrayList<>(); | ||
| 277 | -// //判断是否有必要分批 | ||
| 278 | -// if (pointsDataLimit < size) {//大于10条 | ||
| 279 | -// int part = size / pointsDataLimit;//分批数 | ||
| 280 | -// for (int i = 0; i < part; i++) { | ||
| 281 | -// List<FamilyVo> listPage = dataList.subList(0, pointsDataLimit); //10条数据 | ||
| 282 | -// Integer start = cardlist.size();//10条数据在总结果集的开始下标 | ||
| 283 | -// cardlist = testTime(listPage, resultlist );//返回拼接后的总结果集 | ||
| 284 | -// Integer end = resultlist .size();//10条数据在总结果集的结束下标 | ||
| 285 | -// for (i = start; i < end; i++) { | ||
| 286 | -// //对总数据集的10条数据进行业务处理 | ||
| 287 | -// } | ||
| 288 | -// //剔除已经处理过的10条数据 | ||
| 289 | -// dataList.subList(0, pointsDataLimit).clear(); | ||
| 290 | -// } | ||
| 291 | -// if (!dataList.isEmpty()) {//小于10条 | ||
| 292 | -// cardlist = testTime(dataList, cardlist);//处理最后的数据 | ||
| 293 | -// } | ||
| 294 | -// } else { | ||
| 295 | -// } | ||
| 296 | -// } | ||
| 297 | -// | ||
| 298 | -// return resultlist ; | ||
| 299 | -// } | ||
| 300 | -// | ||
| 301 | -// /** | ||
| 302 | -// * 多线程处理批量数据 | ||
| 303 | -// * | ||
| 304 | -// * @param splitList 处理数据 | ||
| 305 | -// * @param cardlist 处理后总数据 | ||
| 306 | -// * | ||
| 307 | -// * @return | ||
| 308 | -// */ | ||
| 309 | -// public List<FamilyVo> testTime(List<FamilyVo> splitList, List<FamilyVo> cardlist) { | ||
| 310 | -// List<FamilyVo> list = null; | ||
| 311 | -// try { | ||
| 312 | -// MultiThreadUtil<FamilyVo, FamilyVo> multiThread = new MultiThreadUtil<FamilyVo, FamilyVo>(splitList) { | ||
| 313 | -// @Override | ||
| 314 | -// public FamilyVo outExecute(int currentThread, FamilyVo data) { | ||
| 315 | -// //业务处理 | ||
| 316 | -// /* String iccid = data.getIccid(); | ||
| 317 | -// String allOrder = cardServerService.findAllOrder(iccid); | ||
| 318 | -// String allFlow = cardServerService.allFlowByiccid(iccid); | ||
| 319 | -// String allUseFlow = cardServerService.allUseFlowByiccid(iccid); | ||
| 320 | -// Card card = cardMapper.findByIccid(iccid); | ||
| 321 | -// String monthFlow = card.getMonthFlow(); | ||
| 322 | -// data.setMonthFlow(monthFlow); | ||
| 323 | -// data.setAllOrder(allOrder); | ||
| 324 | -// data.setAllFlow(allFlow); | ||
| 325 | -// data.setAllUseFlow(allUseFlow); | ||
| 326 | -// return data;*/ | ||
| 327 | -// //业务处理end | ||
| 328 | -// return data; | ||
| 329 | -// } | ||
| 330 | -// }; | ||
| 331 | -// list = multiThread.getResult();//返回结果 | ||
| 332 | -// for (FamilyVo ccar : list) { | ||
| 333 | -// cardlist.add(ccar);//批量数据遍历放入总结果 | ||
| 334 | -// } | ||
| 335 | -// } catch (Exception e) { | ||
| 336 | -// e.printStackTrace(); | ||
| 337 | -// } | ||
| 338 | -// return cardlist; | ||
| 339 | -// | ||
| 340 | -// } | 796 | + resultMinor.addAll(minorList); |
| 797 | + resultFamily.addAll(familys); | ||
| 798 | + } catch (Exception e) { | ||
| 799 | + e.printStackTrace(); | ||
| 800 | + log.info(String.valueOf(e)); | ||
| 801 | + } | ||
| 802 | + System.out.println("家庭成员是否犯罪" + (System.currentTimeMillis() - startTime) / 1000 + "秒"); | ||
| 803 | + | ||
| 804 | + } | ||
| 341 | 805 | ||
| 342 | 806 | ||
| 343 | } | 807 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/MinorController.java
| @@ -187,7 +187,7 @@ public class MinorController { | @@ -187,7 +187,7 @@ public class MinorController { | ||
| 187 | // Step.1 组装查询条件查询数据 | 187 | // Step.1 组装查询条件查询数据 |
| 188 | QueryWrapper<Minor> queryWrapper = QueryGenerator.initQueryWrapper(minor, request.getParameterMap()); | 188 | QueryWrapper<Minor> queryWrapper = QueryGenerator.initQueryWrapper(minor, request.getParameterMap()); |
| 189 | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); | 189 | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| 190 | - | 190 | + queryWrapper.last("limit 1"); |
| 191 | //Step.2 获取导出数据 | 191 | //Step.2 获取导出数据 |
| 192 | List<Minor> queryList = minorService.list(queryWrapper); | 192 | List<Minor> queryList = minorService.list(queryWrapper); |
| 193 | // 过滤选中数据 | 193 | // 过滤选中数据 |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/Family.java
| @@ -53,56 +53,52 @@ public class Family implements Serializable { | @@ -53,56 +53,52 @@ public class Family implements Serializable { | ||
| 53 | /**所属部门*/ | 53 | /**所属部门*/ |
| 54 | @ApiModelProperty(value = "所属部门") | 54 | @ApiModelProperty(value = "所属部门") |
| 55 | private String sysOrgCode; | 55 | private String sysOrgCode; |
| 56 | + /**户号*/ | ||
| 57 | + @Excel(name = "户号", width = 25) | ||
| 58 | + @ApiModelProperty(value = "户号") | ||
| 59 | + private String householdNum; | ||
| 60 | + /**人员编号*/ | ||
| 61 | + @Excel(name = "人员编号", width = 25) | ||
| 62 | + @ApiModelProperty(value = "人员编号") | ||
| 63 | + private String number; | ||
| 56 | /**姓名*/ | 64 | /**姓名*/ |
| 57 | @Excel(name = "姓名", width = 15) | 65 | @Excel(name = "姓名", width = 15) |
| 58 | @ApiModelProperty(value = "姓名") | 66 | @ApiModelProperty(value = "姓名") |
| 59 | private String name; | 67 | private String name; |
| 60 | /**性别*/ | 68 | /**性别*/ |
| 61 | - @Excel(name = "性别", width = 15,dicCode = "sex") | 69 | + @Excel(name = "性别", width = 10,dicCode = "sex") |
| 62 | @ApiModelProperty(value = "性别") | 70 | @ApiModelProperty(value = "性别") |
| 63 | @Dict(dicCode = "sex") | 71 | @Dict(dicCode = "sex") |
| 64 | private Integer gender; | 72 | private Integer gender; |
| 65 | /**身份证号*/ | 73 | /**身份证号*/ |
| 66 | - @Excel(name = "身份证号", width = 15) | 74 | + @Excel(name = "身份证号", width = 20) |
| 67 | @ApiModelProperty(value = "身份证号") | 75 | @ApiModelProperty(value = "身份证号") |
| 68 | private String identity; | 76 | private String identity; |
| 69 | - /**户号*/ | ||
| 70 | - @Excel(name = "户号", width = 15) | ||
| 71 | - @ApiModelProperty(value = "户号") | ||
| 72 | - private String householdNum; | ||
| 73 | - /**人员编号*/ | ||
| 74 | - @Excel(name = "人员编号", width = 15) | ||
| 75 | - @ApiModelProperty(value = "人员编号") | ||
| 76 | - private String number; | ||
| 77 | - /**婚姻状况*/ | ||
| 78 | - @Excel(name = "婚姻状况", width = 15,dicCode = "marital_status") | ||
| 79 | - @ApiModelProperty(value = "婚姻状况") | ||
| 80 | - @Dict(dicCode = "marital_status") | ||
| 81 | - private Integer marital; | 77 | + @Excel(name = "与户主的关系", width = 15) |
| 78 | + @ApiModelProperty(value = "与户主的关系") | ||
| 79 | + private String relation; | ||
| 80 | + /**行政区划*/ | ||
| 81 | + @Excel(name = "行政区划", width = 25) | ||
| 82 | + @ApiModelProperty(value = "行政区划") | ||
| 83 | + private String division; | ||
| 84 | + /**现住址*/ | ||
| 85 | + @Excel(name = "现住址", width = 25) | ||
| 86 | + @ApiModelProperty(value = "现住址") | ||
| 87 | + private String address; | ||
| 82 | /**是否犯罪*/ | 88 | /**是否犯罪*/ |
| 83 | - @Excel(name = "是否犯罪", width = 15,dicCode = "is_crime") | 89 | + @Excel(name = "是否犯罪", width = 10,dicCode = "is_crime") |
| 84 | @ApiModelProperty(value = "是否犯罪") | 90 | @ApiModelProperty(value = "是否犯罪") |
| 85 | @Dict(dicCode = "is_crime") | 91 | @Dict(dicCode = "is_crime") |
| 86 | private Integer crime; | 92 | private Integer crime; |
| 87 | /**犯罪原因*/ | 93 | /**犯罪原因*/ |
| 88 | - @Excel(name = "犯罪原因", width = 15) | 94 | + @Excel(name = "犯罪原因", width = 25) |
| 89 | @ApiModelProperty(value = "犯罪原因") | 95 | @ApiModelProperty(value = "犯罪原因") |
| 90 | private String reason; | 96 | private String reason; |
| 91 | /**其他参考信息*/ | 97 | /**其他参考信息*/ |
| 92 | - @Excel(name = "其他参考信息", width = 15) | 98 | + @Excel(name = "其他参考信息", width = 25) |
| 93 | @ApiModelProperty(value = "其他参考信息") | 99 | @ApiModelProperty(value = "其他参考信息") |
| 94 | private String other; | 100 | private String other; |
| 95 | - /**行政区划*/ | ||
| 96 | - @Excel(name = "行政区划", width = 15) | ||
| 97 | - @ApiModelProperty(value = "行政区划") | ||
| 98 | - private String division; | ||
| 99 | - @Excel(name = "与户主的关系", width = 15) | ||
| 100 | - @ApiModelProperty(value = "与户主的关系") | ||
| 101 | - private String relation; | ||
| 102 | - /**现住址*/ | ||
| 103 | - @Excel(name = "现住址", width = 15) | ||
| 104 | - @ApiModelProperty(value = "现住址") | ||
| 105 | - private String address; | 101 | + |
| 106 | /**未成年人表id*/ | 102 | /**未成年人表id*/ |
| 107 | @ApiModelProperty(value = "未成年人表id") | 103 | @ApiModelProperty(value = "未成年人表id") |
| 108 | private String minorId; | 104 | private String minorId; |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/Minor.java
| @@ -26,6 +26,16 @@ import io.swagger.annotations.ApiModelProperty; | @@ -26,6 +26,16 @@ import io.swagger.annotations.ApiModelProperty; | ||
| 26 | @TableName("mr_minor") | 26 | @TableName("mr_minor") |
| 27 | public class Minor implements Serializable { | 27 | public class Minor implements Serializable { |
| 28 | private static final long serialVersionUID = 1L; | 28 | private static final long serialVersionUID = 1L; |
| 29 | + //是否失学 | ||
| 30 | + public static final Integer SCHOOL_STATUS_YES=1;//是 | ||
| 31 | + public static final Integer SCHOOL_STATUS_NO=0;//否 | ||
| 32 | + | ||
| 33 | + //重点关注原因 | ||
| 34 | + public static final Integer ATTENTION_REASON_ORPHAN=1;//孤儿 | ||
| 35 | + public static final Integer ATTENTION_REASON_CHILDREN=2;//留守儿童 | ||
| 36 | + public static final Integer ATTENTION_REASON_UNSUPPORTED=3;//无人抚养 | ||
| 37 | + public static final Integer ATTENTION_REASON_CRIME=4;//家庭成员有犯罪记录 | ||
| 38 | + public static final Integer ATTENTION_REASON_ADOPTION=5;//收养 | ||
| 29 | 39 | ||
| 30 | /**主键*/ | 40 | /**主键*/ |
| 31 | @TableId(type = IdType.ASSIGN_ID) | 41 | @TableId(type = IdType.ASSIGN_ID) |
| @@ -51,6 +61,14 @@ public class Minor implements Serializable { | @@ -51,6 +61,14 @@ public class Minor implements Serializable { | ||
| 51 | @ApiModelProperty(value = "所属部门") | 61 | @ApiModelProperty(value = "所属部门") |
| 52 | @Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id") | 62 | @Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id") |
| 53 | private String sysOrgCode; | 63 | private String sysOrgCode; |
| 64 | + /**户号*/ | ||
| 65 | + @Excel(name = "户号", width = 15) | ||
| 66 | + @ApiModelProperty(value = "户号") | ||
| 67 | + private String householdNum; | ||
| 68 | + /**人员编号*/ | ||
| 69 | + @Excel(name = "人员编号", width = 15) | ||
| 70 | + @ApiModelProperty(value = "人员编号") | ||
| 71 | + private String number; | ||
| 54 | /**姓名*/ | 72 | /**姓名*/ |
| 55 | @Excel(name = "姓名", width = 15) | 73 | @Excel(name = "姓名", width = 15) |
| 56 | @ApiModelProperty(value = "姓名") | 74 | @ApiModelProperty(value = "姓名") |
| @@ -68,14 +86,6 @@ public class Minor implements Serializable { | @@ -68,14 +86,6 @@ public class Minor implements Serializable { | ||
| 68 | @Excel(name = "身份证号", width = 15) | 86 | @Excel(name = "身份证号", width = 15) |
| 69 | @ApiModelProperty(value = "身份证号") | 87 | @ApiModelProperty(value = "身份证号") |
| 70 | private String identity; | 88 | private String identity; |
| 71 | - /**重点关注原因*/ | ||
| 72 | - @Excel(name = "重点关注原因", width = 15) | ||
| 73 | - @ApiModelProperty(value = "重点关注原因") | ||
| 74 | - private String reason; | ||
| 75 | - /**备注*/ | ||
| 76 | - @Excel(name = "备注", width = 15) | ||
| 77 | - @ApiModelProperty(value = "备注") | ||
| 78 | - private String remark; | ||
| 79 | 89 | ||
| 80 | /** | 90 | /** |
| 81 | * 监护人 | 91 | * 监护人 |
| @@ -97,14 +107,31 @@ public class Minor implements Serializable { | @@ -97,14 +107,31 @@ public class Minor implements Serializable { | ||
| 97 | @Dict(dicCode = "school_status") | 107 | @Dict(dicCode = "school_status") |
| 98 | private Integer school; | 108 | private Integer school; |
| 99 | 109 | ||
| 100 | - /**人员编号*/ | ||
| 101 | - @Excel(name = "人员编号", width = 15) | ||
| 102 | - @ApiModelProperty(value = "人员编号") | ||
| 103 | - private String number; | 110 | + /**学校名称*/ |
| 111 | + @Excel(name = "学校名称", width = 15) | ||
| 112 | + @ApiModelProperty(value = "学校名称") | ||
| 113 | + private String schoolName; | ||
| 104 | 114 | ||
| 105 | - /**户号*/ | ||
| 106 | - @Excel(name = "户号", width = 15) | ||
| 107 | - @ApiModelProperty(value = "户号") | ||
| 108 | - private String householdNum; | 115 | + @Excel(name = "入学年份", width = 15) |
| 116 | + @ApiModelProperty(value = "入学年份") | ||
| 117 | + private String startYear; | ||
| 118 | + | ||
| 119 | + /**重点关注原因*/ | ||
| 120 | + @Excel(name = "重点关注原因", width = 15,dicCode = "attention_reason") | ||
| 121 | + @ApiModelProperty(value = "重点关注原因") | ||
| 122 | + @Dict(dicCode = "attention_reason") | ||
| 123 | + private Integer reason; | ||
| 124 | + | ||
| 125 | + /**特殊原因*/ | ||
| 126 | + @Excel(name = "特殊原因", width = 15) | ||
| 127 | + @ApiModelProperty(value = "特殊原因") | ||
| 128 | + private String specialReason; | ||
| 129 | + /**备注*/ | ||
| 130 | + @Excel(name = "备注", width = 15) | ||
| 131 | + @ApiModelProperty(value = "备注") | ||
| 132 | + private String remark; | ||
| 109 | 133 | ||
| 134 | + @Excel(name = "行政区划", width = 15) | ||
| 135 | + @ApiModelProperty(value = "行政区划") | ||
| 136 | + private String division; | ||
| 110 | } | 137 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/MzAdoption.java
| @@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode; | @@ -18,7 +18,7 @@ import lombok.EqualsAndHashCode; | ||
| 18 | import lombok.experimental.Accessors; | 18 | import lombok.experimental.Accessors; |
| 19 | 19 | ||
| 20 | /** | 20 | /** |
| 21 | - * @Description: mz_adoption | 21 | + * @Description: 民政_全市收养登记数据 |
| 22 | * @Author: jeecg-boot | 22 | * @Author: jeecg-boot |
| 23 | * @Date: 2022-07-14 | 23 | * @Date: 2022-07-14 |
| 24 | * @Version: V1.0 | 24 | * @Version: V1.0 |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SourceData.java
| @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | ||
| 8 | import com.baomidou.mybatisplus.annotation.TableName; | 8 | import com.baomidou.mybatisplus.annotation.TableName; |
| 9 | import lombok.Data; | 9 | import lombok.Data; |
| 10 | import com.fasterxml.jackson.annotation.JsonFormat; | 10 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 11 | +import org.jeecg.common.aspect.annotation.Dict; | ||
| 11 | import org.springframework.format.annotation.DateTimeFormat; | 12 | import org.springframework.format.annotation.DateTimeFormat; |
| 12 | import org.jeecgframework.poi.excel.annotation.Excel; | 13 | import org.jeecgframework.poi.excel.annotation.Excel; |
| 13 | import io.swagger.annotations.ApiModel; | 14 | import io.swagger.annotations.ApiModel; |
| @@ -28,6 +29,13 @@ import lombok.experimental.Accessors; | @@ -28,6 +29,13 @@ import lombok.experimental.Accessors; | ||
| 28 | @ApiModel(value="mr_source对象", description="来源数据管理") | 29 | @ApiModel(value="mr_source对象", description="来源数据管理") |
| 29 | public class SourceData implements Serializable { | 30 | public class SourceData implements Serializable { |
| 30 | private static final long serialVersionUID = 1L; | 31 | private static final long serialVersionUID = 1L; |
| 32 | + public static final String SOURCE_UNIT="source_unit";//单位名称字典表编码 | ||
| 33 | + public static final String SOURCE_UNIT_GA="1";//公安机关 | ||
| 34 | + public static final String SOURCE_UNIT_WJ="2";//未检部门 | ||
| 35 | + public static final String SOURCE_UNIT_SCHOOL="3";//教育部门 | ||
| 36 | + public static final String SOURCE_UNIT_MZ="4";//民政部门 | ||
| 37 | + public static final String SOURCE_UNIT_SF="5";//司法 | ||
| 38 | + | ||
| 31 | 39 | ||
| 32 | /**主键*/ | 40 | /**主键*/ |
| 33 | @TableId(type = IdType.ASSIGN_ID) | 41 | @TableId(type = IdType.ASSIGN_ID) |
| @@ -53,8 +61,9 @@ public class SourceData implements Serializable { | @@ -53,8 +61,9 @@ public class SourceData implements Serializable { | ||
| 53 | @ApiModelProperty(value = "所属部门") | 61 | @ApiModelProperty(value = "所属部门") |
| 54 | private String sysOrgCode; | 62 | private String sysOrgCode; |
| 55 | /**单位名称*/ | 63 | /**单位名称*/ |
| 56 | - @Excel(name = "单位名称", width = 15) | 64 | + @Excel(name = "单位名称", width = 15,dicCode = "source_unit") |
| 57 | @ApiModelProperty(value = "单位名称") | 65 | @ApiModelProperty(value = "单位名称") |
| 66 | + @Dict(dicCode = "source_unit") | ||
| 58 | private String name; | 67 | private String name; |
| 59 | /**数据批次*/ | 68 | /**数据批次*/ |
| 60 | @Excel(name = "数据批次", width = 15) | 69 | @Excel(name = "数据批次", width = 15) |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SpecialStudent.java
| @@ -55,9 +55,9 @@ public class SpecialStudent implements Serializable { | @@ -55,9 +55,9 @@ public class SpecialStudent implements Serializable { | ||
| 55 | @Excel(name = "identity", width = 15) | 55 | @Excel(name = "identity", width = 15) |
| 56 | @ApiModelProperty(value = "identity") | 56 | @ApiModelProperty(value = "identity") |
| 57 | private String identity; | 57 | private String identity; |
| 58 | - /**区域*/ | ||
| 59 | - @Excel(name = "区域", width = 15) | ||
| 60 | - @ApiModelProperty(value = "区域") | 58 | + /**原因*/ |
| 59 | + @Excel(name = "原因", width = 15) | ||
| 60 | + @ApiModelProperty(value = "原因") | ||
| 61 | private String reason; | 61 | private String reason; |
| 62 | /**备注*/ | 62 | /**备注*/ |
| 63 | @Excel(name = "备注", width = 15) | 63 | @Excel(name = "备注", width = 15) |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/FamilyMapper.java
| @@ -17,4 +17,13 @@ public interface FamilyMapper extends BaseMapper<Family> { | @@ -17,4 +17,13 @@ public interface FamilyMapper extends BaseMapper<Family> { | ||
| 17 | public boolean deleteByMainId(@Param("mainId") String mainId); | 17 | public boolean deleteByMainId(@Param("mainId") String mainId); |
| 18 | 18 | ||
| 19 | public List<Family> selectByMainId(@Param("mainId") String mainId); | 19 | public List<Family> selectByMainId(@Param("mainId") String mainId); |
| 20 | + | ||
| 21 | + public List<Family> getFamilyByMinorId(@Param("minorId") String minorId); | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 批量新增 | ||
| 25 | + * @param list | ||
| 26 | + * @return | ||
| 27 | + */ | ||
| 28 | + public Integer insertBatch(List<Family> list); | ||
| 20 | } | 29 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/GaDemographicMapper.java
| @@ -7,6 +7,7 @@ import org.jeecg.modules.system.entity.GaDemographic; | @@ -7,6 +7,7 @@ import org.jeecg.modules.system.entity.GaDemographic; | ||
| 7 | import org.jeecg.modules.system.vo.FamilyVo; | 7 | import org.jeecg.modules.system.vo.FamilyVo; |
| 8 | 8 | ||
| 9 | import java.util.List; | 9 | import java.util.List; |
| 10 | +import java.util.Set; | ||
| 10 | 11 | ||
| 11 | /** | 12 | /** |
| 12 | * @Description: ga_demographic | 13 | * @Description: ga_demographic |
| @@ -24,6 +25,21 @@ public interface GaDemographicMapper extends BaseMapper<GaDemographic> { | @@ -24,6 +25,21 @@ public interface GaDemographicMapper extends BaseMapper<GaDemographic> { | ||
| 24 | */ | 25 | */ |
| 25 | public List<Family> queryPageList(@Param("queryNum") Integer queryNum, @Param("pageSize") Integer pageSize); | 26 | public List<Family> queryPageList(@Param("queryNum") Integer queryNum, @Param("pageSize") Integer pageSize); |
| 26 | 27 | ||
| 27 | - public List<String> getIdentityS(); | 28 | + /** |
| 29 | + * 查询身份证号 | ||
| 30 | + * @return | ||
| 31 | + */ | ||
| 32 | + public Set<String> getIdentityS(); | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 根据户口号查询家庭成员信息 | ||
| 36 | + * @param householdNum | ||
| 37 | + * @return | ||
| 38 | + */ | ||
| 39 | + public List<Family> getFamilyByHouseholdNum(@Param("householdNum") String householdNum); | ||
| 40 | + | ||
| 41 | + public List<Family> queryHouseholdPageList(@Param("queryNum") Integer queryNum, @Param("pageSize") Integer pageSize); | ||
| 42 | + | ||
| 43 | + public Set<String> queryDemographicPageList(@Param("queryNum") Integer queryNum, @Param("pageSize") Integer pageSize); | ||
| 28 | 44 | ||
| 29 | } | 45 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/GaHouseholdMapper.java
| 1 | package org.jeecg.modules.system.mapper; | 1 | package org.jeecg.modules.system.mapper; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | +import org.jeecg.modules.system.entity.Family; | ||
| 4 | import org.jeecg.modules.system.entity.GaHousehold; | 5 | import org.jeecg.modules.system.entity.GaHousehold; |
| 5 | 6 | ||
| 7 | +import java.util.List; | ||
| 8 | +import java.util.Set; | ||
| 9 | + | ||
| 6 | /** | 10 | /** |
| 7 | * @Description: ga_household | 11 | * @Description: ga_household |
| 8 | * @Author: jeecg-boot | 12 | * @Author: jeecg-boot |
| @@ -11,4 +15,10 @@ import org.jeecg.modules.system.entity.GaHousehold; | @@ -11,4 +15,10 @@ import org.jeecg.modules.system.entity.GaHousehold; | ||
| 11 | */ | 15 | */ |
| 12 | public interface GaHouseholdMapper extends BaseMapper<GaHousehold> { | 16 | public interface GaHouseholdMapper extends BaseMapper<GaHousehold> { |
| 13 | 17 | ||
| 18 | + /** | ||
| 19 | + * 查询户籍信息 | ||
| 20 | + * @return | ||
| 21 | + */ | ||
| 22 | + public List<Family> getGaHouseholds(); | ||
| 14 | } | 23 | } |
| 24 | + |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/HighSchoolMapper.java
| 1 | package org.jeecg.modules.system.mapper; | 1 | package org.jeecg.modules.system.mapper; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | +import java.util.Set; | ||
| 4 | 5 | ||
| 5 | import org.apache.ibatis.annotations.Param; | 6 | import org.apache.ibatis.annotations.Param; |
| 6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| @@ -16,4 +17,6 @@ import org.jeecg.modules.system.entity.MrSchool; | @@ -16,4 +17,6 @@ import org.jeecg.modules.system.entity.MrSchool; | ||
| 16 | public interface HighSchoolMapper extends BaseMapper<HighSchool> { | 17 | public interface HighSchoolMapper extends BaseMapper<HighSchool> { |
| 17 | 18 | ||
| 18 | public List<MrSchool> getList(); | 19 | public List<MrSchool> getList(); |
| 20 | + | ||
| 21 | + public Set<String> getIdentityS(); | ||
| 19 | } | 22 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/MinorMapper.java
| 1 | package org.jeecg.modules.system.mapper; | 1 | package org.jeecg.modules.system.mapper; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | +import org.jeecg.modules.system.entity.Family; | ||
| 4 | import org.jeecg.modules.system.entity.Minor; | 5 | import org.jeecg.modules.system.entity.Minor; |
| 5 | 6 | ||
| 7 | +import java.util.List; | ||
| 8 | + | ||
| 6 | /** | 9 | /** |
| 7 | * @Description: 未成年人 | 10 | * @Description: 未成年人 |
| 8 | * @Author: jeecg-boot | 11 | * @Author: jeecg-boot |
| @@ -11,4 +14,6 @@ import org.jeecg.modules.system.entity.Minor; | @@ -11,4 +14,6 @@ import org.jeecg.modules.system.entity.Minor; | ||
| 11 | */ | 14 | */ |
| 12 | public interface MinorMapper extends BaseMapper<Minor> { | 15 | public interface MinorMapper extends BaseMapper<Minor> { |
| 13 | 16 | ||
| 17 | + public Integer insertBatch(List<Minor> list); | ||
| 18 | + | ||
| 14 | } | 19 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/MrSchoolMapper.java
| @@ -4,6 +4,7 @@ import java.util.List; | @@ -4,6 +4,7 @@ import java.util.List; | ||
| 4 | 4 | ||
| 5 | import org.apache.ibatis.annotations.Param; | 5 | import org.apache.ibatis.annotations.Param; |
| 6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 7 | +import org.jeecg.modules.system.entity.Minor; | ||
| 7 | import org.jeecg.modules.system.entity.MrSchool; | 8 | import org.jeecg.modules.system.entity.MrSchool; |
| 8 | 9 | ||
| 9 | /** | 10 | /** |
| @@ -13,5 +14,5 @@ import org.jeecg.modules.system.entity.MrSchool; | @@ -13,5 +14,5 @@ import org.jeecg.modules.system.entity.MrSchool; | ||
| 13 | * @Version: V1.0 | 14 | * @Version: V1.0 |
| 14 | */ | 15 | */ |
| 15 | public interface MrSchoolMapper extends BaseMapper<MrSchool> { | 16 | public interface MrSchoolMapper extends BaseMapper<MrSchool> { |
| 16 | - | 17 | + public Integer insertBatch(List<MrSchool> list); |
| 17 | } | 18 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/MzAdoptionMapper.java
| @@ -3,12 +3,16 @@ package org.jeecg.modules.system.mapper; | @@ -3,12 +3,16 @@ package org.jeecg.modules.system.mapper; | ||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | import org.jeecg.modules.system.entity.MzAdoption; | 4 | import org.jeecg.modules.system.entity.MzAdoption; |
| 5 | 5 | ||
| 6 | +import java.util.List; | ||
| 7 | +import java.util.Set; | ||
| 8 | + | ||
| 6 | /** | 9 | /** |
| 7 | - * @Description: mz_adoption | 10 | + * @Description: 收养 |
| 8 | * @Author: jeecg-boot | 11 | * @Author: jeecg-boot |
| 9 | * @Date: 2022-07-14 | 12 | * @Date: 2022-07-14 |
| 10 | * @Version: V1.0 | 13 | * @Version: V1.0 |
| 11 | */ | 14 | */ |
| 12 | public interface MzAdoptionMapper extends BaseMapper<MzAdoption> { | 15 | public interface MzAdoptionMapper extends BaseMapper<MzAdoption> { |
| 13 | 16 | ||
| 17 | + public List<String> getIdentityS(); | ||
| 14 | } | 18 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/MzLeftBehindChildrenMapper.java
| @@ -3,6 +3,8 @@ package org.jeecg.modules.system.mapper; | @@ -3,6 +3,8 @@ package org.jeecg.modules.system.mapper; | ||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | import org.jeecg.modules.system.entity.MzLeftBehindChildren; | 4 | import org.jeecg.modules.system.entity.MzLeftBehindChildren; |
| 5 | 5 | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 6 | /** | 8 | /** |
| 7 | * @Description: mz_left_behind_children | 9 | * @Description: mz_left_behind_children |
| 8 | * @Author: jeecg-boot | 10 | * @Author: jeecg-boot |
| @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzLeftBehindChildren; | @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzLeftBehindChildren; | ||
| 10 | * @Version: V1.0 | 12 | * @Version: V1.0 |
| 11 | */ | 13 | */ |
| 12 | public interface MzLeftBehindChildrenMapper extends BaseMapper<MzLeftBehindChildren> { | 14 | public interface MzLeftBehindChildrenMapper extends BaseMapper<MzLeftBehindChildren> { |
| 13 | - | 15 | + public List<String> getIdentityS(); |
| 14 | } | 16 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/MzOrphanMapper.java
| @@ -3,6 +3,8 @@ package org.jeecg.modules.system.mapper; | @@ -3,6 +3,8 @@ package org.jeecg.modules.system.mapper; | ||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | import org.jeecg.modules.system.entity.MzOrphan; | 4 | import org.jeecg.modules.system.entity.MzOrphan; |
| 5 | 5 | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 6 | /** | 8 | /** |
| 7 | * @Description: mz_orphan | 9 | * @Description: mz_orphan |
| 8 | * @Author: jeecg-boot | 10 | * @Author: jeecg-boot |
| @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzOrphan; | @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzOrphan; | ||
| 10 | * @Version: V1.0 | 12 | * @Version: V1.0 |
| 11 | */ | 13 | */ |
| 12 | public interface MzOrphanMapper extends BaseMapper<MzOrphan> { | 14 | public interface MzOrphanMapper extends BaseMapper<MzOrphan> { |
| 13 | - | 15 | + public List<String> getIdentityS(); |
| 14 | } | 16 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/MzUnsupportedMapper.java
| @@ -3,6 +3,8 @@ package org.jeecg.modules.system.mapper; | @@ -3,6 +3,8 @@ package org.jeecg.modules.system.mapper; | ||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | import org.jeecg.modules.system.entity.MzUnsupported; | 4 | import org.jeecg.modules.system.entity.MzUnsupported; |
| 5 | 5 | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 6 | /** | 8 | /** |
| 7 | * @Description: mz_unsupported | 9 | * @Description: mz_unsupported |
| 8 | * @Author: jeecg-boot | 10 | * @Author: jeecg-boot |
| @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzUnsupported; | @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzUnsupported; | ||
| 10 | * @Version: V1.0 | 12 | * @Version: V1.0 |
| 11 | */ | 13 | */ |
| 12 | public interface MzUnsupportedMapper extends BaseMapper<MzUnsupported> { | 14 | public interface MzUnsupportedMapper extends BaseMapper<MzUnsupported> { |
| 13 | - | 15 | + public List<String> getIdentityS(); |
| 14 | } | 16 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/PrimarySchoolMapper.java
| 1 | package org.jeecg.modules.system.mapper; | 1 | package org.jeecg.modules.system.mapper; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | +import java.util.Set; | ||
| 4 | 5 | ||
| 5 | import org.apache.ibatis.annotations.Param; | 6 | import org.apache.ibatis.annotations.Param; |
| 6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| @@ -16,4 +17,6 @@ import org.jeecg.modules.system.entity.PrimarySchool; | @@ -16,4 +17,6 @@ import org.jeecg.modules.system.entity.PrimarySchool; | ||
| 16 | public interface PrimarySchoolMapper extends BaseMapper<PrimarySchool> { | 17 | public interface PrimarySchoolMapper extends BaseMapper<PrimarySchool> { |
| 17 | 18 | ||
| 18 | public List<MrSchool> getList(); | 19 | public List<MrSchool> getList(); |
| 20 | + | ||
| 21 | + public Set<String> getIdentityS(); | ||
| 19 | } | 22 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java
| @@ -71,4 +71,9 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> { | @@ -71,4 +71,9 @@ public interface SysDepartMapper extends BaseMapper<SysDepart> { | ||
| 71 | */ | 71 | */ |
| 72 | @Select("SELECT * FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}") | 72 | @Select("SELECT * FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}") |
| 73 | List<SysDepart> queryDeptByPid(@Param("parentId")String parentId); | 73 | List<SysDepart> queryDeptByPid(@Param("parentId")String parentId); |
| 74 | + /** | ||
| 75 | + * 获取无pid的数据 | ||
| 76 | + * @return | ||
| 77 | + */ | ||
| 78 | + List<SysDepart> querySysDeparts(); | ||
| 74 | } | 79 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/FamilyMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | -<mapper namespace="package org.jeecg.modules.system.mapper.FamilyMapper"> | 3 | +<mapper namespace="org.jeecg.modules.system.mapper.FamilyMapper"> |
| 4 | 4 | ||
| 5 | <delete id="deleteByMainId" parameterType="java.lang.String"> | 5 | <delete id="deleteByMainId" parameterType="java.lang.String"> |
| 6 | DELETE | 6 | DELETE |
| @@ -12,5 +12,19 @@ | @@ -12,5 +12,19 @@ | ||
| 12 | SELECT * | 12 | SELECT * |
| 13 | FROM mr_family | 13 | FROM mr_family |
| 14 | WHERE | 14 | WHERE |
| 15 | - minor_id = #{mainId} </select> | 15 | + minor_id = #{mainId} </select> |
| 16 | + | ||
| 17 | +<!-- <insert id="insertBatch" > | ||
| 18 | + INSERT INTO mr_family (id, create_time, sys_org_code, household_num, number, name,identity, gender, relation, address,crime,reason, other)VALUES | ||
| 19 | + <foreach collection="list" item="b" separator=","> | ||
| 20 | + (#{b.id},#{b.createTime},#{b.sysOrgCode},#{b.householdNum},#{b.number},#{b.name},#{b.identity},#{b.gender},#{b.relation},#{b.address},#{b.crime},#{b.reason},#{b.other}) | ||
| 21 | + </foreach> | ||
| 22 | + </insert>--> | ||
| 23 | + | ||
| 24 | + <insert id="insertBatch" > | ||
| 25 | + INSERT INTO mr_family (id, create_time, sys_org_code, household_num, number, name,identity, gender, relation, address,crime,reason, other)VALUES | ||
| 26 | + <foreach collection="list" item="b" separator=","> | ||
| 27 | + (#{b.id},#{b.createTime},#{b.sysOrgCode},#{b.householdNum},#{b.number},#{b.name},#{b.identity},#{b.gender},#{b.relation},#{b.address},#{b.crime},#{b.reason},#{b.other}) | ||
| 28 | + </foreach> | ||
| 29 | + </insert> | ||
| 16 | </mapper> | 30 | </mapper> |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/GaDemographicMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="org.jeecg.modules.system.mapper.GaDemographicMapper"> | 3 | <mapper namespace="org.jeecg.modules.system.mapper.GaDemographicMapper"> |
| 4 | - <resultMap id="gaHouseholdVo" type="org.jeecg.modules.system.entity.Family"> | 4 | + <resultMap id="family" type="org.jeecg.modules.system.entity.Family"> |
| 5 | <result column="name" property="name"/> | 5 | <result column="name" property="name"/> |
| 6 | <result column="division" property="division"/> | 6 | <result column="division" property="division"/> |
| 7 | <result column="identity" property="identity"/> | 7 | <result column="identity" property="identity"/> |
| 8 | <result column="household_num" property="householdNum"/> | 8 | <result column="household_num" property="householdNum"/> |
| 9 | <result column="relation" property="relation"/> | 9 | <result column="relation" property="relation"/> |
| 10 | - <result column="num" property="num"/> | 10 | + <result column="number" property="number"/> |
| 11 | <result column="address" property="address"/> | 11 | <result column="address" property="address"/> |
| 12 | </resultMap> | 12 | </resultMap> |
| 13 | 13 | ||
| 14 | - <select id="queryPageList" parameterType="java.lang.Integer" resultMap="gaHouseholdVo"> | 14 | + <select id="queryPageList" parameterType="java.lang.Integer" resultMap="family"> |
| 15 | SELECT h.XM AS NAME, h.HJXZ AS address, h.XZQHMC AS division, h.GMSFHM AS identity, h.HH AS householdNum,h.YHZGXMC AS relation,h.RYBH AS number | 15 | SELECT h.XM AS NAME, h.HJXZ AS address, h.XZQHMC AS division, h.GMSFHM AS identity, h.HH AS householdNum,h.YHZGXMC AS relation,h.RYBH AS number |
| 16 | FROM ga_demographic d JOIN ga_household h | 16 | FROM ga_demographic d JOIN ga_household h |
| 17 | WHERE ((d.RYBH = h.RYBH) AND (d.id >( SELECT gd.id FROM ga_demographic gd ORDER BY gd.id LIMIT #{queryNum}, 1))) | 17 | WHERE ((d.RYBH = h.RYBH) AND (d.id >( SELECT gd.id FROM ga_demographic gd ORDER BY gd.id LIMIT #{queryNum}, 1))) |
| 18 | ORDER BY d.id LIMIT #{pageSize} | 18 | ORDER BY d.id LIMIT #{pageSize} |
| 19 | </select> | 19 | </select> |
| 20 | 20 | ||
| 21 | - <select id="getIdentityS" > | 21 | + <select id="getIdentityS" resultType="java.lang.String"> |
| 22 | SELECT d.GMSFHM FROM ga_demographic d | 22 | SELECT d.GMSFHM FROM ga_demographic d |
| 23 | </select> | 23 | </select> |
| 24 | + | ||
| 25 | + <select id="getFamilyByHouseholdNum" parameterType="java.lang.String" resultMap="family"> | ||
| 26 | + SELECT h.XM AS NAME, h.HJXZ AS address, h.XZQHMC AS division, h.GMSFHM AS identity, h.HH AS householdNum,h.YHZGXMC AS relation,h.RYBH AS number | ||
| 27 | + FROM ga_household h where h.hh=#{householdNum} | ||
| 28 | + </select> | ||
| 29 | + | ||
| 30 | + <select id="queryHouseholdPageList" parameterType="java.lang.Integer" resultMap="family"> | ||
| 31 | + SELECT h.XM AS NAME, h.HJXZ AS address, h.XZQHMC AS division, h.GMSFHM AS identity, h.HH AS householdNum,h.YHZGXMC AS relation,h.RYBH AS number | ||
| 32 | + FROM ga_household h | ||
| 33 | + WHERE (h.id >( SELECT gd.id FROM ga_household gd ORDER BY gd.id LIMIT #{queryNum}, 1)) | ||
| 34 | + ORDER BY h.id LIMIT #{pageSize} | ||
| 35 | + </select> | ||
| 36 | + | ||
| 37 | + <select id="queryDemographicPageList" parameterType="java.lang.Integer" resultType="java.lang.String"> | ||
| 38 | + SELECT d.GMSFHM | ||
| 39 | + FROM ga_demographic d | ||
| 40 | + WHERE ( (d.id >( SELECT gd.id FROM ga_demographic gd ORDER BY gd.id LIMIT #{queryNum}, 1))) | ||
| 41 | + ORDER BY d.id LIMIT #{pageSize} | ||
| 42 | + </select> | ||
| 24 | </mapper> | 43 | </mapper> |
| 25 | \ No newline at end of file | 44 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/GaHouseholdMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="org.jeecg.modules.system.mapper.GaHouseholdMapper"> | 3 | <mapper namespace="org.jeecg.modules.system.mapper.GaHouseholdMapper"> |
| 4 | + <resultMap id="family" type="org.jeecg.modules.system.entity.Family"> | ||
| 5 | + <result column="name" property="name"/> | ||
| 6 | + <result column="division" property="division"/> | ||
| 7 | + <result column="identity" property="identity"/> | ||
| 8 | + <result column="householdNum" property="householdNum"/> | ||
| 9 | + <result column="relation" property="relation"/> | ||
| 10 | + <result column="number" property="number"/> | ||
| 11 | + <result column="address" property="address"/> | ||
| 12 | + </resultMap> | ||
| 4 | 13 | ||
| 14 | + <select id="getGaHouseholds" resultMap="family"> | ||
| 15 | + SELECT h.XM AS NAME, h.HJXZ AS address, h.XZQHMC AS division, h.GMSFHM AS identity, h.HH AS householdNum,h.YHZGXMC AS relation,h.RYBH AS number | ||
| 16 | + FROM ga_household h | ||
| 17 | + </select> | ||
| 5 | </mapper> | 18 | </mapper> |
| 6 | \ No newline at end of file | 19 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/HighSchoolMapper.xml
| @@ -5,15 +5,15 @@ | @@ -5,15 +5,15 @@ | ||
| 5 | <resultMap id="mrSchool" type="org.jeecg.modules.system.entity.MrSchool"> | 5 | <resultMap id="mrSchool" type="org.jeecg.modules.system.entity.MrSchool"> |
| 6 | <result column="name" property="name"/> | 6 | <result column="name" property="name"/> |
| 7 | <result column="identity" property="identity"/> | 7 | <result column="identity" property="identity"/> |
| 8 | - <result column="class_name" property="className"/> | 8 | + <result column="className" property="className"/> |
| 9 | <result column="address" property="address"/> | 9 | <result column="address" property="address"/> |
| 10 | <result column="school" property="school"/> | 10 | <result column="school" property="school"/> |
| 11 | <result column="phone" property="phone"/> | 11 | <result column="phone" property="phone"/> |
| 12 | - <result column="member_one" property="memberOne"/> | ||
| 13 | - <result column="admission_date" property="admissionDate"/> | ||
| 14 | - <result column="connect_one" property="connectOne"/> | ||
| 15 | - <result column="member_two" property="memberTwo"/> | ||
| 16 | - <result column="connect_two" property="connectTwo"/> | 12 | + <result column="connectOne" property="memberOne"/> |
| 13 | + <result column="admissionDate" property="admissionDate"/> | ||
| 14 | + <result column="connectOne" property="connectOne"/> | ||
| 15 | + <result column="memberTwo" property="memberTwo"/> | ||
| 16 | + <result column="connectTwo" property="connectTwo"/> | ||
| 17 | </resultMap> | 17 | </resultMap> |
| 18 | 18 | ||
| 19 | <select id="getList" resultMap="mrSchool"> | 19 | <select id="getList" resultMap="mrSchool"> |
| @@ -22,4 +22,10 @@ | @@ -22,4 +22,10 @@ | ||
| 22 | FROM mr_high_school s | 22 | FROM mr_high_school s |
| 23 | WHERE length (s.SFZJH)>14; | 23 | WHERE length (s.SFZJH)>14; |
| 24 | </select> | 24 | </select> |
| 25 | + | ||
| 26 | + <select id="getIdentityS" resultType="java.lang.String"> | ||
| 27 | + SELECT s.SFZJH as identity FROM mr_high_school s WHERE length (s.SFZJH)>14; | ||
| 28 | + </select> | ||
| 29 | + | ||
| 30 | + | ||
| 25 | </mapper> | 31 | </mapper> |
| 26 | \ No newline at end of file | 32 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/MinorMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="package org.jeecg.modules.system.mapper.MinorMapper"> | 3 | <mapper namespace="package org.jeecg.modules.system.mapper.MinorMapper"> |
| 4 | - | 4 | + <insert id="insertBatch" > |
| 5 | + INSERT INTO mr_minor (id, create_time, sys_org_code, household_num, number, name,identity, gender, relation, address,guardian, | ||
| 6 | + school,schoolName, startYear,reason,specialReason,remark)VALUES | ||
| 7 | + <foreach collection="list" item="b" separator=","> | ||
| 8 | + (#{b.id},#{b.createTime},#{b.sysOrgCode},#{b.householdNum},#{b.number},#{b.name},#{b.identity},#{b.gender},#{b.relation},#{b.address},#{b.guardian}, | ||
| 9 | + #{b.school},#{b.schoolName},#{b.startYear},#{b.reason},#{b.specialReason},#{b.remark}) | ||
| 10 | + </foreach> | ||
| 11 | + </insert> | ||
| 5 | </mapper> | 12 | </mapper> |
| 6 | \ No newline at end of file | 13 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/MrSchoolMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="org.jeecg.modules.system.mapper.MrSchoolMapper"> | 3 | <mapper namespace="org.jeecg.modules.system.mapper.MrSchoolMapper"> |
| 4 | - | 4 | + <insert id="insertBatch" > |
| 5 | + INSERT INTO mr_school (id, create_time, sys_org_code, name, identity, school,admissionDate, className, address, memberOne,connectOne, | ||
| 6 | + phoneOne,member_two, connectTwo,phoneTwo,phone)VALUES | ||
| 7 | + <foreach collection="list" item="b" separator=","> | ||
| 8 | + (#{b.id},#{b.createTime},#{b.sysOrgCode},#{b.name},#{b.identity},#{b.school},#{b.admission_date},#{b.class_name},#{b.address},#{b.member_one},#{b.connect_one}, | ||
| 9 | + #{b.phone_one},#{b.memberTwo},#{b.connect_two},#{b.phone_two},#{b.phone}) | ||
| 10 | + </foreach> | ||
| 11 | + </insert> | ||
| 5 | </mapper> | 12 | </mapper> |
| 6 | \ No newline at end of file | 13 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/MzAdoptionMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzAdoptionMapper"> | 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzAdoptionMapper"> |
| 4 | - | 4 | + <select id="getIdentityS" resultType="java.lang.String"> |
| 5 | + SELECT a.identity FROM mz_adoption a; | ||
| 6 | + </select> | ||
| 5 | </mapper> | 7 | </mapper> |
| 6 | \ No newline at end of file | 8 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/MzLeftBehindChildrenMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzLeftBehindChildrenMapper"> | 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzLeftBehindChildrenMapper"> |
| 4 | - | 4 | + <select id="getIdentityS" resultType="java.lang.String"> |
| 5 | + SELECT c.identity FROM mz_left_behind_children c; | ||
| 6 | + </select> | ||
| 5 | </mapper> | 7 | </mapper> |
| 6 | \ No newline at end of file | 8 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/MzOrphanMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzOrphanMapper"> | 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzOrphanMapper"> |
| 4 | - | 4 | + <select id="getIdentityS" resultType="java.lang.String"> |
| 5 | + SELECT o.identity FROM mz_orphan o; | ||
| 6 | + </select> | ||
| 5 | </mapper> | 7 | </mapper> |
| 6 | \ No newline at end of file | 8 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/MzUnsupportedMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzUnsupportedMapper"> | 3 | <mapper namespace="org.jeecg.modules.system.mapper.MzUnsupportedMapper"> |
| 4 | - | 4 | + <select id="getIdentityS" resultType="java.lang.String"> |
| 5 | + SELECT u.identity FROM mz_unsupported u | ||
| 6 | + </select> | ||
| 5 | </mapper> | 7 | </mapper> |
| 6 | \ No newline at end of file | 8 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/PrimarySchoolMapper.xml
| @@ -24,4 +24,8 @@ | @@ -24,4 +24,8 @@ | ||
| 24 | FROM mr_primary_school s | 24 | FROM mr_primary_school s |
| 25 | WHERE length (s.SFZJH)>14 | 25 | WHERE length (s.SFZJH)>14 |
| 26 | </select> | 26 | </select> |
| 27 | + | ||
| 28 | + <select id="getIdentityS" resultType="java.lang.String"> | ||
| 29 | + SELECT s.SFZJH as identity FROM mr_high_school s WHERE length (s.SFZJH)>14; | ||
| 30 | + </select> | ||
| 27 | </mapper> | 31 | </mapper> |
| 28 | \ No newline at end of file | 32 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SourceMapper.xml
| @@ -11,9 +11,8 @@ | @@ -11,9 +11,8 @@ | ||
| 11 | <select id="getListGroupByName" resultMap="sourceData"> | 11 | <select id="getListGroupByName" resultMap="sourceData"> |
| 12 | SELECT name,COUNT(batch) as batch FROM mr_source | 12 | SELECT name,COUNT(batch) as batch FROM mr_source |
| 13 | <if test="null != name and '' !=name"> | 13 | <if test="null != name and '' !=name"> |
| 14 | - where name like concat('%',#{name},'%') | 14 | + where name = #{name} |
| 15 | </if> | 15 | </if> |
| 16 | - | ||
| 17 | GROUP BY `name` | 16 | GROUP BY `name` |
| 18 | </select> | 17 | </select> |
| 19 | </mapper> | 18 | </mapper> |
| 20 | \ No newline at end of file | 19 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml
| @@ -51,4 +51,8 @@ | @@ -51,4 +51,8 @@ | ||
| 51 | <select id="queryCompByOrgCode" resultType="org.jeecg.modules.system.entity.SysDepart"> | 51 | <select id="queryCompByOrgCode" resultType="org.jeecg.modules.system.entity.SysDepart"> |
| 52 | select * from sys_depart where del_flag = '0' and org_category='1' and org_code= #{orgCode,jdbcType=VARCHAR} | 52 | select * from sys_depart where del_flag = '0' and org_category='1' and org_code= #{orgCode,jdbcType=VARCHAR} |
| 53 | </select> | 53 | </select> |
| 54 | + | ||
| 55 | + <select id="querySysDeparts" parameterType="String" resultType="org.jeecg.modules.system.entity.SysDepart"> | ||
| 56 | + SELECT * FROM sys_depart WHERE parent_id !=''; | ||
| 57 | + </select> | ||
| 54 | </mapper> | 58 | </mapper> |
| 55 | \ No newline at end of file | 59 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IFamilyService.java
| @@ -2,6 +2,8 @@ package org.jeecg.modules.system.service; | @@ -2,6 +2,8 @@ package org.jeecg.modules.system.service; | ||
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | import org.jeecg.modules.system.entity.Family; | 4 | import org.jeecg.modules.system.entity.Family; |
| 5 | +import org.jeecg.modules.system.entity.Minor; | ||
| 6 | +import org.jeecg.modules.system.entity.SysDepart; | ||
| 5 | 7 | ||
| 6 | import java.util.List; | 8 | import java.util.List; |
| 7 | 9 | ||
| @@ -14,4 +16,7 @@ import java.util.List; | @@ -14,4 +16,7 @@ import java.util.List; | ||
| 14 | public interface IFamilyService extends IService<Family> { | 16 | public interface IFamilyService extends IService<Family> { |
| 15 | 17 | ||
| 16 | public List<Family> selectByMainId(String mainId); | 18 | public List<Family> selectByMainId(String mainId); |
| 19 | + | ||
| 20 | + | ||
| 21 | + public Integer insertBatch(List<Family> list,List<SysDepart> departs); | ||
| 17 | } | 22 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IGaDemographicService.java
| 1 | package org.jeecg.modules.system.service; | 1 | package org.jeecg.modules.system.service; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | +import io.lettuce.core.dynamic.annotation.Param; | ||
| 4 | import org.jeecg.modules.system.entity.Family; | 5 | import org.jeecg.modules.system.entity.Family; |
| 5 | import org.jeecg.modules.system.entity.GaDemographic; | 6 | import org.jeecg.modules.system.entity.GaDemographic; |
| 6 | import org.jeecg.modules.system.vo.FamilyVo; | 7 | import org.jeecg.modules.system.vo.FamilyVo; |
| 7 | 8 | ||
| 8 | import java.util.List; | 9 | import java.util.List; |
| 10 | +import java.util.Map; | ||
| 11 | +import java.util.Set; | ||
| 9 | 12 | ||
| 10 | /** | 13 | /** |
| 11 | * @Description: 公安_人口基础信息 | 14 | * @Description: 公安_人口基础信息 |
| @@ -23,5 +26,19 @@ public interface IGaDemographicService extends IService<GaDemographic> { | @@ -23,5 +26,19 @@ public interface IGaDemographicService extends IService<GaDemographic> { | ||
| 23 | */ | 26 | */ |
| 24 | public List<Family> queryPageList(Integer startNum, Integer endNum); | 27 | public List<Family> queryPageList(Integer startNum, Integer endNum); |
| 25 | 28 | ||
| 26 | - public List<String> getIdentityS(); | 29 | + public Map<String,String> getIdentityS(); |
| 30 | + | ||
| 31 | + public Set<String> getIdStrs(); | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 根据户口号查询家庭成员信息 | ||
| 36 | + * @param householdNum | ||
| 37 | + * @return | ||
| 38 | + */ | ||
| 39 | + public List<Family> getFamilyByHouseholdNum(@Param("householdNum") String householdNum); | ||
| 40 | + | ||
| 41 | + public Map<String,Family> queryHouseholdPageList(@Param("queryNum") Integer queryNum, @Param("pageSize") Integer pageSize); | ||
| 42 | + | ||
| 43 | + public Set<String> queryDemographicPageList(@Param("queryNum") Integer queryNum, @Param("pageSize") Integer pageSize); | ||
| 27 | } | 44 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IGaHouseholdService.java
| 1 | package org.jeecg.modules.system.service; | 1 | package org.jeecg.modules.system.service; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | +import org.jeecg.modules.system.entity.Family; | ||
| 4 | import org.jeecg.modules.system.entity.GaHousehold; | 5 | import org.jeecg.modules.system.entity.GaHousehold; |
| 5 | 6 | ||
| 7 | +import java.util.List; | ||
| 8 | +import java.util.Map; | ||
| 9 | + | ||
| 6 | /** | 10 | /** |
| 7 | * @Description: 公安_居民户籍信息 | 11 | * @Description: 公安_居民户籍信息 |
| 8 | * @Author: jeecg-boot | 12 | * @Author: jeecg-boot |
| @@ -10,5 +14,9 @@ import org.jeecg.modules.system.entity.GaHousehold; | @@ -10,5 +14,9 @@ import org.jeecg.modules.system.entity.GaHousehold; | ||
| 10 | * @Version: V1.0 | 14 | * @Version: V1.0 |
| 11 | */ | 15 | */ |
| 12 | public interface IGaHouseholdService extends IService<GaHousehold> { | 16 | public interface IGaHouseholdService extends IService<GaHousehold> { |
| 13 | - | 17 | + /** |
| 18 | + * 查询户籍信息 | ||
| 19 | + * @return | ||
| 20 | + */ | ||
| 21 | + public Map<String,Family> getGaHouseholds(Map<String,String> gaDemographics); | ||
| 14 | } | 22 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IGaPunishService.java
| @@ -5,6 +5,7 @@ import org.jeecg.modules.system.entity.GaPunish; | @@ -5,6 +5,7 @@ import org.jeecg.modules.system.entity.GaPunish; | ||
| 5 | import org.jeecg.modules.system.vo.GaPunishVo; | 5 | import org.jeecg.modules.system.vo.GaPunishVo; |
| 6 | 6 | ||
| 7 | import java.util.List; | 7 | import java.util.List; |
| 8 | +import java.util.Map; | ||
| 8 | 9 | ||
| 9 | /** | 10 | /** |
| 10 | * @Description: 公安_行政处罚打处人员信息 | 11 | * @Description: 公安_行政处罚打处人员信息 |
| @@ -17,5 +18,5 @@ public interface IGaPunishService extends IService<GaPunish> { | @@ -17,5 +18,5 @@ public interface IGaPunishService extends IService<GaPunish> { | ||
| 17 | * 查询数据 | 18 | * 查询数据 |
| 18 | * @return | 19 | * @return |
| 19 | */ | 20 | */ |
| 20 | - public List<GaPunishVo> queryAll(); | 21 | + public Map<String,GaPunishVo> queryAll(); |
| 21 | } | 22 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IHighSchoolService.java
| @@ -6,6 +6,7 @@ import org.jeecg.modules.system.entity.HighSchool; | @@ -6,6 +6,7 @@ import org.jeecg.modules.system.entity.HighSchool; | ||
| 6 | import org.jeecg.modules.system.entity.MrSchool; | 6 | import org.jeecg.modules.system.entity.MrSchool; |
| 7 | 7 | ||
| 8 | import java.util.List; | 8 | import java.util.List; |
| 9 | +import java.util.Set; | ||
| 9 | 10 | ||
| 10 | /** | 11 | /** |
| 11 | * @Description: mr_high_school | 12 | * @Description: mr_high_school |
| @@ -15,4 +16,5 @@ import java.util.List; | @@ -15,4 +16,5 @@ import java.util.List; | ||
| 15 | */ | 16 | */ |
| 16 | public interface IHighSchoolService extends IService<HighSchool> { | 17 | public interface IHighSchoolService extends IService<HighSchool> { |
| 17 | public List<MrSchool> getList(); | 18 | public List<MrSchool> getList(); |
| 19 | + public Set<String> getIdentityS(); | ||
| 18 | } | 20 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IMinorService.java
| @@ -3,6 +3,7 @@ package org.jeecg.modules.system.service; | @@ -3,6 +3,7 @@ package org.jeecg.modules.system.service; | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | import org.jeecg.modules.system.entity.Family; | 4 | import org.jeecg.modules.system.entity.Family; |
| 5 | import org.jeecg.modules.system.entity.Minor; | 5 | import org.jeecg.modules.system.entity.Minor; |
| 6 | +import org.jeecg.modules.system.entity.SysDepart; | ||
| 6 | 7 | ||
| 7 | import java.io.Serializable; | 8 | import java.io.Serializable; |
| 8 | import java.util.Collection; | 9 | import java.util.Collection; |
| @@ -37,5 +38,7 @@ public interface IMinorService extends IService<Minor> { | @@ -37,5 +38,7 @@ public interface IMinorService extends IService<Minor> { | ||
| 37 | * 批量删除一对多 | 38 | * 批量删除一对多 |
| 38 | */ | 39 | */ |
| 39 | public void delBatchMain (Collection<? extends Serializable> idList); | 40 | public void delBatchMain (Collection<? extends Serializable> idList); |
| 40 | - | 41 | + |
| 42 | + | ||
| 43 | + public Integer insertBatch(List<Minor> list,List<SysDepart> departs); | ||
| 41 | } | 44 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IMrSchoolService.java
| @@ -2,6 +2,9 @@ package org.jeecg.modules.system.service; | @@ -2,6 +2,9 @@ package org.jeecg.modules.system.service; | ||
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | import org.jeecg.modules.system.entity.MrSchool; | 4 | import org.jeecg.modules.system.entity.MrSchool; |
| 5 | +import org.jeecg.modules.system.entity.SysDepart; | ||
| 6 | + | ||
| 7 | +import java.util.List; | ||
| 5 | 8 | ||
| 6 | /** | 9 | /** |
| 7 | * @Description: 学校 | 10 | * @Description: 学校 |
| @@ -10,5 +13,5 @@ import org.jeecg.modules.system.entity.MrSchool; | @@ -10,5 +13,5 @@ import org.jeecg.modules.system.entity.MrSchool; | ||
| 10 | * @Version: V1.0 | 13 | * @Version: V1.0 |
| 11 | */ | 14 | */ |
| 12 | public interface IMrSchoolService extends IService<MrSchool> { | 15 | public interface IMrSchoolService extends IService<MrSchool> { |
| 13 | - | 16 | + public Integer insertBatch(List<MrSchool> list,List<SysDepart> departs); |
| 14 | } | 17 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IMzAdoptionService.java
| @@ -3,6 +3,8 @@ package org.jeecg.modules.system.service; | @@ -3,6 +3,8 @@ package org.jeecg.modules.system.service; | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | import org.jeecg.modules.system.entity.MzAdoption; | 4 | import org.jeecg.modules.system.entity.MzAdoption; |
| 5 | 5 | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 6 | /** | 8 | /** |
| 7 | * @Description:民政_全市收养登记数据 | 9 | * @Description:民政_全市收养登记数据 |
| 8 | * @Author: jeecg-boot | 10 | * @Author: jeecg-boot |
| @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzAdoption; | @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzAdoption; | ||
| 10 | * @Version: V1.0 | 12 | * @Version: V1.0 |
| 11 | */ | 13 | */ |
| 12 | public interface IMzAdoptionService extends IService<MzAdoption> { | 14 | public interface IMzAdoptionService extends IService<MzAdoption> { |
| 13 | - | 15 | + public List<String> getIdentityS(); |
| 14 | } | 16 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IMzLeftBehindChildrenService.java
| @@ -4,6 +4,8 @@ package org.jeecg.modules.system.service; | @@ -4,6 +4,8 @@ package org.jeecg.modules.system.service; | ||
| 4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
| 5 | import org.jeecg.modules.system.entity.MzLeftBehindChildren; | 5 | import org.jeecg.modules.system.entity.MzLeftBehindChildren; |
| 6 | 6 | ||
| 7 | +import java.util.List; | ||
| 8 | + | ||
| 7 | /** | 9 | /** |
| 8 | * @Description: 民政_全市在册农村留守儿童数据 | 10 | * @Description: 民政_全市在册农村留守儿童数据 |
| 9 | * @Author: jeecg-boot | 11 | * @Author: jeecg-boot |
| @@ -11,5 +13,5 @@ import org.jeecg.modules.system.entity.MzLeftBehindChildren; | @@ -11,5 +13,5 @@ import org.jeecg.modules.system.entity.MzLeftBehindChildren; | ||
| 11 | * @Version: V1.0 | 13 | * @Version: V1.0 |
| 12 | */ | 14 | */ |
| 13 | public interface IMzLeftBehindChildrenService extends IService<MzLeftBehindChildren> { | 15 | public interface IMzLeftBehindChildrenService extends IService<MzLeftBehindChildren> { |
| 14 | - | 16 | + public List<String> getIdentityS(); |
| 15 | } | 17 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IMzOrphanService.java
| @@ -3,6 +3,8 @@ package org.jeecg.modules.system.service; | @@ -3,6 +3,8 @@ package org.jeecg.modules.system.service; | ||
| 3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | import org.jeecg.modules.system.entity.MzOrphan; | 4 | import org.jeecg.modules.system.entity.MzOrphan; |
| 5 | 5 | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 6 | /** | 8 | /** |
| 7 | * @Description: 民政_全市在册孤儿数据 | 9 | * @Description: 民政_全市在册孤儿数据 |
| 8 | * @Author: jeecg-boot | 10 | * @Author: jeecg-boot |
| @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzOrphan; | @@ -10,5 +12,5 @@ import org.jeecg.modules.system.entity.MzOrphan; | ||
| 10 | * @Version: V1.0 | 12 | * @Version: V1.0 |
| 11 | */ | 13 | */ |
| 12 | public interface IMzOrphanService extends IService<MzOrphan> { | 14 | public interface IMzOrphanService extends IService<MzOrphan> { |
| 13 | - | 15 | + public List<String> getIdentityS(); |
| 14 | } | 16 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IMzUnsupportedService.java
| @@ -4,6 +4,8 @@ package org.jeecg.modules.system.service; | @@ -4,6 +4,8 @@ package org.jeecg.modules.system.service; | ||
| 4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
| 5 | import org.jeecg.modules.system.entity.MzUnsupported; | 5 | import org.jeecg.modules.system.entity.MzUnsupported; |
| 6 | 6 | ||
| 7 | +import java.util.List; | ||
| 8 | + | ||
| 7 | /** | 9 | /** |
| 8 | * @Description: 民政_全市在册事实无人抚养儿童数据 | 10 | * @Description: 民政_全市在册事实无人抚养儿童数据 |
| 9 | * @Author: jeecg-boot | 11 | * @Author: jeecg-boot |
| @@ -11,5 +13,5 @@ import org.jeecg.modules.system.entity.MzUnsupported; | @@ -11,5 +13,5 @@ import org.jeecg.modules.system.entity.MzUnsupported; | ||
| 11 | * @Version: V1.0 | 13 | * @Version: V1.0 |
| 12 | */ | 14 | */ |
| 13 | public interface IMzUnsupportedService extends IService<MzUnsupported> { | 15 | public interface IMzUnsupportedService extends IService<MzUnsupported> { |
| 14 | - | 16 | + public List<String> getIdentityS(); |
| 15 | } | 17 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IPrimarySchoolService.java
| @@ -6,6 +6,7 @@ import org.jeecg.modules.system.entity.MrSchool; | @@ -6,6 +6,7 @@ import org.jeecg.modules.system.entity.MrSchool; | ||
| 6 | import org.jeecg.modules.system.entity.PrimarySchool; | 6 | import org.jeecg.modules.system.entity.PrimarySchool; |
| 7 | 7 | ||
| 8 | import java.util.List; | 8 | import java.util.List; |
| 9 | +import java.util.Set; | ||
| 9 | 10 | ||
| 10 | /** | 11 | /** |
| 11 | * @Description: mr_primary_school | 12 | * @Description: mr_primary_school |
| @@ -15,4 +16,5 @@ import java.util.List; | @@ -15,4 +16,5 @@ import java.util.List; | ||
| 15 | */ | 16 | */ |
| 16 | public interface IPrimarySchoolService extends IService<PrimarySchool> { | 17 | public interface IPrimarySchoolService extends IService<PrimarySchool> { |
| 17 | public List<MrSchool> getList(); | 18 | public List<MrSchool> getList(); |
| 19 | + public Set<String> getIdentityS(); | ||
| 18 | } | 20 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java
| @@ -137,4 +137,10 @@ public interface ISysDepartService extends IService<SysDepart>{ | @@ -137,4 +137,10 @@ public interface ISysDepartService extends IService<SysDepart>{ | ||
| 137 | * @return | 137 | * @return |
| 138 | */ | 138 | */ |
| 139 | List<SysDepart> queryDeptByPid(String pid); | 139 | List<SysDepart> queryDeptByPid(String pid); |
| 140 | + | ||
| 141 | + /** | ||
| 142 | + * 获取无pid的数据 | ||
| 143 | + * @return | ||
| 144 | + */ | ||
| 145 | + List<SysDepart> querySysDeparts(); | ||
| 140 | } | 146 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/FamilyServiceImpl.java
| 1 | package org.jeecg.modules.system.service.impl; | 1 | package org.jeecg.modules.system.service.impl; |
| 2 | 2 | ||
| 3 | import org.jeecg.modules.system.entity.Family; | 3 | import org.jeecg.modules.system.entity.Family; |
| 4 | +import org.jeecg.modules.system.entity.Minor; | ||
| 5 | +import org.jeecg.modules.system.entity.SysDepart; | ||
| 4 | import org.jeecg.modules.system.mapper.FamilyMapper; | 6 | import org.jeecg.modules.system.mapper.FamilyMapper; |
| 5 | import org.jeecg.modules.system.service.IFamilyService; | 7 | import org.jeecg.modules.system.service.IFamilyService; |
| 8 | +import org.springframework.jdbc.datasource.DataSourceTransactionManager; | ||
| 6 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| 7 | -import java.util.List; | 10 | + |
| 11 | +import java.util.*; | ||
| 12 | +import java.util.concurrent.CountDownLatch; | ||
| 13 | +import java.util.concurrent.ExecutorService; | ||
| 14 | +import java.util.concurrent.Executors; | ||
| 15 | +import java.util.concurrent.TimeUnit; | ||
| 16 | +import java.util.stream.Collectors; | ||
| 17 | + | ||
| 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 18 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 19 | import org.springframework.beans.factory.annotation.Autowired; |
| 20 | +import org.springframework.transaction.TransactionDefinition; | ||
| 21 | +import org.springframework.transaction.TransactionStatus; | ||
| 10 | 22 | ||
| 11 | import javax.annotation.Resource; | 23 | import javax.annotation.Resource; |
| 12 | 24 | ||
| @@ -21,9 +33,71 @@ public class FamilyServiceImpl extends ServiceImpl<FamilyMapper, Family> impleme | @@ -21,9 +33,71 @@ public class FamilyServiceImpl extends ServiceImpl<FamilyMapper, Family> impleme | ||
| 21 | 33 | ||
| 22 | @Resource | 34 | @Resource |
| 23 | private FamilyMapper familyMapper; | 35 | private FamilyMapper familyMapper; |
| 36 | + | ||
| 37 | + @Resource | ||
| 38 | + private DataSourceTransactionManager dataSourceTransactionManager; | ||
| 39 | + | ||
| 40 | + @Resource | ||
| 41 | + private TransactionDefinition transactionDefinition; | ||
| 24 | 42 | ||
| 25 | @Override | 43 | @Override |
| 26 | public List<Family> selectByMainId(String mainId) { | 44 | public List<Family> selectByMainId(String mainId) { |
| 27 | return familyMapper.selectByMainId(mainId); | 45 | return familyMapper.selectByMainId(mainId); |
| 28 | } | 46 | } |
| 47 | + //分段大小 | ||
| 48 | + private int splitSize = 100000; | ||
| 49 | + /** | ||
| 50 | + * 批量新增 | ||
| 51 | + * @param list | ||
| 52 | + * @return | ||
| 53 | + */ | ||
| 54 | + @Override | ||
| 55 | + public Integer insertBatch(List<Family> list,List<SysDepart> departs) { | ||
| 56 | + updateStudentWithThreads(list); | ||
| 57 | + return list.size(); | ||
| 58 | + } | ||
| 59 | + private void addBatch(List<Family> list, CountDownLatch threadLatch){ | ||
| 60 | + TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); | ||
| 61 | + System.out.println("子线程:" + Thread.currentThread().getName()); | ||
| 62 | + try { | ||
| 63 | + list.forEach(s -> { | ||
| 64 | + String newTeacher = "TNO_" + new Random().nextInt(100); | ||
| 65 | + familyMapper.insert(s); | ||
| 66 | + }); | ||
| 67 | + dataSourceTransactionManager.commit(transactionStatus); | ||
| 68 | + threadLatch.countDown(); | ||
| 69 | + } catch (Throwable e) { | ||
| 70 | + e.printStackTrace(); | ||
| 71 | + dataSourceTransactionManager.rollback(transactionStatus); | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + public void updateStudentWithThreads(List<Family> list) { | ||
| 77 | + // 线程数量 | ||
| 78 | + final Integer threadCount = 15; | ||
| 79 | + | ||
| 80 | + //每个线程处理的数据量 | ||
| 81 | + final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount; | ||
| 82 | + // 创建多线程处理任务 | ||
| 83 | + ExecutorService studentThreadPool = Executors.newFixedThreadPool(threadCount); | ||
| 84 | + CountDownLatch threadLatchs = new CountDownLatch(threadCount); | ||
| 85 | + | ||
| 86 | + for (int i = 0; i < threadCount; i++) { | ||
| 87 | + // 每个线程处理的数据 | ||
| 88 | + List<Family> threadDatas = list.stream() | ||
| 89 | + .skip(i * dataPartionLength).limit(dataPartionLength).collect(Collectors.toList()); | ||
| 90 | + studentThreadPool.execute(() -> { | ||
| 91 | + addBatch(threadDatas, threadLatchs); | ||
| 92 | + }); | ||
| 93 | + } | ||
| 94 | + try { | ||
| 95 | + // 倒计时锁设置超时时间 30s | ||
| 96 | + threadLatchs.await(30, TimeUnit.SECONDS); | ||
| 97 | + } catch (Throwable e) { | ||
| 98 | + e.printStackTrace(); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + System.out.println("主线程完成"); | ||
| 102 | + } | ||
| 29 | } | 103 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/GaDemographicServiceImpl.java
| 1 | package org.jeecg.modules.system.service.impl; | 1 | package org.jeecg.modules.system.service.impl; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | +import org.jeecg.common.util.oConvertUtils; | ||
| 4 | import org.jeecg.modules.system.entity.Family; | 5 | import org.jeecg.modules.system.entity.Family; |
| 5 | import org.jeecg.modules.system.entity.GaDemographic; | 6 | import org.jeecg.modules.system.entity.GaDemographic; |
| 6 | import org.jeecg.modules.system.mapper.GaDemographicMapper; | 7 | import org.jeecg.modules.system.mapper.GaDemographicMapper; |
| 7 | import org.jeecg.modules.system.service.IGaDemographicService; | 8 | import org.jeecg.modules.system.service.IGaDemographicService; |
| 9 | +import org.jeecg.modules.system.util.IDNumberUtil; | ||
| 8 | import org.jeecg.modules.system.vo.FamilyVo; | 10 | import org.jeecg.modules.system.vo.FamilyVo; |
| 9 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
| 10 | 12 | ||
| 11 | import javax.annotation.Resource; | 13 | import javax.annotation.Resource; |
| 14 | +import java.util.HashMap; | ||
| 12 | import java.util.List; | 15 | import java.util.List; |
| 16 | +import java.util.Map; | ||
| 17 | +import java.util.Set; | ||
| 13 | 18 | ||
| 14 | /** | 19 | /** |
| 15 | * @Description: ga_demographic | 20 | * @Description: ga_demographic |
| @@ -34,9 +39,47 @@ public class GaDemographicServiceImpl extends ServiceImpl<GaDemographicMapper, G | @@ -34,9 +39,47 @@ public class GaDemographicServiceImpl extends ServiceImpl<GaDemographicMapper, G | ||
| 34 | } | 39 | } |
| 35 | 40 | ||
| 36 | @Override | 41 | @Override |
| 37 | - public List<String> getIdentityS() { | 42 | + public Map<String,String> getIdentityS() { |
| 43 | + Set<String> identitys=gaDemographicMapper.getIdentityS(); | ||
| 44 | + Map<String,String> map=new HashMap<>(); | ||
| 45 | + if(oConvertUtils.isNotEmpty(identitys)){ | ||
| 46 | + identitys.parallelStream().forEach(g -> { | ||
| 47 | + if(oConvertUtils.isNotEmpty(g) && IDNumberUtil.checkID(g) && IDNumberUtil.countAge(g)<18){ | ||
| 48 | + map.put(g,g); | ||
| 49 | + } | ||
| 50 | + }); | ||
| 51 | + } | ||
| 52 | + return map; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + @Override | ||
| 56 | + public Set<String> getIdStrs() { | ||
| 38 | return gaDemographicMapper.getIdentityS(); | 57 | return gaDemographicMapper.getIdentityS(); |
| 39 | } | 58 | } |
| 40 | 59 | ||
| 60 | + @Override | ||
| 61 | + public List<Family> getFamilyByHouseholdNum(String householdNum) { | ||
| 62 | + return gaDemographicMapper.getFamilyByHouseholdNum(householdNum); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + @Override | ||
| 66 | + public Map<String,Family> queryHouseholdPageList(Integer queryNum, Integer pageSize) { | ||
| 67 | + List<Family> families=gaDemographicMapper.queryHouseholdPageList(queryNum,queryNum); | ||
| 68 | + Map<String,Family> map=new HashMap<>(); | ||
| 69 | + if(oConvertUtils.isNotEmpty(families)){ | ||
| 70 | + families.parallelStream().forEach(f -> { | ||
| 71 | + if(oConvertUtils.isNotEmpty(f) && oConvertUtils.isNotEmpty(f.getIdentity())){ | ||
| 72 | + map.put(f.getIdentity(),f); | ||
| 73 | + } | ||
| 74 | + }); | ||
| 75 | + } | ||
| 76 | + return map; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + @Override | ||
| 80 | + public Set<String> queryDemographicPageList(Integer queryNum, Integer pageSize) { | ||
| 81 | + return gaDemographicMapper.queryDemographicPageList(queryNum,queryNum); | ||
| 82 | + } | ||
| 83 | + | ||
| 41 | 84 | ||
| 42 | } | 85 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/GaHouseholdServiceImpl.java
| 1 | package org.jeecg.modules.system.service.impl; | 1 | package org.jeecg.modules.system.service.impl; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | +import com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader; | ||
| 5 | +import org.jeecg.common.util.oConvertUtils; | ||
| 6 | +import org.jeecg.modules.system.entity.Family; | ||
| 4 | import org.jeecg.modules.system.entity.GaHousehold; | 7 | import org.jeecg.modules.system.entity.GaHousehold; |
| 8 | +import org.jeecg.modules.system.mapper.GaDemographicMapper; | ||
| 5 | import org.jeecg.modules.system.mapper.GaHouseholdMapper; | 9 | import org.jeecg.modules.system.mapper.GaHouseholdMapper; |
| 6 | import org.jeecg.modules.system.service.IGaHouseholdService; | 10 | import org.jeecg.modules.system.service.IGaHouseholdService; |
| 11 | +import org.jeecg.modules.system.util.IDNumberUtil; | ||
| 7 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
| 8 | 13 | ||
| 14 | +import javax.annotation.Resource; | ||
| 15 | +import java.util.HashMap; | ||
| 16 | +import java.util.List; | ||
| 17 | +import java.util.Map; | ||
| 18 | + | ||
| 9 | /** | 19 | /** |
| 10 | * @Description: ga_household | 20 | * @Description: ga_household |
| 11 | * @Author: jeecg-boot | 21 | * @Author: jeecg-boot |
| 12 | - * @Date: 2022-07-14 | 22 | + * @Date: 2022-07-14 |
| 13 | * @Version: V1.0 | 23 | * @Version: V1.0 |
| 14 | */ | 24 | */ |
| 15 | @Service | 25 | @Service |
| 16 | public class GaHouseholdServiceImpl extends ServiceImpl<GaHouseholdMapper, GaHousehold> implements IGaHouseholdService { | 26 | public class GaHouseholdServiceImpl extends ServiceImpl<GaHouseholdMapper, GaHousehold> implements IGaHouseholdService { |
| 27 | + @Resource | ||
| 28 | + private GaHouseholdMapper gaHouseholdMapper; | ||
| 17 | 29 | ||
| 30 | + @Override | ||
| 31 | + public Map<String, Family> getGaHouseholds(Map<String, String> gaDemographics) { | ||
| 32 | + Map<String, Family> familyMap = new HashMap<>(); | ||
| 33 | + try { | ||
| 34 | + List<Family> families = gaHouseholdMapper.getGaHouseholds(); | ||
| 35 | + if (oConvertUtils.isNotEmpty(families)) { | ||
| 36 | + families.parallelStream().forEach(g -> { | ||
| 37 | + if (oConvertUtils.isNotEmpty(g) && oConvertUtils.isNotEmpty(g.getIdentity())) { | ||
| 38 | + familyMap.put(g.getIdentity(), g); | ||
| 39 | + } | ||
| 40 | + }); | ||
| 41 | + } | ||
| 42 | + } catch (Exception e) { | ||
| 43 | + e.printStackTrace(); | ||
| 44 | + } | ||
| 45 | + return familyMap; | ||
| 46 | + } | ||
| 18 | } | 47 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/GaPunishServiceImpl.java
| 1 | package org.jeecg.modules.system.service.impl; | 1 | package org.jeecg.modules.system.service.impl; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | +import org.jeecg.common.util.oConvertUtils; | ||
| 4 | import org.jeecg.modules.system.entity.GaPunish; | 5 | import org.jeecg.modules.system.entity.GaPunish; |
| 5 | import org.jeecg.modules.system.mapper.GaDemographicMapper; | 6 | import org.jeecg.modules.system.mapper.GaDemographicMapper; |
| 6 | import org.jeecg.modules.system.mapper.GaPunishMapper; | 7 | import org.jeecg.modules.system.mapper.GaPunishMapper; |
| @@ -9,7 +10,9 @@ import org.jeecg.modules.system.vo.GaPunishVo; | @@ -9,7 +10,9 @@ import org.jeecg.modules.system.vo.GaPunishVo; | ||
| 9 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 10 | 11 | ||
| 11 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
| 13 | +import java.util.HashMap; | ||
| 12 | import java.util.List; | 14 | import java.util.List; |
| 15 | +import java.util.Map; | ||
| 13 | 16 | ||
| 14 | /** | 17 | /** |
| 15 | * @Description: ga_punish | 18 | * @Description: ga_punish |
| @@ -27,8 +30,17 @@ public class GaPunishServiceImpl extends ServiceImpl<GaPunishMapper, GaPunish> i | @@ -27,8 +30,17 @@ public class GaPunishServiceImpl extends ServiceImpl<GaPunishMapper, GaPunish> i | ||
| 27 | * @return | 30 | * @return |
| 28 | */ | 31 | */ |
| 29 | @Override | 32 | @Override |
| 30 | - public List<GaPunishVo> queryList() { | ||
| 31 | - return gaPunishMapper.queryList(); | 33 | + public Map<String,GaPunishVo> queryAll() { |
| 34 | + Map<String,GaPunishVo> punishVoMap=new HashMap<>(); | ||
| 35 | + List<GaPunishVo> gaPunishVos= gaPunishMapper.queryAll(); | ||
| 36 | + if(oConvertUtils.isNotEmpty(gaPunishVos)){ | ||
| 37 | + gaPunishVos.parallelStream().forEach(g -> { | ||
| 38 | + if(oConvertUtils.isNotEmpty(g) && oConvertUtils.isNotEmpty(g.getDxsfzh())){ | ||
| 39 | + punishVoMap.put(g.getDxsfzh(),g); | ||
| 40 | + } | ||
| 41 | + }); | ||
| 42 | + } | ||
| 43 | + return punishVoMap; | ||
| 32 | } | 44 | } |
| 33 | 45 | ||
| 34 | } | 46 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/HighSchoolServiceImpl.java
| @@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | @@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 11 | 11 | ||
| 12 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
| 13 | import java.util.List; | 13 | import java.util.List; |
| 14 | +import java.util.Set; | ||
| 14 | 15 | ||
| 15 | /** | 16 | /** |
| 16 | * @Description: mr_high_school | 17 | * @Description: mr_high_school |
| @@ -28,4 +29,11 @@ public class HighSchoolServiceImpl extends ServiceImpl<HighSchoolMapper, HighSch | @@ -28,4 +29,11 @@ public class HighSchoolServiceImpl extends ServiceImpl<HighSchoolMapper, HighSch | ||
| 28 | public List<MrSchool> getList() { | 29 | public List<MrSchool> getList() { |
| 29 | return highSchoolMapper.getList(); | 30 | return highSchoolMapper.getList(); |
| 30 | } | 31 | } |
| 32 | + | ||
| 33 | + @Override | ||
| 34 | + public Set<String> getIdentityS() { | ||
| 35 | + return highSchoolMapper.getIdentityS(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + | ||
| 31 | } | 39 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MinorServiceImpl.java
| 1 | package org.jeecg.modules.system.service.impl; | 1 | package org.jeecg.modules.system.service.impl; |
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | +import javassist.bytecode.analysis.Executor; | ||
| 4 | import org.jeecg.modules.system.entity.Family; | 5 | import org.jeecg.modules.system.entity.Family; |
| 5 | import org.jeecg.modules.system.entity.Minor; | 6 | import org.jeecg.modules.system.entity.Minor; |
| 7 | +import org.jeecg.modules.system.entity.SysDepart; | ||
| 6 | import org.jeecg.modules.system.mapper.FamilyMapper; | 8 | import org.jeecg.modules.system.mapper.FamilyMapper; |
| 7 | import org.jeecg.modules.system.mapper.MinorMapper; | 9 | import org.jeecg.modules.system.mapper.MinorMapper; |
| 8 | import org.jeecg.modules.system.service.IMinorService; | 10 | import org.jeecg.modules.system.service.IMinorService; |
| 11 | +import org.springframework.jdbc.datasource.DataSourceTransactionManager; | ||
| 9 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
| 13 | +import org.springframework.transaction.TransactionDefinition; | ||
| 14 | +import org.springframework.transaction.TransactionStatus; | ||
| 10 | import org.springframework.transaction.annotation.Transactional; | 15 | import org.springframework.transaction.annotation.Transactional; |
| 11 | 16 | ||
| 12 | import javax.annotation.Resource; | 17 | import javax.annotation.Resource; |
| 13 | import java.io.Serializable; | 18 | import java.io.Serializable; |
| 19 | +import java.util.ArrayList; | ||
| 14 | import java.util.Collection; | 20 | import java.util.Collection; |
| 15 | import java.util.List; | 21 | import java.util.List; |
| 22 | +import java.util.Random; | ||
| 23 | +import java.util.concurrent.CountDownLatch; | ||
| 24 | +import java.util.concurrent.ExecutorService; | ||
| 25 | +import java.util.concurrent.Executors; | ||
| 26 | +import java.util.concurrent.TimeUnit; | ||
| 27 | +import java.util.stream.Collectors; | ||
| 16 | 28 | ||
| 17 | /** | 29 | /** |
| 18 | * @Description: 未成年人 | 30 | * @Description: 未成年人 |
| @@ -27,17 +39,47 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements | @@ -27,17 +39,47 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements | ||
| 27 | private MinorMapper minorMapper; | 39 | private MinorMapper minorMapper; |
| 28 | @Resource | 40 | @Resource |
| 29 | private FamilyMapper familyMapper; | 41 | private FamilyMapper familyMapper; |
| 42 | + | ||
| 43 | + | ||
| 44 | + @Resource | ||
| 45 | + private DataSourceTransactionManager dataSourceTransactionManager; | ||
| 46 | + | ||
| 47 | + @Resource | ||
| 48 | + private TransactionDefinition transactionDefinition; | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + //分段大小 | ||
| 52 | + private int splitSize = 100000; | ||
| 30 | 53 | ||
| 31 | @Override | 54 | @Override |
| 32 | @Transactional | 55 | @Transactional |
| 33 | public void saveMain(Minor minor, List<Family> familyList) { | 56 | public void saveMain(Minor minor, List<Family> familyList) { |
| 34 | minorMapper.insert(minor); | 57 | minorMapper.insert(minor); |
| 35 | if(familyList!=null && familyList.size()>0) { | 58 | if(familyList!=null && familyList.size()>0) { |
| 36 | - for(Family entity:familyList) { | 59 | + //判断家庭成员信息里的数据是否包含未成年人,默认包含 |
| 60 | + Boolean falg=true; | ||
| 61 | + //户籍信息去重 | ||
| 62 | + List<Family> families= familyList.stream().distinct().collect(Collectors.toList()); | ||
| 63 | + for(Family entity:families) { | ||
| 64 | + if(!entity.getIdentity().equals(minor.getIdentity())) { | ||
| 65 | + falg = false; | ||
| 66 | + } | ||
| 37 | //外键设置 | 67 | //外键设置 |
| 38 | entity.setMinorId(minor.getId()); | 68 | entity.setMinorId(minor.getId()); |
| 39 | familyMapper.insert(entity); | 69 | familyMapper.insert(entity); |
| 40 | } | 70 | } |
| 71 | + if(!falg){ | ||
| 72 | + Family family=new Family(); | ||
| 73 | + family.setCrime(Family.IS_NOT_CRIME); | ||
| 74 | + family.setMinorId(minor.getId()); | ||
| 75 | + family.setName(minor.getName()); | ||
| 76 | + family.setHouseholdNum(minor.getHouseholdNum()); | ||
| 77 | + family.setIdentity(minor.getIdentity()); | ||
| 78 | + family.setNumber(minor.getNumber()); | ||
| 79 | + family.setGender(minor.getGender()); | ||
| 80 | + family.setAddress(minor.getAddress()); | ||
| 81 | + family.setRelation(minor.getRelation()); | ||
| 82 | + } | ||
| 41 | } | 83 | } |
| 42 | } | 84 | } |
| 43 | 85 | ||
| @@ -51,6 +93,8 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements | @@ -51,6 +93,8 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements | ||
| 51 | 93 | ||
| 52 | //2.子表数据重新插入 | 94 | //2.子表数据重新插入 |
| 53 | if(familyList!=null && familyList.size()>0) { | 95 | if(familyList!=null && familyList.size()>0) { |
| 96 | + //户籍信息去重 | ||
| 97 | + List<Family> families= familyList.stream().distinct().collect(Collectors.toList()); | ||
| 54 | for(Family entity:familyList) { | 98 | for(Family entity:familyList) { |
| 55 | //外键设置 | 99 | //外键设置 |
| 56 | entity.setMinorId(minor.getId()); | 100 | entity.setMinorId(minor.getId()); |
| @@ -74,5 +118,78 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements | @@ -74,5 +118,78 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements | ||
| 74 | minorMapper.deleteById(id); | 118 | minorMapper.deleteById(id); |
| 75 | } | 119 | } |
| 76 | } | 120 | } |
| 77 | - | 121 | + |
| 122 | + @Override | ||
| 123 | + public Integer insertBatch(List<Minor> list,List<SysDepart> departs) { | ||
| 124 | + updateStudentWithThreads(list); | ||
| 125 | + return list.size(); | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 将list集合平均分成几等份 | ||
| 130 | + * | ||
| 131 | + * @param num 分的份数 | ||
| 132 | + * @param list 需要分的集合 | ||
| 133 | + */ | ||
| 134 | + private List splitList(List list, Integer num) { | ||
| 135 | + int listSize = list.size(); //list 长度 | ||
| 136 | + List<List> splitLists = new ArrayList<>(); | ||
| 137 | + List stringlist = new ArrayList<>(); | ||
| 138 | + for ( int i = 0; i < listSize; i++ ) { | ||
| 139 | + stringlist.add(list.get(i)); | ||
| 140 | + if ( ((i + 1) % num == 0) || (i + 1 == listSize) ) { | ||
| 141 | + splitLists.add(stringlist); | ||
| 142 | + stringlist = new ArrayList<>(); | ||
| 143 | + } | ||
| 144 | + } | ||
| 145 | + return splitLists; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + private void addBatch(List<Minor> list, CountDownLatch threadLatch){ | ||
| 149 | + TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); | ||
| 150 | + System.out.println("子线程:" + Thread.currentThread().getName()); | ||
| 151 | + try { | ||
| 152 | + list.forEach(s -> { | ||
| 153 | + // 更新教师信息 | ||
| 154 | + // String teacher = s.getTeacher(); | ||
| 155 | + String newTeacher = "TNO_" + new Random().nextInt(100); | ||
| 156 | +// s.setTeacher(newTeacher); | ||
| 157 | + minorMapper.insert(s); | ||
| 158 | + }); | ||
| 159 | + dataSourceTransactionManager.commit(transactionStatus); | ||
| 160 | + threadLatch.countDown(); | ||
| 161 | + } catch (Throwable e) { | ||
| 162 | + e.printStackTrace(); | ||
| 163 | + dataSourceTransactionManager.rollback(transactionStatus); | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + | ||
| 168 | + public void updateStudentWithThreads(List<Minor> list) { | ||
| 169 | + // 线程数量 | ||
| 170 | + final Integer threadCount = 15; | ||
| 171 | + | ||
| 172 | + //每个线程处理的数据量 | ||
| 173 | + final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount; | ||
| 174 | + // 创建多线程处理任务 | ||
| 175 | + ExecutorService studentThreadPool = Executors.newFixedThreadPool(threadCount); | ||
| 176 | + CountDownLatch threadLatchs = new CountDownLatch(threadCount); | ||
| 177 | + | ||
| 178 | + for (int i = 0; i < threadCount; i++) { | ||
| 179 | + // 每个线程处理的数据 | ||
| 180 | + List<Minor> threadDatas = list.stream() | ||
| 181 | + .skip(i * dataPartionLength).limit(dataPartionLength).collect(Collectors.toList()); | ||
| 182 | + studentThreadPool.execute(() -> { | ||
| 183 | + addBatch(threadDatas, threadLatchs); | ||
| 184 | + }); | ||
| 185 | + } | ||
| 186 | + try { | ||
| 187 | + // 倒计时锁设置超时时间 30s | ||
| 188 | + threadLatchs.await(30, TimeUnit.SECONDS); | ||
| 189 | + } catch (Throwable e) { | ||
| 190 | + e.printStackTrace(); | ||
| 191 | + } | ||
| 192 | + | ||
| 193 | + System.out.println("主线程完成"); | ||
| 194 | + } | ||
| 78 | } | 195 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MrSchoolServiceImpl.java
| 1 | package org.jeecg.modules.system.service.impl; | 1 | package org.jeecg.modules.system.service.impl; |
| 2 | 2 | ||
| 3 | +import org.jeecg.modules.system.entity.Minor; | ||
| 3 | import org.jeecg.modules.system.entity.MrSchool; | 4 | import org.jeecg.modules.system.entity.MrSchool; |
| 5 | +import org.jeecg.modules.system.entity.SysDepart; | ||
| 4 | import org.jeecg.modules.system.mapper.MrSchoolMapper; | 6 | import org.jeecg.modules.system.mapper.MrSchoolMapper; |
| 5 | import org.jeecg.modules.system.service.IMrSchoolService; | 7 | import org.jeecg.modules.system.service.IMrSchoolService; |
| 8 | +import org.springframework.jdbc.datasource.DataSourceTransactionManager; | ||
| 6 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| 7 | 10 | ||
| 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 11 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 12 | +import org.springframework.transaction.TransactionDefinition; | ||
| 13 | +import org.springframework.transaction.TransactionStatus; | ||
| 14 | + | ||
| 15 | +import javax.annotation.Resource; | ||
| 16 | +import java.util.ArrayList; | ||
| 17 | +import java.util.List; | ||
| 18 | +import java.util.Random; | ||
| 19 | +import java.util.concurrent.CountDownLatch; | ||
| 20 | +import java.util.concurrent.ExecutorService; | ||
| 21 | +import java.util.concurrent.Executors; | ||
| 22 | +import java.util.concurrent.TimeUnit; | ||
| 23 | +import java.util.stream.Collectors; | ||
| 9 | 24 | ||
| 10 | /** | 25 | /** |
| 11 | * @Description: 学校 | 26 | * @Description: 学校 |
| @@ -16,4 +31,88 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | @@ -16,4 +31,88 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 16 | @Service | 31 | @Service |
| 17 | public class MrSchoolServiceImpl extends ServiceImpl<MrSchoolMapper, MrSchool> implements IMrSchoolService { | 32 | public class MrSchoolServiceImpl extends ServiceImpl<MrSchoolMapper, MrSchool> implements IMrSchoolService { |
| 18 | 33 | ||
| 34 | + @Resource | ||
| 35 | + private MrSchoolMapper schoolMapper; | ||
| 36 | + @Resource | ||
| 37 | + private DataSourceTransactionManager dataSourceTransactionManager; | ||
| 38 | + | ||
| 39 | + @Resource | ||
| 40 | + private TransactionDefinition transactionDefinition; | ||
| 41 | + | ||
| 42 | + //分段大小 | ||
| 43 | + private int splitSize = 100000; | ||
| 44 | + | ||
| 45 | + @Override | ||
| 46 | + public Integer insertBatch(List<MrSchool> list,List<SysDepart> departs) { | ||
| 47 | + updateStudentWithThreads(list); | ||
| 48 | + return list.size(); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 将list集合平均分成几等份 | ||
| 53 | + * | ||
| 54 | + * @param num 分的份数 | ||
| 55 | + * @param list 需要分的集合 | ||
| 56 | + */ | ||
| 57 | + private List splitList(List list, Integer num) { | ||
| 58 | + int listSize = list.size(); //list 长度 | ||
| 59 | + List<List> splitLists = new ArrayList<>(); | ||
| 60 | + List stringlist = new ArrayList<>(); | ||
| 61 | + for ( int i = 0; i < listSize; i++ ) { | ||
| 62 | + stringlist.add(list.get(i)); | ||
| 63 | + if ( ((i + 1) % num == 0) || (i + 1 == listSize) ) { | ||
| 64 | + splitLists.add(stringlist); | ||
| 65 | + stringlist = new ArrayList<>(); | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + return splitLists; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + private void addBatch(List<MrSchool> list, CountDownLatch threadLatch){ | ||
| 72 | + TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); | ||
| 73 | + System.out.println("子线程:" + Thread.currentThread().getName()); | ||
| 74 | + try { | ||
| 75 | + list.forEach(s -> { | ||
| 76 | + // 更新教师信息 | ||
| 77 | + // String teacher = s.getTeacher(); | ||
| 78 | + String newTeacher = "TNO_" + new Random().nextInt(100); | ||
| 79 | +// s.setTeacher(newTeacher); | ||
| 80 | + schoolMapper.insert(s); | ||
| 81 | + }); | ||
| 82 | + dataSourceTransactionManager.commit(transactionStatus); | ||
| 83 | + threadLatch.countDown(); | ||
| 84 | + } catch (Throwable e) { | ||
| 85 | + e.printStackTrace(); | ||
| 86 | + dataSourceTransactionManager.rollback(transactionStatus); | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + | ||
| 91 | + public void updateStudentWithThreads(List<MrSchool> list) { | ||
| 92 | + // 线程数量 | ||
| 93 | + final Integer threadCount = 15; | ||
| 94 | + | ||
| 95 | + //每个线程处理的数据量 | ||
| 96 | + final Integer dataPartionLength = (list.size() + threadCount - 1) / threadCount; | ||
| 97 | + // 创建多线程处理任务 | ||
| 98 | + ExecutorService studentThreadPool = Executors.newFixedThreadPool(threadCount); | ||
| 99 | + CountDownLatch threadLatchs = new CountDownLatch(threadCount); | ||
| 100 | + | ||
| 101 | + for (int i = 0; i < threadCount; i++) { | ||
| 102 | + // 每个线程处理的数据 | ||
| 103 | + List<MrSchool> threadDatas = list.stream() | ||
| 104 | + .skip(i * dataPartionLength).limit(dataPartionLength).collect(Collectors.toList()); | ||
| 105 | + studentThreadPool.execute(() -> { | ||
| 106 | + addBatch(threadDatas, threadLatchs); | ||
| 107 | + }); | ||
| 108 | + } | ||
| 109 | + try { | ||
| 110 | + // 倒计时锁设置超时时间 30s | ||
| 111 | + threadLatchs.await(30, TimeUnit.SECONDS); | ||
| 112 | + } catch (Throwable e) { | ||
| 113 | + e.printStackTrace(); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + System.out.println("主线程完成"); | ||
| 117 | + } | ||
| 19 | } | 118 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MzAdoptionServiceImpl.java
| @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | ||
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | import org.jeecg.modules.system.entity.MzAdoption; | 4 | import org.jeecg.modules.system.entity.MzAdoption; |
| 5 | +import org.jeecg.modules.system.mapper.HighSchoolMapper; | ||
| 5 | import org.jeecg.modules.system.mapper.MzAdoptionMapper; | 6 | import org.jeecg.modules.system.mapper.MzAdoptionMapper; |
| 6 | import org.jeecg.modules.system.service.IMzAdoptionService; | 7 | import org.jeecg.modules.system.service.IMzAdoptionService; |
| 7 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
| 8 | 9 | ||
| 10 | +import javax.annotation.Resource; | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 9 | /** | 13 | /** |
| 10 | * @Description: mz_adoption | 14 | * @Description: mz_adoption |
| 11 | * @Author: jeecg-boot | 15 | * @Author: jeecg-boot |
| @@ -14,5 +18,11 @@ import org.springframework.stereotype.Service; | @@ -14,5 +18,11 @@ import org.springframework.stereotype.Service; | ||
| 14 | */ | 18 | */ |
| 15 | @Service | 19 | @Service |
| 16 | public class MzAdoptionServiceImpl extends ServiceImpl<MzAdoptionMapper, MzAdoption> implements IMzAdoptionService { | 20 | public class MzAdoptionServiceImpl extends ServiceImpl<MzAdoptionMapper, MzAdoption> implements IMzAdoptionService { |
| 21 | + @Resource | ||
| 22 | + private MzAdoptionMapper adoptionMapper; | ||
| 17 | 23 | ||
| 24 | + @Override | ||
| 25 | + public List<String> getIdentityS() { | ||
| 26 | + return adoptionMapper.getIdentityS(); | ||
| 27 | + } | ||
| 18 | } | 28 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MzLeftBehindChildrenServiceImpl.java
| @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | ||
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | import org.jeecg.modules.system.entity.MzLeftBehindChildren; | 4 | import org.jeecg.modules.system.entity.MzLeftBehindChildren; |
| 5 | +import org.jeecg.modules.system.mapper.MzAdoptionMapper; | ||
| 5 | import org.jeecg.modules.system.mapper.MzLeftBehindChildrenMapper; | 6 | import org.jeecg.modules.system.mapper.MzLeftBehindChildrenMapper; |
| 6 | import org.jeecg.modules.system.service.IMzLeftBehindChildrenService; | 7 | import org.jeecg.modules.system.service.IMzLeftBehindChildrenService; |
| 7 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
| 8 | 9 | ||
| 10 | +import javax.annotation.Resource; | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 9 | /** | 13 | /** |
| 10 | * @Description: mz_left_behind_children | 14 | * @Description: mz_left_behind_children |
| 11 | * @Author: jeecg-boot | 15 | * @Author: jeecg-boot |
| @@ -15,4 +19,11 @@ import org.springframework.stereotype.Service; | @@ -15,4 +19,11 @@ import org.springframework.stereotype.Service; | ||
| 15 | @Service | 19 | @Service |
| 16 | public class MzLeftBehindChildrenServiceImpl extends ServiceImpl<MzLeftBehindChildrenMapper, MzLeftBehindChildren> implements IMzLeftBehindChildrenService { | 20 | public class MzLeftBehindChildrenServiceImpl extends ServiceImpl<MzLeftBehindChildrenMapper, MzLeftBehindChildren> implements IMzLeftBehindChildrenService { |
| 17 | 21 | ||
| 22 | + @Resource | ||
| 23 | + private MzLeftBehindChildrenMapper leftBehindChildrenMapper; | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public List<String> getIdentityS() { | ||
| 27 | + return leftBehindChildrenMapper.getIdentityS(); | ||
| 28 | + } | ||
| 18 | } | 29 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MzOrphanServiceImpl.java
| @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | ||
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | import org.jeecg.modules.system.entity.MzOrphan; | 4 | import org.jeecg.modules.system.entity.MzOrphan; |
| 5 | +import org.jeecg.modules.system.mapper.MzLeftBehindChildrenMapper; | ||
| 5 | import org.jeecg.modules.system.mapper.MzOrphanMapper; | 6 | import org.jeecg.modules.system.mapper.MzOrphanMapper; |
| 6 | import org.jeecg.modules.system.service.IMzOrphanService; | 7 | import org.jeecg.modules.system.service.IMzOrphanService; |
| 7 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
| 8 | 9 | ||
| 10 | +import javax.annotation.Resource; | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 9 | /** | 13 | /** |
| 10 | * @Description: mz_orphan | 14 | * @Description: mz_orphan |
| 11 | * @Author: jeecg-boot | 15 | * @Author: jeecg-boot |
| @@ -15,4 +19,11 @@ import org.springframework.stereotype.Service; | @@ -15,4 +19,11 @@ import org.springframework.stereotype.Service; | ||
| 15 | @Service | 19 | @Service |
| 16 | public class MzOrphanServiceImpl extends ServiceImpl<MzOrphanMapper, MzOrphan> implements IMzOrphanService { | 20 | public class MzOrphanServiceImpl extends ServiceImpl<MzOrphanMapper, MzOrphan> implements IMzOrphanService { |
| 17 | 21 | ||
| 22 | + @Resource | ||
| 23 | + private MzOrphanMapper orphanMapper; | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public List<String> getIdentityS() { | ||
| 27 | + return orphanMapper.getIdentityS(); | ||
| 28 | + } | ||
| 18 | } | 29 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MzUnsupportedServiceImpl.java
| @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | @@ -2,10 +2,14 @@ package org.jeecg.modules.system.service.impl; | ||
| 2 | 2 | ||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 4 | import org.jeecg.modules.system.entity.MzUnsupported; | 4 | import org.jeecg.modules.system.entity.MzUnsupported; |
| 5 | +import org.jeecg.modules.system.mapper.MzOrphanMapper; | ||
| 5 | import org.jeecg.modules.system.mapper.MzUnsupportedMapper; | 6 | import org.jeecg.modules.system.mapper.MzUnsupportedMapper; |
| 6 | import org.jeecg.modules.system.service.IMzUnsupportedService; | 7 | import org.jeecg.modules.system.service.IMzUnsupportedService; |
| 7 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
| 8 | 9 | ||
| 10 | +import javax.annotation.Resource; | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 9 | /** | 13 | /** |
| 10 | * @Description: mz_unsupported | 14 | * @Description: mz_unsupported |
| 11 | * @Author: jeecg-boot | 15 | * @Author: jeecg-boot |
| @@ -15,4 +19,11 @@ import org.springframework.stereotype.Service; | @@ -15,4 +19,11 @@ import org.springframework.stereotype.Service; | ||
| 15 | @Service | 19 | @Service |
| 16 | public class MzUnsupportedServiceImpl extends ServiceImpl<MzUnsupportedMapper, MzUnsupported> implements IMzUnsupportedService { | 20 | public class MzUnsupportedServiceImpl extends ServiceImpl<MzUnsupportedMapper, MzUnsupported> implements IMzUnsupportedService { |
| 17 | 21 | ||
| 22 | + @Resource | ||
| 23 | + private MzUnsupportedMapper unsupportedMapper; | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public List<String> getIdentityS() { | ||
| 27 | + return unsupportedMapper.getIdentityS(); | ||
| 28 | + } | ||
| 18 | } | 29 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/PrimarySchoolServiceImpl.java
| @@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | @@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 11 | 11 | ||
| 12 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
| 13 | import java.util.List; | 13 | import java.util.List; |
| 14 | +import java.util.Set; | ||
| 14 | 15 | ||
| 15 | /** | 16 | /** |
| 16 | * @Description: mr_primary_school | 17 | * @Description: mr_primary_school |
| @@ -21,10 +22,15 @@ import java.util.List; | @@ -21,10 +22,15 @@ import java.util.List; | ||
| 21 | @Service | 22 | @Service |
| 22 | public class PrimarySchoolServiceImpl extends ServiceImpl<PrimarySchoolMapper, PrimarySchool> implements IPrimarySchoolService { | 23 | public class PrimarySchoolServiceImpl extends ServiceImpl<PrimarySchoolMapper, PrimarySchool> implements IPrimarySchoolService { |
| 23 | @Resource | 24 | @Resource |
| 24 | - private HighSchoolMapper highSchoolMapper; | 25 | + private PrimarySchoolMapper primarySchoolMapper; |
| 25 | 26 | ||
| 26 | @Override | 27 | @Override |
| 27 | public List<MrSchool> getList() { | 28 | public List<MrSchool> getList() { |
| 28 | - return highSchoolMapper.getList(); | 29 | + return primarySchoolMapper.getList(); |
| 30 | + } | ||
| 31 | + | ||
| 32 | + @Override | ||
| 33 | + public Set<String> getIdentityS() { | ||
| 34 | + return primarySchoolMapper.getIdentityS(); | ||
| 29 | } | 35 | } |
| 30 | } | 36 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java
| @@ -549,6 +549,15 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart | @@ -549,6 +549,15 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart | ||
| 549 | return this.baseMapper.queryDeptByPid(pid); | 549 | return this.baseMapper.queryDeptByPid(pid); |
| 550 | } | 550 | } |
| 551 | /** | 551 | /** |
| 552 | + * 获取无pid的数据 | ||
| 553 | + * @return | ||
| 554 | + */ | ||
| 555 | + @Override | ||
| 556 | + public List<SysDepart> querySysDeparts() { | ||
| 557 | + return this.baseMapper.querySysDeparts(); | ||
| 558 | + } | ||
| 559 | + | ||
| 560 | + /** | ||
| 552 | * 根据关键字筛选部门信息 | 561 | * 根据关键字筛选部门信息 |
| 553 | * @param keyWord | 562 | * @param keyWord |
| 554 | * @return | 563 | * @return |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/IDNumberUtil.java
| @@ -22,26 +22,32 @@ public class IDNumberUtil { | @@ -22,26 +22,32 @@ public class IDNumberUtil { | ||
| 22 | * @return | 22 | * @return |
| 23 | */ | 23 | */ |
| 24 | public static String judgeGender(String idNumber) throws IllegalArgumentException{ | 24 | public static String judgeGender(String idNumber) throws IllegalArgumentException{ |
| 25 | - System.out.println(idNumber.length()); | ||
| 26 | - if(idNumber.length() != 18 && idNumber.length() != 15){ | ||
| 27 | - throw new IllegalArgumentException("身份证号长度错误"); | ||
| 28 | - } | ||
| 29 | - int gender = 0; | ||
| 30 | - if(idNumber.length() == 18){ | ||
| 31 | - //如果身份证号18位,取身份证号倒数第二位 | ||
| 32 | - char c = idNumber.charAt(idNumber.length() - 2); | ||
| 33 | - gender = Integer.parseInt(String.valueOf(c)); | ||
| 34 | - }else{ | ||
| 35 | - //如果身份证号15位,取身份证号最后一位 | ||
| 36 | - char c = idNumber.charAt(idNumber.length() - 1); | ||
| 37 | - gender = Integer.parseInt(String.valueOf(c)); | 25 | + String genderStr="1"; |
| 26 | + try { | ||
| 27 | +// System.out.println(idNumber.length()); | ||
| 28 | + if(checkID(idNumber)) { | ||
| 29 | + int gender = 1; | ||
| 30 | + if(idNumber.length() == 18){ | ||
| 31 | + //如果身份证号18位,取身份证号倒数第二位 | ||
| 32 | + char c = idNumber.charAt(idNumber.length() - 2); | ||
| 33 | + gender = Integer.parseInt(String.valueOf(c)); | ||
| 34 | + }else{ | ||
| 35 | + //如果身份证号15位,取身份证号最后一位 | ||
| 36 | + char c = idNumber.charAt(idNumber.length() - 1); | ||
| 37 | + gender = Integer.parseInt(String.valueOf(c)); | ||
| 38 | + } | ||
| 39 | +// System.out.println("gender = " + gender); | ||
| 40 | + if(gender % 2 == 1){ | ||
| 41 | + genderStr= "1"; | ||
| 42 | + }else{ | ||
| 43 | + genderStr= "2"; | ||
| 44 | + } | ||
| 38 | } | 45 | } |
| 39 | - System.out.println("gender = " + gender); | ||
| 40 | - if(gender % 2 == 1){ | ||
| 41 | - return "男"; | ||
| 42 | - }else{ | ||
| 43 | - return "女"; | 46 | + } catch (Exception e) { |
| 47 | + e.printStackTrace(); | ||
| 44 | } | 48 | } |
| 49 | + | ||
| 50 | + return genderStr; | ||
| 45 | } | 51 | } |
| 46 | /** | 52 | /** |
| 47 | * 根据身份证的号码算出当前身份证持有者的年龄 | 53 | * 根据身份证的号码算出当前身份证持有者的年龄 |
| @@ -49,43 +55,85 @@ public class IDNumberUtil { | @@ -49,43 +55,85 @@ public class IDNumberUtil { | ||
| 49 | * @return | 55 | * @return |
| 50 | */ | 56 | */ |
| 51 | public static int countAge(String idNumber) { | 57 | public static int countAge(String idNumber) { |
| 52 | - if(idNumber.length() != 18 && idNumber.length() != 15){ | ||
| 53 | - throw new IllegalArgumentException("身份证号长度错误"); | ||
| 54 | - } | ||
| 55 | - String year; | ||
| 56 | - String yue; | ||
| 57 | - String day; | ||
| 58 | - if(idNumber.length() == 18){ | ||
| 59 | - year = idNumber.substring(6).substring(0, 4);// 得到年份 | ||
| 60 | - yue = idNumber.substring(10).substring(0, 2);// 得到月份 | ||
| 61 | - day = idNumber.substring(12).substring(0,2);//得到日 | ||
| 62 | - }else{ | ||
| 63 | - year = "19" + idNumber.substring(6, 8);// 年份 | ||
| 64 | - yue = idNumber.substring(8, 10);// 月份 | ||
| 65 | - day = idNumber.substring(10, 12);//日 | ||
| 66 | - } | ||
| 67 | - Date date = new Date();// 得到当前的系统时间 | ||
| 68 | - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 69 | - String fyear = format.format(date).substring(0, 4);// 当前年份 | ||
| 70 | - String fyue = format.format(date).substring(5, 7);// 月份 | ||
| 71 | - String fday=format.format(date).substring(8,10);// | ||
| 72 | int age = 0; | 58 | int age = 0; |
| 73 | - if(Integer.parseInt(yue) == Integer.parseInt(fyue)){//如果月份相同 | ||
| 74 | - if(Integer.parseInt(day) <= Integer.parseInt(fday)){//说明已经过了生日或者今天是生日 | ||
| 75 | - age = Integer.parseInt(fyear) - Integer.parseInt(year); | 59 | + String genderStr="1"; |
| 60 | + try { | ||
| 61 | + if(checkID(idNumber)) { | ||
| 62 | + String year; | ||
| 63 | + String yue; | ||
| 64 | + String day; | ||
| 65 | + if(idNumber.length() == 18){ | ||
| 66 | + year = idNumber.substring(6).substring(0, 4);// 得到年份 | ||
| 67 | + yue = idNumber.substring(10).substring(0, 2);// 得到月份 | ||
| 68 | + day = idNumber.substring(12).substring(0,2);//得到日 | ||
| 69 | + }else{ | ||
| 70 | + year = "19" + idNumber.substring(6, 8);// 年份 | ||
| 71 | + yue = idNumber.substring(8, 10);// 月份 | ||
| 72 | + day = idNumber.substring(10, 12);//日 | ||
| 76 | } | 73 | } |
| 77 | - }else{ | 74 | + Date date = new Date();// 得到当前的系统时间 |
| 75 | + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 76 | + String fyear = format.format(date).substring(0, 4);// 当前年份 | ||
| 77 | + String fyue = format.format(date).substring(5, 7);// 月份 | ||
| 78 | + String fday=format.format(date).substring(8,10);// | ||
| 78 | 79 | ||
| 79 | - if(Integer.parseInt(yue) < Integer.parseInt(fyue)){ | ||
| 80 | - //如果当前月份大于出生月份 | ||
| 81 | - age = Integer.parseInt(fyear) - Integer.parseInt(year); | 80 | + if(Integer.parseInt(yue) == Integer.parseInt(fyue)){//如果月份相同 |
| 81 | + if(Integer.parseInt(day) <= Integer.parseInt(fday)){//说明已经过了生日或者今天是生日 | ||
| 82 | + age = Integer.parseInt(fyear) - Integer.parseInt(year); | ||
| 83 | + } | ||
| 82 | }else{ | 84 | }else{ |
| 83 | - //如果当前月份小于出生月份,说明生日还没过 | ||
| 84 | - age = Integer.parseInt(fyear) - Integer.parseInt(year) - 1; | 85 | + |
| 86 | + if(Integer.parseInt(yue) < Integer.parseInt(fyue)){ | ||
| 87 | + //如果当前月份大于出生月份 | ||
| 88 | + age = Integer.parseInt(fyear) - Integer.parseInt(year); | ||
| 89 | + }else{ | ||
| 90 | + //如果当前月份小于出生月份,说明生日还没过 | ||
| 91 | + age = Integer.parseInt(fyear) - Integer.parseInt(year) - 1; | ||
| 92 | + } | ||
| 85 | } | 93 | } |
| 86 | } | 94 | } |
| 87 | - System.out.println("age = " + age); | 95 | + |
| 96 | +// System.out.println("出生年月 = " + year+yue+day); | ||
| 97 | +// System.out.println("age = " + age); | ||
| 98 | + } catch (Exception e) { | ||
| 99 | + e.printStackTrace(); | ||
| 100 | + } | ||
| 88 | return age; | 101 | return age; |
| 89 | } | 102 | } |
| 90 | 103 | ||
| 104 | + public static boolean checkID(String s) { | ||
| 105 | + //空参判断,保证程序健壮性 | ||
| 106 | + if (s == null) { | ||
| 107 | + return false; | ||
| 108 | + } | ||
| 109 | + //判断长度 | ||
| 110 | + if (s.length() != 18 && s.length() != 15) { | ||
| 111 | + return false; | ||
| 112 | + } | ||
| 113 | + //public boolean startsWith(String prefix) | ||
| 114 | + //测试此字符串是否以指定的前缀开头。 | ||
| 115 | + if (s.startsWith("0")) { | ||
| 116 | + return false; | ||
| 117 | + } | ||
| 118 | + //遍历字符串 | ||
| 119 | + for (int i = 0; i < s.length(); i++) { | ||
| 120 | + //获取遍历字符 | ||
| 121 | + char ch = s.charAt(i); | ||
| 122 | + //最后一位的校验 | ||
| 123 | + if (i == s.length() - 1) { | ||
| 124 | + //优化程序,改变逻辑判断 | ||
| 125 | + if (ch < '0' || ch > '9' && ch != 'X') { | ||
| 126 | + return false; | ||
| 127 | + } | ||
| 128 | + } else {//其他位的校验 | ||
| 129 | + if (ch < '0' || ch > '9') { | ||
| 130 | + return false; | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | + //以上都不符合,返回true | ||
| 135 | + return true; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + | ||
| 91 | } | 139 | } |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/TaskThreadQuery.java
0 → 100644
| 1 | +package org.jeecg.modules.system.util; | ||
| 2 | + | ||
| 3 | +import org.jeecg.modules.system.entity.Family; | ||
| 4 | +import org.jeecg.modules.system.service.IGaDemographicService; | ||
| 5 | + | ||
| 6 | +import javax.annotation.Resource; | ||
| 7 | +import java.util.List; | ||
| 8 | +import java.util.concurrent.Callable; | ||
| 9 | + | ||
| 10 | +public class TaskThreadQuery implements Callable<List<Family>> { | ||
| 11 | + | ||
| 12 | + @Resource | ||
| 13 | + private IGaDemographicService gaDemographicService; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + private int offset; | ||
| 17 | + private int rows; | ||
| 18 | + | ||
| 19 | + public TaskThreadQuery(IGaDemographicService gaDemographicService,int offset,int rows){ | ||
| 20 | + this.gaDemographicService = gaDemographicService; | ||
| 21 | + this.offset = offset; | ||
| 22 | + this.rows = rows; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public List<Family> call() throws Exception { | ||
| 27 | + List<Family> list = gaDemographicService.queryPageList(offset,rows); | ||
| 28 | + if (list != null && list.size() > 0){ | ||
| 29 | + return list; | ||
| 30 | + } | ||
| 31 | + return null; | ||
| 32 | + } | ||
| 33 | +} | ||
| 0 | \ No newline at end of file | 34 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/MinorPage.java
| @@ -46,62 +46,69 @@ public class MinorPage { | @@ -46,62 +46,69 @@ public class MinorPage { | ||
| 46 | @ApiModelProperty(value = "所属部门") | 46 | @ApiModelProperty(value = "所属部门") |
| 47 | @Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id") | 47 | @Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id") |
| 48 | private String sysOrgCode; | 48 | private String sysOrgCode; |
| 49 | + /**户号*/ | ||
| 50 | + @Excel(name = "户号", width = 25,needMerge=true) | ||
| 51 | + @ApiModelProperty(value = "户号") | ||
| 52 | + private String householdNum; | ||
| 53 | + /**人员编号*/ | ||
| 54 | + @Excel(name = "人员编号", width = 25,needMerge=true) | ||
| 55 | + @ApiModelProperty(value = "人员编号") | ||
| 56 | + private String number; | ||
| 49 | /**姓名*/ | 57 | /**姓名*/ |
| 50 | - @Excel(name = "姓名", width = 15) | 58 | + @Excel(name = "姓名", width = 15,needMerge=true) |
| 51 | @ApiModelProperty(value = "姓名") | 59 | @ApiModelProperty(value = "姓名") |
| 52 | private String name; | 60 | private String name; |
| 53 | /**性别*/ | 61 | /**性别*/ |
| 54 | - @Excel(name = "性别", width = 15,dicCode = "sex") | 62 | + @Excel(name = "性别", width = 15,dicCode = "sex",needMerge=true) |
| 55 | @ApiModelProperty(value = "性别") | 63 | @ApiModelProperty(value = "性别") |
| 56 | @Dict(dicCode = "sex") | 64 | @Dict(dicCode = "sex") |
| 57 | private Integer gender; | 65 | private Integer gender; |
| 66 | + /**身份证号*/ | ||
| 67 | + @Excel(name = "身份证号", width = 20,needMerge=true) | ||
| 68 | + @ApiModelProperty(value = "身份证号") | ||
| 69 | + private String identity; | ||
| 58 | /**家庭住址*/ | 70 | /**家庭住址*/ |
| 59 | - @Excel(name = "家庭住址", width = 15) | 71 | + @Excel(name = "家庭住址", width = 20,needMerge=true) |
| 60 | @ApiModelProperty(value = "家庭住址") | 72 | @ApiModelProperty(value = "家庭住址") |
| 61 | private String address; | 73 | private String address; |
| 62 | - /**身份证号*/ | ||
| 63 | - @Excel(name = "身份证号", width = 15) | ||
| 64 | - @ApiModelProperty(value = "身份证号") | ||
| 65 | - private String identity; | ||
| 66 | - /**重点关注原因*/ | ||
| 67 | - @Excel(name = "重点关注原因", width = 15) | ||
| 68 | - @ApiModelProperty(value = "重点关注原因") | ||
| 69 | - private String reason; | ||
| 70 | - /**备注*/ | ||
| 71 | - @Excel(name = "备注", width = 15) | ||
| 72 | - @ApiModelProperty(value = "备注") | ||
| 73 | - private String remark; | ||
| 74 | - | ||
| 75 | /** | 74 | /** |
| 76 | * 监护人 | 75 | * 监护人 |
| 77 | */ | 76 | */ |
| 78 | - @Excel(name = "监护人", width = 15) | 77 | + @Excel(name = "监护人", width = 15,needMerge=true) |
| 79 | @ApiModelProperty(value = "监护人") | 78 | @ApiModelProperty(value = "监护人") |
| 80 | private String guardian; | 79 | private String guardian; |
| 81 | 80 | ||
| 82 | - /**是否失学*/ | ||
| 83 | - @Excel(name = "是否失学", width = 15,dicCode = "school_status") | ||
| 84 | - @ApiModelProperty(value = "是否失学") | ||
| 85 | - @Dict(dicCode = "school_status") | ||
| 86 | - private Integer school; | ||
| 87 | - | ||
| 88 | /** | 81 | /** |
| 89 | * 监护人关系 | 82 | * 监护人关系 |
| 90 | */ | 83 | */ |
| 91 | - @Excel(name = "监护人关系", width = 15) | 84 | + @Excel(name = "监护人关系", width = 15,needMerge=true) |
| 92 | @ApiModelProperty(value = "监护人关系") | 85 | @ApiModelProperty(value = "监护人关系") |
| 93 | private String relation; | 86 | private String relation; |
| 94 | - | ||
| 95 | - /**人员编号*/ | ||
| 96 | - @Excel(name = "人员编号", width = 15) | ||
| 97 | - @ApiModelProperty(value = "人员编号") | ||
| 98 | - private String number; | ||
| 99 | - | ||
| 100 | - /**户号*/ | ||
| 101 | - @Excel(name = "户号", width = 15) | ||
| 102 | - @ApiModelProperty(value = "户号") | ||
| 103 | - private String householdNum; | ||
| 104 | - | 87 | + /**是否失学*/ |
| 88 | + @Excel(name = "是否失学", width = 10,dicCode = "school_status",needMerge=true) | ||
| 89 | + @ApiModelProperty(value = "是否失学") | ||
| 90 | + @Dict(dicCode = "school_status") | ||
| 91 | + private Integer school; | ||
| 92 | + /**学校名称*/ | ||
| 93 | + @Excel(name = "学校名称", width = 15,needMerge=true) | ||
| 94 | + @ApiModelProperty(value = "学校名称") | ||
| 95 | + private String schoolName; | ||
| 96 | + @Excel(name = "入学年份", width = 15) | ||
| 97 | + @ApiModelProperty(value = "入学年份") | ||
| 98 | + private String startYear; | ||
| 99 | + /**重点关注原因*/ | ||
| 100 | + @Excel(name = "重点关注原因", width = 15,dicCode = "attention_reason") | ||
| 101 | + @ApiModelProperty(value = "重点关注原因") | ||
| 102 | + @Dict(dicCode = "attention_reason") | ||
| 103 | + private Integer reason; | ||
| 104 | + /**特殊原因*/ | ||
| 105 | + @Excel(name = "特殊原因", width = 15) | ||
| 106 | + @ApiModelProperty(value = "特殊原因") | ||
| 107 | + private String specialReason; | ||
| 108 | + /**备注*/ | ||
| 109 | + @Excel(name = "备注", width = 25,needMerge=true) | ||
| 110 | + @ApiModelProperty(value = "备注") | ||
| 111 | + private String remark; | ||
| 105 | @ExcelCollection(name="家庭成员表") | 112 | @ExcelCollection(name="家庭成员表") |
| 106 | @ApiModelProperty(value = "家庭成员表") | 113 | @ApiModelProperty(value = "家庭成员表") |
| 107 | private List<Family> familyList; | 114 | private List<Family> familyList; |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml
| @@ -131,11 +131,11 @@ spring: | @@ -131,11 +131,11 @@ spring: | ||
| 131 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 | 131 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 |
| 132 | datasource: | 132 | datasource: |
| 133 | master: | 133 | master: |
| 134 | - url: jdbc:mysql://192.168.1.201:3306/mx-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | 134 | + url: jdbc:mysql://192.168.1.201:3306/juvenile-prosecution?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai |
| 135 | username: root | 135 | username: root |
| 136 | password: mx123456 | 136 | password: mx123456 |
| 137 | driver-class-name: com.mysql.cj.jdbc.Driver | 137 | driver-class-name: com.mysql.cj.jdbc.Driver |
| 138 | - # 多数据源配置 | 138 | + # 多数据源配置juvenile-prosecution |
| 139 | #multi-datasource1: | 139 | #multi-datasource1: |
| 140 | #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | 140 | #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai |
| 141 | #username: root | 141 | #username: root |
| @@ -167,7 +167,7 @@ mybatis-plus: | @@ -167,7 +167,7 @@ mybatis-plus: | ||
| 167 | table-underline: true | 167 | table-underline: true |
| 168 | configuration: | 168 | configuration: |
| 169 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 | 169 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 |
| 170 | - #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | 170 | +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| 171 | # 返回类型为Map,显示null对应的字段 | 171 | # 返回类型为Map,显示null对应的字段 |
| 172 | call-setters-on-nulls: true | 172 | call-setters-on-nulls: true |
| 173 | #jeecg专用配置 | 173 | #jeecg专用配置 |
juvenile-prosecution-boot/jeecg-boot-module-system/target/classes/application-dev.yml
| @@ -131,11 +131,11 @@ spring: | @@ -131,11 +131,11 @@ spring: | ||
| 131 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 | 131 | connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 |
| 132 | datasource: | 132 | datasource: |
| 133 | master: | 133 | master: |
| 134 | - url: jdbc:mysql://192.168.1.201:3306/mx-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | 134 | + url: jdbc:mysql://192.168.1.201:3306/juvenile-prosecution?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai |
| 135 | username: root | 135 | username: root |
| 136 | password: mx123456 | 136 | password: mx123456 |
| 137 | driver-class-name: com.mysql.cj.jdbc.Driver | 137 | driver-class-name: com.mysql.cj.jdbc.Driver |
| 138 | - # 多数据源配置 | 138 | + # 多数据源配置juvenile-prosecution |
| 139 | #multi-datasource1: | 139 | #multi-datasource1: |
| 140 | #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | 140 | #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai |
| 141 | #username: root | 141 | #username: root |
| @@ -167,7 +167,7 @@ mybatis-plus: | @@ -167,7 +167,7 @@ mybatis-plus: | ||
| 167 | table-underline: true | 167 | table-underline: true |
| 168 | configuration: | 168 | configuration: |
| 169 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 | 169 | # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 |
| 170 | - #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | 170 | +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| 171 | # 返回类型为Map,显示null对应的字段 | 171 | # 返回类型为Map,显示null对应的字段 |
| 172 | call-setters-on-nulls: true | 172 | call-setters-on-nulls: true |
| 173 | #jeecg专用配置 | 173 | #jeecg专用配置 |
juvenile-prosecution-boot/jeecg-boot-module-system/target/classes/org/jeecg/modules/system/mapper/SysDepartMapper.class
No preview for this file type
juvenile-prosecution-boot/jeecg-boot-module-system/target/classes/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml
| @@ -51,4 +51,8 @@ | @@ -51,4 +51,8 @@ | ||
| 51 | <select id="queryCompByOrgCode" resultType="org.jeecg.modules.system.entity.SysDepart"> | 51 | <select id="queryCompByOrgCode" resultType="org.jeecg.modules.system.entity.SysDepart"> |
| 52 | select * from sys_depart where del_flag = '0' and org_category='1' and org_code= #{orgCode,jdbcType=VARCHAR} | 52 | select * from sys_depart where del_flag = '0' and org_category='1' and org_code= #{orgCode,jdbcType=VARCHAR} |
| 53 | </select> | 53 | </select> |
| 54 | + | ||
| 55 | + <select id="querySysDeparts" parameterType="String" resultType="org.jeecg.modules.system.entity.SysDepart"> | ||
| 56 | + SELECT * FROM sys_depart WHERE parent_id !=''; | ||
| 57 | + </select> | ||
| 54 | </mapper> | 58 | </mapper> |
| 55 | \ No newline at end of file | 59 | \ No newline at end of file |
juvenile-prosecution-boot/jeecg-boot-module-system/target/classes/org/jeecg/modules/system/service/ISysDepartService.class
No preview for this file type
juvenile-prosecution-boot/jeecg-boot-module-system/target/classes/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.class
No preview for this file type
juvenile-prosecution-vue/src/utils/util.js
| @@ -568,6 +568,7 @@ export function removeArrayElement(array, prod, value) { | @@ -568,6 +568,7 @@ export function removeArrayElement(array, prod, value) { | ||
| 568 | * @constructor | 568 | * @constructor |
| 569 | */ | 569 | */ |
| 570 | export function GetAge(identityCard) { | 570 | export function GetAge(identityCard) { |
| 571 | + console.log(identityCard) | ||
| 571 | var len = (identityCard + "").length; | 572 | var len = (identityCard + "").length; |
| 572 | if (len == 0) { | 573 | if (len == 0) { |
| 573 | return 0; | 574 | return 0; |
| @@ -589,6 +590,8 @@ export function GetAge(identityCard) { | @@ -589,6 +590,8 @@ export function GetAge(identityCard) { | ||
| 589 | var birthDate = new Date(strBirthday); | 590 | var birthDate = new Date(strBirthday); |
| 590 | var nowDateTime = new Date(); | 591 | var nowDateTime = new Date(); |
| 591 | var age = nowDateTime.getFullYear() - birthDate.getFullYear(); | 592 | var age = nowDateTime.getFullYear() - birthDate.getFullYear(); |
| 593 | + console.log(nowDateTime.getFullYear()) | ||
| 594 | + console.log(birthDate.getFullYear()) | ||
| 592 | //再考虑月、天的因素;.getMonth()获取的是从0开始的,这里进行比较,不需要加1 | 595 | //再考虑月、天的因素;.getMonth()获取的是从0开始的,这里进行比较,不需要加1 |
| 593 | if (nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() == birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate())) { | 596 | if (nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() == birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate())) { |
| 594 | age--; | 597 | age--; |
juvenile-prosecution-vue/src/views/business/MinorList.vue
| @@ -17,16 +17,22 @@ | @@ -17,16 +17,22 @@ | ||
| 17 | </a-row> | 17 | </a-row> |
| 18 | </a-form> | 18 | </a-form> |
| 19 | 19 | ||
| 20 | - <a-button @click="handleAdd" type="primary" icon="plus" >新增</a-button> | ||
| 21 | - <a-button type="primary" icon="download" @click="handleExportXls('未成年人')" style="margin-left:8px;">导出</a-button> | ||
| 22 | - <a-upload style="margin-left:8px;" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | 20 | + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| 21 | + <a-button type="primary" icon="download" @click="handleExportXls('未检人员模板')" style="margin-left:8px;">模板导出</a-button> | ||
| 22 | + <a-upload style="margin-left:8px;" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" | ||
| 23 | + :action="importExcelUrl" @change="handleImportExcel"> | ||
| 23 | <a-button type="primary" icon="import">导入</a-button> | 24 | <a-button type="primary" icon="import">导入</a-button> |
| 24 | </a-upload> | 25 | </a-upload> |
| 25 | <a-dropdown v-if="selectedRowKeys.length > 0" style="margin-left:8px;"> | 26 | <a-dropdown v-if="selectedRowKeys.length > 0" style="margin-left:8px;"> |
| 26 | <a-menu slot="overlay"> | 27 | <a-menu slot="overlay"> |
| 27 | - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | 28 | + <a-menu-item key="1" @click="batchDel"> |
| 29 | + <a-icon type="delete" /> | ||
| 30 | + 删除 | ||
| 31 | + </a-menu-item> | ||
| 28 | </a-menu> | 32 | </a-menu> |
| 29 | - <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | 33 | + <a-button style="margin-left: 8px"> 批量操作 |
| 34 | + <a-icon type="down" /> | ||
| 35 | + </a-button> | ||
| 30 | </a-dropdown> | 36 | </a-dropdown> |
| 31 | </div> | 37 | </div> |
| 32 | <!-- 查询区域-END --> | 38 | <!-- 查询区域-END --> |
| @@ -34,7 +40,8 @@ | @@ -34,7 +40,8 @@ | ||
| 34 | <!-- table区域-begin --> | 40 | <!-- table区域-begin --> |
| 35 | <div> | 41 | <div> |
| 36 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;margin-top: 16px;"> | 42 | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;margin-top: 16px;"> |
| 37 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | 43 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a |
| 44 | + style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | ||
| 38 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> | 45 | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
| 39 | </div> | 46 | </div> |
| 40 | 47 | ||
| @@ -51,179 +58,295 @@ | @@ -51,179 +58,295 @@ | ||
| 51 | :loading="loading" | 58 | :loading="loading" |
| 52 | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 59 | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| 53 | @change="handleTableChange"> | 60 | @change="handleTableChange"> |
| 54 | - | ||
| 55 | - <template slot="htmlSlot" slot-scope="text"> | ||
| 56 | - <div v-html="text"></div> | ||
| 57 | - </template> | ||
| 58 | - <template slot="imgSlot" slot-scope="text"> | ||
| 59 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | ||
| 60 | - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | ||
| 61 | - </template> | ||
| 62 | - <template slot="fileSlot" slot-scope="text"> | ||
| 63 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | ||
| 64 | - <a-button | ||
| 65 | - v-else | ||
| 66 | - :ghost="true" | ||
| 67 | - type="primary" | ||
| 68 | - icon="download" | ||
| 69 | - size="small" | ||
| 70 | - @click="downloadFile(text)"> | ||
| 71 | - 下载 | ||
| 72 | - </a-button> | ||
| 73 | - </template> | ||
| 74 | - | 61 | + <span slot="longText" slot-scope="text,record"> |
| 62 | + <j-ellipsis :value="text" :length="18" /> | ||
| 63 | + </span> | ||
| 75 | <span slot="action" slot-scope="text, record"> | 64 | <span slot="action" slot-scope="text, record"> |
| 76 | <a @click="handleEdit(record)">编辑</a> | 65 | <a @click="handleEdit(record)">编辑</a> |
| 77 | - | ||
| 78 | <a-divider type="vertical" /> | 66 | <a-divider type="vertical" /> |
| 79 | - <a-dropdown> | ||
| 80 | - <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | ||
| 81 | - <a-menu slot="overlay"> | ||
| 82 | - <a-menu-item> | ||
| 83 | - <a @click="handleDetail(record)">详情</a> | ||
| 84 | - </a-menu-item> | ||
| 85 | - <a-menu-item> | ||
| 86 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | ||
| 87 | - <a>删除</a> | ||
| 88 | - </a-popconfirm> | ||
| 89 | - </a-menu-item> | ||
| 90 | - </a-menu> | ||
| 91 | - </a-dropdown> | 67 | + <a @click="handleDetail(record)">查看</a> |
| 92 | </span> | 68 | </span> |
| 93 | - | ||
| 94 | </a-table> | 69 | </a-table> |
| 95 | </div> | 70 | </div> |
| 96 | 71 | ||
| 97 | - <minor-modal ref="modalForm" @ok="modalFormOk"/> | 72 | + <minor-modal ref="modalForm" @ok="modalFormOk" /> |
| 73 | + <!-- 详情 --> | ||
| 74 | + <a-modal v-model:visible="infoVisible" title="未成年信息" :footer=null :width="1000"> | ||
| 75 | + <a-descriptions bordered layout="vertical" :column="4"> | ||
| 76 | + <a-descriptions-item label="户号">{{ info.householdNum }}</a-descriptions-item> | ||
| 77 | + <a-descriptions-item label="人员编号">{{ info.number }}</a-descriptions-item> | ||
| 78 | + <a-descriptions-item label="姓名">{{ info.name }}</a-descriptions-item> | ||
| 79 | + <a-descriptions-item label="性别">{{ info.gender_dictText }}</a-descriptions-item> | ||
| 80 | + <a-descriptions-item label="年龄">{{ getAgeByIdentity(info.identity) }}</a-descriptions-item> | ||
| 81 | + <a-descriptions-item label="身份证号">{{ info.identity }}</a-descriptions-item> | ||
| 82 | + <a-descriptions-item label="家庭住址" :span="2">{{ info.address }}</a-descriptions-item> | ||
| 83 | + <a-descriptions-item label="是否失学">{{ info.school_dictText }}</a-descriptions-item> | ||
| 84 | + <a-descriptions-item label="学校名称">{{ info.schoolName }}</a-descriptions-item> | ||
| 85 | + <a-descriptions-item label="监护人">{{ info.guardian }}</a-descriptions-item> | ||
| 86 | + <a-descriptions-item label="监护人关系">{{ info.relation }}</a-descriptions-item> | ||
| 87 | + <a-descriptions-item label="重点关注原因" :span="4">{{ info.reason_dictText }}</a-descriptions-item> | ||
| 88 | + <a-descriptions-item label="备注" :span="4">{{ info.remark }}</a-descriptions-item> | ||
| 89 | + </a-descriptions> | ||
| 90 | + <a-tabs v-model:activeKey="activeKey"> | ||
| 91 | + <a-tab-pane key="1" tab="家庭成员"> | ||
| 92 | + <a-table bordered :columns="familyColumns" :data-source="familyDatas" :scroll="{ x: true }" rowKey="id" :pagination="familyPagination"> | ||
| 93 | + <span slot="longText" slot-scope="text,record"> | ||
| 94 | + <j-ellipsis :value="text" :length="18" /> | ||
| 95 | + </span> | ||
| 96 | + </a-table> | ||
| 97 | + </a-tab-pane> | ||
| 98 | + </a-tabs> | ||
| 99 | + </a-modal> | ||
| 98 | </a-card> | 100 | </a-card> |
| 99 | </template> | 101 | </template> |
| 100 | 102 | ||
| 101 | <script> | 103 | <script> |
| 102 | 104 | ||
| 103 | - import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
| 104 | - import { GetAge } from '@/utils/util' | ||
| 105 | - import MinorModal from './modules/MinorModal' | ||
| 106 | - import '@/assets/less/TableExpand.less' | 105 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| 106 | +import { GetAge } from '@/utils/util' | ||
| 107 | +import MinorModal from './modules/MinorModal' | ||
| 108 | +import '@/assets/less/TableExpand.less' | ||
| 109 | +import { getAction } from '@api/manage' | ||
| 110 | +import { FormTypes } from '@/utils/JEditableTableUtil' | ||
| 111 | +//引入JS方法 | ||
| 112 | +import { filterDictTextByCache } from '@/components/dict/JDictSelectUtil' | ||
| 107 | 113 | ||
| 108 | - export default { | ||
| 109 | - name: "MinorList", | ||
| 110 | - mixins:[JeecgListMixin], | ||
| 111 | - components: { | ||
| 112 | - MinorModal | ||
| 113 | - }, | ||
| 114 | - data () { | ||
| 115 | - return { | ||
| 116 | - description: '未成年人管理页面', | ||
| 117 | - // 表头 | ||
| 118 | - columns: [ | ||
| 119 | - { | ||
| 120 | - title: '序号', | ||
| 121 | - dataIndex: '', | ||
| 122 | - key:'rowIndex', | ||
| 123 | - width:60, | ||
| 124 | - align:"center", | ||
| 125 | - customRender:function (t,r,index) { | ||
| 126 | - return parseInt(index)+1; | ||
| 127 | - } | ||
| 128 | - }, | ||
| 129 | - { | ||
| 130 | - title:'姓名', | ||
| 131 | - align:"center", | ||
| 132 | - dataIndex: 'name' | ||
| 133 | - }, | ||
| 134 | - { | ||
| 135 | - title:'年龄', | ||
| 136 | - align:"center", | ||
| 137 | - dataIndex: 'age', | ||
| 138 | - customRender:function (text, record) { | ||
| 139 | - return !text? GetAge:0 | ||
| 140 | - } | ||
| 141 | - }, | ||
| 142 | - { | ||
| 143 | - title:'性别', | ||
| 144 | - align:"center", | ||
| 145 | - dataIndex: 'gender_dictText' | ||
| 146 | - }, | ||
| 147 | - { | ||
| 148 | - title:'是否失学', | ||
| 149 | - align:"center", | ||
| 150 | - dataIndex: 'school_dictText' | ||
| 151 | - }, | ||
| 152 | - { | ||
| 153 | - title:'家庭住址', | ||
| 154 | - align:"center", | ||
| 155 | - dataIndex: 'address' | ||
| 156 | - }, | ||
| 157 | - { | ||
| 158 | - title:'身份证号', | ||
| 159 | - align:"center", | ||
| 160 | - dataIndex: 'identity' | ||
| 161 | - }, | ||
| 162 | - { | ||
| 163 | - title:'监护人关系', | ||
| 164 | - align:"center", | ||
| 165 | - dataIndex: 'relation' | ||
| 166 | - }, | ||
| 167 | - { | ||
| 168 | - title:'监护人', | ||
| 169 | - align:"center", | ||
| 170 | - dataIndex: 'guardian' | ||
| 171 | - }, | ||
| 172 | - { | ||
| 173 | - title:'重点关注原因', | ||
| 174 | - align:"center", | ||
| 175 | - dataIndex: 'reason' | ||
| 176 | - }, | ||
| 177 | - { | ||
| 178 | - title:'备注', | ||
| 179 | - align:"center", | ||
| 180 | - dataIndex: 'remark' | ||
| 181 | - }, | ||
| 182 | - { | ||
| 183 | - title: '操作', | ||
| 184 | - dataIndex: 'action', | ||
| 185 | - align:"center", | ||
| 186 | - fixed:"right", | ||
| 187 | - width:147, | ||
| 188 | - scopedSlots: { customRender: 'action' }, | 114 | +export default { |
| 115 | + name: 'MinorList', | ||
| 116 | + mixins: [JeecgListMixin], | ||
| 117 | + components: { | ||
| 118 | + MinorModal | ||
| 119 | + }, | ||
| 120 | + data() { | ||
| 121 | + return { | ||
| 122 | + activeKey: '1', | ||
| 123 | + infoVisible: false, | ||
| 124 | + info: {}, | ||
| 125 | + description: '未成年人管理页面', | ||
| 126 | + // 表头 | ||
| 127 | + columns: [ | ||
| 128 | + { | ||
| 129 | + title: '序号', | ||
| 130 | + dataIndex: '', | ||
| 131 | + key: 'rowIndex', | ||
| 132 | + width: 60, | ||
| 133 | + align: 'center', | ||
| 134 | + customRender: function(t, r, index) { | ||
| 135 | + return parseInt(index) + 1 | ||
| 189 | } | 136 | } |
| 190 | - ], | ||
| 191 | - url: { | ||
| 192 | - list: "/sys/minor/list", | ||
| 193 | - delete: "/sys/minor/delete", | ||
| 194 | - deleteBatch: "/sys/minor/deleteBatch", | ||
| 195 | - exportXlsUrl: "/sys/minor/exportXls", | ||
| 196 | - importExcelUrl: "sys/minor/importExcel", | ||
| 197 | - | ||
| 198 | }, | 137 | }, |
| 199 | - dictOptions:{}, | ||
| 200 | - superFieldList:[], | 138 | + { |
| 139 | + title: '姓名', | ||
| 140 | + align: 'center', | ||
| 141 | + dataIndex: 'name' | ||
| 142 | + }, | ||
| 143 | + { | ||
| 144 | + title: '年龄', | ||
| 145 | + align: 'center', | ||
| 146 | + dataIndex: 'age', | ||
| 147 | + customRender: function(text, record) { | ||
| 148 | + return GetAge(record.identity) | ||
| 149 | + } | ||
| 150 | + }, | ||
| 151 | + { | ||
| 152 | + title: '性别', | ||
| 153 | + align: 'center', | ||
| 154 | + dataIndex: 'gender_dictText' | ||
| 155 | + }, | ||
| 156 | + { | ||
| 157 | + title: '学校名称', | ||
| 158 | + align: 'center', | ||
| 159 | + dataIndex: 'schoolName' | ||
| 160 | + }, | ||
| 161 | + { | ||
| 162 | + title: '入学年份', | ||
| 163 | + align: 'center', | ||
| 164 | + dataIndex: 'startYear' | ||
| 165 | + }, | ||
| 166 | + { | ||
| 167 | + title: '是否失学', | ||
| 168 | + align: 'center', | ||
| 169 | + dataIndex: 'school_dictText' | ||
| 170 | + }, | ||
| 171 | + { | ||
| 172 | + title: '家庭住址', | ||
| 173 | + align: 'center', | ||
| 174 | + dataIndex: 'address', | ||
| 175 | + scopedSlots: { customRender: 'longText' } | ||
| 176 | + }, | ||
| 177 | + { | ||
| 178 | + title: '身份证号', | ||
| 179 | + align: 'center', | ||
| 180 | + dataIndex: 'identity' | ||
| 181 | + }, | ||
| 182 | + { | ||
| 183 | + title: '监护人关系', | ||
| 184 | + align: 'center', | ||
| 185 | + dataIndex: 'relation' | ||
| 186 | + }, | ||
| 187 | + { | ||
| 188 | + title: '监护人', | ||
| 189 | + align: 'center', | ||
| 190 | + dataIndex: 'guardian' | ||
| 191 | + }, | ||
| 192 | + { | ||
| 193 | + title: '重点关注原因', | ||
| 194 | + align: 'center', | ||
| 195 | + dataIndex: 'reason_dictText' | ||
| 196 | + }, | ||
| 197 | + { | ||
| 198 | + title: '特殊原因', | ||
| 199 | + align: 'center', | ||
| 200 | + dataIndex: 'specialReason', | ||
| 201 | + scopedSlots: { customRender: 'longText' } | ||
| 202 | + }, | ||
| 203 | + { | ||
| 204 | + title: '备注', | ||
| 205 | + align: 'center', | ||
| 206 | + dataIndex: 'remark', | ||
| 207 | + scopedSlots: { customRender: 'longText' } | ||
| 208 | + }, | ||
| 209 | + { | ||
| 210 | + title: '操作', | ||
| 211 | + dataIndex: 'action', | ||
| 212 | + align: 'center', | ||
| 213 | + fixed: 'right', | ||
| 214 | + width: 147, | ||
| 215 | + scopedSlots: { customRender: 'action' } | ||
| 216 | + } | ||
| 217 | + ], | ||
| 218 | + url: { | ||
| 219 | + list: '/sys/minor/list', | ||
| 220 | + delete: '/sys/minor/delete', | ||
| 221 | + deleteBatch: '/sys/minor/deleteBatch', | ||
| 222 | + exportXlsUrl: '/sys/minor/exportXls', | ||
| 223 | + importExcelUrl: 'sys/minor/importExcel', | ||
| 224 | + familys: '/sys/minor/queryFamilyByMainId' | ||
| 225 | + }, | ||
| 226 | + dictOptions: {}, | ||
| 227 | + superFieldList: [], | ||
| 228 | + familyDatas: [], | ||
| 229 | + // 表头 | ||
| 230 | + familyColumns: [ | ||
| 231 | + { | ||
| 232 | + title: '户号', | ||
| 233 | + align: 'center', | ||
| 234 | + dataIndex: 'householdNum' | ||
| 235 | + }, | ||
| 236 | + { | ||
| 237 | + title: '人员编号', | ||
| 238 | + align: 'center', | ||
| 239 | + dataIndex: 'number' | ||
| 240 | + }, | ||
| 241 | + { | ||
| 242 | + title: '姓名', | ||
| 243 | + align: 'center', | ||
| 244 | + dataIndex: 'name' | ||
| 245 | + }, | ||
| 246 | + { | ||
| 247 | + title: '身份证号', | ||
| 248 | + align: 'center', | ||
| 249 | + dataIndex: 'identity' | ||
| 250 | + }, | ||
| 251 | + { | ||
| 252 | + title: '与户主的关系', | ||
| 253 | + align: 'center', | ||
| 254 | + dataIndex: 'relation' | ||
| 255 | + }, | ||
| 256 | + { | ||
| 257 | + title: '行政区划', | ||
| 258 | + align: 'center', | ||
| 259 | + dataIndex: 'division', | ||
| 260 | + scopedSlots: { customRender: 'longText' } | ||
| 261 | + }, | ||
| 262 | + { | ||
| 263 | + title: '现住址', | ||
| 264 | + align: 'center', | ||
| 265 | + dataIndex: 'address', | ||
| 266 | + scopedSlots: { customRender: 'longText' } | ||
| 267 | + }, | ||
| 268 | + { | ||
| 269 | + title: '是否犯罪', | ||
| 270 | + align: 'center', | ||
| 271 | + dataIndex: 'crime', | ||
| 272 | + customRender: (text) => { | ||
| 273 | + //字典值翻译通用方法 | ||
| 274 | + return filterDictTextByCache('is_crime', text) | ||
| 275 | + } | ||
| 276 | + }, | ||
| 277 | + { | ||
| 278 | + title: '犯罪原因', | ||
| 279 | + align: 'center', | ||
| 280 | + dataIndex: 'reason', | ||
| 281 | + scopedSlots: { customRender: 'longText' } | ||
| 282 | + }, | ||
| 283 | + { | ||
| 284 | + title: '其他参考信息', | ||
| 285 | + align: 'center', | ||
| 286 | + dataIndex: 'other', | ||
| 287 | + scopedSlots: { customRender: 'longText' } | ||
| 288 | + } | ||
| 289 | + ], | ||
| 290 | + /* 分页参数 */ | ||
| 291 | + familyPagination: { | ||
| 292 | + current: 1, | ||
| 293 | + pageSize: 3, | ||
| 294 | + hideOnSinglePage: true, | ||
| 295 | + showTotal: (total, range) => { | ||
| 296 | + return range[0] + '-' + range[1] + ' 共' + total + '条' | ||
| 297 | + }, | ||
| 298 | + showQuickJumper: true, | ||
| 299 | + showSizeChanger: true, | ||
| 300 | + total: 0 | ||
| 201 | } | 301 | } |
| 302 | + } | ||
| 303 | + }, | ||
| 304 | + created() { | ||
| 305 | + this.getSuperFieldList() | ||
| 306 | + }, | ||
| 307 | + computed: { | ||
| 308 | + importExcelUrl: function() { | ||
| 309 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | ||
| 310 | + } | ||
| 311 | + }, | ||
| 312 | + methods: { | ||
| 313 | + getAgeByIdentity(identity) { | ||
| 314 | + return GetAge(identity) | ||
| 202 | }, | 315 | }, |
| 203 | - created() { | ||
| 204 | - this.getSuperFieldList(); | 316 | + handleDetail(record) { |
| 317 | + var that = this | ||
| 318 | + let params = { id: record.id } | ||
| 319 | + getAction(this.url.familys, params).then(res => { | ||
| 320 | + that.info = record | ||
| 321 | + that.infoVisible = true | ||
| 322 | + that.familyDatas = res.result || [] | ||
| 323 | + }).finally(() => { | ||
| 324 | + that.infoVisible = true | ||
| 325 | + }) | ||
| 326 | + | ||
| 205 | }, | 327 | }, |
| 206 | - computed: { | ||
| 207 | - importExcelUrl: function(){ | ||
| 208 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
| 209 | - } | 328 | + initDictConfig() { |
| 210 | }, | 329 | }, |
| 211 | - methods: { | ||
| 212 | - initDictConfig(){ | ||
| 213 | - }, | ||
| 214 | - getSuperFieldList(){ | ||
| 215 | - let fieldList=[]; | ||
| 216 | - fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''}) | ||
| 217 | - fieldList.push({type:'int',value:'gender',text:'性别',dictCode:''}) | ||
| 218 | - fieldList.push({type:'string',value:'address',text:'家庭住址',dictCode:''}) | ||
| 219 | - fieldList.push({type:'string',value:'identity',text:'身份证号',dictCode:''}) | ||
| 220 | - fieldList.push({type:'Text',value:'reason',text:'重点关注原因',dictCode:''}) | ||
| 221 | - fieldList.push({type:'Text',value:'remark',text:'备注',dictCode:''}) | ||
| 222 | - this.superFieldList = fieldList | ||
| 223 | - } | 330 | + getSuperFieldList() { |
| 331 | + let fieldList = [] | ||
| 332 | + fieldList.push({ type: 'string', value: 'name', text: '姓名', dictCode: '' }) | ||
| 333 | + fieldList.push({ type: 'int', value: 'gender', text: '性别', dictCode: '' }) | ||
| 334 | + fieldList.push({ type: 'string', value: 'address', text: '家庭住址', dictCode: '' }) | ||
| 335 | + fieldList.push({ type: 'string', value: 'identity', text: '身份证号', dictCode: '' }) | ||
| 336 | + fieldList.push({ type: 'Text', value: 'reason', text: '重点关注原因', dictCode: '' }) | ||
| 337 | + fieldList.push({ type: 'Text', value: 'remark', text: '备注', dictCode: '' }) | ||
| 338 | + this.superFieldList = fieldList | ||
| 224 | } | 339 | } |
| 225 | } | 340 | } |
| 341 | +} | ||
| 226 | </script> | 342 | </script> |
| 227 | <style scoped> | 343 | <style scoped> |
| 228 | - @import '~@assets/less/common.less'; | 344 | +@import '~@assets/less/common.less'; |
| 345 | +.ant-modal-body { | ||
| 346 | + overflow-y: auto !important; | ||
| 347 | + height: 750px !important; | ||
| 348 | +} | ||
| 349 | +</style> | ||
| 350 | +<style> | ||
| 351 | + | ||
| 229 | </style> | 352 | </style> |
| 230 | \ No newline at end of file | 353 | \ No newline at end of file |
juvenile-prosecution-vue/src/views/business/SourceList.vue
| 1 | <template> | 1 | <template> |
| 2 | <a-card :bordered="false"> | 2 | <a-card :bordered="false"> |
| 3 | - <a-page-header | ||
| 4 | - class="demo-page-header" | ||
| 5 | - style="border: 1px solid rgb(235, 237, 240)" | ||
| 6 | - title="返回" | ||
| 7 | - sub-title="数据批次" | ||
| 8 | - @back="() => $router.go(-1)" | ||
| 9 | - ></a-page-header> | 3 | +<!-- <a-page-header--> |
| 4 | +<!-- class="demo-page-header"--> | ||
| 5 | +<!-- style="border: 1px solid rgb(235, 237, 240)"--> | ||
| 6 | +<!-- title="返回"--> | ||
| 7 | +<!-- sub-title="数据批次"--> | ||
| 8 | +<!-- @back="goBack"--> | ||
| 9 | +<!-- ></a-page-header>--> | ||
| 10 | 10 | ||
| 11 | <!-- table区域-begin --> | 11 | <!-- table区域-begin --> |
| 12 | <div> | 12 | <div> |
| @@ -38,11 +38,12 @@ | @@ -38,11 +38,12 @@ | ||
| 38 | 38 | ||
| 39 | import '@/assets/less/TableExpand.less' | 39 | import '@/assets/less/TableExpand.less' |
| 40 | import { mixinDevice } from '@/utils/mixin' | 40 | import { mixinDevice } from '@/utils/mixin' |
| 41 | - import { JeecgListMixin } from '@/mixins/JeecgListMixin' | 41 | + import { getAction } from '@api/manage' |
| 42 | + import { filterObj } from '@/utils/util' | ||
| 42 | 43 | ||
| 43 | export default { | 44 | export default { |
| 44 | name: 'SourceStatistics', | 45 | name: 'SourceStatistics', |
| 45 | - mixins:[JeecgListMixin, mixinDevice], | 46 | + mixins:[ mixinDevice], |
| 46 | components: { | 47 | components: { |
| 47 | 48 | ||
| 48 | }, | 49 | }, |
| @@ -52,37 +53,24 @@ | @@ -52,37 +53,24 @@ | ||
| 52 | // 表头 | 53 | // 表头 |
| 53 | columns: [ | 54 | columns: [ |
| 54 | { | 55 | { |
| 55 | - title: '序号', | ||
| 56 | - dataIndex: '', | ||
| 57 | - key:'rowIndex', | ||
| 58 | - width:60, | 56 | + title:'数据批次', |
| 59 | align:"center", | 57 | align:"center", |
| 60 | - customRender:function (t,r,index) { | ||
| 61 | - return parseInt(index)+1; | ||
| 62 | - } | 58 | + dataIndex: 'batch' |
| 63 | }, | 59 | }, |
| 64 | { | 60 | { |
| 65 | title:'单位名称', | 61 | title:'单位名称', |
| 66 | align:"center", | 62 | align:"center", |
| 67 | - dataIndex: 'name' | 63 | + dataIndex: 'name_dictText' |
| 68 | }, | 64 | }, |
| 69 | { | 65 | { |
| 70 | - title:'数据批次', | 66 | + title:'更新时间', |
| 71 | align:"center", | 67 | align:"center", |
| 72 | - dataIndex: 'batch' | 68 | + dataIndex: 'createTime' |
| 73 | }, | 69 | }, |
| 74 | { | 70 | { |
| 75 | - title:'总条数', | 71 | + title:'数据条数', |
| 76 | align:"center", | 72 | align:"center", |
| 77 | dataIndex: 'total' | 73 | dataIndex: 'total' |
| 78 | - }, | ||
| 79 | - { | ||
| 80 | - title: '操作', | ||
| 81 | - dataIndex: 'action', | ||
| 82 | - align:"center", | ||
| 83 | - fixed:"right", | ||
| 84 | - width:147, | ||
| 85 | - scopedSlots: { customRender: 'action' } | ||
| 86 | } | 74 | } |
| 87 | ], | 75 | ], |
| 88 | url: { | 76 | url: { |
| @@ -95,10 +83,45 @@ | @@ -95,10 +83,45 @@ | ||
| 95 | }, | 83 | }, |
| 96 | dictOptions:{}, | 84 | dictOptions:{}, |
| 97 | superFieldList:[], | 85 | superFieldList:[], |
| 86 | + /* 排序参数 */ | ||
| 87 | + isorter:{ | ||
| 88 | + column: 'createTime', | ||
| 89 | + order: 'desc', | ||
| 90 | + }, | ||
| 91 | + /* 筛选参数 */ | ||
| 92 | + filters: {}, | ||
| 93 | + /* 查询条件-请不要在queryParam中声明非字符串值的属性 */ | ||
| 94 | + queryParam: {}, | ||
| 95 | + /* 分页参数 */ | ||
| 96 | + ipagination:{ | ||
| 97 | + current: 1, | ||
| 98 | + pageSize: 10, | ||
| 99 | + pageSizeOptions: ['10', '20', '30'], | ||
| 100 | + showTotal: (total, range) => { | ||
| 101 | + return range[0] + "-" + range[1] + " 共" + total + "条" | ||
| 102 | + }, | ||
| 103 | + showQuickJumper: true, | ||
| 104 | + showSizeChanger: true, | ||
| 105 | + total: 0 | ||
| 106 | + }, | ||
| 107 | + /* 数据源 */ | ||
| 108 | + dataSource:[], | ||
| 109 | + /* table加载状态 */ | ||
| 110 | + loading:false, | ||
| 111 | + /* table选中keys*/ | ||
| 112 | + selectedRowKeys: [], | ||
| 113 | + /* table选中records*/ | ||
| 114 | + selectionRows: [], | ||
| 115 | + /* 查询折叠 */ | ||
| 116 | + toggleSearchStatus:false, | ||
| 98 | } | 117 | } |
| 99 | }, | 118 | }, |
| 100 | created() { | 119 | created() { |
| 101 | - this.getSuperFieldList(); | 120 | + this.getSuperFieldList(); |
| 121 | + this.queryParam={ | ||
| 122 | + name:this.$route.query.unitName | ||
| 123 | + } | ||
| 124 | + this.loadData(1) | ||
| 102 | }, | 125 | }, |
| 103 | computed: { | 126 | computed: { |
| 104 | importExcelUrl: function(){ | 127 | importExcelUrl: function(){ |
| @@ -106,6 +129,68 @@ | @@ -106,6 +129,68 @@ | ||
| 106 | }, | 129 | }, |
| 107 | }, | 130 | }, |
| 108 | methods: { | 131 | methods: { |
| 132 | + goBack(){ | ||
| 133 | + this.$router.go(-1); | ||
| 134 | + | ||
| 135 | + // this.$router.re({name:'business-SourceList',query: {unitName:record.name}}) | ||
| 136 | + }, | ||
| 137 | + loadData(arg) { | ||
| 138 | + if(!this.url.list){ | ||
| 139 | + this.$message.error("请设置url.list属性!") | ||
| 140 | + return | ||
| 141 | + } | ||
| 142 | + //加载数据 若传入参数1则加载第一页的内容 | ||
| 143 | + if (arg === 1) { | ||
| 144 | + this.ipagination.current = 1; | ||
| 145 | + } | ||
| 146 | + var params = this.getQueryParams();//查询条件 | ||
| 147 | + this.loading = true; | ||
| 148 | + getAction(this.url.list, params).then((res) => { | ||
| 149 | + if (res.success) { | ||
| 150 | + //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ | ||
| 151 | + this.dataSource = res.result.records||res.result; | ||
| 152 | + if(res.result.total) | ||
| 153 | + { | ||
| 154 | + this.ipagination.total = res.result.total; | ||
| 155 | + }else{ | ||
| 156 | + this.ipagination.total = 0; | ||
| 157 | + } | ||
| 158 | + //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ | ||
| 159 | + } | ||
| 160 | + if(res.code===510){ | ||
| 161 | + this.$message.warning(res.message) | ||
| 162 | + } | ||
| 163 | + this.loading = false; | ||
| 164 | + }) | ||
| 165 | + }, | ||
| 166 | + getQueryParams() { | ||
| 167 | + //获取查询条件 | ||
| 168 | + let sqp = {} | ||
| 169 | + var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); | ||
| 170 | + param.field = this.getQueryField(); | ||
| 171 | + param.pageNo = this.ipagination.current; | ||
| 172 | + param.pageSize = this.ipagination.pageSize; | ||
| 173 | + return filterObj(param); | ||
| 174 | + }, | ||
| 175 | + getQueryField() { | ||
| 176 | + //TODO 字段权限控制 | ||
| 177 | + var str = "id,"; | ||
| 178 | + this.columns.forEach(function (value) { | ||
| 179 | + str += "," + value.dataIndex; | ||
| 180 | + }); | ||
| 181 | + return str; | ||
| 182 | + }, | ||
| 183 | + handleTableChange(pagination, filters, sorter) { | ||
| 184 | + //分页、排序、筛选变化时触发 | ||
| 185 | + //TODO 筛选 | ||
| 186 | + console.log(pagination) | ||
| 187 | + if (Object.keys(sorter).length > 0) { | ||
| 188 | + this.isorter.column = sorter.field; | ||
| 189 | + this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" | ||
| 190 | + } | ||
| 191 | + this.ipagination = pagination; | ||
| 192 | + this.loadData(); | ||
| 193 | + }, | ||
| 109 | initDictConfig(){ | 194 | initDictConfig(){ |
| 110 | }, | 195 | }, |
| 111 | getSuperFieldList(){ | 196 | getSuperFieldList(){ |
juvenile-prosecution-vue/src/views/business/SourceStatistics.vue
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | <a-row :gutter="24"> | 6 | <a-row :gutter="24"> |
| 7 | <a-col :md="6" :sm="12"> | 7 | <a-col :md="6" :sm="12"> |
| 8 | <a-form-item label="单位名称"> | 8 | <a-form-item label="单位名称"> |
| 9 | - <a-input placeholder="输入单位名称查询" v-model="queryParam.name"></a-input> | 9 | + <j-dict-select-tag v-model="queryParam.name" placeholder="请选择" dictCode="source_unit"/> |
| 10 | </a-form-item> | 10 | </a-form-item> |
| 11 | </a-col> | 11 | </a-col> |
| 12 | <a-col :md="6" :sm="8"> | 12 | <a-col :md="6" :sm="8"> |
| @@ -74,7 +74,7 @@ | @@ -74,7 +74,7 @@ | ||
| 74 | { | 74 | { |
| 75 | title:'单位名称', | 75 | title:'单位名称', |
| 76 | align:"center", | 76 | align:"center", |
| 77 | - dataIndex: 'name' | 77 | + dataIndex: 'name_dictText' |
| 78 | }, | 78 | }, |
| 79 | { | 79 | { |
| 80 | title:'数据批次', | 80 | title:'数据批次', |
| @@ -111,8 +111,11 @@ | @@ -111,8 +111,11 @@ | ||
| 111 | }, | 111 | }, |
| 112 | }, | 112 | }, |
| 113 | methods: { | 113 | methods: { |
| 114 | - handleDetail(){ | ||
| 115 | - this.$router.push({ path: '/business/SourceList' }) | 114 | + handleDetail(record){ |
| 115 | + console.log(record.name) | ||
| 116 | + // this.$router.push({ name: 'business-SourceList',params:{'unitName':record.name}}) | ||
| 117 | + this.$router.push({name:'business-SourceList',query: {unitName:record.name}}) | ||
| 118 | + console.log(this.$router) | ||
| 116 | }, | 119 | }, |
| 117 | initDictConfig(){ | 120 | initDictConfig(){ |
| 118 | }, | 121 | }, |
juvenile-prosecution-vue/src/views/business/modules/MinorModal.vue
| @@ -27,13 +27,13 @@ | @@ -27,13 +27,13 @@ | ||
| 27 | </a-row> | 27 | </a-row> |
| 28 | <a-row> | 28 | <a-row> |
| 29 | <a-col :span="12"> | 29 | <a-col :span="12"> |
| 30 | - <a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="identity"> | ||
| 31 | - <a-input v-model="model.identity" placeholder="请输入身份证号"></a-input> | 30 | + <a-form-model-item label="学校名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="schoolName"> |
| 31 | + <a-input v-model="model.schoolName" placeholder="请输入学校名称"></a-input> | ||
| 32 | </a-form-model-item> | 32 | </a-form-model-item> |
| 33 | </a-col> | 33 | </a-col> |
| 34 | <a-col :span="12"> | 34 | <a-col :span="12"> |
| 35 | - <a-form-model-item label="年龄" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="age"> | ||
| 36 | - <a-input v-model="model.age" disabled></a-input> | 35 | + <a-form-model-item label="入学年份" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startYear"> |
| 36 | + <a-input v-model="model.startYear" placeholder="请输入入学年份"></a-input> | ||
| 37 | </a-form-model-item> | 37 | </a-form-model-item> |
| 38 | </a-col> | 38 | </a-col> |
| 39 | </a-row> | 39 | </a-row> |
| @@ -44,6 +44,11 @@ | @@ -44,6 +44,11 @@ | ||
| 44 | </a-form-model-item> | 44 | </a-form-model-item> |
| 45 | </a-col> | 45 | </a-col> |
| 46 | <a-col :span="12"> | 46 | <a-col :span="12"> |
| 47 | + <a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="identity"> | ||
| 48 | + <a-input v-model="model.identity" placeholder="请输入身份证号"></a-input> | ||
| 49 | + </a-form-model-item> | ||
| 50 | + </a-col> | ||
| 51 | + <a-col :span="12"> | ||
| 47 | <a-form-model-item label="家庭住址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> | 52 | <a-form-model-item label="家庭住址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> |
| 48 | <a-textarea v-model="model.address" placeholder="请输入家庭住址" :rows="1" ></a-textarea> | 53 | <a-textarea v-model="model.address" placeholder="请输入家庭住址" :rows="1" ></a-textarea> |
| 49 | </a-form-model-item> | 54 | </a-form-model-item> |
| @@ -68,6 +73,11 @@ | @@ -68,6 +73,11 @@ | ||
| 68 | </a-form-model-item> | 73 | </a-form-model-item> |
| 69 | </a-col> | 74 | </a-col> |
| 70 | <a-col :span="12"> | 75 | <a-col :span="12"> |
| 76 | + <a-form-model-item label="特殊原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specialReason"> | ||
| 77 | + <a-textarea v-model="model.specialReason" placeholder="请输入特殊原因"></a-textarea> | ||
| 78 | + </a-form-model-item> | ||
| 79 | + </a-col> | ||
| 80 | + <a-col :span="12"> | ||
| 71 | <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> | 81 | <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| 72 | <a-textarea v-model="model.remark" placeholder="请输入备注"></a-textarea> | 82 | <a-textarea v-model="model.remark" placeholder="请输入备注"></a-textarea> |
| 73 | </a-form-model-item> | 83 | </a-form-model-item> |
| @@ -100,6 +110,7 @@ import { getAction, httpAction } from '@/api/manage' | @@ -100,6 +110,7 @@ import { getAction, httpAction } from '@/api/manage' | ||
| 100 | import { FormTypes, VALIDATE_NO_PASSED, getRefPromise, validateFormModelAndTables } from '@/utils/JEditableTableUtil' | 110 | import { FormTypes, VALIDATE_NO_PASSED, getRefPromise, validateFormModelAndTables } from '@/utils/JEditableTableUtil' |
| 101 | import JEditableTable from '@/components/jeecg/JEditableTable' | 111 | import JEditableTable from '@/components/jeecg/JEditableTable' |
| 102 | import JDate from '@/components/jeecg/JDate' | 112 | import JDate from '@/components/jeecg/JDate' |
| 113 | +import { GetAge } from '@/utils/util' | ||
| 103 | 114 | ||
| 104 | export default { | 115 | export default { |
| 105 | name: 'MinorModal', | 116 | name: 'MinorModal', |
| @@ -131,6 +142,8 @@ export default { | @@ -131,6 +142,8 @@ export default { | ||
| 131 | sm: { span: 20 } | 142 | sm: { span: 20 } |
| 132 | }, | 143 | }, |
| 133 | validatorRules: { | 144 | validatorRules: { |
| 145 | + householdNum:[ { required: true, message: '请输入户号' },], | ||
| 146 | + number:[ { required: true, message: '请输入人员编号' },], | ||
| 134 | name:[ { required: true, message: '请输入姓名' },], | 147 | name:[ { required: true, message: '请输入姓名' },], |
| 135 | gender:[ { required: true, message: '请选择性别' },], | 148 | gender:[ { required: true, message: '请选择性别' },], |
| 136 | identity:[ {required: true,validator:this.validateIdCard}], | 149 | identity:[ {required: true,validator:this.validateIdCard}], |
| @@ -151,7 +164,15 @@ export default { | @@ -151,7 +164,15 @@ export default { | ||
| 151 | key: 'householdNum', | 164 | key: 'householdNum', |
| 152 | width: '250px', | 165 | width: '250px', |
| 153 | type: FormTypes.input, | 166 | type: FormTypes.input, |
| 154 | - fixed: 'left', | 167 | + defaultValue: '', |
| 168 | + placeholder: '请输入${title}', | ||
| 169 | + validateRules: [{ required: true, message: '${title}不能为空' }] | ||
| 170 | + }, | ||
| 171 | + { | ||
| 172 | + title: '人员编号', | ||
| 173 | + key: 'number', | ||
| 174 | + width: '180px', | ||
| 175 | + type: FormTypes.input, | ||
| 155 | defaultValue: '', | 176 | defaultValue: '', |
| 156 | placeholder: '请输入${title}', | 177 | placeholder: '请输入${title}', |
| 157 | validateRules: [{ required: true, message: '${title}不能为空' }] | 178 | validateRules: [{ required: true, message: '${title}不能为空' }] |
| @@ -160,7 +181,6 @@ export default { | @@ -160,7 +181,6 @@ export default { | ||
| 160 | title: '姓名', | 181 | title: '姓名', |
| 161 | key: 'name', | 182 | key: 'name', |
| 162 | width: '180px', | 183 | width: '180px', |
| 163 | - fixed: 'left', | ||
| 164 | type: FormTypes.input, | 184 | type: FormTypes.input, |
| 165 | defaultValue: '', | 185 | defaultValue: '', |
| 166 | placeholder: '请输入${title}', | 186 | placeholder: '请输入${title}', |
| @@ -174,21 +194,38 @@ export default { | @@ -174,21 +194,38 @@ export default { | ||
| 174 | defaultValue: '', | 194 | defaultValue: '', |
| 175 | placeholder: '请输入${title}', | 195 | placeholder: '请输入${title}', |
| 176 | validateRules: [{ | 196 | validateRules: [{ |
| 177 | - pattern: '/(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)/', | 197 | + // pattern: '/(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)/', |
| 198 | + pattern:'^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$', | ||
| 178 | message: '${title}格式不正确' | 199 | message: '${title}格式不正确' |
| 179 | }] | 200 | }] |
| 180 | }, | 201 | }, |
| 181 | { | 202 | { |
| 182 | - title: '婚姻状况', | ||
| 183 | - key: 'marital', | ||
| 184 | - width: '200px', | ||
| 185 | - type: FormTypes.select, | ||
| 186 | - options: [], | ||
| 187 | - dictCode: 'marital_status', | ||
| 188 | - placeholder: '请选择${title}', | 203 | + title: '与户主的关系', |
| 204 | + key: 'relation', | ||
| 205 | + width: '180px', | ||
| 206 | + type: FormTypes.input, | ||
| 207 | + defaultValue: '', | ||
| 208 | + placeholder: '请输入${title}', | ||
| 209 | + validateRules: [{ required: true, message: '${title}不能为空' }] | ||
| 210 | + }, | ||
| 211 | + { | ||
| 212 | + title: '行政区划', | ||
| 213 | + key: 'division', | ||
| 214 | + width: '180px', | ||
| 215 | + type: FormTypes.input, | ||
| 216 | + defaultValue: '', | ||
| 217 | + placeholder: '请输入${title}', | ||
| 189 | validateRules: [{ required: true, message: '${title}不能为空' }] | 218 | validateRules: [{ required: true, message: '${title}不能为空' }] |
| 190 | }, | 219 | }, |
| 191 | { | 220 | { |
| 221 | + title: '现住址', | ||
| 222 | + key: 'address', | ||
| 223 | + width: '180px', | ||
| 224 | + type: FormTypes.input_pop, | ||
| 225 | + defaultValue: '', | ||
| 226 | + placeholder: '请输入${title}', | ||
| 227 | + }, | ||
| 228 | + { | ||
| 192 | title: '是否犯罪', | 229 | title: '是否犯罪', |
| 193 | key: 'crime', | 230 | key: 'crime', |
| 194 | width: '200px', | 231 | width: '200px', |
| @@ -205,7 +242,6 @@ export default { | @@ -205,7 +242,6 @@ export default { | ||
| 205 | type: FormTypes.input_pop, | 242 | type: FormTypes.input_pop, |
| 206 | defaultValue: '', | 243 | defaultValue: '', |
| 207 | placeholder: '请输入${title}', | 244 | placeholder: '请输入${title}', |
| 208 | - validateRules: [{ required: true, message: '${title}不能为空' }] | ||
| 209 | }, | 245 | }, |
| 210 | { | 246 | { |
| 211 | title: '其他参考信息', | 247 | title: '其他参考信息', |
| @@ -214,7 +250,6 @@ export default { | @@ -214,7 +250,6 @@ export default { | ||
| 214 | type: FormTypes.input_pop, | 250 | type: FormTypes.input_pop, |
| 215 | defaultValue: '', | 251 | defaultValue: '', |
| 216 | placeholder: '请输入${title}', | 252 | placeholder: '请输入${title}', |
| 217 | - validateRules: [{ required: true, message: '${title}不能为空' }] | ||
| 218 | } | 253 | } |
| 219 | ] | 254 | ] |
| 220 | } | 255 | } |
| @@ -237,6 +272,9 @@ export default { | @@ -237,6 +272,9 @@ export default { | ||
| 237 | this.modelDefault = JSON.parse(JSON.stringify(this.model)) | 272 | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| 238 | }, | 273 | }, |
| 239 | methods: { | 274 | methods: { |
| 275 | + getAgeByIdentity(identity){ | ||
| 276 | + return GetAge(identity); | ||
| 277 | + }, | ||
| 240 | validateIdCard(rule,value,callback){ | 278 | validateIdCard(rule,value,callback){ |
| 241 | console.log(value) | 279 | console.log(value) |
| 242 | if(undefined==value || null==value || ''==value){ | 280 | if(undefined==value || null==value || ''==value){ |
| @@ -255,6 +293,7 @@ export default { | @@ -255,6 +293,7 @@ export default { | ||
| 255 | }, | 293 | }, |
| 256 | 294 | ||
| 257 | add() { | 295 | add() { |
| 296 | + this.dataSource=[]; | ||
| 258 | // 默认新增一条数据 | 297 | // 默认新增一条数据 |
| 259 | this.getAllTable().then(editableTables => { | 298 | this.getAllTable().then(editableTables => { |
| 260 | editableTables[0].add() | 299 | editableTables[0].add() |
| @@ -275,7 +314,9 @@ export default { | @@ -275,7 +314,9 @@ export default { | ||
| 275 | requestTableData(url, params) { | 314 | requestTableData(url, params) { |
| 276 | this.familyLoading = true | 315 | this.familyLoading = true |
| 277 | getAction(url, params).then(res => { | 316 | getAction(url, params).then(res => { |
| 317 | + console.log(this.dataSource) | ||
| 278 | this.dataSource = res.result || [] | 318 | this.dataSource = res.result || [] |
| 319 | + console.log(this.dataSource) | ||
| 279 | }).finally(() => { | 320 | }).finally(() => { |
| 280 | this.familyLoading = false | 321 | this.familyLoading = false |
| 281 | }) | 322 | }) |
juvenile-prosecution-vue/src/views/system/DepartList.vue
| @@ -94,8 +94,8 @@ | @@ -94,8 +94,8 @@ | ||
| 94 | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="abbreviation" label="常用名称"> | 94 | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="abbreviation" label="常用名称"> |
| 95 | <a-textarea placeholder="请输入常用名称,多个','分割" v-model="model.abbreviation" /> | 95 | <a-textarea placeholder="请输入常用名称,多个','分割" v-model="model.abbreviation" /> |
| 96 | </a-form-model-item> | 96 | </a-form-model-item> |
| 97 | - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="常用编码"> | ||
| 98 | - <a-textarea placeholder="请输入常用编码,多个','分割" v-model="model.common_code"/> | 97 | + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="学校"> |
| 98 | + <a-textarea placeholder="请输入学校,多个','分割" v-model="model.commonCode"/> | ||
| 99 | </a-form-model-item> | 99 | </a-form-model-item> |
| 100 | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序"> | 100 | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序"> |
| 101 | <a-input-number v-model="model.departOrder" /> | 101 | <a-input-number v-model="model.departOrder" /> |
| @@ -152,7 +152,7 @@ | @@ -152,7 +152,7 @@ | ||
| 152 | dataIndex: 'abbreviation' | 152 | dataIndex: 'abbreviation' |
| 153 | }, | 153 | }, |
| 154 | { | 154 | { |
| 155 | - title:'常用编码', | 155 | + title:'学校', |
| 156 | align:"left", | 156 | align:"left", |
| 157 | dataIndex: 'commonCode' | 157 | dataIndex: 'commonCode' |
| 158 | }, | 158 | }, |
juvenile-prosecution-vue/src/views/system/UserList.vue
| @@ -193,6 +193,9 @@ | @@ -193,6 +193,9 @@ | ||
| 193 | import UserRecycleBinModal from './modules/UserRecycleBinModal' | 193 | import UserRecycleBinModal from './modules/UserRecycleBinModal' |
| 194 | import JSuperQuery from '@/components/jeecg/JSuperQuery' | 194 | import JSuperQuery from '@/components/jeecg/JSuperQuery' |
| 195 | import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' | 195 | import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' |
| 196 | + import Vue from 'vue' | ||
| 197 | + import axios from 'axios' // 安装axios后引入 | ||
| 198 | + Vue.prototype.$axios = axios | ||
| 196 | 199 | ||
| 197 | export default { | 200 | export default { |
| 198 | name: "UserList", | 201 | name: "UserList", |
| @@ -311,11 +314,15 @@ | @@ -311,11 +314,15 @@ | ||
| 311 | }, | 314 | }, |
| 312 | methods: { | 315 | methods: { |
| 313 | doAnalyze(){ | 316 | doAnalyze(){ |
| 314 | - getAction('/sys/analyze/doAnalyzeData', {}).then(res => { | 317 | + putAction('/sys/analyze/doAnalyzeData', {}).then((res) => { |
| 315 | console.log(res) | 318 | console.log(res) |
| 316 | - }).finally(() => { | ||
| 317 | - | ||
| 318 | }) | 319 | }) |
| 320 | + // let self = this; | ||
| 321 | + // let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot"; | ||
| 322 | + // self.$axios.put('/sys/analyze/doAnalyzeData').then(res => { | ||
| 323 | + // console.log(res) | ||
| 324 | + // | ||
| 325 | + // }) | ||
| 319 | }, | 326 | }, |
| 320 | getAvatarView: function (avatar) { | 327 | getAvatarView: function (avatar) { |
| 321 | return getFileAccessHttpUrl(avatar) | 328 | return getFileAccessHttpUrl(avatar) |
juvenile-prosecution-vue/src/views/system/modules/DepartModal.vue
| @@ -34,8 +34,8 @@ | @@ -34,8 +34,8 @@ | ||
| 34 | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="abbreviation" label="常用名称"> | 34 | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="abbreviation" label="常用名称"> |
| 35 | <a-textarea placeholder="请输入常用名称,多个','分割" v-model="model.abbreviation" /> | 35 | <a-textarea placeholder="请输入常用名称,多个','分割" v-model="model.abbreviation" /> |
| 36 | </a-form-model-item> | 36 | </a-form-model-item> |
| 37 | - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="常用编码"> | ||
| 38 | - <a-textarea placeholder="请输入常用编码,多个','分割" v-model="model.common_code"/> | 37 | + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="学校"> |
| 38 | + <a-textarea placeholder="请输入学校,多个','分割" v-model="model.commonCode"/> | ||
| 39 | </a-form-model-item> | 39 | </a-form-model-item> |
| 40 | <a-form-model-item | 40 | <a-form-model-item |
| 41 | :labelCol="labelCol" | 41 | :labelCol="labelCol" |