|
@@ -14,7 +14,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import com.uas.platform.b2b.erp.model.AcceptNotify;
|
|
import com.uas.platform.b2b.erp.model.AcceptNotify;
|
|
|
import com.uas.platform.b2b.erp.model.PurchaseNotify;
|
|
import com.uas.platform.b2b.erp.model.PurchaseNotify;
|
|
|
import com.uas.platform.b2b.erp.service.PurchaseNotifyService;
|
|
import com.uas.platform.b2b.erp.service.PurchaseNotifyService;
|
|
|
|
|
+import com.uas.platform.b2b.erp.support.ErpBufferedLogger;
|
|
|
import com.uas.platform.b2b.service.PurchaseNoticeService;
|
|
import com.uas.platform.b2b.service.PurchaseNoticeService;
|
|
|
|
|
+import com.uas.platform.core.logging.BufferedLoggerManager;
|
|
|
import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
import com.uas.platform.core.util.serializer.FlexJsonUtils;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -34,6 +36,8 @@ public class PurchaseNotifyController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private PurchaseNoticeService purchaseNoticeService;
|
|
private PurchaseNoticeService purchaseNoticeService;
|
|
|
|
|
|
|
|
|
|
+ private final static ErpBufferedLogger logger = BufferedLoggerManager.getLogger(ErpBufferedLogger.class);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 将ERP的送货提醒写到平台
|
|
* 将ERP的送货提醒写到平台
|
|
|
*
|
|
*
|
|
@@ -47,6 +51,7 @@ public class PurchaseNotifyController {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
List<PurchaseNotify> notifies = FlexJsonUtils.fromJsonArray(jsonStr, PurchaseNotify.class);
|
|
List<PurchaseNotify> notifies = FlexJsonUtils.fromJsonArray(jsonStr, PurchaseNotify.class);
|
|
|
purchaseNoticeService.save(purchaseNotifyService.convertPurchaseNotify(notifies));
|
|
purchaseNoticeService.save(purchaseNotifyService.convertPurchaseNotify(notifies));
|
|
|
|
|
+ logger.log("上传送货提醒", notifies.size());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -57,7 +62,9 @@ public class PurchaseNotifyController {
|
|
|
@RequestMapping(value = "/accept", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/accept", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public List<AcceptNotify> getAcceptNotify() {
|
|
public List<AcceptNotify> getAcceptNotify() {
|
|
|
- return purchaseNotifyService.convertSaleSend(purchaseNoticeService.findNotUploadSend());
|
|
|
|
|
|
|
+ List<AcceptNotify> notifies = purchaseNotifyService.convertSaleSend(purchaseNoticeService.findNotUploadSend());
|
|
|
|
|
+ logger.log("下载来自供应商的发货单", notifies.size());
|
|
|
|
|
+ return notifies;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -85,6 +92,7 @@ public class PurchaseNotifyController {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
List<AcceptNotify> accepts = FlexJsonUtils.fromJsonArray(jsonStr, AcceptNotify.class);
|
|
List<AcceptNotify> accepts = FlexJsonUtils.fromJsonArray(jsonStr, AcceptNotify.class);
|
|
|
purchaseNoticeService.send(purchaseNotifyService.convertAcceptNotify(accepts));
|
|
purchaseNoticeService.send(purchaseNotifyService.convertAcceptNotify(accepts));
|
|
|
|
|
+ logger.log("上传主动收料通知单", accepts.size());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -99,6 +107,7 @@ public class PurchaseNotifyController {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
List<PurchaseNotify> ends = FlexJsonUtils.fromJsonArray(jsonStr, PurchaseNotify.class);
|
|
List<PurchaseNotify> ends = FlexJsonUtils.fromJsonArray(jsonStr, PurchaseNotify.class);
|
|
|
purchaseNoticeService.end(ends);
|
|
purchaseNoticeService.end(ends);
|
|
|
|
|
+ logger.log("上传结案送货提醒", ends.size());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|