更新代码
This commit is contained in:
parent
a6789cb3b1
commit
158254b880
@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 采购单领料单(DlRepairSo)表控制层
|
||||
*
|
||||
@ -29,15 +31,34 @@ public class DlRepairSoController {
|
||||
|
||||
/**
|
||||
* 采购单/领料单 新增
|
||||
*
|
||||
* @param repairSoRespVO 采购单对象
|
||||
* @author 小李
|
||||
* @date 10:49 2024/9/14
|
||||
* @param repairSoRespVO 采购单对象
|
||||
**/
|
||||
**/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "采购单/领料单新增")
|
||||
public CommonResult<?> createRepairSo(@RequestBody DlRepairSoRespVO repairSoRespVO) {
|
||||
dlRepairSoService.createRepairSo(repairSoRespVO);
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 采购单/领料单新增分页
|
||||
*
|
||||
* @param repairSoReqVO 查询对象
|
||||
* @param pageNo 页码
|
||||
* @param pageSize 条数
|
||||
* @author 小李
|
||||
* @date 18:14 2024/9/14
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "采购单/领料单新增分页")
|
||||
public CommonResult<?> getRepairSoPage(DlRepairSoReqVO repairSoReqVO,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<DlRepairSo> page = new Page<>(pageNo, pageSize);
|
||||
return success(dlRepairSoService.getRepairSoPage(repairSoReqVO, page));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
package cn.iocoder.yudao.module.stockOperate.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.stockOperate.entity.DlRepairSo;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoReqVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 针对表【dl_repair_so(采购单领料单)】的数据库操作Mapper
|
||||
@ -12,6 +16,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface DlRepairSoMapper extends BaseMapper<DlRepairSo> {
|
||||
|
||||
IPage<DlRepairSo> getRepairSoPage(@Param("map") DlRepairSoReqVO repairSoReqVO, Page<DlRepairSo> page);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
package cn.iocoder.yudao.module.stockOperate.service;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.stockOperate.entity.DlRepairSo;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoReqVO;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoRespVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
@ -18,4 +22,13 @@ public interface DlRepairSoService extends IService<DlRepairSo> {
|
||||
* @param repairSoRespVO 采购单对象
|
||||
**/
|
||||
void createRepairSo(DlRepairSoRespVO repairSoRespVO);
|
||||
|
||||
/**
|
||||
* 采购单/领料单新增分页
|
||||
*
|
||||
* @param repairSoReqVO 查询对象
|
||||
* @author 小李
|
||||
* @date 18:14 2024/9/14
|
||||
**/
|
||||
IPage<DlRepairSo> getRepairSoPage(DlRepairSoReqVO repairSoReqVO, Page<DlRepairSo> page);
|
||||
}
|
||||
|
@ -7,8 +7,11 @@ import cn.iocoder.yudao.module.stockOperate.entity.DlRepairSoi;
|
||||
import cn.iocoder.yudao.module.stockOperate.mapper.DlRepairSoMapper;
|
||||
import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoService;
|
||||
import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoiService;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoReqVO;
|
||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoRespVO;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -50,6 +53,18 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
repairSoRespVO.getGoodsList().forEach(item -> item.setSoId(repairSoRespVO.getId()));
|
||||
repairSoiService.saveBatch(repairSoRespVO.getGoodsList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 采购单/领料单新增分页
|
||||
*
|
||||
* @param repairSoReqVO 查询对象
|
||||
* @author 小李
|
||||
* @date 18:14 2024/9/14
|
||||
**/
|
||||
@Override
|
||||
public IPage<DlRepairSo> getRepairSoPage(DlRepairSoReqVO repairSoReqVO, Page<DlRepairSo> page){
|
||||
return baseMapper.getRepairSoPage(repairSoReqVO, page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,4 +43,9 @@
|
||||
from dl_repair_so so
|
||||
where so.deleted = '0'
|
||||
</sql>
|
||||
|
||||
<select id="getRepairSoPage" resultMap="BaseResultMap">
|
||||
<include refid="Base_SQL"/>
|
||||
and so_type = #{map.soType}
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user