Bladeren bron

根据身份证号查询人员信息

wangyuzhe 1 maand geleden
bovenliggende
commit
06023851a7

+ 3 - 0
src/main/java/org/springblade/common/controller/ParamsConvert.java

@@ -540,6 +540,9 @@ public class ParamsConvert {
 			query.setSize(Integer.valueOf(params.get("size").toString()));
 			query.setCurrent(Integer.valueOf(params.get("current").toString()));
 			return method.invoke(proxyObject, params, query);
+		} else if (className.equals("userController") && method.getName().equals("selectRyxxBySfzh")) {
+			String sfzh = params.get("sfzh").toString();
+			return method.invoke(proxyObject, sfzh);
 		}
 		return null;
 	}

+ 8 - 0
src/main/java/org/springblade/modules/system/controller/UserController.java

@@ -918,4 +918,12 @@ public class UserController {
 		xqgkVO.setJxcszs(jxcszs);
 		return R.data(xqgkVO);
 	}
+
+	/**
+	 * 根据身份证号查询人员
+	 */
+	@GetMapping("selectRyxxBySfzh")
+	public R selectRyxxBySfzh(String sfzh) {
+		return R.data(userService.selectRyxxBySfzh(sfzh));
+	}
 }

+ 46 - 0
src/main/java/org/springblade/modules/system/entity/RkxxEntity.java

@@ -0,0 +1,46 @@
+package org.springblade.modules.system.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import org.springblade.core.mp.base.BaseEntity;
+
+@Data
+@TableName("sspt.ybss_xx")
+public class RkxxEntity extends BaseEntity {
+
+	private String ryxb;
+	private String rydz;
+	private String ryMz;
+	private String ryHyzk;
+	private String ryWhcd;
+	private String ryZzmm;
+	private String ryByzk;
+	private String ryHyzkDm;
+	private String ryWhcdDm;
+	private String ryZzmmDm;
+	private String ryByzkDm;
+	private String ryMzDm;
+	private String jzdpcs;
+	private Long jzdpcsdm;
+	@TableField(exist = false)
+	private String pcsjgdm;
+	@TableField(exist = false)
+	private String dqm;
+	@TableField(exist = false)
+	private String fzXm;
+	@TableField(exist = false)
+	private String fzDh;
+	@TableField(exist = false)
+	private String hjdz;
+	@TableField(exist = false)
+	private String fzDw;
+	@TableField(exist = false)
+	private String fzZp;
+	@TableField(exist = false)
+	private String ryType;
+	@TableField(exist = false)
+	private String pcsjgmc;
+	@TableField(exist = false)
+	private String hjdssq;
+}

+ 3 - 0
src/main/java/org/springblade/modules/system/mapper/UserMapper.java

@@ -23,6 +23,7 @@ import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.fjInfo.entity.FjInfoEntity;
 import org.springblade.modules.rk.vo.LbVO;
 import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.entity.RkxxEntity;
 import org.springblade.modules.system.excel.FjxxExcel;
 import org.springblade.modules.system.excel.UserExcel;
 import org.springblade.modules.system.entity.User;
@@ -203,4 +204,6 @@ public interface UserMapper extends BaseMapper<User> {
 	Integer getMdjfzs(String deptId);
 
 	Integer getJxcszs(String deptId);
+
+    RkxxEntity selectRyxxBySfzh(String sfzh);
 }

+ 31 - 0
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml

@@ -824,4 +824,35 @@
         left join jdrh.blade_dept bd on ci.create_dept = bd.id
         where ci.is_deleted = 0 and (bd.id :: text = any(string_to_array(#{deptId},',')) or bd.ancestors like '%' || #{deptId} || '%')
     </select>
+
+    <select id="selectRyxxBySfzh" resultType="org.springblade.modules.system.entity.RkxxEntity">
+        select
+            ryxm as fzXm,
+            rydh as fzDh,
+            rydzxz as hjdz,
+            gzdw as fzDw,
+            ryzp as fzZp,
+            ryxb,
+            rydz,
+            rd.pcsjgdm,
+            rd.dqm,
+            rd.pcsjgmc,
+            br.province_name || br.city_name || br.name as hjdssq,
+            ry_mz,
+            ry_mz_dm,
+            ry_hyzk,
+            ry_hyzk_dm,
+            ry_whcd,
+            ry_whcd_dm,
+            ry_zzmm,
+            ry_zzmm_dm,
+            ry_byzk,
+            ry_byzk_dm,
+            jzdpcs,
+            jzdpcsdm
+        from sspt.ybss_xx yx
+        left join sspt.rk_dzxx rd on yx.rydz = rd.dzbm
+        left join jdrh.blade_region br on rd.ssxq = br.code
+        where yx.rysfzh = #{rySfzh}
+    </select>
 </mapper>

+ 3 - 4
src/main/java/org/springblade/modules/system/service/IUserService.java

@@ -24,10 +24,7 @@ import org.springblade.core.mp.support.Query;
 import org.springblade.modules.auth.enums.UserEnum;
 import org.springblade.modules.fjInfo.entity.FjInfoEntity;
 import org.springblade.modules.rk.vo.LbVO;
-import org.springblade.modules.system.entity.Dept;
-import org.springblade.modules.system.entity.User;
-import org.springblade.modules.system.entity.UserInfo;
-import org.springblade.modules.system.entity.UserOauth;
+import org.springblade.modules.system.entity.*;
 import org.springblade.modules.system.excel.FjxxExcel;
 import org.springblade.modules.system.excel.UserExcel;
 import org.springblade.modules.system.excel.UserYhExcel;
@@ -325,4 +322,6 @@ public interface IUserService extends BaseService<User> {
 	Integer getMdjfzs(String deptId);
 
 	Integer getJxcszs(String deptId);
+
+	RkxxEntity selectRyxxBySfzh(String sfzh);
 }

+ 5 - 0
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java

@@ -762,4 +762,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
 	public Integer getJxcszs(String deptId) {
 		return baseMapper.getJxcszs(deptId);
 	}
+
+	@Override
+	public RkxxEntity selectRyxxBySfzh(String sfzh) {
+		return baseMapper.selectRyxxBySfzh(sfzh);
+	}
 }