1.调整星空对接接口
This commit is contained in:
parent
c39cabcf5e
commit
b6d9def4be
|
@ -181,11 +181,11 @@ public class PoundBillServiceImpl extends ServiceImpl<PoundBillMapper, PoundBill
|
|||
poundBill.initAddFields(poundBill);
|
||||
boolean save = save(poundBill);
|
||||
//调用磅单回调接口。
|
||||
// try {
|
||||
// apiPostBack.makePoundBillFormData(poundBill.getId());
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException("磅单:" + poundBill.getUsrcode() + "推送星空时,出现异常:"+e.getMessage());
|
||||
// }
|
||||
try {
|
||||
apiPostBack.makePoundBillFormData(poundBill.getId());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("磅单:" + poundBill.getUsrcode() + "推送星空时,出现异常:"+e.getMessage());
|
||||
}
|
||||
if(save){
|
||||
return 1;
|
||||
}else{
|
||||
|
@ -330,11 +330,11 @@ public class PoundBillServiceImpl extends ServiceImpl<PoundBillMapper, PoundBill
|
|||
boolean b = updateById(byId);
|
||||
//推送榜单信息到星空系统
|
||||
//调用磅单回调接口。
|
||||
// try {
|
||||
// apiPostBack.makePoundBillFormData(poundBill.getId());
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException("磅单:" + poundBill.getUsrcode() + "推送星空时,出现异常:"+e.getMessage());
|
||||
// }
|
||||
try {
|
||||
apiPostBack.makePoundBillFormData(poundBill.getId());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("磅单:" + poundBill.getUsrcode() + "推送星空时,出现异常:"+e.getMessage());
|
||||
}
|
||||
if(b){
|
||||
return 1;
|
||||
}else{
|
||||
|
|
|
@ -62,7 +62,7 @@ public class ApiPostBack {
|
|||
if ("SAL_DELIVERYNOTICE".equals(srcblltype) || "PUR_ReceiveBill".equals(srcblltype)){
|
||||
String fid = poundBill.getFid();
|
||||
if(!"0".equals(fid)){
|
||||
if(checkOaBillExist(srcblltype,id)) throw new RuntimeException("磅单在星空已经存在下游单据,不允许修改,如需修改请前往星空平台删除下游单据!");
|
||||
if(checkOaBillExist(srcblltype,fid)) throw new RuntimeException("磅单在星空已经存在下游单据,不允许修改,如需修改请前往星空平台删除下游单据!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ public class ApiPostBack {
|
|||
}
|
||||
poundBill.setFid(fid);
|
||||
poundBill.setFentity_fentryid(fEntryID);
|
||||
poundBillService.updatePoundBill(poundBill);
|
||||
poundBillService.updateById(poundBill);
|
||||
}
|
||||
|
||||
//单据下推
|
||||
|
@ -216,8 +216,9 @@ public class ApiPostBack {
|
|||
JSONArray dataList = JSONArray.parseArray(oaData);
|
||||
for (int i = 0; i < dataList.size(); i++) {
|
||||
JSONArray row = dataList.getJSONArray(i);
|
||||
Integer joinQty = row.getInteger(0);
|
||||
if (joinQty > 0) {
|
||||
if (row.size() < 1) continue;
|
||||
String joinQty = row.getString(0);
|
||||
if (Double.parseDouble(joinQty) > 0) {
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ import com.ruoyi.webApi.saveRequestBody.billHandlerUtil.BillHandler;
|
|||
import com.ruoyi.webApi.saveRequestBody.requestbody.DynamicFormRequest;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.RequestData;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.model.PURModel;
|
||||
import com.sun.tools.javac.util.List;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author 16358
|
||||
|
@ -19,7 +19,7 @@ public class PURHandler implements BillHandler {
|
|||
public DynamicFormRequest buildRequest(PoundBill bill) {
|
||||
DynamicFormRequest request = new DynamicFormRequest("PUR_ReceiveBill");
|
||||
RequestData data = new RequestData();
|
||||
data.setNeedReturnFields(new ArrayList<>(List.of("FID","FDetailEntity.FEntryid")));
|
||||
data.setNeedReturnFields(Arrays.asList("FID", "FDetailEntity.FEntryid"));
|
||||
PURModel model = new PURModel(bill);
|
||||
data.setModel(model);
|
||||
request.setData(data);
|
||||
|
|
|
@ -5,9 +5,9 @@ import com.ruoyi.webApi.saveRequestBody.billHandlerUtil.BillHandler;
|
|||
import com.ruoyi.webApi.saveRequestBody.requestbody.DynamicFormRequest;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.RequestData;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.model.SALModel;
|
||||
import com.sun.tools.javac.util.List;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author 16358
|
||||
|
@ -19,7 +19,7 @@ public class SALHandler implements BillHandler {
|
|||
public DynamicFormRequest buildRequest(PoundBill bill) {
|
||||
DynamicFormRequest request = new DynamicFormRequest("SAL_DELIVERYNOTICE");
|
||||
RequestData data = new RequestData();
|
||||
data.setNeedReturnFields(new ArrayList<>(List.of("FID","FEntity.FEntryid")));
|
||||
data.setNeedReturnFields(Arrays.asList("FID", "FEntity.FEntryid"));
|
||||
SALModel model = new SALModel(bill);
|
||||
data.setModel(model);
|
||||
request.setData(data);
|
||||
|
|
|
@ -6,9 +6,9 @@ import com.ruoyi.webApi.saveRequestBody.requestbody.DynamicFormRequest;
|
|||
import com.ruoyi.webApi.saveRequestBody.requestbody.RequestData;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.model.PURModel;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.model.SPModel;
|
||||
import com.sun.tools.javac.util.List;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author 16358
|
||||
|
@ -20,7 +20,7 @@ public class SPHandler implements BillHandler {
|
|||
public DynamicFormRequest buildRequest(PoundBill bill) {
|
||||
DynamicFormRequest request = new DynamicFormRequest("SP_InStock");
|
||||
RequestData data = new RequestData();
|
||||
data.setNeedReturnFields(new ArrayList<>(List.of("FID","FEntity.FEntryid")));
|
||||
data.setNeedReturnFields(Arrays.asList("FID", "FEntity.FEntryid"));
|
||||
SPModel model = new SPModel(bill);
|
||||
data.setModel(model);
|
||||
request.setData(data);
|
||||
|
|
|
@ -5,9 +5,9 @@ import com.ruoyi.webApi.saveRequestBody.billHandlerUtil.BillHandler;
|
|||
import com.ruoyi.webApi.saveRequestBody.requestbody.DynamicFormRequest;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.RequestData;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.model.STKModel;
|
||||
import com.sun.tools.javac.util.List;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author 16358
|
||||
|
@ -19,7 +19,7 @@ public class STKHandler implements BillHandler {
|
|||
public DynamicFormRequest buildRequest(PoundBill bill) {
|
||||
DynamicFormRequest request = new DynamicFormRequest("STK_TRANSFERAPPLY");
|
||||
RequestData data = new RequestData();
|
||||
data.setNeedReturnFields(new ArrayList<>(List.of("FID","FEntity.FEntryid")));
|
||||
data.setNeedReturnFields(Arrays.asList("FID", "FEntity.FEntryid"));
|
||||
STKModel model = new STKModel(bill);
|
||||
data.setModel(model);
|
||||
request.setData(data);
|
||||
|
|
|
@ -6,9 +6,9 @@ import com.ruoyi.webApi.saveRequestBody.requestbody.DynamicFormRequest;
|
|||
import com.ruoyi.webApi.saveRequestBody.requestbody.RequestData;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.model.STKModel;
|
||||
import com.ruoyi.webApi.saveRequestBody.requestbody.model.STKTDModel;
|
||||
import com.sun.tools.javac.util.List;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author 16358
|
||||
|
@ -19,7 +19,7 @@ public class STKTDHandler implements BillHandler {
|
|||
public DynamicFormRequest buildRequest(PoundBill bill) {
|
||||
DynamicFormRequest request = new DynamicFormRequest("STK_TransferDirect");
|
||||
RequestData data = new RequestData();
|
||||
data.setNeedReturnFields(new ArrayList<>(List.of("FID","FBillEntry.FEntryid")));
|
||||
data.setNeedReturnFields(Arrays.asList("FID", "FBillEntry.FEntryid"));
|
||||
STKTDModel model = new STKTDModel(bill);
|
||||
data.setModel(model);
|
||||
request.setData(data);
|
||||
|
|
Loading…
Reference in New Issue