浏览代码

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 年之前
父节点
当前提交
93861b124e
共有 16 个文件被更改,包括 124 次插入130 次删除
  1. 9 1
      edu-thirdparty/src/main/java/com/keao/edu/thirdparty/storage/provider/KS3StoragePlugin.java
  2. 9 0
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamOrganizationRelationDao.java
  3. 9 0
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamRegistrationDao.java
  4. 9 0
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamRoomDao.java
  5. 9 0
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/StudentExamResultDao.java
  6. 11 2
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/ExamRoomStudentRelationService.java
  7. 2 9
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamOrganizationRelationServiceImpl.java
  8. 6 5
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamRoomServiceImpl.java
  9. 17 1
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamRoomStudentRelationServiceImpl.java
  10. 1 1
      edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/StudentExamResultServiceImpl.java
  11. 16 4
      edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamOrganizationRelationMapper.xml
  12. 4 0
      edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRegistrationMapper.xml
  13. 3 0
      edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRoomMapper.xml
  14. 5 0
      edu-user/edu-user-biz/src/main/resources/config/mybatis/StudentExamResultMapper.xml
  15. 7 0
      edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamOrganizationRelationController.java
  16. 7 107
      edu-util/src/main/java/com/keao/edu/util/excel/POIUtil.java

+ 9 - 1
edu-thirdparty/src/main/java/com/keao/edu/thirdparty/storage/provider/KS3StoragePlugin.java

@@ -3,6 +3,7 @@ package com.keao.edu.thirdparty.storage.provider;
 import java.io.File;
 import java.io.IOException;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.util.IOUtils;
 import org.springframework.beans.factory.DisposableBean;
 import org.springframework.beans.factory.InitializingBean;
@@ -39,6 +40,9 @@ public class KS3StoragePlugin implements StoragePlugin, InitializingBean, Dispos
 
 	@Value("${storage.oss.bucketName:daya}")
 	private String bucketName;
+	
+	@Value("${storage.oss.endpoint:cdn.colexiu.com}")
+	private String cdnEndpoint;
 
 	private Ks3 client;
 
@@ -89,7 +93,11 @@ public class KS3StoragePlugin implements StoragePlugin, InitializingBean, Dispos
 
 		client.putObject(request);
 
-		return "https://" + bucketName + "." + endpoint + "/" + folderName + "/" + file.getName();
+		if (StringUtils.isBlank(cdnEndpoint)) {
+			return "https://" + bucketName + "." + endpoint + "/" + folderName + "/" + file.getName();
+		} else {
+			return "https://" + cdnEndpoint + "/" + folderName + "/" + file.getName();
+		}
 	}
 
 	@Override

+ 9 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamOrganizationRelationDao.java

@@ -136,4 +136,13 @@ public interface ExamOrganizationRelationDao extends BaseDAO<Long, ExamOrganizat
      */
     List<ExamOrganizationRelation> getExamOrganizationRelations(@Param("examId") Long examId, @Param("organIds") List<Integer> organIds);
 
+    /**
+     * @describe 统计指定考级项目下已发送报名链接的分部数量
+     * @author Joburgess
+     * @date 2020.08.06
+     * @param examId:
+     * @return int
+     */
+    int countExamIsSendUrlOrgans(@Param("examId") Long examId);
+
 }

+ 9 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamRegistrationDao.java

@@ -168,4 +168,13 @@ public interface ExamRegistrationDao extends BaseDAO<Long, ExamRegistration> {
      * @return
      */
     StuRecordDetailDto getStuRecordDetail(Long examRegistrationId);
+
+    /**
+     * @describe 获取未排考的报名学员
+     * @author Joburgess
+     * @date 2020.08.06
+     * @param examId:
+     * @return java.util.List<com.keao.edu.user.entity.ExamRegistration>
+     */
+    List<ExamRegistration> getNotInRoomStudents(@Param("examId") Long examId);
 }

+ 9 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamRoomDao.java

@@ -100,4 +100,13 @@ public interface ExamRoomDao extends BaseDAO<Long, ExamRoom> {
      * @return java.util.List<com.keao.edu.user.api.entity.ExamRoom>
      */
     List<ExamRoom> getHistoryOpenExamRoom();
+
+    /**
+     * @describe 统计已发送考场数量
+     * @author Joburgess
+     * @date 2020.08.06
+     * @param examId:
+     * @return int
+     */
+    int countSendExamPlanRooms(@Param("examId") Long examId);
 }

+ 9 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/StudentExamResultDao.java

@@ -114,4 +114,13 @@ public interface StudentExamResultDao extends BaseDAO<Long, StudentExamResult> {
      * @return int
      */
     int countExamNoResultStudentNum(@Param("examId") Long examId);
+
+    /**
+     * @describe 统计考级项目结果记录数量
+     * @author Joburgess
+     * @date 2020.08.06
+     * @param examId:
+     * @return int
+     */
+    int countExamResultRecordNum(@Param("examId") Long examId);
 }

+ 11 - 2
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/ExamRoomStudentRelationService.java

@@ -3,10 +3,9 @@ package com.keao.edu.user.service;
 import com.keao.edu.common.page.PageInfo;
 import com.keao.edu.common.service.BaseService;
 import com.keao.edu.im.api.entity.PublishMessageDto;
-import com.keao.edu.user.dto.ExamRoomStudentRelationDto;
 import com.keao.edu.user.api.entity.ExamRoomStudentRelation;
+import com.keao.edu.user.dto.ExamRoomStudentRelationDto;
 import com.keao.edu.user.dto.NeedCheckingDetailDto;
-import com.keao.edu.user.dto.RoomStudentListDto;
 import com.keao.edu.user.dto.StuRecordDetailDto;
 import com.keao.edu.user.page.ExamRoomStudentRelationQueryInfo;
 
@@ -34,6 +33,16 @@ public interface ExamRoomStudentRelationService extends BaseService<Long, ExamRo
     void addStudentForRoom(Long examRoomId, String registIds, Integer organId);
 
     /**
+     * @describe 自动分配学员到考场
+     * @author Joburgess
+     * @date 2020.08.06
+     * @param examRoomId:
+     * @param selfOrganId:
+     * @return void
+     */
+    void autoSplitStudentToRoom(Long examRoomId, Integer selfOrganId);
+
+    /**
      * @describe 更换学员考场
      * @author Joburgess
      * @date 2020.07.08

+ 2 - 9
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamOrganizationRelationServiceImpl.java

@@ -1,6 +1,5 @@
 package com.keao.edu.user.service.impl;
 
-import cfca.sadk.org.bouncycastle.apache.bzip2.BZip2Constants;
 import com.keao.edu.auth.api.client.SysUserFeignService;
 import com.keao.edu.auth.api.entity.SysUser;
 import com.keao.edu.common.dal.BaseDAO;
@@ -11,7 +10,6 @@ import com.keao.edu.common.page.PageInfo;
 import com.keao.edu.common.service.SysMessageService;
 import com.keao.edu.common.service.impl.BaseServiceImpl;
 import com.keao.edu.common.tenant.TenantContextHolder;
-import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
 import com.keao.edu.thirdparty.message.provider.YimeiSmsPlugin;
 import com.keao.edu.user.dao.*;
 import com.keao.edu.user.dto.ExamOrganStatisticsDto;
@@ -27,7 +25,6 @@ import com.keao.edu.user.service.ShortUrlService;
 import com.keao.edu.user.service.SysConfigService;
 import com.keao.edu.util.collection.MapUtil;
 import com.keao.edu.util.date.DateUtil;
-import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -35,7 +32,6 @@ import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
-import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.util.*;
@@ -204,7 +200,6 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 			throw new BizException("合作单位信息错误");
 		}
 
-		Map<Integer, Organization> idOrganMap = organs.stream().collect(Collectors.toMap(Organization::getId, o -> o));
 		for (ExamOrganizationRelation og : organizationRelations) {
 			if(organIdsWithExam.contains(og.getOrganId())){
 				throw new BizException("合作单位冲突");
@@ -234,6 +229,7 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 			og.setSelfPaymentAmount(BigDecimal.ZERO);
 		}
 		examOrganizationRelationDao.batchInsert(organizationRelations);
+		sendUrl(examOrganizationRelation.getId().intValue(), selfOrganId);
 	}
 
 	@Override
@@ -286,8 +282,6 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 			throw new BizException("请指定考级项目");
 		}
 
-		List<Integer> childOrganIds = organizationService.getNextLevelOrganIds(selfOrganId, false);
-
 		ExamOrganStatisticsDto examOrganizationRelation = examOrganizationRelationDao.getExamOrganizationRelation(examId.longValue(), selfOrganId);
 		if(Objects.isNull(examOrganizationRelation)){
 			throw new BizException("数据异常");
@@ -296,8 +290,7 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 			throw new BizException("发送失败");
 		}
 
-		List<ExamOrganizationRelation> examOrgans = examOrganizationRelationDao.getExamOrganizationRelations(examId.longValue(), childOrganIds);
-		Set<Integer> existOrganizationIds = examOrgans.stream().map(ExamOrganizationRelation::getOrganId).collect(Collectors.toSet());
+		List<ExamOrganizationRelation> examOrgans = examOrganizationRelationDao.getExamOrganizationRelations(examId.longValue(), null);
 
 		ExaminationBasic examinationBasic = examinationBasicDao.get(examId.longValue());
 		if(Objects.isNull(examinationBasic)){

+ 6 - 5
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamRoomServiceImpl.java

@@ -28,7 +28,6 @@ import com.keao.edu.user.api.enums.ExamModeEnum;
 import com.keao.edu.user.dao.*;
 import com.keao.edu.user.dto.*;
 import com.keao.edu.user.entity.*;
-import com.keao.edu.user.enums.ExamStatusEnum;
 import com.keao.edu.user.page.ExamRoomListQueryInfo;
 import com.keao.edu.user.page.ExamRoomQueryInfo;
 import com.keao.edu.user.service.*;
@@ -552,7 +551,9 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 						examName, examDayStr, examTimeStr, locationName, downloadUrl + student.getExamRegistrationId());
 			}
 
-			needUpdateExamRooms.add(new ExamRoom(examRoom.getId(), 1));
+            ExamRoom newExamRoom = new ExamRoom(examRoom.getId(), 1);
+			newExamRoom.setExamLocationId(examRoom.getExamLocationId());
+            needUpdateExamRooms.add(newExamRoom);
 
 			if(!teacherExamRoomsMap.containsKey(examRoom.getMainTeacherUserId())){
 				teacherExamRoomsMap.put(examRoom.getMainTeacherUserId(), new ArrayList<>());
@@ -572,8 +573,8 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 		Map<Integer, String> idTeacherPhoneMap = this.getMap("sys_user", "id_", "phone_", new ArrayList(teacherExamRoomsMap.keySet()), Integer.class, String.class);
 		for (Map.Entry<Integer, List<ExamRoom>> teacherRoomEntry : teacherExamRoomsMap.entrySet()) {
 			String teacherPhone = idTeacherPhoneMap.get(teacherRoomEntry.getKey());
-			Date examStartTime = teacherRoomEntry.getValue().stream().min(Comparator.comparing(ExamRoom::getExamStartTime)).get().getExamStartTime();
-			String examStartTimeStr = DateUtil.dateToString(examStartTime, "MM月dd日 HH时mm分");
+			List<String> examStartTimes = teacherRoomEntry.getValue().stream().map(e-> DateUtil.dateToString(e.getExamStartTime(), "MM月dd日 HH点mm分")).collect(Collectors.toList());
+			String examStartTimeStr = StringUtils.join(examStartTimes, " ");
 			int examRoomNum = teacherRoomEntry.getValue().size();
 			Map<Integer, String> phoneMap = new HashMap<>();
 			phoneMap.put(teacherRoomEntry.getKey(), teacherPhone);
@@ -594,7 +595,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 		if(!CollectionUtils.isEmpty(studentExamResults)){
 			studentExamResultDao.batchInsert(studentExamResults);
 		}
-		return BaseController.succeed("发送成功");
+		return BaseController.succeedMsg("发送成功");
 	}
 
 	@Override

+ 17 - 1
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamRoomStudentRelationServiceImpl.java

@@ -113,7 +113,10 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 			throw new BizException("考级结果已确认");
 		}
 		Date now=new Date();
-		if(now.compareTo(examRoom.getExamStartTime())>0||DateUtil.isSameDay(now, examRoom.getExamStartTime())){
+		if(DateUtil.isSameDay(now, examRoom.getExamStartTime())){
+			throw new BizException("考试当天不可添加学员");
+		}
+		if(now.compareTo(examRoom.getExamStartTime())>0){
 			throw new BizException("无法添加学员");
 		}
 
@@ -252,6 +255,19 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
 	}
 
 	@Override
+	public void autoSplitStudentToRoom(Long examRoomId, Integer selfOrganId) {
+		ExaminationBasic examinationBasic = examinationBasicDao.get(examRoomId);
+		if(Objects.isNull(examinationBasic)){
+			throw new BizException("考级项目不存在");
+		}
+		int sendExamPlanRooms = examRoomDao.countSendExamPlanRooms(examRoomId);
+		if(sendExamPlanRooms>0){
+			throw new BizException("已发送考试安排,请手动处理未排考学员");
+		}
+//		examRegistrationDao.getStuRecordDetail()
+	}
+
+	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public void changeStudentExamRoom(Long registId, Long examRoomId, Integer organId) {
 		if(Objects.isNull(registId)){

+ 1 - 1
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/StudentExamResultServiceImpl.java

@@ -147,7 +147,7 @@ public class StudentExamResultServiceImpl extends BaseServiceImpl<Long, StudentE
 		Set<Long> examIds = studentExamResults.stream().map(StudentExamResult::getExaminationBasicId).collect(Collectors.toSet());
 		Map<Long, String> examIdNameMap = this.getMap("examination_basic", "id_", "name_", new ArrayList(examIds), Long.class, String.class);
 
-		Set<Subject> subjectIds = studentExamResults.stream().map(e -> e.getExamRegistration().getSubject()).collect(Collectors.toSet());
+		Set<Integer> subjectIds = studentExamResults.stream().map(e -> e.getExamRegistration().getSubjectId()).collect(Collectors.toSet());
 		Map<Integer, String> subjectIdNameMap = this.getMap("subject", "id_", "name_", new ArrayList(subjectIds), Integer.class, String.class);
 
 

+ 16 - 4
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamOrganizationRelationMapper.xml

@@ -373,10 +373,13 @@
 		SELECT * FROM exam_organization_relation WHERE examination_basic_id_=#{examId} AND organ_id_=#{OrganId} FOR UPDATE
 	</select>
 	<select id="getExamOrganizationRelations" resultMap="ExamOrganizationRelation">
-		SELECT * FROM exam_organization_relation WHERE examination_basic_id_=#{examId} AND organ_id_ IN
-		<foreach collection="organIds" item="organId" separator="," open="(" close=")">
-			#{organId}
-		</foreach>
+		SELECT * FROM exam_organization_relation WHERE examination_basic_id_=#{examId}
+		<if test="organIds != null">
+			AND organ_id_ IN
+			<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+				#{organId}
+			</foreach>
+		</if>
 	</select>
 
 	<select id="getExamChildOrgans" resultMap="ExamOrganizationRelationExtraDto">
@@ -394,5 +397,14 @@
 			</foreach>
 		</if>
 	</select>
+    <select id="countExamIsSendUrlOrgans" resultType="int">
+		SELECT
+			COUNT( organ_id_ )
+		FROM
+			exam_organization_relation
+		WHERE
+			examination_basic_id_ = #{examId}
+			AND send_url_flag_ = 1;
+	</select>
 
 </mapper>

+ 4 - 0
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -634,4 +634,8 @@
 		LEFT JOIN student_exam_result ser ON ser.exam_registration_id_ = er.id_
 		WHERE er.id_ = #{examRegistrationId} LIMIT 1
 	</select>
+
+    <select id="getNotInRoomStudents" resultMap="ExamRegistration">
+
+	</select>
 </mapper>

+ 3 - 0
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRoomMapper.xml

@@ -444,4 +444,7 @@
 			exam_start_time_ &lt; NOW( )
 			AND open_flag_ =1
 	</select>
+    <select id="countSendExamPlanRooms" resultType="int">
+		SELECT COUNT(id_) FROM exam_room WHERE examination_basic_id_=#{examId} AND exam_plan_push_flag_=1
+	</select>
 </mapper>

+ 5 - 0
edu-user/edu-user-biz/src/main/resources/config/mybatis/StudentExamResultMapper.xml

@@ -297,4 +297,9 @@
 		SELECT COUNT(exam_registration_id_) FROM student_exam_result
 		WHERE examination_basic_id_=#{examId} AND is_finished_exam_=5 AND result_ IS NULL
 	</select>
+
+    <select id="countExamResultRecordNum" resultType="java.lang.Integer">
+		SELECT COUNT(exam_registration_id_) FROM student_exam_result
+		WHERE examination_basic_id_=#{examId}
+	</select>
 </mapper>

+ 7 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamOrganizationRelationController.java

@@ -5,6 +5,7 @@ import com.keao.edu.auth.api.entity.SysUser;
 import com.keao.edu.common.controller.BaseController;
 import com.keao.edu.common.entity.HttpResponseResult;
 import com.keao.edu.common.page.PageInfo;
+import com.keao.edu.user.dao.ExamOrganizationRelationDao;
 import com.keao.edu.user.dto.ExamOrganizationRelationExtraDto;
 import com.keao.edu.user.entity.Employee;
 import com.keao.edu.user.entity.ExamOrganizationRelation;
@@ -35,6 +36,8 @@ public class ExamOrganizationRelationController extends BaseController {
     private SysUserFeignService sysUserFeignService;
     @Autowired
     private EmployeeService employeeService;
+    @Autowired
+    private ExamOrganizationRelationDao examOrganizationRelationDao;
 
     @ApiOperation("分页查询")
     @GetMapping(value = "/list")
@@ -110,6 +113,10 @@ public class ExamOrganizationRelationController extends BaseController {
         if(Objects.isNull(employee)){
             return failed("用户异常");
         }
+        int sendUrlOrgans = examOrganizationRelationDao.countExamIsSendUrlOrgans(examId.longValue());
+        if(sendUrlOrgans>0){
+            return failed("已发送过报名链接");
+        }
         examOrganizationRelationService.sendUrl(examId,employee.getOrganId());
         return succeed();
     }

+ 7 - 107
edu-util/src/main/java/com/keao/edu/util/excel/POIUtil.java

@@ -6,8 +6,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -17,30 +15,21 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.beanutils.NestedNullException;
 import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.entity.UrlEncodedFormEntity;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.impl.client.BasicCookieStore;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.message.BasicNameValuePair;
-import org.apache.http.ssl.SSLContextBuilder;
-import org.apache.http.ssl.TrustStrategy;
-import org.apache.http.util.EntityUtils;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFCellStyle;
 import org.apache.poi.hssf.usermodel.HSSFFont;
 import org.apache.poi.hssf.usermodel.HSSFRow;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.Font;
+import org.apache.poi.ss.usermodel.IndexedColors;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.slf4j.Logger;
@@ -539,95 +528,6 @@ public class POIUtil {
 		return result;
 	}
 
-	public static void main(String[] args) {
-		File file = new File("e:/reward.xlsx");
-		String sheetName = "reward";
-		Map<String, List<Map<String, Object>>> map = null;
-		try {
-			map = POIUtil.importExcel(file, 1);
-		} catch (IOException e) {
-			e.printStackTrace();
-			return;
-		}
-		if (map != null) {
-			// Map<String, Object> loginParam = new HashMap<String, Object>();
-
-			SSLContextBuilder builder = new SSLContextBuilder();
-			try {
-				builder.loadTrustMaterial(null, new TrustStrategy() {
-
-					@Override
-					public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
-						return true;
-					}
-				});
-			} catch (Exception e) {
-				e.printStackTrace();
-				return;
-			}
-
-			HttpPost httpPost = null;
-			CloseableHttpClient httpClient = null;
-			try {
-				SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build());
-				httpClient = HttpClients.custom().setSSLSocketFactory(sslsf).setDefaultCookieStore(new BasicCookieStore()).build();
-				// 登陆
-				httpPost = new HttpPost("https://ehjinrong.com/manage/admin/login.do?userName=sadmin&password=Hello@ehjr&captcha=411049");
-
-				HttpResponse httpResponse = httpClient.execute(httpPost);
-				HttpEntity httpEntity = httpResponse.getEntity();
-				String str = EntityUtils.toString(httpEntity);
-				System.out.println("--------" + str);
-				EntityUtils.consume(httpEntity);
-
-				// 发放奖励
-				for (Map<String, Object> row : map.get(sheetName)) {
-					try {
-						Long arg0 = Long.parseLong(row.get("user_id_").toString());
-						double arg1 = Double.parseDouble(row.get("reward").toString());
-						//String arg2 = row.get("tender_id_").toString();
-
-						Map<String, Object> parameterMap = new HashMap<String, Object>();
-						parameterMap.put("userId", arg0);
-						parameterMap.put("amount", arg1);
-						parameterMap.put("memo", "结清");
-
-						List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
-						if (parameterMap != null) {
-							for (Entry<String, Object> entry : parameterMap.entrySet()) {
-								String name = entry.getKey();
-								String value = ConvertUtils.convert(entry.getValue());
-								if (StringUtils.isNotEmpty(name)) {
-									nameValuePairs.add(new BasicNameValuePair(name, value));
-								}
-							}
-						}
-						httpPost = new HttpPost("https://ehjinrong.com/manage/sysAccount/fundAllocate.do");
-						httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF-8"));
-						httpResponse = httpClient.execute(httpPost);
-						httpEntity = httpResponse.getEntity();
-						EntityUtils.toString(httpEntity);
-						EntityUtils.consume(httpEntity);
-
-						System.out.println("  userId:" + arg0 + "  reward:" + arg1);
-					} catch (Exception e) {
-						e.printStackTrace();
-					}
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			} finally {
-				httpPost.releaseConnection();
-				try {
-					httpClient.close();
-				} catch (IOException e) {
-					e.printStackTrace();
-				}
-			}
-
-		}
-	}
-
 	/**
 	 * 创建excel文档
 	 *