|
@@ -1,5 +1,6 @@
|
|
|
package com.uas.platform.b2b.erp.service.impl;
|
|
package com.uas.platform.b2b.erp.service.impl;
|
|
|
|
|
|
|
|
|
|
+import com.uas.platform.b2b.core.util.SqlDateFormdateUtils;
|
|
|
import com.uas.platform.b2b.dao.*;
|
|
import com.uas.platform.b2b.dao.*;
|
|
|
import com.uas.platform.b2b.erp.model.AcceptNotify;
|
|
import com.uas.platform.b2b.erp.model.AcceptNotify;
|
|
|
import com.uas.platform.b2b.erp.model.AcceptNotifyConfirm;
|
|
import com.uas.platform.b2b.erp.model.AcceptNotifyConfirm;
|
|
@@ -99,7 +100,7 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
|
|
|
}
|
|
}
|
|
|
if (!existDeliveryStr.equals(deliveryStr)) {
|
|
if (!existDeliveryStr.equals(deliveryStr)) {
|
|
|
existNotice.setRemark(remark + dateString + "修改交期," + existDeliveryStr + " -> " + deliveryStr);
|
|
existNotice.setRemark(remark + dateString + "修改交期," + existDeliveryStr + " -> " + deliveryStr);
|
|
|
- mergeWaitingStatus(existNotice.getId());
|
|
|
|
|
|
|
+ mergeWaitingStatus(existNotice.getId(), SqlDateFormdateUtils.DATE_FORMAT.format(notice.getDelivery()));
|
|
|
}
|
|
}
|
|
|
existNotice.setDelivery(notice.getDelivery());
|
|
existNotice.setDelivery(notice.getDelivery());
|
|
|
notices.add(existNotice);
|
|
notices.add(existNotice);
|
|
@@ -113,9 +114,10 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
|
|
|
* 更新发货提醒备料状态
|
|
* 更新发货提醒备料状态
|
|
|
*
|
|
*
|
|
|
* @param noticeId 发货单id
|
|
* @param noticeId 发货单id
|
|
|
|
|
+ * @param deliveryStr 新的交货周期
|
|
|
*/
|
|
*/
|
|
|
- private void mergeWaitingStatus(Long noticeId) {
|
|
|
|
|
- String sql = "update purc$notice,purc$orderitems set is_waiting = PURC_NOTICE_WAIT_TO_SEND(pn_delivery, coalesce(pr_ltinstock, 0)) " +
|
|
|
|
|
|
|
+ private void mergeWaitingStatus(Long noticeId, String deliveryStr) {
|
|
|
|
|
+ String sql = "update purc$notice,purc$orderitems set is_waiting = PURC_NOTICE_WAIT_TO_SEND(" + deliveryStr + ", coalesce(pr_ltinstock, 0)) " +
|
|
|
"where pn_pdid = pd_id and pn_id = " + noticeId;
|
|
"where pn_pdid = pd_id and pn_id = " + noticeId;
|
|
|
jdbcTemplate.execute(sql);
|
|
jdbcTemplate.execute(sql);
|
|
|
communalLogDao.save(new CommunalLog("更新发货提醒备料状态", "通过发货提醒更新备料状态", "发货单id: " + noticeId,
|
|
communalLogDao.save(new CommunalLog("更新发货提醒备料状态", "通过发货提醒更新备料状态", "发货单id: " + noticeId,
|