根据加盟商编码查询加盟商信息
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
package com.cool.store.dto.ehr;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 加盟商信息查询
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class FranchiseeInfoDTO {
|
||||
@ApiModelProperty("自增主键")
|
||||
private int keyId;
|
||||
@ApiModelProperty("加盟商编号")
|
||||
private String frId;
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String frName;
|
||||
@ApiModelProperty("加盟商手机号码")
|
||||
private String frMobile;
|
||||
@ApiModelProperty("身份证号")
|
||||
private String idCard;
|
||||
@ApiModelProperty("身份证地址")
|
||||
private String idCardAddress;
|
||||
@ApiModelProperty("性别:0-女,1-男")
|
||||
private int sex;
|
||||
@ApiModelProperty("状态:0-蓄水池,1-查看,2-正式,3-解约")
|
||||
private int stat;
|
||||
@ApiModelProperty("缴款时间")
|
||||
private String payDateStr;
|
||||
@ApiModelProperty("生效日期")
|
||||
private String eftDate;
|
||||
@ApiModelProperty("结束日期")
|
||||
private String endDateStr;
|
||||
@ApiModelProperty("收款账户")
|
||||
private String retAccount;
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
@ApiModelProperty("开户行名称")
|
||||
private String bankName;
|
||||
@ApiModelProperty("开户行支行")
|
||||
private String bankSub;
|
||||
@ApiModelProperty("开户行支行名称")
|
||||
private String bankSubName;
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
@ApiModelProperty("省份代码")
|
||||
private String provinceCode;
|
||||
@ApiModelProperty("省份名称")
|
||||
private String provinceName;
|
||||
@ApiModelProperty("城市代码")
|
||||
private String cityCode;
|
||||
@ApiModelProperty("城市名称")
|
||||
private String cityName;
|
||||
@ApiModelProperty("生日")
|
||||
private Date birthday;
|
||||
@ApiModelProperty("微信号")
|
||||
private String wechat;
|
||||
@ApiModelProperty("投资方式")
|
||||
private String investType;
|
||||
@ApiModelProperty("其它业务/生意")
|
||||
private String otherBusinesses;
|
||||
@ApiModelProperty("合伙人")
|
||||
private List<FranchiseePartnerDTO> partners;
|
||||
@ApiModelProperty("资金来源")
|
||||
private String capitalSource;
|
||||
@ApiModelProperty("投资金额,单位:万")
|
||||
private String capitalAmount;
|
||||
@ApiModelProperty("水果行业从业经验")
|
||||
private String experience;
|
||||
@ApiModelProperty("是否有亲属在鲜丰工作")
|
||||
private int workAtXf;
|
||||
@ApiModelProperty("亲属工号(有亲属在鲜丰工作)")
|
||||
private String jobNo;
|
||||
@ApiModelProperty("行业类型")
|
||||
private String industryType;
|
||||
@ApiModelProperty("文化程度")
|
||||
private String education;
|
||||
@ApiModelProperty("紧急联系人姓名")
|
||||
private String contactName;
|
||||
@ApiModelProperty("紧急联系人电话")
|
||||
private String contactPhone;
|
||||
@ApiModelProperty("面试信息id")
|
||||
private String interviewId;
|
||||
@ApiModelProperty("面试视频地址")
|
||||
private String videoUrl;
|
||||
@ApiModelProperty("面试得分表地址")
|
||||
private String tableUrl;
|
||||
@ApiModelProperty("身份证原件正面地址")
|
||||
private String idCardFrontUrl;
|
||||
@ApiModelProperty("身份证原件背面地址")
|
||||
private String idCardBackUrl;
|
||||
@ApiModelProperty("面试状态")
|
||||
private String state;
|
||||
@ApiModelProperty("开户银行编码")
|
||||
private String bankCode;
|
||||
@ApiModelProperty("支行编码")
|
||||
private String bankSubCode;
|
||||
@ApiModelProperty("加盟费")
|
||||
private int franchiseFee;
|
||||
@ApiModelProperty("保证金")
|
||||
private int deposit;
|
||||
@ApiModelProperty("合同开始时间")
|
||||
private Date contractStartDate;
|
||||
@ApiModelProperty("合同结束时间")
|
||||
private Date contractEndDate;
|
||||
@ApiModelProperty("合同附件")
|
||||
private String attachmentUrl;
|
||||
@ApiModelProperty("签约类型:0-个人签约;1-企业签约")
|
||||
private int signType;
|
||||
@ApiModelProperty("法人")
|
||||
private String legalPerson;
|
||||
@ApiModelProperty("营业期限")
|
||||
private String businessTerm;
|
||||
@ApiModelProperty("OA流程编号")
|
||||
private String processNum;
|
||||
@ApiModelProperty("")
|
||||
private int bind;
|
||||
@ApiModelProperty("")
|
||||
private int sign;
|
||||
@ApiModelProperty("")
|
||||
private int business;
|
||||
@ApiModelProperty("门店信息")
|
||||
private List<FranchiseeStoreInfoDTO> storeInfoVOS;
|
||||
|
||||
@Data
|
||||
public static class FranchiseePartnerDTO{
|
||||
@ApiModelProperty("合伙人姓名")
|
||||
private String name;
|
||||
@ApiModelProperty("合伙人电话")
|
||||
private String phone;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class FranchiseeStoreInfoDTO{
|
||||
@ApiModelProperty("门店代码")
|
||||
private String storeCode;
|
||||
@ApiModelProperty("门店名称")
|
||||
private String storeName;
|
||||
@ApiModelProperty("开店/关店")
|
||||
private String status;
|
||||
@ApiModelProperty("正常营业/关店")
|
||||
private String businessStatus;
|
||||
@ApiModelProperty("解约")
|
||||
private String signingStatus;
|
||||
@ApiModelProperty("解约原因")
|
||||
private String unbindCause;
|
||||
@ApiModelProperty("浙北大区/萧山战区/萧山一区域")
|
||||
private String area;
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String franchiseeName;
|
||||
@ApiModelProperty("加盟商编码")
|
||||
private String frId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.cool.store.dto.ehr;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 员工详细信息数据接口
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class StaffBaseInfoDTO {
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("工号")
|
||||
private String staffNumber;
|
||||
|
||||
@ApiModelProperty("身份证")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty("部门code")
|
||||
private String departmentCode;
|
||||
|
||||
@ApiModelProperty("部门名称")
|
||||
private String departmentName;
|
||||
|
||||
@ApiModelProperty("岗位Id")
|
||||
private String jobId;
|
||||
|
||||
@ApiModelProperty("岗位名称")
|
||||
private String jobName;
|
||||
|
||||
@ApiModelProperty("员工状态:0离职、1转正、2试用、3实习、4待离职、5临时工、6暑假工、7兼职工")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty("生日")
|
||||
private String birthday;
|
||||
|
||||
@ApiModelProperty("身份证-人像面")
|
||||
private String idNumPhoto;
|
||||
|
||||
@ApiModelProperty("身份证-国徽面")
|
||||
private String emblemPhoto;
|
||||
|
||||
@ApiModelProperty("最高学历")
|
||||
private String highestDegree;
|
||||
|
||||
@ApiModelProperty("手机号(OA侧绑定的手机号)")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("入职日期")
|
||||
private String entryDate;
|
||||
|
||||
@ApiModelProperty("年龄")
|
||||
private String age;
|
||||
|
||||
@ApiModelProperty("健康证")
|
||||
private String healthCertificate;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.ehr.FranchiseeInfoDTO;
|
||||
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
||||
|
||||
/**
|
||||
* @author wxp
|
||||
*/
|
||||
public interface XfsgEhrService {
|
||||
|
||||
/**
|
||||
* 员工详细信息数据接口
|
||||
* @param staffNumber
|
||||
* @return
|
||||
*/
|
||||
StaffBaseInfoDTO getUserInfoByCode(String staffNumber);
|
||||
|
||||
/**
|
||||
* 根据加盟商编码查询加盟商
|
||||
* @param frId
|
||||
* @return
|
||||
*/
|
||||
FranchiseeInfoDTO getFranchiseeInfoByFrId(String frId);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.ehr.FranchiseeInfoDTO;
|
||||
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.service.XfsgEhrService;
|
||||
import com.cool.store.utils.SecureUtil;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* describe: 鲜丰水果api
|
||||
* @author wxp
|
||||
* @date 2024/04/28
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class XfsgEhrServiceImpl implements XfsgEhrService {
|
||||
|
||||
@Value("${xfsg.url}")
|
||||
private String xfsgUrl;
|
||||
|
||||
@Resource
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
|
||||
@Override
|
||||
public StaffBaseInfoDTO getUserInfoByCode(String staffNumber) {
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
fillSignatureInfo(requestMap);
|
||||
requestMap.put("staffNumber", staffNumber);
|
||||
String url = xfsgUrl + Constants.GET_USER_INFO_BY_CODE;
|
||||
JSONObject result = httpRestTemplateService.getForObject(url, JSONObject.class, requestMap);
|
||||
Integer code = result.getInteger("code");
|
||||
if (code != 0) {
|
||||
log.info("xfsg#getUserInfoByCode,staffNumber:{},请求失败", staffNumber);
|
||||
return null;
|
||||
}
|
||||
JSONObject data = result.getJSONObject("data");
|
||||
if (data == null) {
|
||||
log.info("xfsg#getUserInfoByCode,staffNumber:{},返回值data为空", staffNumber);
|
||||
return null;
|
||||
}
|
||||
StaffBaseInfoDTO staffBaseInfoDTO = JSON.parseObject(data.toJSONString(), StaffBaseInfoDTO.class);
|
||||
return staffBaseInfoDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FranchiseeInfoDTO getFranchiseeInfoByFrId(String frId) {
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
fillSignatureInfo(requestMap);
|
||||
requestMap.put("frId", frId);
|
||||
String url = xfsgUrl + Constants.GET_FRANCHISEE_INFO_BY_CODE;
|
||||
JSONObject result = httpRestTemplateService.getForObject(url, JSONObject.class, requestMap);
|
||||
Integer code = result.getInteger("code");
|
||||
if (code != 0) {
|
||||
log.info("xfsg#getFranchiseeInfoByFrId,frId:{},请求失败", frId);
|
||||
return null;
|
||||
}
|
||||
JSONObject data = result.getJSONObject("data");
|
||||
if (data == null) {
|
||||
log.info("xfsg#getFranchiseeInfoByFrId,frId:{},返回值data为空", frId);
|
||||
return null;
|
||||
}
|
||||
FranchiseeInfoDTO franchiseeInfoDTO = JSON.parseObject(data.toJSONString(), FranchiseeInfoDTO.class);
|
||||
return franchiseeInfoDTO;
|
||||
}
|
||||
|
||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
String signature = SecureUtil.getSignature(timestamp);
|
||||
requestMap.put("timestamp", timestamp);
|
||||
requestMap.put("signature", signature);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -178,6 +178,12 @@ public class Constants
|
||||
|
||||
public static final String FRANCHISE_AGREEMENT_PERSON = "/api/coolstore/start-flow/franchise-agreement-person";
|
||||
|
||||
// 员工详细信息数据接口
|
||||
public static final String GET_USER_INFO_BY_CODE = "/api/kdz/get-user-info-by-code";
|
||||
// 加盟商信息数据接口
|
||||
public static final String GET_FRANCHISEE_INFO_BY_CODE = "/api/kdz/franchisee/get-info";
|
||||
|
||||
|
||||
public static final Integer ZERO_INTEGER = 0;
|
||||
|
||||
public static final Integer ONE_INTEGER = 1;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.dto.ehr.FranchiseeInfoDTO;
|
||||
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.XfsgEhrService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 培训登记
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mini/trainingRegist")
|
||||
@Api(tags = "移动端培训登记")
|
||||
@Slf4j
|
||||
public class TrainingRegistController {
|
||||
|
||||
@Resource
|
||||
XfsgEhrService xfsgEhrService;
|
||||
|
||||
@ApiOperation("根据工号获取员工详细信息")
|
||||
@GetMapping("/getUserInfoByCode")
|
||||
public ResponseResult<StaffBaseInfoDTO> getUserInfoByCode(@RequestParam("staffNumber") String staffNumber) {
|
||||
return ResponseResult.success(xfsgEhrService.getUserInfoByCode(staffNumber));
|
||||
}
|
||||
|
||||
@ApiOperation("根据加盟商编码查询加盟商信息")
|
||||
@GetMapping("/getFranchiseeInfoByFrId")
|
||||
public ResponseResult<FranchiseeInfoDTO> getFranchiseeInfoByFrId(@RequestParam("frId") String frId) {
|
||||
return ResponseResult.success(xfsgEhrService.getFranchiseeInfoByFrId(frId));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user