| | |
| | | package com.consum.base.config; |
| | | |
| | | import cn.afterturn.easypoi.excel.entity.result.ExcelVerifyHandlerResult; |
| | | import cn.afterturn.easypoi.handler.inter.IExcelVerifyHandler; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.StringJoiner; |
| | | |
| | | import com.consum.base.core.type.StatesType; |
| | | import com.consum.base.pojo.WarnConfImEntity; |
| | | import com.consum.base.service.BaseGoodsModelsService; |
| | | import com.consum.base.service.BaseGoodsTemplateService; |
| | |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.iplatform.core.BeanContextAware; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.StringJoiner; |
| | | |
| | | import cn.afterturn.easypoi.excel.entity.result.ExcelVerifyHandlerResult; |
| | | import cn.afterturn.easypoi.handler.inter.IExcelVerifyHandler; |
| | | |
| | | /** |
| | | * @ClassName WhWarningImportVerifyHandler |
| | |
| | | **/ |
| | | |
| | | public class WhWarningImportVerifyHandler implements IExcelVerifyHandler<WarnConfImEntity> { |
| | | //保存所有数据 |
| | | // 保存所有数据 |
| | | private HashMap<String, Integer> containMap; |
| | | // 当前人机构 |
| | | private Long agencyId; |
| | |
| | | this.baseGoodsModelsService = BeanContextAware.getBeanByType(BaseGoodsModelsService.class); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ExcelVerifyHandlerResult verifyHandler(WarnConfImEntity param) { |
| | |
| | | param.setBaseWarehouseId(warehouse.getId()); |
| | | } |
| | | |
| | | List<BaseGoodsTemplate> baseGoodsTemplates = baseGoodsTemplateService.queryGoodsTemplateByCategoryId(agencyId, null, (short) 1, goodsTemplateName); |
| | | List<BaseGoodsTemplate> baseGoodsTemplates = baseGoodsTemplateService.queryGoodsTemplateByCategoryId(agencyId, |
| | | null, StatesType.NORMAL.getValue(), goodsTemplateName); |
| | | if (CollectionUtils.isEmpty(baseGoodsTemplates)) { |
| | | joiner.add("物品名称有误"); |
| | | String errMsg = joiner.toString(); |