shuzhan 9 hónapja
szülő
commit
34fabe7a63

+ 4 - 2
common/src/main/java/com/jpsoft/campus/modules/base/dao/ApplicationPrimaryDAO.java

@@ -4,7 +4,8 @@ import java.util.List;
 
 import com.jpsoft.campus.modules.base.dto.ApplicationPrimaryDTO;
 import com.jpsoft.campus.modules.base.entity.ApplicationPrimary;
-import com.jpsoft.campus.modules.base.entity.EnrolInfo;
+import com.jpsoft.campus.modules.base.entity.UserInformationCity;
+import com.jpsoft.campus.modules.base.entity.UserInformationProvincial;
 import org.springframework.stereotype.Repository;
 import java.util.Map;
 import com.jpsoft.campus.modules.common.dto.Sort;
@@ -25,6 +26,7 @@ public interface ApplicationPrimaryDAO {
 	List<ApplicationPrimary> findByStudentId(String id);
 	ApplicationPrimary findByStudentNameAndIdCard(String studentName, String idCard,String schoolId);
 	List<ApplicationPrimary> findByIds(List<String> ids);
-	List<EnrolInfo> findOffice();
+	List<UserInformationCity> findOffice();
 	ApplicationPrimary findByOfficeCode(String officeCode);
+	List<UserInformationProvincial> findOfficeByProvincial(String applyNo,Integer limit);
 }

+ 8 - 0
common/src/main/java/com/jpsoft/campus/modules/base/entity/ApplicationPrimary.java

@@ -133,4 +133,12 @@ public class ApplicationPrimary {
 
     @ApiModelProperty(value = "上传状态(0未上传,1上传成功,2失败")
     private String uploadStatus;
+
+
+    @ApiModelProperty(value = "状态码")
+    private String code;
+    @ApiModelProperty(value = "一件事办件联办编码")
+    private String applyNo;
+    @ApiModelProperty(value = "省级平台返回集合")
+    private String subNos;
 }

+ 2 - 2
common/src/main/java/com/jpsoft/campus/modules/base/entity/EnrolInfo.java → common/src/main/java/com/jpsoft/campus/modules/base/entity/UserInformationCity.java

@@ -10,8 +10,8 @@ import java.util.Date;
 
 
 @Data
-@ApiModel(value = "")
-public class EnrolInfo {
+@ApiModel(value = "市级")
+public class UserInformationCity {
 
 	private String areaCode;
 	private String areaName;

+ 41 - 0
common/src/main/java/com/jpsoft/campus/modules/base/entity/UserInformationProvincial.java

@@ -0,0 +1,41 @@
+package com.jpsoft.campus.modules.base.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.models.auth.In;
+import lombok.Data;
+
+import java.util.List;
+
+
+@Data
+@ApiModel(value = "省级")
+public class UserInformationProvincial {
+
+	private String applicantId;
+	private String applicantName;
+	private String applicantPhone;
+	private Integer applicantType = 1;
+	private String applyNo;
+	private Integer applyStatus = 1;
+	private String areaCode = "421003";
+	private String areaName = "荆州经济技术开发区";
+	private String formContent = "";
+	private String licenseNo;
+	private String licenseType = "113";
+	private Integer prequalification = 0;
+	private Integer sceneBusiness = 1;
+	private String sceneName = "";
+	private String sceneNo = "";
+	private Integer simpleApproval = 0;
+	private String sourceId = "";
+	private Integer sourceName = 14;
+	private Integer sourceRoute = 1;
+
+	private String targetId;
+	private String targetName;
+	private Integer targetType = 1;
+	private Integer type = 1;
+
+	private List<UserInformationProvincialSubDeclares> subDeclares;
+
+}

+ 25 - 0
common/src/main/java/com/jpsoft/campus/modules/base/entity/UserInformationProvincialFileDeclares.java

@@ -0,0 +1,25 @@
+package com.jpsoft.campus.modules.base.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.models.auth.In;
+import lombok.Data;
+
+
+@Data
+@ApiModel(value = "省级")
+public class UserInformationProvincialFileDeclares {
+
+	private String applyNo;
+	private String fileId = "";
+	private String fileName = "";
+	private String itemCode = "";
+	private String sceneName = "";
+	private String sourceId = "";
+	private String stuffCode = "";
+	private String stuffName = "";
+	private String stuffSource = "";
+	private Integer stuffStatus = 0;
+	private Integer stuffType = 0;
+	private String subApplyNo = "";
+	private String taskHandleItem = "";
+}

+ 47 - 0
common/src/main/java/com/jpsoft/campus/modules/base/entity/UserInformationProvincialSubDeclares.java

@@ -0,0 +1,47 @@
+package com.jpsoft.campus.modules.base.entity;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.util.List;
+
+
+@Data
+@ApiModel(value = "省级")
+public class UserInformationProvincialSubDeclares {
+
+	private String applicantName;
+	private String applicantPhone;
+	private String applicantType = "1";
+	private String applyNo;
+	private String areaCode = "421003";
+	private String areaName = "荆州经济技术开发区";
+	private String departCode = "";
+	private String departName = "";
+	private String formContent = "";
+	private String info = "";
+	private String itemCode = "";
+	private String itemName = "";
+	private String licenseType = "113";
+	private String liceseNo;
+	private Integer prequalification = 0;
+	private String sceneName = "";
+	private String sceneNo = "";
+	private Integer simpleApproval = 0;
+	private String sourceId = "";
+	private Integer sourceName = 14;
+	private Integer sourceRoute = 1;
+	private Integer status = 10;
+	private String subApplyNo;
+	private String subName;
+	private Integer syncFlag = 0;
+	private String targetId;
+	private String targetName;
+	private String targetType = "1";
+	private String taskHandleItem = "";
+	private String taskHandleName = "";
+
+	private List<UserInformationProvincialFileDeclares> fileDeclares;
+
+	
+}

+ 5 - 3
common/src/main/java/com/jpsoft/campus/modules/base/service/ApplicationPrimaryService.java

@@ -5,8 +5,8 @@ import java.util.Map;
 import com.github.pagehelper.Page;
 import com.jpsoft.campus.modules.base.dto.ApplicationPrimaryDTO;
 import com.jpsoft.campus.modules.base.entity.ApplicationPrimary;
-import com.jpsoft.campus.modules.base.entity.ApprovalInfo;
-import com.jpsoft.campus.modules.base.entity.EnrolInfo;
+import com.jpsoft.campus.modules.base.entity.UserInformationCity;
+import com.jpsoft.campus.modules.base.entity.UserInformationProvincial;
 import com.jpsoft.campus.modules.common.dto.Sort;
 
 public interface ApplicationPrimaryService {
@@ -25,7 +25,9 @@ public interface ApplicationPrimaryService {
 	ApplicationPrimary findByStudentNameAndIdCard(String studentName, String idCard,String schoolId);
 
 	List<ApplicationPrimary> findByIds(List<String> ids);
-	List<EnrolInfo> findOffice();
+	List<UserInformationCity> findOffice();
 
 	ApplicationPrimary findByOfficeCode(String officeCode);
+
+	List<UserInformationProvincial> findOfficeByProvincial(String applyNo,Integer limit);
 }

+ 9 - 3
common/src/main/java/com/jpsoft/campus/modules/base/service/impl/ApplicationPrimaryServiceImpl.java

@@ -2,14 +2,15 @@ package com.jpsoft.campus.modules.base.service.impl;
 
 import java.util.List;
 import java.util.Map;
-import java.util.UUID;
 import javax.annotation.Resource;
 
 import com.jpsoft.campus.modules.base.dao.ApplicationPrimaryDAO;
 import com.jpsoft.campus.modules.base.dto.ApplicationPrimaryDTO;
 import com.jpsoft.campus.modules.base.entity.ApplicationPrimary;
-import com.jpsoft.campus.modules.base.entity.EnrolInfo;
+import com.jpsoft.campus.modules.base.entity.UserInformationCity;
+import com.jpsoft.campus.modules.base.entity.UserInformationProvincial;
 import com.jpsoft.campus.modules.base.service.ApplicationPrimaryService;
+import io.swagger.models.auth.In;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
 import com.github.pagehelper.Page;
@@ -108,7 +109,7 @@ public class ApplicationPrimaryServiceImpl implements ApplicationPrimaryService
 	}
 
 	@Override
-	public List<EnrolInfo> findOffice(){
+	public List<UserInformationCity> findOffice(){
 		return applicationPrimaryDAO.findOffice();
 	}
 
@@ -116,4 +117,9 @@ public class ApplicationPrimaryServiceImpl implements ApplicationPrimaryService
 	public ApplicationPrimary findByOfficeCode(String officeCode){
 		return applicationPrimaryDAO.findByOfficeCode(officeCode);
 	}
+
+	@Override
+	public List<UserInformationProvincial> findOfficeByProvincial(String applyNo, Integer limit){
+		return applicationPrimaryDAO.findOfficeByProvincial(applyNo,limit);
+	}
 }

+ 58 - 2
common/src/main/resources/mapper/base/ApplicationPrimary.xml

@@ -29,6 +29,9 @@
         <result property="newType" column="new_type"/>
         <result property="schoolNumberId" column="school_number_id"/>
         <result property="uploadStatus" column="upload_status"/>
+        <result property="code" column="code_"/>
+        <result property="applyNo" column="apply_no"/>
+        <result property="subNos" column="sub_nos"/>
         <association property="schoolNumber" column="school_number_id"
                      select="com.jpsoft.campus.modules.base.dao.SchoolNumberDAO.get"></association>
     </resultMap>
@@ -42,7 +45,7 @@
 		insert into base_application_primary
 	    (id_,create_by,create_time,update_by,update_time,del_flag,type_,
 	    status_,category_id,now_address,person_id,student_id,street_id,community_id,school_id,hit_,offer_id,
-	    is_send,send_time,offer_code,offer_img,new_type,school_number_id,upload_status
+	    is_send,send_time,offer_code,offer_img,new_type,school_number_id,upload_status,code_,apply_no,sub_nos
 	    )
 		values
 		(
@@ -70,6 +73,9 @@
 			,#{newType,jdbcType=VARCHAR}
 			,#{schoolNumberId,jdbcType=VARCHAR}
 			,#{uploadStatus,jdbcType=VARCHAR}
+			,#{code,jdbcType=VARCHAR}
+			,#{applyNo,jdbcType=VARCHAR}
+			,#{subNos,jdbcType=VARCHAR}
 		)
 	]]>
     </insert>
@@ -148,6 +154,15 @@
             <if test="uploadStatus!=null">
                 upload_status=#{uploadStatus,jdbcType=VARCHAR},
             </if>
+            <if test="code!=null">
+                code_=#{code,jdbcType=VARCHAR},
+            </if>
+            <if test="applyNo!=null">
+                apply_no=#{applyNo,jdbcType=VARCHAR},
+            </if>
+            <if test="subNos!=null">
+                sub_nos=#{subNos,jdbcType=VARCHAR},
+            </if>
         </set>
         where id_=#{id}
     </update>
@@ -380,7 +395,7 @@
         </foreach>
         order by create_time asc
     </select>
-    <select id="findOffice" resultType="com.jpsoft.campus.modules.base.entity.EnrolInfo">
+    <select id="findOffice" resultType="com.jpsoft.campus.modules.base.entity.UserInformationCity">
         SELECT
         '421003' AS areaCode,
         '荆州经济技术开发区' AS areaName,
@@ -426,4 +441,45 @@
         and offer_code = #{officeCode}
         limit 1
     </select>
+    <select id="findOfficeByProvincial" resultType="com.jpsoft.campus.modules.base.entity.UserInformationProvincial">
+        SELECT
+        a.id_ AS applicantId,
+        c.name_ AS applicantName,
+        c.phone_ AS applicantPhone,
+        1 AS applicantType,
+        #{applyNo} AS applyNo,
+        1 AS applyStatus,
+        '421003' AS areaCode ,
+        '荆州经济技术开发区' AS areaName,
+        '' as formContent,
+        c.id_card as licenseNo,
+        '113' as licenseType,
+        0 as prequalification,
+        1 as sceneBusiness,
+        '' as sceneName,
+        '' as sceneNo,
+        0 as simpleApproval,
+        '' as sourceId,
+        14 as sourceName,
+        1 as sourceRoute,
+        b.id_card as targetId,
+        b.name_ as targetName ,
+        1 as targetType,
+        1 as type
+        FROM
+        base_application_primary a
+        LEFT JOIN base_student_info b ON a.student_id = b.id_
+        LEFT JOIN base_person_info c ON a.person_id = c.id_
+        LEFT JOIN base_school_info d ON a.offer_id = d.id_
+        LEFT JOIN base_person_student e ON c.id_ = e.person_id
+        AND b.id_ = e.student_id
+        LEFT JOIN sys_data_dictionary f ON e.relationship_ = f.id_
+        WHERE
+        a.del_flag = 0
+        AND a.status_ = '90'
+        AND (
+        a.code_ IS NULL
+        OR a.code_ = '')
+        limit ${limit}
+    </select>
 </mapper>

+ 5 - 3
web/src/main/java/com/jpsoft/campus/config/WebMvcConfig.java

@@ -60,9 +60,11 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				.excludePathPatterns("/mobile/schoolInfoApi/typeList")
 				.excludePathPatterns("/mobile/schoolInfoApi/detail")
 				.excludePathPatterns("/mobile/newsApi/**")
-				//.excludePathPatterns("/mobile/personInfoApi/uploadUser")
-				//.excludePathPatterns("/mobile/personInfoApi/dwonUserMessage")
-				//.excludePathPatterns("/mobile/personInfoApi/updateUploadStatus")
+				.excludePathPatterns("/mobile/personInfoApi/uploadUser")
+				.excludePathPatterns("/mobile/personInfoApi/dwonUserMessage")
+				.excludePathPatterns("/mobile/personInfoApi/updateUploadStatus")
+				.excludePathPatterns("/mobile/personInfoApi/dwonProvincialUserMessage")
+				.excludePathPatterns("/mobile/personInfoApi/updateProvincialStatus")
 		;
 	}
 }

+ 92 - 19
web/src/main/java/com/jpsoft/campus/modules/mobile/controller/PersonInfoApiController.java

@@ -1,13 +1,9 @@
 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.service.ApplicationMiddleService;
 import com.jpsoft.campus.modules.base.service.ApplicationPrimaryService;
 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 com.jpsoft.campus.config.BaiduConfig;
 import com.jpsoft.campus.config.OSSConfig;
@@ -22,7 +18,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.joda.time.DateTime;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.ValueOperations;
@@ -542,12 +537,12 @@ public class PersonInfoApiController {
     }
 
     @PostMapping("uploadUser")
-    public MessageResult<Map> uploadUser(EnrolInfo enrolInfo) {
+    public MessageResult<Map> uploadUser(UserInformationCity userInformationCity) {
         MessageResult<Map> messageResult = new MessageResult<>();
 
         try {
 
-            if(enrolInfo != null){
+            if(userInformationCity != null){
                 messageResult.setResult(true);
             }else{
                 messageResult.setResult(false);
@@ -564,20 +559,14 @@ public class PersonInfoApiController {
     }
 
     @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 {
-//            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) {
             log.error(ex.getMessage(), ex);
@@ -590,6 +579,7 @@ public class PersonInfoApiController {
     }
 
     @PostMapping("updateUploadStatus")
+    @ApiOperation(value = "修改市级学生上传状态")
     public MessageResult<Boolean> updateUploadStatus(String id,String code) {
         MessageResult<Boolean> messageResult = new MessageResult<>();
         try {
@@ -607,4 +597,87 @@ public class PersonInfoApiController {
 
         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;
+    }
 }