Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
64ee2829d3
@ -64,7 +64,7 @@
|
||||
<el-tag v-if ="scope.row.status == 'await'" size="medium">待审核</el-tag>
|
||||
<el-tag v-if ="scope.row.status == 'qrts'" type="success" size="medium">已审核入库</el-tag>
|
||||
<el-tag v-if ="scope.row.status == 'yzf'" type="danger" size="medium">已作废</el-tag>
|
||||
<el-tag v-if ="scope.row.status == 'ysh'" type="danger" size="medium">已审核</el-tag>
|
||||
<el-tag v-if ="scope.row.status == 'ysh'" type="success" size="medium">已审核</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -84,7 +84,8 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="dispose(scope.row)"
|
||||
>处理单据</el-button>
|
||||
>{{ scope.row.status == 'ysh'?'查看单据':'处理单据' }}
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
|
@ -92,12 +92,12 @@
|
||||
<el-table-column label="当前库存升数(L)" align="center" prop="currentInventoryVolume"/>
|
||||
<el-table-column label="盘点升数(L)" align="center" prop="inventoryVolume">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :disabled="numberInput" v-model="scope.row.inventoryVolume" @change="change(scope.row)" controls-position="right" :min="0" :max="100000000" :step="1" style="max-width: 100%"></el-input-number>
|
||||
<el-input-number :disabled="numberInput" v-model="scope.row.inventoryVolume" @change="change(scope.row)" controls-position="right" :min="0" :max="100000000" :step="1" :precision="2" style="max-width: 100%"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存差异升数(L)" align="center" prop="stockDifference"/>
|
||||
<el-table-column label="盈亏金额" align="center" prop="profitLossAmount"/>
|
||||
<el-table-column v-if="state =='await' || state=='ysh'" label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column v-if="state =='await'" label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -180,13 +180,6 @@
|
||||
import {
|
||||
getSuppliersListApi2,
|
||||
} from "@/api/oilConfig/oilSuppliers";
|
||||
// import {
|
||||
// editPurchuseApi,
|
||||
// insertPurchaseApi,
|
||||
// insertPurchaseOrderApi,
|
||||
// updatePurchaseOrderApi,
|
||||
// updatePurchaseApi, storageApi, abolitionApi, auditApi
|
||||
// } from "@/api/oilConfig/oilPurchase";
|
||||
|
||||
import {
|
||||
editInventoryApi,
|
||||
@ -211,7 +204,6 @@ export default {
|
||||
return {
|
||||
orderList:[],
|
||||
|
||||
|
||||
orderForm:{
|
||||
id: null,
|
||||
purchaseId: null,
|
||||
@ -239,13 +231,11 @@ export default {
|
||||
state: 'await',
|
||||
numberInput: false,
|
||||
|
||||
|
||||
numberOfTanks: 0, // 油罐数量
|
||||
inventoryVolume: 0, // 盘点升数
|
||||
stockDifference: 0, // 库存差异
|
||||
profitLossAmount: 0,// 盈亏总额
|
||||
|
||||
|
||||
tankList:[], //
|
||||
tankForm: {
|
||||
numberId:'',
|
||||
@ -254,15 +244,9 @@ export default {
|
||||
|
||||
inventoryId:'', // 盘点id
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
selectOilTypeByPrice: [], // 油品
|
||||
multipleSelection: [],
|
||||
|
||||
|
||||
|
||||
numberList:[],
|
||||
suppliersList:[],
|
||||
|
||||
@ -398,20 +382,25 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 改变数字时
|
||||
change(data) {
|
||||
// new BigNumber
|
||||
console.log("data",data)
|
||||
// // 库存差异升数
|
||||
// data.stockDifference = data.inventoryVolume - data.currentInventoryVolume
|
||||
// // 盈亏金额
|
||||
// data.profitLossAmount = data.stockDifference * data.currentAveragePrice
|
||||
|
||||
// 库存差异升数
|
||||
data.stockDifference = data.inventoryVolume - data.currentInventoryVolume
|
||||
// 盈亏金额
|
||||
data.profitLossAmount = data.stockDifference * data.currentAveragePrice
|
||||
const stockDifference = new BigNumber(data.inventoryVolume).minus(data.currentInventoryVolume);
|
||||
|
||||
// 盈亏金额
|
||||
const profitLossAmount = stockDifference.times(data.currentAveragePrice).decimalPlaces(2).toNumber();
|
||||
|
||||
// 将结果存回 data 对象
|
||||
data.stockDifference = stockDifference.toNumber();
|
||||
data.profitLossAmount = profitLossAmount;
|
||||
|
||||
this.sumMethod(this.orderList)
|
||||
},
|
||||
|
||||
|
||||
// 查询油罐
|
||||
inquireTank() {
|
||||
this.getTankList()/**/
|
||||
@ -421,14 +410,12 @@ export default {
|
||||
this.getTankList()
|
||||
// this.selectTankByNumber(this.orderForm.numberId);
|
||||
},
|
||||
// 油罐列表
|
||||
getTankList() {
|
||||
selectList2Api(this.tankForm).then(response => {
|
||||
this.tankList = response.data
|
||||
console.log("this.tankList",this.tankList)
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
// 添加采购油品
|
||||
orderAdd() {
|
||||
// 初始化
|
||||
@ -440,18 +427,20 @@ export default {
|
||||
// 添加油罐到订单列表
|
||||
addOrder () {
|
||||
let this_ = this
|
||||
|
||||
// 油罐列表清除数据
|
||||
this_.tankList = []
|
||||
this_.tankForm = {}
|
||||
this.multipleSelection.forEach(mul=>{
|
||||
const isDuplicate = false
|
||||
let isDuplicate = false
|
||||
if (this.orderList.length > 0) {
|
||||
isDuplicate = this.orderList.some(order => order.tankId === mul.id);
|
||||
}
|
||||
|
||||
if (isDuplicate || isDuplicate == '') {
|
||||
if (isDuplicate) {
|
||||
console.log("isDuplicate222")
|
||||
|
||||
this.$message({
|
||||
message: '油罐已经存在,请重新选择',
|
||||
message: '有重复油罐油罐,请重新选择',
|
||||
type: 'warning'
|
||||
});
|
||||
this.multipleSelection = []
|
||||
@ -481,11 +470,7 @@ export default {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 删除dom
|
||||
orderDel(data) {
|
||||
if (data.id != null) {
|
||||
delInventoryOrderApi(data).then(res=>{
|
||||
@ -583,8 +568,6 @@ export default {
|
||||
|
||||
// 保存订单信息
|
||||
saveInventory(){
|
||||
|
||||
|
||||
let this_ = this
|
||||
if (this_.inventoryNo.inventoryNo == null){
|
||||
this.$modal.msgSuccess("请先填写盘点号");
|
||||
@ -599,7 +582,6 @@ export default {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
let inventoryForm = {
|
||||
inventoryNumber : this_.inventoryNo.inventoryNo,
|
||||
inventoryTime : this_.inventoryNo.inventoryDate,
|
||||
@ -718,18 +700,21 @@ export default {
|
||||
if (judgmentPermissions1 > 0){
|
||||
this.auditFlag=false,
|
||||
this.voidFlag=false
|
||||
}else {
|
||||
this.auditFlag=true,
|
||||
this.voidFlag=true
|
||||
}
|
||||
let judgmentPermissions2 = await this.judgmentPermissions("盘点入库");
|
||||
if (judgmentPermissions2 > 0){
|
||||
this.storageFlag = false
|
||||
}else {
|
||||
this.storageFlag = true
|
||||
}
|
||||
|
||||
let judgmentPermissions3 = await this.judgmentPermissions("盘点废止");
|
||||
if (judgmentPermissions3 > 0){
|
||||
this.voidFlag=false
|
||||
}else {
|
||||
this.voidFlag=true
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@ -743,7 +728,6 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 保存并审核
|
||||
audit(){
|
||||
// 保存
|
||||
@ -755,9 +739,13 @@ export default {
|
||||
}
|
||||
console.log(" id: this.purchaseId",fil)
|
||||
auditInventoryApi(fil).then(res => {
|
||||
this.state = 'ysh'
|
||||
this.$modal.msgWarning("审核成功");
|
||||
this.goToAbout()
|
||||
if (res.data) {
|
||||
this.state = 'ysh'
|
||||
this.$modal.msgSuccess("审核成功");
|
||||
this.goToAbout()
|
||||
} else {
|
||||
this.$modal.msgWarning("暂无审核权限");
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -103,6 +103,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
||||
if(ObjectUtils.isNotEmpty(activeConsumption.getIsonline())) {
|
||||
queryWrapper.eq(ActiveConsumption::getIsonline,activeConsumption.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveConsumption::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveConsumption::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
//会员等级
|
||||
|
@ -104,6 +104,7 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
||||
if(ObjectUtils.isNotEmpty(activeDiscount.getIsonline())) {
|
||||
queryWrapper.eq(ActiveDiscount::getIsonline,activeDiscount.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveDiscount::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveDiscount::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
//会员等级
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.marketingActivity.activeExchange.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountChildService;
|
||||
@ -155,21 +156,21 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getIsonline,0);
|
||||
fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0);
|
||||
fullminusLambdaQueryWrapper.orderByDesc(ActiveFullminus::getCreateTime);
|
||||
//会员等级判断
|
||||
fullminusLambdaQueryWrapper.in(ActiveFullminus::getDieselUserLevel,userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId());
|
||||
//符合油号判断
|
||||
fullminusLambdaQueryWrapper.in(ActiveFullminus::getAdaptOil,transferDTO.getOilName());
|
||||
List<ActiveFullminus> activeFullminusList = activeFullminusService.list(fullminusLambdaQueryWrapper);
|
||||
for (ActiveFullminus activeFullminus : activeFullminusList) {
|
||||
MaxoutVO maxoutVO = new MaxoutVO();
|
||||
BeanUtils.copyProperties(activeFullminus,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminus.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
|
||||
maxoutVOArrayList.add(maxoutVO);
|
||||
// 会员等级判断、符合油号判断
|
||||
if (activeFullminus.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId())) &&
|
||||
activeFullminus.getAdaptOil().contains(String.valueOf(transferDTO.getOilName()))){
|
||||
BeanUtils.copyProperties(activeFullminus,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminus.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
|
||||
maxoutVOArrayList.add(maxoutVO);
|
||||
}
|
||||
}
|
||||
|
||||
//构造折扣券查询条件
|
||||
@ -178,22 +179,23 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
discountLambdaQueryWrapper.eq(ActiveDiscount::getIsonline,0);
|
||||
discountLambdaQueryWrapper.eq(ActiveDiscount::getStatus,0);
|
||||
discountLambdaQueryWrapper.orderByDesc(ActiveDiscount::getCreateTime);
|
||||
//会员等级判断
|
||||
discountLambdaQueryWrapper.in(ActiveDiscount::getDieselUserLevel,userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId());
|
||||
//符合油号判断
|
||||
discountLambdaQueryWrapper.in(ActiveDiscount::getAdaptOil,transferDTO.getOilName());
|
||||
List<ActiveDiscount> activeDiscountList = activeDiscountService.list(discountLambdaQueryWrapper);
|
||||
//获取兑换物品信息
|
||||
for (ActiveDiscount activeDiscount : activeDiscountList) {
|
||||
MaxoutVO maxoutVO = new MaxoutVO();
|
||||
BeanUtils.copyProperties(activeDiscount,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
|
||||
maxoutVOArrayList.add(maxoutVO);
|
||||
// 会员等级判断、符合油号判断
|
||||
if (activeDiscount.getDieselUserLevel().contains(String.valueOf(userGradeService.selectUserGradeById(transferDTO.getGradeId()).getId())) &&
|
||||
activeDiscount.getAdaptOil().contains(String.valueOf(transferDTO.getOilName()))){
|
||||
BeanUtils.copyProperties(activeDiscount,maxoutVO);
|
||||
LambdaQueryWrapper<ActiveDiscountChild> queryWrappers = new LambdaQueryWrapper<>();
|
||||
queryWrappers.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscount.getId());
|
||||
//判断符合金额
|
||||
queryWrappers.le(ActiveDiscountChild::getAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters());
|
||||
queryWrappers.orderByDesc(ActiveDiscountChild::getAmount);
|
||||
maxoutVO.setActiveDiscountChildList(activeDiscountChildService.list(queryWrappers));
|
||||
maxoutVOArrayList.add(maxoutVO);
|
||||
}
|
||||
}
|
||||
return maxoutVOArrayList;
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
||||
if(ObjectUtils.isNotEmpty(activeFullminus.getIsonline())) {
|
||||
queryWrapper.eq(ActiveFullminus::getIsonline,activeFullminus.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveFullminus::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveFullminus::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
//会员等级
|
||||
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
||||
import com.fuint.business.marketingActivity.activeFullminus.entity.ActiveFullminus;
|
||||
import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO;
|
||||
import com.fuint.business.marketingActivity.activeNewlyweds.dto.ActiveNewlywedsDTO;
|
||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
||||
@ -90,6 +91,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
||||
if(ObjectUtils.isNotEmpty(activeNewlyweds.getIsonline())) {
|
||||
queryWrapper.eq(ActiveNewlyweds::getIsonline,activeNewlyweds.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(ActiveNewlyweds::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(ActiveNewlyweds::getCreateTime);
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
|
||||
|
@ -4,10 +4,12 @@ package com.fuint.business.marketingActivity.activeRecommend.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.dto.ActiveRecommendDTO;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommend;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendChildService;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -46,6 +48,7 @@ public class ActiveRecommendController extends BaseController {
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("cardFuelDiesel") ActiveRecommend activeRecommend) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
activeRecommend.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
||||
return getSuccessResult(this.activeRecommendService.page(page, new QueryWrapper<>(activeRecommend)));
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,7 @@ public class CardExchangeServiceImpl extends ServiceImpl<CardExchangeMapper, Car
|
||||
if(ObjectUtils.isNotEmpty(cardExchange.getIsonline())) {
|
||||
queryWrapper.eq(CardExchange::getIsonline,cardExchange.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(CardExchange::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardExchange::getCreateTime);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
if(ObjectUtils.isNotEmpty(cardFavorable.getIsonline())) {
|
||||
queryWrapper.eq(CardFavorable::getIsonline,cardFavorable.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(CardFavorable::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardFavorable::getCreateTime);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel;
|
||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService;
|
||||
import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
@ -68,7 +69,8 @@ public class CardFuelDieselController extends BaseController {
|
||||
if(ObjectUtils.isNotEmpty(cardFuelDiesel.getType())) {
|
||||
queryWrapper.eq(CardFuelDiesel::getType,cardFuelDiesel.getType());
|
||||
}
|
||||
queryWrapper.orderByDesc(CardFuelDiesel::getCreateTime);
|
||||
queryWrapper.eq(CardFuelDiesel::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardFuelDiesel::getCreateTime);
|
||||
IPage page1 = this.cardFuelDieselService.page(page, queryWrapper);
|
||||
List<CardFuelDiesel> records = page1.getRecords();
|
||||
//返回囤油卡状态
|
||||
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
|
||||
import com.fuint.business.marketingActivity.cardGift.service.CardGiftService;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import com.fuint.utils.ObjectUtil;
|
||||
@ -61,7 +62,8 @@ public class CardGiftController extends BaseController {
|
||||
if(ObjectUtils.isNotEmpty(cardGift.getStatus())) {
|
||||
queryWrapper.eq(CardGift::getStatus,cardGift.getStatus());
|
||||
}
|
||||
queryWrapper.orderByDesc(CardGift::getCreateTime);
|
||||
queryWrapper.eq(CardGift::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardGift::getCreateTime);
|
||||
return getSuccessResult(this.cardGiftService.page(page, queryWrapper));
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||
import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
|
||||
@ -65,6 +66,7 @@ public class CardValueController extends BaseController {
|
||||
if (ObjectUtils.isNotEmpty(cardValue.getIsonline())){
|
||||
queryWrapper.eq(CardValue::getIsonline,cardValue.getIsonline());
|
||||
}
|
||||
queryWrapper.eq(CardValue::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
|
||||
queryWrapper.orderByDesc(CardValue::getCreateTime);
|
||||
IPage page1 = this.cardValueService.page(page, queryWrapper);
|
||||
List<CardValue> records = page1.getRecords();
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.business.petrolStationManagement.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilInventoryOrder;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPurchaseOrder;
|
||||
import com.fuint.business.petrolStationManagement.service.OilPurchaseOrderService;
|
||||
import com.fuint.business.petrolStationManagement.vo.OilPurchaseOrderVO;
|
||||
@ -12,6 +13,7 @@ import org.apache.poi.hssf.dev.ReSave;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (OilPurchaseOrder)表控制层
|
||||
@ -83,6 +85,16 @@ public class OilPurchaseOrderController extends BaseController {
|
||||
return getSuccessResult(this.oilPurchaseOrderService.insert(oilPurchaseOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量处理数据
|
||||
* @param oilInventoryOrderList ,@Param("inventoryId") Integer inventoryId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("disposeBatch")
|
||||
public ResponseObject disposeBatch(@RequestBody List<OilPurchaseOrder> oilPurchaseOrders) {
|
||||
return getSuccessResult(this.oilPurchaseOrderService.disposeBatch(oilPurchaseOrders));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.business.petrolStationManagement.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilInventoryOrder;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPurchaseOrder;
|
||||
import com.fuint.business.petrolStationManagement.vo.OilPurchaseOrderVO;
|
||||
import io.swagger.models.auth.In;
|
||||
@ -64,6 +65,12 @@ public interface OilPurchaseOrderMapper {
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<OilPurchaseOrder> entities);
|
||||
|
||||
/**
|
||||
* 批量修改该
|
||||
* @param oilPurchaseOrders
|
||||
* @return
|
||||
*/
|
||||
int updateBatch(@Param("list") List<OilPurchaseOrder> oilPurchaseOrders);
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
|
@ -163,9 +163,9 @@
|
||||
and op.inventory_number LIKE CONCAT('%', #{oilInventory.inventoryNumber}, '%')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
GROUP BY
|
||||
op.id
|
||||
order by op.create_time desc
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -226,6 +226,47 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="list" item="user" separator=";">
|
||||
|
||||
update oil_purchase_order
|
||||
<set>
|
||||
<if test="${user.purchaseId != null}">
|
||||
purchase_id = #{user.purchaseId},
|
||||
</if>
|
||||
<if test="${user.numberId != null}">
|
||||
number_id = #{user.numberId},
|
||||
</if>
|
||||
<if test="${user.tankId != null}">
|
||||
tank_id = #{user.tankId},
|
||||
</if>
|
||||
<if test="${user.supplierId != null}">
|
||||
supplier_id = #{user.supplierId},
|
||||
</if>
|
||||
<if test="${user.productDensity != null}">
|
||||
product_density = #{user.productDensity},
|
||||
</if>
|
||||
<if test="${user.purchaseWeight != null}">
|
||||
purchase_weight = #{user.purchaseWeight},
|
||||
</if>
|
||||
<if test="${user.purchasePrice != null}">
|
||||
purchase_price = #{user.purchasePrice},
|
||||
</if>
|
||||
<if test="${user.totalAmount != null}">
|
||||
total_amount = #{user.totalAmount},
|
||||
</if>
|
||||
<if test="${user.purchaseVolume != null}">
|
||||
purchase_volume = #{user.purchaseVolume},
|
||||
</if>
|
||||
<if test="${user.discountedPrice != null}">
|
||||
discounted_price = #{user.discountedPrice},
|
||||
</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
where id = #{user.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="editPurchuse">
|
||||
update oil_purchase_order set
|
||||
purchase_id = #{purchaseId}
|
||||
@ -238,6 +279,7 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<!--删除-->
|
||||
<delete id="delPurchuse">
|
||||
delete from oil_purchase_order where purchase_id < 0 and create_time < DATE_SUB(NOW(), INTERVAL 1 DAY);
|
||||
|
@ -402,11 +402,14 @@
|
||||
</update>
|
||||
|
||||
<update id="accumulate2">
|
||||
update oil_tank set
|
||||
update oil_tank <set>
|
||||
stored_quantity = #{storedQuantity} ,
|
||||
total_price = #{totalPrice},
|
||||
update_time = NOW(),
|
||||
discounted_price = #{discountedPrice}
|
||||
<if test="discountedPrice != null and discountedPrice != ''">
|
||||
discounted_price = #{discountedPrice}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.fuint.business.petrolStationManagement.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilInventoryOrder;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPurchaseOrder;
|
||||
import com.fuint.business.petrolStationManagement.vo.OilPurchaseOrderVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -47,6 +48,14 @@ public interface OilPurchaseOrderService {
|
||||
*/
|
||||
OilPurchaseOrder insert(OilPurchaseOrder oilPurchaseOrder);
|
||||
|
||||
/**
|
||||
* 批量处理数据
|
||||
* @param oilInventoryOrder
|
||||
* @return
|
||||
*/
|
||||
int disposeBatch(List<OilPurchaseOrder> oilPurchaseOrders);
|
||||
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
|
@ -242,7 +242,7 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
||||
bigDecimal.multiply(bigDecimal2);
|
||||
|
||||
oilTank.setTotalPrice(bigDecimal.doubleValue());
|
||||
oilTank.setDiscountedPrice(oilInventoryOrderVO.getCurrentAveragePrice());
|
||||
// oilTank.setDiscountedPrice(oilInventoryOrderVO.getCurrentAveragePrice());
|
||||
oilTankMapper.accumulate2(oilTank);
|
||||
|
||||
|
||||
|
@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.business.member.service.impl.LJStaffServiceImpl;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPurchase;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilPurchaseOrder;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilTank;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilTracking;
|
||||
import com.fuint.business.petrolStationManagement.entity.*;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilPurchaseMapper;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilPurchaseOrderMapper;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilTankMapper;
|
||||
@ -24,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -99,13 +97,38 @@ public class OilPurchaseOrderServiceImpl implements OilPurchaseOrderService {
|
||||
*/
|
||||
@Override
|
||||
public OilPurchaseOrder insert(OilPurchaseOrder oilPurchaseOrder) {
|
||||
// todo 存储之前判断是否有重复的油罐
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
oilPurchaseOrder.setStoreId(nowAccountInfo.getStoreId());
|
||||
this.oilPurchaseOrderDao.insert(oilPurchaseOrder);
|
||||
return oilPurchaseOrder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int disposeBatch(List<OilPurchaseOrder> oilPurchaseOrders) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
||||
List<OilPurchaseOrder> insPurchase = new ArrayList<>();
|
||||
List<OilPurchaseOrder> updatePurchase = new ArrayList<>();
|
||||
if (oilPurchaseOrders.size()>0) {
|
||||
for (OilPurchaseOrder oilPurchaseOrder : oilPurchaseOrders) {
|
||||
if (oilPurchaseOrder.getId() != null) {
|
||||
updatePurchase.add(oilPurchaseOrder);
|
||||
}else {
|
||||
oilPurchaseOrder.setStoreId(nowAccountInfo.getStoreId());
|
||||
oilPurchaseOrder.setUpdateBy(nowAccountInfo.getStaffId().toString());
|
||||
insPurchase.add(oilPurchaseOrder);
|
||||
}
|
||||
}
|
||||
if (insPurchase.size()>0) {
|
||||
oilPurchaseOrderDao.insertBatch(insPurchase);
|
||||
}
|
||||
if (updatePurchase.size()>0) {
|
||||
int i = oilPurchaseOrderDao.updateBatch(updatePurchase);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
|
@ -60,7 +60,7 @@ public class SysDictDataController extends BaseController
|
||||
@GetMapping(value = "/type/{dictType}")
|
||||
public ResponseObject dictType(@PathVariable String dictType)
|
||||
{
|
||||
System.out.println("ddddd"+dictType);
|
||||
// System.out.println("ddddd"+dictType);
|
||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||
if (CollectionUtils.isEmpty(data))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user