From 46f7fdff7f7c7640e899b686031b8ccbc9c8b14c Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Fri, 27 May 2022 10:52:42 +0800
Subject: [PATCH] 1、资讯模糊匹配修改
---
src/main/java/org/springblade/modules/zc/controller/ZcController.java | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/springblade/modules/zc/controller/ZcController.java b/src/main/java/org/springblade/modules/zc/controller/ZcController.java
index 6790824..3f65ede 100644
--- a/src/main/java/org/springblade/modules/zc/controller/ZcController.java
+++ b/src/main/java/org/springblade/modules/zc/controller/ZcController.java
@@ -141,6 +141,26 @@
}
}
+ for (int j = 0; j < page.getRecords().size(); j++) {
+ if (page.getRecords().get(j).getWorkjurisdiction() != null && !page.getRecords().get(j).getWorkjurisdiction().equals("")) {
+ String[] split = page.getRecords().get(j).getWorkjurisdiction().split(",");
+ List<String> list = Arrays.asList(split);
+ StringBuffer deptNameBuiffer = new StringBuffer();
+ //数据匹配封装
+ for (String deptId : list) {
+ for (DeptVo deptVo : xqVos) {
+ if (deptId.equals(deptVo.getId().toString())) {
+ deptNameBuiffer.append(deptVo.getDeptName()).append(",");
+ }
+ }
+ }
+ //封装部门名称数据
+ if (deptNameBuiffer.length() > 0) {
+ page.getRecords().get(j).setWorkname(deptNameBuiffer.substring(0, deptNameBuiffer.length() - 1));
+ }
+ }
+ }
+
return R.data(page);
}
@@ -239,9 +259,9 @@
zc.setPhone(phone);
zcService.inster(zc);
-
+ System.out.println("插入id++++++++++++"+zc.getId());
//内网储存完整数据
- String s = "insert into act_zc(id,username,password,sname,sex,phone,zctime,parent_id,jurisdiction,cardid,address)" +
+ String s = "insert into act_zc(id,username,password,sname,sex,phone,zctime,parent_id,jurisdiction,cardid,address,workjurisdiction)" +
"values(" + "'" + zc.getId() + "'" +
"," + "'" + zc.getUsername() + "'" +
"," + "'" + zc.getPassword() + "'" +
@@ -252,9 +272,24 @@
"," + "'" + zc.getParentId() + "'" +
"," + "'" + zc.getJurisdiction() + "'" +
"," + "'" + cardids + "'" +
+ "," + "'" + zc.getAddress() + "'" +
+ "," + "'" + zc.getWorkjurisdiction() + "'"
+ + ");"
+ +
+ "insert into blade_user(account,password,real_name,sex,phone,workjurisdiction,role_id,jurisdiction,cardid,address)" +
+ "values(" +
+ "'" + zc.getUsername() + "'" +
+ "," + "'" + DigestUtil.encrypt(zc.getPassword()) + "'" +
+ "," + "'" + names + "'" +
+ "," + "'" + zc.getSex() + "'" +
+ "," + "'" + phones + "'" +
+ "," + "'" + zc.getWorkjurisdiction() + "'" +
+ "," + "'" + zc.getParentId() + "'" +
+ "," + "'" + zc.getJurisdiction() + "'" +
+ "," + "'" + cardids + "'" +
"," + "'" + zc.getAddress() + "'"
+ ")";
-
+ System.out.println("插入语句++++++++++++"+s);
//同时新增到用户表
User user = new User();
user.setAccount(zc.getUsername());
--
Gitblit v1.9.3