|
@@ -19,10 +19,20 @@ import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+/**
|
|
|
+ * 入库类型业务实现
|
|
|
+ */
|
|
|
@Service
|
|
|
@RequiredArgsConstructor
|
|
|
public class PutInStorageTypeServiceImpl implements PutInStorageTypeService {
|
|
|
private final PutInStorageTypeMapper putInStorageTypeMapper;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询入库类型管理列表
|
|
|
+ * @param putInStorageTypeBo 入库类型Bo对象
|
|
|
+ * @param pageQuery 分页信息
|
|
|
+ * @return 查询结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public TableDataInfo <PutInStorageTypeVo> selectPutInStorageTypePageList(PutInStorageTypeBo putInStorageTypeBo, PageQuery pageQuery) {
|
|
|
QueryWrapper<PutInStorageType> qw = new QueryWrapper<>();
|
|
@@ -31,16 +41,34 @@ public class PutInStorageTypeServiceImpl implements PutInStorageTypeService {
|
|
|
Page<PutInStorageTypeVo>page= putInStorageTypeMapper.selectVoPage(pageQuery.build(),qw);
|
|
|
return TableDataInfo.build(page);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增入库类型
|
|
|
+ * @param putInStorageTypeBo 入库类型Bo对象
|
|
|
+ * @return 新增结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public int insertPutInStorageType(PutInStorageTypeBo putInStorageTypeBo) {
|
|
|
PutInStorageType putInStorageType = MapstructUtils.convert(putInStorageTypeBo, PutInStorageType.class);
|
|
|
return putInStorageTypeMapper.insert(putInStorageType);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改入库类型
|
|
|
+ * @param putInStorageTypeBo 入库类型Bo对象
|
|
|
+ * @return 修改结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public int updatePutInStorageType(PutInStorageTypeBo putInStorageTypeBo) {
|
|
|
PutInStorageType putInStorageType = MapstructUtils.convert(putInStorageTypeBo, PutInStorageType.class);
|
|
|
return putInStorageTypeMapper.updateById(putInStorageType);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 将指定id的入库类型移入回收站
|
|
|
+ * @param putInStorageTypeIds 入库类型ids
|
|
|
+ * @return 回收结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public int deletePutInStorageTypeByIds(List<Integer> putInStorageTypeIds){
|
|
|
UpdateWrapper<PutInStorageType> updateWrapper=new UpdateWrapper<>();
|
|
@@ -48,6 +76,13 @@ public class PutInStorageTypeServiceImpl implements PutInStorageTypeService {
|
|
|
updateWrapper.set("deletetime",new Date());
|
|
|
return putInStorageTypeMapper.update(updateWrapper);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询回收站中的入库类型列表
|
|
|
+ * @param putInStorageTypeBo 入库类型Bo对象
|
|
|
+ * @param pageQuery 分页信息
|
|
|
+ * @return 查询结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public TableDataInfo <PutInStorageTypeVo> selectRecyclePutInStorageTypeList(PutInStorageTypeBo putInStorageTypeBo, PageQuery pageQuery) {
|
|
|
QueryWrapper<PutInStorageType> qw = new QueryWrapper<>();
|
|
@@ -60,6 +95,12 @@ public class PutInStorageTypeServiceImpl implements PutInStorageTypeService {
|
|
|
Page<PutInStorageTypeVo> page = putInStorageTypeMapper.selectVoPage(pageQuery.build(), qw);
|
|
|
return TableDataInfo.build(page);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 还原回收站中指定id的入库类型
|
|
|
+ * @param putInStorageTypeIds 入库类型ids
|
|
|
+ * @return 还原结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public int backPutInStorageTypeByIds(List<Integer> putInStorageTypeIds) {
|
|
|
UpdateWrapper<PutInStorageType> updateWrapper=new UpdateWrapper<>();
|
|
@@ -67,12 +108,23 @@ public class PutInStorageTypeServiceImpl implements PutInStorageTypeService {
|
|
|
updateWrapper.set("deletetime",null);
|
|
|
return putInStorageTypeMapper.update(updateWrapper);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 还原回收站中所有入库类型
|
|
|
+ * @return 还原结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public int backPutInStorageTypeAll() {
|
|
|
UpdateWrapper<PutInStorageType> updateWrapper=new UpdateWrapper<>();
|
|
|
updateWrapper.set("deletetime",null);
|
|
|
return putInStorageTypeMapper.update(updateWrapper);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 销毁回收站中指定id的入库类型
|
|
|
+ * @param putInStorageTypeIds 入库类型ids
|
|
|
+ * @return 销毁结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public int deleteRecyclePutInStorageTypeByIds(List<Integer> putInStorageTypeIds) {
|
|
|
QueryWrapper<PutInStorageType> qw=new QueryWrapper<>();
|
|
@@ -80,6 +132,11 @@ public class PutInStorageTypeServiceImpl implements PutInStorageTypeService {
|
|
|
qw.isNotNull("deletetime");
|
|
|
return putInStorageTypeMapper.delete(qw);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 销毁回收站中所有的入库类型
|
|
|
+ * @return 销毁结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public int deleteRecyclePutInStorageTypeAll() {
|
|
|
QueryWrapper<PutInStorageType> qw=new QueryWrapper<>();
|