企业编号 最大值 加1

This commit is contained in:
gaojiabao
2023-04-04 10:25:33 +08:00
parent 47af72dcf3
commit 5cd7e4310b
6 changed files with 28 additions and 2 deletions
@@ -115,8 +115,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
//企业标准导出
addInterceptor.excludePathPatterns("/api/lawss/sarBussionessStand/exportSarBussionessStand");
addInterceptor.excludePathPatterns("/api/lawss/sarFileSplitItems/exportTemplate");
addInterceptor.excludePathPatterns("/api/lawss/sarFileSplitItems/exportTemplate");
//预警导出
addInterceptor.excludePathPatterns("/api/sys/EarlyWarning/exportWarning");
@@ -511,5 +511,11 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
org.apache.poi.util.IOUtils.closeQuietly(excelOS);
}
}
@ApiOperation(value = "最大顺序号查询")
@GetMapping("/selectMaxStandnSn")
public ResponseMessage selectMaxStandnSn (){
return sarBussionessStandEOService.selectMaxStandnSn();
}
}
@@ -129,5 +129,7 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
@Select("select * from sar")
String setDtqbbhbuss(String dtqbbhbuss);
String selectMaxStandnSn();
}
@@ -63,5 +63,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
ResponseMessage repetitionFile();
ResponseMessage newRpetitionFile();
ResponseMessage selectMaxStandnSn();
}
@@ -4311,6 +4311,19 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
return Result.success(objects);
}
@Override
public ResponseMessage selectMaxStandnSn() {
String max = baseMapper.selectMaxStandnSn();
int maxIOnfo = 0;
if(StringUtils.isNotBlank(max)){
int i = Integer.parseInt(max);
maxIOnfo = i+1;
}
String s = maxIOnfo + "";
return Result.success(s);
}
public String updateInfo(List<String> asList,String standId,String attfId) {
//重复的集合
List<AttFileEO> chongfu = new ArrayList<>();
@@ -1254,4 +1254,8 @@
update sar_buss_stand_attr_info ss set ss.FBGBUSS = #{strFile}
where id = #{attfId}
</update>
<select id="selectMaxStandnSn" resultType="java.lang.String">
select Max(STAND_SN) from sar_bussioness_stand
</select>
</mapper>