设备管理-检查项维护(新增-code格式)

highway
wws 1 year ago
parent f2fea045e5
commit 899f67ebd2

@ -107,12 +107,12 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
String factory = str.substring(index + 1); String factory = str.substring(index + 1);
// 获取检查项流水号 // 获取检查项流水号
String serialNum = String.format("%02d", equCheckItemMapper.selectSerialNumber()); String serialNum = String.format("%03d", equCheckItemMapper.selectSerialNumber());
// 处理检查项信息 // 处理检查项信息
equCheckItem.setItemId(IdUtils.fastSimpleUUID()); equCheckItem.setItemId(IdUtils.fastSimpleUUID());
equCheckItem.setFactoryCode(factory); equCheckItem.setFactoryCode(factory);
equCheckItem.setItemCode("CI"+serialNum); equCheckItem.setItemCode("CI"+DateUtils.dateTimeNow(DateUtils.YYYYMMDD)+serialNum);
equCheckItem.setCreatedBy(SecurityContextHolder.getUserName()); equCheckItem.setCreatedBy(SecurityContextHolder.getUserName());
equCheckItem.setCreatedTime(DateUtils.getNowDate()); equCheckItem.setCreatedTime(DateUtils.getNowDate());
equCheckItem.setUpdatedBy(SecurityContextHolder.getUserName()); equCheckItem.setUpdatedBy(SecurityContextHolder.getUserName());

Loading…
Cancel
Save