|
@@ -12,6 +12,7 @@ import com.platform.yijia.service.StationNoticeManageService;
|
|
import com.platform.yijia.service.StationOilGunService;
|
|
import com.platform.yijia.service.StationOilGunService;
|
|
import com.platform.yijia.service.StationService;
|
|
import com.platform.yijia.service.StationService;
|
|
import com.platform.yijia.utils.CodeMsg;
|
|
import com.platform.yijia.utils.CodeMsg;
|
|
|
|
+import com.platform.yijia.utils.FeiEPrinterUtil;
|
|
import com.platform.yijia.utils.ResultData;
|
|
import com.platform.yijia.utils.ResultData;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -31,6 +32,53 @@ public class StationController {
|
|
private StationOilGunService stationOilGunService;
|
|
private StationOilGunService stationOilGunService;
|
|
@Resource
|
|
@Resource
|
|
private AppUserInfoService appUserInfoService;
|
|
private AppUserInfoService appUserInfoService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * 新增打印机
|
|
|
|
+ * @param jsonObject
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "/addprinter", consumes = "application/json", method = RequestMethod.POST)
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public String addprinter(@RequestBody JSONObject jsonObject){
|
|
|
|
+ String snlist = jsonObject.getString("sn")+"#"+jsonObject.getString("key");
|
|
|
|
+ return FeiEPrinterUtil.addprinter(snlist);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * 班结打印
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping(value = "/printClassesSummary", consumes = "application/json", method = RequestMethod.POST)
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public String printClassesSummary(@RequestBody JSONObject jsonObject){
|
|
|
|
+ //打印机编号
|
|
|
|
+ String sn="";
|
|
|
|
+ //打印内容
|
|
|
|
+ String content;
|
|
|
|
+ content = "<CB>班结小票</CB><BR>";
|
|
|
|
+ content += "--------------------------------<BR>";
|
|
|
|
+ content += "油品 升数 金额 单数 优惠<BR>";
|
|
|
|
+ content += "--------------------------------<BR>";
|
|
|
|
+ content += "饭 1.0 1 1.0<BR>";
|
|
|
|
+ content += "炒饭 10.0 10 10.0<BR>";
|
|
|
|
+ content += "蛋炒饭 10.0 10 100.0<BR>";
|
|
|
|
+ content += "鸡蛋炒饭 100.0 1 100.0<BR>";
|
|
|
|
+ content += "番茄蛋炒饭 1000.0 1 100.0<BR>";
|
|
|
|
+ content += "西红柿蛋炒饭 1000.0 1 100.0<BR>";
|
|
|
|
+ content += "西红柿鸡蛋炒饭 100.0 10 100.0<BR>";
|
|
|
|
+ content += "备注:加辣<BR>";
|
|
|
|
+ content += "--------------------------------<BR>";
|
|
|
|
+ content += "合计:xx.0元<BR>";
|
|
|
|
+ content += "送货地点:广州市南沙区xx路xx号<BR>";
|
|
|
|
+ content += "联系电话:13888888888888<BR>";
|
|
|
|
+ content += "订餐时间:2016-08-08 08:08:08<BR>";
|
|
|
|
+ content += "<QR>http://www.dzist.com</QR>";
|
|
|
|
+ return FeiEPrinterUtil.printReceipt(sn, content);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 根据坐标获取油站列表
|
|
* 根据坐标获取油站列表
|
|
*/
|
|
*/
|