|
|
@@ -10,11 +10,13 @@ import com.uas.erp.schedular.diymall.domain.OrdersInfo;
|
|
|
import com.uas.erp.schedular.diymall.domain.LoggingOrder;
|
|
|
import com.uas.erp.schedular.diymall.domain.Order;
|
|
|
import com.uas.erp.schedular.diymall.domain.OrderProduct;
|
|
|
+import com.uas.erp.schedular.entity.Master;
|
|
|
import com.uas.erp.schedular.finance.mq.HttpsClientRequestFactory;
|
|
|
import com.uas.erp.schedular.mall.constant.StringConstant;
|
|
|
import com.uas.erp.schedular.mall.domain.*;
|
|
|
import com.uas.erp.schedular.task.support.Method;
|
|
|
import com.uas.erp.schedular.task.support.TaskMapping;
|
|
|
+import com.uas.erp.schedular.util.ContextHolder;
|
|
|
import com.usoft.security.utils.OpenApiSignUtil;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@@ -270,10 +272,10 @@ public class ProductTask extends AbstractTask {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- private final static String SECRETKEY = "58177a621f4645398c92e93768002de7";
|
|
|
- private final static String SECRETUU = "10044412";
|
|
|
- private final static String BASEPATH_PRODUCT = "https://mallproductrest.usoftchina.com";
|
|
|
- private final static String BASEPATH_TRADE = "https://malltraderest.usoftchina.com";
|
|
|
+ private static String SECRETKEY = "58177a621f4645398c92e93768002de7";
|
|
|
+ private static String SECRETUU = "10044412";
|
|
|
+ private static String BASEPATH_PRODUCT = "https://mallproductrest.usoftchina.com";
|
|
|
+ private static String BASEPATH_TRADE = "https://malltraderest.usoftchina.com";
|
|
|
|
|
|
// private final static String SECRETKEY = "c49f7be6a861461ab951e55030055a5c";
|
|
|
// private final static String SECRETUU = "50000089";
|
|
|
@@ -287,6 +289,10 @@ public class ProductTask extends AbstractTask {
|
|
|
*/
|
|
|
@TaskMapping(title = "库存同步", cron = "0 0 3 * * ?")
|
|
|
public void getMallProductToErpProduct() throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
|
|
|
+ Master master = ContextHolder.getMaster();
|
|
|
+ if ("test".equalsIgnoreCase(master.getEnv())) {
|
|
|
+ BASEPATH_PRODUCT = "https://mallproductrest.uuzcc.cn";
|
|
|
+ }
|
|
|
//查询中间表 库存取整
|
|
|
List<Stock> stock = jdbcTemplate.queryForBeanList("select TSS_PRODCODE,round(tss_amount,0) tss_amount, TSS_DATE ,pr_zxdhl moq,pr_zxbzs mpq,getsaleprice_hkd(pr_code) price,pr_remark_sale invoiceModel,pr_remark_purchase invoiceName" +
|
|
|
" FROM TT_SHOP_STOCK LEFT JOIN PRODUCT ON TSS_PRODCODE=pr_code",Stock.class);
|
|
|
@@ -377,7 +383,10 @@ public class ProductTask extends AbstractTask {
|
|
|
*/
|
|
|
@TaskMapping(title = "订单同步", cron = "0 0 2 * * ?")
|
|
|
public void getOrdersByPage() throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
|
|
|
-
|
|
|
+ Master master = ContextHolder.getMaster();
|
|
|
+ if ("test".equalsIgnoreCase(master.getEnv())) {
|
|
|
+ BASEPATH_TRADE = "https://malltraderest.uuzcc.cn";
|
|
|
+ }
|
|
|
String url = BASEPATH_TRADE + "/openapi/trade/order/page/get?";
|
|
|
String materialCod = ""; // 物料编号
|
|
|
Long updateTime = new Date().getTime()-24*60*60*1000; // 数据修改时间 时间戳
|