|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
import com.malk.server.aliwork.YDConf;
|
|
import com.malk.server.aliwork.YDConf;
|
|
import com.malk.server.aliwork.YDParam;
|
|
import com.malk.server.aliwork.YDParam;
|
|
import com.malk.server.common.McR;
|
|
import com.malk.server.common.McR;
|
|
|
|
+import com.malk.server.common.McREnum;
|
|
import com.malk.service.aliwork.YDClient;
|
|
import com.malk.service.aliwork.YDClient;
|
|
import com.malk.utils.UtilMap;
|
|
import com.malk.utils.UtilMap;
|
|
import com.malk.zhixingtongde.entity.Profit;
|
|
import com.malk.zhixingtongde.entity.Profit;
|
|
@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
+import java.io.File;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -28,9 +30,6 @@ public class ZxtdReportConroller {
|
|
@Autowired
|
|
@Autowired
|
|
private ZxtdReportService zxtdReportService;
|
|
private ZxtdReportService zxtdReportService;
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private YDClient ydClient;
|
|
|
|
-
|
|
|
|
@GetMapping("/test")
|
|
@GetMapping("/test")
|
|
public McR test(){
|
|
public McR test(){
|
|
return McR.success();
|
|
return McR.success();
|
|
@@ -42,7 +41,7 @@ public class ZxtdReportConroller {
|
|
}
|
|
}
|
|
|
|
|
|
//导出季度核算表
|
|
//导出季度核算表
|
|
- @GetMapping("/exportQuarterProfit")
|
|
|
|
|
|
+ @GetMapping("/exportQuarterProfit")
|
|
public void exportQuarterProfit(HttpServletResponse response,String year){
|
|
public void exportQuarterProfit(HttpServletResponse response,String year){
|
|
zxtdReportService.exportQuarterProfit(response,year);
|
|
zxtdReportService.exportQuarterProfit(response,year);
|
|
}
|
|
}
|
|
@@ -59,16 +58,47 @@ public class ZxtdReportConroller {
|
|
zxtdReportService.exportOtherReceivableDetails(response,year);
|
|
zxtdReportService.exportOtherReceivableDetails(response,year);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //导出应付账款明细表
|
|
|
|
+ @GetMapping("/exportPayableDetails")
|
|
|
|
+ public void exportPayableDetails(HttpServletResponse response,String year){
|
|
|
|
+ zxtdReportService.exportPayableDetails(response,year);
|
|
|
|
+ }
|
|
|
|
+
|
|
//导出其他应付款明细表
|
|
//导出其他应付款明细表
|
|
@GetMapping("/exportOtherPayableDetails")
|
|
@GetMapping("/exportOtherPayableDetails")
|
|
public void exportOtherPayableDetails(HttpServletResponse response,String year){
|
|
public void exportOtherPayableDetails(HttpServletResponse response,String year){
|
|
zxtdReportService.exportOtherPayableDetails(response,year);
|
|
zxtdReportService.exportOtherPayableDetails(response,year);
|
|
}
|
|
}
|
|
|
|
|
|
- //导出所有表
|
|
|
|
|
|
+ //导出资产负债表
|
|
|
|
+ @GetMapping("/exportLiabilitiesDetails")
|
|
|
|
+ public void exportBalanceSheet(HttpServletResponse response,String year){
|
|
|
|
+ zxtdReportService.exportLiabilitiesDetails(response,year);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //导出所有表(利润表、季度利润表、应收账款表、其他应收款表、应付账款表、其他应付款表)
|
|
@GetMapping("/exportAll")
|
|
@GetMapping("/exportAll")
|
|
public void exportAll(HttpServletResponse response,String year){
|
|
public void exportAll(HttpServletResponse response,String year){
|
|
zxtdReportService.exportAll(response,year);
|
|
zxtdReportService.exportAll(response,year);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //导出现金流量主表及附表
|
|
|
|
+ @GetMapping("/exportCash")
|
|
|
|
+ public void exportCash(HttpServletResponse response,String year) {
|
|
|
|
+ zxtdReportService.exportCash(response, year);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //上传文件至钉盘
|
|
|
|
+ @PostMapping("/uploadToDingTalk")
|
|
|
|
+ public McR uploadToDingTalk(HttpServletResponse response,String userId) {
|
|
|
|
+ try {
|
|
|
|
+ zxtdReportService.uploadToDingTalk(response,userId);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ return McR.error(McREnum.UNKNOWN_EXCEPTION.toString(),"上传文件至钉盘失败");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return McR.success();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|