bug
This commit is contained in:
parent
0760093344
commit
fced742168
@ -110,85 +110,93 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
||||
if (list.size()>0 && ObjectUtil.isNotEmpty(staff)){
|
||||
for (StaffCommission staffCommission : list) {
|
||||
CommissionRecord commissionRecord = new CommissionRecord();
|
||||
if (type.equals("1") && staffCommission.getCommissionSource().equals("油品")
|
||||
&& staff.getRoleId().equals(staffCommission.getStaffRoleGroup())){
|
||||
commissionRecord.setStaffId(staffId);
|
||||
commissionRecord.setStoreId(storeId);
|
||||
commissionRecord.setType(type);
|
||||
commissionRecord.setDescription(staffCommission.getCommissionSource()+"订单出售提成");
|
||||
commissionRecord.setOrderNo(orderNo);
|
||||
Double royaltyRate = Double.valueOf(staffCommission.getRoyaltyRate().substring(0,staffCommission.getRoyaltyRate().length()-1));
|
||||
String unit = staffCommission.getRoyaltyRate().substring(staffCommission.getRoyaltyRate().length()-1);
|
||||
String[] staffRoleGroups = staffCommission.getStaffRoleGroup().split(",");
|
||||
if (type.equals("1") && staffCommission.getCommissionSource().equals("油品")){
|
||||
for (String staffRoleGroup : staffRoleGroups) {
|
||||
if (staff.getRoleId().equals(staffRoleGroup)){
|
||||
commissionRecord.setStaffId(staffId);
|
||||
commissionRecord.setStoreId(storeId);
|
||||
commissionRecord.setType(type);
|
||||
commissionRecord.setDescription(staffCommission.getCommissionSource()+"订单出售提成");
|
||||
commissionRecord.setOrderNo(orderNo);
|
||||
Double royaltyRate = Double.valueOf(staffCommission.getRoyaltyRate().substring(0,staffCommission.getRoyaltyRate().length()-1));
|
||||
String unit = staffCommission.getRoyaltyRate().substring(staffCommission.getRoyaltyRate().length()-1);
|
||||
// 按照订单金额计算提成
|
||||
if (staffCommission.getType().equals("orderAmount")){
|
||||
if (amount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
if (staffCommission.getType().equals("orderAmount")){
|
||||
if (amount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(amount*(royaltyRate/100));
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(amount*(royaltyRate/100));
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
// 按照实付金额计算提成
|
||||
if (staffCommission.getType().equals("payAmount")){
|
||||
if (payAmount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
if (staffCommission.getType().equals("payAmount")){
|
||||
if (payAmount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(payAmount*(royaltyRate/100));
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(payAmount*(royaltyRate/100));
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
// 按照加油数量计算提成
|
||||
if (staffCommission.getType().equals("refuleNum")){
|
||||
if (oilLiters>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
if (staffCommission.getType().equals("refuleNum")){
|
||||
if (oilLiters>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(oilLiters*(royaltyRate/100));
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(oilLiters*(royaltyRate/100));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (type.equals("2") && staffCommission.getCommissionSource().equals("非油品")){
|
||||
for (String staffRoleGroup : staffRoleGroups) {
|
||||
if (staff.getRoleId().equals(staffRoleGroup)) {
|
||||
commissionRecord.setStaffId(staffId);
|
||||
commissionRecord.setStoreId(storeId);
|
||||
commissionRecord.setType(staffCommission.getCommissionSource() + "订单出售");
|
||||
commissionRecord.setDescription(staffCommission.getCommissionSource() + "订单出售提成");
|
||||
commissionRecord.setOrderNo(orderNo);
|
||||
Double royaltyRate = Double.valueOf(staffCommission.getRoyaltyRate().substring(0, staffCommission.getRoyaltyRate().length() - 1));
|
||||
String unit = staffCommission.getRoyaltyRate().substring(staffCommission.getRoyaltyRate().length() - 1);
|
||||
// 按照订单金额计算提成
|
||||
if (staffCommission.getType().equals("orderAmount")) {
|
||||
if (amount >= Double.valueOf(staffCommission.getMeetCondition())) {
|
||||
if (unit.equals("元")) {
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")) {
|
||||
commissionRecord.setAmount(amount * (royaltyRate / 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按照实付金额计算提成
|
||||
if (staffCommission.getType().equals("payAmount")) {
|
||||
if (payAmount >= Double.valueOf(staffCommission.getMeetCondition())) {
|
||||
if (unit.equals("元")) {
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")) {
|
||||
commissionRecord.setAmount(payAmount * (royaltyRate / 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type.equals("2") && staffCommission.getCommissionSource().equals("非油品")
|
||||
&& staff.getRoleId().equals(staffCommission.getStaffRoleGroup())){
|
||||
commissionRecord.setStaffId(staffId);
|
||||
commissionRecord.setStoreId(storeId);
|
||||
commissionRecord.setType(staffCommission.getCommissionSource()+"订单出售");
|
||||
commissionRecord.setDescription(staffCommission.getCommissionSource()+"订单出售提成");
|
||||
commissionRecord.setOrderNo(orderNo);
|
||||
Double royaltyRate = Double.valueOf(staffCommission.getRoyaltyRate().substring(0,staffCommission.getRoyaltyRate().length()-1));
|
||||
String unit = staffCommission.getRoyaltyRate().substring(staffCommission.getRoyaltyRate().length()-1);
|
||||
// 按照订单金额计算提成
|
||||
if (staffCommission.getType().equals("orderAmount")){
|
||||
if (amount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(amount*(royaltyRate/100));
|
||||
}
|
||||
}
|
||||
}
|
||||
// 按照实付金额计算提成
|
||||
if (staffCommission.getType().equals("payAmount")){
|
||||
if (payAmount>=Double.valueOf(staffCommission.getMeetCondition())){
|
||||
if (unit.equals("元")){
|
||||
commissionRecord.setAmount(royaltyRate);
|
||||
}
|
||||
if (unit.equals("%")){
|
||||
commissionRecord.setAmount(payAmount*(royaltyRate/100));
|
||||
}
|
||||
}
|
||||
}
|
||||
commissionRecordService.insertRecord(commissionRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -240,13 +240,13 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
LJStaff staff = this.selectStaffById(id);
|
||||
LJStore store = storeService.selectStoreByStoreId(staff.getStoreId());
|
||||
//在图片上生成二维码
|
||||
// String backgroundImage = "/static/qrCodeImg/laigeyouhui_bg.jpg";
|
||||
// String logoImage = "/static/qrCodeImg/logo.png";
|
||||
String backgroundImage = env.getProperty("staff.bg");
|
||||
String logoImage = env.getProperty("staff.logo");
|
||||
String backgroundImage = "/static/qrCodeImg/laigeyouhui_bg.jpg";
|
||||
String logoImage = "/static/qrCodeImg/logo.png";
|
||||
// String backgroundImage = env.getProperty("staff.bg");
|
||||
// String logoImage = env.getProperty("staff.logo");
|
||||
String url = staff.getStaffCode();
|
||||
String area = store.getName();
|
||||
String finalPath="D:/qrCode/" + area + ".jpg";
|
||||
String finalPath="D:/ruoyi/qrCode/" + area + ".jpg";
|
||||
//背景图片路径 loge图片 二维码 输出地址
|
||||
createLogoCodePicture(backgroundImage, logoImage, url, finalPath, area,store.getAddress());
|
||||
|
||||
|
@ -66,7 +66,6 @@
|
||||
<include refid="selectOrders"></include>
|
||||
<where>
|
||||
user_id = #{order.userId}
|
||||
and terminal = 'applet'
|
||||
<if test="order.storeId != null and order.storeId != ''">
|
||||
and store_id = #{order.storeId}
|
||||
</if>
|
||||
|
@ -1038,7 +1038,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
receiveParameter.setGoodsMoney(Double.valueOf(map.get("payAmount")));
|
||||
receiveParameter.setStoreId(oilOrder.getStoreId());
|
||||
receiveParameter.setPayType(oilOrder.getPayType());
|
||||
receiveParameter.setUserId(userId);
|
||||
receiveParameter.setUserId(oilOrder.getUserId());
|
||||
// 调用支付接口
|
||||
try {
|
||||
applet = fyPayService.applet(receiveParameter);
|
||||
|
@ -43,7 +43,7 @@
|
||||
<view class="">{{item.cardChildPhones}}</view>
|
||||
</view>
|
||||
<view class="r-anniu">
|
||||
<span>去完成</span>
|
||||
<span>查看订单</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -289,6 +289,13 @@
|
||||
|
||||
// 支付接口
|
||||
payment(){
|
||||
if (this.isUseChildCard){
|
||||
if(this.balanceRedece>0){
|
||||
this.isUseChildCard = true
|
||||
}else{
|
||||
this.isUseChildCard = false
|
||||
}
|
||||
}
|
||||
let map = {
|
||||
orderNo : this.orderNo,
|
||||
payAmount : this.payAmount,
|
||||
|
Loading…
Reference in New Issue
Block a user