企业编号 最大值 加1 以及新增时,企标名称可以重复(编号和名称重复也是新增一条,不做覆盖)

This commit is contained in:
gaojiabao
2023-04-04 11:44:31 +08:00
parent 9415f29898
commit c038fae038
9 changed files with 176 additions and 169 deletions
@@ -163,9 +163,9 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
public ResponseMessage<Object> addPlan(EsRevisePlan esRevisePlan) {
esRevisePlan.setId(UUIDUtils.randomUUID(32));
List<EsRevisePlan> esRevisePlans=esRevisePlanDao.selectPageByName(esRevisePlan);
if (esRevisePlans.size()>0){
return Result.success("企标名称不能重复,请更换新的企标名称");
}else {
// if (esRevisePlans.size()>0){
// return Result.success("企标名称不能重复,请更换新的企标名称");
// }else {
esRevisePlanDao.insertOne(esRevisePlan);
//加日志
String esName = esRevisePlan.getEsName();
@@ -181,7 +181,7 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
}
esRevisePlanLogDao.insert(new EsRevisePlanLog(null,id,msg,date));
return Result.success("200", esRevisePlan.getId(), "操作成功");
}
//}
}
@Override
@@ -13,4 +13,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface SarBussStandSnDao extends BaseMapper<SarBussStandSn> {
String selectMaxStandnSn();
}
@@ -16,4 +16,7 @@ public interface ISarBussStandSnService extends IService<SarBussStandSn> {
Boolean verifySnExists(String taskId,String standSn,String standSort);
Boolean modSnByProcess(String taskId);
String selectMaxStandnSn();
}
@@ -60,4 +60,9 @@ public class SarBussStandSnServiceImpl extends ServiceImpl<SarBussStandSnDao, Sa
return false;
}
@Override
public String selectMaxStandnSn() {
return baseMapper.selectMaxStandnSn();
}
}
@@ -130,6 +130,5 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
@Select("select * from sar")
String setDtqbbhbuss(String dtqbbhbuss);
String selectMaxStandnSn();
}
@@ -4320,7 +4320,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
@Override
public ResponseMessage selectMaxStandnSn() {
String max = baseMapper.selectMaxStandnSn();
String max = iSarBussStandSnService.selectMaxStandnSn();
int maxIOnfo = 0;
if(StringUtils.isNotBlank(max)){
int i = Integer.parseInt(max);