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

添加焊工接口修改

parent e1107400
...@@ -227,14 +227,15 @@ public class OrgServiceImpl { ...@@ -227,14 +227,15 @@ public class OrgServiceImpl {
} }
public String getCode(){ public String getCode(){
int c; int c = 0001;
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<>();
wrapper.orderByDesc(OrgUsr::getCode).eq(OrgUsr::getOrgExpandAttr1,OrgEnum.焊工.getKey()); wrapper.orderByDesc(OrgUsr::getCode).eq(OrgUsr::getOrgExpandAttr1,OrgEnum.焊工.getKey());
String code = orgUsrServiceImpl.list(wrapper).iterator().next().getCode(); List<OrgUsr> orgUsr = orgUsrServiceImpl.list(wrapper);
if(ValidationUtil.isEmpty(code)){ if(!ValidationUtil.isEmpty(orgUsr)) {
c = 0001; String code = orgUsr.iterator().next().getCode();
}else{ if (!ValidationUtil.isEmpty(code)) {
c = Integer.parseInt(code.substring(code.indexOf("-")+1,code.length()))+1; c = Integer.parseInt(code.substring(code.indexOf("-") + 1, code.length())) + 1;
}
} }
String welderCode = OrgEnum.焊工.getKey() +"-"+ c; 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