diff --git a/skyeye-erp/erp-pro/src/main/java/com/skyeye/material/service/impl/MaterialNormsCodeServiceImpl.java b/skyeye-erp/erp-pro/src/main/java/com/skyeye/material/service/impl/MaterialNormsCodeServiceImpl.java index 790a9aff..14a6d7ef 100644 --- a/skyeye-erp/erp-pro/src/main/java/com/skyeye/material/service/impl/MaterialNormsCodeServiceImpl.java +++ b/skyeye-erp/erp-pro/src/main/java/com/skyeye/material/service/impl/MaterialNormsCodeServiceImpl.java @@ -14,6 +14,7 @@ import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.skyeye.annotation.service.SkyeyeService; import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl; +import com.skyeye.common.constans.CommonCharConstants; import com.skyeye.common.constans.CommonConstants; import com.skyeye.common.object.InputObject; import com.skyeye.common.object.OutputObject; @@ -310,7 +311,12 @@ public class MaterialNormsCodeServiceImpl extends SkyeyeBusinessServiceImpl params = inputObject.getParams(); String storeId = params.get("storeId").toString(); - List normsCodeList = JSONUtil.toList(params.get("normsCodeList").toString(), null); + List normsCodeList = Arrays.asList(params.get("normsCodeList").toString() + .split(CommonCharConstants.COMMA_MARK)) + .stream().filter(StrUtil::isNotEmpty).distinct().collect(Collectors.toList()); + if (CollectionUtil.isEmpty(normsCodeList)) { + return; + } String storeUseState = params.get("storeUseState").toString(); QueryWrapper queryWrapper = new QueryWrapper<>(); @@ -327,7 +333,9 @@ public class MaterialNormsCodeServiceImpl extends SkyeyeBusinessServiceImpl params = inputObject.getParams(); - List ids = JSONUtil.toList(params.get("ids").toString(), null); + List ids = Arrays.asList(params.get("ids").toString() + .split(CommonCharConstants.COMMA_MARK)) + .stream().filter(StrUtil::isNotEmpty).distinct().collect(Collectors.toList()); String storeUseState = params.get("storeUseState").toString(); UpdateWrapper updateWrapper = new UpdateWrapper<>(); updateWrapper.in(CommonConstants.ID, ids);