Browse Source

更新发货提醒结案状态保存方法

hejq 7 years ago
parent
commit
edfb762d45

+ 0 - 2
src/main/java/com/uas/platform/b2b/erp/controller/PurchaseNotifyController.java

@@ -79,7 +79,6 @@ public class PurchaseNotifyController {
 			map.put("message", "未传入参数!");
 			return map;
 		}
-//		List<PurchaseNotify> modifiedNotifies = new ArrayList<PurchaseNotify>();
 		String jsonStr = URLDecoder.decode(data, "UTF-8");
 		JSONObject jsonObject = JSON.parseObject(jsonStr);
 		if (StringUtils.isEmpty(jsonObject.getString("enUU")) || StringUtils.isEmpty(jsonObject.getString("PurchaseNotify"))) {
@@ -98,7 +97,6 @@ public class PurchaseNotifyController {
 				PurchaseNotify notify = new PurchaseNotify();
 				notify.setPn_id(notice.getSourceId());
 				notify.setPn_qty(notice.getQty());
-//				modifiedNotifies.add(notify);
 			}
 		}
 		logger.log("送货提醒", "上传送货提醒", notifies.size());

+ 4 - 4
src/main/java/com/uas/platform/b2b/service/impl/PurchaseNoticeServiceImpl.java

@@ -341,10 +341,10 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
 	@Override
 	public void onEndDownSuccess(String[] idArray) {
 		for (String id : idArray) {
-			PurchaseNotice notice = purchaseNoticeDao.findOne(Long.parseLong(id));
-			if (notice != null) {
-				notice.setEndStatus((short) Status.DOWNLOADED.value());
-				purchaseNoticeDao.save(notice);
+			PurchaseNoticeEnd noticeEnd = noticeEndDao.findOne(Long.parseLong(id));
+			if (noticeEnd != null) {
+                noticeEnd.setEndStatus((short) Status.DOWNLOADED.value());
+                noticeEndDao.save(noticeEnd);
 			}
 		}
 	}