Merge branch '0.8.X' of https://gitee.com/hdka/klp-oa into 0.8.X

This commit is contained in:
砂糖
2026-01-07 10:18:30 +08:00
2 changed files with 10 additions and 1 deletions

View File

@@ -45,6 +45,11 @@ public class HrmEmployeeServiceImpl implements IHrmEmployeeService {
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean insertByBo(HrmEmployeeBo bo) {
Long userId = bo.getUserId();
// 如果存在则不插入
if (baseMapper.exists(Wrappers.<HrmEmployee>lambdaQuery().eq(HrmEmployee::getUserId, userId))) {
throw new RuntimeException("用户已存在");
}
HrmEmployee add = BeanUtil.toBean(bo, HrmEmployee.class);
return baseMapper.insert(add) > 0;
}

View File

@@ -74,9 +74,13 @@ public class WmsActualWarehouseServiceImpl implements IWmsActualWarehouseService
for (int l = 1; l <= layers; l++) {
int rowsForLayer = (l == 2) ? Math.max(rows - 1, 1) : rows;
for (int c = 1; c <= cols; c++) {
// 列直接显示数字1→110→10无需补0
String cStr = String.valueOf(c);
for (int r = 1; r <= rowsForLayer; r++) {
// 行的逻辑1→0110→10
String rStr = r < 10 ? ("0" + r) : String.valueOf(r);
String code = prefix + c + '-' + rStr + '-' + l;
// 拼接编码:前缀 + 列 + - + 行 + - + 层
String code = prefix + cStr + '-' + rStr + '-' + l;
codes.add(code);
}
}