11.22所提PC新功能暂不可用
This commit is contained in:
parent
fd93a730be
commit
0797e13704
@ -91,7 +91,7 @@ public class DlRepairSoiController{
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据供应商查询该供应商采购过的配件
|
||||
* 根据供应商查询该供应商采购过的配件 分页
|
||||
*
|
||||
* @author 小李
|
||||
* @date 11:49 2024/11/28
|
||||
|
@ -44,7 +44,7 @@ public interface DlRepairSoiMapper extends BaseMapper<DlRepairSoi> {
|
||||
* @date 11:49 2024/11/28
|
||||
* @param reqVO 查询对象
|
||||
**/
|
||||
IPage<DlRepairSoi> getSoBySupplier(@Param("map") DlRepairSoiReqVO reqVO, Page<DlRepairSoiRespVO> page);
|
||||
IPage<DlRepairSoiRespVO> getSoBySupplier(@Param("map") DlRepairSoiReqVO reqVO, Page<DlRepairSoiRespVO> page);
|
||||
}
|
||||
|
||||
|
||||
|
@ -121,14 +121,6 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
@Override
|
||||
public void createRepairSo(DlRepairSoRespVO repairSoRespVO) {
|
||||
repairSoRespVO.setSoTime(new Date());
|
||||
// 加个判断,可能出现没有设置价格的情况----需求说了非必填,注掉
|
||||
// if (repairSoRespVO.getGoodsList() != null){
|
||||
// repairSoRespVO.getGoodsList().forEach(item -> {
|
||||
// if (item.getGoodsPrice() == null){
|
||||
// throw exception0(500, "有配件未设置进价");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//保存供应商
|
||||
if (StringUtils.isEmpty(repairSoRespVO.getSupplierId())) {
|
||||
//采购单中录入供应商或无供应商情况
|
||||
@ -164,7 +156,6 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
}
|
||||
repairSoRespVO.getGoodsList().forEach(item -> {
|
||||
item.setSoId(repairSoRespVO.getId());
|
||||
// item.setSoiType(repairSoRespVO.getSoType());
|
||||
});
|
||||
repairSoiService.saveBatch(repairSoRespVO.getGoodsList());
|
||||
|
||||
@ -172,30 +163,6 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
// 前端选择了配件生成采购单的时候,可能会改配件的一些信息,但不知道会改什么,直接拿到全部,重新更新
|
||||
List<RepairWares> waresList = repairSoRespVO.getWaresList();
|
||||
waresService.updateBatchById(waresList);
|
||||
|
||||
// 操作配件库存表---应该是弃用了
|
||||
// 获取所有需要操作的数据----生成采购单的时候,不直接操作库存,放到下面的inWares方法去操作
|
||||
// if (repairSoRespVO.getSoType() != null && !repairSoRespVO.getSoType().equals("01")){
|
||||
// List<DlRepairSoi> goodsList = repairSoRespVO.getGoodsList();
|
||||
// List<String> ids = goodsList.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList());
|
||||
// List<RepairWares> repairWares = waresService.listByIds(ids);
|
||||
// // 更新库存和进价
|
||||
// List<RepairWares> newWares = repairWares.stream().map(item -> {
|
||||
// // 取数据
|
||||
// DlRepairSoi repairSoi = goodsList.stream().filter(i -> i.getGoodsId().equals(item.getId())).collect(Collectors.toList()).get(0);
|
||||
// // 设置新值
|
||||
// // 如果是采购入库,数量+,如果是领料出库,数量-
|
||||
// // 01, 03 是采购 02 是领料
|
||||
// BigDecimal count = new BigDecimal(repairSoi.getGoodsCount());
|
||||
// RepairWares wares = new RepairWares();
|
||||
// wares.setId(item.getId());
|
||||
// wares.setStock("02".equals(repairSoRespVO.getSoType()) ? item.getStock().subtract(count) : item.getStock().add(count));
|
||||
// // 更新进价
|
||||
// wares.setPurPrice(repairSoi.getGoodsPrice());
|
||||
// return wares;
|
||||
// }).collect(Collectors.toList());
|
||||
// waresService.updateBatchById(newWares);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -177,9 +177,7 @@ public class DlRepairSoiServiceImpl extends ServiceImpl<DlRepairSoiMapper, DlRep
|
||||
**/
|
||||
@Override
|
||||
public IPage<DlRepairSoiRespVO> getSoBySupplier(DlRepairSoiReqVO reqVO, Page<DlRepairSoiRespVO> page){
|
||||
IPage<DlRepairSoi> repairSoiIPage = baseMapper.getSoBySupplier(reqVO, page);
|
||||
// TODO
|
||||
return null;
|
||||
return baseMapper.getSoBySupplier(reqVO, page);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,24 +149,44 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getSoBySupplier" resultMap="BaseResultMap">
|
||||
select drsi.*
|
||||
<select id="getSoBySupplier" resultMap="SoiAndWares">
|
||||
select drsi.*,
|
||||
drw.id AS wares_id,
|
||||
drw.bar_code,
|
||||
drw.code,
|
||||
drw.name,
|
||||
drw.model,
|
||||
drw.price,
|
||||
drw.pur_price,
|
||||
drw.type,
|
||||
drw.unit,
|
||||
drw.warehouse,
|
||||
drw.mini_stock,
|
||||
drw.max_stock,
|
||||
drw.stock,
|
||||
drw.img,
|
||||
drw.attribute,
|
||||
drw.corp_id,
|
||||
drw.cover_img,
|
||||
drw.car_model,
|
||||
drw.remark AS wares_remark,
|
||||
drw.status,
|
||||
drw.data_form
|
||||
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>
|
||||
where drs.so_type = '02'
|
||||
<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>
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user