修改
This commit is contained in:
parent
a28df63a64
commit
f95867e000
@ -38,6 +38,14 @@ export function updateInventoryApi(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 删除有关信息
|
||||
export function delInventoryApi(data) {
|
||||
return request({
|
||||
url: 'business/petrolStationManagement/oilInventory',
|
||||
method: 'delete',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 订单
|
||||
|
@ -2,24 +2,13 @@
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" style="width:100%">
|
||||
<el-option
|
||||
v-for="option in suppliersList"
|
||||
:key="option.id"
|
||||
:label="option.supplierName"
|
||||
:value="option.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="油罐名称" prop="tankName">
|
||||
<el-input v-model="queryParams.tankName" placeholder="请输入油罐名称" />
|
||||
<el-form-item label="业务单号" prop="tankName">
|
||||
<el-input v-model="queryParams.tankName" placeholder="请输入业务单号名称" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="状态" v-model="queryParams.status" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择供应商" style="width:100%">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" style="width:100%">
|
||||
<el-option
|
||||
v-for="dict in dict.type.oilPurchasedStatus"
|
||||
:key="dict.value"
|
||||
@ -61,12 +50,12 @@
|
||||
v-loading="loading"
|
||||
:data="inventoryList"
|
||||
:default-sort="defaultSort">
|
||||
<el-table-column label="业务单号" align="center" prop="purchaseNo"/>
|
||||
<el-table-column label="业务单号" align="center" prop="inventoryNumber"/>
|
||||
<el-table-column label="盘点详情" align="center">
|
||||
<el-table-column label="盘点油罐" align="center" prop="tanks"/>
|
||||
<el-table-column label="盘点升数" align="center" prop="oils"/>
|
||||
<el-table-column label="库存差异升数" align="center" prop="tanks1"/>
|
||||
<el-table-column label="盈亏金额" align="center" prop="theDocumentAmount"/>
|
||||
<el-table-column label="盘点升数" align="center" prop="inventoryVolume"/>
|
||||
<el-table-column label="库存差异升数" align="center" prop="stockDifference"/>
|
||||
<el-table-column label="盈亏金额" align="center" prop="profitLossAmount"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
@ -82,9 +71,9 @@
|
||||
<el-table-column label="制单人" align="center" prop="creatorName"/>
|
||||
<el-table-column label="审核人" align="center" prop="reviewerName"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="制单日期" align="center" prop="createdAt" width="200">
|
||||
<el-table-column label="制单日期" align="center" prop="orderTime" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdAt) }}</span>
|
||||
<span>{{ parseTime(scope.row.orderTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
@ -122,7 +111,8 @@
|
||||
<script>
|
||||
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
|
||||
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
|
||||
import {getInventoryApi} from "@/api/oilConfig/oilInventory";
|
||||
import {delInventoryApi, getInventoryApi} from "@/api/oilConfig/oilInventory";
|
||||
import {getName,parseTime} from "../../../utils/fuint";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
@ -135,7 +125,6 @@ export default {
|
||||
|
||||
|
||||
|
||||
|
||||
purchaseList: [],
|
||||
|
||||
suppliersList: [],
|
||||
@ -181,7 +170,7 @@ export default {
|
||||
this.loading = true;
|
||||
getInventoryApi(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.inventoryList = response.data.records;
|
||||
console.log("this.inventoryList",this.purchaseList)
|
||||
console.log("this.inventoryList",this.inventoryList)
|
||||
this.total = response.data.total;
|
||||
})
|
||||
this.loading = false;
|
||||
@ -196,12 +185,17 @@ export default {
|
||||
this.$router.push({
|
||||
path: '/oilInventory/order',
|
||||
query: {
|
||||
purchaseId: data.id,
|
||||
purchaseNo: data.purchaseNo
|
||||
inventoryId: data.id,
|
||||
inventoryNo: data.inventoryNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除
|
||||
handleDel(data) {
|
||||
delInventoryApi(data).then(response => {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
|
@ -33,13 +33,13 @@
|
||||
|
||||
<div style="height: 100%; width: 30%; display: flex; flex-direction: column; justify-content: space-between;">
|
||||
<el-form ref="myForm" label-width="100px">
|
||||
<el-form-item label="进货单号">
|
||||
<el-form-item label="盘点单号">
|
||||
<el-input v-model="inventoryNo.inventoryNo" @change="saveJudgment"
|
||||
style="width: 220Px">
|
||||
<el-button slot="append" @click="refresh()" icon="el-icon-refresh"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="进货时间" >
|
||||
<el-form-item label="盘点时间" >
|
||||
<el-date-picker
|
||||
style="width: 220Px"
|
||||
v-model="inventoryNo.inventoryDate"
|
||||
@ -231,11 +231,8 @@ export default {
|
||||
purchaseOrderNumber: null, // 进货单号
|
||||
incomingTime: '', //进货时间
|
||||
|
||||
//--------------------------------------
|
||||
purchasedTonnage: 0, //采购吨数
|
||||
purchaseLiters: 0, //采购升数
|
||||
totalAmountPurchased: 0, //采购总额
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
|
||||
numberOfTanks: 0, // 油罐数量
|
||||
inventoryVolume: 0, // 盘点升数
|
||||
@ -300,20 +297,6 @@ export default {
|
||||
inventoryNo: null,
|
||||
inventoryDate: null
|
||||
},
|
||||
form: {
|
||||
id: "", // ID(标识)
|
||||
productDensity: "", // 产品密度
|
||||
purchaseWeight: "", // 采购重量
|
||||
purchasePrice: "", // 采购价格
|
||||
totalAmount: "", // 总金额
|
||||
purchaseVolume: "", // 采购体积
|
||||
discountedPrice: "", // 折扣价格
|
||||
oilType: "", // 油品类型
|
||||
oilName: "", // 油品名称
|
||||
supplierName: "", // 供应商名称
|
||||
tankName: "", // 储罐名称
|
||||
storedQuantity: "", // 储存数量
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@ -327,17 +310,16 @@ export default {
|
||||
// this.queryParams.purchaseId = -parseInt(new Date().getTime())% 100000000;
|
||||
// this.purchaseId = -parseInt(new Date().getTime()) % 100000000;
|
||||
// }
|
||||
// this.inventoryNo.inventoryNo = this.$route.query.inventoryNo;
|
||||
|
||||
this.inventoryNo.inventoryNo = this.$route.query.inventoryNo;
|
||||
|
||||
// this.queryParams.inventoryId = this.$route.query.inventoryId;
|
||||
// this.inventoryId = this.$route.query.inventoryId;
|
||||
this.queryParams.inventoryId = this.$route.query.inventoryId;
|
||||
this.inventoryId = this.$route.query.inventoryId;
|
||||
|
||||
|
||||
if (this.inventoryNo.inventoryNo == null) {
|
||||
this.refresh();
|
||||
}
|
||||
console.log("yourParamKey3",this.$route.query.inventoryId)
|
||||
|
||||
await this.getList();
|
||||
|
||||
@ -412,7 +394,6 @@ export default {
|
||||
},
|
||||
getTankList() {
|
||||
selectList2Api(this.tankForm).then(response => {
|
||||
console.log("response",response);
|
||||
this.tankList = response.data
|
||||
})
|
||||
},
|
||||
@ -583,17 +564,32 @@ export default {
|
||||
profitLossAmount : this_.profitLossAmount
|
||||
}
|
||||
// 处理列表
|
||||
let disList = {
|
||||
oilInventoryOrderList: this_.orderList,
|
||||
}
|
||||
let oilInventoryOrderList = []
|
||||
|
||||
// 判断是保存还是修改
|
||||
if (this_.inventoryId != null) {
|
||||
// 修改
|
||||
inventoryForm.id = this_.inventoryId
|
||||
updateInventoryApi(inventoryForm).then(response=>{
|
||||
// 处理列表
|
||||
disList.inventoryId= this_.inventoryId
|
||||
disposeBatchApi(disList).then(response=> {
|
||||
// disList.inventoryId= this_.inventoryId
|
||||
|
||||
this_.orderList.forEach(ord=>{
|
||||
let now = {
|
||||
id: ord.id,
|
||||
inventoryId: this_.inventoryId,
|
||||
tankId: ord.tankId,
|
||||
numberId: ord.numberId,
|
||||
currentAveragePrice: ord.discountedPrice,
|
||||
currentInventoryVolume: ord.storedQuantity,
|
||||
profitLossAmount: ord.profitLossAmount,
|
||||
stockDifference: ord.stockDifference,
|
||||
inventoryVolume: ord.inventoryVolume
|
||||
}
|
||||
oilInventoryOrderList.push(now)
|
||||
})
|
||||
|
||||
disposeBatchApi(oilInventoryOrderList).then(response=> {
|
||||
// 保存成功
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
|
||||
@ -602,14 +598,31 @@ export default {
|
||||
} else {
|
||||
// 新增
|
||||
insertInventoryApi(inventoryForm).then(response=>{
|
||||
disList.inventoryId= response.data.id
|
||||
disposeBatchApi(disList).then(response=> {
|
||||
// disList.inventoryId= response.data.id
|
||||
|
||||
this_.orderList.forEach(ord=>{
|
||||
let now = {
|
||||
id: ord.id,
|
||||
inventoryId: response.data.id,
|
||||
tankId: ord.tankId,
|
||||
numberId: ord.numberId,
|
||||
currentAveragePrice: ord.discountedPrice,
|
||||
currentInventoryVolume: ord.storedQuantity,
|
||||
profitLossAmount: ord.profitLossAmount,
|
||||
stockDifference: ord.stockDifference,
|
||||
inventoryVolume: ord.inventoryVolume
|
||||
}
|
||||
oilInventoryOrderList.push(now)
|
||||
})
|
||||
|
||||
disposeBatchApi(oilInventoryOrderList).then(response=> {
|
||||
// 保存成功
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
})
|
||||
// 新增列表之后重新刷新
|
||||
this.$router.push({ path: '/oilInventory/order', query: { inventoryId: response.data.id } });
|
||||
|
||||
})
|
||||
// 新增列表之后重新刷新
|
||||
this.$router.push({ path: '/oilInventory/order', query: { inventoryId: response.data.id } });
|
||||
}
|
||||
},
|
||||
// 判断是否可以保存
|
||||
|
@ -85,6 +85,7 @@
|
||||
<el-table-column label="制单日期" align="center" prop="createdAt" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdAt) }}</span>
|
||||
Missing import statement
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
@ -122,6 +123,7 @@
|
||||
<script>
|
||||
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
|
||||
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
|
||||
import {getName,parseTime} from "@/utils/fuint";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
|
@ -61,8 +61,8 @@ public class OilInventoryController extends BaseController {
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseEntity<OilInventory> queryById(@PathVariable("id") Integer id) {
|
||||
return ResponseEntity.ok(this.oilInventoryService.queryById(id));
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(this.oilInventoryService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,8 +72,8 @@ public class OilInventoryController extends BaseController {
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseEntity<OilInventory> add(OilInventory oilInventory) {
|
||||
return ResponseEntity.ok(this.oilInventoryService.insert(oilInventory));
|
||||
public ResponseObject add(OilInventory oilInventory) {
|
||||
return getSuccessResult(this.oilInventoryService.insert(oilInventory));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -83,8 +83,8 @@ public class OilInventoryController extends BaseController {
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseEntity<OilInventory> edit(OilInventory oilInventory) {
|
||||
return ResponseEntity.ok(this.oilInventoryService.update(oilInventory));
|
||||
public ResponseObject edit(OilInventory oilInventory) {
|
||||
return getSuccessResult(this.oilInventoryService.update(oilInventory));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -94,8 +94,8 @@ public class OilInventoryController extends BaseController {
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Boolean> deleteById(Integer id) {
|
||||
return ResponseEntity.ok(this.oilInventoryService.deleteById(id));
|
||||
public ResponseObject deleteById(Integer id) {
|
||||
return getSuccessResult(this.oilInventoryService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -80,12 +80,12 @@ public class OilInventoryOrderController extends BaseController {
|
||||
|
||||
/**
|
||||
* 批量处理数据
|
||||
* @param oilInventoryOrderList
|
||||
* @param oilInventoryOrderList ,@Param("inventoryId") Integer inventoryId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("disposeBatch")
|
||||
public ResponseObject disposeBatch(@RequestBody @Param("oilInventoryOrderList") List<OilInventoryOrder> oilInventoryOrderList,@Param("inventoryId") Integer inventoryId) {
|
||||
return getSuccessResult(this.oilInventoryOrderService.disposeBatch(oilInventoryOrderList,inventoryId));
|
||||
public ResponseObject disposeBatch(@RequestBody List<OilInventoryOrder> oilInventoryOrderList) {
|
||||
return getSuccessResult(this.oilInventoryOrderService.disposeBatch(oilInventoryOrderList));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,7 +54,7 @@ public class OilInventory extends BaseEntity {
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
private String status;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.petrolStationManagement.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuint.repository.model.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@ -59,7 +60,8 @@ public class OilInventoryOrder extends BaseEntity {
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private Data inventoryTime;
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// private Data inventoryTime;
|
||||
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,14 @@ public interface OilInventoryOrderMapper {
|
||||
*/
|
||||
int update(OilInventoryOrder oilInventoryOrder);
|
||||
|
||||
/**
|
||||
* 批量修改该
|
||||
* @param oilInventoryOrderList
|
||||
* @return
|
||||
*/
|
||||
int updateBatch(@Param("list") List<OilInventoryOrder> oilInventoryOrderList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
@ -89,5 +97,7 @@ public interface OilInventoryOrderMapper {
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
int delOrder(Integer inventoryId);
|
||||
|
||||
}
|
||||
|
||||
|
@ -145,6 +145,7 @@
|
||||
op.profit_loss_amount profitLossAmount,
|
||||
op.reviewer reviewer,
|
||||
op.creator creator,
|
||||
op.order_time orderTime,
|
||||
ms1.real_name creatorName,
|
||||
ms2.real_name reviewerName
|
||||
FROM
|
||||
@ -155,7 +156,6 @@
|
||||
LEFT JOIN mt_staff ms2 ON op.reviewer = ms2.id
|
||||
GROUP BY
|
||||
op.id
|
||||
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -176,7 +176,7 @@
|
||||
insert into oil_inventory_order(inventory_id, number_id, tank_id, current_average_price, current_inventory_volume, inventory_volume, stock_difference, profit_loss_amount, store_id, create_time, update_time, create_by, update_by)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.inventoryId}, #{entity.numberId}, #{entity.tankId}, #{entity.currentAveragePrice}, #{entity.currentInventoryVolume}, #{entity.inventoryVolume}, #{entity.stockDifference}, #{entity.profitLossAmount}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
|
||||
(#{entity.inventoryId}, #{entity.numberId}, #{entity.tankId}, #{entity.currentAveragePrice}, #{entity.currentInventoryVolume}, #{entity.inventoryVolume}, #{entity.stockDifference}, #{entity.profitLossAmount}, #{entity.storeId}, NOW(), NOW(), #{entity.createBy}, #{entity.updateBy})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
inventory_id = values(inventory_id),
|
||||
@ -188,8 +188,8 @@
|
||||
stock_difference = values(stock_difference),
|
||||
profit_loss_amount = values(profit_loss_amount),
|
||||
store_id = values(store_id),
|
||||
create_time = values(create_time),
|
||||
update_time = values(update_time),
|
||||
create_time = NOW(),
|
||||
update_time = NOW(),
|
||||
create_by = values(create_by),
|
||||
update_by = values(update_by)
|
||||
</insert>
|
||||
@ -241,10 +241,61 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<foreach collection="list" item="user" separator=";">
|
||||
update oil_inventory_order
|
||||
<set>
|
||||
<if test="user.inventoryId != null">
|
||||
inventory_id = #{user.inventoryId},
|
||||
</if>
|
||||
<if test="user.numberId != null">
|
||||
number_id = #{user.numberId},
|
||||
</if>
|
||||
<if test="user.tankId != null">
|
||||
tank_id = #{user.tankId},
|
||||
</if>
|
||||
<if test="user.currentAveragePrice != null">
|
||||
current_average_price = #{user.currentAveragePrice},
|
||||
</if>
|
||||
<if test="user.currentInventoryVolume != null">
|
||||
current_inventory_volume = #{user.currentInventoryVolume},
|
||||
</if>
|
||||
<if test="user.inventoryVolume != null">
|
||||
inventory_volume = #{user.inventoryVolume},
|
||||
</if>
|
||||
<if test="user.stockDifference != null">
|
||||
stock_difference = #{user.stockDifference},
|
||||
</if>
|
||||
<if test="user.profitLossAmount != null">
|
||||
profit_loss_amount = #{user.profitLossAmount},
|
||||
</if>
|
||||
<if test="user.storeId != null">
|
||||
store_id = #{user.storeId},
|
||||
</if>
|
||||
<if test="user.createTime != null">
|
||||
create_time = #{user.createTime},
|
||||
</if>
|
||||
<if test="user.createBy != null">
|
||||
create_by = #{user.createBy},
|
||||
</if>
|
||||
<if test="user.updateBy != null">
|
||||
update_by = #{user.updateBy},
|
||||
</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
where id = #{user.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from oil_inventory_order where id = #{id}
|
||||
</delete>
|
||||
<delete id="delOrder">
|
||||
delete from oil_inventory_order where inventory_id = #{inventoryId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
@ -56,7 +56,7 @@ public interface OilInventoryOrderService {
|
||||
* @param oilInventoryOrder
|
||||
* @return
|
||||
*/
|
||||
int disposeBatch(List<OilInventoryOrder> oilInventoryOrder, Integer inventoryId);
|
||||
int disposeBatch(List<OilInventoryOrder> oilInventoryOrder);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -119,12 +119,26 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
||||
|
||||
|
||||
@Override
|
||||
public int disposeBatch(List<OilInventoryOrder> oilInventoryOrder, Integer inventoryId) {
|
||||
// List<OilInventoryOrder> insInventory = new ArrayList<>();
|
||||
// List<OilInventoryOrder> updateInventory = new ArrayList<>();
|
||||
public int disposeBatch(List<OilInventoryOrder> oilInventoryOrder) {
|
||||
List<OilInventoryOrder> insInventory = new ArrayList<>();
|
||||
List<OilInventoryOrder> updateInventory = new ArrayList<>();
|
||||
if (oilInventoryOrder.size()>0) {
|
||||
oilInventoryOrder.stream().forEach(o -> o.setInventoryId(inventoryId));
|
||||
oilInventoryOrderDao.insertOrUpdateBatch(oilInventoryOrder);
|
||||
for (OilInventoryOrder inventoryOrder : oilInventoryOrder) {
|
||||
if (inventoryOrder.getId() != null) {
|
||||
|
||||
updateInventory.add(inventoryOrder);
|
||||
}else {
|
||||
insInventory.add(inventoryOrder);
|
||||
}
|
||||
}
|
||||
// oilInventoryOrder.stream().forEach(o -> o.setInventoryId(inventoryId));
|
||||
// oilInventoryOrderDao.insertOrUpdateBatch(oilInventoryOrder);
|
||||
if (insInventory.size()>0) {
|
||||
oilInventoryOrderDao.insertBatch(insInventory);
|
||||
}
|
||||
if (updateInventory.size()>0) {
|
||||
int i = oilInventoryOrderDao.updateBatch(updateInventory);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -17,8 +17,10 @@ import com.fuint.common.util.StringUtils;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.beans.Transient;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -125,7 +127,10 @@ public class OilInventoryServiceImpl implements OilInventoryService {
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean deleteById(Integer id) {
|
||||
// 删除之前先删除订单里面的信息
|
||||
oilInventoryOrderMapper.delOrder(id);
|
||||
return this.oilInventoryDao.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,15 @@
|
||||
package com.fuint.business.petrolStationManagement.vo;
|
||||
|
||||
import com.fuint.business.petrolStationManagement.entity.OilInventory;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilInventoryOrder;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OilInventoryVO extends OilInventoryOrder {
|
||||
public class OilInventoryVO extends OilInventory {
|
||||
private String tankName;
|
||||
private Integer tankId;
|
||||
private String numberName;
|
||||
private String tanks;
|
||||
private String creatorName;
|
||||
private String reviewerName;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user