|
@@ -18,6 +18,7 @@ import com.lc.ibps.base.core.util.JacksonUtil;
|
|
|
import com.lc.ibps.base.core.util.string.StringUtil;
|
|
import com.lc.ibps.base.core.util.string.StringUtil;
|
|
|
import com.lc.ibps.base.framework.id.UniqueIdUtil;
|
|
import com.lc.ibps.base.framework.id.UniqueIdUtil;
|
|
|
import com.lc.ibps.base.framework.request.signature.annotation.Signature;
|
|
import com.lc.ibps.base.framework.request.signature.annotation.Signature;
|
|
|
|
|
+import com.lc.ibps.base.framework.table.ICommonDao;
|
|
|
import com.lc.ibps.cloud.entity.APIPageList;
|
|
import com.lc.ibps.cloud.entity.APIPageList;
|
|
|
import com.lc.ibps.cloud.entity.APIRequest;
|
|
import com.lc.ibps.cloud.entity.APIRequest;
|
|
|
import com.lc.ibps.cloud.entity.APIRequestParameter;
|
|
import com.lc.ibps.cloud.entity.APIRequestParameter;
|
|
@@ -105,6 +106,9 @@ public class PartyEmployeeProvider extends GenericProvider implements IPartyEmpl
|
|
|
private PartyLevelRepository partyLevelRepository;
|
|
private PartyLevelRepository partyLevelRepository;
|
|
|
@Resource
|
|
@Resource
|
|
|
private IPartyUserService defaultPartyUserService;
|
|
private IPartyUserService defaultPartyUserService;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ private ICommonDao<?> commonDao = AppUtil.getBean(ICommonDao.class);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 员工列表
|
|
* 员工列表
|
|
@@ -946,6 +950,13 @@ public class PartyEmployeeProvider extends GenericProvider implements IPartyEmpl
|
|
|
try{
|
|
try{
|
|
|
PartyEmployee partyEmployee = partyEmployeeRepository.newInstance(partyEmployeePo);
|
|
PartyEmployee partyEmployee = partyEmployeeRepository.newInstance(partyEmployeePo);
|
|
|
PartyEmlpoyeeValidator.checkNullAndIllegal(partyEmployeePo);
|
|
PartyEmlpoyeeValidator.checkNullAndIllegal(partyEmployeePo);
|
|
|
|
|
+ //真正创建用户或者修改用户的时候,先判断主部门表当中是否有用户信息,若有,需要先删除,否则修改后用户无法登入
|
|
|
|
|
+ List<PartyRelPo> relList = partyRelRepository.getBySubIdBiz(partyEmployee.getId());
|
|
|
|
|
+ if(relList.size()>0){
|
|
|
|
|
+ //先删除rel表中的数据,防止有多主部门信息
|
|
|
|
|
+ String ids = relList.stream().map(PartyRelTbl::getId).collect(Collectors.joining(","));
|
|
|
|
|
+ partyRelRepository.remoBySubId(ids);
|
|
|
|
|
+ }
|
|
|
partyEmployee.updateByCascade(partyEmployeeVo);
|
|
partyEmployee.updateByCascade(partyEmployeeVo);
|
|
|
result.setMessage(I18nUtil.getMessage("com.lc.ibps.org.provider.PartyEmployeeProvider.save.update"));
|
|
result.setMessage(I18nUtil.getMessage("com.lc.ibps.org.provider.PartyEmployeeProvider.save.update"));
|
|
|
result.addVariable("id", partyEmployeePo.getId());
|
|
result.addVariable("id", partyEmployeePo.getId());
|