添加打印机取餐码
This commit is contained in:
parent
10432eceb9
commit
c0cad47e51
|
|
@ -7,6 +7,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@CrossOrigin(origins = "*")
|
||||
@RestController
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ public class OrderDetailPO implements Serializable {
|
|||
|
||||
private String remark;
|
||||
|
||||
private String outNumber;
|
||||
|
||||
|
||||
@Data
|
||||
public static class Detail implements Serializable{
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ public class PrintMechineConsumer {
|
|||
if(ObjectUtil.isNotEmpty(detailList)&&detailList.size()>0){
|
||||
|
||||
OrderDetailPO detailPO = new OrderDetailPO(shopInfo.getShopName(), "普通打印", orderInfo.getTableName(), orderInfo.getOrderNo(), DateUtils.getTime(new Date(orderInfo.getCreatedAt())), "【POS-1】001", orderInfo.getOrderAmount().toPlainString(), balance, orderInfo.getPayType(), "0", detailList,orderInfo.getRemark());
|
||||
detailPO.setOutNumber(orderInfo.getOutNumber());
|
||||
String data= PrinterUtils.getCashPrintData(detailPO,"结算单");
|
||||
PrinterUtils.printTickets(1, Integer.valueOf(printerNum), tbPrintMachineWithBLOBs.getAddress(), data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.ReturnGroupOrderDto;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo;
|
||||
import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
||||
import com.chaozhanggui.system.cashierservice.model.PayReq;
|
||||
import com.chaozhanggui.system.cashierservice.model.TradeQueryReq;
|
||||
|
|
@ -962,7 +963,7 @@ public class PayService {
|
|||
|
||||
public Result getShopByMember(String userId,String shopId,int page,int pageSize){
|
||||
PageHelper.startPage(page, pageSize);
|
||||
List<Map<String,Object>> list= tbShopUserMapper.selectByUserId(userId,shopId);
|
||||
List<ShopUserListVo> list= tbShopUserMapper.selectByUserId(userId,shopId);
|
||||
PageInfo pageInfo=new PageInfo(list);
|
||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ public class PrinterUtils {
|
|||
sb.append("<S>余额:"+detailPO.getBalance()+"</S><BR>");
|
||||
sb.append("------------------------<BR>");
|
||||
|
||||
if(Objects.nonNull(detailPO.getOutNumber())){
|
||||
sb.append("<QR>".concat(detailPO.getOutNumber()).concat("</QR><BR>"));
|
||||
}
|
||||
|
||||
sb.append("<S>打印时间:"+DateUtils.getTime(new Date())+"</S><BR>");
|
||||
|
||||
sb.append("<OUT:180>");
|
||||
|
|
|
|||
Loading…
Reference in New Issue