From cb04ed62736efe70cf5babe534220b4ae4c1ca67 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 20 Jan 2022 21:08:42 +0800
Subject: [PATCH] 1. 定时任务调整 2. 成绩修改审核通过修改状态调整 3. 考试统计查询修改

---
 src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java |  102 ++++++++++++++++++++++++++-------------------------
 1 files changed, 52 insertions(+), 50 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
index a703122..f647ebd 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -23,7 +23,6 @@
 import com.google.zxing.WriterException;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.ibatis.annotations.Param;
 import org.springblade.common.cache.SysCache;
 import org.springblade.common.constant.AgeUtil;
 import org.springblade.common.constant.CommonConstant;
@@ -63,7 +62,6 @@
 import org.springblade.modules.system.wrapper.UserWrapper;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -190,11 +188,11 @@
 			List<UserVO> userVOS = baseMapper.selectUserPagesByAge(page, user);
 			//机构名称拼接
 			userVOS.forEach(userVO -> {
-				if (null != userVO.getCardid() && userVO.getCardid() != "") {
-					userVO.setAge(AgeUtil.idCardToAge(userVO.getCardid()));
-				} else {
-					userVO.setAge(null);
-				}
+//				if (null != userVO.getCardid() && userVO.getCardid() != "") {
+//					userVO.setAge(AgeUtil.idCardToAge(userVO.getCardid()));
+//				} else {
+//					userVO.setAge(null);
+//				}
 				if (null!=userVO.getDeptId()) {
 					List<String> list = baseMapper.getDeptName(userVO.getDeptId());
 					if (list.size() > 1) {
@@ -220,11 +218,11 @@
 			List<UserVO> userVOS = baseMapper.selectUserPages(page, user);
 			//机构名称拼接
 			userVOS.forEach(userVO -> {
-				if (null != userVO.getCardid() && userVO.getCardid() != "") {
-					userVO.setAge(AgeUtil.idCardToAge(userVO.getCardid()));
-				} else {
-					userVO.setAge(null);
-				}
+//				if (null != userVO.getCardid() && userVO.getCardid() != "") {
+//					userVO.setAge(AgeUtil.idCardToAge(userVO.getCardid()));
+//				} else {
+//					userVO.setAge(null);
+//				}
 				if (null!=userVO.getDeptId()) {
 					List<String> list = baseMapper.getDeptName(userVO.getDeptId());
 					if (list.size() > 1) {
@@ -1589,49 +1587,53 @@
 	 */
 	@Override
 	public void importQrCode(List<QrCodeExcel> data, Boolean isCovered, String deptId) {
-//		String url = "http://223.82.109.183:2080/securityInfo.html";
-//		data.forEach(qrCodeExcel -> {
-//			if (null!=qrCodeExcel.getSecuritynumber()) {
-//				String encoded = null;
-//				try {
-//					//中文字符串编码
-//					encoded = URLEncoder.encode(qrCodeExcel.getSecuritynumber(),"UTF-8");
-//				} catch (UnsupportedEncodingException e) {
-//					e.printStackTrace();
-//				}
-//				//url 拼接
-//				String content = url + "?securityNumber=" + encoded;
-//				byte[] qrCodeImage = new byte[0];
-//				try {
-//					//生成二维码字节流
-//					qrCodeImage = QRCodeUtil.getQRCodeImage(content, 350, 350);
-//				} catch (WriterException e) {
-//					e.printStackTrace();
-//				} catch (IOException e) {
-//					e.printStackTrace();
-//				}
-//				String path = "D:\\QrCode\\";
-//				FileOutputStream fileOutputStream = null;
-//				try {
-//					fileOutputStream = new FileOutputStream(path+qrCodeExcel.getSecuritynumber()+".png");
-//				} catch (FileNotFoundException e) {
-//					e.printStackTrace();
-//				}
-//				try {
-//					//图片下载到本地
-//					fileOutputStream.write(qrCodeImage,0,qrCodeImage.length);
-//					fileOutputStream.flush();
-//					fileOutputStream.close();
-//				} catch (IOException e) {
-//					e.printStackTrace();
-//				}
-//			}
-//		});
+		String url = "http://223.82.109.183:2080/securityInfo.html";
+		//二维码生成
+		data.forEach(qrCodeExcel -> {
+			if (null!=qrCodeExcel.getSecuritynumber()) {
+				String encoded = null;
+				try {
+					//中文字符串编码
+					encoded = URLEncoder.encode(qrCodeExcel.getSecuritynumber(),"UTF-8");
+				} catch (UnsupportedEncodingException e) {
+					e.printStackTrace();
+				}
+				//url 拼接
+				String content = url + "?securityNumber=" + encoded;
+				byte[] qrCodeImage = new byte[0];
+				try {
+					//生成二维码字节流
+					qrCodeImage = QRCodeUtil.getQRCodeImage(content, 350, 350);
+				} catch (WriterException e) {
+					e.printStackTrace();
+				} catch (IOException e) {
+					e.printStackTrace();
+				}
+				String path = "D:\\QrCode\\";
+				FileOutputStream fileOutputStream = null;
+				try {
+					fileOutputStream = new FileOutputStream(path+qrCodeExcel.getSecuritynumber()+".png");
+				} catch (FileNotFoundException e) {
+					e.printStackTrace();
+				}
+				try {
+					//图片下载到本地
+					fileOutputStream.write(qrCodeImage,0,qrCodeImage.length);
+					fileOutputStream.flush();
+					fileOutputStream.close();
+				} catch (IOException e) {
+					e.printStackTrace();
+				}
+			}
+		});
 		//头像生成
 		data.forEach(qrCodeExcel -> {
 			if (null!=qrCodeExcel.getSecuritynumber()) {
 				//查询用户头像url
 				User user = new User();
+				user.setRealName(qrCodeExcel.getRealName());
+				user.setStatus(1);
+				user.setIsDeleted(0);
 				user.setSecuritynumber(qrCodeExcel.getSecuritynumber());
 				User user1 = this.getOne(Condition.getQueryWrapper(user));
 				//url 拼接

--
Gitblit v1.9.3