|
@@ -396,23 +396,26 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
if (expenseTypeCell == null) {
|
|
if (expenseTypeCell == null) {
|
|
throw new Exception("费用类型不能为空");
|
|
throw new Exception("费用类型不能为空");
|
|
}
|
|
}
|
|
- if (reportDateCell == null || StringUtils.isEmpty(reportDateCell.getStringCellValue())) {
|
|
|
|
|
|
+ if (reportDateCell == null || reportDateCell.getDateCellValue() == null) {
|
|
throw new Exception("填报日期不能为空");
|
|
throw new Exception("填报日期不能为空");
|
|
}
|
|
}
|
|
//做完非空校验后,进行姓名处理
|
|
//做完非空校验后,进行姓名处理
|
|
- List<String> userNameList=new ArrayList<>();
|
|
|
|
|
|
+
|
|
String reimburserName = reimburserCell.getStringCellValue();
|
|
String reimburserName = reimburserCell.getStringCellValue();
|
|
- userNameList.add(reimburserName);
|
|
|
|
|
|
+
|
|
HttpRespMsg respMsg= null;
|
|
HttpRespMsg respMsg= null;
|
|
|
|
+ List<User> targetUserList= new ArrayList<>();
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
|
+ List<String> userNameList=new ArrayList<>();
|
|
|
|
+ userNameList.add(reimburserName);
|
|
System.out.println("参与搜素的人员列表"+userNameList);
|
|
System.out.println("参与搜素的人员列表"+userNameList);
|
|
respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
|
|
respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
|
|
if(respMsg.code.equals("0")){
|
|
if(respMsg.code.equals("0")){
|
|
msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
|
|
msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
+ targetUserList = (List<User>) respMsg.data;
|
|
}
|
|
}
|
|
- List<User> targetUserList= (List<User>) respMsg.data;
|
|
|
|
ExpenseSheet expenseSheet = new ExpenseSheet();
|
|
ExpenseSheet expenseSheet = new ExpenseSheet();
|
|
if(functionList.size()>0){
|
|
if(functionList.size()>0){
|
|
expenseSheet.setStatus(0);
|
|
expenseSheet.setStatus(0);
|
|
@@ -446,7 +449,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
}else {
|
|
}else {
|
|
first = userList.stream().filter(us -> us.getName().equals(reimburserName)).findFirst();
|
|
first = userList.stream().filter(us -> us.getName().equals(reimburserName)).findFirst();
|
|
}
|
|
}
|
|
- if (first.isPresent()) {
|
|
|
|
|
|
+ if (first != null && first.isPresent()) {
|
|
expenseSheet.setOwnerId(first.get().getId());
|
|
expenseSheet.setOwnerId(first.get().getId());
|
|
expenseSheet.setOwnerName(first.get().getName());
|
|
expenseSheet.setOwnerName(first.get().getName());
|
|
} else {
|
|
} else {
|