From 35a6e9cedc2f44bebc9e4ec81a429eddc8b631ea Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 22 Sep 2021 11:41:42 +0800
Subject: [PATCH] 用户查询接口修改,部门名称需拼接父部门名称

---
 src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java |   32 +++++++++++++++++++++++++-------
 1 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
index 4b7bb70..3cc5039 100644
--- a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
+++ b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -458,6 +458,7 @@
 				if (null!=user){
 					ExamPayment examPayment = new ExamPayment();
 					examPayment.setWorkerId(user.getId().toString());
+					examPayment.setPaymentStatus(1);
 					examPayment.setCertificateUrl(urls);
 					examPayment.setType(1);
 					examPayment.setPaymentTime(new Date());
@@ -472,12 +473,12 @@
 
 					//数据推送
 					String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examPayment.getPaymentTime());
-					String s = "insert into sys_apply(id,type,payment_time,worker_id,apply_code,certificate_url) " +
+					String s = "insert into sys_exam_payment(id,type,payment_time,worker_id,payment_status,certificate_url) " +
 						"values(" + "'" + examPayment.getId() + "'" +
 						"," + "'" + examPayment.getType() + "'" +
 						"," + "'" + formatStr + "'" +
 						"," + "'" + examPayment.getWorkerId() + "'" +
-						"," + "'" + examPayment.getApplyCode() + "'" +
+						"," + "'" + examPayment.getPaymentStatus() + "'" +
 						"," +"'" + examPayment.getCertificateUrl() + "'" + ")";
 					FtpUtil.sqlFileUpload(s);
 
@@ -609,6 +610,7 @@
 		String fileExtension = org.springblade.core.tool.utils.FileUtil.getFileExtension(fileName);
 		Attach attach = new Attach();
 		attach.setDomain(bladeFile.getDomain());
+		attach.setTenantId("000000");
 		attach.setLink(bladeFile.getLink());
 		attach.setName(bladeFile.getName());
 		attach.setOriginalName(bladeFile.getOriginalName());
@@ -622,15 +624,31 @@
 		}
 		attachService.save(attach);
 		String[] split = bladeFile.getName().split("/");
-		String ip = FtpConstant.ip+"/zhba/picture/";
+		String ip = FtpConstant.ip+"/zhba/upload/picture/";
 		String imgurl = ip + split[2];
 		FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], in);
 		//数据同步
 		String s1 =
-			"insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,create_dept," +
+			"insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,deptid," +
 				"create_time,update_user,update_time,status,is_deleted,type,cardid";
 		if (noticeId != null) {
-			s1 += ",notice_id";
+			s1 += ",notice_id"+")" +"values(" + "'" + attach.getId() + "'" + "," +
+				"'" + attach.getTenantId() + "'" + "," +
+				"'" + imgurl + "'" + "," +
+				"'" + ip + "'" + "," +
+				"'" + split[2] + "'" + "," +
+				"'" + attach.getOriginalName() + "'" + "," +
+				"'" + attach.getExtension() + "'" + "," +
+				"'" + attach.getAttachSize() + "'" + "," +
+				"'" + attach.getCreateUser() + "'" + "," +
+				"'" + attach.getDeptid() + "'" + "," +
+				"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
+				"'" + attach.getUpdateUser() + "'" + "," +
+				"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
+				"'" + attach.getStatus() + "'" + "," +
+				"'" + attach.getIsDeleted() + "'" + "," +
+				"'" + attach.getType() + "'" + "," +
+				"'" + cardid + "'";
 		} else {
 			s1 += ") " +
 				"values(" + "'" + attach.getId() + "'" + "," +
@@ -642,7 +660,7 @@
 				"'" + attach.getExtension() + "'" + "," +
 				"'" + attach.getAttachSize() + "'" + "," +
 				"'" + attach.getCreateUser() + "'" + "," +
-				"'" + attach.getCreateDept() + "'" + "," +
+				"'" + attach.getDeptid() + "'" + "," +
 				"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
 				"'" + attach.getUpdateUser() + "'" + "," +
 				"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
@@ -652,7 +670,7 @@
 				"'" + cardid + "'";
 		}
 		if (noticeId != null) {
-			s1 += "'" + noticeId + "'" + ")";
+			s1 += ","+"'" + noticeId + "'" + ")";
 		} else {
 			s1 += ")";
 		}

--
Gitblit v1.9.3