Commit ab4c94e7 by kenzo

add 个人请假

parent 4baf314d
...@@ -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,28 +11,28 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; ...@@ -11,28 +11,28 @@ 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 // @Override
public void addInterceptors(InterceptorRegistry registry) { // public void addInterceptors(InterceptorRegistry registry) {
//
// 注册登录拦截器,并设置拦截路径和排除路径 // // 注册登录拦截器,并设置拦截路径和排除路径
registry.addInterceptor(loginInterceptor) // registry.addInterceptor(loginInterceptor)
.addPathPatterns("/**") // 拦截所有路径 // .addPathPatterns("/**") // 拦截所有路径
.excludePathPatterns( // 排除一些路径 // .excludePathPatterns( // 排除一些路径
"/sys/**", // "/sys/**",
"/verify/**", // "/verify/**",
"/person/**", // "/person/**",
"/text/**" // "/text/**"
); // );
//
registry.addInterceptor(webAuthInterceptor()); // registry.addInterceptor(webAuthInterceptor());
} // }
@Bean // @Bean-
public WebAuthInterceptor webAuthInterceptor() { // public WebAuthInterceptor webAuthInterceptor() {
return new WebAuthInterceptor(); // return new WebAuthInterceptor();
} // }
} }
...@@ -4,8 +4,13 @@ import com.cnooc.expert.common.response.ApiResult; ...@@ -4,8 +4,13 @@ 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.request.PingBiaoXiangMuInfoGetByChouQuMaReq;
import com.cnooc.expert.controller.expert.model.request.PingBiaoXiangMuPageReq;
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.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.NofilterListItemResp;
import com.cnooc.expert.controller.expert.model.response.PingBiaoXiangMuInfoGetByChouQuMaResp;
import com.cnooc.expert.controller.expert.model.response.SecondaryUnitListItemResp; 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;
...@@ -101,9 +106,31 @@ public class ExpertController { ...@@ -101,9 +106,31 @@ public class ExpertController {
* @return * @return
*/ */
@PostMapping("/info") @PostMapping("/info")
public ApiResult<ExpertInfoGetResp> ExpertInfoGet(@RequestBody @Validated CompanyPageReq req) { public ApiResult<ExpertInfoGetResp> ExpertInfoGet() {
return ApiResult.successWithResult(expertService.getExpertInfo(req)); 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;
}
...@@ -11,9 +11,9 @@ public class ExpertInfoGetResp { ...@@ -11,9 +11,9 @@ public class ExpertInfoGetResp {
private String businessId; private String businessId;
private Long pinQiStartTime; private String pinQiStartTime;
private Long pinQiEndTime; private String pinQiEndTime;
private Bean bean; private Bean bean;
...@@ -54,7 +54,7 @@ public class ExpertInfoGetResp { ...@@ -54,7 +54,7 @@ public class ExpertInfoGetResp {
@Builder @Builder
public static class Bean { public static class Bean {
private String adAccount; private String adAccount;
private String age; private Integer age;
private String authPassWithImport; private String authPassWithImport;
private String auths; private String auths;
private String base64FanMianFuJian; private String base64FanMianFuJian;
...@@ -99,7 +99,7 @@ public class ExpertInfoGetResp { ...@@ -99,7 +99,7 @@ public class ExpertInfoGetResp {
private String gongZuoZhiWu; private String gongZuoZhiWu;
private String gongZuoZhuanYeName; private String gongZuoZhuanYeName;
private String gongZuoZhuanYeYears; private String gongZuoZhuanYeYears;
private String gongZuoZhuangTai; private Integer gongZuoZhuangTai;
private String graduationDate; private String graduationDate;
private Boolean hasLianJieChuLiYiJian; private Boolean hasLianJieChuLiYiJian;
private String huoJiangQingKuang; private String huoJiangQingKuang;
...@@ -271,7 +271,7 @@ public class ExpertInfoGetResp { ...@@ -271,7 +271,7 @@ public class ExpertInfoGetResp {
private String modifyTimeText; private String modifyTimeText;
private String pingDingTime; private Long pingDingTime;
private String pingDingTimeText; private String pingDingTimeText;
...@@ -323,7 +323,7 @@ public class ExpertInfoGetResp { ...@@ -323,7 +323,7 @@ public class ExpertInfoGetResp {
private String zhuanYeGuid; private String zhuanYeGuid;
private String zhuanYeJiBie; private String zhuanYeJiBie;
private String zhuanYeName; private String zhuanYeName;
private String zhuanYeNianXian; private Integer zhuanYeNianXian;
private Integer zhuanYeStatus; private Integer zhuanYeStatus;
private String zhuanYeXiangGuanJingLi; private String zhuanYeXiangGuanJingLi;
private String ziXinXiGuid; private String ziXinXiGuid;
......
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;
}
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;
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.HeaderMap; import retrofit2.http.HeaderMap;
...@@ -11,5 +11,5 @@ import java.util.Map; ...@@ -11,5 +11,5 @@ import java.util.Map;
public interface LoginServiceApi { public interface LoginServiceApi {
@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.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,15 +2,35 @@ package com.cnooc.expert.external.expert.model.response; ...@@ -2,15 +2,35 @@ 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; private Integer results;
private Integer results; private Integer page;
private Integer page; 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