|
@@ -13,6 +13,7 @@ import com.management.platform.entity.vo.SysRichFunction;
|
|
|
import com.management.platform.mapper.*;
|
|
|
import com.management.platform.service.ExpenseItemService;
|
|
|
import com.management.platform.service.ExpenseSheetService;
|
|
|
+import com.management.platform.service.InformationService;
|
|
|
import com.management.platform.service.WxCorpInfoService;
|
|
|
import com.management.platform.util.ExcelUtil;
|
|
|
import com.management.platform.util.HttpRespMsg;
|
|
@@ -36,6 +37,7 @@ import java.io.*;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.Instant;
|
|
|
import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
@@ -73,6 +75,8 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
|
@Resource
|
|
|
private WxCorpInfoService wxCorpInfoService;
|
|
|
@Resource
|
|
|
+ private InformationService informationService;
|
|
|
+ @Resource
|
|
|
private SysRoleFunctionMapper sysRoleFunctionMapper;
|
|
|
public static final String[] sheetTypes = {"一般费用","差旅费","外包费用"};
|
|
|
@Override
|
|
@@ -152,6 +156,17 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
|
|
|
json.put("url","https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=expense#wechat_redirect");
|
|
|
json.put("content_item",dataJson);
|
|
|
wxCorpInfoService.sendWXCorpTemplateMsg(wxCorpInfo,sb.toString(), json);
|
|
|
+ List<Information> informationList=new ArrayList<>();
|
|
|
+ for (User item : targetUserList) {
|
|
|
+ Information information=new Information();
|
|
|
+ information.setUserId(item.getId());
|
|
|
+ information.setTime(LocalDateTime.now());
|
|
|
+ information.setMsg("费用报销待审核");
|
|
|
+ information.setType(3);
|
|
|
+ information.setContent(sheet.getCreateDate()+"");
|
|
|
+ informationList.add(information);
|
|
|
+ }
|
|
|
+ informationService.saveBatch(informationList);
|
|
|
}
|
|
|
} else {
|
|
|
expenseSheetMapper.updateById(sheet);
|