正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
@@ -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 { |
-
请 注册 或 登录 后发表评论