附件名称.截取修复。
parent
fa4952e46d
commit
86fbf7ccbf
@ -0,0 +1,52 @@
|
||||
package com.weaver.seconddev.sxjg.controller;
|
||||
/**
|
||||
* 员工自助接口
|
||||
*/
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.sxjg.util.NccApiUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/papi/secondev/sxjg/employself")
|
||||
@Slf4j
|
||||
public class EmployeeSelfServiceController {
|
||||
|
||||
@WeaPermission(publicPermission = true)
|
||||
@PostMapping("/findInfos")
|
||||
public WeaResult<Map<String,String>> check(
|
||||
@RequestParam("userPk") String userPk
|
||||
) throws Exception {
|
||||
Map<String,String> rs = new HashMap<>();
|
||||
JSONObject r1 = new JSONObject();
|
||||
JSONArray r2 = new JSONArray();
|
||||
JSONObject r3 = new JSONObject();
|
||||
r3.put("pk_psndoc","0001A2100000003FMWBU");
|
||||
r2.add(r3);
|
||||
r1.put("data",r2);
|
||||
|
||||
NccApiUtil nccApiUtil = new NccApiUtil();
|
||||
nccApiUtil.init();
|
||||
String token = nccApiUtil.getToken();
|
||||
String url = nccApiUtil.getBaseUrl()+"nccloud/api/hrtrn/openAPI/payslipSync/entry";
|
||||
String rs11 = nccApiUtil.doJsonPost(url,token,r1.toJSONString());
|
||||
return WeaResult.success(rs);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test111() throws Exception {
|
||||
NccApiUtil nccApiUtil = new NccApiUtil();
|
||||
nccApiUtil.init();
|
||||
String token = nccApiUtil.getToken();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue