Browse Source

返乡人员 2

shiqian 3 years ago
parent
commit
1c9e8f0186

+ 2 - 4
boman-api/boman-domain/src/main/java/com/boman/domain/Fxry.java

@@ -1,11 +1,9 @@
 package com.boman.domain;
 
-import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.sql.Timestamp;
 import java.util.Date;
 
 /**
@@ -43,8 +41,8 @@ public class Fxry implements Serializable {
     /** 省外工作地址 **/
     private String addrOutsideProvince;
     /** 拟返回时间 ***/
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date intendedReturnTime;
+//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String intendedReturnTime;
     private String telephone;
     /** 备注 ***/
     private String remark;

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

@@ -1069,7 +1069,40 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
             PageHelper.startPage(pageNum, pageSize, orderBy);
         }
 
-        return vaccineInfoMapper.listByRlry(vaccineInfoOperation);
+        List<VaccineInfoOperation> infoOperations = vaccineInfoMapper.listByRlry(vaccineInfoOperation);
+        for (VaccineInfoOperation infoOperation : infoOperations) {
+            String province = infoOperation.getProvince(); //省
+            String city = infoOperation.getCity();  //市
+            String region = infoOperation.getRegion();   //区
+            String domicile = infoOperation.getDomicile(); //户籍地
+            StringBuilder sbDomicile = new StringBuilder();
+            StringBuilder sbNowIn = new StringBuilder();
+            if (StringUtils.isNotBlank(province)) {
+                sbDomicile.append(province);
+                sbNowIn.append(province);
+            }
+            if (StringUtils.isNotBlank(city)) {
+                sbDomicile.append(city);
+                sbNowIn.append(city);
+            }
+            if (StringUtils.isNotBlank(region)) {
+                sbDomicile.append(region);
+                sbNowIn.append(region);
+            }
+            if (StringUtils.isNotBlank(domicile)) {
+                sbDomicile.append(domicile);
+            }
+
+            String nowIn = infoOperation.getNowIn(); //现居地
+            if (StringUtils.isNotBlank(nowIn)) {
+                sbNowIn.append(nowIn);
+            }
+
+            infoOperation.setDomicileSelect(sbDomicile.toString());
+            infoOperation.setNowInSelect(sbNowIn.toString());
+        }
+
+        return infoOperations;
     }
 
     @Override

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

@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from fxry
         where `delete` = '否'
         <if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
-        <if test="sex != null and sex != ''">and `sex` like concat('%', #{sex}, '%')</if>
+        <if test="sex != null and sex != ''">and `sex` = #{sex}</if>
         <if test="idCard != null and idCard != ''">and `id_card` like concat('%', #{idCard}, '%')</if>
         <if test="telephone != null and telephone != ''">and telephone = #{telephone}</if>
         order by create_time desc

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

@@ -172,7 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="listByRlry" resultMap="VaccineInfoResult">
-        select vi.id, vi.user_name, vi.phone_num, vi.id_card, vi.gender
+        select vi.id, vi.user_name, vi.phone_num, vi.id_card, vi.gender, vi.province, vi.city, vi.region, vi.now_in
         from vaccine_info vi
         <where>
             vi.is_del = 'N'