提交 bb25824e authored 作者: huyufan's avatar huyufan

货单编辑接口

上级 163100c5
......@@ -27,5 +27,5 @@ public class UpdateEditOrderGoodsParam {
@Valid
@Converted(isDynamic = true)
private List<OrderGoodsEditParams> orderGoodsChildParams;
private OrderGoodsEditParams orderGoodsParams;
}
......@@ -38,5 +38,5 @@ public class OrderGoodsEditVO {
@ApiModelProperty("1:可以全部编辑 0:不能全部编辑")
private boolean editAllFlag;
private List<OrderGoodsVO> orderGoodsVOList;
private OrderGoodsVO orderGoodsVO;
}
......@@ -130,8 +130,8 @@ public class GoodsOrderController {
@ApiOperation(value = "货单编辑查询", notes = "<br>By:胡宇帆")
@GetMapping("/findOrderGoodsByBatchNumber")
public Result<OrderGoodsEditVO> findOrderGoodsByBatchNumber(@RequestParam(value = "batchNumber") Long batchNumber){
OrderGoodsEditVO orderGoodsVO = orderGoodsService.findOrderGoodsByBatchNumber(batchNumber);
public Result<OrderGoodsEditVO> findOrderGoodsByBatchNumber(@RequestParam(value = "id") Integer id){
OrderGoodsEditVO orderGoodsVO = orderGoodsService.findOrderGoodsById(id);
return Result.ok(orderGoodsVO);
}
......
......@@ -64,7 +64,7 @@ public interface OrderGoodsDao extends BaseDao<OrderGoodsMapper, OrderGoods, Int
Integer updateOrderGoodsSetResidueWeight(BigDecimal residueWeight, Integer id);
List<OrderGoodsVO> findOrderGoodsByBatchNumber(Long batchNumber);
OrderGoodsVO findOrderGoodsById(Integer id);
List<OrderGoods> selectListByOrderGoodsList(List<String> orderNos);
......
......@@ -170,8 +170,8 @@ public class OrderGoodsDaoImpl extends BaseDaoImpl<OrderGoodsMapper, OrderGoods,
}
@Override
public List<OrderGoodsVO> findOrderGoodsByBatchNumber(Long batchNumber) {
return baseMapper.findOrderGoodsByBatchNumber(batchNumber);
public OrderGoodsVO findOrderGoodsById(Integer id) {
return baseMapper.findOrderGoodsById(id);
}
@Override
......
......@@ -59,8 +59,8 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
@UpdateProvider(type = OrderGoodsSqlProvider.class, method = "updateOrderGoodsSetResidueWeight")
Integer updateOrderGoodsSetResidueWeight(@Param(value = "residueWeight") BigDecimal residueWeight, @Param(value = "id") Integer id);
@SelectProvider(type = OrderGoodsSqlProvider.class, method = "findOrderGoodsByBatchNumber")
List<OrderGoodsVO> findOrderGoodsByBatchNumber(Long batchNumber);
@SelectProvider(type = OrderGoodsSqlProvider.class, method = "findOrderGoodsById")
OrderGoodsVO findOrderGoodsById(Integer id);
@UpdateProvider(type = OrderGoodsSqlProvider.class, method = "updateOrderGoods")
Integer updateOrderGoods(@Param(value = "param") OrderGoodsEditParams orderGoodsEditParams);
......
......@@ -77,8 +77,8 @@ public interface OrderGoodsService {
/**
* 编辑货单查询
* @param batchNumber
* @param id
* @return
*/
OrderGoodsEditVO findOrderGoodsByBatchNumber(Long batchNumber);
OrderGoodsEditVO findOrderGoodsById(Integer id);
}
......@@ -184,7 +184,7 @@ public class OrderGoodsSqlProvider {
return sql;
}
public String findOrderGoodsByBatchNumber(@Param("batchNumber") Long batchNumber) {
public String findOrderGoodsById(@Param("id") Integer id) {
String sql = new SQL() {{
SELECT("a.id, a.order_no," +
" a.order_goods_no, a.order_goods_status, a.extract_weight, " +
......@@ -200,8 +200,8 @@ public class OrderGoodsSqlProvider {
"a.user_no,a.user_name,batch_number,last_arrive_receive_time,last_load_time,last_order_time");
FROM("order_goods a");
if (Objects.nonNull(batchNumber)) {
WHERE("a.batch_number = #{batchNumber}");
if (Objects.nonNull(id)) {
WHERE("a.id = #{id}");
}
ORDER_BY("a.create_time desc");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论