From f8ad7dd4606cd290ccdac525ca50973951346403 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 18 Nov 2024 20:25:24 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E6=B7=BB=E5=8A=A0=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E6=96=B0=E5=A2=9E=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E4=BA=BA=E3=80=81=E6=94=B6=E8=B4=A7=E7=94=B5=E8=AF=9D?= =?UTF-8?q?=E3=80=81=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E8=AE=BE=E7=BD=AE=E4=B8=BA=E5=BF=85=E5=A1=AB=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93=E5=89=8D=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=96=B0=E5=A2=9E=E6=94=B6=E8=B4=A7=E4=BA=BA=E3=80=81?= =?UTF-8?q?=E6=94=B6=E8=B4=A7=E7=94=B5=E8=AF=9D=E3=80=81=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=AD=97=E6=AE=B5=EF=BC=8C=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=BA=E5=BF=85=E5=A1=AB=20=E4=BB=93=E5=BA=93=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AE=9E=E4=BD=93=E7=B1=BB=E6=96=B0=E5=A2=9E=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E4=BA=BA=E3=80=81=E6=94=B6=E8=B4=A7=E7=94=B5=E8=AF=9D?= =?UTF-8?q?=E3=80=81=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=20=E4=BB=93=E5=BA=93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8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=96=B9=E6=B3=95=20=E4=BF=AE=E6=94=B9=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E8=AE=A2=E5=8D=95=E5=AE=9E=E4=BD=93=E7=B1=BB=E7=9A=84?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=90=88=E8=AE=A1=E4=B8=BAInteger=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PurchaseOrderController.java | 15 +- .../ruoyi/purchase/domain/PurchaseOrder.java | 30 +- .../purchase/domain/Vo/PurchasePlanTwo.java | 10 + .../mapper/PurchaseOrderChildMapper.java | 5 + .../service/IPurchaseOrderService.java | 5 + .../impl/PurchaseOrderServiceImpl.java | 101 ++- .../com/ruoyi/stock/domain/StockInfo.java | 45 ++ .../purchase/PurchaseOrderChildMapper.xml | 18 + .../mapper/purchase/PurchaseOrderMapper.xml | 358 +++------ .../mapper/stock/StockInfoMapper.xml | 15 + .../purchase/purchaseOrder/purchaseOrder.html | 727 +++++------------- .../purchasePlan/addPurchaseOrder.html | 24 + .../templates/stock/stockInfo/add.html | 23 + .../templates/stock/stockInfo/edit.html | 22 + 14 files changed, 603 insertions(+), 795 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java index ba123e28..450a4781 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java @@ -165,7 +165,9 @@ public class PurchaseOrderController extends BaseController } - + /** + * 采购计划添加采购订单 + * */ @RequiresPermissions("purchase:purchaseOrder:add") @Log(title = "采购订单", businessType = BusinessType.INSERT) @PostMapping("/addPurchaseOrder") @@ -180,17 +182,8 @@ public class PurchaseOrderController extends BaseController // 数据校验,确保前端传入数据格式正确 // 执行主表插入操作 - PurchasePlanOne purchasePlanOne = addPurchaseOrder.getPurchasePlanOne(); - - PurchasePlanTwo purchasePlanTwo = addPurchaseOrder.getPurchasePlanTwo(); - - List purchasePlanSelectSupplierVoList = addPurchaseOrder.getPurchasePlanSelectSupplierVoList(); - List purchasePlanSelectMaterialVoList = addPurchaseOrder.getPurchasePlanSelectMaterialVoList(); - - System.out.println(addPurchaseOrder.getPurchasePlanOne()); - - return AjaxResult.success(); // 假设toAjax方法处理成功逻辑 + return toAjax(purchaseOrderService.addPurchasePlanToPurchaseOrder(addPurchaseOrder)); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrder.java index a3df134e..95928245 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseOrder.java @@ -47,7 +47,7 @@ public class PurchaseOrder extends BaseEntity /** 物料合计 */ @Excel(name = "物料合计") - private String materialSum; + private Integer materialSum; /** 实际采购总数 */ @Excel(name = "实际采购总数") @@ -67,7 +67,7 @@ public class PurchaseOrder extends BaseEntity /** 不含税总价(RMB) */ @Excel(name = "不含税总价(RMB)") - private BigDecimal normbSum; + private BigDecimal noRmbSum; /** 含税总价(RMB) */ @Excel(name = "含税总价(RMB)") @@ -203,15 +203,15 @@ public class PurchaseOrder extends BaseEntity { return supplierName; } - public void setMaterialSum(String materialSum) - { - this.materialSum = materialSum; - } - public String getMaterialSum() - { + public Integer getMaterialSum() { return materialSum; } + + public void setMaterialSum(Integer materialSum) { + this.materialSum = materialSum; + } + public void setActualPurchaseSum(Integer actualPurchaseSum) { this.actualPurchaseSum = actualPurchaseSum; @@ -248,15 +248,15 @@ public class PurchaseOrder extends BaseEntity { return storageSum; } - public void setNormbSum(BigDecimal normbSum) - { - this.normbSum = normbSum; + + public BigDecimal getNoRmbSum() { + return noRmbSum; } - public BigDecimal getNormbSum() - { - return normbSum; + public void setNoRmbSum(BigDecimal noRmbSum) { + this.noRmbSum = noRmbSum; } + public void setRmbSum(BigDecimal rmbSum) { this.rmbSum = rmbSum; @@ -453,7 +453,7 @@ public class PurchaseOrder extends BaseEntity .append("sharedInventoryOccupancySum", getSharedInventoryOccupancySum()) .append("refundsExchangesSum", getRefundsExchangesSum()) .append("storageSum", getStorageSum()) - .append("normbSum", getNormbSum()) + .append("noRmbSum", getNoRmbSum()) .append("rmbSum", getRmbSum()) .append("eceiptType", getEceiptType()) .append("arrivedTime", getArrivedTime()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/PurchasePlanTwo.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/PurchasePlanTwo.java index b4e7dae6..f58e9ce7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/PurchasePlanTwo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/PurchasePlanTwo.java @@ -32,6 +32,16 @@ public class PurchasePlanTwo { /** 仓库名称*/ private String warehouseName; + + /** 收货人*/ + private String receivePerson; + + /** 收货人电话*/ + private String receivePersonPhone; + + /** 收货地址*/ + private String receiveAddress; + /** 物料合计*/ private Integer materialSum; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseOrderChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseOrderChildMapper.java index b575454c..11ebb52a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseOrderChildMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseOrderChildMapper.java @@ -115,4 +115,9 @@ public interface PurchaseOrderChildMapper * 通过料号查询采购订单子表列表 * */ List selectOrderChildListByMaterialNo(String materialCode); + + /** + * 批量新增采购订单子表数据 + * */ + int batchInsertPurchaseOrderChild(List purchaseOrderChildren); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java index 593ff6f7..b54006c2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java @@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.purchase.domain.PurchaseOrder; import com.ruoyi.purchase.domain.PurchaseOrderVo; import com.ruoyi.purchase.domain.PurchasePlan; +import com.ruoyi.purchase.domain.Vo.AddPurchaseOrder; import com.ruoyi.warehouse.domain.WarehouseStorageOrder; import org.activiti.engine.runtime.ProcessInstance; import org.springframework.transaction.annotation.Transactional; @@ -100,4 +101,8 @@ public interface IPurchaseOrderService AjaxResult uploadSingleFile(MultipartFile file,String purchaseOrderCode); + /** + * 采购计划添加采购订单 + * */ + int addPurchasePlanToPurchaseOrder(AddPurchaseOrder addPurchaseOrder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java index 230ffbdc..4f551164 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java @@ -14,6 +14,7 @@ import com.ruoyi.common.core.page.PageDomain; import com.ruoyi.common.core.page.TableSupport; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.service.ICommonService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.MoneyUtils; @@ -28,12 +29,11 @@ import com.ruoyi.financial.domain.FinancialAccountsPayable; import com.ruoyi.financial.mapper.FinancialAccountsPayableMapper; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; -import com.ruoyi.purchase.domain.PurchaseOrder; -import com.ruoyi.purchase.domain.PurchaseOrderChild; -import com.ruoyi.purchase.domain.PurchaseOrderVo; -import com.ruoyi.purchase.domain.PurchasePlan; +import com.ruoyi.purchase.domain.*; +import com.ruoyi.purchase.domain.Vo.*; import com.ruoyi.purchase.mapper.PurchaseOrderChildMapper; import com.ruoyi.purchase.mapper.PurchaseOrderMapper; +import com.ruoyi.purchase.mapper.PurchasePlanChildMapper; import com.ruoyi.purchase.mapper.PurchasePlanMapper; import com.ruoyi.purchase.service.IPurchaseOrderService; import com.ruoyi.system.domain.SysAttachFile; @@ -86,6 +86,12 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService @Autowired private PurchaseOrderMapper purchaseOrderMapper; + @Autowired + private PurchaseOrderChildMapper purchaseOrderChildMapper; + + @Autowired + private PurchasePlanChildMapper purchasePlanChildMapper; + @Autowired private RedisCache redisCache; @@ -119,11 +125,6 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService @Autowired private ISysRoleService roleService; - @Autowired - private PurchaseOrderChildMapper purchaseOrderChildService; - - @Autowired - private PurchasePlanMapper purchasePlanService; @Autowired private FinancialAccountsPayableMapper financialAccountsPayableMapper; @@ -234,6 +235,86 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService { return 1; } + + + /** + * 采购计划添加采购订单 + * */ + @Transactional(rollbackFor = Exception.class) + @Override + public int addPurchasePlanToPurchaseOrder(AddPurchaseOrder addPurchaseOrder) { + String loginName = ShiroUtils.getLoginName(); + PurchasePlanTwo purchasePlanTwo = addPurchaseOrder.getPurchasePlanTwo(); + PurchasePlanOne purchasePlanOne = addPurchaseOrder.getPurchasePlanOne(); + List purchasePlanSelectSupplierVoList = addPurchaseOrder.getPurchasePlanSelectSupplierVoList(); + List purchasePlanSelectMaterialVoList = addPurchaseOrder.getPurchasePlanSelectMaterialVoList(); + + PurchaseOrder purchaseOrder = new PurchaseOrder(); + purchaseOrder.setPurchaseOrderCode(redisCache.generateBillNo("CG")); + purchaseOrder.setPurchasePlanCode(purchasePlanOne.getPurchasePlanCodes()); + purchaseOrder.setPaymentStatus("0"); + purchaseOrder.setSupplierCode(purchasePlanTwo.getSupplierCode()); + purchaseOrder.setSupplierName(purchasePlanTwo.getSupplierName()); + purchaseOrder.setWarehouseStorageStatus("6"); //待入库 + purchaseOrder.setPurchaseBuyer(loginName); + purchaseOrder.setMaterialSum(purchasePlanTwo.getMaterialSum()); + purchaseOrder.setActualPurchaseSum(purchasePlanTwo.getThisPurchaseSum()); + purchaseOrder.setSharedInventoryOccupancySum(purchasePlanTwo.getSharedInventoryOccupancySum()); + purchaseOrder.setNoRmbSum(purchasePlanTwo.getNoRmbSum()); + purchaseOrder.setRmbSum(purchasePlanTwo.getRmbSum()); + purchaseOrder.setStockNo(purchasePlanTwo.getWarehouseCode()); + purchaseOrder.setStockName(purchasePlanTwo.getWarehouseName()); + purchaseOrder.setReceivePerson(purchasePlanTwo.getReceivePerson()); + purchaseOrder.setReceivePersonPhone(purchasePlanTwo.getReceivePersonPhone()); + purchaseOrder.setReceiveAddress(purchasePlanTwo.getReceiveAddress()); + purchaseOrder.setCreateTime(new Date()); + purchaseOrder.setCreateBy(loginName); + + + buildPurchaseChild(purchasePlanSelectMaterialVoList, purchaseOrder); + int result = purchaseOrderMapper.insertPurchaseOrder(purchaseOrder); + if (result <= 0){ + throw new BusinessException("添加采购订单数据失败"); + } + return result; + } + + //新增采购订单子表 + private void buildPurchaseChild(List purchasePlanSelectMaterialVoList, PurchaseOrder purchaseOrder) { + List purchaseOrderChildren = new ArrayList<>(); + + for (PurchasePlanSelectMaterialVo purchasePlanSelectMaterialVo : purchasePlanSelectMaterialVoList) { + PurchaseOrderChild purchaseOrderChild = new PurchaseOrderChild(); + Long purchasePlanChildId = purchasePlanSelectMaterialVo.getPurchasePlanChildId(); + PurchasePlanChild purchasePlanChild = purchasePlanChildMapper.selectPurchasePlanChildById(purchasePlanChildId); + + purchaseOrderChild.setPurchaseOrderCode(purchaseOrder.getPurchaseOrderCode()); + purchaseOrderChild.setMaterialNo(purchasePlanSelectMaterialVo.getMaterialNo()); + purchaseOrderChild.setMaterialName(purchasePlanSelectMaterialVo.getMaterialName()); + purchaseOrderChild.setMaterialBrand(purchasePlanSelectMaterialVo.getMaterialBrand()); + purchaseOrderChild.setMaterialDescribe(purchasePlanSelectMaterialVo.getMaterialDescribe()); + purchaseOrderChild.setMaterialModel(purchasePlanSelectMaterialVo.getMaterialModel()); + purchasePlanChild.setMaterialProcessMethod(purchasePlanChild.getMaterialProcessMethod()); + purchaseOrderChild.setMaterialUnit(purchasePlanChild.getMaterialUnit()); + purchaseOrderChild.setMaterialPhotourl(purchasePlanChild.getMaterialPhotourl()); + purchaseOrderChild.setMaterialType(purchasePlanChild.getMaterialType()); + purchaseOrderChild.setWarehouseDept(purchasePlanChild.getWarehouseDept()); + purchaseOrderChild.setPlanDeliveryTime(purchasePlanSelectMaterialVo.getPlanDeliveryTime()); + purchaseOrderChild.setSharedInventoryOccupancyNum(purchasePlanSelectMaterialVo.getSharedInventoryOccupancyNum()); + purchaseOrderChild.setMaterialNormbSum(purchasePlanSelectMaterialVo.getMaterialNoRmbSum()); + purchaseOrderChild.setMaterialRmbSum(purchasePlanSelectMaterialVo.getMaterialRmbSum()); + purchaseOrderChild.setPlanPurchaseNum(purchasePlanSelectMaterialVo.getThisPurchaseNum()); + purchaseOrderChild.setActualPurchaseNum(purchasePlanSelectMaterialVo.getThisPurchaseNum()); + purchaseOrderChild.setCreateBy(ShiroUtils.getLoginName()); + purchaseOrderChild.setCreateTime(new Date()); + purchaseOrderChildren.add(purchaseOrderChild); + } + int result = purchaseOrderChildMapper.batchInsertPurchaseOrderChild(purchaseOrderChildren); + if (result <= 0){ + throw new BusinessException("新增采购订单子表数据失败"); + } + } + //生成应付账款,根据物料的供应商划分应付供应商,供应商的物料价格合计。 public int purchaseOrderPayment(PurchaseOrder purchaseOrder) { //获取物料供应商的信息,采购订单的供应商数量 @@ -508,7 +589,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService PurchaseOrderChild purchaseOrderChild = new PurchaseOrderChild(); purchaseOrderChild.setPurchaseOrderCode(purchaseOrderCode); //purchaseOrderChild.setSupplierCode(supplierCode); - List purchaseOrderChildList = purchaseOrderChildService.selectChildListBySupplierCodeAndOrderCode(purchaseOrderChild); + List purchaseOrderChildList = purchaseOrderChildMapper.selectChildListBySupplierCodeAndOrderCode(purchaseOrderChild); List> detailList = new ArrayList<>(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java index 63010d31..21ac17d4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java @@ -37,6 +37,24 @@ public class StockInfo extends BaseEntity @Excel(name = "仓库地址") private String stockAddr; + + + /** 收货人 */ + @FieldCompare(chineseName = "收货人") + @Excel(name = "收货人") + private String receivePerson; + + /** 收货人电话 */ + @FieldCompare(chineseName = "收货人电话") + @Excel(name = "收货人电话") + private String receivePersonPhone; + + + /** 收货人地址*/ + @FieldCompare(chineseName = "收货人地址") + @Excel(name = "收货人地址") + private String receiveAddress; + /** 仓库管理人 */ @FieldCompare(chineseName = "仓库管理人") @Excel(name = "仓库管理人") @@ -91,6 +109,30 @@ public class StockInfo extends BaseEntity this.stockAddr = stockAddr; } + public String getReceivePerson() { + return receivePerson; + } + + public void setReceivePerson(String receivePerson) { + this.receivePerson = receivePerson; + } + + public String getReceivePersonPhone() { + return receivePersonPhone; + } + + public void setReceivePersonPhone(String receivePersonPhone) { + this.receivePersonPhone = receivePersonPhone; + } + + public String getReceiveAddress() { + return receiveAddress; + } + + public void setReceiveAddress(String receiveAddress) { + this.receiveAddress = receiveAddress; + } + public String getStockManager() { return stockManager; } @@ -131,6 +173,9 @@ public class StockInfo extends BaseEntity .append("stockNO", getStockNO()) .append("stockName", getStockName()) .append("stockAddr", getStockAddr()) + .append("receivePerson", getReceivePerson()) + .append("receivePersonPhone", getReceivePersonPhone()) + .append("receiveAddress", getReceiveAddress()) .append("stockManager", getStockManager()) .append("stockmemo", getStockMemo()) .append("firstAddTime", getFirstAddTime()) diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml index fcaa3e38..bbfc9939 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml @@ -97,6 +97,24 @@ + + + insert into purchase_order_child + (purchase_order_code, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, + material_describe, material_process_method, material_model, warehouse_dept, material_noRmb_sum, material_rmb_sum, + plan_purchase_num, actual_purchase_num, shared_inventory_occupancy_num, plan_delivery_time, create_by, create_time + ) + values + + #{item.purchaseOrderCode}, #{item.materialNo}, #{item.materialName}, #{item.materialType}, #{item.materialPhotourl}, + #{item.materialBrand}, #{item.materialUnit}, #{item.materialDescribe}, #{item.materialProcessMethod}, #{item.materialModel}, + #{item.warehouseDept}, #{item.materialNormbSum}, #{item.materialRmbSum}, #{item.planPurchaseNum}, #{item.actualPurchaseNum}, + #{item.sharedInventoryOccupancyNum}, #{item.planDeliveryTime}, #{item.createBy}, #{item.createTime} + + + + + update purchase_order_child diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml index f8ec81c8..b4a81b1a 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderMapper.xml @@ -1,125 +1,64 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - select purchase_order_id, purchase_order_code, supplier_code, supplier_name, - arrived_time, eceipt_type,eceipt_status, payment_status, supplier_num, material_amount, - material_sum, noRmbSum, rmbSum, use_status, audit_status, purchase_buyer, - customer_contact, contact_number, customer_fax, delivery_address, payment_terms, - delivery_conditions, delivery_method, purchase_name, billing_date, tax_rate, - purchase_category, purchase_commander, customer_order_number, remark_content, - close_case_no, close_case_name, close_case_time,confirm_no,confirm_time,confirm_name, - del_flag, stock_no, stock_name, stock_address, stock_contact, stock_phone, - approve_time, standby_one, standby_two,create_time, create_by, update_time, update_by, - instance_id, instance_type, submit_instance_id, cancel_instance_id, - restore_instance_id, apply_title, apply_user, apply_time - from purchase_order + select purchase_order_id, purchase_order_code, purchase_plan_code, warehouse_storage_status, payment_status, supplier_code, supplier_name, material_sum, actual_purchase_sum, shared_inventory_occupancy_sum, refunds_exchanges_sum, storage_sum, noRmb_sum, rmb_sum, eceipt_type, arrived_time, stock_no, stock_name, receive_person, receive_person_phone, receive_address, purchase_buyer, use_status, audit_status, create_by, create_time, update_by, update_time, del_flag, instance_id, instance_type, submit_instance_id, cancel_instance_id, restore_instance_id, apply_title, apply_user, apply_time from purchase_order - select count(1) from purchase_order where purchase_ordre_code = #{purchaseOrderCode} limit 1 - + delete from purchase_order where purchase_order_id in @@ -292,24 +200,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - - - - + + update purchase_order set del_flag = '1' where purchase_order_id = #{purchaseOrderId} + - - update sys_customer_quote set use_status = '1' sys_customer_quote where id in - - #{id} - - + + update purchase_order set del_flag = '0' where purchase_order_id = #{purchaseOrderId} + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml b/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml index 30f8c187..5fdd5cb8 100644 --- a/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml @@ -9,6 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -20,6 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" StockNo, Stockname, stockAddr, + receive_address, + receive_person, + receive_person_phone, stockmanager, stockmemo, first_add_time, @@ -59,6 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" StockNO, Stockname, stockAddr, + receive_address, + receive_person, + receive_person_phone, stockmanager, stockmemo, first_add_time, @@ -67,6 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{stockNO}, #{stockName}, #{stockAddr}, + #{receiveAddress}, + #{receivePerson}, + #{receivePersonPhone}, #{stockManager}, #{stockMemo}, #{firstAddTime}, @@ -79,6 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" StockNO = #{stockNO}, Stockname = #{stockName}, StockAddr = #{stockAddr}, + receive_address = #{receiveAddress}, + receive_person = #{receivePerson}, + receive_person_phone = #{receivePersonPhone}, stockmanager = #{stockManager}, stockmemo = #{stockMemo}, update_info_time = #{updateInfoTime}, diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html index c6d5a660..74482c48 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html @@ -2,547 +2,218 @@ - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • - -
  • -  搜索 -  重置 -
  • -
-
-
-
- - - -
-
-
-
-
- - -