|
|
@@ -421,6 +421,78 @@ public class ERPServiceImpl implements ERPService {
|
|
|
|
|
|
return modelMap;
|
|
|
}
|
|
|
+ private String creatOrder_SF(Integer id){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ private String creatOrder_DoP(Integer id){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ private String creatOrder_KY(Integer id){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> creatOrder(String master, Integer id) {
|
|
|
+ SpObserver.putSp(master);
|
|
|
+ Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select lp_finalcompany from LogisticsPrice where lp_id="+id);
|
|
|
+ if(rs.next()){
|
|
|
+ if("顺丰".equals(rs.getGeneralString("lp_finalcompany"))){
|
|
|
+ creatOrder_SF(id);
|
|
|
+ }else if("德邦".equals(rs.getGeneralString("lp_finalcompany"))){
|
|
|
+ creatOrder_DoP(id);
|
|
|
+ }else if("跨越".equals(rs.getGeneralString("lp_finalcompany"))){
|
|
|
+ creatOrder_KY(id);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ modelMap.put("message", "单据不存在!");
|
|
|
+ modelMap.put("success", false);
|
|
|
+ }
|
|
|
+ return modelMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void getSFPrice(String master, Integer id) {
|
|
|
+ SpObserver.putSp(master);
|
|
|
+ Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select LP_ID, LP_CODE, LP_INDATE, LP_CALDATE, LP_TYPE, LP_ROUTE, LP_WEIGHT, LP_VOLUME, LP_RECIPIENT, LP_TEL, LP_ADD, LP_RECORDER, LP_COMPANY1, LP_PROVINCE, LP_DISTRICT, LP_SENDDATETIME,to_char(LP_SENDDATETIME,'yyyy-mm-dd hh24:mi:ss') SENDDATETIME" +
|
|
|
+ " from LogisticsPrice where lp_id="+id);
|
|
|
+ if(rs.next()){
|
|
|
+ getPrice_SF(id,rs.getGeneralString("LP_TYPE"),rs.getGeneralDouble("LP_WEIGHT"),rs.getGeneralDouble("LP_VOLUME"),
|
|
|
+ rs.getGeneralString("lp_province"),
|
|
|
+ rs.getGeneralString("lp_route"),
|
|
|
+ "广东省","深圳市",
|
|
|
+ rs.getDate("LP_SENDDATETIME"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void getKYPrice(String master, Integer id) {
|
|
|
+ SpObserver.putSp(master);
|
|
|
+ Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select LP_ID, LP_CODE, LP_INDATE, LP_CALDATE, LP_TYPE, LP_ROUTE, LP_WEIGHT, LP_VOLUME, LP_RECIPIENT, LP_TEL, LP_ADD, LP_RECORDER, LP_COMPANY1, LP_PROVINCE, LP_DISTRICT, LP_SENDDATETIME,to_char(LP_SENDDATETIME,'yyyy-mm-dd hh24:mi:ss') SENDDATETIME" +
|
|
|
+ " from LogisticsPrice where lp_id="+id);
|
|
|
+ if(rs.next()){
|
|
|
+ getPrice_KY(id,rs.getGeneralString("LP_TYPE"),rs.getGeneralDouble("LP_WEIGHT"), rs.getGeneralString("lp_route"),
|
|
|
+ rs.getDate("LP_SENDDATETIME"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void getDOPPrice(String master, Integer id) {
|
|
|
+ SpObserver.putSp(master);
|
|
|
+ Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select LP_ID, LP_CODE, LP_INDATE, LP_CALDATE, LP_TYPE, LP_ROUTE, LP_WEIGHT, LP_VOLUME, LP_RECIPIENT, LP_TEL, LP_ADD, LP_RECORDER, LP_COMPANY1, LP_PROVINCE, LP_DISTRICT, LP_SENDDATETIME,to_char(LP_SENDDATETIME,'yyyy-mm-dd hh24:mi:ss') SENDDATETIME" +
|
|
|
+ " from LogisticsPrice where lp_id="+id);
|
|
|
+ if(rs.next()){
|
|
|
+ getPrice_DoP(id,rs.getGeneralString("LP_TYPE"),rs.getGeneralDouble("LP_WEIGHT"),rs.getGeneralDouble("LP_VOLUME"),
|
|
|
+ rs.getGeneralString("lp_province"),
|
|
|
+ rs.getGeneralString("lp_route"),
|
|
|
+ rs.getGeneralString("lp_district"),
|
|
|
+ rs.getDate("LP_SENDDATETIME")
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//
|
|
|
private Map<String, Object> getPrice_DoP(Integer id,String type,double weight,double volume,String province_d,String city_d,String district,Date sendDateTime){
|
|
|
/*
|
|
|
@@ -533,6 +605,7 @@ public class ERPServiceImpl implements ERPService {
|
|
|
}else if("物流".equals(type)){
|
|
|
businessType="40";
|
|
|
}
|
|
|
+ //businessType="50";
|
|
|
params.put("format","json");
|
|
|
params.put("timestamp",timeStamp);
|
|
|
String method="open.api.openCommon.queryFreightCharge";
|
|
|
@@ -602,6 +675,7 @@ public class ERPServiceImpl implements ERPService {
|
|
|
}else if("物流".equals(type)){
|
|
|
businessType="255";//卡航
|
|
|
}
|
|
|
+ //businessType="299";
|
|
|
SFPriceQueryReq sfPriceQueryReq=new SFPriceQueryReq();
|
|
|
sfPriceQueryReq.setBusinessType(businessType);//特快
|
|
|
sfPriceQueryReq.setWeight(weight);
|