Browse Source

ERP上传时增加物料保存信息,做冗余字段保存

hejq 7 years ago
parent
commit
8a4a46c590

+ 4 - 4
src/main/java/com/uas/ps/inquiry/service/impl/PublicInquiryServiceImpl.java

@@ -253,6 +253,10 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
                                 throw new NotFoundException("编号为[" + batch.getBip_prodcode() + "]的物料未找到");
                             }
                             item.setProductId(products.get(0).getId());
+                            item.setCmpCode(products.get(0).getCmpCode());
+                            item.setInbrand(products.get(0).getBrand());
+                            item.setProdTitle(products.get(0).getTitle());
+                            item.setSpec(products.get(0).getSpec());
                             item.setRemark(batch.getBip_remark());
                             item.setProdCode(products.get(0).getCode());
                             item.setProdTitle(products.get(0).getTitle());
@@ -671,10 +675,6 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
                     if (filter.getEndDate() != null) {
                         info.expression(PredicateUtils.lte("date", new Date(filter.getEndDate()), false));
                     }
-                    if (filter.getEnUU() != null) {
-                        Predicate p = builder.notEqual(root.get("inquiry").get("enUU"), filter.getEnUU());
-                        builder.and(p);
-                    }
                     if (!StringUtils.isEmpty(filter.getKeyword())) {
                         SimpleExpression code = new SimpleExpression("cmpCode", filter.getKeyword(), CriterionExpression.Operator.LIKE);
                         SimpleExpression brand = new SimpleExpression("inbrand", filter.getKeyword(), CriterionExpression.Operator.LIKE);