Commit d207eac94a37e0a64fac0806b4ff393a25a7b219
1 parent
d1a8496e
添加根据身份证号、学校、家庭住址、重点关注原因、性别、年龄范围查询
Showing
10 changed files
with
183 additions
and
72 deletions
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/handle/service/SparkEtlService.java
... | ... | @@ -88,8 +88,8 @@ public class SparkEtlService implements Serializable { |
88 | 88 | //家庭成员数据 |
89 | 89 | List<Family> families = new ArrayList<Family>(); |
90 | 90 | for (Minor minor : minors) { |
91 | - if (null != minor.getFamilies() && !minor.getFamilies().isEmpty()) { | |
92 | - families.addAll(minor.getFamilies()); | |
91 | + if (null != minor.getFamilyList() && !minor.getFamilyList().isEmpty()) { | |
92 | + families.addAll(minor.getFamilyList()); | |
93 | 93 | } |
94 | 94 | } |
95 | 95 | this.saveMinor(minors); | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/AnalyzeController.java
... | ... | @@ -742,9 +742,7 @@ public class AnalyzeController extends JeecgController<GaDemographic, IGaDemogra |
742 | 742 | Map<String, Family> guardians = new HashMap<>(); |
743 | 743 | Date createTime = new Date(); |
744 | 744 | if (oConvertUtils.isNotEmpty(gaHouseholds)) { |
745 | - getRandomId idWorker = new getRandomId(0, 0); | |
746 | 745 | for (Map.Entry<String, Family> m : gaHouseholds.entrySet()) { |
747 | - long id = idWorker.nextId(); | |
748 | 746 | String mapKey = m.getKey(); |
749 | 747 | Family family = m.getValue(); |
750 | 748 | if (oConvertUtils.isNotEmpty(family)) { |
... | ... | @@ -830,7 +828,7 @@ public class AnalyzeController extends JeecgController<GaDemographic, IGaDemogra |
830 | 828 | testIdCards.add(houseNum); |
831 | 829 | } |
832 | 830 | } |
833 | - minor.setFamilies(f); | |
831 | + minor.setFamilyList(f); | |
834 | 832 | //获取监护人 |
835 | 833 | if (oConvertUtils.isNotEmpty(houseNum) && oConvertUtils.isNotEmpty(guardians) && oConvertUtils.isNotEmpty(guardians.get(houseNum))) { |
836 | 834 | minor.setGuardian(guardians.get(houseNum).getName()); | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/MinorController.java
... | ... | @@ -98,7 +98,8 @@ public class MinorController { |
98 | 98 | public Result<?> queryPageList(Minor minor, |
99 | 99 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
100 | 100 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
101 | - HttpServletRequest req) { | |
101 | + HttpServletRequest req,@RequestParam(name = "column", defaultValue = "age") String column, | |
102 | + @RequestParam(name = "order", defaultValue = "asc") String order) { | |
102 | 103 | QueryWrapper<Minor> queryWrapper = QueryGenerator.initQueryWrapper(minor, req.getParameterMap()); |
103 | 104 | Page<Minor> page = new Page<Minor>(pageNo, pageSize); |
104 | 105 | // IPage<Minor> pageList = minorService.page(page, queryWrapper); |
... | ... | @@ -111,32 +112,23 @@ public class MinorController { |
111 | 112 | // if(oConvertUtils.isNotEmpty(minor) && oConvertUtils.isNotEmpty(minor.getIsReason()) && minor.getIsReason().equals("1")){ |
112 | 113 | // isReason=minor.getIsReason(); |
113 | 114 | // } |
114 | - IPage<Minor> pageList = minorService.queryPageList(page,minor.getName(),sysOrgCode,minor.getIsReason()); | |
115 | + IPage<Minor> pageList = minorService.queryPageList(page,minor.getName(),sysOrgCode,minor.getIsReason(),minor.getIdentity(),minor.getSchoolName(), | |
116 | + minor.getGender(),minor.getReason(),minor.getAddress(),minor.getAge(),column,order); | |
115 | 117 | return Result.OK(pageList); |
116 | 118 | } |
117 | 119 | |
118 | 120 | /** |
119 | 121 | * 添加 |
120 | 122 | * |
121 | - * @param minorPage | |
123 | + * @param minor | |
122 | 124 | * @return |
123 | 125 | */ |
124 | 126 | @AutoLog(value = "未成年人-添加") |
125 | 127 | @ApiOperation(value = "未成年人-添加", notes = "未成年人-添加") |
126 | 128 | @PostMapping(value = "/add") |
127 | - public Result<?> add(@RequestBody MinorPage minorPage) { | |
128 | -// Integer count=0; | |
129 | -// if(oConvertUtils.isNotEmpty(minorPage) && oConvertUtils.isNotEmpty(minorPage.getIdentity())){ | |
130 | -// count=minorService.getMinorByIdCard(minorPage.getIdentity()); | |
131 | -// } | |
132 | -// if(count==0){ | |
133 | - Minor minor = new Minor(); | |
134 | - BeanUtils.copyProperties(minorPage, minor); | |
135 | - minorService.saveMain(minor, minorPage.getFamilyList()); | |
129 | + public Result<?> add(@RequestBody Minor minor) { | |
130 | + minorService.saveMain(minor, minor.getFamilyList()); | |
136 | 131 | return Result.OK("添加成功!"); |
137 | -// }else { | |
138 | -// return Result.error("身份证号重复!"); | |
139 | -// } | |
140 | 132 | } |
141 | 133 | |
142 | 134 | /** |
... | ... | @@ -151,7 +143,7 @@ public class MinorController { |
151 | 143 | public Result<?> edit(@RequestBody MinorPage minorPage) { |
152 | 144 | Minor minor = new Minor(); |
153 | 145 | BeanUtils.copyProperties(minorPage, minor); |
154 | - Minor minorEntity = minorService.getById(minor.getId()); | |
146 | + Minor minorEntity = minorService.getById(minorPage.getId()); | |
155 | 147 | if (minorEntity == null) { |
156 | 148 | return Result.error("未找到对应数据"); |
157 | 149 | } |
... | ... | @@ -215,7 +207,7 @@ public class MinorController { |
215 | 207 | @ApiOperation(value = "家庭成员表主表householdNum查询", notes = "家庭成员表-通主表householdNum查询") |
216 | 208 | @GetMapping(value = "/queryFamilyByMainId") |
217 | 209 | public Result<?> queryFamilyListByMainId(@RequestParam(name = "householdNum", required = true) String householdNum) { |
218 | - List<Family> familyList = familyService.selectByHouseholdNum(householdNum); | |
210 | + List<Family> familyList = familyService.getFamilysByHouseholdNum(householdNum); | |
219 | 211 | return Result.OK(familyList); |
220 | 212 | } |
221 | 213 | |
... | ... | @@ -241,7 +233,8 @@ public class MinorController { |
241 | 233 | */ |
242 | 234 | @RequestMapping(value = "/exportXls") |
243 | 235 | public ModelAndView exportXls(HttpServletRequest request, Minor minor, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
244 | - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | |
236 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,@RequestParam(name = "column", defaultValue = "age") String column, | |
237 | + @RequestParam(name = "order", defaultValue = "asc") String order) { | |
245 | 238 | // Step.1 组装查询条件查询数据 |
246 | 239 | // 过滤选中数据 |
247 | 240 | String selections = request.getParameter("selections"); |
... | ... | @@ -258,7 +251,8 @@ public class MinorController { |
258 | 251 | if(oConvertUtils.isNotEmpty(sysUser) && oConvertUtils.isNotEmpty(sysUser.getOrgCode())){ |
259 | 252 | sysOrgCode=sysUser.getOrgCode(); |
260 | 253 | } |
261 | - IPage<Minor> pageList = minorService.queryPageList(page,minor.getName(),sysOrgCode,minor.getIsReason()); | |
254 | + IPage<Minor> pageList = minorService.queryPageList(page,minor.getName(),sysOrgCode,minor.getIsReason(),minor.getIdentity(),minor.getSchoolName(), | |
255 | + minor.getGender(),minor.getReason(),minor.getAddress(),minor.getAge(),column,order); | |
262 | 256 | //Step.2 获取导出数据 |
263 | 257 | List<Minor> queryList = pageList.getRecords(); |
264 | 258 | List<Minor> minorList = new ArrayList<Minor>(); | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/Family.java
... | ... | @@ -13,6 +13,9 @@ import org.jeecgframework.poi.excel.annotation.Excel; |
13 | 13 | import java.util.Date; |
14 | 14 | import io.swagger.annotations.ApiModel; |
15 | 15 | import io.swagger.annotations.ApiModelProperty; |
16 | +import shaded.parquet.com.fasterxml.jackson.databind.annotation.JsonSerialize; | |
17 | +import shaded.parquet.com.fasterxml.jackson.databind.ser.std.ToStringSerializer; | |
18 | + | |
16 | 19 | import java.io.UnsupportedEncodingException; |
17 | 20 | |
18 | 21 | /** |
... | ... | @@ -32,7 +35,7 @@ public class Family implements Serializable { |
32 | 35 | |
33 | 36 | @TableId(type = IdType.NONE) |
34 | 37 | @ApiModelProperty(value = "主键") |
35 | - private Long id; | |
38 | + private String id; | |
36 | 39 | /**创建人*/ |
37 | 40 | @ApiModelProperty(value = "创建人") |
38 | 41 | private String createBy; | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/Minor.java
... | ... | @@ -43,8 +43,9 @@ public class Minor implements Serializable { |
43 | 43 | |
44 | 44 | /**主键*/ |
45 | 45 | @TableId(type = IdType.NONE) |
46 | + @JsonFormat(shape = JsonFormat.Shape.STRING) | |
46 | 47 | @ApiModelProperty(value = "主键") |
47 | - private Long id; | |
48 | + private String id; | |
48 | 49 | /**创建人*/ |
49 | 50 | @ApiModelProperty(value = "创建人") |
50 | 51 | private String createBy; |
... | ... | @@ -135,11 +136,17 @@ public class Minor implements Serializable { |
135 | 136 | private String division; |
136 | 137 | |
137 | 138 | @TableField(exist = false) |
138 | - private List<Family> families; | |
139 | + private List<Family> familyList; | |
139 | 140 | |
140 | 141 | @TableField(exist = false) |
141 | 142 | private String age; |
142 | 143 | |
143 | 144 | @TableField(exist = false) |
144 | 145 | private String isReason; |
146 | + | |
147 | + @TableField(exist = false) | |
148 | + private String column; | |
149 | + | |
150 | + @TableField(exist = false) | |
151 | + private String order; | |
145 | 152 | } | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/MinorMapper.java
... | ... | @@ -26,7 +26,9 @@ public interface MinorMapper extends BaseMapper<Minor> { |
26 | 26 | * @param page |
27 | 27 | * @return |
28 | 28 | */ |
29 | - IPage<Minor> queryPageList(Page page,@Param("name") String name,@Param("sysOrgCode") String sysOrgCode,@Param("isReason")String isReason); | |
29 | + IPage<Minor> queryPageList(Page page,@Param("name") String name,@Param("sysOrgCode") String sysOrgCode,@Param("isReason")String isReason, | |
30 | + @Param("identity") String identity,@Param("schoolName") String schoolName,@Param("gender")Integer gender,@Param("reason") String reason, | |
31 | + @Param("address") String address,@Param("age")String age,@Param("column") String column,@Param("order")String order); | |
30 | 32 | |
31 | 33 | /** |
32 | 34 | * 根据身份证号查询总数 | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/MinorMapper.xml
... | ... | @@ -40,6 +40,21 @@ |
40 | 40 | <if test="name!=null and name!=''"> |
41 | 41 | and name like concat('%',#{name},'%') |
42 | 42 | </if> |
43 | + <if test="identity!=null and identity!=''"> | |
44 | + and identity =#{identity} | |
45 | + </if> | |
46 | + <if test="schoolName!=null and schoolName!=''"> | |
47 | + and school_name like concat('%',#{schoolName},'%') | |
48 | + </if> | |
49 | + <if test="gender!=null"> | |
50 | + and gender =#{gender} | |
51 | + </if> | |
52 | + <if test="reason!=null and reason!=''"> | |
53 | + and reason like concat('%',#{reason},'%') | |
54 | + </if> | |
55 | + <if test="address!=null and address!=''"> | |
56 | + and address like concat('%',#{address},'%') | |
57 | + </if> | |
43 | 58 | <if test="sysOrgCode!=null and sysOrgCode!=''"> |
44 | 59 | and sys_org_code like concat(#{sysOrgCode},'%') |
45 | 60 | </if> |
... | ... | @@ -54,7 +69,44 @@ |
54 | 69 | |
55 | 70 | </otherwise> |
56 | 71 | </choose> |
57 | - ORDER BY create_time desc | |
72 | + <choose> | |
73 | + <when test='age=="6"'> | |
74 | + and ((timestampdiff(year, substring(identity, 7, 8), now())) <![CDATA[>=]]> 0 and (timestampdiff(year, substring(identity, 7, 8), now())) <![CDATA[<=]]> 6) | |
75 | + </when> | |
76 | + <when test='age=="12"'> | |
77 | + and ((timestampdiff(year, substring(identity, 7, 8), now())) <![CDATA[>=]]> 6 and (timestampdiff(year, substring(identity, 7, 8), now())) <![CDATA[<=]]> 12) | |
78 | + </when> | |
79 | + <when test='age=="18"'> | |
80 | + and ((timestampdiff(year, substring(identity, 7, 8), now())) <![CDATA[>=]]> 12 and (timestampdiff(year, substring(identity, 7, 8), now())) <![CDATA[<=]]> 18) | |
81 | + </when> | |
82 | + </choose> | |
83 | + <choose> | |
84 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="age" and order=="asc"'> | |
85 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) asc | |
86 | + </when> | |
87 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="age" and order=="desc"'> | |
88 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) desc | |
89 | + </when> | |
90 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="schoolName" and order=="asc"'> | |
91 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) asc,school_name asc | |
92 | + </when> | |
93 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="schoolName" and order=="desc"'> | |
94 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) asc,school_name desc | |
95 | + </when> | |
96 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="address" and order=="asc"'> | |
97 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) asc,address asc | |
98 | + </when> | |
99 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="address" and order=="desc"'> | |
100 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) asc,address desc | |
101 | + </when> | |
102 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="reason" and order=="asc"'> | |
103 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) asc,reason asc | |
104 | + </when> | |
105 | + <when test='column!=null and column!="" and order!=null and order!="" and column =="reason" and order=="desc"'> | |
106 | + ORDER BY (timestampdiff(year, substring(identity, 7, 8), now())) asc,reason desc | |
107 | + </when> | |
108 | + </choose> | |
109 | + | |
58 | 110 | </select> |
59 | 111 | |
60 | 112 | <select id="getMinorByIdCard" parameterType="java.lang.String" > | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IMinorService.java
... | ... | @@ -50,7 +50,8 @@ public interface IMinorService extends IService<Minor> { |
50 | 50 | * @param page |
51 | 51 | * @return |
52 | 52 | */ |
53 | - IPage<Minor> queryPageList(Page<Minor> page,String name,String sysOrgCode,String isReason); | |
53 | + IPage<Minor> queryPageList(Page<Minor> page,String name,String sysOrgCode,String isReason,String identity,String schoolName,Integer gender,String reason, | |
54 | + String address,String age,String column,String order); | |
54 | 55 | |
55 | 56 | /** |
56 | 57 | * 查询未成年人信息 | ... | ... |
juvenile-prosecution-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/MinorServiceImpl.java
... | ... | @@ -58,6 +58,7 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
58 | 58 | @Transactional |
59 | 59 | public void saveMain(Minor minor, List<Family> familyList) { |
60 | 60 | getRandomId idWorker = new getRandomId(0, 0); |
61 | + String reason=""; | |
61 | 62 | if(familyList!=null && familyList.size()>0) { |
62 | 63 | //判断家庭成员信息里的数据是否包含未成年人,默认包含 |
63 | 64 | Boolean falg=true; |
... | ... | @@ -72,13 +73,18 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
72 | 73 | if(oConvertUtils.isNotEmpty(entity.getCrime()) && entity.getCrime().equals(Family.IS_CRIME)){ |
73 | 74 | isCrime=true; |
74 | 75 | } |
75 | - entity.setId(idWorker.nextId()); | |
76 | + entity.setId(String.valueOf(idWorker.nextId())); | |
76 | 77 | } |
77 | 78 | if(isCrime){ |
78 | - minor.setReason(String.valueOf(Minor.ATTENTION_REASON_CRIME)); | |
79 | + if(oConvertUtils.isNotEmpty(minor.getReason()) && minor.getReason().contains("家庭成员有犯罪记录")){ | |
80 | + reason=minor.getReason()+","+"家庭成员有犯罪记录"; | |
81 | + }else { | |
82 | + reason="家庭成员有犯罪记录"; | |
83 | + } | |
79 | 84 | } |
80 | 85 | } |
81 | - minor.setId(idWorker.nextId()); | |
86 | + minor.setReason(reason); | |
87 | + minor.setId(String.valueOf(idWorker.nextId())); | |
82 | 88 | familyMapper.insertBatch(familyList); |
83 | 89 | minorMapper.insert(minor); |
84 | 90 | } |
... | ... | @@ -106,25 +112,13 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
106 | 112 | isCrime=true; |
107 | 113 | } |
108 | 114 | } |
109 | -// if(!falg){ | |
110 | -// Family family=new Family(); | |
111 | -// family.setCrime(Family.IS_NOT_CRIME); | |
112 | -// family.setName(minor.getName()); | |
113 | -// family.setHouseholdNum(minor.getHouseholdNum()); | |
114 | -// family.setIdentity(minor.getIdentity()); | |
115 | -// family.setNumber(minor.getNumber()); | |
116 | -// family.setGender(minor.getGender()); | |
117 | -// family.setAddress(minor.getAddress()); | |
118 | -// family.setRelation(minor.getRelation()); | |
119 | -// families.add(family); | |
120 | -// } | |
121 | 115 | if(isCrime){ |
122 | 116 | if(oConvertUtils.isNotEmpty(minor.getReason())){ |
123 | 117 | if(!minor.getReason().contains(String.valueOf(Minor.ATTENTION_REASON_CRIME))){ |
124 | - minor.setReason(minor.getReason()+","+Minor.ATTENTION_REASON_CRIME); | |
118 | + minor.setReason(minor.getReason()+","+"家庭成员有犯罪记录"); | |
125 | 119 | } |
126 | 120 | }else { |
127 | - minor.setReason(String.valueOf(Minor.ATTENTION_REASON_CRIME)); | |
121 | + minor.setReason("家庭成员有犯罪记录"); | |
128 | 122 | } |
129 | 123 | } |
130 | 124 | familyMapper.insertBatch(familyList); |
... | ... | @@ -161,7 +155,7 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
161 | 155 | if(oConvertUtils.isNotEmpty(list)){ |
162 | 156 | for(int i=0;i<list.size();i++){ |
163 | 157 | String id=System.currentTimeMillis()+String.valueOf((random_number+i)); |
164 | - list.get(i).setId(Long.valueOf(id)); | |
158 | + list.get(i).setId(id); | |
165 | 159 | } |
166 | 160 | } |
167 | 161 | updateStudentWithThreads(list); |
... | ... | @@ -174,8 +168,9 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
174 | 168 | * @return |
175 | 169 | */ |
176 | 170 | @Override |
177 | - public IPage<Minor> queryPageList(Page<Minor> page,String name,String sysOrgCode,String isReason) { | |
178 | - return minorMapper.queryPageList(page,name,sysOrgCode,isReason); | |
171 | + public IPage<Minor> queryPageList(Page<Minor> page,String name,String sysOrgCode,String isReason,String identity,String schoolName,Integer gender,String reason, | |
172 | + String address,String age,String column,String order) { | |
173 | + return minorMapper.queryPageList(page,name,sysOrgCode,isReason,identity,schoolName,gender,reason,address,age,column,order); | |
179 | 174 | } |
180 | 175 | |
181 | 176 | /** |
... | ... | @@ -216,7 +211,7 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
216 | 211 | if(oConvertUtils.isNotEmpty(family.getCrime()) && family.getCrime().equals(Family.IS_CRIME) && oConvertUtils.isNotEmpty(family.getHouseholdNum())){ |
217 | 212 | houseFamily.put(family.getHouseholdNum(),family); |
218 | 213 | } |
219 | - family.setId(idWorker.nextId()); | |
214 | + family.setId(String.valueOf(idWorker.nextId())); | |
220 | 215 | } |
221 | 216 | }); |
222 | 217 | } |
... | ... | @@ -225,7 +220,7 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
225 | 220 | minors.stream().forEach(minor -> { |
226 | 221 | if(oConvertUtils.isNotEmpty(minor)){ |
227 | 222 | minor.setCreateTime(createTime); |
228 | - minor.setId(idWorker.nextId()); | |
223 | + minor.setId(String.valueOf(idWorker.nextId())); | |
229 | 224 | if(oConvertUtils.isNotEmpty(houseFamily) && oConvertUtils.isNotEmpty(minor.getHouseholdNum())){ |
230 | 225 | String houseNum=minor.getHouseholdNum(); |
231 | 226 | Family family=houseFamily.get(houseNum); |
... | ... | @@ -264,9 +259,9 @@ public class MinorServiceImpl extends ServiceImpl<MinorMapper, Minor> implements |
264 | 259 | list.forEach(s -> { |
265 | 260 | if(oConvertUtils.isNotEmpty(s)){ |
266 | 261 | minorMapper.insert(s); |
267 | - if(oConvertUtils.isNotEmpty(s.getFamilies())){ | |
268 | - if(s.getFamilies().size()>0){ | |
269 | - familyMapper.insertBatch(s.getFamilies()); | |
262 | + if(oConvertUtils.isNotEmpty(s.getFamilyList())){ | |
263 | + if(s.getFamilyList().size()>0){ | |
264 | + familyMapper.insertBatch(s.getFamilyList()); | |
270 | 265 | } |
271 | 266 | } |
272 | 267 | } | ... | ... |
juvenile-prosecution-vue/src/views/business/MinorList.vue
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <a-card :bordered="false"> |
3 | 3 | <!-- 查询区域 --> |
4 | 4 | <div class="table-page-search-wrapper"> |
5 | - <a-form layout="inline" @keyup.enter.native="searchQuery"> | |
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery" :label-col="labelCol" labelAlign="right"> | |
6 | 6 | <a-row :gutter="24"> |
7 | 7 | <a-col :md="6" :sm="12"> |
8 | 8 | <a-form-item label="姓名"> |
... | ... | @@ -10,7 +10,17 @@ |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 12 | <a-col :md="6" :sm="12"> |
13 | - <a-form-item label="是否重点关注"> | |
13 | + <a-form-item label="身份证号"> | |
14 | + <a-input placeholder="输入身份证号查询" v-model="queryParam.identity"></a-input> | |
15 | + </a-form-item> | |
16 | + </a-col> | |
17 | + <a-col :md="6" :sm="8"> | |
18 | + <a-form-item label="性别"> | |
19 | + <j-dict-select-tag v-model="queryParam.gender" dictCode="sex" placeholder="请选择性别" /> | |
20 | + </a-form-item> | |
21 | + </a-col> | |
22 | + <a-col :md="6" :sm="12"> | |
23 | + <a-form-item label="重点关注" :label-col="labelCol2"> | |
14 | 24 | <a-select v-model="queryParam.isReason" placeholder="请选择" > |
15 | 25 | <a-select-option value="0">全部</a-select-option> |
16 | 26 | <a-select-option value="1">是</a-select-option> |
... | ... | @@ -18,21 +28,42 @@ |
18 | 28 | </a-select> |
19 | 29 | </a-form-item> |
20 | 30 | </a-col> |
21 | - <a-col :md="6" :sm="8"> | |
22 | - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |
23 | - <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |
24 | - </span> | |
31 | + <a-col :md="6" :sm="12"> | |
32 | + <a-form-item label="学校"> | |
33 | + <a-input placeholder="输入学校名称查询" v-model="queryParam.schoolName"></a-input> | |
34 | + </a-form-item> | |
35 | + </a-col> | |
36 | + <a-col :md="6" :sm="12"> | |
37 | + <a-form-item label="家庭住址"> | |
38 | + <a-input placeholder="输入家庭住址查询" v-model="queryParam.address"></a-input> | |
39 | + </a-form-item> | |
40 | + </a-col> | |
41 | + <a-col :md="6" :sm="12"> | |
42 | + <a-form-item label="年龄"> | |
43 | + <a-select v-model="queryParam.age" placeholder="请选择" > | |
44 | + <a-select-option value="0">全部</a-select-option> | |
45 | + <a-select-option value="6">6岁以下</a-select-option> | |
46 | + <a-select-option value="12">6岁-12岁</a-select-option> | |
47 | + <a-select-option value="18">12岁-18岁</a-select-option> | |
48 | + </a-select> | |
49 | + </a-form-item> | |
50 | + </a-col> | |
51 | + <a-col :md="6" :sm="12"> | |
52 | + <a-form-item label="重点关注原因" :label-col="labelCol2"> | |
53 | + <a-input placeholder="输入重点关注原因查询" v-model="queryParam.reason"></a-input> | |
54 | + </a-form-item> | |
25 | 55 | </a-col> |
26 | 56 | </a-row> |
27 | 57 | </a-form> |
28 | 58 | |
29 | - <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
59 | + <a-button @click="handleAdd" type="primary" icon="plus" >新增</a-button> | |
30 | 60 | <a-button type="primary" icon="download" @click="handleExportXls('未检人员模板')" style="margin-left:8px;">模板导出 |
31 | 61 | </a-button> |
32 | 62 | <a-upload style="margin-left:8px;" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" |
33 | 63 | :action="importExcelUrl" @change="handleImportExcel"> |
34 | 64 | <a-button type="primary" icon="import">导入</a-button> |
35 | 65 | </a-upload> |
66 | + <a-button type="primary" @click="searchQuery" icon="search" style="margin-left:8px;">查询</a-button> | |
36 | 67 | <a-dropdown v-if="selectedRowKeys.length > 0" style="margin-left:8px;"> |
37 | 68 | <a-menu slot="overlay"> |
38 | 69 | <a-menu-item key="1" @click="batchDel"> |
... | ... | @@ -72,10 +103,10 @@ |
72 | 103 | <j-ellipsis :value="text" :length="15" /> |
73 | 104 | </span> |
74 | 105 | <span slot="action" slot-scope="text, record"> |
75 | - <a @click="handleEdit(record)">编辑</a> | |
76 | - <a-divider type="vertical" /> | |
77 | 106 | <a @click="handleDetail(record)">查看</a> |
78 | 107 | <a-divider type="vertical" /> |
108 | + <a @click="handleEdit(record)">编辑</a> | |
109 | + <a-divider type="vertical" /> | |
79 | 110 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
80 | 111 | <a>删除</a> |
81 | 112 | </a-popconfirm> |
... | ... | @@ -140,6 +171,8 @@ export default { |
140 | 171 | }, |
141 | 172 | data() { |
142 | 173 | return { |
174 | + labelCol: { style: { width: '70px' } }, | |
175 | + labelCol2: { style: { width: '100px' } }, | |
143 | 176 | activeKey: '1', |
144 | 177 | infoVisible: false, |
145 | 178 | info: {}, |
... | ... | @@ -170,7 +203,8 @@ export default { |
170 | 203 | dataIndex: 'age', |
171 | 204 | customRender: function(text, record) { |
172 | 205 | return GetAge(record.identity) |
173 | - } | |
206 | + }, | |
207 | + sorter: true | |
174 | 208 | }, |
175 | 209 | { |
176 | 210 | title: '性别', |
... | ... | @@ -181,7 +215,8 @@ export default { |
181 | 215 | title: '学校名称', |
182 | 216 | align: 'center', |
183 | 217 | dataIndex: 'schoolName', |
184 | - scopedSlots: { customRender: 'longText' } | |
218 | + scopedSlots: { customRender: 'longText' }, | |
219 | + sorter: true | |
185 | 220 | }, |
186 | 221 | { |
187 | 222 | title: '入学年份', |
... | ... | @@ -197,7 +232,8 @@ export default { |
197 | 232 | title: '家庭住址', |
198 | 233 | align: 'center', |
199 | 234 | dataIndex: 'address', |
200 | - scopedSlots: { customRender: 'longText' } | |
235 | + scopedSlots: { customRender: 'longText' }, | |
236 | + sorter: true | |
201 | 237 | }, |
202 | 238 | { |
203 | 239 | title: '身份证号', |
... | ... | @@ -218,7 +254,8 @@ export default { |
218 | 254 | title: '重点关注原因', |
219 | 255 | align: 'center', |
220 | 256 | dataIndex: 'reason', |
221 | - scopedSlots: { customRender: 'longText' } | |
257 | + scopedSlots: { customRender: 'longText' }, | |
258 | + sorter: true | |
222 | 259 | }, |
223 | 260 | { |
224 | 261 | title: '操作', |
... | ... | @@ -229,6 +266,15 @@ export default { |
229 | 266 | scopedSlots: { customRender: 'action' } |
230 | 267 | } |
231 | 268 | ], |
269 | + queryParam:{ | |
270 | + name:'', | |
271 | + isReason:'0', | |
272 | + reason:'', | |
273 | + identity:'', | |
274 | + schoolName:'', | |
275 | + address:'', | |
276 | + age:'0', | |
277 | + }, | |
232 | 278 | url: { |
233 | 279 | list: '/sys/minor/list', |
234 | 280 | delete: '/sys/minor/delete', |
... | ... | @@ -265,6 +311,7 @@ export default { |
265 | 311 | align: 'center', |
266 | 312 | width: 120, |
267 | 313 | dataIndex: 'division', |
314 | + ellipsis: true, | |
268 | 315 | scopedSlots: { customRender: 'longText' } |
269 | 316 | }, |
270 | 317 | { |
... | ... | @@ -314,10 +361,11 @@ export default { |
314 | 361 | total: 0 |
315 | 362 | }, |
316 | 363 | familyLoading: false, |
317 | - queryParam:{ | |
318 | - name:'', | |
319 | - isReason:'0' | |
320 | - } | |
364 | + /* 排序参数 */ | |
365 | + isorter:{ | |
366 | + column: 'age', | |
367 | + order: 'asc', | |
368 | + }, | |
321 | 369 | } |
322 | 370 | }, |
323 | 371 | created() { |
... | ... | @@ -329,6 +377,17 @@ export default { |
329 | 377 | } |
330 | 378 | }, |
331 | 379 | methods: { |
380 | + // handleTableChange(pagination, filters, sorter) { | |
381 | + // //分页、排序、筛选变化时触发 | |
382 | + // //TODO 筛选 | |
383 | + // console.log(pagination) | |
384 | + // if (Object.keys(sorter).length > 0) { | |
385 | + // this.isorter.column = sorter.field; | |
386 | + // this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" | |
387 | + // } | |
388 | + // this.ipagination = pagination; | |
389 | + // this.loadData(); | |
390 | + // }, | |
332 | 391 | handleExportXls(fileName){ |
333 | 392 | if(!fileName || typeof fileName != "string"){ |
334 | 393 | fileName = "导出文件" | ... | ... |