Merge branch 'refs/heads/master' into dev_1.0.0
commit
30d551fe59
|
|
@ -84,6 +84,7 @@
|
||||||
import { addDelivery, listProductSn } from '@/api/inventory/delivery';
|
import { addDelivery, listProductSn } from '@/api/inventory/delivery';
|
||||||
import {importSnData,exportDownloadTemplate} from '@/api/inventory/outer'
|
import {importSnData,exportDownloadTemplate} from '@/api/inventory/outer'
|
||||||
import PurchaseOrderSelectDialog from '../../../purchaseorder/components/PurchaseOrderSelectDialog.vue';
|
import PurchaseOrderSelectDialog from '../../../purchaseorder/components/PurchaseOrderSelectDialog.vue';
|
||||||
|
import {handleTree} from "@/utils/ruoyi";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "GenerateDeliveryForm",
|
name: "GenerateDeliveryForm",
|
||||||
|
|
@ -176,7 +177,12 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSelectPurchaseBeforeImport() {
|
handleSelectPurchaseBeforeImport() {
|
||||||
this.purchaseOrderSelectVisible = true;
|
if ((this.productData.orderType || '1') === '1') {
|
||||||
|
this.purchaseOrderSelectVisible = true;
|
||||||
|
}else{
|
||||||
|
this.handleImport()
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handlePurchaseOrderSelect(order) {
|
handlePurchaseOrderSelect(order) {
|
||||||
this.warehouseId = order.warehouseId;
|
this.warehouseId = order.warehouseId;
|
||||||
|
|
@ -198,6 +204,7 @@ export default {
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
formData.append('productCode', this.productData.productCode);
|
formData.append('productCode', this.productData.productCode);
|
||||||
formData.append('quantity', this.queryParams.pageSize);
|
formData.append('quantity', this.queryParams.pageSize);
|
||||||
|
formData.append('orderType', this.productData.orderType);
|
||||||
|
|
||||||
importSnData(formData).then(response => {
|
importSnData(formData).then(response => {
|
||||||
this.$message.success('导入成功');
|
this.$message.success('导入成功');
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,8 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getOrder, addOrder, updateOrder, delContractFile, uploadContractFile, getProject } from "@/api/project/order";
|
import { getOrder, addOrder, updateOrder, delContractFile, uploadContractFile } from "@/api/project/order";
|
||||||
|
import { getProject } from "@/api/project/info";
|
||||||
import ProductConfig from '@/views/project/info/ProductConfig.vue';
|
import ProductConfig from '@/views/project/info/ProductConfig.vue';
|
||||||
import SelectCommitType from "./SelectCommitType.vue";
|
import SelectCommitType from "./SelectCommitType.vue";
|
||||||
import OrderInfo from '@/views/project/order/components/OrderInfo.vue';
|
import OrderInfo from '@/views/project/order/components/OrderInfo.vue';
|
||||||
|
|
@ -399,6 +400,8 @@ export default {
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
this.activeContractVersionTab = currentVersion;
|
this.activeContractVersionTab = currentVersion;
|
||||||
|
console.log('11111')
|
||||||
|
console.log(this.projectId)
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
getProject(this.projectId).then(response => {
|
getProject(this.projectId).then(response => {
|
||||||
this.handleProjectSelected(response.data.project);
|
this.handleProjectSelected(response.data.project);
|
||||||
|
|
|
||||||
|
|
@ -61,11 +61,18 @@
|
||||||
<el-input v-model="localOrderData.orderCode" placeholder="自动生成" readonly :disabled="isReadonly"/>
|
<el-input v-model="localOrderData.orderCode" placeholder="自动生成" readonly :disabled="isReadonly"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="8">
|
||||||
<el-form-item label="执行单截止时间" prop="orderEndTime">
|
<el-form-item label="执行单截止时间" prop="orderEndTime">
|
||||||
<el-date-picker v-model="localOrderData.orderEndTime" type="date" value-format="yyyy-MM-dd" placeholder="审批完成后自动计算" disabled></el-date-picker>
|
<el-date-picker v-model="localOrderData.orderEndTime" type="date" value-format="yyyy-MM-dd" placeholder="审批完成后自动计算" disabled></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="订单类型" prop="orderType">
|
||||||
|
<el-select v-model="localOrderData.orderType" :disabled="isReadonly">
|
||||||
|
<el-option v-for="dict in dict.type.delivery_order_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="币种" prop="currencyType">
|
<el-form-item label="币种" prop="currencyType">
|
||||||
<el-select v-model="localOrderData.currencyType" placeholder="请选择币种" :disabled="isReadonly">
|
<el-select v-model="localOrderData.currencyType" placeholder="请选择币种" :disabled="isReadonly">
|
||||||
|
|
@ -82,7 +89,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="(localOrderData.processTemplate=='1' ||(localOrderData.processTemplate!='1' &&( localOrderData.orderStatus=='1'||localOrderData.orderStatus=='2')))?8:16">
|
<el-col :span="(localOrderData.processTemplate=='1' ||(localOrderData.processTemplate!='1' &&( localOrderData.orderStatus=='1'||localOrderData.orderStatus=='2')))?8:16">
|
||||||
<el-form-item label="总代出货金额" prop="shipmentAmount">
|
<el-form-item label="总代出货金额" prop="shipmentAmount">
|
||||||
<el-input v-model="localOrderData.shipmentAmount" placeholder="请输入金额" :disabled="isReadonly"/>
|
<el-input v-model="localOrderData.shipmentAmount" placeholder="请输入金额" readonly :disabled="isReadonly"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
@ -227,6 +234,7 @@ export default {
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
dicts:['delivery_order_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
localOrderData: {},
|
localOrderData: {},
|
||||||
|
|
|
||||||
|
|
@ -286,9 +286,9 @@ export default {
|
||||||
},
|
},
|
||||||
totalAmountWithoutTax() {
|
totalAmountWithoutTax() {
|
||||||
const total = this.form.omsPurchaseOrderItemList?.reduce((acc, cur) => {
|
const total = this.form.omsPurchaseOrderItemList?.reduce((acc, cur) => {
|
||||||
const amount = this.$calc.mul(cur.quantity, cur.price) || 0;
|
const amount = this.$calc.mul(cur.quantity||0, cur.price||0) || 0;
|
||||||
const taxRate = cur.taxRate || 0;
|
const taxRate = cur.taxRate || 0;
|
||||||
console.log(taxRate)
|
|
||||||
return acc + this.$calc.div(amount , (1 + taxRate));
|
return acc + this.$calc.div(amount , (1 + taxRate));
|
||||||
}, 0);
|
}, 0);
|
||||||
return (this.$calc.toFixed(total)) || 0;
|
return (this.$calc.toFixed(total)) || 0;
|
||||||
|
|
@ -369,7 +369,7 @@ export default {
|
||||||
this.$set(item, 'productCode', product.productCode);
|
this.$set(item, 'productCode', product.productCode);
|
||||||
this.$set(item, 'productModel', product.model);
|
this.$set(item, 'productModel', product.model);
|
||||||
this.$set(item, 'productDescription', product.description);
|
this.$set(item, 'productDescription', product.description);
|
||||||
this.$set(item, 'price', product.cataloguePrice);
|
// this.$set(item, 'price', product.cataloguePrice);
|
||||||
this.calculateRowTotal(item)
|
this.calculateRowTotal(item)
|
||||||
}
|
}
|
||||||
this.productSelectOpen = false;
|
this.productSelectOpen = false;
|
||||||
|
|
@ -402,13 +402,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 计算含税小计 */
|
/** 计算含税小计 */
|
||||||
calculateRowTotal(row) {
|
calculateRowTotal(row) {
|
||||||
if (row.quantity != null && row.price != null) {
|
|
||||||
row.amountTotal = this.$calc.mul(row.quantity , row.price);
|
row.amountTotal = this.$calc.mul(row.quantity || 0, row.price || 0);
|
||||||
row.taxTotal = row.amountTotal - this.$calc.div(row.amountTotal , (1 + row.taxRate));
|
row.taxTotal = row.amountTotal - this.$calc.div(row.amountTotal, (1 + row.taxRate || 0));
|
||||||
} else {
|
|
||||||
row.amountTotal = 0;
|
|
||||||
row.taxTotal = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/** 获取厂商列表 */
|
/** 获取厂商列表 */
|
||||||
getVendorList() {
|
getVendorList() {
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,6 @@ import {listAllVendor} from "@/api/base/vendor";
|
||||||
import {getDicts} from "@/api/system/dict/data";
|
import {getDicts} from "@/api/system/dict/data";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PurchaseOrderDetailView",
|
name: "PurchaseOrderDetailView",
|
||||||
dicts: ['approve_status'],
|
dicts: ['approve_status'],
|
||||||
|
|
@ -309,7 +308,11 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getVendorList().then(() => {
|
this.getVendorList().then(() => {
|
||||||
getDicts("product_type").then(response => {
|
getDicts("product_type").then(response => {
|
||||||
this.productTypeOptions = response.data;
|
this.productTypeOptions = response.data.map(item => ({
|
||||||
|
value: item.dictValue,
|
||||||
|
label: item.dictLabel,
|
||||||
|
id:item.id
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
// 如果已经有 orderData 则立即处理
|
// 如果已经有 orderData 则立即处理
|
||||||
if (this.orderData) {
|
if (this.orderData) {
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
>发起供应商确认
|
>发起供应商确认
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.approveStatus === '2' && (!scope.row.confirmStatus || scope.row.confirmStatus === ''|| scope.row.confirmStatus === '2')"
|
v-if="scope.row.approveStatus === '2' && (!scope.row.confirmStatus || scope.row.confirmStatus === ''|| scope.row.confirmStatus === '1')"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,12 @@ import java.io.InputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
|
||||||
import com.ruoyi.common.utils.ShiroUtils;
|
|
||||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
||||||
import com.ruoyi.sip.domain.OmsInventoryInner;
|
|
||||||
import com.ruoyi.sip.domain.ProjectOrderFileLog;
|
|
||||||
import com.ruoyi.sip.dto.inventory.InventoryInfoExcelDto;
|
import com.ruoyi.sip.dto.inventory.InventoryInfoExcelDto;
|
||||||
import com.ruoyi.sip.service.IInventoryAuthService;
|
import com.ruoyi.sip.service.IInventoryAuthService;
|
||||||
import com.ruoyi.sip.service.IOmsInventoryInnerService;
|
import com.ruoyi.sip.service.IOmsInventoryInnerService;
|
||||||
import com.ruoyi.sip.vo.ExecutionOrderVo;
|
|
||||||
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
import com.ruoyi.sip.vo.OuterDeliveryVo;
|
||||||
import com.ruoyi.sip.vo.OuterViewVo;
|
import com.ruoyi.sip.vo.OuterViewVo;
|
||||||
import liquibase.pro.packaged.A;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
@ -171,7 +163,8 @@ public class InventoryOuterController extends BaseController
|
||||||
|
|
||||||
@PostMapping("/importData")
|
@PostMapping("/importData")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult importTemplate(@RequestPart("file") MultipartFile file, @RequestParam(value = "productCode") String productCode,@RequestParam(value = "quantity") Long quantity) {
|
public AjaxResult importTemplate(@RequestPart("file") MultipartFile file, @RequestParam(value = "productCode") String productCode
|
||||||
|
, @RequestParam(value = "orderType") String orderType,@RequestParam(value = "quantity") Long quantity) {
|
||||||
ExcelUtil<InventoryInfoExcelDto> util = new ExcelUtil<InventoryInfoExcelDto>(InventoryInfoExcelDto.class);
|
ExcelUtil<InventoryInfoExcelDto> util = new ExcelUtil<InventoryInfoExcelDto>(InventoryInfoExcelDto.class);
|
||||||
|
|
||||||
try (InputStream inputStream = file.getInputStream()) {
|
try (InputStream inputStream = file.getInputStream()) {
|
||||||
|
|
@ -182,7 +175,7 @@ public class InventoryOuterController extends BaseController
|
||||||
if (inventoryInfoExcelDtoList.size()!=quantity.intValue()){
|
if (inventoryInfoExcelDtoList.size()!=quantity.intValue()){
|
||||||
return AjaxResult.error("导入数据应等于发货数量");
|
return AjaxResult.error("导入数据应等于发货数量");
|
||||||
}
|
}
|
||||||
return AjaxResult.success(innerService.getInventoryInfoList(inventoryInfoExcelDtoList, productCode));
|
return AjaxResult.success(innerService.getInventoryInfoList(inventoryInfoExcelDtoList, productCode, orderType));
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ServiceException("读取excel错误,请联系管理员");
|
throw new ServiceException("读取excel错误,请联系管理员");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.sip.controller.vue;
|
package com.ruoyi.sip.controller.vue;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
|
@ -8,9 +9,11 @@ import com.ruoyi.common.enums.ApproveStatusEnum;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.sip.domain.OmsPurchaseOrder;
|
import com.ruoyi.sip.domain.OmsPurchaseOrder;
|
||||||
|
import com.ruoyi.sip.domain.VendorInfo;
|
||||||
import com.ruoyi.sip.dto.inventory.OmsPurchaseOrderItemDto;
|
import com.ruoyi.sip.dto.inventory.OmsPurchaseOrderItemDto;
|
||||||
import com.ruoyi.sip.flowable.domain.Todo;
|
import com.ruoyi.sip.flowable.domain.Todo;
|
||||||
import com.ruoyi.sip.flowable.service.TodoService;
|
import com.ruoyi.sip.flowable.service.TodoService;
|
||||||
|
import com.ruoyi.sip.service.IInventoryAuthService;
|
||||||
import com.ruoyi.sip.service.IOmsPurchaseOrderHistoryService;
|
import com.ruoyi.sip.service.IOmsPurchaseOrderHistoryService;
|
||||||
import com.ruoyi.sip.service.IOmsPurchaseOrderService;
|
import com.ruoyi.sip.service.IOmsPurchaseOrderService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -19,7 +22,9 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购单主表Controller
|
* 采购单主表Controller
|
||||||
|
|
@ -39,6 +44,9 @@ public class OmsPurchaseOrderController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private TodoService todoService;
|
private TodoService todoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInventoryAuthService inventoryAuthService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询采购单主表列表
|
* 查询采购单主表列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -46,6 +54,14 @@ public class OmsPurchaseOrderController extends BaseController
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(OmsPurchaseOrder omsPurchaseOrder)
|
public TableDataInfo list(OmsPurchaseOrder omsPurchaseOrder)
|
||||||
{
|
{
|
||||||
|
if (!inventoryAuthService.authAll()) {
|
||||||
|
List<VendorInfo> vendorInfos = inventoryAuthService.currentVendor();
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(vendorInfos)) {
|
||||||
|
return getDataTable(Collections.emptyList());
|
||||||
|
}
|
||||||
|
omsPurchaseOrder.setAuthVendorCodeList(vendorInfos.stream().map(VendorInfo::getVendorCode).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
startPage();
|
startPage();
|
||||||
List<OmsPurchaseOrder> list = omsPurchaseOrderService.selectOmsPurchaseOrderList(omsPurchaseOrder);
|
List<OmsPurchaseOrder> list = omsPurchaseOrderService.selectOmsPurchaseOrderList(omsPurchaseOrder);
|
||||||
clearPage();
|
clearPage();
|
||||||
|
|
@ -59,6 +75,14 @@ public class OmsPurchaseOrderController extends BaseController
|
||||||
@GetMapping("/item/list")
|
@GetMapping("/item/list")
|
||||||
public TableDataInfo listItem(OmsPurchaseOrderItemDto omsPurchaseOrder)
|
public TableDataInfo listItem(OmsPurchaseOrderItemDto omsPurchaseOrder)
|
||||||
{
|
{
|
||||||
|
if (!inventoryAuthService.authAll()) {
|
||||||
|
List<VendorInfo> vendorInfos = inventoryAuthService.currentVendor();
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(vendorInfos)) {
|
||||||
|
return getDataTable(Collections.emptyList());
|
||||||
|
}
|
||||||
|
omsPurchaseOrder.setAuthVendorCodeList(vendorInfos.stream().map(VendorInfo::getVendorCode).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
startPage();
|
startPage();
|
||||||
List<OmsPurchaseOrderItemDto> list = omsPurchaseOrderService.listItem(omsPurchaseOrder);
|
List<OmsPurchaseOrderItemDto> list = omsPurchaseOrderService.listItem(omsPurchaseOrder);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -70,7 +94,14 @@ public class OmsPurchaseOrderController extends BaseController
|
||||||
@GetMapping("/vendor/list")
|
@GetMapping("/vendor/list")
|
||||||
public TableDataInfo listVendor(OmsPurchaseOrder omsPurchaseOrder)
|
public TableDataInfo listVendor(OmsPurchaseOrder omsPurchaseOrder)
|
||||||
{
|
{
|
||||||
|
if (!inventoryAuthService.authAll()) {
|
||||||
|
List<VendorInfo> vendorInfos = inventoryAuthService.currentVendor();
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(vendorInfos)) {
|
||||||
|
return getDataTable(Collections.emptyList());
|
||||||
|
}
|
||||||
|
omsPurchaseOrder.setAuthVendorCodeList(vendorInfos.stream().map(VendorInfo::getVendorCode).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
omsPurchaseOrder.setApproveStatus(ApproveStatusEnum.APPROVE_COMPLETE.getCode());
|
omsPurchaseOrder.setApproveStatus(ApproveStatusEnum.APPROVE_COMPLETE.getCode());
|
||||||
omsPurchaseOrder.setFlowType(OmsPurchaseOrder.FlowTypeEnum.ONLINE.getCode());
|
omsPurchaseOrder.setFlowType(OmsPurchaseOrder.FlowTypeEnum.ONLINE.getCode());
|
||||||
startPage();
|
startPage();
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,8 @@ public class VueInventoryOuterController extends BaseController
|
||||||
}
|
}
|
||||||
@PostMapping("/importData")
|
@PostMapping("/importData")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult importTemplate(@RequestPart("file") MultipartFile file, @RequestParam(value = "productCode") String productCode, @RequestParam(value = "quantity") Long quantity) {
|
public AjaxResult importTemplate(@RequestPart("file") MultipartFile file, @RequestParam(value = "productCode") String productCode
|
||||||
|
,@RequestParam(value = "orderType",defaultValue = "1") String orderType, @RequestParam(value = "quantity") Long quantity) {
|
||||||
ExcelUtil<InventoryInfoExcelDto> util = new ExcelUtil<InventoryInfoExcelDto>(InventoryInfoExcelDto.class);
|
ExcelUtil<InventoryInfoExcelDto> util = new ExcelUtil<InventoryInfoExcelDto>(InventoryInfoExcelDto.class);
|
||||||
|
|
||||||
try (InputStream inputStream = file.getInputStream()) {
|
try (InputStream inputStream = file.getInputStream()) {
|
||||||
|
|
@ -121,7 +122,7 @@ public class VueInventoryOuterController extends BaseController
|
||||||
if (inventoryInfoExcelDtoList.size()!=quantity.intValue()){
|
if (inventoryInfoExcelDtoList.size()!=quantity.intValue()){
|
||||||
return AjaxResult.error("导入数据应等于发货数量");
|
return AjaxResult.error("导入数据应等于发货数量");
|
||||||
}
|
}
|
||||||
return AjaxResult.success(innerService.getInventoryInfoList(inventoryInfoExcelDtoList, productCode));
|
return AjaxResult.success(innerService.getInventoryInfoList(inventoryInfoExcelDtoList, productCode,orderType));
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ServiceException("读取excel错误,请联系管理员");
|
throw new ServiceException("读取excel错误,请联系管理员");
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
package com.ruoyi.sip.controller.vue;
|
package com.ruoyi.sip.controller.vue;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.sip.domain.VendorInfo;
|
import com.ruoyi.sip.domain.VendorInfo;
|
||||||
|
import com.ruoyi.sip.service.IInventoryAuthService;
|
||||||
import com.ruoyi.sip.service.IVendorInfoService;
|
import com.ruoyi.sip.service.IVendorInfoService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -25,6 +28,8 @@ public class VueVendorInfoController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IVendorInfoService vendorInfoService;
|
private IVendorInfoService vendorInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInventoryAuthService inventoryAuthService;
|
||||||
/**
|
/**
|
||||||
* 查询制造商信息列表
|
* 查询制造商信息列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -80,7 +85,7 @@ public class VueVendorInfoController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public AjaxResult listAll() {
|
public AjaxResult listAll() {
|
||||||
List<VendorInfo> list = vendorInfoService.selectVendorInfoList(new VendorInfo());
|
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(inventoryAuthService.currentVendor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +87,7 @@ public class VueWarehouseInfoController extends BaseController {
|
||||||
public AjaxResult listAll() {
|
public AjaxResult listAll() {
|
||||||
OmsWarehouseInfo params = new OmsWarehouseInfo();
|
OmsWarehouseInfo params = new OmsWarehouseInfo();
|
||||||
params.setWarehouseStatus(OmsWarehouseInfo.WarehouseStatusEnum.NORMAL.getValue());
|
params.setWarehouseStatus(OmsWarehouseInfo.WarehouseStatusEnum.NORMAL.getValue());
|
||||||
List<OmsWarehouseInfo> list = omsWarehouseInfoService.list(params);
|
List<OmsWarehouseInfo> list = omsWarehouseInfoService.listByAuth(params);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -50,6 +50,7 @@ public class InventoryOuter extends BaseEntity
|
||||||
@Excel(name = "产品型号")
|
@Excel(name = "产品型号")
|
||||||
private String model;
|
private String model;
|
||||||
private String vendorName;
|
private String vendorName;
|
||||||
|
private String orderType;
|
||||||
private List<String> productCodeList;
|
private List<String> productCodeList;
|
||||||
|
|
||||||
/** 数量 */
|
/** 数量 */
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class OmsInventoryInner extends BaseEntity {
|
||||||
private String warehouseType;
|
private String warehouseType;
|
||||||
@Excel(name = "经办人")
|
@Excel(name = "经办人")
|
||||||
private String createByName;
|
private String createByName;
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
@Excel(name = "入库时间",dateFormat="yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "入库时间",dateFormat="yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public class OmsPurchaseOrder extends BaseEntity
|
||||||
private Long vendorId;
|
private Long vendorId;
|
||||||
|
|
||||||
private String vendorCode;
|
private String vendorCode;
|
||||||
|
private List<String> authVendorCodeList;
|
||||||
private String vendorName;
|
private String vendorName;
|
||||||
private String vendorUser;
|
private String vendorUser;
|
||||||
private String vendorPhone;
|
private String vendorPhone;
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
private String customerCode;
|
private String customerCode;
|
||||||
private String customerPhone;
|
private String customerPhone;
|
||||||
private String customerUserName;
|
private String customerUserName;
|
||||||
|
private String orderType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出货金额
|
* 出货金额
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class TodoController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo todoList( Todo todo) {
|
public TableDataInfo todoList( Todo todo) {
|
||||||
startPage();
|
startPage();
|
||||||
todo.setApproveUserName(getSysUser().getUserName());
|
todo.setApproveUser(getSysUser().getUserId().toString());
|
||||||
List<Todo> list = todoService.selectTodoList(todo);
|
List<Todo> list = todoService.selectTodoList(todo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
@ -61,7 +61,7 @@ public class TodoController extends BaseController {
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo editSave( Todo todo) {
|
public TableDataInfo editSave( Todo todo) {
|
||||||
startPage();
|
startPage();
|
||||||
todo.setApproveUserName(getSysUser().getUserName());
|
todo.setApproveUser(getSysUser().getUserId().toString());
|
||||||
List<Todo> list = todoService.selectTodoCompletedList(todo);
|
List<Todo> list = todoService.selectTodoCompletedList(todo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
@ -110,4 +110,10 @@ public class TodoController extends BaseController {
|
||||||
public AjaxResult statistics(@RequestBody Todo todo){
|
public AjaxResult statistics(@RequestBody Todo todo){
|
||||||
return todoService.statistics(todo);
|
return todoService.statistics(todo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/todo/statistics")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult statisticsTodo(){
|
||||||
|
return todoService.statisticsTodo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,4 +136,9 @@ public interface TodoService
|
||||||
void fillOrderApproveNode(List<ProjectOrderInfo> list);
|
void fillOrderApproveNode(List<ProjectOrderInfo> list);
|
||||||
|
|
||||||
void fillPurchaseOrderApproveNode(List<OmsPurchaseOrder> list);
|
void fillPurchaseOrderApproveNode(List<OmsPurchaseOrder> list);
|
||||||
|
|
||||||
|
|
||||||
|
AjaxResult statisticsTodo();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -370,6 +370,29 @@ public class TodoServiceImpl implements TodoService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult statisticsTodo() {
|
||||||
|
Long userId = ShiroUtils.getUserId();
|
||||||
|
if (userId == null) {
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
List<String> orderKeyList = Arrays.asList(processConfig.getDefinition().getOrderApproveOffline(), processConfig.getDefinition().getOrderApproveOnline());
|
||||||
|
Todo todo = new Todo();
|
||||||
|
todo.setApproveUser(userId.toString());
|
||||||
|
List<Todo> todoList = todoMapper.selectTodoList(todo);
|
||||||
|
Map<String, Long> map = todoList.stream().collect(Collectors.groupingBy(Todo::getProcessKey, Collectors.counting()));
|
||||||
|
HashMap<String, Long> resultMap = new HashMap<>();
|
||||||
|
for (Map.Entry<String, Long> entry : map.entrySet()) {
|
||||||
|
|
||||||
|
String key = orderKeyList.contains(entry.getKey()) ? "order_approve" : entry.getKey();
|
||||||
|
resultMap.compute(key, (k, v) -> {
|
||||||
|
Long value = entry.getValue() == null ? 0L : entry.getValue();
|
||||||
|
return v == null ? value : v + value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return AjaxResult.success(resultMap);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程审批
|
* 流程审批
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -65,5 +65,5 @@ public interface IOmsInventoryInnerService
|
||||||
|
|
||||||
|
|
||||||
void importByOuter(List<InventoryInfo> inventoryInfoList, String productCode, String purchaseNo,Long itemId);
|
void importByOuter(List<InventoryInfo> inventoryInfoList, String productCode, String purchaseNo,Long itemId);
|
||||||
Map<String,Object> getInventoryInfoList(List<InventoryInfoExcelDto> inventoryInfoExcelDtoList, String productCode);
|
Map<String,Object> getInventoryInfoList(List<InventoryInfoExcelDto> inventoryInfoExcelDtoList, String productCode, String orderType);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,7 @@ public class InventoryOuterServiceImpl implements IInventoryOuterService
|
||||||
vo.setQuantity(item.getQuantity());
|
vo.setQuantity(item.getQuantity());
|
||||||
vo.setDeliveryGenerateQuantity(0L);
|
vo.setDeliveryGenerateQuantity(0L);
|
||||||
vo.setDeliveryConfirmQuantity(0L);
|
vo.setDeliveryConfirmQuantity(0L);
|
||||||
|
vo.setOrderType(inventoryOuter.getOrderType());
|
||||||
List<InventoryDelivery> tempDeliveryList = deliveryListMap.get(vo.getWarehouseId());
|
List<InventoryDelivery> tempDeliveryList = deliveryListMap.get(vo.getWarehouseId());
|
||||||
if (CollUtil.isNotEmpty(tempDeliveryList)){
|
if (CollUtil.isNotEmpty(tempDeliveryList)){
|
||||||
for (InventoryDelivery inventoryDelivery : tempDeliveryList) {
|
for (InventoryDelivery inventoryDelivery : tempDeliveryList) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.sip.service.impl;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
|
@ -249,7 +250,8 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
// omsInventoryInner.setTaxTotal(inventoryInfoList.stream().map(item->
|
// omsInventoryInner.setTaxTotal(inventoryInfoList.stream().map(item->
|
||||||
// item.getInnerPrice().divide(BigDecimal.ONE.add(item.getTaxRate()),2, RoundingMode.HALF_UP)
|
// item.getInnerPrice().divide(BigDecimal.ONE.add(item.getTaxRate()),2, RoundingMode.HALF_UP)
|
||||||
// ).reduce(BigDecimal.ZERO, BigDecimal::add));
|
// ).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||||
BigDecimal divide = omsInventoryInner.getTotalAmount().divide(BigDecimal.ONE.add(omsInventoryInner.getTaxRate()), 2, RoundingMode.HALF_UP);
|
BigDecimal taxRate = omsInventoryInner.getTaxRate()==null?new BigDecimal("0.13"):omsInventoryInner.getTaxRate();
|
||||||
|
BigDecimal divide = omsInventoryInner.getTotalAmount().divide(BigDecimal.ONE.add(taxRate), 2, RoundingMode.HALF_UP);
|
||||||
omsInventoryInner.setTaxTotal(omsInventoryInner.getTotalAmount().subtract(divide));
|
omsInventoryInner.setTaxTotal(omsInventoryInner.getTotalAmount().subtract(divide));
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -263,24 +265,30 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String,Object> getInventoryInfoList(List<InventoryInfoExcelDto> inventoryInfoExcelDtoList, String productCode) {
|
public Map<String,Object> getInventoryInfoList(List<InventoryInfoExcelDto> inventoryInfoExcelDtoList, String productCode, String orderType) {
|
||||||
long count = inventoryInfoExcelDtoList.stream().filter(item -> !item.getProductCode().equals(productCode)).count();
|
long count = inventoryInfoExcelDtoList.stream().filter(item -> !item.getProductCode().equals(productCode)).count();
|
||||||
if (count > 0){
|
if (count > 0){
|
||||||
throw new ServiceException("导入清单的产品与出库单不符");
|
throw new ServiceException("导入清单的产品与出库单不符");
|
||||||
}
|
}
|
||||||
// List<String> warehouseNameList = inventoryInfoExcelDtoList.stream().map(InventoryInfoExcelDto::getWarehouseName).distinct().collect(Collectors.toList());
|
|
||||||
// if (warehouseNameList.size() > 1){
|
|
||||||
// throw new ServiceException("导入清单只能有一个仓库");
|
|
||||||
// }
|
|
||||||
List<ProductInfo> productInfos = productInfoService.selectProductInfoByCodeList(Collections.singletonList(productCode));
|
List<ProductInfo> productInfos = productInfoService.selectProductInfoByCodeList(Collections.singletonList(productCode));
|
||||||
if (CollUtil.isEmpty(productInfos)){
|
if (CollUtil.isEmpty(productInfos)){
|
||||||
throw new ServiceException("产品编码对应产品未找到");
|
throw new ServiceException("产品编码对应产品未找到");
|
||||||
}
|
}
|
||||||
// List<OmsWarehouseInfo> warehouseInfoList = warehouseInfoService.listByNameList(warehouseNameList);
|
Map<String, OmsWarehouseInfo> warehouseInfoMap=Collections.emptyMap();
|
||||||
// if (CollUtil.isEmpty(warehouseInfoList)) {
|
if ("2".equalsIgnoreCase(orderType)){
|
||||||
// throw new ServiceException("仓库未找到,导入失败");
|
List<String> warehouseNameList = inventoryInfoExcelDtoList.stream().map(InventoryInfoExcelDto::getWarehouseName).distinct().collect(Collectors.toList());
|
||||||
// }
|
if (warehouseNameList.size() > 1){
|
||||||
// Map<String, OmsWarehouseInfo> warehouseInfoMap = warehouseInfoList.stream().collect(Collectors.toMap(OmsWarehouseInfo::getWarehouseName, Function.identity(), (v1, v2) -> v1));
|
throw new ServiceException("导入清单只能有一个仓库");
|
||||||
|
}
|
||||||
|
List<OmsWarehouseInfo> warehouseInfoList = warehouseInfoService.listByNameList(warehouseNameList);
|
||||||
|
if (CollUtil.isEmpty(warehouseInfoList)) {
|
||||||
|
throw new ServiceException("仓库未找到,导入失败");
|
||||||
|
}
|
||||||
|
warehouseInfoMap = warehouseInfoList.stream().collect(Collectors.toMap(OmsWarehouseInfo::getWarehouseName, Function.identity(), (v1, v2) -> v1));
|
||||||
|
}
|
||||||
|
Map<String, OmsWarehouseInfo> finalWarehouseInfoMap=warehouseInfoMap;
|
||||||
|
|
||||||
List<InventoryInfo> inventoryInfoList = inventoryInfoExcelDtoList.stream().map(item -> {
|
List<InventoryInfo> inventoryInfoList = inventoryInfoExcelDtoList.stream().map(item -> {
|
||||||
InventoryInfo info = new InventoryInfo();
|
InventoryInfo info = new InventoryInfo();
|
||||||
info.setInventoryStatus(InventoryInfo.InventoryStatusEnum.INNER.getCode());
|
info.setInventoryStatus(InventoryInfo.InventoryStatusEnum.INNER.getCode());
|
||||||
|
|
@ -289,9 +297,12 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
info.setModel(productInfos.get(0).getModel());
|
info.setModel(productInfos.get(0).getModel());
|
||||||
info.setProductDesc(productInfos.get(0).getDescription());
|
info.setProductDesc(productInfos.get(0).getDescription());
|
||||||
info.setInnerPrice(item.getInnerPrice());
|
info.setInnerPrice(item.getInnerPrice());
|
||||||
// OmsWarehouseInfo omsWarehouseInfo = warehouseInfoMap.get(item.getWarehouseName());
|
if ("2".equalsIgnoreCase(orderType)){
|
||||||
// info.setWarehouseId(omsWarehouseInfo.getId());
|
OmsWarehouseInfo omsWarehouseInfo = finalWarehouseInfoMap.get(item.getWarehouseName());
|
||||||
// info.setWarehouseName(omsWarehouseInfo.getWarehouseName());
|
info.setWarehouseId(omsWarehouseInfo.getId());
|
||||||
|
info.setWarehouseName(omsWarehouseInfo.getWarehouseName());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import com.ruoyi.sip.flowable.service.TodoService;
|
||||||
import com.ruoyi.sip.mapper.OmsPurchaseOrderItemHistoryMapper;
|
import com.ruoyi.sip.mapper.OmsPurchaseOrderItemHistoryMapper;
|
||||||
import com.ruoyi.sip.mapper.OmsPurchaseOrderHistoryMapper;
|
import com.ruoyi.sip.mapper.OmsPurchaseOrderHistoryMapper;
|
||||||
import com.ruoyi.sip.service.ICnareaService;
|
import com.ruoyi.sip.service.ICnareaService;
|
||||||
|
import com.ruoyi.sip.service.IInventoryAuthService;
|
||||||
import com.ruoyi.sip.service.IVendorInfoService;
|
import com.ruoyi.sip.service.IVendorInfoService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
|
@ -373,6 +374,7 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
||||||
for (OmsPurchaseOrderItem omsPurchaseOrderItem : omsPurchaseOrderItemList)
|
for (OmsPurchaseOrderItem omsPurchaseOrderItem : omsPurchaseOrderItemList)
|
||||||
{
|
{
|
||||||
omsPurchaseOrderItem.setPurchaseId(id);
|
omsPurchaseOrderItem.setPurchaseId(id);
|
||||||
|
omsPurchaseOrderItem.setInnerQuantity(BigDecimal.ZERO);
|
||||||
list.add(omsPurchaseOrderItem);
|
list.add(omsPurchaseOrderItem);
|
||||||
}
|
}
|
||||||
if (list.size() > 0)
|
if (list.size() > 0)
|
||||||
|
|
@ -490,7 +492,7 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
||||||
OmsPurchaseOrder omsPurchaseOrder = new OmsPurchaseOrder();
|
OmsPurchaseOrder omsPurchaseOrder = new OmsPurchaseOrder();
|
||||||
omsPurchaseOrder.setPurchaseNo(businessKey);
|
omsPurchaseOrder.setPurchaseNo(businessKey);
|
||||||
omsPurchaseOrder.setApproveStatus(ApproveStatusEnum.APPROVE_COMPLETE.getCode());
|
omsPurchaseOrder.setApproveStatus(ApproveStatusEnum.APPROVE_COMPLETE.getCode());
|
||||||
if (existOrder.getFlowType().equalsIgnoreCase(OmsPurchaseOrder.FlowTypeEnum.OFFLINE.getValue())){
|
if (existOrder.getFlowType().equalsIgnoreCase(OmsPurchaseOrder.FlowTypeEnum.OFFLINE.getCode())){
|
||||||
omsPurchaseOrder.setConfirmStatus(OmsPurchaseOrder.ConfirmStatusEnum.CONFIRM.getCode());
|
omsPurchaseOrder.setConfirmStatus(OmsPurchaseOrder.ConfirmStatusEnum.CONFIRM.getCode());
|
||||||
}
|
}
|
||||||
omsPurchaseOrder.setApproveTime(DateUtils.getNowDate());
|
omsPurchaseOrder.setApproveTime(DateUtils.getNowDate());
|
||||||
|
|
|
||||||
|
|
@ -523,7 +523,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
public String exportList(ProjectOrderInfo projectOrderInfo) {
|
public String exportList(ProjectOrderInfo projectOrderInfo) {
|
||||||
try {
|
try {
|
||||||
// 获取项目信息列表
|
// 获取项目信息列表
|
||||||
List<ProjectOrderInfo> projectInfos = fetchProjectInfos(projectOrderInfo);
|
List<ProjectOrderInfo> projectInfos = this.selectProjectOrderInfoList(projectOrderInfo);
|
||||||
|
|
||||||
// 补充项目详细数据
|
// 补充项目详细数据
|
||||||
enrichProjectData(projectInfos);
|
enrichProjectData(projectInfos);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ public class OuterDeliveryProductVo {
|
||||||
private Long deliveryConfirmQuantity;
|
private Long deliveryConfirmQuantity;
|
||||||
private Long availableCount;
|
private Long availableCount;
|
||||||
private String warehouseName;
|
private String warehouseName;
|
||||||
|
private String orderType;
|
||||||
private Long warehouseId;
|
private Long warehouseId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
<if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
|
<if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
|
||||||
<if test="approveUserName != null and approveUserName != ''">and approve_user_name = #{approveUserName}
|
<if test="approveUserName != null and approveUserName != ''">and approve_user_name = #{approveUserName}
|
||||||
|
</if>
|
||||||
|
<if test="approveUser != null and approveUser != ''">and approve_user = #{approveUser}
|
||||||
</if>
|
</if>
|
||||||
<if test="applyUserName != null and applyUserName != ''">and apply_user_name like concat('%',
|
<if test="applyUserName != null and applyUserName != ''">and apply_user_name like concat('%',
|
||||||
#{applyUserName}, '%')
|
#{applyUserName}, '%')
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t1.update_time,
|
t1.update_time,
|
||||||
t2.model,
|
t2.model,
|
||||||
t3.vendor_name,
|
t3.vendor_name,
|
||||||
|
t4.order_type,
|
||||||
t5.project_name,
|
t5.project_name,
|
||||||
t5.project_code
|
t5.project_code
|
||||||
from oms_inventory_outer t1
|
from oms_inventory_outer t1
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="flowType != null "> and t1.flow_type = #{flowType}</if>
|
<if test="flowType != null "> and t1.flow_type = #{flowType}</if>
|
||||||
<if test="vendorName != null "> and t2.vendor_name = #{vendorName}</if>
|
<if test="vendorName != null "> and t2.vendor_name = #{vendorName}</if>
|
||||||
<if test="ownerName != null "> and t1.owner_name = #{ownerName}</if>
|
<if test="ownerName != null "> and t1.owner_name = #{ownerName}</if>
|
||||||
|
<if test="authVendorCodeList != null and authVendorCodeList.size>0 "> and t2.vendor_code in
|
||||||
|
<foreach item="item" collection="authVendorCodeList" separator="," open="(" close=")">#{item}</foreach>
|
||||||
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -192,6 +195,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="authVendorCodeList != null and authVendorCodeList.size>0 "> and t4.vendor_code in
|
||||||
|
<foreach item="item" collection="authVendorCodeList" separator="," open="(" close=")">#{item}</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by t2.create_time desc
|
order by t2.create_time desc
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,13 +44,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
shipment_amount, actual_purchase_amount, order_end_time, delivery_time, company_delivery, notifier,finance_status,
|
shipment_amount, actual_purchase_amount, order_end_time, delivery_time, company_delivery, notifier,finance_status,
|
||||||
notifier_email, notifier_phone, duty, duty_email, duty_phone, order_channel, partner_code, supplier,notifier_address,
|
notifier_email, notifier_phone, duty, duty_email, duty_phone, order_channel, partner_code, supplier,notifier_address,
|
||||||
remark, order_status, create_by, create_time, update_by, update_time,version_code,process_type,process_template,discount_fold,
|
remark, order_status, create_by, create_time, update_by, update_time,version_code,process_type,process_template,discount_fold,
|
||||||
delivery_status,sign_status,outer_status,approve_time,payment_method,payment_ratio,payment_description
|
delivery_status,sign_status,outer_status,approve_time,payment_method,payment_ratio,payment_description,order_type
|
||||||
|
|
||||||
from project_order_info t1
|
from project_order_info t1
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="selectProjectOrderInfoRelationVo">
|
<sql id="selectProjectOrderInfoRelationVo">
|
||||||
select t1.id, t1.project_id,t1.province, t1.city, t1.business_person, t1.business_email, t1.business_phone, t1.order_code, t1.currencyType,
|
select t1.id, t1.project_id,t1.province, t1.city, t1.business_person, t1.business_email, t1.business_phone, t1.order_code, t1.currencyType,
|
||||||
t1.shipment_amount, t1.actual_purchase_amount, t1.order_end_time, t1.delivery_time, t1.company_delivery, t1.notifier,
|
t1.shipment_amount, t1.actual_purchase_amount, t1.order_end_time, t1.delivery_time, t1.company_delivery, t1.notifier,t1.order_type,
|
||||||
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
||||||
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
||||||
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address,t1.finance_status,
|
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address,t1.finance_status,
|
||||||
|
|
@ -491,6 +491,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="notifierPhone != null">notifier_phone,</if>
|
<if test="notifierPhone != null">notifier_phone,</if>
|
||||||
<if test="notifierAddress != null">notifier_address,</if>
|
<if test="notifierAddress != null">notifier_address,</if>
|
||||||
<if test="duty != null">duty,</if>
|
<if test="duty != null">duty,</if>
|
||||||
|
<if test="orderType != null and orderType!=''">order_type,</if>
|
||||||
<if test="dutyEmail != null">duty_email,</if>
|
<if test="dutyEmail != null">duty_email,</if>
|
||||||
<if test="dutyPhone != null">duty_phone,</if>
|
<if test="dutyPhone != null">duty_phone,</if>
|
||||||
<if test="orderChannel != null">order_channel,</if>
|
<if test="orderChannel != null">order_channel,</if>
|
||||||
|
|
@ -532,6 +533,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="notifierPhone != null">#{notifierPhone},</if>
|
<if test="notifierPhone != null">#{notifierPhone},</if>
|
||||||
<if test="notifierAddress != null">#{notifierAddress},</if>
|
<if test="notifierAddress != null">#{notifierAddress},</if>
|
||||||
<if test="duty != null">#{duty},</if>
|
<if test="duty != null">#{duty},</if>
|
||||||
|
<if test="orderType != null and orderType!=''">#{orderType},</if>
|
||||||
<if test="dutyEmail != null">#{dutyEmail},</if>
|
<if test="dutyEmail != null">#{dutyEmail},</if>
|
||||||
<if test="dutyPhone != null">#{dutyPhone},</if>
|
<if test="dutyPhone != null">#{dutyPhone},</if>
|
||||||
<if test="orderChannel != null">#{orderChannel},</if>
|
<if test="orderChannel != null">#{orderChannel},</if>
|
||||||
|
|
@ -595,6 +597,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update_time,
|
update_time,
|
||||||
process_type,
|
process_type,
|
||||||
process_template,
|
process_template,
|
||||||
|
order_type,
|
||||||
discount_fold)
|
discount_fold)
|
||||||
select id,
|
select id,
|
||||||
project_id,
|
project_id,
|
||||||
|
|
@ -636,6 +639,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update_time,
|
update_time,
|
||||||
process_type,
|
process_type,
|
||||||
process_template,
|
process_template,
|
||||||
|
order_type,
|
||||||
discount_fold
|
discount_fold
|
||||||
from project_order_info
|
from project_order_info
|
||||||
where order_code = #{orderCode}
|
where order_code = #{orderCode}
|
||||||
|
|
@ -647,6 +651,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId != null">project_id = #{projectId},</if>
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||||||
<if test="province != null">province = #{province},</if>
|
<if test="province != null">province = #{province},</if>
|
||||||
<if test="city != null">city = #{city},</if>
|
<if test="city != null">city = #{city},</if>
|
||||||
|
<if test="orderType != null and orderType!=''">order_type=#{orderType},</if>
|
||||||
<if test="businessPerson != null">business_person = #{businessPerson},</if>
|
<if test="businessPerson != null">business_person = #{businessPerson},</if>
|
||||||
<if test="businessEmail != null">business_email = #{businessEmail},</if>
|
<if test="businessEmail != null">business_email = #{businessEmail},</if>
|
||||||
<if test="businessPhone != null">business_phone = #{businessPhone},</if>
|
<if test="businessPhone != null">business_phone = #{businessPhone},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue