Kaynağa Gözat

更新员工信息

tags/24080901
PoffyZhang 1 yıl önce
ebeveyn
işleme
2209479226
3 değiştirilmiş dosya ile 34 ekleme ve 0 silme
  1. +30
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
  2. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java
  3. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserDetailVO.java

+ 30
- 0
pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java Dosyayı Görüntüle

@@ -1,10 +1,17 @@
package com.ningdatech.pmapi.ding.controller;

import com.alibaba.fastjson.JSON;
import com.ningdatech.pmapi.common.util.CryptUtils;
import com.ningdatech.pmapi.common.util.RefreshKeyUtil;
import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask;
import com.ningdatech.pmapi.ding.task.GovBusinessStripsTask;
import com.ningdatech.pmapi.ding.task.OrganizationBatchGetTask;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

import java.security.NoSuchAlgorithmException;

/**
* <p>
@@ -58,4 +65,27 @@ public class DingInfoPullController {
public void getBatchEmployeeByCode(@PathVariable String orgCode) {
employeeBatchGetTask.getBatchEmployeeByCode(orgCode);
}

@GetMapping("/test-app")
public void testApp() throws NoSuchAlgorithmException {
long timestamp = System.currentTimeMillis();
String areaCode = "331121";
String appKey = "A331101453557202109017383";
String appScret = "496f0f2a19994f76b4fd9dae087366c7";

String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret);
String capCode = CryptUtils.MD5Encode(timestamp + areaCode);
String capTime = String.valueOf(timestamp);
String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp);
String url = "https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/94wbaL1I1Pbz0648.htm?requestTime=" + timestamp +
"&sign=" + sign + "&appKey=" + appKey + "&capCode=" + capCode + "&capTime=" + capTime +
"&baseProjSys=测试应用&areaCode=331121&baseProjName=nsl-丽水演示项目&baseProjId=331100230130112233001" +
"&isEffective=1&baseProjSysCode=25083657";
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class);

System.out.println(JSON.toJSONString(forEntity));
}


}

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java Dosyayı Görüntüle

@@ -409,6 +409,7 @@ public class UserInfoManage {
resUserDetailVO.setPhoneNo(userInfo.getMobile());
resUserDetailVO.setStatus(userInfo.getAvailable());
resUserDetailVO.setEmployeeCode(userInfo.getEmployeeCode());
resUserDetailVO.setAvatar(userInfo.getAvatar());

// 装配用户角色信息列表
List<UserRole> userRoleList = iUserRoleService.list(Wrappers.lambdaQuery(UserRole.class)


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserDetailVO.java Dosyayı Görüntüle

@@ -59,6 +59,9 @@ public class ResUserDetailVO {
@ApiModelProperty("更新时间")
private LocalDateTime updateTime;

@ApiModelProperty("头像")
private String avatar;

//是否是市级单位
public Boolean getIsMunicipalOrg(){
//如果是丽水市本级的code 就是


Yükleniyor…
İptal
Kaydet