Merge remote-tracking branch 'origin/master'

# Conflicts:
#	fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/controller/printerController.java
#	fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/service/impl/PrinterServiceImpl.java
This commit is contained in:
齐天大圣 2024-05-30 16:07:17 +08:00
commit 6b07a13ce2
40 changed files with 2676 additions and 162 deletions

View File

@ -140,26 +140,26 @@ public class FyPayController {
String orderLock = "orderLock_notify"+orderNo;
if (redisLock.tryLock(orderLock,5000, TimeUnit.MILLISECONDS)){
// 业务逻辑 判断订单状态
// AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
// if (ObjectUtil.isNotEmpty(allOrderInfo)){
// allOrderInfo.setPayMoney(Double.valueOf(settleOrderAmt)/100);
// allOrderInfo.setTransactionId(transactionId);
// allOrderInfo.setStatus("paid");
// allOrderInfo.setPayTime(new Date());
// allOrderInfoService.updateAllOrderInfo(allOrderInfo);
//
// // 修改配置收款账户余额信息
// MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(allOrderInfo.getStoreId());
// Double beforeAmount = merchantConfig.getAmount();
// Double afterAmount = beforeAmount + allOrderInfo.getPayMoney();
// merchantConfig.setAmount(afterAmount);
// merchantConfigService.updateMerch(merchantConfig);
// merchantConfigRecordService.updateMerchantConfigRecordByOrderNo(orderNo,"yes");
// }
//
// updateOrderStatus(orderNo,allOrderInfo.getType());
//// 修改订单支付状态
// redisLock.unlock(orderLock);
AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
if (ObjectUtil.isNotEmpty(allOrderInfo)){
allOrderInfo.setPayMoney(Double.valueOf(settleOrderAmt)/100);
allOrderInfo.setTransactionId(transactionId);
allOrderInfo.setStatus("paid");
allOrderInfo.setPayTime(new Date());
allOrderInfoService.updateAllOrderInfo(allOrderInfo);
// 修改配置收款账户余额信息
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIdIsUse(allOrderInfo.getStoreId());
Double beforeAmount = merchantConfig.getAmount();
Double afterAmount = beforeAmount + allOrderInfo.getPayMoney();
merchantConfig.setAmount(afterAmount);
merchantConfigService.updateMerch(merchantConfig);
merchantConfigRecordService.updateMerchantConfigRecordByOrderNo(orderNo,"yes");
}
updateOrderStatus(orderNo,allOrderInfo.getType());
// 修改订单支付状态
redisLock.unlock(orderLock);
}
// transaction_id 加锁
return "1";

View File

@ -50,8 +50,8 @@ public class Const {
//小程序异步通知(回调地址)
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
public static String notify_url = "http://k40180f897.goho.co/api/fyPay/notify";
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
// public static String notify_url = "http://k40180f897.goho.co/api/fyPay/notify";
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
//主扫异步通知(回调地址)
// public static String notify_url_scan = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notifyScan";

View File

@ -839,6 +839,7 @@ public class FyPayServiceImpl implements FyPayService {
map.put("random_str", "orderNo");
map.put("order_type", receiveParameterPos.getPayType());
map.put("goods_des", receiveParameterPos.getContent());
map.put("goods_detail", receiveParameterPos.getContent());
double amount = receiveParameterPos.getGoodsMoney() * 100;
map.put("order_amt", String.valueOf((int) amount));
String nowtime = DateUtil.format(new Date(), "yyyyMMddHHmmss");
@ -849,6 +850,18 @@ public class FyPayServiceImpl implements FyPayService {
Const.INS_PUBLIC_KEY = publicKey;
Const.INS_PRIVATE_KEY = privateKey;
if (ObjectUtil.isNotEmpty(merchantConfig)) {
// 添加配置记录信息
MerchantConfigRecord merchantConfigRecord = new MerchantConfigRecord();
merchantConfigRecord.setMerchantId(merchantConfig.getId());
merchantConfigRecord.setIsSuccess("no");
merchantConfigRecord.setAmount(receiveParameterPos.getGoodsMoney());
merchantConfigRecord.setType("0");
merchantConfigRecord.setStoreId(merchantConfig.getStoreId());
merchantConfigRecord.setOrderNo(receiveParameterPos.getOrderNo());
merchantConfigRecordService.insertMerchantConfigRecord(merchantConfigRecord);
}
// 请求报文
String reqBody = Message.requestMsg(map);
// 响应报文
@ -859,6 +872,13 @@ public class FyPayServiceImpl implements FyPayService {
String str = resMap.get("sign");
if (Utils.verifySign(resMap, str)) {
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(receiveParameterPos.getOrderNo());
ReceiveParameter receiveParameter = new ReceiveParameter();
BeanUtils.copyProperties(receiveParameterPos, receiveParameter);
// 添加订单信息
Double discountAmount = 0.0;
if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount();
this.insertAllOrderInfo(receiveParameter, discountAmount);
System.out.println(resMap);
}
return resMap;

View File

@ -211,6 +211,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
cardFuelRecordDTO.setStoreId(nowAccountInfo.getStoreId());
cardFuelRecordDTO.setChainStoreId(nowAccountInfo.getChainStoreId());
cardFuelRecordDTO.setPayAmount(cardFuelRecordDTO.getRechargeBalance());
cardFuelRecordDTO.setMtStaffId(nowAccountInfo.getStaffId());
LambdaQueryWrapper<CardFuelRecord> queryWrapper = new LambdaQueryWrapper<>();

View File

@ -81,6 +81,13 @@ public class HandoverRecordController extends BaseController {
return getSuccessResult(this.handoverRecordService.insert(handoverRecord));
}
@PostMapping("addByPos")
public ResponseObject addByPos(@RequestBody HandoverRecord handoverRecord) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
handoverRecord.setStaffId(nowAccountInfo.getStaffId());
return getSuccessResult(this.handoverRecordService.insert(handoverRecord));
}
/**
* 编辑数据
*

View File

@ -342,4 +342,14 @@ public class OilOrderController extends BaseController {
public ResponseObject addOrderPos(@RequestBody OilOrderVo oilOrderVo) throws Exception {
return getSuccessResult(orderService.addOrderPos(oilOrderVo));
}
/**
* pos端扫码支付
* @param oilOrderVo
* @return
*/
@PostMapping("addOrderScanPos")
public ResponseObject addOrderScanPos(@RequestBody OilOrderVo oilOrderVo) throws Exception {
return getSuccessResult(orderService.addOrderPosScan(oilOrderVo));
}
}

View File

@ -28,6 +28,7 @@ public class HandoverRecord extends BaseEntity {
* 交班数据记录
*/
private String recordData;
@TableField(exist = false)
private String totalPayMoney;
private String staffName;

View File

@ -319,7 +319,16 @@
SUM(CASE WHEN aoi.content = '储值卡订单' THEN pay_money ELSE 0 END) AS userBalance,
COUNT(CASE WHEN aoi.content = '储值卡订单' THEN 0 END) AS userBalanceCount,
SUM(CASE WHEN aoi.content = '油品充值' THEN pay_money ELSE 0 END) AS oilBalance,
COUNT(CASE WHEN aoi.content = '油品充值' THEN 0 END) AS oilBalanceCount
COUNT(CASE WHEN aoi.content = '油品充值' THEN 0 END) AS oilBalanceCount,
SUM(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'WECHAT' THEN pay_money ELSE 0 END) AS userBalanceByWechat,
COUNT(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'WECHAT' THEN 0 END) AS userBalanceCountByWechat,
SUM(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'ALIPAY' THEN pay_money ELSE 0 END) AS userBalanceByAli,
COUNT(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'ALIPAY' THEN 0 END) AS userBalanceCountByali
from all_order_info aoi
left join mt_user mu ON aoi.user_id = mu.id
<where>
@ -376,21 +385,29 @@
all_order_info
<where>
staff_id = #{staffId}
<if test="startTime != null and startTime != ''">
AND start_time >= #{startTime} -- 开始时间检索
</if>
<if test="endTime != null and endTime != ''">
AND end_time &lt;= #{endTime} -- 结束时间检索
</if>
<if test="startTime != null "><!-- 开始时间检索 -->
and date_format(pay_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
</if>
<if test="endTime != null "><!-- 结束时间检索 -->
and date_format(pay_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if>
</where>
</select>
<!-- WHERE-->
<!-- DATE(pay_time) = CURDATE();-->
<!-- <if test="startTime != null and startTime != ''">&lt;!&ndash; 开始时间检索 &ndash;&gt;-->
<!-- and date_format(start_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')-->
<!-- <if test="startTime != null ">&lt;!&ndash; 开始时间检索 &ndash;&gt;-->
<!-- and date_format(pay_time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')-->
<!-- </if>-->
<!-- <if test="endTime != null and endTime != ''">&lt;!&ndash; 结束时间检索 &ndash;&gt;-->
<!-- and date_format(end_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')-->
<!-- <if test="endTime != null ">&lt;!&ndash; 结束时间检索 &ndash;&gt;-->
<!-- and date_format(pay_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')-->
<!-- </if>-->
<!-- <if test="startTime1 != null and startTime1 != ''">-->
<!-- AND pay_time >= #{startTime1} &#45;&#45; 开始时间检索-->
<!-- </if>-->
<!-- <if test="endTime1 != null and endTime1 != ''">-->
<!-- AND pay_time &lt;= #{endTime} &#45;&#45; 结束时间检索-->
<!-- </if>-->
</mapper>

View File

@ -222,5 +222,5 @@ public interface OilOrderService extends IService<OilOrder> {
* @param oilOrderVo
* @return
*/
Map<String, String> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception;
Map<String, Object> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception;
}

View File

@ -100,6 +100,11 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
record.setOilName(oilName.getOilName());
record.setShengshu(oilOrder.getOilNum());
}
//
if (ObjectUtil.isNotEmpty(record.getUserId())) {
MtUser mtUser = mtUserMapper.queryMemberById(record.getUserId());
record.setAvatar(mtUser.getAvatar());
}
}
return pageList;
}
@ -938,7 +943,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
@Override
// 获取经营数据
public AllOrderInfoVo getOperatingDataPos(AllOrderInfoDto allOrderInfo){
AllOrderInfoVo tradingData = allOrderInfoMapper.getTradingData(allOrderInfo);
Integer storeId = TokenUtil.getNowAccountInfo().getStoreId();
long l = Long.parseLong(storeId.toString());
ArrayList<Long> longs = new ArrayList<>();
longs.add(l);
allOrderInfo.setStoreIds(longs);
// AllOrderInfoVo tradingData = allOrderInfoMapper.getTradingData(allOrderInfo);
return allOrderInfoMapper.getTradingData(allOrderInfo);
}

View File

@ -11,6 +11,7 @@ import com.fuint.business.order.mapper.AllOrderInfoMapper;
import com.fuint.business.order.mapper.HandoverRecordMapper;
import com.fuint.business.order.service.AllOrderInfoService;
import com.fuint.business.order.service.HandoverRecordService;
import com.fuint.business.order.vo.AllOrderInfoVo;
import com.fuint.business.store.entity.MtStore;
import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.mapper.LJUserMapper;
@ -83,14 +84,14 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
for (HandoverRecord record : handoverRecordIPage.getRecords()) {
DateTime dateTime = DateTime.of(record.getStartTime());
DateTime dateTime1 = DateTime.of(record.getEndTime());
record.setEndTime1(dateTime.toString());
record.setStartTime1(dateTime1.toString());
allOrderInfoMapper.getHandOverList(record);
record.setTotalPayMoney(record.getTotalPayMoney());
// DateTime dateTime = DateTime.of(record.getStartTime());
// DateTime dateTime1 = DateTime.of(record.getEndTime());
// record.setEndTime1(dateTime.toString());
// record.setStartTime1(dateTime1.toString());
AllOrderInfoVo handOverList = allOrderInfoMapper.getHandOverList(record);
record.setTotalPayMoney(handOverList.getTotalPayMoney());
}
return this.handoverRecordMapper.queryAllByLimit(page, handoverRecord);
return handoverRecordIPage;
}
@Override

View File

@ -1727,7 +1727,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
int row = 0;
OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
Integer userId = oilOrder.getUserId();
LJUser user = userService.queryUserByUserId(userId);
LJUser user = null;
if (ObjectUtil.isNotEmpty(userId)) user = userService.queryUserByUserId(userId);
if (ObjectUtil.isNotEmpty(oilOrder)) {
// oilOrder.setPayAmount(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount());
oilOrder.setOrderStatus(status);
@ -1781,14 +1782,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cardValueChildOrder.setPayTime(new Date());
cardValueChildOrderService.updateCardValueChildOrder(cardValueChildOrder);
if (ObjectUtil.isNotEmpty(user)) {
// 查询主卡信息
CardValudChildrens cardValudChildrens = cardValudChildrensService.selectCardValueChildrenByMobileAndStoreId(user.getMobile(), oilOrder.getStoreId());
userId = cardValudChildrens.getUserId();
CardValudChildrens cardValudChildrens = cardValudChildrensService.selectCardValueChildrenByMobileAndStoreId(user.getMobile(), oilOrder.getStoreId());
userId = cardValudChildrens.getUserId();
}
}
this.updateGrowthValue(oilOrder.getOrderAmount(), oilOrder.getPayAmount(), userId, Integer.valueOf(oilOrder.getOils()), null, oilOrder.getStoreId(), orderNo);
if (ObjectUtil.isNotEmpty(userId)) this.updateGrowthValue(oilOrder.getOrderAmount(), oilOrder.getPayAmount(), userId, Integer.valueOf(oilOrder.getOils()), null, oilOrder.getStoreId(), orderNo);
this.addOilTracks(oilOrder, oilOrder.getStoreId());
this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), Integer.valueOf(oilOrder.getOils()));
this.insertCardBalance(oilOrder.getOrderAmount() - oilOrder.getDiscountAmount() - oilOrder.getPayAmount(), userId, oilOrder.getStoreId(), orderNo);
if (ObjectUtil.isNotEmpty(userId)) this.insertCardBalance(oilOrder.getOrderAmount() - oilOrder.getDiscountAmount() - oilOrder.getPayAmount(), userId, oilOrder.getStoreId(), orderNo);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId()))
staffCommissionService.countStaffCommission(oilOrder.getStaffId(), oilOrder.getStoreId(), oilOrder.getOrderAmount(), oilOrder.getPayAmount(), "1", orderNo);
}
@ -2385,7 +2388,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.addOilTracks(oilOrderVo, nowAccountInfo.getStoreId());
this.updateCardAndActiveById(nowAccountInfo.getStoreId(), oilOrderVo.getUserId(), oilOrderVo.getActiveId(), oilOrderVo.getCouponId(), oilOrderVo.getActiveType(), oilOrderVo.getOrderAmount(), oilOrderVo.getPayAmount(), Integer.valueOf(oilOrderVo.getOils()));
this.insertAllOrderInfo(orderNo, nowAccountInfo.getStoreId(), oilOrderVo.getOrderAmount(), oilOrderVo.getPayAmount(), oilOrderVo.getDiscountAmount(), oilOrderVo.getPayType(), oilOrderVo.getUserId(), "POS", "1", "paid");
this.insertFavorable(oilOrderVo, oilOrderVo.getOilCardAmount());
this.insertFavorable(oilOrderVo, oilOrderVo.getOilCardAmount1());
if (ObjectUtil.isNotEmpty(oilOrderVo.getUserId())) integralSettingsService.refuelPoints(oilOrderVo);
//修改优惠券使用状态
if (oilOrderVo.getCouponId() != null) {
@ -2406,8 +2409,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
}
@Override
public Map<String, String> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception {
Map<String, String> res = new HashMap<>();
public Map<String, Object> addOrderPosScan(OilOrderVo oilOrderVo) throws Exception {
Map<String, Object> res = new HashMap<>();
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
// 根据日期生成订单信息
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
@ -2415,23 +2418,34 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
String randomString = UUID.randomUUID().toString().replace("-", "").substring(0, 6);
String orderNo = "2345" + timestamp + randomString;
oilOrderVo.setOrderNo(orderNo);
oilOrderVo.setStoreId(nowAccountInfo.getStoreId());
oilOrderVo.setStaffId(nowAccountInfo.getStaffId());
oilOrderVo.setTerminal("POS");
oilOrderVo.setOrderStatus("unpaid");
oilOrderVo.setOrderType("主订单");
int row = baseMapper.insert(oilOrderVo);
if (ObjectUtil.isNotEmpty(oilOrderVo.getOrderNo())){
OilOrder oilOrder = this.selectOilOrderByOrderNo(oilOrderVo.getOrderNo());
oilOrderVo.setId(oilOrder.getId());
oilOrderVo.setOrderNo(orderNo);
baseMapper.updateById(oilOrderVo);
}else {
oilOrderVo.setOrderNo(orderNo);
baseMapper.insert(oilOrderVo);
}
ReceiveParameterPos receiveParameterPos = new ReceiveParameterPos();
// receiveParameterPos.setPayType("WECHAT");
receiveParameterPos.setPayType(oilOrderVo.getPayType());
receiveParameterPos.setType("1");
receiveParameterPos.setContent("油品订单");
receiveParameterPos.setOrderNo(orderNo);
receiveParameterPos.setStoreId(oilOrderVo.getStoreId());
receiveParameterPos.setStoreId(oilOrderVo.getUserId());
receiveParameterPos.setUserId(oilOrderVo.getUserId());
receiveParameterPos.setGoodsMoney(oilOrderVo.getPayAmount());
receiveParameterPos.setOilCardAmount(oilOrderVo.getOilCardAmount1());
Map<String, String> mainScan = fyPayService.mainScan(receiveParameterPos);
return mainScan;
res.put("oilOrder",this.selectOilOrderByOrderNo(orderNo));
res.put("scanCode",mainScan);
return res;
}
}

View File

@ -24,6 +24,7 @@ public class AllOrderInfoVo extends AllOrderInfo {
private String strokesPerDay;
private String storeCount ;
private String inertiaStore;
private String avatar;
@ -55,6 +56,11 @@ public class AllOrderInfoVo extends AllOrderInfo {
private String totalCount;
private String totalRefund;
private String userBalanceByWechat;
private String userBalanceCountByWechat;
private String userBalanceByAli;
private String userBalanceCountByali;

View File

@ -0,0 +1,319 @@
package com.fuint.business.printer.controller;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.internal.util.codec.Base64;
import com.fuint.business.printer.entity.Test;
import com.fuint.business.printer.service.PrinterService;
import com.fuint.business.printer.template.*;
import com.fuint.business.printer.unit.Methods;
import com.fuint.business.printer.vo.OrderPayment;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.Constants;
import com.fuint.common.util.RedisUtil;
import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
//import com.yly.print_sdk_librar.RequestMethod;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import javax.annotation.Resource;
import javax.crypto.Cipher;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.Signature;
import java.security.spec.X509EncodedKeySpec;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/business/printer")
//@EnableWebMvc
@Slf4j
public class printerController extends BaseController {
@Resource
PrinterService printerService;
@GetMapping("callback")
public Map<String, String> callback(Map<String , String> map){
log.info("------print/callback-------");
Map<String, String> objectObjectHashMap = new HashMap<>();
objectObjectHashMap.put("message","ok");
return objectObjectHashMap;
}
@GetMapping("push")
public Map<String, String> push( Map<String , String> map){
log.info("------接收GET回调-------");
Map<String, String> objectObjectHashMap = new HashMap<>();
objectObjectHashMap.put("message","ok");
return objectObjectHashMap;
}
@PostMapping("push")
public Map<String, String> PostPush(
@RequestParam("ciphertext") String ciphertext,
@RequestParam("nonce") String nonce,
@RequestParam("tag") String tag,
@RequestParam("additional_data") String additional_data,
@RequestParam("iv") String iv,
@RequestParam("signature") String signature){
log.info("------push-------");
return printerService.PostPush(ciphertext,nonce,tag,additional_data,iv,signature);
}
@GetMapping("returnCode")
public ResponseObject returnCode(String payAmount) {
return getSuccessResult(printerService.returnCode(payAmount));
}
//
// public static final String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuiQQsY9lbZhtRoZIaBVN\n" +
// "XKuAme47UCUv3RG2AYJXKQ/TyXBBY0JULSf4637Ug7JqGR1ohHFpY9XotG5J/7Ne\n" +
// "safQApAz8QHKOa6+jqS0edafegjE7P0KqfQWvjUIbhAl5iXmiGLA/R6zLXxk8+PU\n" +
// "toRu1rmzMPCsbGRG0uHOZ0nYez1LSM4k4k8o4/dl7NDr2CqXrfYQCEvGAAJay/bg\n" +
// "h1B05cqFNuhQGvv55EX377QVZX7V0ZipIZhlzoh8pA0ZpzW/KndZ+pRYw6cPLvey\n" +
// "qymRnTlCSQUDYQRlxaDppPbZcU1Krb9tZUmhJp+R9l73tJX8yN5wzbq6HATZbD1v\n" +
// "BwIDAQAB";
// @GetMapping("getToken")
// public ResponseObject getToken(){
//// Methods.()
// //初始化控制器类
// Methods m=Methods.getInstance();
// //初始化终端信息
// m.init("1038835098", "1595cb28ea30e98908e6334e735f4b8a");
// //获取token
// m.getFreedomToken();
// System.out.println("123123123123123");
// return getSuccessResult("");
// }
private static final String APP_KEY = "1073000501";
private static final String APP_SECRET = "e0292ae66d9d21feaa895370d3a875aa";
// 授权
@GetMapping("scancodemodel")
public ResponseObject scancodemodel(){
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
String token = printerService.getToken(nowAccountInfo.getStoreId());
// String token = printerService.getToken(138);
return getSuccessResult(token);
}
// 发起网络支付
@GetMapping("printIndex")
public ResponseObject printIndex(BigDecimal payAmount) {
// Methods m=Methods.getInstance();
// m.init("26845ee50f13467cacbaa099489a2fc152abd6f5");
//
// m.init(APP_KEY, APP_SECRET);
//
//// m.addPrinter("4004872261", "628023865417");
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
// HashMap<String, String> objectObjectHashMap = new HashMap<>();
//// <JSON>{"order_payment":{"pay_amount":"支付金额","pay_amount_source":3},"processed_state":0}</JSON>
//
//
// Map<String, Object> orderPaymentMap = new HashMap<>();
// orderPaymentMap.put("pay_amount", payAmount);
//// orderPaymentMap.put("pay_amount", 0.01);
// orderPaymentMap.put("pay_amount_source", 3);
//
// Map<String, Integer> processedStateMap = new HashMap<>();
// processedStateMap.put("processed_state", 0);
//
// Map<String, Object> jsonDataMap = new HashMap<>();
// jsonDataMap.put("order_payment", orderPaymentMap);
// jsonDataMap.putAll(processedStateMap);
//
// Gson gson = new GsonBuilder().setPrettyPrinting().create();
// String json = gson.toJson(jsonDataMap);
//
// String a = "<JSON>"+json+"</JSON>";
// log.info("json:{}",a);
//
// String url=m.print("4004872261",a, System.currentTimeMillis()+random6.toString());
//
// // 使用 Fastjson JSON 字符串解析为 JSONObject
// JSONObject jsonObject = JSON.parseObject(url);
//
// // JSONObject 转换为 Map
// Map<String, Object> map = jsonObject.getInnerMap();
// //获取支付参数
// log.info("url:{}",url);
// return getSuccessResult(map.get("error_description"));
String s = printerService.printIndex(payAmount, TokenUtil.getNowAccountInfo().getStoreId());
return getSuccessResult(s);
}
@GetMapping("doGet")
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Methods m=Methods.getInstance();
// m.init(APP_KEY,APP_SECRET);
m.init("26845ee50f13467cacbaa099489a2fc152abd6f5");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
//测试数据
List<Test> testList = new ArrayList<Test>();
Test t1 = new Test("麻辣牛肉", 23.00, 1,"1");
Test t2 = new Test("麻辣牛肉", 23.00, 2,"2");
Test t3 = new Test("精品千层肚", 24.00, 3,"3");
Test t4 = new Test("麻辣牛肉", 23.00, 2,"1");
Test t5 = new Test("极品鲜毛肚", 26.00, 2,"1");
Test t6 = new Test("极品鲜毛肚", 26.00, 1,"2");
Test t7 = new Test("极品鲜毛肚", 26.00, 3,"2");
Test t8 = new Test("极品鲜毛肚", 26.00, 1,"1");
Test t9 = new Test("极品鲜毛肚", 26.00, 2,"3");
testList.add(t1);
testList.add(t2);
testList.add(t3);
testList.add(t4);
testList.add(t5);
testList.add(t6);
testList.add(t7);
testList.add(t8);
testList.add(t9);
Prient.setTestList(testList);
//关键代码自己的程序发送请求
//初始化控制器类
// Methods m=Methods.getInstance();
//初始化终端信息
m.init(APP_KEY, APP_SECRET);
//获取token
// m.getFreedomToken();
//刷新token
// m.refreshToken();
//添加授权
m.addPrinter("4004872261", "628023865417");
//打印
//终端编号 打印内容 订单号
//生成6位随机数
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print("4004872261", Prient.print(), "Z"+System.currentTimeMillis()+random6.toString());
response.sendRedirect(url);
out.flush();
out.close();
}
@PostMapping("getHandover")
public void getHandover(@RequestBody Map<String, Object> handover) {
// Methods m=Methods.getInstance();
// m.init("26845ee50f13467cacbaa099489a2fc152abd6f5");
//
// m.init(APP_KEY, APP_SECRET);
// Handover.setHandover(handover);
// // m.addPrinter("4004872261", "628023865417");
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
// String url=m.print("4004872261", Handover.printHandover(), "Z"+System.currentTimeMillis()+random6.toString());
printerService.getHandover(handover,TokenUtil.getNowAccountInfo().getStoreId());
}
/**
* 收银台商品打印
* @param oilOrder
*/
@PostMapping("printOilOrderReport")
public void oilOrderReport(@RequestBody Map<String, Object> oilOrder) {
// log.info("handover:{}",handover.toString());
// Methods m=Methods.getInstance();
// m.init("26845ee50f13467cacbaa099489a2fc152abd6f5");
//
// m.init(APP_KEY, APP_SECRET);
// PrintOilOrderReport.setHandover(handover);
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
// String url=m.print("4004872261", PrintOilOrderReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
printerService.oilOrderReport(oilOrder,TokenUtil.getNowAccountInfo().getStoreId());
}
@PostMapping("rePrintOilOrderReport")
public void reOilOrderReport(@RequestBody Map<String, Object> oilOrder) {
printerService.reOilOrderReport(oilOrder,TokenUtil.getNowAccountInfo().getStoreId());
}
/**
* 余额充值订单
* @param cardValue
*/
@PostMapping("printCardValueReport")
public void printCardValueReport(@RequestBody Map<String, Object> cardValue) {
// log.info("handover:{}",cardValue.toString());
// Methods m=Methods.getInstance();
// m.init("26845ee50f13467cacbaa099489a2fc152abd6f5");
//
// m.init(APP_KEY, APP_SECRET);
// PrintCardValueReport.setHandover(cardValue);
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
// String url=m.print("4004872261", PrintCardValueReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
printerService.printCardValueReport(cardValue, TokenUtil.getNowAccountInfo().getStoreId());
}
/**
* 油卡充值订单
* @param fuelDiesel
*/
@PostMapping("printFuelDieselReport")
public void printFuelDieselReport(@RequestBody Map<String, Object> fuelDiesel) {
// log.info("handover:{}",fuelDiesel.toString());
// Methods m=Methods.getInstance();
// m.init("26845ee50f13467cacbaa099489a2fc152abd6f5");
//
// m.init(APP_KEY, APP_SECRET);
// PrintFuelDieselReport.setHandover(fuelDiesel);
// Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
// String url=m.print("4004872261", PrintFuelDieselReport.printFeulOrder(), "Z"+System.currentTimeMillis()+random6.toString());
printerService.printFuelDieselReport(fuelDiesel,TokenUtil.getNowAccountInfo().getStoreId());
}
@PostMapping("printIntegralReport")
public void printIntegralReport(@RequestBody Map<String, Object> integral) {
printerService.printIntegralReport(integral,TokenUtil.getNowAccountInfo().getStoreId());
}
@GetMapping("posPrinter")
public void posPrinter() {
// printRegisterReceiver();
// Intent intent=new Intent();
//
// new ComponentName();
}
}

View File

@ -0,0 +1,480 @@
package com.fuint.business.printer.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.internal.util.codec.Base64;
import com.fuint.business.printer.entity.PrintDeviceInfo;
import com.fuint.business.printer.mapper.PrintDeviceInfoMapper;
import com.fuint.business.printer.service.PrintDeviceInfoService;
import com.fuint.business.printer.service.PrinterService;
import com.fuint.business.printer.template.*;
import com.fuint.business.printer.unit.Methods;
import com.fuint.business.printer.vo.OrderPayment;
import com.fuint.common.util.RedisUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.yly.print_sdk_library.RequestMethod;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import javax.annotation.Resource;
import javax.crypto.Cipher;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.Signature;
import java.security.spec.X509EncodedKeySpec;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@Service
public class PrinterServiceImpl implements PrinterService {
private static String code = new String();
public static final String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuiQQsY9lbZhtRoZIaBVN\n" +
"XKuAme47UCUv3RG2AYJXKQ/TyXBBY0JULSf4637Ug7JqGR1ohHFpY9XotG5J/7Ne\n" +
"safQApAz8QHKOa6+jqS0edafegjE7P0KqfQWvjUIbhAl5iXmiGLA/R6zLXxk8+PU\n" +
"toRu1rmzMPCsbGRG0uHOZ0nYez1LSM4k4k8o4/dl7NDr2CqXrfYQCEvGAAJay/bg\n" +
"h1B05cqFNuhQGvv55EX377QVZX7V0ZipIZhlzoh8pA0ZpzW/KndZ+pRYw6cPLvey\n" +
"qymRnTlCSQUDYQRlxaDppPbZcU1Krb9tZUmhJp+R9l73tJX8yN5wzbq6HATZbD1v\n" +
"BwIDAQAB";
@Resource
PrintDeviceInfoService printDeviceInfoService;
@Resource
PrintDeviceInfoMapper printDeviceInfoMapper;
@Override
public Map<String, String> PostPush(String ciphertext, String nonce, String tag, String additional_data, String iv, String signature) {
System.out.println("PostMapping"+ciphertext);
code = new String();
Map<String, String> objectObjectHashMap = new HashMap<>();
objectObjectHashMap.put("message","ok");
verifySign(ciphertext,signature);
try {
String decrypte = decrypte(ciphertext, iv, tag);
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(decrypte);
log.info("--回调支付--{}",jsonObject);
// JSONObject 转换为 Map
Map<String, Object> map = jsonObject.getInnerMap();
//获取支付参数
// Map<String, Object> orderPaymentMap = (Map<String, Object>) map.get("order_payment");
Map<String, Object> orderPaymentMap = (Map<String, Object>) map.get("order_other");
log.info("--回调支付--{}",orderPaymentMap.get("scanned_code").toString());
OrderPayment orderPayment = new OrderPayment();
// orderPayment.setOrderPayment(orderPaymentMap.get("pay_amount").toString());
orderPayment.setScannedCode(orderPaymentMap.get("scanned_code").toString());
// RedisUtil.set(orderPaymentMap.get("scanned_code").toString(), orderPaymentMap.get("pay_amount").toString(), 100);
RedisUtil.set(orderPaymentMap.get("scanned_code").toString(), 100);
code = orderPaymentMap.get("scanned_code").toString();
log.info("--获取打印回调--{}",jsonObject);
} catch (Exception e) {
throw new RuntimeException(e);
}
return objectObjectHashMap;
}
@Override
public String returnCode(String payAmount) {
String thisCode = code;
code = new String();
if (ObjectUtil.isEmpty(thisCode)) {
return "300";
}
// if (RedisUtil.get(thisCode)) {
return thisCode;
// }else {
// return getSuccessResult("301");
// }
}
@Override
public String getToken(Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
if (ObjectUtil.isEmpty(infoByStoreId)){
return "error";
}
RequestMethod.getInstance().init(infoByStoreId.getAppKey(),infoByStoreId.getAppSecret());
try {
// String resJson = RequestMethod.getInstance().scanCodeModel_msign("4004872261", "628023865417");
String resJson = RequestMethod.getInstance().scanCodeModel_msign(infoByStoreId.getMachineCode(), infoByStoreId.getMsign());
log.info("--yilianyunAccessToken--{}",resJson);
JSONObject jsonObject = JSONObject.parseObject(resJson);
String errorDescription = jsonObject.getString("error_description"); // success
if ("success".equals(errorDescription)) {
JSONObject body = jsonObject.getJSONObject("body");
String accessToken = body.getString("access_token");
RedisUtil.set("scancodemodel+"+storeId,accessToken,60*60*24);
return accessToken;
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
return "error";
}
@Override
public String printIndex(BigDecimal payAmount,Integer storeId){
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
}
}
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
// HashMap<String, String> objectObjectHashMap = new HashMap<>();
Map<String, Object> orderPaymentMap = new HashMap<>();
orderPaymentMap.put("pay_amount", payAmount.toString());
// orderPaymentMap.put("pay_amount", 0.01);
orderPaymentMap.put("pay_amount_source", 3);
Map<String, Integer> processedStateMap = new HashMap<>();
processedStateMap.put("processed_state", 0);
Map<String, Object> jsonDataMap = new HashMap<>();
jsonDataMap.put("order_payment", orderPaymentMap);
jsonDataMap.putAll(processedStateMap);
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String json = gson.toJson(jsonDataMap);
String jsonData = "<JSON>"+json+"</JSON>";
// String jsonData = "<JSON>{\"order_payment\":{\"pay_amount\":\"1\",\"pay_amount_source\":3},\"processed_state\":0}</JSON>";
log.info("json:{}",jsonData);
String url=m.print(infoByStoreId.getMachineCode(),jsonData, System.currentTimeMillis()+random6.toString());
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(url);
// JSONObject 转换为 Map
Map<String, Object> map = jsonObject.getInnerMap();
//获取支付参数
log.info("url:{}",url);
if (ObjectUtil.isNotEmpty(url)) {
String error = jsonObject.getString("error");
if ("18".equals(error)) {
getToken(storeId);
printIndex(payAmount,storeId);
}
}
return map.get("error_description").toString();
}
// 打印交接班
public void getHandover(Map<String, Object> handover,Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
}
}
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
Handover.setHandover(handover);
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), Handover.printHandover(), "Z"+System.currentTimeMillis()+random6.toString());
}
public void oilOrderReport(Map<String, Object> oilOrder,Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
} }
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
PrintOilOrderReport.setHandover(oilOrder);
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), PrintOilOrderReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
if (ObjectUtil.isNotEmpty(url)) {
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(url);
String error = jsonObject.getString("error");
if ("18".equals(error)) {
getToken(storeId);
reOilOrderReport(oilOrder,storeId);
}
}
}
public void reOilOrderReport(Map<String, Object> oilOrder,Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
}
}
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
RePrintOilOrderReport.setHandover(oilOrder);
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), RePrintOilOrderReport.rePrintOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
if (ObjectUtil.isNotEmpty(url)) {
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(url);
String error = jsonObject.getString("error");
if ("18".equals(error)) {
getToken(storeId);
reOilOrderReport(oilOrder,storeId);
}
}
}
public void printCardValueReport(Map<String, Object> cardValue,Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
log.info("handover:{}",cardValue.toString());
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
}
}
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
PrintCardValueReport.setHandover(cardValue);
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), PrintCardValueReport.printOilOrder(), "Z"+System.currentTimeMillis()+random6.toString());
if (ObjectUtil.isNotEmpty(url)) {
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(url);
String error = jsonObject.getString("error");
if ("18".equals(error)) {
getToken(storeId);
reOilOrderReport(cardValue,storeId);
}
}
}
public void printFuelDieselReport(Map<String, Object> fuelDiesel,Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
log.info("handover:{}",fuelDiesel.toString());
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
}
}
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
PrintFuelDieselReport.setHandover(fuelDiesel);
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), PrintFuelDieselReport.printFeulOrder(), "Z"+System.currentTimeMillis()+random6.toString());
if (ObjectUtil.isNotEmpty(url)) {
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(url);
String error = jsonObject.getString("error");
if ("18".equals(error)) {
getToken(storeId);
reOilOrderReport(fuelDiesel,storeId);
}
}
}
public void printIntegralReport(Map<String, Object> integral,Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
log.info("handover:{}",integral.toString());
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
}
}
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
PrintIntegralReport.setHandover(integral);
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), PrintIntegralReport.printIntegral(), "Z"+System.currentTimeMillis()+random6.toString());
if (ObjectUtil.isNotEmpty(url)) {
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(url);
String error = jsonObject.getString("error");
if ("18".equals(error)) {
getToken(storeId);
reOilOrderReport(integral,storeId);
}
}
}
public void printTagReport(Map<String, Object> integral,Integer storeId) {
PrintDeviceInfo infoByStoreId = printDeviceInfoMapper.getInfoByStoreId(storeId);
log.info("handover:{}",integral.toString());
Methods m=Methods.getInstance();
Object accessToken = RedisUtil.get("scancodemodel+" + storeId);
if (ObjectUtil.isNotEmpty(accessToken)) {
m.init(accessToken.toString());
} else {
String token = getToken(storeId);
if ("error".equals(token)) {
throw new RuntimeException("获取参数失败,无法打印");
}else {
m.init(token);
}
}
m.init(infoByStoreId.getAppKey(), infoByStoreId.getAppSecret());
// PrintIntegralReport.setHandover(integral);
StringBuilder sb=new StringBuilder();
sb.append("<center>收款码打印\r\n</center>");
sb.append("------------------------------------\r\n");
sb.append("油枪:¥"+integral.get("gunName")+"\r\n");
sb.append("升数:¥"+integral.get("oilNum")+"\r\n");
sb.append("价格:¥"+integral.get("payAmount")+"\r\n");
sb.append("------------------------------------\r\n");
sb.append("<center>谢谢惠顾,欢迎下次光临!</center>");
Integer random6 = (int) ((Math.random() * 9 + 1) * 100000);
String url=m.print(infoByStoreId.getMachineCode(), sb.toString(), "Z"+System.currentTimeMillis()+random6.toString());
if (ObjectUtil.isNotEmpty(url)) {
// 使用 Fastjson JSON 字符串解析为 JSONObject
JSONObject jsonObject = JSON.parseObject(url);
String error = jsonObject.getString("error");
if ("18".equals(error)) {
getToken(storeId);
reOilOrderReport(integral,storeId);
}
}
}
public void verifySign(String ciphertext, String signature) {
// 交易报文中ciphertext与signature
byte[] signatureByte = Base64.decodeBase64String(signature);
byte[] publicKeyByte = Base64.decodeBase64String(publicKey);
try {
System.out.println("验签结果:" + verify(ciphertext.getBytes(), signatureByte, publicKeyByte));
boolean verify = verify(ciphertext.getBytes(), signatureByte, publicKeyByte);
} catch (GeneralSecurityException e) {
e.printStackTrace();
}
}
/**
* 第二步解析参数
*/
public String decrypte(String ciphertext,
String iv,
String tag) throws Exception {
// 交易报文中ciphertext与tag和iv
// String ciphertext = "";
// String tag = "";
// String iv = "";
// 应用设置 -> K8推送 -> 设置 -> 接口加签名方式密钥 -> 应用公钥
String key = "e0292ae66d9d21feaa895370d3a875aa";
try {
String plaintext = decrypte(Base64.decodeBase64String(ciphertext), key.getBytes(), iv.getBytes(), Base64.decodeBase64String(tag));
System.out.println(plaintext);
return plaintext;
} catch (Exception e) {
throw new Exception(e);
}
}
private static boolean verify(byte[] data, byte[] signature, byte[] publicKey) throws GeneralSecurityException {
X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(publicKey);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey pubKey = keyFactory.generatePublic(pubKeySpec);
Signature sig = Signature.getInstance("SHA256withRSA");
sig.initVerify(pubKey);
sig.update(data);
return sig.verify(signature);
}
/**
* AES-GCM-256对称解密
*/
private static String decrypte(byte[] encryptedBytes, byte[] keyBytes, byte[] ivBytes, byte[] tagBytes) throws Exception {
SecretKeySpec secretKey = new SecretKeySpec(keyBytes, "AES");
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
GCMParameterSpec gcmParameterSpec = new GCMParameterSpec(128, ivBytes);
cipher.init(Cipher.DECRYPT_MODE, secretKey, gcmParameterSpec);
cipher.updateAAD("transaction".getBytes(StandardCharsets.UTF_8));
cipher.update(encryptedBytes);
byte[] decryptedBytes = cipher.doFinal(tagBytes);
String decryptedString = new String(decryptedBytes, StandardCharsets.UTF_8);
byte[] content = Base64.decodeBase64String(decryptedString);
return new String(content);
}
}

View File

@ -51,6 +51,7 @@ public class MtUser implements Serializable {
@ApiModelProperty("证件号码")
private String idcard;
@TableField(exist = false)
@ApiModelProperty("等级ID")
private String gradeId;
//
@ -81,7 +82,7 @@ public class MtUser implements Serializable {
@ApiModelProperty("来源渠道")
private String source;
@TableField(exist = false)
@ApiModelProperty("密码")
private String password;

BIN
fuintBackend/lib/M1AIDL.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@ -175,7 +175,6 @@
<div>赠送<span class="amount">{{ item.giftBalance }}</span></div>
</div>
</div>
<div style="width: 30%;margin-left: 13px;margin-top: 8px;"
:class="activeKey === cardValueList.length ? 'select' : ''"
@click="rechargeCard(cardValueList.length,-1)">

View File

@ -1,20 +1,23 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"mp-weixin" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
}

View File

@ -5,7 +5,10 @@
<slot></slot>
</view>
<view class="my-text">{{titles}}</view>
<view class="my-icons"></view>
<view class="my-icons" @click="clickChild()">
{{type?'筛选':''}}
</view>
</view>
</template>
@ -18,7 +21,8 @@
}
},
props: {
titles: String
titles: String,
type: String
},
mounted() {
@ -26,10 +30,13 @@
methods: {
gobock() {
uni.navigateBack()
},
clickChild() {
console.log("2222222222222222222222222")
this.$emit('chiledEvent', 123);
}
}
}
</script>
@ -51,7 +58,7 @@
top: 0px;
.my-icons {
width: 20px;
width: 50px;
}

View File

@ -92,6 +92,27 @@
"navigationStyle": "custom"
}
},
{
"path": "outher/serviceList",
"style": {
"navigationBarTitleText": "服务条款",
"navigationStyle": "custom"
}
},
{
"path": "outher/my",
"style": {
"navigationBarTitleText": "关于我们",
"navigationStyle": "custom"
}
},
{
"path": "outher/yinsi",
"style": {
"navigationBarTitleText": "隐私协议",
"navigationStyle": "custom"
}
},
{
"path": "PaymentCode/PaymentCode",
"style": {

View File

@ -62,11 +62,34 @@
</view>
</view>
<!-- bai -->
<view class="bai-box">
<!-- <view class="bai-box">
<u-icon name="bell" color="#E61D2A" size="18"></u-icon>
<view class="hy-size">您有新的交易日报生成请点击查看</view>
</view> -->
<view class="box_" v-for="item,index in orderList" :key="index">
<view class="b-bx">
<!-- <view class="title_">京博加油站</view> -->
<view class="zt-size" v-if="item.orderStatus == 'paid'">已支付</view>
<view class="zt-size" v-if="item.orderStatus == 'refund'">已退款</view>
<view class="zt-size" v-if="item.orderStatus == 'unpaid'">未支付</view>
</view>
<view class="centne">
<view class="right-centne">
<view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text>
</view>
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view>
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</view>
<view class="h_"><text class="hao_">下单时间:</text>{{item.payTime}}</view>
<view class="b-bx">
<view class=""> <text class="hao_">应付:</text>{{item.goodsMoney}}</view>
<view class=""><text class="hao_">优惠:</text>0.00</view>
</view>
</view>
</view>
<view class="end-box">实付:{{item.payMoney}}</view>
</view>
</view>
<view style="width: 100%;height: 68px;"></view>
<tabbar :msg='msg'></tabbar>
</view>
</template>
@ -83,16 +106,26 @@
List: [],
show: false,
status: 'loading',
orderList: [],
indexData: {
totalPayMoney: '0',
totalCount: '0',
totalRefund: '0',
}
},
form: {
page: 1,
pageSize: 10,
status: '',
startTime: '',
endTime: '',
payType: ''
},
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getPageListByPos()
this.getIndexData();
},
onPullDownRefresh() {
@ -110,6 +143,24 @@
tabbar
},
methods: {
getPageListByPos() {
request({
url: 'business/allOrderInfo/getPageListByPosRecentThree',
method: 'get',
params: this.form
}).then((res) => {
if (res.code == 200) {
this.orderList = res.data.records;
} else {
uni.showToast({
title: res.data,
icon: "none"
})
}
})
},
goRecharge() {
uni.navigateTo({
url: "/pagesHome/MemberRecharge/MemberRecharge"
@ -117,7 +168,7 @@
},
goCode() {
uni.navigateTo({
url: '/pagesHome/PaymentCode/PaymentCode'
url: '/pagesHome/PaymentCode/SetUpCode'
})
},
gochangeShifts() {
@ -294,4 +345,122 @@
overflow: hidden;
margin-left: 10px;
}
.box_ {
width: 95%;
border-radius: 8px;
background: #fff;
box-sizing: border-box;
padding: 15px;
margin: 15px auto;
}
.b-bx {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.title_ {
font-weight: bold;
font-size: 16px;
color: #333333;
}
.zt-size {
font-weight: bold;
font-size: 16px;
color: #FD504E;
}
.centne {
display: flex;
}
.touxiang {
width: 60px;
height: 60px;
border-radius: 50%;
background: #D9D9D9;
margin-right: 15px;
}
.right-centne {
width: 100%;
font-size: 14px;
}
.h_ {
width: 100%;
margin-bottom: 5px;
}
.end-box {
width: 100%;
text-align: right;
font-weight: bold;
font-size: 16px;
color: #0864E9;
}
.time {
font-weight: 500;
font-size: 14px;
color: #333333;
margin: 0px auto;
margin-top: 15px;
}
.time-bs {
width: 100%;
box-sizing: border-box;
background: #FFFFFF;
padding: 15px;
display: flex;
align-items: center;
justify-content: space-around;
}
.time-bs2 {
width: 100%;
box-sizing: border-box;
background: #FFFFFF;
padding: 30px;
// display: flex;
align-items: center;
justify-content: space-around;
}
.time-box {
border: 1px solid #0864E9;
box-sizing: border-box;
padding: 5px 15px;
border-radius: 8px;
font-size: 14px;
color: #333;
display: flex;
align-items: center;
justify-content: center;
}
.time-box2 {
border: 1px solid #0864E9;
box-sizing: border-box;
padding: 5px 15px;
border-radius: 8px;
font-size: 14px;
color: #333;
display: flex;
align-items: center;
justify-content: center;
}
.hao_ {
width: 30%;
font-weight: bold;
margin-right: 5px;
}
</style>

View File

@ -17,19 +17,24 @@
</view>
</view>
<view class="jg-box">
<view class="h-box" @click="golist()">
<!-- <view class="h-box" @click="golist()">
<view class="">消息通知</view>
<u-icon name="arrow-right" size="18"></u-icon>
<<<<<<< HEAD
</view>
<view class="h-box">
<view class="h-box" @click="goServiceList()">
=======
</view> -->
<view class="h-box" @click="goServiceList()">
<view class="">服务条款</view>
<u-icon name="arrow-right" size="18"></u-icon>
</view>
<view class="h-box">
<view class="h-box" @click="goMyList()">
<view class="">关于我们</view>
<u-icon name="arrow-right" size="18"></u-icon>
</view>
<view class="h-box">
<view class="h-box" @click="goYinsi()">
<view class="">隐私协议</view>
<u-icon name="arrow-right" size="18"></u-icon>
</view>
@ -107,6 +112,23 @@
},
goback() {
uni.navigateBack()
},
goServiceList() {
uni.navigateTo({
url: '/pagesHome/outher/serviceList'
})
},
goMyList() {
uni.navigateTo({
url: '/pagesHome/outher/my'
})
},
goYinsi() {
uni.navigateTo({
url: '/pagesHome/outher/yinsi'
})
}
}
}

View File

@ -25,6 +25,8 @@
</template>
<script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
import UQRCode from '../../uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js';
export default {
@ -35,9 +37,10 @@
}
},
onShow() {
this.onReady()
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.onReady()
},
onPullDownRefresh() {
console.log("刷新");

View File

@ -50,11 +50,12 @@
<view class="h-b-box">
<view class="">
<view class="hui-">营业额/笔数</view>
<view class="lan-">{{dataForm.cash}}/{{dataForm.cashcount}}</view>
<view class="lan-">{{dataForm.wechat}}/{{dataForm.wechatcount}}</view>
</view>
<view class="">
<view class="hui-">会员充值/笔数</view>
<view class="lan-">0.00/0</view>
<view class="lan-">{{dataForm.userBalanceByWechat }}/{{dataForm.userBalanceCountByWechat}}
</view>
</view>
</view>
<view class="d-s" style="margin-bottom: 10px;">
@ -66,14 +67,14 @@
<view class="h-b-box">
<view class="">
<view class="hui-">营业额/笔数</view>
<view class="lan-">0.00/0</view>
<view class="lan-">{{dataForm.alipay}}/{{dataForm.alipaycount}}</view>
</view>
<view class="">
<view class="hui-">会员充值/笔数</view>
<view class="lan-">0.00/0</view>
<view class="lan-">{{dataForm.userBalanceByAli}}/{{dataForm.userBalanceCountByali}}</view>
</view>
</view>
<view class="d-s" style="margin-bottom: 10px;">
<!-- <view class="d-s" style="margin-bottom: 10px;">
<view class="icon-img">
<image src="../../static/imgs/yl.png" mode=""></image>
</view>
@ -88,7 +89,7 @@
<view class="hui-">会员充值/笔数</view>
<view class="lan-">0.00/0</view>
</view>
</view>
</view> -->
</view>
@ -113,9 +114,24 @@
showStartTime: false,
showEndTime: false,
dataForm: {
sumBalance: '0',
countBalance: '0',
userBalance: '0',
userBalanceCount: '0',
refBalance: '0',
refBalanceCount: '0',
wechat: '0',
wechatcount: '0',
userBalanceByWechat: '0',
userBalanceCountByWechat: '0',
alipay: '0',
alipaycount: '0',
userBalanceByAli: '0',
userBalanceCountByali: '0',
},
form: {
}
}
},
onShow() {
@ -165,14 +181,22 @@
console.log('123123', e)
this.showStartTime = false
this.startTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
this.getIndexData()
},
clickEnd(e) {
this.showEndTime = false
this.startTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
this.endTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
this.getIndexData()
},
//
getIndexData() {
if (this.startTime && this.endTime) {
this.form.params = {
beginTime: this.startTime,
endTime: this.endTime
}
}
request({
url: 'business/allOrderInfo/getOperatingDataPos',
method: 'get',

View File

@ -7,6 +7,7 @@
</view>
<view class="p-size">请将您的卡片插入POS机</view>
</view>
<!-- qq-->
</view>
</template>

View File

@ -39,7 +39,6 @@
:key="index" @click="getspearIndex(index,item)">
{{item.gunName}}
</view>
</view>
<view style="width: 100%; height: 500px; "></view>
<view class="bai-kuang">
@ -85,8 +84,8 @@
<u--textarea v-model="value1" placeholder="请输入内容"></u--textarea>
<view
style="width: 100%; display: flex;align-items: center;justify-content: space-around;margin-top: 20px; ">
<view class="anniuq">确定</view>
<view class="anniux">取消</view>
<view class="anniuq" @click="submitRemark()">确定</view>
<view class="anniux" @click="close">取消</view>
</view>
</view>
</u-popup>
@ -228,6 +227,11 @@
headers
},
methods: {
//
submitRemark(){
this.show = false
this.oilOrder.remark = this.value1
},
close() {
this.show = false
},
@ -446,9 +450,12 @@
this.oilOrder.tankId = this.tankId
this.oilOrder.oilPrice = this.oilPrice
this.oilOrder.oilCardAmount1 = this.oilCardAmount
this.oilOrder.userId = this.userInfo.id
this.oilOrder.oilGunNum = this.oilGunNum
this.oilOrder.payUser = this.userInfo.mobile
if (this.userInfo){
this.oilOrder.userId = this.userInfo.id
this.oilOrder.payUser = this.userInfo.mobile
}
request({
url: "business/oilOrder/addOrderPos",
method: 'post',
@ -463,7 +470,7 @@
// })
uni.navigateTo({
url: "/pagesHome/PaymentResults/PaymentResults"
url: "/pagesHome/PaymentResults/PaymentResults?orderNo="+this.orderNo
})
} else if (res.data.code == 2) {
uni.showToast({

View File

@ -10,23 +10,23 @@
<u-icon name="scan" color="#fff" size="38"></u-icon>
</view> -->
<view class="box_">
<view class="leftbox">
<view class="leftbox" @click="goChooseUser()">
<view class="title_">会员信息</view>
<view v-if="true">
<view v-if="!isChooseUser">
请选择会员
</view>
<view v-if="false">
<view v-if="isChooseUser">
<view class="d-s">
<view class="hui">会员名称:</view>
<view class="hei"> 胡桃</view>
<view class="hei">{{userInfo.name}}</view>
</view>
<view class="d-s">
<view class="hui">手机号:</view>
<view class="hei"> 153****9968</view>
<view class="hei">{{userInfo.mobile}}</view>
</view>
<view class="d-s">
<view class="hui">账户余额:</view>
<view class="hei"> 1854.96</view>
<view class="hei">{{userInfo.cardBalance}}</view>
</view>
</view>
</view>
@ -41,9 +41,15 @@
<view class="title_lan">充值记录</view>
</view>
<view class="wrap-box">
<view class="w-box" v-for="(item,index) in numList " :key="index" @click="getindex(index)">
<view class="w-box" v-for="(item,index) in numList " :key="index" @click="getindex(index,item)">
<view class="hezi" :class="{ 'acv' : listindex == index }">
{{item}}
{{item.rechargeBalance}}
</view>
</view>
<view class="w-box" @click="getindex(numList.length,null)">
<view class="hezi" :class="{ 'acv' : listindex == numList.length }">
<!-- 自定义金额 -->
<input placeholder="自定义金额" v-model="value" @input="custom()"></input>
</view>
</view>
</view>
@ -56,7 +62,10 @@
<view class="">微信扫码支付</view>
</view>
<view class="qiu"></view>
<view class="qiu" v-if="memberId != 0" @click="getmemberId(0,'WECHAT')"></view>
<view class="qiux" v-if="memberId == 0">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
<view class="h-box">
<view class="h-ds">
@ -66,7 +75,10 @@
<view class="">支付宝扫码支付</view>
</view>
<view class="qiu"></view>
<view class="qiu" v-if="memberId != 1" @click="getmemberId(1,'ALIPAY')"></view>
<view class="qiux" v-if="memberId == 1">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
<view class="h-box">
<view class="h-ds">
@ -76,7 +88,23 @@
<view class="">银联扫码支付</view>
</view>
<view class="qiu"></view>
<view class="qiu" v-if="memberId != 2" @click="getmemberId(2,'UNIONPAY')"></view>
<view class="qiux" v-if="memberId == 2">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
<view class="h-box">
<view class="h-ds">
<view class="icon-img">
<image src="../../static/imgs/xjzf.png" mode=""></image>
</view>
<view class="">现金支付</view>
</view>
<view class="qiu" v-if="memberId != 3" @click="getmemberId(3,'CASH')"></view>
<view class="qiux" v-if="memberId == 3">
<u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view>
</view>
</view>
<view class="bottom-b"></view>
@ -89,6 +117,7 @@
</template>
<script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
export default {
@ -96,6 +125,7 @@
return {
titles: "会员充值",
listindex: 0,
memberId: 0,
numList: [
"50元",
"100元",
@ -103,13 +133,29 @@
"500元",
"1000元",
"自定义金额",
]
],
isChooseUser: false,
userId: "",
userInfo: "",
order: {
paymentType: "WECHAT"
},
value: "",
realyPayBills: 0,
authCode: "",
}
},
onLoad(e) {
this.userId = e.userId
if (e.userId) {
this.isChooseUser = true
this.getUser()
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getRechargeAmount()
},
onPullDownRefresh() {
console.log("刷新");
@ -125,13 +171,100 @@
headers
},
methods: {
getindex(index) {
//
custom(val) {
this.order.amount = val
this.realyPayBills = this.order.amount
},
//
getRechargeAmount() {
request({
url: 'business/marketingActivity/cardFuelDiesel',
method: 'get',
params: {
pageNo: 1,
pageSize: 10000
}
}).then((res) => {
this.numList = res.data.records
})
},
getmemberId(num, payType) {
this.memberId = num
this.order.paymentType = payType
},
//
getUser() {
request({
url: '/business/userManager/user/' + this.userId,
method: 'get',
}).then((res) => {
this.userInfo = res.data
})
},
goChooseUser() {
uni.navigateTo({
url: "/pagesHome/searchVip/searchVip?type=1"
})
},
getindex(index,data) {
this.listindex = index
if (data){
this.order.amount = data.rechargeBalance
this.order.rechargeBalance = data.rechargeBalance
this.order.points = data.points
this.realyPayBills = data.rechargeBalance
}
},
//
scanQrcode() {
if (!this.userInfo) {
uni.showToast({
title: "请先选择会员",
icon: "none"
})
}
if (!this.order.amount){
uni.showToast({
title:"请先选择充值金额",
icon:"none"
})
}
let _this = this
uni.scanCode({
onlyFromCamera: true,
success: (res) => {
console.log('扫描二维码成功,结果:' + JSON.stringify(res) + res.result);
_this.authCode = res.result
_this.govipjs()
},
error: (res) => {
console.log('扫描二维码出现错误')
}
})
},
govipjs() {
uni.navigateTo({
url: '/pagesHome/PaymentResults/PaymentResults'
let actualPayment = 0
if (this.order.paymentType == "CASH") actualPayment = this.authCode
// id
this.order.mtUserId = this.userInfo.id
this.order.name = this.userInfo.name
this.order.mobile = this.userInfo.mobile
//
this.order.authCode = this.authCode
this.order.realyPayBills = this.realyPayBills
this.order.actualPayment = actualPayment
request({
url: 'business/marketingActivity/cardFuelRecord/prepaidFuelTopUp',
method: 'post',
data:this.order
}).then((res) => {
// uni.navigateTo({
// url: '/pagesHome/PaymentResults/PaymentResults'
// })
})
},
goback() {
uni.navigateBack()
@ -343,4 +476,16 @@
border-radius: 50%;
border: 1px solid #333333;
}
.qiux {
width: 16px;
height: 16px;
border-radius: 50%;
border: 1px solid #0864e9;
background: #0864e9;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
</style>

View File

@ -22,11 +22,16 @@
data() {
return {
titles: "刷卡支付",
orderNo:"",
qrCode:"",
}
},
onLoad() {
onLoad(e) {
this.orderNo = e.orderNo
this.qrCode = uni.getStorageSync("qrCode")
console.log(this.qrCode);
this.onReady()
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
@ -49,14 +54,14 @@
//
setAmount() {
uni.navigateTo({
url: "/pagesHome/PaymentCode/SetUpCode"
url: "/pagesHome/PaymentCode/SetUpCode?orderNo="+this.orderNo
})
},
onReady() {
// uQRCode
var qr = new UQRCode();
//
qr.data = "https://uqrcode.cn/doc";
qr.data = this.qrCode;
// canvas
qr.size = 200;
//

View File

@ -4,30 +4,73 @@
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="b-box">
<view class="">金额</view>
<view style="text-align: right;"><input type="text" placeholder="请输入金额" /></view>
<view style="text-align: right;"><input type="text" v-model="oilOrder.orderAmount" placeholder="请输入金额" /></view>
</view>
<view class="b-box">
<view class="">备注</view>
<view style="text-align: right;"><input type="text" placeholder="请输入备注" /></view>
<view style="text-align: right;"><input type="text" v-model="oilOrder.remark" placeholder="请输入备注" /></view>
</view>
<view class="title_">选择油枪</view>
<view class="warp-box">
<view class="w-box" :class="{ 'acv' : spearIndex == index }" v-for="(item,index) in spearList"
:key="index" @click="getspearIndex(index,item)">
{{item.gunName}}
</view>
</view>
<view class="title_">选择支付方式</view>
<view class="warp-box">
<view class="w-box" :class="{ 'acv' : payIndex == index }" v-for="(item,index) in payList"
v-if="item.dictValue != 'CASH' && item.dictValue != 'APPLET_CODE'"
style="width: 100px;"
:key="index" @click="getpayIndex(index,item)">
{{item.dictLabel}}
</view>
</view>
<view class="bottom-b"></view>
<view class="p-bottom" @click="addOrder()">
<view class="anniu">
确定
</view>
</view>
</view>
</view>
</template>
<script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "设置金额",
spearList: [
"1号枪", "2号枪", "3号枪"
],
spearIndex: 0,
payList:[],
payIndex:0,
oilName: "",
tankId: "",
oilPrice: "",
oilGunNum: "",
oilOrder:{},
orderNo:"",
qrCode:"",
}
},
onLoad(e) {
uni.removeStorageSync("qrCode")
this.orderNo = e.orderNo
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getOilGun()
this.getPayList()
},
onPullDownRefresh() {
console.log("刷新");
@ -43,6 +86,64 @@
headers
},
methods: {
//
addOrder(){
if (this.orderNo) this.oilOrder.orderNo = this.orderNo
this.oilOrder.payAmount = this.oilOrder.orderAmount
this.oilOrder.oils = this.oilName
this.oilOrder.tankId = this.tankId
this.oilOrder.oilPrice = this.oilPrice
this.oilOrder.oilGunNum = this.oilGunNum
request({
url: 'business/oilOrder/addOrderScanPos',
method: 'post',
data:this.oilOrder
}).then((res) => {
this.orderNo = res.data.oilOrder.orderNo
this.qrCode = res.data.scanCode.qr_code
uni.setStorageSync("qrCode",this.qrCode)
uni.navigateTo({
url:"/pagesHome/PaymentCode/PaymentCode?orderNo="+this.orderNo
})
})
},
//
getOilGun() {
request({
url: 'business/petrolStationManagement/oilGun/queryOilGunList',
method: 'get',
}).then((res) => {
this.spearList = res.data
if (this.spearList.length > 0) {
this.oilGunNum = this.spearList[0].id
this.oilName = this.spearList[0].oilName
this.tankId = this.spearList[0].tankId
this.oilPrice = this.spearList[0].oilPrice
}
})
},
getspearIndex(num, data) {
this.spearIndex = num
this.oilGunNum = data.id
this.oils = data.oilName
this.tankId = data.tankId
this.oilPrice = data.oilPrice
},
//
getPayList(){
request({
url: '/system/dict/data/type/payment_type',
method: 'get',
}).then((res) => {
this.payList = res.data
this.oilOrder.payType = res.data[0].dictValue
})
},
getpayIndex(num, data) {
this.payIndex = num
this.oilOrder.payType = data.dictValue
},
goback() {
uni.navigateBack()
}
@ -84,4 +185,65 @@
box-sizing: border-box;
padding: 10px;
}
.bottom-b {
width: 100%;
height: 68px;
}
.p-bottom {
width: 100%;
height: 68px;
background: #fff;
position: fixed;
bottom: 0px;
left: 0px;
}
.anniu {
height: 40px;
background: #0864E9;
width: 80%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
border-radius: 50px;
margin: 5px auto;
}
.title_ {
font-weight: bold;
font-size: 16px;
color: black;
width: 95%;
margin: 10px auto;
}
.warp-box {
width: 95%;
margin: 10px auto;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.w-box {
width: 60px;
height: 32px;
background: #FFFFFF;
border-radius: 6px 6px 6px 6px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 14px;
color: #333333;
margin-right: 10px;
}
.acv {
background: #E8F5FF !important;
color: #0864E9 !important;
}
</style>

View File

@ -6,21 +6,33 @@
<image src="../../static/imgs/zfcg.png" mode=""></image>
</view>
<view class="title_">支付成功</view>
<!-- <view class="top_" v-if="oilOrder.orderStatus!='paid'">
<image src="../../static/imgs/zfsb.png" mode=""></image>
</view>
<view class="title_" v-if="oilOrder.orderStatus!='paid'">支付失败</view> -->
<view class="b-bs">
<view class="h-size">应收金额</view>
<view class="red-size">200.00</view>
<view class="red-size">{{oilOrder.orderAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">优惠金额</view>
<view class="red-size">200.00</view>
<view class="red-size">{{oilOrder.discountAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">实收金额</view>
<view class="red-size">200.00</view>
<view class="red-size">{{oilOrder.payAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">储值卡消费金额</view>
<view class="red-size">{{oilOrder.balanceAmount}}</view>
</view>
<view class="b-bs">
<view class="h-size">支付方式</view>
<view class="h-size">现金支付</view>
<view class="h-size" v-if="oilOrder.payType=='ALIPAY'">支付宝支付</view>
<view class="h-size" v-if="oilOrder.payType=='WECHAT'">微信支付</view>
<view class="h-size" v-if="oilOrder.payType=='UNIONPAY'">银联二维码支付</view>
<view class="h-size" v-if="oilOrder.payType=='CASH'">现金支付</view>
<view class="h-size" v-if="oilOrder.payType=='APPLET_CODE'">小程序码支付</view>
</view>
</view>
<view class="p-bottom">
@ -32,18 +44,24 @@
</template>
<script>
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "支付结果",
orderNo:"",
oilOrder:{},
}
},
onLoad(e) {
this.orderNo = e.orderNo
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
this.getOilOrder()
},
onPullDownRefresh() {
console.log("刷新");
@ -59,8 +77,20 @@
headers
},
methods: {
//
getOilOrder(){
request({
url: '/business/oilOrder/orderNo',
method: 'post',
data:{orderNo:this.orderNo}
}).then((res) => {
this.oilOrder = res.data
})
},
goback() {
uni.navigateBack()
uni.navigateTo({
url:"/pages/index/index"
})
}
}
}

View File

@ -43,7 +43,7 @@
</view>
</view>
<view style="width: 100%; height: 78px; "></view>
<view class="bottom-d">
<view class="bottom-d" @click="shift">
<view class="anniu">
交班
</view>
@ -131,6 +131,32 @@
})
}
})
},
//
shift() {
let recordData = this.handoverList
let handoverRecord = {
startTime: this.handoverList.baseInfo.startTime,
recordData: JSON.stringify(recordData),
type: 0,
status: this.handoverList.baseInfo.handoverType,
staffId: this.staff.staffId
}
request({
url: 'business/handoverRecord/addByPos',
method: 'post',
data: handoverRecord
}).then((res) => {
if (res.code == 200) {
this.indexData = res.data
} else {
uni.showToast({
title: res.data,
icon: "none"
})
}
})
}
}
}

View File

@ -3,18 +3,22 @@
<view class="container">
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="time-bs">
<view class="time-box" @click="show = true">开始日期</view>
<view class="time-box" @click="showStartTime = true">{{form.startTime?form.startTime:'开始日期'}}</view>
<view class="">-</view>
<view class="time-box" @click="show = true">结束日期</view>
<view class="time-box" @click="showEndTime = true">{{form.endTime?form.endTime:'结束日期'}}</view>
</view>
<view class="box_" v-for="item,index in listData">
<view class="top-title">
<view class="name_">{{item.staffName}}</view>
<view class="price_">400.00</view>
<view class="price_">{{item.totalPayMoney}}</view>
</view>
<view class="time">2024-05-11 07:10-2024-05-13 16:45</view>
<view class="time">{{item.startTime}}-{{item.endTime}}</view>
</view>
<u-datetime-picker :show="show" v-model="value1" mode="datetime"></u-datetime-picker>
<u-datetime-picker :show="showStartTime" v-model="startTimeValue" mode="datetime" @confirm="clickStart"
@close="showStartTime = false" @cancel="showStartTime = false"></u-datetime-picker>
<u-datetime-picker :show="showEndTime" v-model="endTimeValue" mode="datetime" @confirm="clickEnd"
@close="showEndTime = false" @cancel="showEndTime = false"></u-datetime-picker>
</view>
</view>
@ -32,10 +36,18 @@
show: false,
value1: Number(new Date()),
listData: [],
dateRange: [],
startTime: "",
endTime: "",
startTimeValue: "",
endTimeValue: "",
showStartTime: false,
showEndTime: false,
form: {
page: 1,
pageSize: 10000,
beginTime: '',
startTime: '',
endTime: ''
}
}
@ -62,8 +74,42 @@
goback() {
uni.navigateBack()
},
clickStartTime(e) {
this.showStartTime = true
console.log(123, e)
// const date = new Date(timestamp);
},
clickEndTime(e) {
this.showEndTime = true
},
clickStart(e) {
console.log('123123', e)
this.showStartTime = false
this.form.startTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
this.getIndexData();
},
clickEnd(e) {
this.showEndTime = false
this.form.endTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
this.getIndexData();
},
//
getIndexData() {
if (this.form.startTime && this.form.endTime) {
this.form.params = {
beginTime: this.form.startTime,
endTime: this.form.endTime
}
}
request({
url: 'business/handoverRecord/queryByPage',
method: 'get',
@ -78,6 +124,16 @@
})
}
})
},
formatDateToYYMMDDHHMM(date) {
const year = String(date.getFullYear()); //
const month = String(date.getMonth() + 1).padStart(2, '0'); //
const day = String(date.getDate()).padStart(2, '0'); //
const hours = String(date.getHours()).padStart(2, '0'); //
const minutes = String(date.getMinutes()).padStart(2, '0'); //
// return `${year}/${month}/${day} ${hours}:${minutes}`;
return `${year}/${month}/${day}`;
}
}
}

View File

@ -1,7 +1,12 @@
<template>
<view class="content">
<view class="container">
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<headers :titles="titles" :type="titles" @chiledEvent="clickChild()">
<u-icon name="arrow-left" color="#fff" size="22">
</u-icon>
</headers>
<view class="tablist">
<view class="tabbox" v-for="(item,index) in tablist" :key="index" @click="getindex(index)">
<view class="">{{item}}</view>
@ -17,15 +22,15 @@
<view class="zt-size" v-if="item.orderStatus == 'unpaid'">未支付</view>
</view>
<view class="centne">
<view class="touxiang"></view>
<view class="right-centne">
<view class="h_">订单号:{{item.orderNo}}</view>
<view class="h_">油号:{{item.oilName}}</view>
<view class="h_">升数:{{item.shengshu}}L</view>
<view class="h_">下单时间:{{item.payTime}}</view>
<view class="h_"> <text class="hao_">订单号:</text> <text>{{item.orderNo}}</text>
</view>
<view class="h_"><text class="hao_">油号:</text>{{item.oilName}}</view>
<view class="h_"><text class="hao_">升数:</text>{{item.shengshu}}L</view>
<view class="h_"><text class="hao_">下单时间:</text>{{item.payTime}}</view>
<view class="b-bx">
<view class="">应付:{{item.goodsMoney}}</view>
<view class="">优惠:0.00</view>
<view class=""> <text class="hao_">应付:</text>{{item.goodsMoney}}</view>
<view class=""><text class="hao_">优惠:</text>0.00</view>
</view>
</view>
</view>
@ -33,11 +38,42 @@
</view>
<view style="width: 100%; height: 20px; "></view>
<u-popup :show="showPop" mode="right" @close="closePop" @open="openPop" customStyle="width: 300px;">
<view style="margin-top: 100px;">
<view class="time-bs">
<view class="time-box" @click="showStartTime = true">{{form.startTime?form.startTime:'开始日期'}}
</view>
<view class="">-</view>
<view class="time-box" @click="showEndTime = true">{{form.endTime?form.endTime:'结束日期'}}</view>
</view>
<view class="time-bs2">
<view class="time-box2" @click="showType = true">{{payType?payType:'选择交易类型'}}
</view>
</view>
<!-- <u--input class="time-bs2" placeholder="选择交易类型" border="surround" v-model="form.type"
@click="showType = true" disabled></u--input> -->
<u-button style="width: 100px;" type="primary" text="确定" @click="clickBu"></u-button>
</view>
</u-popup>
<u-datetime-picker :show="showStartTime" v-model="startTimeValue" mode="datetime" @confirm="clickStart"
@close="showStartTime = false" @cancel="showStartTime = false"></u-datetime-picker>
<u-datetime-picker :show="showEndTime" v-model="endTimeValue" mode="datetime" @confirm="clickEnd"
@close="showEndTime = false" @cancel="showEndTime = false"></u-datetime-picker>
<u-picker :show="showType" :columns="columns" keyName="label" @confirm="clickType"
@cancel="showType = false"></u-picker>
</view>
</view>
</template>
<script>
import config from '@/config'
import request from "../../utils/request";
import headers from '../../components/header/headers.vue'
@ -46,6 +82,7 @@
return {
titles: "订单列表",
tabindex: 0,
showPop: false,
tablist: [
"全部",
"已完成",
@ -53,12 +90,41 @@
"支付失败",
],
orderList: [],
baseUrl: config.baseUrl,
form: {
page: 1,
pageSize: 10,
status: ''
}
status: '',
startTime: '',
endTime: '',
payType: ''
},
showType: false,
payType: '',
columns: [
[{
label: '无',
id: '0'
},
{
label: '支付宝',
id: 'ALIPAY'
}, {
label: '微信',
id: 'WECHAT'
}, {
label: '现金',
id: 'CASH'
}
]
],
startTime: "",
endTime: "",
startTimeValue: "",
endTimeValue: "",
showStartTime: false,
showEndTime: false,
}
},
onShow() {
@ -103,6 +169,13 @@
uni.navigateBack()
},
getPageListByPos() {
if (this.form.startTime && this.form.endTime) {
this.form.params = {
beginTime: this.form.startTime,
endTime: this.form.endTime
}
}
request({
url: 'business/allOrderInfo/getPageListByPos',
method: 'get',
@ -118,6 +191,68 @@
}
})
},
clickChild() {
this.showPop = true
},
clickBu() {
this.showPop = false
this.getPageListByPos()
},
closePop() {},
openPop() {},
clickType(e) {
this.showType = false
let data = e.value[0]
if (data.id == 0) {
this.payType = ''
this.form.payType = ''
} else {
this.payType = data.label
this.form.payType = data.id
}
console.log(data)
},
// changeType(e) {
// console.log(e)
// this.showType = false
// },
clickStartTime(e) {
this.showStartTime = true
console.log(123, e)
// const date = new Date(timestamp);
},
clickEndTime(e) {
this.showEndTime = true
},
clickStart(e) {
this.showStartTime = false
this.form.startTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
this.getIndexData();
},
clickEnd(e) {
this.showEndTime = false
this.form.endTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
this.getIndexData();
},
formatDateToYYMMDDHHMM(date) {
const year = String(date.getFullYear()); //
const month = String(date.getMonth() + 1).padStart(2, '0'); //
const day = String(date.getDate()).padStart(2, '0'); //
const hours = String(date.getHours()).padStart(2, '0'); //
const minutes = String(date.getMinutes()).padStart(2, '0'); //
// return `${year}/${month}/${day} ${hours}:${minutes}`;
return `${year}/${month}/${day}`;
}
}
}
</script>
@ -209,11 +344,12 @@
}
.right-centne {
width: 70%;
width: 100%;
font-size: 14px;
}
.h_ {
width: 100%;
margin-bottom: 5px;
}
@ -224,4 +360,62 @@
font-size: 16px;
color: #0864E9;
}
.time {
font-weight: 500;
font-size: 14px;
color: #333333;
margin: 0px auto;
margin-top: 15px;
}
.time-bs {
width: 100%;
box-sizing: border-box;
background: #FFFFFF;
padding: 15px;
display: flex;
align-items: center;
justify-content: space-around;
}
.time-bs2 {
width: 100%;
box-sizing: border-box;
background: #FFFFFF;
padding: 30px;
// display: flex;
align-items: center;
justify-content: space-around;
}
.time-box {
border: 1px solid #0864E9;
box-sizing: border-box;
padding: 5px 15px;
border-radius: 8px;
font-size: 14px;
color: #333;
display: flex;
align-items: center;
justify-content: center;
}
.time-box2 {
border: 1px solid #0864E9;
box-sizing: border-box;
padding: 5px 15px;
border-radius: 8px;
font-size: 14px;
color: #333;
display: flex;
align-items: center;
justify-content: center;
}
.hao_ {
width: 30%;
font-weight: bold;
margin-right: 5px;
}
</style>

View File

@ -0,0 +1,247 @@
<template>
<view class="content">
<view class="container">
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="box_">
<view class="title_">关于我们</view>
<view class="size_">委托方甲方
法定代表人
注册地址
联系电话
电子邮箱
受托方乙方
联系地址
联系电话
电子邮箱
双方经友好协商依据中华人民共和国合同法的有关规定就委托乙方开发APP(一下简称本软件)的事宜达成如下协议以资共同遵守
第一条 定义
本协议所使用的下列词语具有如下含义
交付文件指在本软件开发完成后乙方需要交付给甲方的文件包括但不限于程序文件编译前的源代码数据库文件操作手册产品制作原型图技术开发文档等
第二条 项目内容
甲方委托乙方开发可以在阿里云操作系统下运行的软件软件需求APP应用开发的栏目架构及相关功能开发细节由双方协商确定作为本合同附件
第三条 履行期限
乙方应在本合同签订之日的次日起 40 个工作日内完成本软件开发并交付软件和相关文件乙方可提前交付并协助甲方进行软件的测试鉴定工作
第四条 费用及支付
本次项目开发费用合计人民币 350000 大写 叁拾伍万元整甲方按以下方式分期支付
1在合同签订之日起 3 日内支付人民币 150000 大写 拾伍万元整
2甲方应在第一笔款项交付完成后的第十个工作日支付乙方人民币 100000 大写壹拾万元整
3乙方实现软件测试鉴定交付程序软件源代码数据文件操作手册技术开发文档后当日结清剩余尾款人民币 100000 大写 壹拾万元整
4乙方收款账号信息如下
开户名称
第五条 验收
乙方完成本软件开发工作后甲方应在 3 个工作日内完成验收逾期验收的视为验收合格
第六条 双方权利义务
1甲方的权利义务
1 甲方保证提出的本软件需求及内容不含有反动黄色及违反国家法律规定的内容
2 按时向乙方支付开发费用逾期支付需负违约责任
3 支付完成所需款项后即获得本软件的全部所有权
4 按照合同约定的标准进行开发成功验收
2乙方的权利义务
1 按照双方确定的功能需求独立完成软件开发保证不侵犯他人知识产权
2 乙方应向甲方提供加盖企业公章的书面执行报告
3 当甲方增加或者修改需求时乙方有权利增收开发费用具体数额及开发时间由双方另行协商
4 文件交付后提供 12 个月的免费维护服务此维护仅包括软件bug的修复及相关代码技术支持但是甲方未经乙方私自修改代码致使软件运行出问题除外
5 乙方在文件交付后提供1年的免费技术咨询服务技术支持确保甲方应用程序访问畅通
6 乙方不得未经甲方允许将甲方的营业数据及提供的任何材料项目创意项目整个文件以任何方式泄露给第三方
第七条 知识产权约定
1甲方与乙方未结算本合同费用之前本合同乙方开发的APP软件包括但不限于包括源代码程序文件文档资料等所有权和版权属于乙方甲方对该APP软件包括但不限于包括源代码程序文件文档资料等不享有任何权利
2甲方将
本合同费用结算完毕后乙方将APP软件包括但不限于包括源代码程序文件文档资料等转让给甲方未经许可乙方不得公布文件源代码不得复制传播反编译出售出租或者许可他人使用其相关的程序文件源代码和反编译等
第八条 保密条款
1甲乙双方应对在履行过程中获悉的对方之商业秘密及技术秘密承担保密义务该保密义务不受本合同期限的约束一直有效
2未经对方书面许可任何一方不得私自复制出售或以任何形式泄露给第三方
第九条 合同的解除
1因项目开发存在技术障碍或者市场障碍双方可以协商解除本协议
2任一方想提前解除本合同的应提前7天通知对方经双方协商签字同意后方可解除甲方要求解除合同无权要求乙方返还甲方已支付的费用并应对乙方遭受的损失承担赔偿责任乙方要求解除合同应返还甲方已支付的费用
第十条 违约责任
1甲方每逾期付款一天应按照乙方开发费用的5%支付逾期付款违约金
2如因甲方未提供相关技术资料调试环境支撑需求沟通不明确等原因致使乙方延期交付的乙方不承担违约责任
3任何一方不履行或不妥善履行本协议下任何条款被视为违约守约方有权要求违约方赔偿另一方因违约而造成的一切损失本合同对违约责任另有约定的从其约定
第十一条 纠纷解决
本合同履行过程中所发生的争议双方协商解决协商不成的任何一方可向双方所在地法院起诉
第十二条 通知与送达
1甲方乙方确认双方履行本合同的沟通可采取面谈电话传真和电邮的方式本协议所载的双方联系地址电话和电子邮箱均为真实有效的联系方式双方确认一经向对方发出电邮即视为收到通知一方按本协议载明地址所发出的书面文件自发出之日起七日内视为送达无论是否签收或拒收
2甲方指定本协议的联系认为 联系电话
乙方指定本协议的联系人为 联系电话
甲方乙方指定的联系人为履行本协议所作出的意思表示和行为均分别代表甲方乙方
3如任一方的联系方式有改变应在3天内书面通知对方
第十三条 其他事项
1本合同自双方签字盖章之日起生效一式两份双方各执一份
2本协议一方延迟或未能行驶本协议下的权力权利或救济不应当作为对任何该等权力权利或救济的弃权
3如果本协议的任何条款或规定在任何适用法律下被认定为全部或部分无效或不可强制执行其应在该等无效或不可强制执行的范围内从本协议中被排除但本协议的所有其他条款和规定均保持全部有效
本页一下无正文
签约时间 签约时间
签订地点 签订地点</view>
<!-- <view class="size_">这是各条款</view>
<view class="size_">这是各条款</view>
<view class="size_">这是各条款</view> -->
</view>
</view>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "关于我们",
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers
},
methods: {
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f8f8f8;
// background: linear-gradient(180deg, #B2D2FC 0%, #B2D2FC 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
height: 100vh;
}
.container {
width: 100%;
background: #f8f8f8;
box-sizing: border-box;
padding-top: 88px;
}
.img-box {
image {
width: 100%;
height: 100%;
}
}
.box_ {
width: 95%;
background: #FFFFFF;
border-radius: 8px;
box-sizing: border-box;
margin: 10px auto;
box-sizing: border-box;
padding: 15px;
}
.title_ {
font-weight: bold;
font-size: 16px;
color: #333333;
margin-bottom: 10px;
}
.size_ {
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 10px;
}
.bottom_ {
border-top: 1px solid #E8E8E8;
width: 100%;
box-sizing: border-box;
padding-top: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View File

@ -0,0 +1,249 @@
<template>
<view class="content">
<view class="container">
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="box_">
<view class="title_">服务条款</view>
<p>
委托方甲方
法定代表人
注册地址
联系电话
电子邮箱
受托方乙方
联系地址
联系电话
电子邮箱
双方经友好协商依据中华人民共和国合同法的有关规定就委托乙方开发APP(一下简称本软件)的事宜达成如下协议以资共同遵守
第一条 定义
本协议所使用的下列词语具有如下含义
交付文件指在本软件开发完成后乙方需要交付给甲方的文件包括但不限于程序文件编译前的源代码数据库文件操作手册产品制作原型图技术开发文档等
第二条 项目内容
甲方委托乙方开发可以在阿里云操作系统下运行的软件软件需求APP应用开发的栏目架构及相关功能开发细节由双方协商确定作为本合同附件
第三条 履行期限
乙方应在本合同签订之日的次日起 40 个工作日内完成本软件开发并交付软件和相关文件乙方可提前交付并协助甲方进行软件的测试鉴定工作
第四条 费用及支付
本次项目开发费用合计人民币 350000 大写 叁拾伍万元整甲方按以下方式分期支付
1在合同签订之日起 3 日内支付人民币 150000 大写 拾伍万元整
2甲方应在第一笔款项交付完成后的第十个工作日支付乙方人民币 100000 大写壹拾万元整
3乙方实现软件测试鉴定交付程序软件源代码数据文件操作手册技术开发文档后当日结清剩余尾款人民币 100000 大写 壹拾万元整
4乙方收款账号信息如下
开户名称
第五条 验收
乙方完成本软件开发工作后甲方应在 3 个工作日内完成验收逾期验收的视为验收合格
第六条 双方权利义务
1甲方的权利义务
1 甲方保证提出的本软件需求及内容不含有反动黄色及违反国家法律规定的内容
2 按时向乙方支付开发费用逾期支付需负违约责任
3 支付完成所需款项后即获得本软件的全部所有权
4 按照合同约定的标准进行开发成功验收
2乙方的权利义务
1 按照双方确定的功能需求独立完成软件开发保证不侵犯他人知识产权
2 乙方应向甲方提供加盖企业公章的书面执行报告
3 当甲方增加或者修改需求时乙方有权利增收开发费用具体数额及开发时间由双方另行协商
4 文件交付后提供 12 个月的免费维护服务此维护仅包括软件bug的修复及相关代码技术支持但是甲方未经乙方私自修改代码致使软件运行出问题除外
5 乙方在文件交付后提供1年的免费技术咨询服务技术支持确保甲方应用程序访问畅通
6 乙方不得未经甲方允许将甲方的营业数据及提供的任何材料项目创意项目整个文件以任何方式泄露给第三方
第七条 知识产权约定
1甲方与乙方未结算本合同费用之前本合同乙方开发的APP软件包括但不限于包括源代码程序文件文档资料等所有权和版权属于乙方甲方对该APP软件包括但不限于包括源代码程序文件文档资料等不享有任何权利
2甲方将
本合同费用结算完毕后乙方将APP软件包括但不限于包括源代码程序文件文档资料等转让给甲方未经许可乙方不得公布文件源代码不得复制传播反编译出售出租或者许可他人使用其相关的程序文件源代码和反编译等
第八条 保密条款
1甲乙双方应对在履行过程中获悉的对方之商业秘密及技术秘密承担保密义务该保密义务不受本合同期限的约束一直有效
2未经对方书面许可任何一方不得私自复制出售或以任何形式泄露给第三方
第九条 合同的解除
1因项目开发存在技术障碍或者市场障碍双方可以协商解除本协议
2任一方想提前解除本合同的应提前7天通知对方经双方协商签字同意后方可解除甲方要求解除合同无权要求乙方返还甲方已支付的费用并应对乙方遭受的损失承担赔偿责任乙方要求解除合同应返还甲方已支付的费用
第十条 违约责任
1甲方每逾期付款一天应按照乙方开发费用的5%支付逾期付款违约金
2如因甲方未提供相关技术资料调试环境支撑需求沟通不明确等原因致使乙方延期交付的乙方不承担违约责任
3任何一方不履行或不妥善履行本协议下任何条款被视为违约守约方有权要求违约方赔偿另一方因违约而造成的一切损失本合同对违约责任另有约定的从其约定
第十一条 纠纷解决
本合同履行过程中所发生的争议双方协商解决协商不成的任何一方可向双方所在地法院起诉
第十二条 通知与送达
1甲方乙方确认双方履行本合同的沟通可采取面谈电话传真和电邮的方式本协议所载的双方联系地址电话和电子邮箱均为真实有效的联系方式双方确认一经向对方发出电邮即视为收到通知一方按本协议载明地址所发出的书面文件自发出之日起七日内视为送达无论是否签收或拒收
2甲方指定本协议的联系认为 联系电话
乙方指定本协议的联系人为 联系电话
甲方乙方指定的联系人为履行本协议所作出的意思表示和行为均分别代表甲方乙方
3如任一方的联系方式有改变应在3天内书面通知对方
第十三条 其他事项
1本合同自双方签字盖章之日起生效一式两份双方各执一份
2本协议一方延迟或未能行驶本协议下的权力权利或救济不应当作为对任何该等权力权利或救济的弃权
3如果本协议的任何条款或规定在任何适用法律下被认定为全部或部分无效或不可强制执行其应在该等无效或不可强制执行的范围内从本协议中被排除但本协议的所有其他条款和规定均保持全部有效
本页一下无正文
签约时间 签约时间
签订地点 签订地点
</p>
<view class="size_"></view>
</view>
</view>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "服务条款",
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers
},
methods: {
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f8f8f8;
// background: linear-gradient(180deg, #B2D2FC 0%, #B2D2FC 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
height: 100vh;
}
.container {
width: 100%;
background: #f8f8f8;
box-sizing: border-box;
padding-top: 88px;
}
.img-box {
image {
width: 100%;
height: 100%;
}
}
.box_ {
width: 95%;
background: #FFFFFF;
border-radius: 8px;
box-sizing: border-box;
margin: 10px auto;
box-sizing: border-box;
padding: 15px;
}
.title_ {
font-weight: bold;
font-size: 16px;
color: #333333;
margin-bottom: 10px;
}
.size_ {
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 10px;
}
.bottom_ {
border-top: 1px solid #E8E8E8;
width: 100%;
box-sizing: border-box;
padding-top: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View File

@ -0,0 +1,247 @@
<template>
<view class="content">
<view class="container">
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
<view class="box_">
<view class="title_">隐私协议</view>
<view class="size_">委托方甲方
法定代表人
注册地址
联系电话
电子邮箱
受托方乙方
联系地址
联系电话
电子邮箱
双方经友好协商依据中华人民共和国合同法的有关规定就委托乙方开发APP(一下简称本软件)的事宜达成如下协议以资共同遵守
第一条 定义
本协议所使用的下列词语具有如下含义
交付文件指在本软件开发完成后乙方需要交付给甲方的文件包括但不限于程序文件编译前的源代码数据库文件操作手册产品制作原型图技术开发文档等
第二条 项目内容
甲方委托乙方开发可以在阿里云操作系统下运行的软件软件需求APP应用开发的栏目架构及相关功能开发细节由双方协商确定作为本合同附件
第三条 履行期限
乙方应在本合同签订之日的次日起 40 个工作日内完成本软件开发并交付软件和相关文件乙方可提前交付并协助甲方进行软件的测试鉴定工作
第四条 费用及支付
本次项目开发费用合计人民币 350000 大写 叁拾伍万元整甲方按以下方式分期支付
1在合同签订之日起 3 日内支付人民币 150000 大写 拾伍万元整
2甲方应在第一笔款项交付完成后的第十个工作日支付乙方人民币 100000 大写壹拾万元整
3乙方实现软件测试鉴定交付程序软件源代码数据文件操作手册技术开发文档后当日结清剩余尾款人民币 100000 大写 壹拾万元整
4乙方收款账号信息如下
开户名称
第五条 验收
乙方完成本软件开发工作后甲方应在 3 个工作日内完成验收逾期验收的视为验收合格
第六条 双方权利义务
1甲方的权利义务
1 甲方保证提出的本软件需求及内容不含有反动黄色及违反国家法律规定的内容
2 按时向乙方支付开发费用逾期支付需负违约责任
3 支付完成所需款项后即获得本软件的全部所有权
4 按照合同约定的标准进行开发成功验收
2乙方的权利义务
1 按照双方确定的功能需求独立完成软件开发保证不侵犯他人知识产权
2 乙方应向甲方提供加盖企业公章的书面执行报告
3 当甲方增加或者修改需求时乙方有权利增收开发费用具体数额及开发时间由双方另行协商
4 文件交付后提供 12 个月的免费维护服务此维护仅包括软件bug的修复及相关代码技术支持但是甲方未经乙方私自修改代码致使软件运行出问题除外
5 乙方在文件交付后提供1年的免费技术咨询服务技术支持确保甲方应用程序访问畅通
6 乙方不得未经甲方允许将甲方的营业数据及提供的任何材料项目创意项目整个文件以任何方式泄露给第三方
第七条 知识产权约定
1甲方与乙方未结算本合同费用之前本合同乙方开发的APP软件包括但不限于包括源代码程序文件文档资料等所有权和版权属于乙方甲方对该APP软件包括但不限于包括源代码程序文件文档资料等不享有任何权利
2甲方将
本合同费用结算完毕后乙方将APP软件包括但不限于包括源代码程序文件文档资料等转让给甲方未经许可乙方不得公布文件源代码不得复制传播反编译出售出租或者许可他人使用其相关的程序文件源代码和反编译等
第八条 保密条款
1甲乙双方应对在履行过程中获悉的对方之商业秘密及技术秘密承担保密义务该保密义务不受本合同期限的约束一直有效
2未经对方书面许可任何一方不得私自复制出售或以任何形式泄露给第三方
第九条 合同的解除
1因项目开发存在技术障碍或者市场障碍双方可以协商解除本协议
2任一方想提前解除本合同的应提前7天通知对方经双方协商签字同意后方可解除甲方要求解除合同无权要求乙方返还甲方已支付的费用并应对乙方遭受的损失承担赔偿责任乙方要求解除合同应返还甲方已支付的费用
第十条 违约责任
1甲方每逾期付款一天应按照乙方开发费用的5%支付逾期付款违约金
2如因甲方未提供相关技术资料调试环境支撑需求沟通不明确等原因致使乙方延期交付的乙方不承担违约责任
3任何一方不履行或不妥善履行本协议下任何条款被视为违约守约方有权要求违约方赔偿另一方因违约而造成的一切损失本合同对违约责任另有约定的从其约定
第十一条 纠纷解决
本合同履行过程中所发生的争议双方协商解决协商不成的任何一方可向双方所在地法院起诉
第十二条 通知与送达
1甲方乙方确认双方履行本合同的沟通可采取面谈电话传真和电邮的方式本协议所载的双方联系地址电话和电子邮箱均为真实有效的联系方式双方确认一经向对方发出电邮即视为收到通知一方按本协议载明地址所发出的书面文件自发出之日起七日内视为送达无论是否签收或拒收
2甲方指定本协议的联系认为 联系电话
乙方指定本协议的联系人为 联系电话
甲方乙方指定的联系人为履行本协议所作出的意思表示和行为均分别代表甲方乙方
3如任一方的联系方式有改变应在3天内书面通知对方
第十三条 其他事项
1本合同自双方签字盖章之日起生效一式两份双方各执一份
2本协议一方延迟或未能行驶本协议下的权力权利或救济不应当作为对任何该等权力权利或救济的弃权
3如果本协议的任何条款或规定在任何适用法律下被认定为全部或部分无效或不可强制执行其应在该等无效或不可强制执行的范围内从本协议中被排除但本协议的所有其他条款和规定均保持全部有效
本页一下无正文
签约时间 签约时间
签订地点 签订地点</view>
<!-- <view class="size_">这是各条款</view>
<view class="size_">这是各条款</view>
<view class="size_">这是各条款</view> -->
</view>
</view>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
export default {
data() {
return {
titles: "隐私协议",
}
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore"
},
onPullDownRefresh() {
console.log("刷新");
uni.stopPullDownRefresh()
},
onReachBottom() {
// this.show = true
setTimeout(() => {
console.log("加载执行");
}, 2000)
},
components: {
headers
},
methods: {
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f8f8f8;
// background: linear-gradient(180deg, #B2D2FC 0%, #B2D2FC 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
height: 100vh;
}
.container {
width: 100%;
background: #f8f8f8;
box-sizing: border-box;
padding-top: 88px;
}
.img-box {
image {
width: 100%;
height: 100%;
}
}
.box_ {
width: 95%;
background: #FFFFFF;
border-radius: 8px;
box-sizing: border-box;
margin: 10px auto;
box-sizing: border-box;
padding: 15px;
}
.title_ {
font-weight: bold;
font-size: 16px;
color: #333333;
margin-bottom: 10px;
}
.size_ {
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 10px;
}
.bottom_ {
border-top: 1px solid #E8E8E8;
width: 100%;
box-sizing: border-box;
padding-top: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View File

@ -52,17 +52,19 @@
return {
titles: "会员查询",
//
list:[],
total:0,
paramsQuery:{
page:1,
pageSize:30,
list: [],
total: 0,
paramsQuery: {
page: 1,
pageSize: 30,
},
AmountCollected:"",
AmountCollected: "",
type: "",
}
},
onLoad(e) {
this.AmountCollected = e.AmountCollected
this.type = e.type
},
onShow() {
// this.actList = ["1", "1", "1", "1", "1", ]
@ -87,12 +89,20 @@
headers
},
methods: {
toCollection(id){
uni.navigateTo({
url:"/pagesHome/Collection/Collection?userId="+id+"&AmountCollected="+this.AmountCollected
})
toCollection(id) {
if (this.type && this.type == 1) {
uni.navigateTo({
url: "/pagesHome/MemberRecharge/MemberRecharge?userId=" + id
})
} else {
uni.navigateTo({
url: "/pagesHome/Collection/Collection?userId=" + id + "&AmountCollected=" + this
.AmountCollected
})
}
},
getList(){
getList() {
request({
url: '/business/userManager/user/list',
method: 'get',
@ -105,7 +115,7 @@
}
this.total = res.data.total
})
},
govipjs() {
uni.navigateTo({

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB