Merge branch '0.8.X' of https://gitee.com/hdka/klp-oa into 0.8.X
This commit is contained in:
@@ -45,6 +45,11 @@ public class HrmEmployeeServiceImpl implements IHrmEmployeeService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean insertByBo(HrmEmployeeBo bo) {
|
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);
|
HrmEmployee add = BeanUtil.toBean(bo, HrmEmployee.class);
|
||||||
return baseMapper.insert(add) > 0;
|
return baseMapper.insert(add) > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,9 +74,13 @@ public class WmsActualWarehouseServiceImpl implements IWmsActualWarehouseService
|
|||||||
for (int l = 1; l <= layers; l++) {
|
for (int l = 1; l <= layers; l++) {
|
||||||
int rowsForLayer = (l == 2) ? Math.max(rows - 1, 1) : rows;
|
int rowsForLayer = (l == 2) ? Math.max(rows - 1, 1) : rows;
|
||||||
for (int c = 1; c <= cols; c++) {
|
for (int c = 1; c <= cols; c++) {
|
||||||
|
// 列直接显示数字(1→1,10→10,无需补0)
|
||||||
|
String cStr = String.valueOf(c);
|
||||||
for (int r = 1; r <= rowsForLayer; r++) {
|
for (int r = 1; r <= rowsForLayer; r++) {
|
||||||
|
// 行的逻辑(1→01,10→10)
|
||||||
String rStr = r < 10 ? ("0" + r) : String.valueOf(r);
|
String rStr = r < 10 ? ("0" + r) : String.valueOf(r);
|
||||||
String code = prefix + c + '-' + rStr + '-' + l;
|
// 拼接编码:前缀 + 列 + - + 行 + - + 层
|
||||||
|
String code = prefix + cStr + '-' + rStr + '-' + l;
|
||||||
codes.add(code);
|
codes.add(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user