|
@@ -1,13 +1,9 @@
|
|
package com.jpsoft.campus.modules.mobile.controller;
|
|
package com.jpsoft.campus.modules.mobile.controller;
|
|
|
|
|
|
-import com.alibaba.fastjson.TypeReference;
|
|
|
|
import com.jpsoft.campus.modules.base.entity.*;
|
|
import com.jpsoft.campus.modules.base.entity.*;
|
|
import com.jpsoft.campus.modules.base.service.ApplicationMiddleService;
|
|
import com.jpsoft.campus.modules.base.service.ApplicationMiddleService;
|
|
import com.jpsoft.campus.modules.base.service.ApplicationPrimaryService;
|
|
import com.jpsoft.campus.modules.base.service.ApplicationPrimaryService;
|
|
import com.jpsoft.campus.modules.base.service.StudentInfoService;
|
|
import com.jpsoft.campus.modules.base.service.StudentInfoService;
|
|
-import com.jpsoft.campus.modules.wechat.controller.EventCallback;
|
|
|
|
-import io.swagger.annotations.ApiModelProperty;
|
|
|
|
-import net.sf.json.JSON;
|
|
|
|
import net.sf.json.JSONObject;
|
|
import net.sf.json.JSONObject;
|
|
import com.jpsoft.campus.config.BaiduConfig;
|
|
import com.jpsoft.campus.config.BaiduConfig;
|
|
import com.jpsoft.campus.config.OSSConfig;
|
|
import com.jpsoft.campus.config.OSSConfig;
|
|
@@ -22,7 +18,6 @@ import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.joda.time.DateTime;
|
|
import org.joda.time.DateTime;
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.data.redis.core.ValueOperations;
|
|
import org.springframework.data.redis.core.ValueOperations;
|
|
@@ -542,12 +537,12 @@ public class PersonInfoApiController {
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("uploadUser")
|
|
@PostMapping("uploadUser")
|
|
- public MessageResult<Map> uploadUser(EnrolInfo enrolInfo) {
|
|
|
|
|
|
+ public MessageResult<Map> uploadUser(UserInformationCity userInformationCity) {
|
|
MessageResult<Map> messageResult = new MessageResult<>();
|
|
MessageResult<Map> messageResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
|
- if(enrolInfo != null){
|
|
|
|
|
|
+ if(userInformationCity != null){
|
|
messageResult.setResult(true);
|
|
messageResult.setResult(true);
|
|
}else{
|
|
}else{
|
|
messageResult.setResult(false);
|
|
messageResult.setResult(false);
|
|
@@ -564,20 +559,14 @@ public class PersonInfoApiController {
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("dwonUserMessage")
|
|
@PostMapping("dwonUserMessage")
|
|
- public MessageResult<List<EnrolInfo>> dwonUserMessage() {
|
|
|
|
- MessageResult<List<EnrolInfo>> messageResult = new MessageResult<>();
|
|
|
|
|
|
+ @ApiOperation(value = "查询市级学生数据")
|
|
|
|
+ public MessageResult<List<UserInformationCity>> dwonUserMessage() {
|
|
|
|
+ MessageResult<List<UserInformationCity>> messageResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
try {
|
|
-// List<EnrolInfo> primaryList = applicationPrimaryService.findOffice();
|
|
|
|
-//
|
|
|
|
-// if(primaryList.size() > 0){
|
|
|
|
-// messageResult.setData(primaryList);
|
|
|
|
-// messageResult.setResult(true);
|
|
|
|
-// }else{
|
|
|
|
-// messageResult.setResult(false);
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
- messageResult.setResult(false);
|
|
|
|
|
|
+// List<UserInformationCity> primaryList = applicationPrimaryService.findOffice();
|
|
|
|
+// messageResult.setData(primaryList);
|
|
|
|
+ messageResult.setResult(true);
|
|
|
|
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
log.error(ex.getMessage(), ex);
|
|
log.error(ex.getMessage(), ex);
|
|
@@ -590,6 +579,7 @@ public class PersonInfoApiController {
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("updateUploadStatus")
|
|
@PostMapping("updateUploadStatus")
|
|
|
|
+ @ApiOperation(value = "修改市级学生上传状态")
|
|
public MessageResult<Boolean> updateUploadStatus(String id,String code) {
|
|
public MessageResult<Boolean> updateUploadStatus(String id,String code) {
|
|
MessageResult<Boolean> messageResult = new MessageResult<>();
|
|
MessageResult<Boolean> messageResult = new MessageResult<>();
|
|
try {
|
|
try {
|
|
@@ -607,4 +597,87 @@ public class PersonInfoApiController {
|
|
|
|
|
|
return messageResult;
|
|
return messageResult;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PostMapping("dwonProvincialUserMessage")
|
|
|
|
+ @ApiOperation(value = "查询省级学生数据")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "applyNo", value = "applyNo", required = true, paramType = "query"),
|
|
|
|
+ @ApiImplicitParam(name = "limit", value = "查询数量", paramType = "query"),
|
|
|
|
+ })
|
|
|
|
+ public MessageResult<List<Map>> dwonProvincialUserMessage(
|
|
|
|
+ @RequestParam(value="applyNo",defaultValue="") String applyNo,
|
|
|
|
+ @RequestParam(value="limit",defaultValue="100") Integer limit) {
|
|
|
|
+ MessageResult<List<Map>> messageResult = new MessageResult<>();
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ if(StringUtils.isEmpty(applyNo)){
|
|
|
|
+ throw new Exception("未传applyNo");
|
|
|
|
+ }
|
|
|
|
+ List<UserInformationProvincial> primaryList = applicationPrimaryService.findOfficeByProvincial(applyNo,limit);
|
|
|
|
+ List<Map> returnList = new ArrayList<>();
|
|
|
|
+ for(UserInformationProvincial provincial : primaryList){
|
|
|
|
+ Map userMap = new HashMap();
|
|
|
|
+ userMap.put("declare",provincial);
|
|
|
|
+
|
|
|
|
+ UserInformationProvincialSubDeclares subDeclares = new UserInformationProvincialSubDeclares();
|
|
|
|
+ subDeclares.setApplicantName(provincial.getApplicantName());
|
|
|
|
+ subDeclares.setApplicantPhone(provincial.getApplicantPhone());
|
|
|
|
+ subDeclares.setApplyNo(applyNo);
|
|
|
|
+ subDeclares.setLiceseNo(provincial.getLicenseNo());
|
|
|
|
+ subDeclares.setTargetId(provincial.getTargetId());
|
|
|
|
+ subDeclares.setTargetName(provincial.getTargetName());
|
|
|
|
+
|
|
|
|
+ UserInformationProvincialFileDeclares fileDeclares = new UserInformationProvincialFileDeclares();
|
|
|
|
+ fileDeclares.setApplyNo(applyNo);
|
|
|
|
+
|
|
|
|
+ List<UserInformationProvincialFileDeclares> fileDeclaresList = new ArrayList<>();
|
|
|
|
+ fileDeclaresList.add(fileDeclares);
|
|
|
|
+
|
|
|
|
+ subDeclares.setFileDeclares(fileDeclaresList);
|
|
|
|
+
|
|
|
|
+ List<UserInformationProvincialSubDeclares> subDeclaresList = new ArrayList<>();
|
|
|
|
+ subDeclaresList.add(subDeclares);
|
|
|
|
+ provincial.setSubDeclares(subDeclaresList);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ returnList.add(userMap);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ messageResult.setData(returnList);
|
|
|
|
+ messageResult.setResult(true);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
+ log.error(ex.getMessage(), ex);
|
|
|
|
+
|
|
|
|
+ messageResult.setResult(false);
|
|
|
|
+ messageResult.setMessage(ex.getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return messageResult;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @PostMapping("updateProvincialStatus")
|
|
|
|
+ @ApiOperation(value = "省级修改学生上传状态")
|
|
|
|
+ public MessageResult<Boolean> updateProvincialStatus(String id,String code,String applyNo,String subNos) {
|
|
|
|
+ MessageResult<Boolean> messageResult = new MessageResult<>();
|
|
|
|
+ try {
|
|
|
|
+ ApplicationPrimary applicationPrimary = applicationPrimaryService.get(id);
|
|
|
|
+ applicationPrimary.setCode(code);
|
|
|
|
+ applicationPrimary.setApplyNo(applyNo);
|
|
|
|
+ applicationPrimary.setSubNos(subNos);
|
|
|
|
+ applicationPrimaryService.update(applicationPrimary);
|
|
|
|
+ messageResult.setResult(true);
|
|
|
|
+
|
|
|
|
+ } catch (Exception ex) {
|
|
|
|
+ log.error(ex.getMessage(), ex);
|
|
|
|
+
|
|
|
|
+ messageResult.setResult(false);
|
|
|
|
+ messageResult.setMessage(ex.getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return messageResult;
|
|
|
|
+ }
|
|
}
|
|
}
|