|
|
@@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -55,23 +54,12 @@ public class PurchaseNotifyController {
|
|
|
*/
|
|
|
@RequestMapping(method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public List<PurchaseNotify> saveNotifies(@RequestParam("data") String data) throws UnsupportedEncodingException {
|
|
|
- List<PurchaseNotify> modifiedNotifies = new ArrayList<PurchaseNotify>();
|
|
|
+ public void saveNotifies(@RequestParam("data") String data) throws UnsupportedEncodingException {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
List<PurchaseNotify> notifies = FlexJsonUtils.fromJsonArray(jsonStr, PurchaseNotify.class);
|
|
|
- List<List<PurchaseNotice>> lists = purchaseNotifyService.convertPurchaseNotify(notifies);
|
|
|
- purchaseNoticeService.save(lists.get(0));
|
|
|
- List<PurchaseNotice> oppNotices = lists.get(1);
|
|
|
- if (!CollectionUtils.isEmpty(oppNotices)) {
|
|
|
- for (PurchaseNotice notice : oppNotices) {
|
|
|
- PurchaseNotify notify = new PurchaseNotify();
|
|
|
- notify.setPn_id(notice.getSourceId());
|
|
|
- notify.setPn_qty(notice.getQty());
|
|
|
- modifiedNotifies.add(notify);
|
|
|
- }
|
|
|
- }
|
|
|
+ List<PurchaseNotice> lists = purchaseNotifyService.convertPurchaseNotify(notifies);
|
|
|
+ purchaseNoticeService.save(lists);
|
|
|
logger.log("送货提醒", "上传送货提醒", notifies.size());
|
|
|
- return modifiedNotifies;
|
|
|
}
|
|
|
|
|
|
/**
|