Карточка поручения: уведомление НРД GS036 «нет встречного поручения» (по референсу строки) — в статусе, в ответах НРД и в оповещении о просрочке
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
@@ -249,7 +249,7 @@ func scanForm16DraftsOpt(store *OutgoingStore, withResponses bool) []*OutgoingDe
|
||||
d.OrderXML = sub.OrderXML
|
||||
d.ContrDIDs = sub.ContrDIDs
|
||||
if withResponses {
|
||||
d.Responses, d.Done = outgoingResponses(sub.ContrDIDs)
|
||||
d.Responses, d.Done = outgoingResponses(sub.ContrDIDs, orderWatchRefs(d.GUID)...)
|
||||
_, d.Rejected, _ = orderRespVerdict(d.Responses)
|
||||
}
|
||||
}
|
||||
@@ -271,11 +271,12 @@ func scanForm16Deal(store *OutgoingStore, guid string) (*OutgoingDeal, bool) {
|
||||
|
||||
// outgoingResponses агрегирует ответы НРД (MS010/REORD/…) по всем поручениям сделки.
|
||||
// done=true, когда MS010 получен хотя бы по одному поручению.
|
||||
func outgoingResponses(contrDIDs []string) ([]orderResponse, bool) {
|
||||
func outgoingResponses(contrDIDs []string, refs ...string) ([]orderResponse, bool) {
|
||||
seen := map[string]bool{}
|
||||
var out []orderResponse
|
||||
var done bool
|
||||
for _, cd := range contrDIDs {
|
||||
keys := append(append([]string{}, contrDIDs...), refs...) // GS036 «нет встречного» — только по референсу
|
||||
for _, cd := range keys {
|
||||
for _, rp := range findOrderResponses(cd) {
|
||||
if seen[rp.Pkg] {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user