|
|
@@ -4,6 +4,8 @@ import com.uas.eis.dao.*;
|
|
|
import com.uas.eis.entity.EdiSuccessLog;
|
|
|
import com.uas.eis.service.StockService;
|
|
|
import com.uas.eis.utils.*;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.support.rowset.SqlRowSet;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -19,11 +21,12 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Service
|
|
|
public class StockServiceImpl implements StockService{
|
|
|
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
+
|
|
|
private static final String sendStockToYundingUrl = "http://dc.oclean.com/putinstorage";
|
|
|
private static final String stockGetPostFromYundingUrl = "http://dc.oclean.com/getinstorage";
|
|
|
private static final String sendStockPostConfirmToYundingUrl = "http://dc.oclean.com/setconfirmstatus";
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
BaseDao baseDao;
|
|
|
@Autowired
|
|
|
@@ -79,6 +82,8 @@ public class StockServiceImpl implements StockService{
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
+ logger.error("error",e);
|
|
|
+
|
|
|
res.put("success",false);
|
|
|
res.put("remark",e.getMessage());
|
|
|
}
|
|
|
@@ -129,6 +134,7 @@ public class StockServiceImpl implements StockService{
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
+ logger.error("error",e);
|
|
|
ediLogDao.save(LogUtil.getPostFailLog(responseText,e.getMessage()));
|
|
|
}
|
|
|
}
|
|
|
@@ -158,6 +164,7 @@ public class StockServiceImpl implements StockService{
|
|
|
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
+ logger.error("error",e);
|
|
|
ediLogDao.save(LogUtil.getPostFailLog(code,responseText,e.getMessage()));
|
|
|
}
|
|
|
|
|
|
@@ -180,6 +187,7 @@ public class StockServiceImpl implements StockService{
|
|
|
System.out.println("confirm response:" + response.getResponseText());
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
+ logger.error("error",e);
|
|
|
}
|
|
|
}
|
|
|
|