Przeglądaj źródła

个人产品库导入数据默认开启采购

dongbw 8 lat temu
rodzic
commit
af6d9adfc8

+ 11 - 11
src/main/java/com/uas/platform/b2b/service/impl/ProductUsersServiceImpl.java

@@ -174,18 +174,18 @@ public class ProductUsersServiceImpl implements ProductUsersService {
         int rowNum = sheet.getLastRowNum();
         Row headerRow = sheet.getRow(0);
         int total = 0;
-        short isSale = Constant.NO;
+        short isSale = Constant.YES;
         short isPurchase = Constant.NO;
-        List<Role> roles = roleService.findByEnUUAndUserUU(enUU, userUU);
-        if(!CollectionUtils.isEmpty(roles)) {
-            for(Role role : roles) {
-                if(role.getDesc().equals("业务员") || role.getDesc().equals("销售经理")) {
-                    isSale = Constant.YES;
-                } else if(role.getDesc().equals("采购员")) {
-                    isPurchase = Constant.YES;
-                }
-            }
-        }
+//        List<Role> roles = roleService.findByEnUUAndUserUU(enUU, userUU);
+//        if(!CollectionUtils.isEmpty(roles)) {
+//            for(Role role : roles) {
+//                if(role.getDesc().equals("业务员") || role.getDesc().equals("销售经理")) {
+//                    isSale = Constant.YES;
+//                } else if(role.getDesc().equals("采购员")) {
+//                    isPurchase = Constant.YES;
+//                }
+//            }
+//        }
         String importId = StringUtil.getRandomNumber(8);
         if (headerRow != null) {
             for (int r = 3; r <= rowNum; r++) {