|
@@ -540,24 +540,20 @@ public class ZxtdReportServiceImpl implements ZxtdReportService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Async
|
|
@Async
|
|
- public void uploadToDingTalk2(HttpServletResponse response,String userId,String month) {
|
|
|
|
|
|
+ public void uploadToDingTalk2(HttpServletResponse response,String userId,String date) {
|
|
//获取当前时间戳
|
|
//获取当前时间戳
|
|
long beginTimestamp = System.currentTimeMillis();
|
|
long beginTimestamp = System.currentTimeMillis();
|
|
System.out.println("开始上传现金流量表:" + beginTimestamp);
|
|
System.out.println("开始上传现金流量表:" + beginTimestamp);
|
|
|
|
|
|
//父节点dentryUuid
|
|
//父节点dentryUuid
|
|
String parentDentryUuid = "ZX6GRezwJlRgBQmQCGE54DMQWdqbropQ";//知行同德
|
|
String parentDentryUuid = "ZX6GRezwJlRgBQmQCGE54DMQWdqbropQ";//知行同德
|
|
- String year = DateUtil.year(new Date()) + "";
|
|
|
|
|
|
|
|
- //如果月份小于10,则在年份前面加0
|
|
|
|
- if (month.length() == 1) {
|
|
|
|
- month = "0" + month;
|
|
|
|
- }
|
|
|
|
|
|
+ date = date.replace("-","");
|
|
|
|
|
|
- exportCash(response, year + month);
|
|
|
|
|
|
+ exportCash(response, date);
|
|
|
|
|
|
//文件
|
|
//文件
|
|
- File file = new File(reportPath + "现金流量表-" + year + month + ".xlsx");
|
|
|
|
|
|
+ File file = new File(reportPath + "现金流量表-" + date + ".xlsx");
|
|
|
|
|
|
//获取文件上传信息
|
|
//获取文件上传信息
|
|
Map param = new HashMap();
|
|
Map param = new HashMap();
|
|
@@ -610,8 +606,8 @@ public class ZxtdReportServiceImpl implements ZxtdReportService {
|
|
body2.put("name",file.getName());
|
|
body2.put("name",file.getName());
|
|
body2.put("option",option);
|
|
body2.put("option",option);
|
|
UtilHttp.doPost("https://api.dingtalk.com/v2.0/storage/spaces/files/" + parentDentryUuid + "/commit",ddClient.initTokenHeader(),param,body2);
|
|
UtilHttp.doPost("https://api.dingtalk.com/v2.0/storage/spaces/files/" + parentDentryUuid + "/commit",ddClient.initTokenHeader(),param,body2);
|
|
- }catch (IOException e){
|
|
|
|
- System.out.println("上传文件异常");
|
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ log.info("上传文件异常:",e.getMessage());
|
|
}
|
|
}
|
|
|
|
|
|
long endTimestamp = System.currentTimeMillis();
|
|
long endTimestamp = System.currentTimeMillis();
|
|
@@ -1128,7 +1124,7 @@ public class ZxtdReportServiceImpl implements ZxtdReportService {
|
|
// 数据预处理
|
|
// 数据预处理
|
|
for (Map map:list){
|
|
for (Map map:list){
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
- String subject = formData.getString("textField_lqyx5k16") ;// 科目
|
|
|
|
|
|
+ String subject = formData.getString("selectField_m64i0kbn") ;// 科目
|
|
|
|
|
|
if (ArrayUtil.contains(PAYABLE_CLASSIFYS,subject)){
|
|
if (ArrayUtil.contains(PAYABLE_CLASSIFYS,subject)){
|
|
//获取其他应收款明细子表单数据
|
|
//获取其他应收款明细子表单数据
|
|
@@ -2977,7 +2973,7 @@ public class ZxtdReportServiceImpl implements ZxtdReportService {
|
|
// 数据预处理
|
|
// 数据预处理
|
|
for (Map map:list){
|
|
for (Map map:list){
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
- String subject = formData.getString("textField_lqyx5k16") ;// 科目
|
|
|
|
|
|
+ String subject = formData.getString("selectField_m64i0kbn") ;// 科目
|
|
|
|
|
|
if (ArrayUtil.contains(OTHER_PAYABLE_CLASSIFYS,subject)){
|
|
if (ArrayUtil.contains(OTHER_PAYABLE_CLASSIFYS,subject)){
|
|
//获取其他应收款明细子表单数据
|
|
//获取其他应收款明细子表单数据
|
|
@@ -3068,7 +3064,7 @@ public class ZxtdReportServiceImpl implements ZxtdReportService {
|
|
// 数据预处理
|
|
// 数据预处理
|
|
for (Map map:list){
|
|
for (Map map:list){
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
- String subject = formData.getString("textField_lqyx5k16") ;// 科目
|
|
|
|
|
|
+ String subject = formData.getString("selectField_m64i0kbn") ;// 科目
|
|
|
|
|
|
if (ArrayUtil.contains(OTHER_RECEIVABLE_CLASSIFYS,subject)){
|
|
if (ArrayUtil.contains(OTHER_RECEIVABLE_CLASSIFYS,subject)){
|
|
//获取其他应收款明细子表单数据
|
|
//获取其他应收款明细子表单数据
|
|
@@ -3159,7 +3155,7 @@ public class ZxtdReportServiceImpl implements ZxtdReportService {
|
|
// 数据预处理
|
|
// 数据预处理
|
|
for (Map map:list){
|
|
for (Map map:list){
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
JSONObject formData=JSONObject.parseObject(String.valueOf(map.get("formData")));
|
|
- String subject = formData.getString("textField_lqyx5k16") ;// 科目
|
|
|
|
|
|
+ String subject = formData.getString("selectField_m64i0kbn") ;// 科目
|
|
if (!"平台服务费".equals(subject) && !"技术服务费".equals(subject)){
|
|
if (!"平台服务费".equals(subject) && !"技术服务费".equals(subject)){
|
|
subject = "其他";
|
|
subject = "其他";
|
|
}
|
|
}
|