|
|
@ -7,6 +7,7 @@ import com.engine.organization.entity.SelectOptionParam;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
|
|
|
import com.engine.organization.entity.jclimport.po.JclImportHistoryDetailPO;
|
|
|
|
import com.engine.organization.entity.jclimport.po.JclImportHistoryDetailPO;
|
|
|
|
import com.engine.organization.entity.jclimport.po.JclImportHistoryPO;
|
|
|
|
import com.engine.organization.entity.jclimport.po.JclImportHistoryPO;
|
|
|
|
|
|
|
|
import com.engine.organization.mapper.employee.EmployeeMapper;
|
|
|
|
import com.engine.organization.mapper.jclimport.JclImportHistoryDetailMapper;
|
|
|
|
import com.engine.organization.mapper.jclimport.JclImportHistoryDetailMapper;
|
|
|
|
import com.engine.organization.mapper.jclimport.JclImportHistoryMapper;
|
|
|
|
import com.engine.organization.mapper.jclimport.JclImportHistoryMapper;
|
|
|
|
import com.engine.organization.util.OrganizationAssert;
|
|
|
|
import com.engine.organization.util.OrganizationAssert;
|
|
|
@ -184,4 +185,35 @@ public class OrgImportUtil {
|
|
|
|
public static boolean isThrowError(Map<String, Object> resultMap) {
|
|
|
|
public static boolean isThrowError(Map<String, Object> resultMap) {
|
|
|
|
return "1".equals(Util.null2String(resultMap.get("status"))) || "1".equals(Util.null2String(resultMap.get("sign")));
|
|
|
|
return "1".equals(Util.null2String(resultMap.get("status"))) || "1".equals(Util.null2String(resultMap.get("sign")));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 判断负责人是否有重名人员、若有重复人员、给出反馈信息。不处理该条数据
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param historyDetailPO
|
|
|
|
|
|
|
|
* @param cellValue
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static boolean hasSameName(JclImportHistoryDetailPO historyDetailPO, String cellValue) {
|
|
|
|
|
|
|
|
String operateDetail = "";
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(cellValue)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String[] split = cellValue.split(",");
|
|
|
|
|
|
|
|
for (String s : split) {
|
|
|
|
|
|
|
|
List<Long> resourceIds = MapperProxyFactory.getProxy(EmployeeMapper.class).getResourceIdsByName(s);
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(resourceIds)) {
|
|
|
|
|
|
|
|
operateDetail = "[" + s + "]未找到对应人员";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (resourceIds.size() > 1) {
|
|
|
|
|
|
|
|
operateDetail = "[" + s + "]查询到多个人员";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(operateDetail)) {
|
|
|
|
|
|
|
|
historyDetailPO.setOperateDetail(operateDetail);
|
|
|
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
|
|
|
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|