Commit f54ccbf2 by weisong
parents b937cef6 c5935130
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<groupId>com.cnooc</groupId> <groupId>com.cnooc</groupId>
<artifactId>expert-manage-miniapp</artifactId> <artifactId>expert-manage-miniapp</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<packaging>jar</packaging>
<name>Expert Manage MiniApp</name> <name>Expert Manage MiniApp</name>
<description>Expert Management Mini Application</description> <description>Expert Management Mini Application</description>
......
...@@ -11,9 +11,31 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; ...@@ -11,9 +11,31 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration @Configuration
public class TheWebMvcConfigurer implements WebMvcConfigurer { public class TheWebMvcConfigurer implements WebMvcConfigurer {
@Autowired // @Autowired
private LoginInterceptor loginInterceptor; // private LoginInterceptor loginInterceptor;
//
// @Override
// public void addInterceptors(InterceptorRegistry registry) {
//
// // 注册登录拦截器,并设置拦截路径和排除路径
// registry.addInterceptor(loginInterceptor)
// .addPathPatterns("/**") // 拦截所有路径
// .excludePathPatterns( // 排除一些路径
// "/sys/**",
// "/verify/**",
// "/person/**",
// "/text/**"
// );
//
// registry.addInterceptor(webAuthInterceptor());
// }
<<<<<<< HEAD
// @Bean-
// public WebAuthInterceptor webAuthInterceptor() {
// return new WebAuthInterceptor();
// }
=======
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
...@@ -36,5 +58,6 @@ public class TheWebMvcConfigurer implements WebMvcConfigurer { ...@@ -36,5 +58,6 @@ public class TheWebMvcConfigurer implements WebMvcConfigurer {
public WebAuthInterceptor webAuthInterceptor() { public WebAuthInterceptor webAuthInterceptor() {
return new WebAuthInterceptor(); return new WebAuthInterceptor();
} }
>>>>>>> 693c0e523aee3f3c218470be2387b4420ce73972
} }
...@@ -4,9 +4,14 @@ import com.cnooc.expert.common.response.ApiResult; ...@@ -4,9 +4,14 @@ import com.cnooc.expert.common.response.ApiResult;
import com.cnooc.expert.common.response.BasePageResp; import com.cnooc.expert.common.response.BasePageResp;
import com.cnooc.expert.controller.expert.model.request.CompanyPageReq; import com.cnooc.expert.controller.expert.model.request.CompanyPageReq;
import com.cnooc.expert.controller.expert.model.request.DictNofilterListReq; import com.cnooc.expert.controller.expert.model.request.DictNofilterListReq;
import com.cnooc.expert.controller.expert.model.response.DictListResp; import com.cnooc.expert.controller.expert.model.request.PingBiaoXiangMuInfoGetByChouQuMaReq;
import com.cnooc.expert.controller.expert.model.response.NofilterListResp; import com.cnooc.expert.controller.expert.model.request.PingBiaoXiangMuPageReq;
import com.cnooc.expert.controller.expert.model.response.SecondaryUnitListResp; import com.cnooc.expert.controller.expert.model.request.QingJiaJinJiPageReq;
import com.cnooc.expert.controller.expert.model.response.DictListItemResp;
import com.cnooc.expert.controller.expert.model.response.ExpertInfoGetResp;
import com.cnooc.expert.controller.expert.model.response.NofilterListItemResp;
import com.cnooc.expert.controller.expert.model.response.PingBiaoXiangMuInfoGetByChouQuMaResp;
import com.cnooc.expert.controller.expert.model.response.SecondaryUnitListItemResp;
import com.cnooc.expert.service.ExpertService; import com.cnooc.expert.service.ExpertService;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -17,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -17,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@AllArgsConstructor @AllArgsConstructor
@RestController @RestController
@RequestMapping("/expert") @RequestMapping("/expert")
...@@ -38,7 +45,7 @@ public class ExpertController { ...@@ -38,7 +45,7 @@ public class ExpertController {
* @return * @return
*/ */
@PostMapping("/nofilter/list") @PostMapping("/nofilter/list")
public ApiResult<NofilterListResp> dictNofilterList(@RequestBody @Validated DictNofilterListReq req) { public ApiResult<List<NofilterListItemResp>> dictNofilterList(@RequestBody @Validated DictNofilterListReq req) {
return ApiResult.successWithResult(expertService.listDictNofilter(req)); return ApiResult.successWithResult(expertService.listDictNofilter(req));
} }
...@@ -48,7 +55,7 @@ public class ExpertController { ...@@ -48,7 +55,7 @@ public class ExpertController {
* @return * @return
*/ */
@PostMapping("/secondary-unit/list") @PostMapping("/secondary-unit/list")
public ApiResult<SecondaryUnitListResp> secondaryUnitList() { public ApiResult<List<SecondaryUnitListItemResp>> secondaryUnitList() {
return ApiResult.successWithResult(expertService.listSecondaryUnit()); return ApiResult.successWithResult(expertService.listSecondaryUnit());
} }
...@@ -58,7 +65,7 @@ public class ExpertController { ...@@ -58,7 +65,7 @@ public class ExpertController {
* @return * @return
*/ */
@PostMapping("/dict/guid4/list") @PostMapping("/dict/guid4/list")
public ApiResult<DictListResp> dictGuiud4List() { public ApiResult<List<DictListItemResp>> dictGuiud4List() {
return ApiResult.successWithResult(expertService.listDict4()); return ApiResult.successWithResult(expertService.listDict4());
} }
...@@ -68,7 +75,7 @@ public class ExpertController { ...@@ -68,7 +75,7 @@ public class ExpertController {
* @return * @return
*/ */
@PostMapping("/dict/guid5/list") @PostMapping("/dict/guid5/list")
public ApiResult<DictListResp> dictGuiud5List() { public ApiResult<List<DictListItemResp>> dictGuiud5List() {
return ApiResult.successWithResult(expertService.listDict5()); return ApiResult.successWithResult(expertService.listDict5());
} }
...@@ -79,12 +86,13 @@ public class ExpertController { ...@@ -79,12 +86,13 @@ public class ExpertController {
* @return * @return
*/ */
@PostMapping("/dict/guid6/list") @PostMapping("/dict/guid6/list")
public ApiResult<DictListResp> dictGuiud6List() { public ApiResult<List<DictListItemResp>> dictGuiud6List() {
return ApiResult.successWithResult(expertService.listDict6()); return ApiResult.successWithResult(expertService.listDict6());
} }
/** /**
* 公司列表 * 公司列表
*
* @return * @return
*/ */
@PostMapping("/company/page") @PostMapping("/company/page")
...@@ -92,6 +100,37 @@ public class ExpertController { ...@@ -92,6 +100,37 @@ public class ExpertController {
return ApiResult.successWithResult(expertService.pageCompany(req)); return ApiResult.successWithResult(expertService.pageCompany(req));
} }
/**
* 专家个人信息
*
* @return
*/
@PostMapping("/info")
public ApiResult<ExpertInfoGetResp> ExpertInfoGet() {
return ApiResult.successWithResult(expertService.getExpertInfo(null));
}
/**
* 抽取码详情
*
* @param req
* @return
*/
@PostMapping("/pingBiaoXiangMu/info-by-chouqunum")
public ApiResult<PingBiaoXiangMuInfoGetByChouQuMaResp> pingBiaoXiangMuInfoGetByChouQuMa(@RequestBody @Validated PingBiaoXiangMuInfoGetByChouQuMaReq req) {
return ApiResult.successWithResult(expertService.getPingBiaoXiangMuInfoByChouQuMa(req));
}
@PostMapping("/pingBiaoXiangMu/page")
public ApiResult<BasePageResp<Object>> pingBiaoXiangMuPage(@RequestBody @Validated PingBiaoXiangMuPageReq req) {
return ApiResult.successWithResult(expertService.pagePingBiaoXiangMu(req));
}
// *** 请假/休假 ***
// 个人请假
@PostMapping("/qing-jia/jin-ji/page")
public ApiResult<BasePageResp<Object>> qingJiaJinJiPage(@RequestBody @Validated QingJiaJinJiPageReq req) {
return ApiResult.successWithResult(expertService.pageJinJiQingJia(req));
}
} }
package com.cnooc.expert.controller.expert.model.request;
import lombok.Data;
@Data
public class PingBiaoXiangMuInfoGetByChouQuMaReq {
private String chouQuNum;
}
package com.cnooc.expert.controller.expert.model.request;
import com.cnooc.expert.common.request.BasePageRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class PingBiaoXiangMuPageReq extends BasePageRequest {
private String zhuanJiaGuid;
}
package com.cnooc.expert.controller.expert.model.request;
import com.cnooc.expert.common.request.BasePageRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class QingJiaJinJiPageReq extends BasePageRequest {
private String zhuanJiaGuid;
}
...@@ -3,23 +3,14 @@ package com.cnooc.expert.controller.expert.model.response; ...@@ -3,23 +3,14 @@ package com.cnooc.expert.controller.expert.model.response;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
@Builder @Builder
public class DictListResp { public class DictListItemResp {
private List<Item> data;
@Data
@Builder
public static class Item {
private String dictGuid; private String dictGuid;
private String key; private String key;
private String value; private String value;
}
} }
...@@ -3,21 +3,11 @@ package com.cnooc.expert.controller.expert.model.response; ...@@ -3,21 +3,11 @@ package com.cnooc.expert.controller.expert.model.response;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
@Builder @Builder
public class NofilterListResp { public class NofilterListItemResp {
private List<Item> data;
@Data
@Builder
public static class Item {
private String id; private String id;
private String text; private String text;
}
} }
package com.cnooc.expert.controller.expert.model.response;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
public class PingBiaoXiangMuInfoGetByChouQuMaResp {
private String chouQuQingKuangGuid;
private String xiangMuNo;
private String xiangMuName;
private String qingJiaTime;
private String chouQuRenWuGuid;
private Long pingBiaoStartTime;
private String zhuanJiaName;
private String shenHeStatus;
private String pingBiaoAddress;
private Integer status;
}
package com.cnooc.expert.controller.expert.model.response;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
public class QingJiaJinJiPageResp {
private String chouQuNum;
private String jinJiQingJiaGuid;
private String chouQuQingKuangGuid;
private String chouQuZhuangTai;
private String xiangMuNo;
private String xiangMuName;
private String jinJiQingJiaReason;
private Long qingJiaTime;
private boolean isQingJia;
private Long pingBiaoStartTime;
private Integer shenHeStatus;
private Long pingBiaoEndTime;
}
...@@ -3,21 +3,12 @@ package com.cnooc.expert.controller.expert.model.response; ...@@ -3,21 +3,12 @@ package com.cnooc.expert.controller.expert.model.response;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
@Builder @Builder
public class SecondaryUnitListResp { public class SecondaryUnitListItemResp {
private List<Item> data;
@Data
@Builder
public static class Item {
private String code; private String code;
private String name; private String name;
}
} }
package com.cnooc.expert.external.expert.api; package com.cnooc.expert.external.expert.api;
import com.cnooc.expert.external.expert.model.request.ExpertInfoGetReq; import com.cnooc.expert.external.expert.model.request.ExpertInfoGetReq;
import com.cnooc.expert.external.expert.model.response.ExpertInfoGetResp; import com.cnooc.expert.external.expert.model.response.ExpertInfoGetTestResp;
import retrofit2.Call; import retrofit2.Call;
import retrofit2.http.Body; import retrofit2.http.Body;
import retrofit2.http.GET; import retrofit2.http.GET;
...@@ -13,9 +13,9 @@ import java.util.Map; ...@@ -13,9 +13,9 @@ import java.util.Map;
public interface ExpertServiceApi { public interface ExpertServiceApi {
@GET("/api") @GET("/api")
Call<ExpertInfoGetResp> expertDetailGet(@HeaderMap Map<String, Object> headers); Call<ExpertInfoGetTestResp> expertDetailGet(@HeaderMap Map<String, Object> headers);
@POST("/") @POST("/")
Call<ExpertInfoGetResp> expertDetailUpDate(@HeaderMap Map<String, Object> headers, @Body ExpertInfoGetReq user); Call<ExpertInfoGetTestResp> expertDetailUpDate(@HeaderMap Map<String, Object> headers, @Body ExpertInfoGetReq user);
} }
package com.cnooc.expert.external.expert.api; package com.cnooc.expert.external.expert.api;
<<<<<<< HEAD
import com.cnooc.expert.external.expert.model.request.ExpertInfoGetReq;
import com.cnooc.expert.external.expert.model.response.ExpertInfoGetTestResp;
=======
import com.cnooc.expert.external.expert.model.request.ExpertInfoAppReq; import com.cnooc.expert.external.expert.model.request.ExpertInfoAppReq;
import com.cnooc.expert.external.expert.model.request.ExpertInfoReq; import com.cnooc.expert.external.expert.model.request.ExpertInfoReq;
import com.cnooc.expert.external.expert.model.response.ExpertInfoAppResp; import com.cnooc.expert.external.expert.model.response.ExpertInfoAppResp;
import com.cnooc.expert.external.expert.model.response.ExpertInfoResp; import com.cnooc.expert.external.expert.model.response.ExpertInfoResp;
>>>>>>> 693c0e523aee3f3c218470be2387b4420ce73972
import retrofit2.Call; import retrofit2.Call;
import retrofit2.http.Body; import retrofit2.http.Body;
import retrofit2.http.HeaderMap; import retrofit2.http.HeaderMap;
...@@ -12,6 +17,10 @@ import retrofit2.http.POST; ...@@ -12,6 +17,10 @@ import retrofit2.http.POST;
import java.util.Map; import java.util.Map;
public interface LoginServiceApi { public interface LoginServiceApi {
<<<<<<< HEAD
@POST("/")
Call<ExpertInfoGetTestResp> expertDetailUpDate(@HeaderMap Map<String, Object> headers, @Body ExpertInfoGetReq user);
=======
@POST("/zjfw/zggrxxgl/querySingleByShengFenZhengOrMobile") @POST("/zjfw/zggrxxgl/querySingleByShengFenZhengOrMobile")
Call<ExpertInfoResp> querySingleByShengFenZhengOrMobile(@HeaderMap Map<String, Object> headers, @Body ExpertInfoReq expertInfoReq); Call<ExpertInfoResp> querySingleByShengFenZhengOrMobile(@HeaderMap Map<String, Object> headers, @Body ExpertInfoReq expertInfoReq);
...@@ -23,4 +32,5 @@ public interface LoginServiceApi { ...@@ -23,4 +32,5 @@ public interface LoginServiceApi {
@POST("/zjfw/zggrxxgl/updateZhuanJiaInfoApp") @POST("/zjfw/zggrxxgl/updateZhuanJiaInfoApp")
Call<ExpertInfoAppResp> updateZhuanJiaInfoApp(@HeaderMap Map<String, Object> headers, @Body ExpertInfoAppReq expertInfoAppReq); Call<ExpertInfoAppResp> updateZhuanJiaInfoApp(@HeaderMap Map<String, Object> headers, @Body ExpertInfoAppReq expertInfoAppReq);
>>>>>>> 693c0e523aee3f3c218470be2387b4420ce73972
} }
package com.cnooc.expert.external.expert.model.response;
import lombok.Data;
import java.util.List;
@Data
public class ExpertInfoGetResp {
private List<ExpertInfoGetResult> results;
private ExpertInfoGetInfo info;
}
package com.cnooc.expert.external.expert.model.response;
import lombok.Data;
@Data
public class ExpertInfoGetResult {
private String gender;
private String email;
}
...@@ -2,8 +2,26 @@ package com.cnooc.expert.external.expert.model.response; ...@@ -2,8 +2,26 @@ package com.cnooc.expert.external.expert.model.response;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class ExpertInfoGetInfo { public class ExpertInfoGetTestResp {
private List<ExpertInfoGetResult> results;
private ExpertInfoGetInfo info;
@Data
public static class ExpertInfoGetResult {
private String gender;
private String email;
}
@Data
public static class ExpertInfoGetInfo {
private String seed; private String seed;
...@@ -13,4 +31,6 @@ public class ExpertInfoGetInfo { ...@@ -13,4 +31,6 @@ public class ExpertInfoGetInfo {
private String version; private String version;
}
} }
...@@ -2,7 +2,7 @@ package com.cnooc.expert.external.expert.service; ...@@ -2,7 +2,7 @@ package com.cnooc.expert.external.expert.service;
import com.cnooc.expert.external.common.AbstractRetrofitManager; import com.cnooc.expert.external.common.AbstractRetrofitManager;
import com.cnooc.expert.external.expert.api.ExpertServiceApi; import com.cnooc.expert.external.expert.api.ExpertServiceApi;
import com.cnooc.expert.external.expert.model.response.ExpertInfoGetResp; import com.cnooc.expert.external.expert.model.response.ExpertInfoGetTestResp;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -20,9 +20,9 @@ public class ExpertServiceClient extends AbstractRetrofitManager { ...@@ -20,9 +20,9 @@ public class ExpertServiceClient extends AbstractRetrofitManager {
this.expertServiceApi = retrofit.create(ExpertServiceApi.class); this.expertServiceApi = retrofit.create(ExpertServiceApi.class);
} }
public ExpertInfoGetResp getExpertInfo(long id) { public ExpertInfoGetTestResp getExpertInfo(long id) {
Map<String, Object> headers = Maps.newHashMap(); Map<String, Object> headers = Maps.newHashMap();
Call<ExpertInfoGetResp> call = expertServiceApi.expertDetailGet(headers); Call<ExpertInfoGetTestResp> call = expertServiceApi.expertDetailGet(headers);
return this.getResponseBody(call, "getExpertInfo"); return this.getResponseBody(call, "getExpertInfo");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment