This commit is contained in:
陆一凡 2025-03-15 16:58:50 +08:00
parent 81c873f0e7
commit 09473b4d89
6 changed files with 16 additions and 6 deletions

View File

@ -106,9 +106,9 @@ public class AppPmsOrderInController extends BaseController
/** /**
* 修改请填写功能名称 * 修改请填写功能名称
*/ */
@PreAuthorize("@ss.hasPermi('system:in:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
@Anonymous
public AjaxResult edit(@RequestBody AppPmsOrderIn appPmsOrderIn) public AjaxResult edit(@RequestBody AppPmsOrderIn appPmsOrderIn)
{ {
return toAjax(appPmsOrderInService.updateAppPmsOrderIn(appPmsOrderIn)); return toAjax(appPmsOrderInService.updateAppPmsOrderIn(appPmsOrderIn));

View File

@ -616,15 +616,16 @@ public class AppTaskController extends BaseController
AppPmsOrderOut appPmsOrderOut1 = new AppPmsOrderOut(); AppPmsOrderOut appPmsOrderOut1 = new AppPmsOrderOut();
appPmsOrderOut1.setGoodsId(e.getKey()); appPmsOrderOut1.setGoodsId(e.getKey());
appPmsOrderOut1.setOrderStatus(0); appPmsOrderOut1.setOrderStatus(0);
appPmsOrderOut1.setIsLock("0"); appPmsOrderOut1.setIsLock("1");
appPmsOrderOut1.setGoodsDesc(e.getValue().get(0).getGoodsDesc()); appPmsOrderOut1.setGoodsDesc(e.getValue().get(0).getGoodsDesc());
appPmsOrderOut1.setOrderWave(appWave.getWaveId()); appPmsOrderOut1.setOrderWave(appWave.getWaveId());
appPmsOrderOut1.setPickNum(e.getValue().stream().map(AppPmsOrderOut::getGoodsNum).reduce(BigDecimal.ZERO, BigDecimal::add)); appPmsOrderOut1.setPickNum(e.getValue().stream().map(AppPmsOrderOut::getGoodsNum).reduce(BigDecimal.ZERO, BigDecimal::add));
appPmsOrderOut1.setShelvesNum(e.getValue().stream().map(AppPmsOrderOut::getGoodsNum).reduce(BigDecimal.ZERO, BigDecimal::add));
return appPmsOrderOut1; return appPmsOrderOut1;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
//把该波次出库单锁定 //把该波次出库单锁定
appPmsOrderOutList1.forEach(e -> { appPmsOrderOutList.forEach(e -> {
e.setIsLock("1"); e.setIsLock("1");
e.setUpdateTime(new Date()); e.setUpdateTime(new Date());
e.setUpdateBy(getUsername()); e.setUpdateBy(getUsername());
@ -843,7 +844,14 @@ public class AppTaskController extends BaseController
if (appLocation.getwDepth() == 2) { if (appLocation.getwDepth() == 2) {
//判断01是否有货 //判断01是否有货
String locationId = locId.substring(0, locId.length() - 1) + "1"; String locationId = locId.substring(0, locId.length() - 1) + "1";
List<AppTask> appTasks = getAppTaskByVehicleId(null, locationId); AppTask appTask1 =new AppTask();
appTask1.setVehicleId(vehicleId);
appTask1.setLocationId(locationId);
// if(StringUtils.isBlank(locationId)) {
// appTask.setTaskType(AppConstants.TASK_TYPE_OUT);
// }
List<AppTask> appTasks = appTaskService.selectAppTaskList(appTask1);
// List<AppTask> appTasks = getAppTaskByVehicleId(null, locationId);
if (!CollectionUtils.isEmpty(appTasks)) { if (!CollectionUtils.isEmpty(appTasks)) {
logger.error(locationId + "有任务执行,请稍后再试"); logger.error(locationId + "有任务执行,请稍后再试");
throw new RuntimeException(locationId + "有任务执行,请稍后再试!"); throw new RuntimeException(locationId + "有任务执行,请稍后再试!");

View File

@ -114,7 +114,7 @@ public class SecurityConfig
requests.antMatchers("/login", "/register", "/captchaImage").permitAll() requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
// 静态资源可匿名访问 // 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/app/pms/orderIn", "/app/pmsOrderOut/**", "/app/task/sendLocation", "/app/task/taskResult","/app/task/createOutRequest", "/system/storage/**", "/app/location/count/**", "/app/vehicle/**", "/app/goods/getGoodsInfoByCode/**","/app/pms/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/app/pms/orderIn", "/app/pmsOrderOut/**", "/app/task/sendLocation", "/app/task/taskResult","/app/task/createOutRequest", "/system/storage/**", "/app/location/count/**", "/app/vehicle/**", "/app/goods/getGoodsInfoByCode/**","/app/pms/**","/app/pmsOrderIn/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated(); .anyRequest().authenticated();
}) })

View File

@ -352,8 +352,8 @@ public class TaskExecutor {
List<AppPmsOrderOut> appPmsOrderOuts = appPmsOrderOutMapper.selectAppPmsOrderOutList(appPmsOrderOut); List<AppPmsOrderOut> appPmsOrderOuts = appPmsOrderOutMapper.selectAppPmsOrderOutList(appPmsOrderOut);
//查询出来的列表利用lamda表达式 根据orderId进行分组 //查询出来的列表利用lamda表达式 根据orderId进行分组
Map<String, List<AppPmsOrderOut>> map = appPmsOrderOuts.stream().collect(Collectors.groupingBy(AppPmsOrderOut::getOrderId)); Map<String, List<AppPmsOrderOut>> map = appPmsOrderOuts.stream().collect(Collectors.groupingBy(AppPmsOrderOut::getOrderId));
AtomicBoolean flag = new AtomicBoolean(true);
map.forEach((k, v) -> { map.forEach((k, v) -> {
AtomicBoolean flag = new AtomicBoolean(true);
// v中的数据进行遍历查询orderStatus是否有为0和1的 // v中的数据进行遍历查询orderStatus是否有为0和1的
for (AppPmsOrderOut appPmsOrderOut1 : v) { for (AppPmsOrderOut appPmsOrderOut1 : v) {
if (appPmsOrderOut1.getOrderStatus() == 0 || appPmsOrderOut1.getOrderStatus() == 1) { if (appPmsOrderOut1.getOrderStatus() == 0 || appPmsOrderOut1.getOrderStatus() == 1) {

View File

@ -60,6 +60,7 @@
<if test="storageId != null"> and storage_id = #{storageId}</if> <if test="storageId != null"> and storage_id = #{storageId}</if>
<if test="goodsDesc != null"> and goods_desc = #{goodsDesc}</if> <if test="goodsDesc != null"> and goods_desc = #{goodsDesc}</if>
</where> </where>
order by goods_id desc, ware_date desc
</select> </select>
<select id="selectStockByGoodsId" parameterType="AppStock" resultMap="AppStockResult"> <select id="selectStockByGoodsId" parameterType="AppStock" resultMap="AppStockResult">
<include refid="selectAppStockVo"/> <include refid="selectAppStockVo"/>

View File

@ -31,6 +31,7 @@
<if test="orderWbs != null and orderWbs != ''"> and order_wbs = #{orderWbs}</if> <if test="orderWbs != null and orderWbs != ''"> and order_wbs = #{orderWbs}</if>
<if test="waveDestination != null and waveDestination != ''"> and wave_destination = #{waveDestination}</if> <if test="waveDestination != null and waveDestination != ''"> and wave_destination = #{waveDestination}</if>
</where> </where>
order by create_time desc
</select> </select>
<select id="selectAppWaveByWaveId" parameterType="String" resultMap="AppWaveResult"> <select id="selectAppWaveByWaveId" parameterType="String" resultMap="AppWaveResult">