新增获取下一个部门/人员方法
parent
7e117e0c76
commit
6b34fa2d76
|
@ -4093,5 +4093,38 @@ public class Util extends weaver.general.Util {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <h1>获取下一个人员id</h1>
|
||||||
|
* @author xuanran.wang
|
||||||
|
* @dateTime 2023/7/19 11:24
|
||||||
|
* @return 部门id
|
||||||
|
**/
|
||||||
|
public static int getNextDepartmentId(){
|
||||||
|
RecordSet insertRs = new RecordSet();
|
||||||
|
char separator = weaver.general.Util.getSeparator();
|
||||||
|
String para = "" + separator + "" + separator +
|
||||||
|
"" + separator + "" + separator + "3" + separator + "" + separator + "";
|
||||||
|
insertRs.executeProc("HrmDepartment_Insert", para);
|
||||||
|
if(insertRs.next()){
|
||||||
|
return insertRs.getInt(1);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <h1>获取下一个人员id</h1>
|
||||||
|
* @author xuanran.wang
|
||||||
|
* @dateTime 2023/4/12 13:24
|
||||||
|
* @return 人员id
|
||||||
|
**/
|
||||||
|
public static int getNextHrmId(){
|
||||||
|
RecordSet procRs = new RecordSet();
|
||||||
|
procRs.executeProc("HrmResourceMaxId_Get", "");
|
||||||
|
if (procRs.next()) {
|
||||||
|
return procRs.getInt(1);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.api.xuanran.wang.xk_hospital.data_async.definitions;
|
|
||||||
|
|
||||||
import aiyh.utils.response_deal.entity.RowDefinition;
|
|
||||||
import aiyh.utils.response_deal.intfaces.RowDefinitionCallback;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <h1></h1>
|
|
||||||
*
|
|
||||||
* @author xuanran.wang
|
|
||||||
* @date 2023/7/18 11:13
|
|
||||||
*/
|
|
||||||
public class HrmresourceDefinition implements RowDefinitionCallback {
|
|
||||||
@Override
|
|
||||||
public void rowHandle(RowDefinition rowDefinition) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean judgmentRepetition(RowDefinition rowDefinition) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +1,13 @@
|
||||||
package com.api.xuanran.wang.xk_hospital.data_async.definitions;
|
package com.api.xuanran.wang.xk_hospital.data_async.definitions;
|
||||||
|
|
||||||
import aiyh.utils.Util;
|
import aiyh.utils.Util;
|
||||||
import aiyh.utils.excention.CustomerException;
|
|
||||||
import aiyh.utils.response_deal.entity.FieldDefinition;
|
|
||||||
import aiyh.utils.response_deal.entity.RowDefinition;
|
import aiyh.utils.response_deal.entity.RowDefinition;
|
||||||
import aiyh.utils.response_deal.intfaces.RowDefinitionCallback;
|
import aiyh.utils.response_deal.intfaces.RowDefinitionCallback;
|
||||||
import aiyh.utils.response_deal.mapper.ConfigMapper;
|
import aiyh.utils.response_deal.mapper.ConfigMapper;
|
||||||
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
|
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <h1></h1>
|
* <h1></h1>
|
||||||
|
@ -25,7 +21,6 @@ public class HrmDepartmentDefinition implements RowDefinitionCallback {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rowHandle(RowDefinition rowDefinition) {
|
public void rowHandle(RowDefinition rowDefinition) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,14 +31,14 @@ public class HrmDepartmentDefinition implements RowDefinitionCallback {
|
||||||
if(StrUtil.isBlank(dataId)){
|
if(StrUtil.isBlank(dataId)){
|
||||||
RecordSet insertRs = new RecordSet();
|
RecordSet insertRs = new RecordSet();
|
||||||
char separator = weaver.general.Util.getSeparator();
|
char separator = weaver.general.Util.getSeparator();
|
||||||
//使用存储过程新增分部
|
|
||||||
String para = "" + separator + "" + separator +
|
String para = "" + separator + "" + separator +
|
||||||
"" + separator + "" + separator + "1" + separator + "";
|
"" + separator + "" + separator + "3" + separator + "" + separator + "";
|
||||||
insertRs.executeProc("HrmDepartment_Insert", para);
|
insertRs.executeProc("HrmDepartment_Insert", para);
|
||||||
if (insertRs.next()) {
|
if (insertRs.next()) {
|
||||||
int depId = insertRs.getInt(1);
|
int depId = insertRs.getInt(1);
|
||||||
rowDefinition.setDataId(depId);
|
rowDefinition.setDataId(depId);
|
||||||
rowDefinition.getWhereParam().put("id", depId);
|
rowDefinition.getWhereParam().put("id", depId);
|
||||||
|
rowDefinition.setConditionScript(" id = #{whereItem.id}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
Loading…
Reference in New Issue