فهرست منبع

处理编辑物料的bug

yujia 7 سال پیش
والد
کامیت
1125e654c1

+ 2 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/CommodityInOutboundServiceImpl.java

@@ -30,6 +30,7 @@ import com.uas.platform.core.util.serializer.FlexJsonUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Sort;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -247,6 +248,7 @@ public class CommodityInOutboundServiceImpl implements CommodityInOutboundServic
         final PageInfo info = new PageInfo(params);
         Long enuu = SystemSession.getUser().getEnterprise().getUu();
         info.filter("enuu", enuu);
+        info.sorting("createTime", Sort.Direction.DESC);
         if (fromDate != null) {
             info.expression(PredicateUtils.gte("createTime", new Date(fromDate), false));
         }

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -1763,7 +1763,7 @@ public class ProductServiceImpl implements ProductService {
                 } else {
                     persistProduct.setSpec((String) specResultMap.getData());
                 }
-                if (productPrivate.getStandard() == IntegerConstant.NO_SHORT) {
+                if (productPrivate.getStandard() == IntegerConstant.NO_SHORT || StringUtils.isEmpty(productPrivate.getCmpUuId())) {
                     Component component = findBybrNameAndcmpCode(productPrivate.getPbranden(), productPrivate.getPcmpcode());
                     if (component != null) {
                         //更新物料信息