|
|
@@ -103,7 +103,57 @@ public class HlgCompanyController {
|
|
|
result.setResult(pageList);
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页列表查询企业合同列表
|
|
|
+ * @param
|
|
|
+ * @param pageNo
|
|
|
+ * @param pageSize
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/SubcontractorContractList")
|
|
|
+ public Result<IPage<Object>> SubcontractorContractList(HlgCompanySubcontractor hlgCompanySubcontractor,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ Result<IPage<Object>> result = new Result<IPage<Object>>();
|
|
|
+ String accessToken = OauthTokenUtils.getDayAccessToken();
|
|
|
+ String requestUrl = OauthApi.contractList;
|
|
|
+ Map<String, Object> parameters = new HashMap<>();
|
|
|
+ parameters.put("pageNo", pageNo);
|
|
|
+ parameters.put("pageSize", pageSize);
|
|
|
+ parameters.put("companyId",hlgCompanySubcontractor.getCompanyId() );
|
|
|
+ parameters.put("subcontractorId",hlgCompanySubcontractor.getSubcontractorId() );
|
|
|
+ parameters.put("cpType",hlgCompanySubcontractor.getCpType() );
|
|
|
+ String biz_content = CryptTool.encode(JSONObject.toJSONString(parameters));
|
|
|
+ JSONObject jsonObject = OauthTokenUtils.doRequest(requestUrl, HttpsContants.POST, biz_content, accessToken);
|
|
|
+ log.info("jsonObject===={}", jsonObject);
|
|
|
+ if (jsonObject != null) {
|
|
|
+ if (jsonObject.getBoolean("success")) {
|
|
|
+ log.info("企业服务商合同列表===={}", jsonObject);
|
|
|
+ JSONObject jsonObject1=jsonObject.getJSONObject("result");
|
|
|
+ List<Object> list= (List<Object>) jsonObject1.get("records");
|
|
|
+ Page<Object> pageList=new Page<Object>();
|
|
|
+ pageList.setRecords(list);
|
|
|
+ result.setResult(pageList);
|
|
|
+ pageList.setTotal(jsonObject1.getInteger("total"));
|
|
|
+ pageList.setCurrent(jsonObject1.getInteger("current"));
|
|
|
+ pageList.setSize(jsonObject1.getInteger("size"));
|
|
|
+ result.setSuccess(true);
|
|
|
+ return result;
|
|
|
+ } else {
|
|
|
+ //抛出异常
|
|
|
+ throw new JeecgBootException("查询失败");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ throw new JeecgBootException("查询失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
* @param hlgCompany
|