Commit a46a2470 authored by 3533457856@qq.com's avatar 3533457856@qq.com

添加焊工接口修改

parent e1107400
......@@ -227,14 +227,15 @@ public class OrgServiceImpl {
}
public String getCode(){
int c;
int c = 0001;
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<>();
wrapper.orderByDesc(OrgUsr::getCode).eq(OrgUsr::getOrgExpandAttr1,OrgEnum.焊工.getKey());
String code = orgUsrServiceImpl.list(wrapper).iterator().next().getCode();
if(ValidationUtil.isEmpty(code)){
c = 0001;
}else{
c = Integer.parseInt(code.substring(code.indexOf("-")+1,code.length()))+1;
List<OrgUsr> orgUsr = orgUsrServiceImpl.list(wrapper);
if(!ValidationUtil.isEmpty(orgUsr)) {
String code = orgUsr.iterator().next().getCode();
if (!ValidationUtil.isEmpty(code)) {
c = Integer.parseInt(code.substring(code.indexOf("-") + 1, code.length())) + 1;
}
}
String welderCode = OrgEnum.焊工.getKey() +"-"+ c;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment