bug
This commit is contained in:
parent
0cf119bfab
commit
e9dd0600c2
@ -145,9 +145,13 @@
|
|||||||
<el-select v-model="form.roleId" placeholder="请选择角色">
|
<el-select v-model="form.roleId" placeholder="请选择角色">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleList"
|
v-for="item in roleList"
|
||||||
:key="item.dutyId"
|
:key="item.dutyId+''"
|
||||||
:label="item.dutyName"
|
:label="item.dutyName"
|
||||||
:value="item.dutyId"
|
:value="item.dutyId+''"
|
||||||
|
></el-option>
|
||||||
|
<el-option
|
||||||
|
label="油站站长"
|
||||||
|
:value="12+''"
|
||||||
></el-option>
|
></el-option>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -602,6 +606,7 @@ export default {
|
|||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.form.auditPrem = this.form.auditPrem.toString();
|
||||||
if (!this.form.id) {
|
if (!this.form.id) {
|
||||||
queryStaff({mobile:this.form.mobile}).then( response => {
|
queryStaff({mobile:this.form.mobile}).then( response => {
|
||||||
if(response.data!=null){
|
if(response.data!=null){
|
||||||
@ -610,19 +615,15 @@ export default {
|
|||||||
this.form.posPrem = JSON.stringify(this.form.posPrem);
|
this.form.posPrem = JSON.stringify(this.form.posPrem);
|
||||||
this.form.appletPrem = JSON.stringify(this.form.appletPrem);
|
this.form.appletPrem = JSON.stringify(this.form.appletPrem);
|
||||||
addStaff(this.form).then(response => {
|
addStaff(this.form).then(response => {
|
||||||
|
if (response.data==1){
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// queryStaff({mobile:this.form.mobile}).then( response => {
|
|
||||||
// if (response.data != null) {
|
|
||||||
// this.$modal.msgError("手机号已存在");
|
|
||||||
// } else {
|
|
||||||
// this.form.posPrem = JSON.stringify(this.form.posPrem);
|
|
||||||
// this.form.appletPrem = JSON.stringify(this.form.appletPrem);
|
|
||||||
updateStaff(this.form).then(response => {
|
updateStaff(this.form).then(response => {
|
||||||
if (response.data==1){
|
if (response.data==1){
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
@ -633,8 +634,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -23,21 +23,21 @@
|
|||||||
@sort-change="handleSortChange">
|
@sort-change="handleSortChange">
|
||||||
<el-table-column label="ID" prop="id" align="center" width="60"/>
|
<el-table-column label="ID" prop="id" align="center" width="60"/>
|
||||||
<el-table-column label="方案名称" prop="name" align="center"/>
|
<el-table-column label="方案名称" prop="name" align="center"/>
|
||||||
<el-table-column label="员工角色" prop="staffRoleGroup" align="center">
|
<el-table-column label="员工角色" prop="dutyName" align="center">
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<dict-tag :options="dict.type.staff_role" :value="scope.row.staffRoleGroup"/>
|
<!-- <dict-tag :options="dict.type.staff_role" :value="scope.row.staffRoleGroup"/>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="提成来源" prop="commissionSource" align="center" />
|
<el-table-column label="提成来源" prop="commissionSource" align="center" />
|
||||||
<el-table-column label="满足条件" prop="meetCondition" align="center">
|
<el-table-column label="满足条件" prop="meetCondition" align="center" width="260">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="form.type == 'orderAmount'">
|
<span v-if="scope.row.type == 'orderAmount'">
|
||||||
订单金额消费满{{scope.row.meetCondition}}元
|
订单金额消费满{{scope.row.meetCondition}}元
|
||||||
</span>
|
</span>
|
||||||
<span v-if="form.type == 'payAmount'">
|
<span v-if="scope.row.type == 'payAmount'">
|
||||||
实际金额消费满{{scope.row.meetCondition}}元
|
实际金额消费满{{scope.row.meetCondition}}元
|
||||||
</span>
|
</span>
|
||||||
<span v-if="form.type == 'refuleNum'">
|
<span v-if="scope.row.type == 'refuleNum'">
|
||||||
加油数量消费满{{scope.row.meetCondition}}单位(升/立方)
|
加油数量消费满{{scope.row.meetCondition}}单位(升/立方)
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -121,12 +121,18 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="角色组" prop="staffRoleGroup">
|
<el-form-item label="角色组" prop="staffRoleGroup">
|
||||||
<el-select v-model="form.staffRoleGroup" placeholder="请选择所属角色">
|
<el-select v-model="form.staffRoleGroup" placeholder="请选择所属角色">
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="dict in dict.type.staff_role"-->
|
||||||
|
<!-- :key="dict.value"-->
|
||||||
|
<!-- :label="dict.label"-->
|
||||||
|
<!-- :value="dict.value"-->
|
||||||
|
<!-- />-->
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.staff_role"
|
v-for="item in roleList"
|
||||||
:key="dict.value"
|
:key="item.dutyId+''"
|
||||||
:label="dict.label"
|
:label="item.dutyName"
|
||||||
:value="dict.value"
|
:value="item.dutyId+''"
|
||||||
/>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -134,9 +140,12 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="提成类型" prop="type">
|
<el-form-item label="提成类型" prop="type">
|
||||||
<el-radio-group v-model="form.type">
|
<el-radio-group v-model="form.type" v-if="form.commissionSource=='油品'">
|
||||||
<el-radio v-for="dict in dict.type.comissionType" :label="dict.value">{{ dict.label }}</el-radio>
|
<el-radio v-for="dict in dict.type.comissionType" :label="dict.value">{{ dict.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
<el-radio-group v-model="form.type" v-else>
|
||||||
|
<el-radio v-for="dict in dict.type.comissionType" :label="dict.value" v-if="dict.value!='refuleNum'">{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -216,6 +225,7 @@ import {
|
|||||||
queryCommission,
|
queryCommission,
|
||||||
updateCommission
|
updateCommission
|
||||||
} from "@/api/staffCommission/staffcommission";
|
} from "@/api/staffCommission/staffcommission";
|
||||||
|
import {listDuty} from "@/api/staff/duty";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
dicts: ['source','role','zhzt','comissionType','staff_role'],
|
dicts: ['source','role','zhzt','comissionType','staff_role'],
|
||||||
@ -252,6 +262,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
roleList:[],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
@ -283,8 +294,15 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getDuty();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
// 查询角色列表
|
||||||
|
getDuty(){
|
||||||
|
listDuty().then(response => {
|
||||||
|
this.roleList = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
// 点击标签页
|
// 点击标签页
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
if (this.activeName == 'oil'){
|
if (this.activeName == 'oil'){
|
||||||
@ -378,70 +396,63 @@ export default {
|
|||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// let date = new Date();
|
|
||||||
// let year = date.getFullYear()
|
|
||||||
// let month = date.getMonth()+1
|
|
||||||
// let day = date.getDate()
|
|
||||||
// let hour = date.getHours()
|
|
||||||
// let minutes = date.getMinutes()
|
|
||||||
// let second = date.getSeconds()
|
|
||||||
// let now = year+"-"+this.add0(month)+"-"+this.add0(day)+" "+hour+":"+minutes+":"+second
|
|
||||||
// if(this.form.takeEffect[0] < now && this.form.takeEffect[1] > now){
|
|
||||||
// this.form.status = 'qy'
|
|
||||||
// }else {
|
|
||||||
// this.form.status = 'jy'
|
|
||||||
// }
|
|
||||||
// // this.form.commissionSource = this.commissionSource.toString()
|
|
||||||
// this.form.takeEffect = JSON.stringify(this.form.takeEffect)
|
|
||||||
if (this.form.id) {
|
if (this.form.id) {
|
||||||
if (this.changeCom){
|
// if (this.changeCom){
|
||||||
queryCommission(this.form).then(response => {
|
// queryCommission(this.form).then(response => {
|
||||||
if (response.data != null) {
|
// if (response.data != null) {
|
||||||
if (this.changeCom) {
|
// if (this.changeCom) {
|
||||||
this.$modal.msgError("同一个角色组只能对应一个" + this.form.commissionSource + "提成方案")
|
// this.$modal.msgError("同一个角色组只能对应一个" + this.form.commissionSource + "提成方案")
|
||||||
}else {
|
// }else {
|
||||||
this.$modal.msgError("当前时间段已存在相同油品、相同角色组的方案")
|
// this.$modal.msgError("当前时间段已存在相同油品、相同角色组的方案")
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
// this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||||
updateCommission(this.form).then(response => {
|
// updateCommission(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("提成方案更新成功");
|
// this.$modal.msgSuccess("提成方案更新成功");
|
||||||
this.open = false;
|
// this.open = false;
|
||||||
this.changeCom = false;
|
// this.changeCom = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}else {
|
// }else {
|
||||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||||
updateCommission(this.form).then(response => {
|
updateCommission(this.form).then(response => {
|
||||||
|
if (response.data==1){
|
||||||
this.$modal.msgSuccess("提成方案更新成功");
|
this.$modal.msgSuccess("提成方案更新成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
|
||||||
}
|
|
||||||
}else {
|
}else {
|
||||||
queryCommission(this.form).then(response => {
|
|
||||||
if (response.data != null){
|
|
||||||
if (response.data.status == 'qy'){
|
|
||||||
this.$modal.msgError("同一个角色组只能对应一个" + this.form.commissionSource + "提成方案")
|
this.$modal.msgError("同一个角色组只能对应一个" + this.form.commissionSource + "提成方案")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
|
// queryCommission(this.form).then(response => {
|
||||||
|
// if (response.data != null){
|
||||||
|
// if (response.data.status == 'qy'){
|
||||||
|
// this.$modal.msgError("同一个角色组只能对应一个"+this.form.commissionSource+"提成方案")
|
||||||
|
// }else {
|
||||||
|
// this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||||
|
// addCommission(this.form).then(response => {
|
||||||
|
// this.$modal.msgSuccess("提成方案新增成功");
|
||||||
|
// this.open = false;
|
||||||
|
// this.getList();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }else {
|
||||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
this.form.royaltyRate = this.form.royaltyRate + this.select
|
||||||
addCommission(this.form).then(response => {
|
addCommission(this.form).then(response => {
|
||||||
|
if (response.data==1) {
|
||||||
this.$modal.msgSuccess("提成方案新增成功");
|
this.$modal.msgSuccess("提成方案新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
|
||||||
}
|
|
||||||
}else {
|
}else {
|
||||||
this.form.royaltyRate = this.form.royaltyRate + this.select
|
this.$modal.msgError("同一个角色组只能对应一个"+this.form.commissionSource+"提成方案")
|
||||||
addCommission(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("提成方案新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -48,7 +48,7 @@ Vue.prototype.getName = getName
|
|||||||
Vue.prototype.download = download
|
Vue.prototype.download = download
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||||
Vue.prototype.pcUrl = 'http://192.168.0.178:82/'
|
Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
Vue.component('DictTag', DictTag)
|
Vue.component('DictTag', DictTag)
|
||||||
|
@ -34,7 +34,7 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
|||||||
* 根据店铺id查询商户信息
|
* 根据店铺id查询商户信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<MerchantConfig> selectMeChByIsOpen();
|
public List<MerchantConfig> selectMeChByIsOpen(Integer storeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有商户配置信息
|
* 查询所有商户配置信息
|
||||||
|
@ -483,13 +483,20 @@ public class FyPayServiceImpl implements FyPayService {
|
|||||||
allOrderInfo.setType(receiveParameter.getType());
|
allOrderInfo.setType(receiveParameter.getType());
|
||||||
allOrderInfo.setStoreId(receiveParameter.getStoreId());
|
allOrderInfo.setStoreId(receiveParameter.getStoreId());
|
||||||
allOrderInfo.setGoodsMoney(receiveParameter.getGoodsMoney());
|
allOrderInfo.setGoodsMoney(receiveParameter.getGoodsMoney());
|
||||||
|
allOrderInfo.setPayMoney(receiveParameter.getGoodsMoney());
|
||||||
allOrderInfo.setPayType(receiveParameter.getPayType());
|
allOrderInfo.setPayType(receiveParameter.getPayType());
|
||||||
allOrderInfo.setUserId(receiveParameter.getUserId());
|
allOrderInfo.setUserId(receiveParameter.getUserId());
|
||||||
allOrderInfo.setPayChannel("cashier");
|
allOrderInfo.setPayChannel("cashier");
|
||||||
allOrderInfo.setStatus(payStatus);
|
allOrderInfo.setStatus(payStatus);
|
||||||
|
if (payStatus.equals("paid")){
|
||||||
|
allOrderInfo.setPayTime(new Date());
|
||||||
|
}
|
||||||
allOrderInfo.setContent(receiveParameter.getContent());
|
allOrderInfo.setContent(receiveParameter.getContent());
|
||||||
|
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(receiveParameter.getOrderNo());
|
||||||
|
if (ObjectUtil.isEmpty(allOrderInfo1)){
|
||||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加所有订单信息
|
* 添加所有订单信息
|
||||||
@ -505,8 +512,11 @@ public class FyPayServiceImpl implements FyPayService {
|
|||||||
allOrderInfo.setPayChannel("applet");
|
allOrderInfo.setPayChannel("applet");
|
||||||
allOrderInfo.setStatus("unpaid");
|
allOrderInfo.setStatus("unpaid");
|
||||||
allOrderInfo.setContent(receiveParameter.getContent());
|
allOrderInfo.setContent(receiveParameter.getContent());
|
||||||
|
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(receiveParameter.getOrderNo());
|
||||||
|
if (ObjectUtil.isEmpty(allOrderInfo1)){
|
||||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> refund(Map<String, String> map1) throws Exception {
|
public Map<String, String> refund(Map<String, String> map1) throws Exception {
|
||||||
|
@ -46,9 +46,10 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MerchantConfig> selectMeChByIsOpen() {
|
public List<MerchantConfig> selectMeChByIsOpen(Integer storeId) {
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("is_open_rule","1");
|
queryWrapper.eq("is_open_rule","1");
|
||||||
|
queryWrapper.eq("store_id",storeId);
|
||||||
List list = baseMapper.selectList(queryWrapper);
|
List list = baseMapper.selectList(queryWrapper);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.commission.entity.StaffCommission;
|
import com.fuint.business.commission.entity.StaffCommission;
|
||||||
import com.fuint.business.commission.service.StaffCommissionService;
|
import com.fuint.business.commission.service.StaffCommissionService;
|
||||||
|
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -31,7 +32,7 @@ public class StaffCommissionController extends BaseController {
|
|||||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||||
Page page =new Page(pageNo,pageSize);
|
Page page =new Page(pageNo,pageSize);
|
||||||
IPage<StaffCommission> list = commissionService.selectCommissionList(page,commission);
|
IPage<StaffCommissionVo> list = commissionService.selectCommissionList(page,commission);
|
||||||
return getSuccessResult(list);
|
return getSuccessResult(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.commission.entity.StaffCommission;
|
import com.fuint.business.commission.entity.StaffCommission;
|
||||||
|
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
public interface StaffCommissionMapper extends BaseMapper<StaffCommission> {
|
public interface StaffCommissionMapper extends BaseMapper<StaffCommission> {
|
||||||
@ -12,5 +13,5 @@ public interface StaffCommissionMapper extends BaseMapper<StaffCommission> {
|
|||||||
* @param page
|
* @param page
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public IPage<StaffCommission> selectCommissionList(Page page,@Param("commission") StaffCommission commission);
|
public IPage<StaffCommissionVo> selectCommissionList(Page page, @Param("commission") StaffCommission commission);
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.fuint.business.commission.mapper.StaffCommissionMapper">
|
<mapper namespace="com.fuint.business.commission.mapper.StaffCommissionMapper">
|
||||||
<sql id="selectCommission">
|
<sql id="selectCommission">
|
||||||
select * from staff_commission
|
select sc.*,td.duty_name from staff_commission sc left join t_duty td on sc.staff_role_group = td.duty_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectCommissionList" resultType="com.fuint.business.commission.entity.StaffCommission">
|
<select id="selectCommissionList" resultType="com.fuint.business.commission.vo.StaffCommissionVo">
|
||||||
<include refid="selectCommission"></include>
|
<include refid="selectCommission"></include>
|
||||||
<where>
|
<where>
|
||||||
store_id = #{commission.storeId}
|
sc.store_id = #{commission.storeId}
|
||||||
and commission_source = #{commission.commissionSource}
|
and sc.commission_source = #{commission.commissionSource}
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -56,4 +56,10 @@ public interface CommissionRecordService {
|
|||||||
*/
|
*/
|
||||||
boolean deleteById(Integer id);
|
boolean deleteById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加提成记录信息
|
||||||
|
* @param commissionRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insertRecord(CommissionRecord commissionRecord);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.fuint.business.commission.entity.StaffCommission;
|
import com.fuint.business.commission.entity.StaffCommission;
|
||||||
|
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -17,7 +18,7 @@ public interface StaffCommissionService extends IService<StaffCommission> {
|
|||||||
* @param page
|
* @param page
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public IPage<StaffCommission> selectCommissionList(Page page, StaffCommission commission);
|
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询员工提成方案信息
|
* 根据id查询员工提成方案信息
|
||||||
@ -53,4 +54,15 @@ public interface StaffCommissionService extends IService<StaffCommission> {
|
|||||||
*/
|
*/
|
||||||
public int updateStaffCommission(StaffCommission commission);
|
public int updateStaffCommission(StaffCommission commission);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据员工id计算提成金额
|
||||||
|
* @param staffId 员工id
|
||||||
|
* @param storeId 店铺id
|
||||||
|
* @param amount 订单金额
|
||||||
|
* @param payAmount 实付金额
|
||||||
|
* @param oilLiters 油品消费升数
|
||||||
|
* @param type 订单类型(油品、非油品)
|
||||||
|
* @param orderNo 关联订单号
|
||||||
|
*/
|
||||||
|
void countStaffCommission(Integer staffId,Integer storeId,Double amount,Double payAmount,Double oilLiters,String type,String orderNo);
|
||||||
}
|
}
|
||||||
|
@ -92,4 +92,9 @@ public class CommissionRecordServiceImpl implements CommissionRecordService {
|
|||||||
public boolean deleteById(Integer id) {
|
public boolean deleteById(Integer id) {
|
||||||
return this.commissionRecordMapper.deleteById(id) > 0;
|
return this.commissionRecordMapper.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertRecord(CommissionRecord commissionRecord) {
|
||||||
|
return commissionRecordMapper.insert(commissionRecord);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
package com.fuint.business.commission.service.impl;
|
package com.fuint.business.commission.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.commission.entity.CommissionRecord;
|
||||||
import com.fuint.business.commission.entity.StaffCommission;
|
import com.fuint.business.commission.entity.StaffCommission;
|
||||||
import com.fuint.business.commission.mapper.StaffCommissionMapper;
|
import com.fuint.business.commission.mapper.StaffCommissionMapper;
|
||||||
|
import com.fuint.business.commission.service.CommissionRecordService;
|
||||||
import com.fuint.business.commission.service.StaffCommissionService;
|
import com.fuint.business.commission.service.StaffCommissionService;
|
||||||
|
import com.fuint.business.commission.vo.StaffCommissionVo;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -26,26 +31,12 @@ import java.util.Map;
|
|||||||
@Service
|
@Service
|
||||||
public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMapper, StaffCommission> implements StaffCommissionService {
|
public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMapper, StaffCommission> implements StaffCommissionService {
|
||||||
@Override
|
@Override
|
||||||
public IPage<StaffCommission> selectCommissionList(Page page, StaffCommission commission) {
|
public IPage<StaffCommissionVo> selectCommissionList(Page page, StaffCommission commission) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
commission.setStoreId(storeId);
|
commission.setStoreId(storeId);
|
||||||
IPage<StaffCommission> staffCommissionIPage = baseMapper.selectCommissionList(page, commission);
|
IPage<StaffCommissionVo> staffCommissionIPage = baseMapper.selectCommissionList(page, commission);
|
||||||
for (StaffCommission record : staffCommissionIPage.getRecords()) {
|
return staffCommissionIPage;
|
||||||
if (record.getTakeEffect()!=null && record.getTakeEffect().equals("")){
|
|
||||||
String substring = record.getTakeEffect().substring(24, 43);
|
|
||||||
Date date = new Date();
|
|
||||||
SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
String now = dateFormat.format(date);
|
|
||||||
int row = substring.compareTo(now);
|
|
||||||
if (row == -1){
|
|
||||||
record.setStatus("jy");
|
|
||||||
baseMapper.updateById(record);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
IPage<StaffCommission> commissionIPage = baseMapper.selectCommissionList(page, commission);
|
|
||||||
return commissionIPage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -74,18 +65,90 @@ public class StaffCommissionServiceImpl extends ServiceImpl<StaffCommissionMappe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertStaffCommission(StaffCommission commission) {
|
public int insertStaffCommission(StaffCommission commission) {
|
||||||
|
StaffCommission staffCommission = this.selectCommissionByRole(commission);
|
||||||
|
int row = 0;
|
||||||
|
// 判断当前店铺是否存在同角色的同一提成方案
|
||||||
|
if (ObjectUtil.isNotEmpty(staffCommission)){
|
||||||
|
row = 0;
|
||||||
|
return row;
|
||||||
|
}
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
commission.setStoreId(storeId);
|
commission.setStoreId(storeId);
|
||||||
int row = baseMapper.insert(commission);
|
row = baseMapper.insert(commission);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int updateStaffCommission(StaffCommission commission) {
|
public int updateStaffCommission(StaffCommission commission) {
|
||||||
int row = baseMapper.updateById(commission);
|
StaffCommission staffCommission = this.selectCommissionByRole(commission);
|
||||||
|
int row = 0;
|
||||||
|
// 判断当前店铺是否存在同角色的同一提成方案
|
||||||
|
if (ObjectUtil.isNotEmpty(staffCommission) && staffCommission.getId()!=commission.getId()){
|
||||||
|
row = 0;
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
row = baseMapper.updateById(commission);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CommissionRecordService commissionRecordService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void countStaffCommission(Integer staffId,Integer storeId,Double amount,Double payAmount,Double oilLiters,String type,String orderNo) {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("store_id",storeId);
|
||||||
|
queryWrapper.eq("status","qy");
|
||||||
|
// 查询当前店铺启用的提成方案信息
|
||||||
|
List<StaffCommission> list = baseMapper.selectList(queryWrapper);
|
||||||
|
if (list.size()>0){
|
||||||
|
for (StaffCommission staffCommission : list) {
|
||||||
|
CommissionRecord commissionRecord = new CommissionRecord();
|
||||||
|
if (type.equals(staffCommission.getCommissionSource())){
|
||||||
|
commissionRecord.setStaffId(staffId);
|
||||||
|
commissionRecord.setStoreId(storeId);
|
||||||
|
commissionRecord.setType(type+"订单出售");
|
||||||
|
commissionRecord.setDescription(type+"订单出售提成");
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 按照加油数量计算提成
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.fuint.business.commission.vo;
|
||||||
|
|
||||||
|
import com.fuint.business.commission.entity.StaffCommission;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StaffCommissionVo extends StaffCommission {
|
||||||
|
/**
|
||||||
|
* 角色名
|
||||||
|
*/
|
||||||
|
private String dutyName;
|
||||||
|
}
|
@ -508,7 +508,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
|||||||
if (flag) {
|
if (flag) {
|
||||||
// 调用支付接口
|
// 调用支付接口
|
||||||
// 判断是否开启支付规则
|
// 判断是否开启支付规则
|
||||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen();
|
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(integralOrdersList.getStoreId());
|
||||||
// if (list.size() > 0) {
|
// if (list.size() > 0) {
|
||||||
// oilConfigService.oilRule();
|
// oilConfigService.oilRule();
|
||||||
// }
|
// }
|
||||||
|
@ -423,10 +423,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
public PaymentActiveVO paymentActive(PaymentActiveDTO paymentActiveDTO) {
|
public PaymentActiveVO paymentActive(PaymentActiveDTO paymentActiveDTO) {
|
||||||
PaymentActiveVO paymentActiveVO = new PaymentActiveVO();
|
PaymentActiveVO paymentActiveVO = new PaymentActiveVO();
|
||||||
Integer storeId = paymentActiveDTO.getStoreId();
|
Integer storeId = paymentActiveDTO.getStoreId();
|
||||||
BigDecimal amount = new BigDecimal(0.00);
|
BigDecimal amount = new BigDecimal("0.00");
|
||||||
BigDecimal fullAmount = new BigDecimal(0.00);
|
BigDecimal fullAmount = new BigDecimal("0.00");
|
||||||
BigDecimal a = new BigDecimal(0.1);
|
BigDecimal a = new BigDecimal("0.1");
|
||||||
BigDecimal b = new BigDecimal(10);
|
BigDecimal b = new BigDecimal("10");
|
||||||
//折扣
|
//折扣
|
||||||
List<ActiveDiscountPayVO> activeDiscountVOList = oilOrderMapper.selectActiveDiscount(storeId,paymentActiveDTO.getAmount());
|
List<ActiveDiscountPayVO> activeDiscountVOList = oilOrderMapper.selectActiveDiscount(storeId,paymentActiveDTO.getAmount());
|
||||||
if (CollectionUtils.isNotEmpty(activeDiscountVOList)){
|
if (CollectionUtils.isNotEmpty(activeDiscountVOList)){
|
||||||
|
@ -125,7 +125,7 @@ public class OilOrder extends BaseEntity implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 油罐id
|
* 油罐id
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
// @TableField(exist = false)
|
||||||
private Integer tankId;
|
private Integer tankId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,17 +39,17 @@ public interface HangBillMapper extends BaseMapper<HangBill> {
|
|||||||
* 查询当前店铺所有的订单总额
|
* 查询当前店铺所有的订单总额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
double selectAllAmount(@Param("storeId") int storeId);
|
Double selectAllAmount(@Param("storeId") int storeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当前店铺归还的账单总额
|
* 查询当前店铺归还的账单总额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
double selectReturnAmount(@Param("storeId") int storeId);
|
Double selectReturnAmount(@Param("storeId") int storeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当前店铺未归还的账单总额
|
* 查询当前店铺未归还的账单总额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
double selectNoReturnAmount(@Param("storeId") int storeId);
|
Double selectNoReturnAmount(@Param("storeId") int storeId);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and date_format(pay_time,'%y%m%d') <= date_format(#{allOrderInfo.params.endTime},'%y%m%d')
|
and date_format(pay_time,'%y%m%d') <= date_format(#{allOrderInfo.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
order by pay_time desc
|
order by aoi.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="sumPayMoney" resultType="java.lang.String">
|
<select id="sumPayMoney" resultType="java.lang.String">
|
||||||
select
|
select
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<if test="order.status != null and order.status != ''">
|
<if test="order.status != null and order.status != ''">
|
||||||
and cvco.status = #{order.status}
|
and cvco.status = #{order.status}
|
||||||
</if>
|
</if>
|
||||||
order by cvco.pay_time desc
|
order by cvco.create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -24,7 +24,7 @@
|
|||||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
order by pay_time desc
|
order by create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCashierOrderById" resultType="com.fuint.business.order.vo.CashierOrderVo"
|
<select id="selectCashierOrderById" resultType="com.fuint.business.order.vo.CashierOrderVo"
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
|
order by create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
<select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
||||||
@ -52,13 +53,13 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAllAmount" resultType="double">
|
<select id="selectAllAmount" resultType="java.lang.Double">
|
||||||
select sum(amount) from hang_bill where store_id = #{storeId}
|
select sum(amount) from hang_bill where store_id = #{storeId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectReturnAmount" resultType="double">
|
<select id="selectReturnAmount" resultType="java.lang.Double">
|
||||||
select sum(repaid_amount) from hang_bill where store_id = #{storeId}
|
select sum(repaid_amount) from hang_bill where store_id = #{storeId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectNoReturnAmount" resultType="double">
|
<select id="selectNoReturnAmount" resultType="java.lang.Double">
|
||||||
select sum(outstand_amount) from hang_bill where store_id = #{storeId}
|
select sum(outstand_amount) from hang_bill where store_id = #{storeId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -30,7 +30,7 @@
|
|||||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and date_format(create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
and date_format(create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
order by pay_time desc
|
order by create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="getMtOrderList" resultType="com.fuint.business.order.vo.LJOrderVo">
|
<select id="getMtOrderList" resultType="com.fuint.business.order.vo.LJOrderVo">
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="order.params.endTime != null and order.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
and date_format(pay_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
order by pay_time desc
|
order by create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectOilOrderByOrderNo" resultType="com.fuint.business.order.vo.OilOrderVo"
|
<select id="selectOilOrderByOrderNo" resultType="com.fuint.business.order.vo.OilOrderVo"
|
||||||
@ -75,7 +75,7 @@
|
|||||||
<if test="order.remark != null and order.remark != ''">
|
<if test="order.remark != null and order.remark != ''">
|
||||||
and remark = #{order.remark}
|
and remark = #{order.remark}
|
||||||
</if>
|
</if>
|
||||||
order by pay_time desc
|
order by create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<include refid="selectReturnRecord"></include>
|
<include refid="selectReturnRecord"></include>
|
||||||
<where>
|
<where>
|
||||||
rd.hang_bill_id = #{returnRecord.hangBillId}
|
rd.hang_bill_id = #{returnRecord.hangBillId}
|
||||||
order by pay_time desc
|
order by rd.create_time desc
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<!-- <select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">-->
|
<!-- <select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">-->
|
||||||
|
@ -83,7 +83,7 @@ public interface HangBillService extends IService<HangBill> {
|
|||||||
* 查询当前店铺所有的订单总额
|
* 查询当前店铺所有的订单总额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
double selectAllAmount();
|
Double selectAllAmount();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当前店铺归还账单的数量
|
* 查询当前店铺归还账单的数量
|
||||||
@ -95,11 +95,11 @@ public interface HangBillService extends IService<HangBill> {
|
|||||||
* 查询当前店铺归还的账单总额
|
* 查询当前店铺归还的账单总额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
double selectReturnAmount();
|
Double selectReturnAmount();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当前店铺未归还的账单总额
|
* 查询当前店铺未归还的账单总额
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
double selectNoReturnAmount();
|
Double selectNoReturnAmount();
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double selectAllAmount() {
|
public Double selectAllAmount() {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
return baseMapper.selectAllAmount(nowAccountInfo.getStoreId());
|
return baseMapper.selectAllAmount(nowAccountInfo.getStoreId());
|
||||||
}
|
}
|
||||||
@ -269,13 +269,13 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double selectReturnAmount() {
|
public Double selectReturnAmount() {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
return baseMapper.selectReturnAmount(nowAccountInfo.getStoreId());
|
return baseMapper.selectReturnAmount(nowAccountInfo.getStoreId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double selectNoReturnAmount() {
|
public Double selectNoReturnAmount() {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
return baseMapper.selectNoReturnAmount(nowAccountInfo.getStoreId());
|
return baseMapper.selectNoReturnAmount(nowAccountInfo.getStoreId());
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
if (!map.get("repaidAmount").equals("0") && !payType.equals("CASH")){
|
if (!map.get("repaidAmount").equals("0") && !payType.equals("CASH")){
|
||||||
Integer allAmount = (int) (Double.valueOf(map.get("repaidAmount"))*100);
|
Integer allAmount = (int) (Double.valueOf(map.get("repaidAmount"))*100);
|
||||||
// 判断是否开启支付规则
|
// 判断是否开启支付规则
|
||||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen();
|
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(storeId);
|
||||||
if (list.size()>0){
|
if (list.size()>0){
|
||||||
oilConfigService.oilRule();
|
oilConfigService.oilRule();
|
||||||
}
|
}
|
||||||
|
@ -369,6 +369,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
order.setPayType(payType);
|
order.setPayType(payType);
|
||||||
order.setInvoicing("未开票");
|
order.setInvoicing("未开票");
|
||||||
order.setOrderStatus(payStatus);
|
order.setOrderStatus(payStatus);
|
||||||
|
order.setTankId(Integer.valueOf(jsonObjects.get(0).get("tankId").toString()));
|
||||||
if (payType.equals("CASH")){
|
if (payType.equals("CASH")){
|
||||||
order.setPayTime(new Date());
|
order.setPayTime(new Date());
|
||||||
this.addOilTrack(jsonObjects.get(i),storeId);
|
this.addOilTrack(jsonObjects.get(i),storeId);
|
||||||
@ -386,7 +387,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH")){
|
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH")){
|
||||||
Integer allAmount = (int) (Double.valueOf(map.get("allAmount"))*100);
|
Integer allAmount = (int) (Double.valueOf(map.get("allAmount"))*100);
|
||||||
// 判断是否开启支付规则
|
// 判断是否开启支付规则
|
||||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen();
|
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(storeId);
|
||||||
if (list.size()>0){
|
if (list.size()>0){
|
||||||
oilConfigService.oilRule();
|
oilConfigService.oilRule();
|
||||||
}
|
}
|
||||||
@ -1173,7 +1174,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
int growth = balance.getGrowthValue();
|
int growth = balance.getGrowthValue();
|
||||||
if (refuelMoney==null){
|
if (refuelMoney==null){
|
||||||
String refuelMoney1 = balance.getRefuelMoney();
|
String refuelMoney1 = balance.getRefuelMoney();
|
||||||
if (StringUtils.isNotEmpty(refuelMoney1)){
|
if (StringUtils.isNotEmpty(refuelMoney1) && !"null".equals(refuelMoney1)){
|
||||||
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
JSONArray objects = JSONArray.parseArray(refuelMoney);
|
||||||
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
JSONArray objects1 = JSONArray.parseArray(refuelMoney1);
|
||||||
List<RefuelMoney> list = new ArrayList<>();
|
List<RefuelMoney> list = new ArrayList<>();
|
||||||
|
@ -129,7 +129,7 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
|
|||||||
res.put("userGrade",baseMapper.selectById(Integer.valueOf(gradeId)));
|
res.put("userGrade",baseMapper.selectById(Integer.valueOf(gradeId)));
|
||||||
return res;
|
return res;
|
||||||
}else {
|
}else {
|
||||||
return null;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -806,13 +806,19 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
this.returnTotal = res.data
|
this.returnTotal = res.data
|
||||||
})
|
})
|
||||||
hangBillAllAmount().then(res => {
|
hangBillAllAmount().then(res => {
|
||||||
|
if (res.data) {
|
||||||
this.allAmount = res.data
|
this.allAmount = res.data
|
||||||
|
}
|
||||||
})
|
})
|
||||||
hangBillAllReturnAmount().then(res => {
|
hangBillAllReturnAmount().then(res => {
|
||||||
|
if (res.data) {
|
||||||
this.returnAllAmount = res.data
|
this.returnAllAmount = res.data
|
||||||
|
}
|
||||||
})
|
})
|
||||||
hangBillAllNoReturnAmount().then(res => {
|
hangBillAllNoReturnAmount().then(res => {
|
||||||
|
if (res.data) {
|
||||||
this.noReturnAllAmount = res.data
|
this.noReturnAllAmount = res.data
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getPayMeth(list,val){
|
getPayMeth(list,val){
|
||||||
|
@ -508,6 +508,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 立即结算-->
|
||||||
|
<el-dialog
|
||||||
|
title="扫码支付"
|
||||||
|
:visible.sync="dialogVisiblejLoading"
|
||||||
|
width="30%"
|
||||||
|
:close-on-click-modal="false">
|
||||||
|
<div>
|
||||||
|
<el-result icon="info" title="支付状态未查询成功,请移至订单查看">
|
||||||
|
<template slot="extra">
|
||||||
|
<el-button type="primary" @click="handClose">关 闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-result>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 会员登录-->
|
<!-- 会员登录-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="会员信息"
|
title="会员信息"
|
||||||
@ -883,8 +898,11 @@
|
|||||||
oilGunList:[],
|
oilGunList:[],
|
||||||
// 支付方式列表
|
// 支付方式列表
|
||||||
payList:[],
|
payList:[],
|
||||||
|
// 倒计时
|
||||||
|
timestamp: 15,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogVisiblej: false,
|
dialogVisiblej: false,
|
||||||
|
dialogVisiblejLoading: false,
|
||||||
dialogVisiblevip:false,
|
dialogVisiblevip:false,
|
||||||
dialogVisibleamount:false,
|
dialogVisibleamount:false,
|
||||||
dialogVisibleMember:false,
|
dialogVisibleMember:false,
|
||||||
@ -2299,6 +2317,7 @@
|
|||||||
},
|
},
|
||||||
// 重置油品订单
|
// 重置油品订单
|
||||||
resetting(){
|
resetting(){
|
||||||
|
this.seekZero = 0;
|
||||||
this.oilOrder = [];
|
this.oilOrder = [];
|
||||||
this.oilActualPay = 0;
|
this.oilActualPay = 0;
|
||||||
this.oilTotal = 0;
|
this.oilTotal = 0;
|
||||||
@ -2339,7 +2358,6 @@
|
|||||||
|
|
||||||
// 校验油罐内油是否足够
|
// 校验油罐内油是否足够
|
||||||
getOilTank(this.form.tankId).then(res => {
|
getOilTank(this.form.tankId).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.data.storedQuantity-this.form.liters<0){
|
if (res.data.storedQuantity-this.form.liters<0){
|
||||||
this.$modal.msgError("所加油的升数大于油罐内的升数,请重新选择加油升数")
|
this.$modal.msgError("所加油的升数大于油罐内的升数,请重新选择加油升数")
|
||||||
return;
|
return;
|
||||||
@ -2546,7 +2564,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.authCode){
|
if (!this.authCode && ((+this.oilActualPay) + (+this.goodsActualPay))>0){
|
||||||
this.$modal.msgError("请先扫码");
|
this.$modal.msgError("请先扫码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2654,6 +2672,7 @@
|
|||||||
_this.oilOrder = []
|
_this.oilOrder = []
|
||||||
_this.goodsOrder = []
|
_this.goodsOrder = []
|
||||||
_this.amount = 0
|
_this.amount = 0
|
||||||
|
_this.seekZero = 0;
|
||||||
};
|
};
|
||||||
this.userNo = ""
|
this.userNo = ""
|
||||||
this.map = {
|
this.map = {
|
||||||
@ -2724,6 +2743,7 @@
|
|||||||
if (response.data!=null){
|
if (response.data!=null){
|
||||||
if (response.data.status == "unpaid"){
|
if (response.data.status == "unpaid"){
|
||||||
_this.isQuery = true;
|
_this.isQuery = true;
|
||||||
|
_this.dialogVisiblejLoading = true
|
||||||
}
|
}
|
||||||
if (response.data.status == "paid"){
|
if (response.data.status == "paid"){
|
||||||
_this.isPay = true;
|
_this.isPay = true;
|
||||||
@ -2749,7 +2769,8 @@
|
|||||||
let timer2 = setInterval(function () {
|
let timer2 = setInterval(function () {
|
||||||
if (_this.isQuery || !_this.dialogVisiblej) {
|
if (_this.isQuery || !_this.dialogVisiblej) {
|
||||||
_this.loading = false;
|
_this.loading = false;
|
||||||
_this.isPay = true;
|
// _this.isPay = true;
|
||||||
|
// _this.countdown()
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
clearTimeout(timer3);
|
clearTimeout(timer3);
|
||||||
|
|
||||||
@ -2764,7 +2785,22 @@
|
|||||||
this.isPaySuccess = false;
|
this.isPaySuccess = false;
|
||||||
}, 10000)
|
}, 10000)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 倒计时刷新
|
||||||
|
countdown(){
|
||||||
|
let _this = this
|
||||||
|
let timer = setInterval(() => {
|
||||||
|
// countdown减1
|
||||||
|
_this.timestamp--;
|
||||||
|
// 如果倒计时为0,清除定时器
|
||||||
|
if(_this.timestamp === 0) {
|
||||||
|
clearInterval(timer)
|
||||||
|
_this.timestamp = 15
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
handClose(){
|
handClose(){
|
||||||
|
this.dialogVisiblejLoading = false
|
||||||
// this.resetting1()
|
// this.resetting1()
|
||||||
this.authCode = "";
|
this.authCode = "";
|
||||||
this.userNo = ""
|
this.userNo = ""
|
||||||
|
@ -145,7 +145,11 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column>
|
<el-table-column prop="terminal" label="终端" align="center" width="80">
|
||||||
|
<template slot-scope="props">
|
||||||
|
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="oils" label="油品/油枪" align="center">
|
<el-table-column prop="oils" label="油品/油枪" align="center">
|
||||||
<template slot-scope="props">
|
<template slot-scope="props">
|
||||||
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
|
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
|
||||||
@ -252,6 +256,8 @@
|
|||||||
cash:'0',
|
cash:'0',
|
||||||
},
|
},
|
||||||
oilGunList:[],
|
oilGunList:[],
|
||||||
|
// 终端列表
|
||||||
|
terminalList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -261,6 +267,15 @@
|
|||||||
this.getOilGunList();
|
this.getOilGunList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getVal(list,val){
|
||||||
|
let name = "";
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.dictValue == val){
|
||||||
|
name = item.dictLabel
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return name;
|
||||||
|
},
|
||||||
// 获取油枪信息
|
// 获取油枪信息
|
||||||
getOilGunList(){
|
getOilGunList(){
|
||||||
getOilNumberGun().then(res => {
|
getOilNumberGun().then(res => {
|
||||||
@ -356,6 +371,9 @@
|
|||||||
queryStaffs().then( response => {
|
queryStaffs().then( response => {
|
||||||
this.staffList = response.data;
|
this.staffList = response.data;
|
||||||
})
|
})
|
||||||
|
getDicts("terminal").then( response => {
|
||||||
|
this.terminalList = response.data;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
getList(val){
|
getList(val){
|
||||||
|
@ -335,6 +335,7 @@
|
|||||||
this.oilOrder.storeId = this.storeId
|
this.oilOrder.storeId = this.storeId
|
||||||
this.oilOrder.staffId = id
|
this.oilOrder.staffId = id
|
||||||
this.oilOrder.oilNum = Math.ceil((this.value/this.oilPrice)*100)/100
|
this.oilOrder.oilNum = Math.ceil((this.value/this.oilPrice)*100)/100
|
||||||
|
this.oilOrder.tankId = uni.getStorageSync("tankId")
|
||||||
let _this = this;
|
let _this = this;
|
||||||
// 添加油品订单信息
|
// 添加油品订单信息
|
||||||
request({
|
request({
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<view style="background-color: white;width: 94%;margin: 15px auto;">
|
<view style="background-color: white;width: 94%;margin: 15px auto;">
|
||||||
|
|
||||||
<view class="desc" v-if="isStoreValueCard">
|
<view class="desc">
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
储值卡
|
储值卡
|
||||||
<span style="display: flex;">(<span v-if="isUseChildCard">主卡</span>余额:¥{{user.cardBalance}})</span>
|
<span style="display: flex;">(<span v-if="isUseChildCard">主卡</span>余额:¥{{user.cardBalance}})</span>
|
||||||
@ -74,7 +74,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="desc" v-if="isFullPreferential">
|
<view class="desc">
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
活动优惠
|
活动优惠
|
||||||
<!-- <span style="display: flex;">(满减活动)</span> -->
|
<!-- <span style="display: flex;">(满减活动)</span> -->
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="desc" v-if="cardsList.length>0">
|
<view class="desc" >
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
优惠券优惠
|
优惠券优惠
|
||||||
<span style="display: flex;">(优惠券)</span>
|
<span style="display: flex;">(优惠券)</span>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="desc" v-if="isGradePreferential">
|
<view class="desc">
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
会员等级优惠
|
会员等级优惠
|
||||||
<!-- <span style="display: flex;">({{userGrade.name}})</span> -->
|
<!-- <span style="display: flex;">({{userGrade.name}})</span> -->
|
||||||
@ -254,7 +254,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.orderNo = e.orderNo
|
this.orderNo = e.orderNo
|
||||||
// this.orderNo = "2345202401161204280406d3"
|
// this.orderNo = "234520240117095256fbd86e"
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getOilOrder();
|
this.getOilOrder();
|
||||||
@ -827,7 +827,7 @@
|
|||||||
}
|
}
|
||||||
_this.user = res.data.userVo;
|
_this.user = res.data.userVo;
|
||||||
_this.user = res.data.userVo;
|
_this.user = res.data.userVo;
|
||||||
if (res.data.userVo.refuelMoney){
|
if (res.data.userVo.refuelMoney && res.data.userVo.refuelMoney!='null'){
|
||||||
_this.refuelMoney = JSON.parse(res.data.userVo.refuelMoney)
|
_this.refuelMoney = JSON.parse(res.data.userVo.refuelMoney)
|
||||||
_this.refuelMoneyAfter = JSON.parse(res.data.userVo.refuelMoney)
|
_this.refuelMoneyAfter = JSON.parse(res.data.userVo.refuelMoney)
|
||||||
_this.chooseRefuelMoney()
|
_this.chooseRefuelMoney()
|
||||||
@ -852,7 +852,7 @@
|
|||||||
_this.getStaffList(res.data.staffId)
|
_this.getStaffList(res.data.staffId)
|
||||||
_this.getStore(res.data.storeId)
|
_this.getStore(res.data.storeId)
|
||||||
_this.getOilNumber(res.data.storeId)
|
_this.getOilNumber(res.data.storeId)
|
||||||
_this.chooseCoupons()
|
// _this.chooseCoupons()
|
||||||
_this.getUser(res.data.userId)
|
_this.getUser(res.data.userId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user