企业国别查询修复
This commit is contained in:
+14
-10
@@ -26,10 +26,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -52,7 +49,7 @@ public class ErpCountryApplicationService{
|
|||||||
erpCountryDTO.setTopOrganizationId(topOrganizationId);
|
erpCountryDTO.setTopOrganizationId(topOrganizationId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageHelper.startPage(erpCountryDTO.getPageNum(),erpCountryDTO.getPageSize());
|
|
||||||
List<ErpCountryPO> list = erpCountryMapper.queryList(erpCountryDTO);
|
List<ErpCountryPO> list = erpCountryMapper.queryList(erpCountryDTO);
|
||||||
|
|
||||||
Page<ErpCountryPO> page = (Page<ErpCountryPO>) list;
|
Page<ErpCountryPO> page = (Page<ErpCountryPO>) list;
|
||||||
@@ -113,14 +110,21 @@ public class ErpCountryApplicationService{
|
|||||||
StringBuilder failMsg = new StringBuilder();
|
StringBuilder failMsg = new StringBuilder();
|
||||||
|
|
||||||
for (ErpCountryDTO dto : dtoList) {
|
for (ErpCountryDTO dto : dtoList) {
|
||||||
Map<String, String> body = new HashMap<>();
|
// Map<String, String> body = new HashMap<>();
|
||||||
body.put("erpCountryCode", dto.getErpCountryCode());
|
// body.put("erpCountryCode", dto.getErpCountryCode());
|
||||||
body.put("erpCountryName", dto.getErpCountryName());
|
// body.put("erpCountryName", dto.getErpCountryName());
|
||||||
|
|
||||||
|
Map<String, String> item = new HashMap<>();
|
||||||
|
item.put("erpCountryCode", dto.getErpCountryCode());
|
||||||
|
item.put("erpCountryName", dto.getErpCountryName());
|
||||||
|
List<Map<String,String>> bodyList = new ArrayList<>();
|
||||||
|
bodyList.add(item);
|
||||||
|
|
||||||
|
|
||||||
GwLog gwLog = new GwLog();
|
GwLog gwLog = new GwLog();
|
||||||
gwLog.setType("企业国别");
|
gwLog.setType("企业国别");
|
||||||
gwLog.setBusinessId(dto.getId());
|
gwLog.setBusinessId(dto.getId());
|
||||||
gwLog.setRequestBody(JSONObject.toJSONString(body));
|
gwLog.setRequestBody(JSONObject.toJSONString(bodyList));
|
||||||
gwLog.setResponseBody("");
|
gwLog.setResponseBody("");
|
||||||
gwLog.setStatus(1);
|
gwLog.setStatus(1);
|
||||||
gwLog.setSendTime(new Date());
|
gwLog.setSendTime(new Date());
|
||||||
@@ -136,7 +140,7 @@ public class ErpCountryApplicationService{
|
|||||||
|
|
||||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
||||||
StringEntity postingString = new StringEntity(JSONObject.toJSONString(body), "UTF-8");
|
StringEntity postingString = new StringEntity(JSONObject.toJSONString(bodyList), "UTF-8");
|
||||||
httpPost.setEntity(postingString);
|
httpPost.setEntity(postingString);
|
||||||
httpPost.setHeader("Content-type", "application/json");
|
httpPost.setHeader("Content-type", "application/json");
|
||||||
httpPost.setHeader("apiName", API_NAME);
|
httpPost.setHeader("apiName", API_NAME);
|
||||||
|
|||||||
+2
@@ -47,6 +47,8 @@ public class BusinessPartnerDTO {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "页码")
|
@ApiModelProperty(value = "页码")
|
||||||
private Integer pageNum = 1;
|
private Integer pageNum = 1;
|
||||||
|
@ApiModelProperty(value = "页码")
|
||||||
|
private Integer pageNo = 1;
|
||||||
|
|
||||||
@ApiModelProperty(value = "每页数量")
|
@ApiModelProperty(value = "每页数量")
|
||||||
private Integer pageSize = 10;
|
private Integer pageSize = 10;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.mhd.oms.interfaces.facade.erpCountry;
|
package com.mhd.oms.interfaces.facade.erpCountry;
|
||||||
|
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.mhd.common.core.web.controller.BaseController;
|
import com.mhd.common.core.web.controller.BaseController;
|
||||||
import com.mhd.common.core.web.domain.AjaxResult;
|
import com.mhd.common.core.web.domain.AjaxResult;
|
||||||
import com.mhd.common.core.web.page.TableDataInfo;
|
import com.mhd.common.core.web.page.TableDataInfo;
|
||||||
@@ -25,8 +26,10 @@ public class ErpCountryApi extends BaseController{
|
|||||||
|
|
||||||
@ApiOperation("查询企业国别列表")
|
@ApiOperation("查询企业国别列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(ErpCountryDTO erpCountryDTO){
|
public TableDataInfo list(ErpCountryDTO erpCountryDTO,
|
||||||
startPage();
|
@RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize){
|
||||||
|
PageHelper.startPage(pageNo, pageSize);
|
||||||
return erpCountryApplicationService.queryList(erpCountryDTO);
|
return erpCountryApplicationService.queryList(erpCountryDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user