正在显示
2 个修改的文件
包含
13 行增加
和
4 行删除
@@ -34,7 +34,7 @@ func (dao *WorkshopProductRecordDao) WorkshopProductRecord(companyId, orgId int, | @@ -34,7 +34,7 @@ func (dao *WorkshopProductRecordDao) WorkshopProductRecord(companyId, orgId int, | ||
34 | query.Where("org_id = ?", orgId) | 34 | query.Where("org_id = ?", orgId) |
35 | query.Where("work_station ->>'workStationId' = ?", workStationId) | 35 | query.Where("work_station ->>'workStationId' = ?", workStationId) |
36 | query.Where("product_date = ?", productTime.Local().Format("2006-01-02")) | 36 | query.Where("product_date = ?", productTime.Local().Format("2006-01-02")) |
37 | - //query.Where("product_record_info ->>'productPlanId' = '?'", planId) | 37 | + query.Where("product_record_info ->>'productPlanId' = '?'", planId) |
38 | if err := query.First(); err != nil { | 38 | if err := query.First(); err != nil { |
39 | if err.Error() == "pg: no rows in result set" { | 39 | if err.Error() == "pg: no rows in result set" { |
40 | return nil, domain.ErrorNotFound | 40 | return nil, domain.ErrorNotFound |
@@ -132,12 +132,21 @@ func (ptr *PGProductRecordService) SubmitProductRecord(productRecordType int, qu | @@ -132,12 +132,21 @@ func (ptr *PGProductRecordService) SubmitProductRecord(productRecordType int, qu | ||
132 | } | 132 | } |
133 | 133 | ||
134 | // 发送Job | 134 | // 发送Job |
135 | - if (productRecordType == domain.RecordTypeReceiveMaterial || productRecordType == domain.RecordTypeReturnMaterial) && workstation.SectionName == ProductSection4 { | 135 | + if productRecordType == domain.RecordTypeReceiveMaterial || productRecordType == domain.RecordTypeReturnMaterial { |
136 | // 发送Job | 136 | // 发送Job |
137 | - if err = SendProductRecordStaticsJob(record); err != nil { | ||
138 | - return nil, err | 137 | + if workstation.SectionName == ProductSection4 { |
138 | + if err = SendProductRecordStaticsJob(record); err != nil { | ||
139 | + return nil, err | ||
140 | + } | ||
139 | } | 141 | } |
140 | } | 142 | } |
143 | + // 二级品需要审核后才能统计 | ||
144 | + //else { | ||
145 | + // // 发送Job | ||
146 | + // if err = SendProductRecordStaticsJob(record); err != nil { | ||
147 | + // return nil, err | ||
148 | + // } | ||
149 | + //} | ||
141 | return nil, nil | 150 | return nil, nil |
142 | } | 151 | } |
143 | 152 |
-
请 注册 或 登录 后发表评论