Browse Source

Merge branch 'release-201807-hejq' of ssh://10.10.101.21/source/platform-b2b

hejq 7 years ago
parent
commit
5acbe3895c

+ 2 - 2
src/main/java/com/uas/platform/b2b/service/impl/PurchaseOrderChangeServiceImpl.java

@@ -306,8 +306,8 @@ public class PurchaseOrderChangeServiceImpl implements PurchaseOrderChangeServic
 		}
 		if (changItem.getNewDelivery().getTime() != orderItem.getDelivery().getTime()) {
             // 更新备料状态
-            jdbcTemplate.execute("update purc$notice,products set is_waiting = PURC_NOTICE_WAIT_TO_SEND(pn_delivery, coalesce(pr_ltinstock, 0))" +
-                    " where pr_id = pd_prid and pn_pdid = " + orderItem.getId());
+            jdbcTemplate.execute("update purc$notice,purc$orderitems set is_waiting = PURC_NOTICE_WAIT_TO_SEND(pn_delivery, coalesce(pr_ltinstock, 0)) " +
+					"where pn_pdid = pd_id and pn_pdid " + orderItem.getId());
             communalLogDao.save(new CommunalLog("更新发货提醒备料状态", "采购变更更新备料状态", "采购明细id: " + orderItem.getId(),
                     SystemSession.getUser().getEnterprise().getUu()));
 		}

+ 1 - 1
src/main/java/com/uas/platform/b2b/task/SendNoticeTask.java

@@ -53,7 +53,7 @@ public class SendNoticeTask {
     @Scheduled(cron = "0 0 6,12 * * ? ")
     public void updateWaitingStatus() {
         // 更新备料状态
-        String sql = "update purc$notice,products,purc$orderitems set is_waiting = PURC_NOTICE_WAIT_TO_SEND(pn_delivery, coalesce(pr_ltinstock, 0 )) " +
+        String sql = "update purc$notice,products,purc$orderitems set is_waiting = PURC_NOTICE_WAIT_TO_SEND(pn_delivery, coalesce(purc$orderitems.pr_ltinstock, 0 )) " +
                 "where pr_id = pd_prid and pn_pdid = pd_id and is_waiting = 1 and coalesce(pn_end, 0) <> 1 and pn_status = 200";
         jdbcTemplate.update(sql);
         communalLogDao.save(new CommunalLog("更新发货提醒备料状态", "定时任务自动更新备料数据", "时间: " + sdf.format(new Date()), DEFAULT_ENUU));