opt:acs接口优化
This commit is contained in:
@@ -90,6 +90,10 @@ public class GroupController {
|
|||||||
|
|
||||||
List<GroupPlateDtl> groupPlateDtlList = new ArrayList<>();
|
List<GroupPlateDtl> groupPlateDtlList = new ArrayList<>();
|
||||||
JSONArray dtlList = group.getJSONArray("dtlList");
|
JSONArray dtlList = group.getJSONArray("dtlList");
|
||||||
|
|
||||||
|
if(null == dtlList || dtlList.size() == 0){
|
||||||
|
throw new BadRequestException("dtlList不可为空");
|
||||||
|
}
|
||||||
BigDecimal qty = new BigDecimal("0");
|
BigDecimal qty = new BigDecimal("0");
|
||||||
for (int i = 0; i < dtlList.size(); i++) {
|
for (int i = 0; i < dtlList.size(); i++) {
|
||||||
JSONObject row = dtlList.getJSONObject(i);
|
JSONObject row = dtlList.getJSONObject(i);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class AcsUtil {
|
|||||||
String url = acsUrlParam.getValue() + api;
|
String url = acsUrlParam.getValue() + api;
|
||||||
try {
|
try {
|
||||||
String resultMsg = HttpRequest.post(url)
|
String resultMsg = HttpRequest.post(url)
|
||||||
.body(String.valueOf(param))
|
.body(JSONObject.toJSONString(param))
|
||||||
.execute().body();
|
.execute().body();
|
||||||
// 格式转换
|
// 格式转换
|
||||||
JSONObject result = JSONObject.parseObject(resultMsg);
|
JSONObject result = JSONObject.parseObject(resultMsg);
|
||||||
|
|||||||
@@ -183,6 +183,9 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
|||||||
|
|
||||||
List<GroupPlateDtl> groupPlateDtlList = new ArrayList<>();
|
List<GroupPlateDtl> groupPlateDtlList = new ArrayList<>();
|
||||||
JSONArray dtlList = whereJson.getJSONArray("dtlList");
|
JSONArray dtlList = whereJson.getJSONArray("dtlList");
|
||||||
|
if(null == dtlList){
|
||||||
|
throw new BadRequestException("dtlList不可为空");
|
||||||
|
}
|
||||||
BigDecimal qty = new BigDecimal("0");
|
BigDecimal qty = new BigDecimal("0");
|
||||||
for (int i = 0; i < dtlList.size(); i++) {
|
for (int i = 0; i < dtlList.size(); i++) {
|
||||||
JSONObject row = dtlList.getJSONObject(i);
|
JSONObject row = dtlList.getJSONObject(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user