|
@@ -24,6 +24,9 @@ import java.util.List;
|
|
|
|
|
|
import static org.dromara.commodityManagement.emum.ItemType.DAHUO_TYPE;
|
|
|
|
|
|
+/**
|
|
|
+ * 大货编号业务实现
|
|
|
+ */
|
|
|
@Service
|
|
|
@RequiredArgsConstructor
|
|
|
public class DaHuoNumberImpl implements DaHuoNumberService {
|
|
@@ -31,6 +34,12 @@ public class DaHuoNumberImpl implements DaHuoNumberService {
|
|
|
private final DaHuoNumberMapper daHuoNumberMapper;
|
|
|
private final TemplateMapper templateMapper;
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询大货编号列表
|
|
|
+ * @param daHuoNumberBo 大货编号BO对象
|
|
|
+ * @param pageQuery 分页参数
|
|
|
+ * @return 分页结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public TableDataInfo<DaHuoNumberVo> selectPageDaHuoNumberList(DaHuoNumberBo daHuoNumberBo, PageQuery pageQuery) {
|
|
|
QueryWrapper<DaHuoNumber> qw = new QueryWrapper<>();
|
|
@@ -44,6 +53,11 @@ public class DaHuoNumberImpl implements DaHuoNumberService {
|
|
|
return TableDataInfo.build(page);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新增大货编号
|
|
|
+ * @param daHuoNumberBo 大货编号BO对象
|
|
|
+ * @return 插入数量
|
|
|
+ */
|
|
|
@Override
|
|
|
public int insertDaHuoNumber(DaHuoNumberBo daHuoNumberBo) {
|
|
|
DaHuoNumber daHuoNumber = MapstructUtils.convert(daHuoNumberBo, DaHuoNumber.class);
|
|
@@ -59,6 +73,11 @@ public class DaHuoNumberImpl implements DaHuoNumberService {
|
|
|
return allRow;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改大货编号
|
|
|
+ * @param daHuoNumberBo 大货编号BO对象
|
|
|
+ * @return 更新数量
|
|
|
+ */
|
|
|
@Override
|
|
|
public int updateDaHuoNumber(DaHuoNumberBo daHuoNumberBo) {
|
|
|
DaHuoNumber daHuoNumber = MapstructUtils.convert(daHuoNumberBo, DaHuoNumber.class);
|
|
@@ -77,6 +96,11 @@ public class DaHuoNumberImpl implements DaHuoNumberService {
|
|
|
return daHuoNumberMapper.updateById(daHuoNumber);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除大货编号
|
|
|
+ * @param daHuoNumberIds 大货编号ID
|
|
|
+ * @return 删除数量
|
|
|
+ */
|
|
|
@Override
|
|
|
public int deleteDaHuoNumberByIds(Long[] daHuoNumberIds) {
|
|
|
for (Long daHuoNumberId : daHuoNumberIds) {
|
|
@@ -85,18 +109,31 @@ public class DaHuoNumberImpl implements DaHuoNumberService {
|
|
|
return daHuoNumberMapper.deleteByIds(Arrays.asList(daHuoNumberIds));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据ID查询大货编号
|
|
|
+ * @param daHuoNumberIds 大货编号ID
|
|
|
+ * @return 大货编号基类
|
|
|
+ */
|
|
|
@Override
|
|
|
public List<DaHuoNumber> selectDaHuoNumberListByIds(Long[] daHuoNumberIds) {
|
|
|
return MapstructUtils.convert(daHuoNumberMapper.selectVoByIds(Arrays.asList(daHuoNumberIds)), DaHuoNumber.class);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询大货编号列表
|
|
|
+ * @return 大货编号列表
|
|
|
+ */
|
|
|
@Override
|
|
|
public List<DaHuoNumber> selectDaHuoNumberList() {
|
|
|
return daHuoNumberMapper.selectList();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 处理导入的Excel数据
|
|
|
+ * @param result Excel数据
|
|
|
+ */
|
|
|
@Override
|
|
|
- public int insertImportExcel(ExcelResult<DaHuoNumberImportVo> result){
|
|
|
+ public void insertImportExcel(ExcelResult<DaHuoNumberImportVo> result){
|
|
|
for (DaHuoNumberImportVo importVo : result.getList()){
|
|
|
String[] templateNames = importVo.getTemplate().split(",");
|
|
|
List<Template> templates = new ArrayList<>();
|
|
@@ -109,6 +146,5 @@ public class DaHuoNumberImpl implements DaHuoNumberService {
|
|
|
}
|
|
|
insertDaHuoNumber(daHuoNumber);
|
|
|
}
|
|
|
- return 1;
|
|
|
}
|
|
|
}
|