Commit 4865592f by guojuxing

申请开票发送短信

parent 0ab7c85c
......@@ -183,6 +183,7 @@ public class BillingPayInfoController {
InvoiceManageDTO params = new InvoiceManageDTO();
params.setPlatformType(EnterprisePlatformTypeEnum.GIC.getCode());
params.setInvoiceType(invoiceType);
params.setInitiator(UserDetailUtils.getUserDetail().getUserId().toString());
params.setBillingAmount(billingAmount);
params.setEnterpriseId(enterpriseId);
params.setEnterpriseName(userDetail.getEnterpriseInfo().getEnterpriseName());
......
package com.gic.enterprise.web.controller.wm;
import java.io.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 同步门店to微盟
* @ClassName: WmStoreSyncController

* @Description: 

* @author guojuxing

* @date 2020/5/8 11:19 AM

*/
@RestController
@RequestMapping("/wm-store-sync")
public class WmStoreSyncController {
private static final Logger LOGGER = LogManager.getLogger(WmStoreSyncController.class);
/**
*
* @param request
* @param response
* @throws IOException
*/
@RequestMapping("wm-store-import-template")
public void wmStoreImportTemplate(HttpServletRequest request, HttpServletResponse response)
throws IOException {
String fileName = " 门店同步模板.xls";
OutputStream fo = null;
InputStream in = null;
try {
response.setContentType("text/html;charset=gbk");
response.setHeader("Content-Disposition",
"attachment; filename=" + new String(fileName.getBytes("gbk"), "ISO-8859-1"));
fo = response.getOutputStream();
String rootPath = request.getSession().getServletContext().getRealPath("/");
String filePath = "/exceltemplate/wm_store_import_template.xls";
in = new FileInputStream(new File(rootPath + filePath));
byte[] b = new byte[1024];
int len = 0;
while ((len = in.read(b)) != -1) {
fo.write(b, 0, len);
}
fo.flush();
} catch (Exception e) {
e.printStackTrace();
} finally {
if (fo != null) {
fo.close();
}
if (in != null) {
in.close();
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment