diff --git a/fuintAdmin/src/views/oilConfig/oilInventory/list.vue b/fuintAdmin/src/views/oilConfig/oilInventory/list.vue
index b334e5434..711771011 100644
--- a/fuintAdmin/src/views/oilConfig/oilInventory/list.vue
+++ b/fuintAdmin/src/views/oilConfig/oilInventory/list.vue
@@ -64,7 +64,7 @@
待审核
已审核入库
已作废
- 已审核
+ 已审核
@@ -84,7 +84,8 @@
type="text"
icon="el-icon-edit"
@click="dispose(scope.row)"
- >处理单据
+ >{{ scope.row.status == 'ysh'?'查看单据':'处理单据' }}
+
diff --git a/fuintAdmin/src/views/oilConfig/oilInventory/order.vue b/fuintAdmin/src/views/oilConfig/oilInventory/order.vue
index a4231627e..a73e0b173 100644
--- a/fuintAdmin/src/views/oilConfig/oilInventory/order.vue
+++ b/fuintAdmin/src/views/oilConfig/oilInventory/order.vue
@@ -92,12 +92,12 @@
-
+
-
+
{
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("暂无审核权限");
+ }
})
}
},
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
index ce6d23976..7b49b3957 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionServiceImpl.java
@@ -103,6 +103,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl activeFullminusList = activeFullminusService.list(fullminusLambdaQueryWrapper);
for (ActiveFullminus activeFullminus : activeFullminusList) {
MaxoutVO maxoutVO = new MaxoutVO();
- BeanUtils.copyProperties(activeFullminus,maxoutVO);
- LambdaQueryWrapper 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 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 activeDiscountList = activeDiscountService.list(discountLambdaQueryWrapper);
//获取兑换物品信息
for (ActiveDiscount activeDiscount : activeDiscountList) {
MaxoutVO maxoutVO = new MaxoutVO();
- BeanUtils.copyProperties(activeDiscount,maxoutVO);
- LambdaQueryWrapper 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 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;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeFullminus/service/impl/ActiveFullminusServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeFullminus/service/impl/ActiveFullminusServiceImpl.java
index ffa87b46e..86be6c31a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeFullminus/service/impl/ActiveFullminusServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeFullminus/service/impl/ActiveFullminusServiceImpl.java
@@ -101,6 +101,7 @@ public class ActiveFullminusServiceImpl extends ServiceImpl(activeRecommend)));
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeServiceImpl.java
index 20b9b34c8..b2cafd5c8 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeServiceImpl.java
@@ -74,6 +74,7 @@ public class CardExchangeServiceImpl extends ServiceImpl records = page1.getRecords();
//返回囤油卡状态
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java
index ad3a1afc9..e46a0516d 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/controller/CardGiftController.java
@@ -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));
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java
index 754a381ac..17efbb2d4 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java
@@ -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 records = page1.getRecords();
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPurchaseOrderController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPurchaseOrderController.java
index 40f06ae05..078bdf7c1 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPurchaseOrderController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/controller/OilPurchaseOrderController.java
@@ -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 oilPurchaseOrders) {
+ return getSuccessResult(this.oilPurchaseOrderService.disposeBatch(oilPurchaseOrders));
+ }
+
/**
* 编辑数据
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPurchaseOrderMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPurchaseOrderMapper.java
index 9f14a0868..694c916df 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPurchaseOrderMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPurchaseOrderMapper.java
@@ -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 entities);
+ /**
+ * 批量修改该
+ * @param oilPurchaseOrders
+ * @return
+ */
+ int updateBatch(@Param("list") List oilPurchaseOrders);
/**
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilInventoryMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilInventoryMapper.xml
index 2be91c3ce..c4ee7dd57 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilInventoryMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilInventoryMapper.xml
@@ -163,9 +163,9 @@
and op.inventory_number LIKE CONCAT('%', #{oilInventory.inventoryNumber}, '%')
-
GROUP BY
op.id
+ order by op.create_time desc
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPurchaseOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPurchaseOrderMapper.xml
index 578be2dbf..583008677 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPurchaseOrderMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPurchaseOrderMapper.xml
@@ -226,6 +226,47 @@
where id = #{id}
+
+
+
+ update oil_purchase_order
+
+
+ purchase_id = #{user.purchaseId},
+
+
+ number_id = #{user.numberId},
+
+
+ tank_id = #{user.tankId},
+
+
+ supplier_id = #{user.supplierId},
+
+
+ product_density = #{user.productDensity},
+
+
+ purchase_weight = #{user.purchaseWeight},
+
+
+ purchase_price = #{user.purchasePrice},
+
+
+ total_amount = #{user.totalAmount},
+
+
+ purchase_volume = #{user.purchaseVolume},
+
+
+ discounted_price = #{user.discountedPrice},
+
+ update_time = NOW()
+
+ where id = #{user.id}
+
+
+
update oil_purchase_order set
purchase_id = #{purchaseId}
@@ -238,6 +279,7 @@
where id = #{id}
+
delete from oil_purchase_order where purchase_id < 0 and create_time < DATE_SUB(NOW(), INTERVAL 1 DAY);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml
index fd00b005d..98fdfe84f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml
@@ -402,11 +402,14 @@
- update oil_tank set
+ update oil_tank
stored_quantity = #{storedQuantity} ,
total_price = #{totalPrice},
update_time = NOW(),
- discounted_price = #{discountedPrice}
+
+ discounted_price = #{discountedPrice}
+
+
where id = #{id}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPurchaseOrderService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPurchaseOrderService.java
index 9a36a5cc8..cc9ea85ec 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPurchaseOrderService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/OilPurchaseOrderService.java
@@ -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 oilPurchaseOrders);
+
+
/**
* 修改数据
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilInventoryOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilInventoryOrderServiceImpl.java
index 45e1c3daf..2845b6a73 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilInventoryOrderServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilInventoryOrderServiceImpl.java
@@ -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);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPurchaseOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPurchaseOrderServiceImpl.java
index 3eecaa91b..efe68f43b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPurchaseOrderServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPurchaseOrderServiceImpl.java
@@ -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 oilPurchaseOrders) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+
+ List insPurchase = new ArrayList<>();
+ List 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;
+ }
+
/**
* 修改数据
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dict/controller/SysDictDataController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dict/controller/SysDictDataController.java
index ca199906e..6d31623fd 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dict/controller/SysDictDataController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dict/controller/SysDictDataController.java
@@ -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 data = dictTypeService.selectDictDataByType(dictType);
if (CollectionUtils.isEmpty(data))
{