Browse Source

fix: 重复组盘信息修改

master
李永德 11 months ago
parent
commit
71ee3c2461
  1. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  2. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -663,6 +663,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
// 静置完成要把组盘改成以解绑
SchBaseVehiclematerialgroup one = vehiclematerialgroupService.getGroupInfo(baseRequest.getVehicle_code(),
baseRequest.getVehicle_type(), GroupBindMaterialStatusEnum.BOUND.getValue());
log.info("扫码校验静置时间查找的组盘信息:{}", one);
if (ObjectUtil.isEmpty(one)) {
throw new BadRequestException("载具编码为" + baseRequest.getVehicle_code() + "组盘不存在!");
}

9
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java

@ -21,6 +21,7 @@ import org.nl.wms.sch.group.service.dto.SchBaseVehiclematerialgroupQuery;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.task_manage.GeneralDefinition;
import org.nl.wms.sch.task_manage.enums.GroupBindMaterialStatusEnum;
import org.nl.wms.util.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -137,11 +138,13 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
LambdaQueryWrapper<SchBaseVehiclematerialgroup> lambda = new QueryWrapper<SchBaseVehiclematerialgroup>().lambda();
lambda.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
.eq(SchBaseVehiclematerialgroup::getVehicle_type, vehicleType)
.ne(SchBaseVehiclematerialgroup::getGroup_bind_material_status, GroupBindMaterialStatusEnum.UNBOUND.getValue())
.ne(SchBaseVehiclematerialgroup::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue())
.eq(SchBaseVehiclematerialgroup::getIs_delete, false);
List<SchBaseVehiclematerialgroup> list = vehiclematerialgroupMapper.selectList(lambda);
list.forEach(schBaseVehiclematerialgroup ->
schBaseVehiclematerialgroup.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()));
list.forEach(schBaseVehiclematerialgroup -> {
schBaseVehiclematerialgroup.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
TaskUtils.setGroupUpdateByAcs(schBaseVehiclematerialgroup);
});
this.updateBatchById(list);
}

Loading…
Cancel
Save