|
|
@@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.uas.eis.dao.BaseDao;
|
|
|
import com.uas.eis.dao.SqlRowList;
|
|
|
-import com.uas.eis.entity.Employee;
|
|
|
import com.uas.eis.entity.Master;
|
|
|
import com.uas.eis.service.EnterpriseService;
|
|
|
import com.uas.eis.service.ErpService;
|
|
|
@@ -48,11 +47,11 @@ public class ErpServiceImpl implements ErpService {
|
|
|
int count = baseDao.getCount("select count(*) from prodinout where nvl(pi_issendxx,0)<>0 and pi_id=" + id);
|
|
|
if (count>0){
|
|
|
Master master = enterpriseService.getMasterByName(masterName);;
|
|
|
- String baseUrl = baseUrlUtil.getBaseUrl("WMS");
|
|
|
+ String baseUrl = baseUrlUtil.getBaseUrl("WMS",master.getMa_env());
|
|
|
String piClass = baseDao.getFieldValue("prodinout", "pi_class", "pi_id=" + id, String.class);
|
|
|
String inoutno = baseDao.getFieldValue("prodinout", "pi_inoutno", "pi_id=" + id, String.class);
|
|
|
try {
|
|
|
- String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken");
|
|
|
+ String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken",master.getMa_env());
|
|
|
String url="";
|
|
|
Object inorout = baseDao.getFieldDataByCondition("DOCUMENTSETUP", "ds_inorout", "DS_NAME='" + piClass + "'");
|
|
|
Boolean isOut=false;
|
|
|
@@ -302,7 +301,7 @@ public class ErpServiceImpl implements ErpService {
|
|
|
int count = baseDao.getCount("select count(*) from prodinout where nvl(pi_issendxx,0)<>0 and pi_id=" + id);
|
|
|
if(count>0){
|
|
|
Master master = enterpriseService.getMasterByName(masterName);;
|
|
|
- String baseUrl = baseUrlUtil.getBaseUrl("WMS");
|
|
|
+ String baseUrl = baseUrlUtil.getBaseUrl("WMS",master.getMa_env());
|
|
|
String inoutno = baseDao.getFieldValue("prodinout", "pi_inoutno", "pi_id=" + id, String.class);
|
|
|
String piClass = baseDao.getFieldValue("prodinout", "pi_class", "pi_id=" + id, String.class);
|
|
|
Object inorout = baseDao.getFieldDataByCondition("DOCUMENTSETUP", "ds_inorout", "DS_NAME='" + piClass + "'");
|
|
|
@@ -312,7 +311,7 @@ public class ErpServiceImpl implements ErpService {
|
|
|
}else{
|
|
|
orderType="IN";
|
|
|
}
|
|
|
- String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken");
|
|
|
+ String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken",master.getMa_env());
|
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
|
dataMap.put("master",master.getMa_user());
|
|
|
dataMap.put("inOutId",id);
|
|
|
@@ -375,9 +374,9 @@ public class ErpServiceImpl implements ErpService {
|
|
|
Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
Master master = enterpriseService.getMasterByName(masterName);
|
|
|
//域名
|
|
|
- String baseUrl = baseUrlUtil.getBaseUrl("WMS");
|
|
|
+ String baseUrl = baseUrlUtil.getBaseUrl("WMS",master.getMa_env());
|
|
|
//请求头
|
|
|
- String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken");
|
|
|
+ String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken",master.getMa_env());
|
|
|
//传数据到湘芯科技
|
|
|
Map<String, Object> dataMaps = new HashMap<>();
|
|
|
List<Map<String, Object>> entrys = new LinkedList<Map<String, Object>>();
|
|
|
@@ -573,8 +572,9 @@ public class ErpServiceImpl implements ErpService {
|
|
|
@Override
|
|
|
public Map<String, Object> resPushPo(int poId, String masterName) {
|
|
|
Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
- String baseUrl = baseUrlUtil.getBaseUrl("WMS");
|
|
|
- String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken");
|
|
|
+ Master master = enterpriseService.getMasterByName(masterName);
|
|
|
+ String baseUrl = baseUrlUtil.getBaseUrl("WMS",master.getMa_env());
|
|
|
+ String Authorization = "Bearer "+ tokenCaches.getTokenCache("ProdInOutToken",master.getMa_env());
|
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
|
String code = baseDao.getFieldValue("customtable", "ct_code", "ct_id=" + poId, String.class);
|
|
|
dataMap.put("custOrderNo",code);
|