作者 yangfu

fix: 查询修改

@@ -92,6 +92,7 @@ func (cmd *HistoryProductRecordQuery) Valid(validation *validation.Validation) { @@ -92,6 +92,7 @@ func (cmd *HistoryProductRecordQuery) Valid(validation *validation.Validation) {
92 cmd.ProductBeginTime = t 92 cmd.ProductBeginTime = t
93 cmd.ProductEndTime = t.AddDate(0, 0, 1) 93 cmd.ProductEndTime = t.AddDate(0, 0, 1)
94 } 94 }
  95 + if cmd.ProductRecordType == domain.RecordTypeReceiveMaterial && cmd.ProductRecordType == domain.RecordTypeReturnMaterial {
95 if cmd.Status == domain.ProductRecordNotApprove { 96 if cmd.Status == domain.ProductRecordNotApprove {
96 cmd.Status = domain.ProductRecordNotApprove 97 cmd.Status = domain.ProductRecordNotApprove
97 if xtime.IsZero(cmd.ProductBeginTime) || xtime.BeforeEqual(cmd.ProductBeginTime, xtime.BeginningOfDay()) { 98 if xtime.IsZero(cmd.ProductBeginTime) || xtime.BeforeEqual(cmd.ProductBeginTime, xtime.BeginningOfDay()) {
@@ -106,6 +107,7 @@ func (cmd *HistoryProductRecordQuery) Valid(validation *validation.Validation) { @@ -106,6 +107,7 @@ func (cmd *HistoryProductRecordQuery) Valid(validation *validation.Validation) {
106 cmd.Status = domain.ProductRecordLogged 107 cmd.Status = domain.ProductRecordLogged
107 } 108 }
108 } 109 }
  110 + }
109 } 111 }
110 112
111 func (cmd *HistoryProductRecordQuery) ValidateQuery() error { 113 func (cmd *HistoryProductRecordQuery) ValidateQuery() error {