parent
c2bdf9decd
commit
c89592e721
22 changed files with 533 additions and 1 deletions
@ -0,0 +1,51 @@ |
||||
package org.springblade.desk.logistics.controller; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.logistics.service.OrderBoxService; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 订单箱子 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/order") |
||||
@Tag(name = "订单箱子", description = "订单箱子称重接口") |
||||
public class OrderBoxController extends BladeController { |
||||
private final OrderBoxService orderBoxService; |
||||
|
||||
|
||||
@PostMapping("/getWeighing") |
||||
@ApiOperationSupport(order = 1) |
||||
@Operation( |
||||
summary = "维护流程卡号零件对应的重量", |
||||
description = "传入流程卡号与重量进行维护" |
||||
) |
||||
public R getOrderPartWeight( |
||||
@Parameter(description = "流程卡号", required = true) |
||||
@RequestParam String cardNo, |
||||
@Parameter(description = "实际称重重量(单位:kg)", required = true) |
||||
@RequestParam String actualWeight) { |
||||
|
||||
// 1.参数合法性校验
|
||||
if (cardNo == null || cardNo.trim().isEmpty()) { |
||||
return R.fail("流程卡号不能为空"); |
||||
} |
||||
if (actualWeight == null || new BigDecimal(actualWeight).compareTo(BigDecimal.ZERO) < 0) { |
||||
return R.fail("实际重量必须为非负数"); |
||||
} |
||||
return orderBoxService.upholdOrderPartWeight(cardNo,new BigDecimal(actualWeight)); |
||||
|
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,8 @@ |
||||
package org.springblade.desk.logistics.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.Location; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
|
||||
public interface LocationMapper extends BaseMapper<Location> { |
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper |
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace = "org.springblade.desk.logistics.mapper.LocationMapper"> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,8 @@ |
||||
package org.springblade.desk.logistics.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
import org.springblade.desk.logistics.pojo.entity.Task; |
||||
|
||||
public interface OrderBindMapper extends BaseMapper<OrderBind> { |
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper |
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace = "org.springblade.desk.logistics.mapper.OrderBindMapper"> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,8 @@ |
||||
package org.springblade.desk.logistics.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
import org.springblade.desk.logistics.pojo.entity.Station; |
||||
|
||||
public interface StationMapper extends BaseMapper<Station> { |
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper |
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace = "org.springblade.desk.logistics.mapper.StationMapper"> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,7 @@ |
||||
package org.springblade.desk.logistics.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.Task; |
||||
import org.springblade.desk.logistics.pojo.entity.WeighData; |
||||
public interface TaskMapper extends BaseMapper<Task> { |
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper |
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace = "org.springblade.desk.logistics.mapper.TaskMapper"> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,42 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service; |
||||
|
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.logistics.pojo.entity.Location; |
||||
import org.springblade.desk.logistics.pojo.entity.WeighData; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 物流库位 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface LocationService extends BaseService<Location> { |
||||
|
||||
} |
||||
@ -0,0 +1,40 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service; |
||||
|
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.logistics.pojo.entity.Location; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
|
||||
/** |
||||
* 订单绑定实体类 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface OrderBindService extends BaseService<OrderBind> { |
||||
|
||||
} |
||||
@ -0,0 +1,9 @@ |
||||
package org.springblade.desk.logistics.service; |
||||
|
||||
import org.springblade.core.tool.api.R; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
public interface OrderBoxService { |
||||
R upholdOrderPartWeight(String cardNo, BigDecimal actualWeight); |
||||
} |
||||
@ -0,0 +1,40 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service; |
||||
|
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.logistics.pojo.entity.Location; |
||||
import org.springblade.desk.logistics.pojo.entity.Station; |
||||
|
||||
/** |
||||
* 物流站点 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface StationService extends BaseService<Station> { |
||||
|
||||
} |
||||
@ -0,0 +1,40 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service; |
||||
|
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.logistics.pojo.entity.Station; |
||||
import org.springblade.desk.logistics.pojo.entity.Task; |
||||
|
||||
/** |
||||
* 物流任务 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface TaskService extends BaseService<Task> { |
||||
|
||||
} |
||||
@ -0,0 +1,47 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service.impl; |
||||
|
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.logistics.mapper.LocationMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.Location; |
||||
import org.springblade.desk.logistics.service.LocationService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
/** |
||||
* 物流库位 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
public class LocationServiceImpl extends BaseServiceImpl<LocationMapper, Location> implements LocationService { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,49 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service.impl; |
||||
|
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.logistics.mapper.LocationMapper; |
||||
import org.springblade.desk.logistics.mapper.OrderBindMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.Location; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
import org.springblade.desk.logistics.service.LocationService; |
||||
import org.springblade.desk.logistics.service.OrderBindService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 订单绑定 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
public class OrderBindServiceImpl extends BaseServiceImpl<OrderBindMapper, OrderBind> implements OrderBindService { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,42 @@ |
||||
package org.springblade.desk.logistics.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.desk.jobtransfer.service.ICertificateMaintenanceService; |
||||
import org.springblade.desk.logistics.service.OrderBoxService; |
||||
|
||||
import org.springblade.desk.order.pojo.entity.YieldOrder; |
||||
import org.springblade.desk.order.service.IYieldOrderService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 订单箱子 控制器 |
||||
* |
||||
* @author qyl |
||||
* @since 2026-01-08 |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
public class OrderBoxServiceImpl implements OrderBoxService { |
||||
private final IYieldOrderService yieldOrderService; |
||||
|
||||
public OrderBoxServiceImpl(IYieldOrderService yieldOrderService) { |
||||
this.yieldOrderService = yieldOrderService; |
||||
} |
||||
|
||||
@Override |
||||
public R upholdOrderPartWeight(String cardNo, BigDecimal actualWeight) { |
||||
log.info("接收到实际重量:{},对应的流程卡号:{}",actualWeight,cardNo); |
||||
//获取流程卡号
|
||||
List<YieldOrder> list = yieldOrderService.list(new QueryWrapper<YieldOrder>().eq("CARD_NO", cardNo).orderByDesc("UPDATE_TIME")); |
||||
|
||||
//修改重量
|
||||
list.get(0).setActualWeighing(actualWeight); |
||||
|
||||
return yieldOrderService.updateById(list.get(0))? R.success():R.fail("实际称重维护:卡号维护失败"); |
||||
} |
||||
} |
||||
@ -0,0 +1,49 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service.impl; |
||||
|
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.logistics.mapper.OrderBindMapper; |
||||
import org.springblade.desk.logistics.mapper.StationMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
import org.springblade.desk.logistics.pojo.entity.Station; |
||||
import org.springblade.desk.logistics.service.OrderBindService; |
||||
import org.springblade.desk.logistics.service.StationService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 物流站点 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
public class StationServiceImpl extends BaseServiceImpl<StationMapper, Station> implements StationService { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,49 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service.impl; |
||||
|
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.logistics.mapper.StationMapper; |
||||
import org.springblade.desk.logistics.mapper.TaskMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.Station; |
||||
import org.springblade.desk.logistics.pojo.entity.Task; |
||||
import org.springblade.desk.logistics.service.StationService; |
||||
import org.springblade.desk.logistics.service.TaskService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 物流任务 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implements TaskService { |
||||
|
||||
|
||||
} |
||||
Loading…
Reference in new issue