暂提
This commit is contained in:
parent
33c7513050
commit
b66eed3a37
@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|||||||
import cn.iocoder.yudao.module.stockOperate.entity.DlRepairSoi;
|
import cn.iocoder.yudao.module.stockOperate.entity.DlRepairSoi;
|
||||||
import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoiService;
|
import cn.iocoder.yudao.module.stockOperate.service.DlRepairSoiService;
|
||||||
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoiReqVO;
|
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoiReqVO;
|
||||||
|
import cn.iocoder.yudao.module.stockOperate.vo.DlRepairSoiRespVO;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -88,5 +89,23 @@ public class DlRepairSoiController{
|
|||||||
public CommonResult<?> getMapBySoIdAndQuery(@RequestParam("id") String id, @RequestParam("query") String query) {
|
public CommonResult<?> getMapBySoIdAndQuery(@RequestParam("id") String id, @RequestParam("query") String query) {
|
||||||
return success(dlRepairSoiService.getMapBySoIdAndQuery(id, query));
|
return success(dlRepairSoiService.getMapBySoIdAndQuery(id, query));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据供应商查询该供应商采购过的配件
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:49 2024/11/28
|
||||||
|
* @param reqVO 查询对象
|
||||||
|
* @param pageNo 页码
|
||||||
|
* @param pageSize 条数
|
||||||
|
**/
|
||||||
|
@GetMapping("/getSoBySupplier")
|
||||||
|
@Operation(summary = "根据供应商查询该供应商采购过的配件 分页")
|
||||||
|
public CommonResult<?> getSoBySupplier(DlRepairSoiReqVO reqVO,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1")Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize){
|
||||||
|
Page<DlRepairSoiRespVO> page = new Page<>(pageNo, pageSize);
|
||||||
|
return success(dlRepairSoiService.getSoBySupplier(reqVO, page));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,15 @@ public interface DlRepairSoiMapper extends BaseMapper<DlRepairSoi> {
|
|||||||
* @param id id
|
* @param id id
|
||||||
**/
|
**/
|
||||||
List<DlRepairSoiRespVO> getMapBySoIdAndQuery(@Param("id") String id, @Param("query") String query);
|
List<DlRepairSoiRespVO> getMapBySoIdAndQuery(@Param("id") String id, @Param("query") String query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据供应商查询该供应商采购过的配件
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:49 2024/11/28
|
||||||
|
* @param reqVO 查询对象
|
||||||
|
**/
|
||||||
|
IPage<DlRepairSoi> getSoBySupplier(@Param("map") DlRepairSoiReqVO reqVO, Page<DlRepairSoiRespVO> page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,4 +64,13 @@ public interface DlRepairSoiService extends IService<DlRepairSoi> {
|
|||||||
* @param id id
|
* @param id id
|
||||||
**/
|
**/
|
||||||
Map<String, List<DlRepairSoiRespVO>> getMapBySoIdAndQuery(String id, String query);
|
Map<String, List<DlRepairSoiRespVO>> getMapBySoIdAndQuery(String id, String query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据供应商查询该供应商采购过的配件
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:49 2024/11/28
|
||||||
|
* @param reqVO 查询对象
|
||||||
|
**/
|
||||||
|
IPage<DlRepairSoiRespVO> getSoBySupplier(DlRepairSoiReqVO reqVO, Page<DlRepairSoiRespVO> page);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.sun.xml.bind.v2.TODO;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -166,6 +167,20 @@ public class DlRepairSoiServiceImpl extends ServiceImpl<DlRepairSoiMapper, DlRep
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据供应商查询该供应商采购过的配件
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:49 2024/11/28
|
||||||
|
* @param reqVO 查询对象
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public IPage<DlRepairSoiRespVO> getSoBySupplier(DlRepairSoiReqVO reqVO, Page<DlRepairSoiRespVO> page){
|
||||||
|
IPage<DlRepairSoi> repairSoiIPage = baseMapper.getSoBySupplier(reqVO, page);
|
||||||
|
// TODO
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,4 +29,7 @@ public class DlRepairSoiReqVO extends DlRepairSoi {
|
|||||||
|
|
||||||
@Schema(pattern = "查询关键字")
|
@Schema(pattern = "查询关键字")
|
||||||
private String query;
|
private String query;
|
||||||
|
|
||||||
|
/** 供应商ID */
|
||||||
|
private String supplierId;
|
||||||
}
|
}
|
||||||
|
@ -148,4 +148,25 @@
|
|||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getSoBySupplier" resultMap="BaseResultMap">
|
||||||
|
select drsi.*
|
||||||
|
from dl_repair_soi drsi
|
||||||
|
join dl_repair_so drs on drsi.so_id = drs.id
|
||||||
|
join dl_repair_wares drw on drsi.goods_id = drw.id
|
||||||
|
<where>
|
||||||
|
<if test="map.supplierId != null and map.supplierId != ''">
|
||||||
|
and drs.supplier_id = #{map.supplierId}
|
||||||
|
</if>
|
||||||
|
<if test="map.query != null and map.query != ''">
|
||||||
|
and (
|
||||||
|
drw.name like concat('%', #{map.query}, '%')
|
||||||
|
or
|
||||||
|
drw.code like concat('%', #{map.query}, '%')
|
||||||
|
or
|
||||||
|
drw.model like concat('%', #{map.query}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user