From 189d0533ee35585f63c32b4db564feccf5679cb1 Mon Sep 17 00:00:00 2001
From: "DESKTOP-369JRHT\\12997" <9>
Date: Mon, 30 Oct 2023 18:09:11 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=B4=A7=E6=8D=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fuintAdmin/src/router/index.js | 36 ++-
.../convenienceStore/returns/details.vue | 2 +-
.../views/convenienceStore/returns/index.vue | 4 +-
.../controller/MtDamageController.java | 100 +++++++
.../controller/MtDamageDetailsController.java | 115 ++++++++
.../controller/MtInventoryController.java | 19 +-
.../MtInventoryDetailsController.java | 25 +-
.../convenienceSore/entity/MtDamage.java | 57 ++++
.../entity/MtDamageDetails.java | 52 ++++
.../convenienceSore/entity/MtInventory.java | 6 +-
.../entity/MtInventoryDetails.java | 2 +-
.../mapper/MtDamageDetailsMapper.java | 94 +++++++
.../mapper/MtDamageMapper.java | 93 +++++++
.../mapper/MtInventoryDetailsMapper.java | 5 +
.../mapper/MtInventoryMapper.java | 5 +-
.../mapper/MtReturnsMapper.java | 3 +
.../mapper/xml/MtDamageDetailsMapper.xml | 250 ++++++++++++++++++
.../mapper/xml/MtDamageMapper.xml | 249 +++++++++++++++++
.../mapper/xml/MtInventoryDetailsMapper.xml | 121 +++++++--
.../mapper/xml/MtInventoryMapper.xml | 97 ++++++-
.../mapper/xml/MtReturnsMapper.xml | 5 +-
.../service/MtDamageDetailsService.java | 66 +++++
.../service/MtDamageService.java | 62 +++++
.../service/MtInventoryDetailsService.java | 8 +
.../service/MtInventoryService.java | 9 +-
.../impl/MtDamageDetailsServiceImpl.java | 134 ++++++++++
.../service/impl/MtDamageServiceImpl.java | 134 ++++++++++
.../impl/MtInventoryDetailsServiceImpl.java | 52 +++-
.../service/impl/MtInventoryServiceImpl.java | 15 +-
.../convenienceSore/vo/MtDamageDetailsVO.java | 26 ++
.../convenienceSore/vo/MtDamageVO.java | 22 ++
.../vo/MtInventoryDetailsVO.java | 17 +-
.../convenienceSore/vo/MtInventoryVO.java | 9 +-
33 files changed, 1835 insertions(+), 59 deletions(-)
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtDamageController.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtDamageDetailsController.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamage.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamageDetails.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageDetailsMapper.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageMapper.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageDetailsMapper.xml
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageMapper.xml
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageDetailsService.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageService.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageDetailsServiceImpl.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageServiceImpl.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageDetailsVO.java
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageVO.java
diff --git a/fuintAdmin/src/router/index.js b/fuintAdmin/src/router/index.js
index b0c071dee..4e1449667 100644
--- a/fuintAdmin/src/router/index.js
+++ b/fuintAdmin/src/router/index.js
@@ -134,7 +134,7 @@ export const constantRoutes = [
redirect: 'noredirect',
children: [
{
- path: '/purchase/details/:PpurchaseId/:PorderDate/:PapprovalStatus/:orderNumber',
+ path: '/purchase/details/:PpurchaseId/:PorderDate/:PapprovalStatus/:PorderNumber',
component: () => import('@/views/convenienceStore/purchase/details'),
name: 'purchase-details',
props: true, // 启用路由参数作为组件的props
@@ -150,7 +150,7 @@ export const constantRoutes = [
redirect: 'noredirect',
children: [
{
- path: '/returns/details/:PreturnsId/:PorderDate/:PapprovalStatus/:orderNumber',
+ path: '/returns/details/:PreturnsId/:PorderDate/:PapprovalStatus/:PorderNumber',
component: () => import('@/views/convenienceStore/returns/details'),
name: 'returns-details',
props: true, // 启用路由参数作为组件的props
@@ -158,6 +158,38 @@ export const constantRoutes = [
},
]
},
+
+ {
+ path: '/damage',
+ component: Layout,
+ hidden: true,
+ redirect: 'noredirect',
+ children: [
+ {
+ path: '/damage/details/:PdamageId/:PorderDate/:PapprovalStatus/:PorderNumber',
+ component: () => import('@/views/convenienceStore/damage/details'),
+ name: 'damage-details',
+ props: true, // 启用路由参数作为组件的props
+ meta: { title: '货损详情', icon: 'user' }
+ },
+ ]
+ },
+
+ {
+ path: '/inventory',
+ component: Layout,
+ hidden: true,
+ redirect: 'noredirect',
+ children: [
+ {
+ path: '/inventory/details/:PinventoryId/:PorderDate/:PapprovalStatus/:PorderNumber/:PcreataByName',
+ component: () => import('@/views/convenienceStore/inventory/details'),
+ name: 'inventory-details',
+ props: true, // 启用路由参数作为组件的props
+ meta: { title: '退货详情', icon: 'user' }
+ },
+ ]
+ },
]
// 动态路由,基于用户权限动态去加载
diff --git a/fuintAdmin/src/views/convenienceStore/returns/details.vue b/fuintAdmin/src/views/convenienceStore/returns/details.vue
index 2cb23dd10..f29fe735a 100644
--- a/fuintAdmin/src/views/convenienceStore/returns/details.vue
+++ b/fuintAdmin/src/views/convenienceStore/returns/details.vue
@@ -104,7 +104,7 @@
-
+
list = mtDamageService.queryByPage(page,mtDamage);
+ return getSuccessResult(list);
+ }
+ @GetMapping("/getListByPage")
+ public ResponseObject getListByPage(MtDamage mtDamage,
+ @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
+ com.baomidou.mybatisplus.extension.plugins.pagination.Page page =new com.baomidou.mybatisplus.extension.plugins.pagination.Page(pageNo,pageSize);
+ IPage list = mtDamageService.getListByPage(page,mtDamage);
+ return getSuccessResult(list);
+ }
+ /**
+ * 通过主键查询单条数据
+ *
+ * @param id 主键
+ * @return 单条数据
+ */
+ @GetMapping("{id}")
+ public ResponseObject queryById(@PathVariable("id") Integer id) {
+ return getSuccessResult(this.mtDamageService.queryById(id));
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param mtDamage 实体
+ * @return 新增结果
+ */
+ @PostMapping
+ public ResponseObject add(@RequestBody MtDamage mtDamage) {
+ return getSuccessResult(this.mtDamageService.insert(mtDamage));
+ }
+
+ /**
+ * 编辑数据
+ *
+ * @param mtDamage 实体
+ * @return 编辑结果
+ */
+ @PutMapping
+ public ResponseObject edit(@RequestBody MtDamage mtDamage) {
+ return getSuccessResult(this.mtDamageService.update(mtDamage));
+ }
+
+ /**
+ * 删除数据
+ *
+ * @param id 主键
+ * @return 删除是否成功
+ */
+ @DeleteMapping
+ public ResponseObject deleteById(Integer id) {
+ return getSuccessResult(this.mtDamageService.deleteById(id));
+ }
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtDamageDetailsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtDamageDetailsController.java
new file mode 100644
index 000000000..ea7405a7c
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtDamageDetailsController.java
@@ -0,0 +1,115 @@
+package com.fuint.business.convenienceSore.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.fuint.business.convenienceSore.entity.MtDamageDetails;
+import com.fuint.business.convenienceSore.entity.MtInventory;
+import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
+import com.fuint.business.convenienceSore.service.MtDamageDetailsService;
+import com.fuint.business.convenienceSore.vo.MtDamageDetailsVO;
+import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.ResponseObject;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 报损详情表(MtDamageDetails)表控制层
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+@RestController
+@RequestMapping("/business/convenience/mtDamageDetails")
+public class MtDamageDetailsController extends BaseController {
+ /**
+ * 服务对象
+ */
+ @Resource
+ private MtDamageDetailsService mtDamageDetailsService;
+
+ /**
+ * 分页查询
+ *
+ * @param mtDamageDetails 筛选条件
+ * @param pageNo 分页对象
+ * @return 查询结果
+ */
+ @GetMapping("/queryByPage")
+ public ResponseObject queryByPage(MtDamageDetails mtDamageDetails,
+ @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
+ com.baomidou.mybatisplus.extension.plugins.pagination.Page page =new com.baomidou.mybatisplus.extension.plugins.pagination.Page(pageNo,pageSize);
+ IPage list = mtDamageDetailsService.queryByPage(page,mtDamageDetails);
+ return getSuccessResult(list);
+ }
+
+ @GetMapping("/getListByPage")
+ public ResponseObject getListByPage(MtDamageDetails mtDamageDetails,
+ @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
+ com.baomidou.mybatisplus.extension.plugins.pagination.Page page =new com.baomidou.mybatisplus.extension.plugins.pagination.Page(pageNo,pageSize);
+ IPage list = mtDamageDetailsService.getListByPage(page,mtDamageDetails);
+ return getSuccessResult(list);
+ }
+
+ /**
+ * 通过主键查询单条数据
+ *
+ * @param id 主键
+ * @return 单条数据
+ */
+ @GetMapping("{id}")
+ public ResponseObject queryById(@PathVariable("id") Integer id) {
+ return getSuccessResult(this.mtDamageDetailsService.queryById(id));
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param mtDamageDetails 实体
+ * @return 新增结果
+ */
+ @PostMapping
+ public ResponseObject add(MtDamageDetails mtDamageDetails) {
+ return getSuccessResult(this.mtDamageDetailsService.insert(mtDamageDetails));
+ }
+
+ /**
+ * 编辑数据
+ *
+ * @param mtDamageDetails 实体
+ * @return 编辑结果
+ */
+ @PutMapping
+ public ResponseObject edit(MtDamageDetails mtDamageDetails) {
+ return getSuccessResult(this.mtDamageDetailsService.update(mtDamageDetails));
+ }
+
+ /**
+ * 删除数据
+ *
+ * @param id 主键
+ * @return 删除是否成功
+ */
+ @DeleteMapping
+ public ResponseObject deleteById(Integer id) {
+ return getSuccessResult(this.mtDamageDetailsService.deleteById(id));
+ }
+
+ /**
+ * 批量处理数据
+ *
+ * @param mtPurchaseDetails 实体
+ * @return 新增结果
+ */
+ @PostMapping("batchProcessing")
+ public ResponseObject batchProcessing(@RequestBody List mtPurchaseDetails) {
+ return getSuccessResult(this.mtDamageDetailsService.batchProcessing(mtPurchaseDetails));
+ }
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryController.java
index 30b56daf6..24e9e412c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryController.java
@@ -2,13 +2,11 @@ package com.fuint.business.convenienceSore.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fuint.business.convenienceSore.entity.MtInventory;
-import com.fuint.business.convenienceSore.entity.MtInventory;
+
import com.fuint.business.convenienceSore.service.MtInventoryService;
+import com.fuint.business.convenienceSore.vo.MtInventoryVO;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -20,7 +18,7 @@ import javax.annotation.Resource;
* @since 2023-10-28 14:45:20
*/
@RestController
-@RequestMapping("mtInventory")
+@RequestMapping("/business/convenience/mtInventory")
public class MtInventoryController extends BaseController {
/**
* 服务对象
@@ -32,7 +30,7 @@ public class MtInventoryController extends BaseController {
* 分页查询
*
* @param mtInventory 筛选条件
- * @param pageRequest 分页对象
+ * @param pageNo 分页对象
* @return 查询结果
*/
@GetMapping("/queryByPage")
@@ -44,6 +42,15 @@ public class MtInventoryController extends BaseController {
return getSuccessResult(list);
}
+ @GetMapping("/getListByPage")
+ public ResponseObject getListByPage(MtInventory mtInventory,
+ @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
+ com.baomidou.mybatisplus.extension.plugins.pagination.Page page =new com.baomidou.mybatisplus.extension.plugins.pagination.Page(pageNo,pageSize);
+ IPage list = mtInventoryService.getListByPage(page,mtInventory);
+ return getSuccessResult(list);
+ }
+
/**
* 通过主键查询单条数据
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryDetailsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryDetailsController.java
index f393e9c08..d166824aa 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryDetailsController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/controller/MtInventoryDetailsController.java
@@ -3,7 +3,9 @@ package com.fuint.business.convenienceSore.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
import com.fuint.business.convenienceSore.service.MtInventoryDetailsService;
+import com.fuint.business.convenienceSore.vo.MtInventoryDetailsVO;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.data.domain.Page;
@@ -12,6 +14,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
+import java.util.List;
/**
* 盘点详情表(MtInventoryDetails)表控制层
@@ -20,7 +23,7 @@ import javax.annotation.Resource;
* @since 2023-10-28 14:45:43
*/
@RestController
-@RequestMapping("mtInventoryDetails")
+@RequestMapping("/business/convenience/mtInventoryDetails")
public class MtInventoryDetailsController extends BaseController {
/**
* 服务对象
@@ -45,6 +48,15 @@ public class MtInventoryDetailsController extends BaseController {
return getSuccessResult(list);
}
+ @GetMapping("/getListByPage")
+ public ResponseObject getListByPage(MtInventoryDetails mtInventoryDetails,
+ @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
+ @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
+ com.baomidou.mybatisplus.extension.plugins.pagination.Page page =new com.baomidou.mybatisplus.extension.plugins.pagination.Page(pageNo,pageSize);
+ IPage list = mtInventoryDetailsService.getListByPage(page,mtInventoryDetails);
+ return getSuccessResult(list);
+ }
+
/**
* 通过主键查询单条数据
*
@@ -89,5 +101,16 @@ public class MtInventoryDetailsController extends BaseController {
return getSuccessResult(this.mtInventoryDetailsService.deleteById(id));
}
+ /**
+ * 批量处理数据
+ *
+ * @param mtPurchaseDetails 实体
+ * @return 新增结果
+ */
+ @PostMapping("batchProcessing")
+ public ResponseObject batchProcessing(@RequestBody List mtPurchaseDetails) {
+ return getSuccessResult(this.mtInventoryDetailsService.batchProcessing(mtPurchaseDetails));
+ }
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamage.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamage.java
new file mode 100644
index 000000000..afebbce88
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamage.java
@@ -0,0 +1,57 @@
+package com.fuint.business.convenienceSore.entity;
+
+import com.fuint.framework.entity.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 报损表(MtDamage)实体类
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+@Data
+public class MtDamage extends BaseEntity {
+ private static final long serialVersionUID = 143482752837854327L;
+ /**
+ * 报损ID(主键)
+ */
+ private Integer id;
+ /**
+ * 业务单号
+ */
+ private String orderNumber;
+ /**
+ * 审核状态
+ */
+ private String approvalStatus;
+ /**
+ * 制单日期
+ */
+ private Date orderDate;
+ /**
+ * 审核人
+ */
+ private String approver;
+ /**
+ * 总金额
+ */
+ private Double totalAmount;
+ /**
+ * 供应商
+ */
+ private String supplier;
+ /**
+ * 报损数量
+ */
+ private Integer damageQuantity;
+ /**
+ * 店铺ID
+ */
+ private Integer storeId;
+
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamageDetails.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamageDetails.java
new file mode 100644
index 000000000..81c309bd9
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtDamageDetails.java
@@ -0,0 +1,52 @@
+package com.fuint.business.convenienceSore.entity;
+
+import com.fuint.framework.entity.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * 报损详情表(MtDamageDetails)实体类
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+@Data
+public class MtDamageDetails extends BaseEntity {
+ private static final long serialVersionUID = -46386601710020718L;
+ /**
+ * 报损详情ID(主键)
+ */
+ private Integer id;
+ /**
+ * 关联报损ID
+ */
+ private Integer damageId;
+ /**
+ * 关联商品ID
+ */
+ private Integer goodsId;
+ /**
+ * 报损数量
+ */
+ private Integer damageQuantity;
+ /**
+ * 当前加权均进价
+ */
+ private Double weightedAverageCost;
+ /**
+ * 小计金额
+ */
+ private Double subtotalAmount;
+ /**
+ * 店铺ID
+ */
+ private Integer storeId;
+ /**
+ * 入库前库存
+ */
+ private Integer preInboundInventory;
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventory.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventory.java
index 90600862d..9c801edcf 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventory.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventory.java
@@ -18,7 +18,7 @@ public class MtInventory extends BaseEntity {
/**
* 盘点ID(主键)
*/
- private Integer inventoryId;
+ private Integer id;
/**
* 业务单号
*/
@@ -51,6 +51,10 @@ public class MtInventory extends BaseEntity {
* 盘点数量
*/
private Integer inventoryQuantity;
+ /**
+ * 盘点数量
+ */
+ private Integer productQuantity;
/**
* 店铺ID
*/
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventoryDetails.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventoryDetails.java
index 304fb44f0..09495f1e9 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventoryDetails.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/entity/MtInventoryDetails.java
@@ -22,7 +22,7 @@ public class MtInventoryDetails extends BaseEntity {
/**
* 商品ID
*/
- private Integer productId;
+ private Integer goodsId;
/**
* 盘点ID
*/
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageDetailsMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageDetailsMapper.java
new file mode 100644
index 000000000..bcd0ae7a2
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageDetailsMapper.java
@@ -0,0 +1,94 @@
+package com.fuint.business.convenienceSore.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fuint.business.convenienceSore.entity.MtDamage;
+import com.fuint.business.convenienceSore.entity.MtDamageDetails;
+import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
+import com.fuint.business.convenienceSore.vo.MtDamageDetailsVO;
+import com.fuint.business.convenienceSore.vo.MtDamageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+import java.util.List;
+
+/**
+ * 报损详情表(MtDamageDetails)表数据库访问层
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+public interface MtDamageDetailsMapper {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ MtDamageDetails queryById(Integer id);
+
+ /**
+ * 查询指定行数据
+ *
+ * @param mtDamageDetails 查询条件
+ * @param pageable 分页对象
+ * @return 对象列表
+ */
+ IPage queryAllByLimit(Page page, @Param("mtDamageDetails") MtDamageDetails mtDamageDetails);
+
+ IPage getListByPage(Page page, @Param("mtDamageDetails") MtDamageDetails mtDamageDetails);
+
+ /**
+ * 统计总行数
+ *
+ * @param mtDamageDetails 查询条件
+ * @return 总行数
+ */
+ long count(MtDamageDetails mtDamageDetails);
+
+ /**
+ * 新增数据
+ *
+ * @param mtDamageDetails 实例对象
+ * @return 影响行数
+ */
+ int insert(MtDamageDetails mtDamageDetails);
+
+ /**
+ * 批量新增数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ */
+ int insertBatch(@Param("entities") List entities);
+
+ int editBatch(@Param("list") List entities);
+
+ /**
+ * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+ */
+ int insertOrUpdateBatch(@Param("entities") List entities);
+
+ /**
+ * 修改数据
+ *
+ * @param mtDamageDetails 实例对象
+ * @return 影响行数
+ */
+ int update(MtDamageDetails mtDamageDetails);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 影响行数
+ */
+ int deleteById(Integer id);
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageMapper.java
new file mode 100644
index 000000000..a4ff40780
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtDamageMapper.java
@@ -0,0 +1,93 @@
+package com.fuint.business.convenienceSore.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fuint.business.convenienceSore.entity.MtDamage;
+import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.vo.MtDamageVO;
+import com.fuint.business.convenienceSore.vo.MtPurchaseVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
+import java.util.List;
+
+/**
+ * 报损表(MtDamage)表数据库访问层
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+public interface MtDamageMapper {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ MtDamage queryById(Integer id);
+
+ /**
+ * 查询指定行数据
+ *
+ * @param mtDamage 查询条件
+ * @param pageable 分页对象
+ * @return 对象列表
+ */
+ IPage queryAllByLimit(Page page, @Param("mtDamage") MtDamage mtDamage);
+
+ IPage getListByPage(Page page, @Param("mtDamage") MtDamage mtDamage);
+
+ /**
+ * 统计总行数
+ *
+ * @param mtDamage 查询条件
+ * @return 总行数
+ */
+ long count(MtDamage mtDamage);
+
+ /**
+ * 新增数据
+ *
+ * @param mtDamage 实例对象
+ * @return 影响行数
+ */
+ int insert(MtDamage mtDamage);
+
+ /**
+ * 批量新增数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ */
+ int insertBatch(@Param("entities") List entities);
+
+ /**
+ * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+ *
+ * @param entities List 实例对象列表
+ * @return 影响行数
+ * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+ */
+ int insertOrUpdateBatch(@Param("entities") List entities);
+
+ /**
+ * 修改数据
+ *
+ * @param mtDamage 实例对象
+ * @return 影响行数
+ */
+ int update(MtDamage mtDamage);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 影响行数
+ */
+ int deleteById(Integer id);
+
+
+ List getDamageList(@Param("pId") Integer pId);
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryDetailsMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryDetailsMapper.java
index 2e084b2e9..d780328c0 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryDetailsMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryDetailsMapper.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
+import com.fuint.business.convenienceSore.vo.MtInventoryDetailsVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
@@ -33,6 +34,9 @@ public interface MtInventoryDetailsMapper {
*/
IPage queryAllByLimit(Page page, @Param("mtInventoryDetails") MtInventoryDetails mtInventoryDetails);
+
+ IPage getListByPage(Page page, @Param("mtInventoryDetails") MtInventoryDetails mtInventoryDetails);
+
/**
* 统计总行数
*
@@ -56,6 +60,7 @@ public interface MtInventoryDetailsMapper {
* @return 影响行数
*/
int insertBatch(@Param("entities") List entities);
+ int editBatch(@Param("list") List entities);
/**
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryMapper.java
index 004ebffc6..fe4ab71f8 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtInventoryMapper.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.MtInventory;
import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
+import com.fuint.business.convenienceSore.vo.MtInventoryVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
@@ -32,7 +33,9 @@ public interface MtInventoryMapper {
* @param pageable 分页对象
* @return 对象列表
*/
- IPage queryAllByLimit(Page page, @Param("mtPurchaseDetails") MtInventory mtInventory);
+ IPage queryAllByLimit(Page page, @Param("mtInventory") MtInventory mtInventory);
+
+ IPage getListByPage(Page page, @Param("mtInventory") MtInventory mtInventory);
/**
* 统计总行数
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtReturnsMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtReturnsMapper.java
index 2ecf4cc69..6440af6c4 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtReturnsMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/MtReturnsMapper.java
@@ -90,5 +90,8 @@ public interface MtReturnsMapper {
int editStateById(@Param("id") Integer id,@Param("status") String status);
+
+// List getMtReturnsList(@Param("pId") Integer pId);
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageDetailsMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageDetailsMapper.xml
new file mode 100644
index 000000000..dd7e13a30
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageDetailsMapper.xml
@@ -0,0 +1,250 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ insert into mt_damage_details(damage_id, goods_id, damage_quantity, weighted_average_cost, subtotal_amount, store_id, create_time, update_time, create_by, update_by,pre_inbound_inventory)
+ values (#{damageId}, #{goodsId}, #{damageQuantity}, #{weightedAverageCost}, #{subtotalAmount}, #{storeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy},#{preInboundInventory})
+
+
+
+ insert into mt_damage_details(damage_id, goods_id, damage_quantity, weighted_average_cost, subtotal_amount, store_id, create_time, update_time, create_by, update_by,pre_inbound_inventory)
+ values
+
+ (#{entity.damageId}, #{entity.goodsId}, #{entity.damageQuantity}, #{entity.weightedAverageCost}, #{entity.subtotalAmount}, #{entity.storeId}, NOW(), NOW(), #{entity.createBy}, #{entity.updateBy},#{entity.preInboundInventory})
+
+
+
+
+
+ insert into mt_damage_details(damage_id, goods_id, damage_quantity, weighted_average_cost, subtotal_amount, store_id, create_time, update_time, create_by, update_by)
+ values
+
+ (#{entity.damageId}, #{entity.goodsId}, #{entity.damageQuantity}, #{entity.weightedAverageCost}, #{entity.subtotalAmount}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
+
+ on duplicate key update
+ damage_id = values(damage_id),
+ goods_id = values(goods_id),
+ damage_quantity = values(damage_quantity),
+ weighted_average_cost = values(weighted_average_cost),
+ subtotal_amount = values(subtotal_amount),
+ store_id = values(store_id),
+ create_time = values(create_time),
+ update_time = values(update_time),
+ create_by = values(create_by),
+ update_by = values(update_by)
+
+
+
+
+ update mt_damage_details
+
+
+ damage_id = #{damageId},
+
+
+ goods_id = #{goodsId},
+
+
+ damage_quantity = #{damageQuantity},
+
+
+ weighted_average_cost = #{weightedAverageCost},
+
+
+ subtotal_amount = #{subtotalAmount},
+
+
+ store_id = #{storeId},
+
+
+ create_time = #{createTime},
+
+
+ update_time = #{updateTime},
+
+
+ create_by = #{createBy},
+
+
+ update_by = #{updateBy},
+
+
+ where id = #{id}
+
+
+
+ update mt_damage_details
+
+
+ damage_id = #{user.damageId},
+
+
+ goods_id = #{user.goodsId},
+
+
+ damage_quantity = #{user.damageQuantity},
+
+
+ weighted_average_cost = #{user.weightedAverageCost},
+
+
+ subtotal_amount = #{user.subtotalAmount},
+
+
+ store_id = #{user.storeId},
+
+
+ create_time = #{user.createTime},
+
+
+ update_time = #{user.updateTime},
+
+
+ create_by = #{user.createBy},
+
+
+ update_by = #{user.updateBy},
+
+
+ pre_inbound_inventory = #{user.preInboundInventory},
+
+
+ where id = #{user.id}
+
+
+
+
+
+
+
+ delete from mt_damage_details where id = #{id}
+
+
+
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageMapper.xml
new file mode 100644
index 000000000..4d0b08856
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtDamageMapper.xml
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ insert into mt_damage(order_number, approval_status, order_date, approver, total_amount, supplier, damage_quantity, store_id, create_time, update_time, create_by, update_by)
+ values (#{orderNumber}, #{approvalStatus}, #{orderDate}, #{approver}, #{totalAmount}, #{supplier}, #{damageQuantity}, #{storeId}, #{createTime}, #{createTime}, #{createBy}, #{updateBy})
+
+
+
+ insert into mt_damage(order_number, approval_status, order_date, approver, total_amount, supplier, damage_quantity, store_id, create_time, update_time, create_by, update_by)
+ values
+
+ (#{entity.orderNumber}, #{entity.approvalStatus}, #{entity.orderDate}, #{entity.approver}, #{entity.totalAmount}, #{entity.supplier}, #{entity.damageQuantity}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
+
+
+
+
+ insert into mt_damage(order_number, approval_status, order_date, approver, total_amount, supplier, damage_quantity, store_id, create_time, update_time, create_by, update_by)
+ values
+
+ (#{entity.orderNumber}, #{entity.approvalStatus}, #{entity.orderDate}, #{entity.approver}, #{entity.totalAmount}, #{entity.supplier}, #{entity.damageQuantity}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
+
+ on duplicate key update
+ order_number = values(order_number),
+ approval_status = values(approval_status),
+ order_date = values(order_date),
+ approver = values(approver),
+ total_amount = values(total_amount),
+ supplier = values(supplier),
+ damage_quantity = values(damage_quantity),
+ store_id = values(store_id),
+ create_time = values(create_time),
+ update_time = values(update_time),
+ create_by = values(create_by),
+ update_by = values(update_by)
+
+
+
+
+ update mt_damage
+
+
+ order_number = #{orderNumber},
+
+
+ approval_status = #{approvalStatus},
+
+
+ order_date = #{orderDate},
+
+
+ approver = #{approver},
+
+
+ total_amount = #{totalAmount},
+
+
+ supplier = #{supplier},
+
+
+ damage_quantity = #{damageQuantity},
+
+
+ store_id = #{storeId},
+
+
+ create_time = #{createTime},
+
+
+ update_time = #{updateTime},
+
+
+ create_by = #{createBy},
+
+
+ update_by = #{updateBy},
+
+
+ where id = #{id}
+
+
+
+
+ delete from mt_damage where id = #{id}
+
+
+
+
+
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryDetailsMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryDetailsMapper.xml
index 9f8dd68d0..b687ae332 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryDetailsMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryDetailsMapper.xml
@@ -4,7 +4,7 @@
-
+
@@ -21,7 +21,7 @@
@@ -29,14 +29,14 @@
+
- insert into mt_inventory_details(product_id, inventory_id, purchase_price, stock, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
- values (#{productId}, #{inventoryId}, #{purchasePrice}, #{stock}, #{profitLossAmount}, #{inventoryDiscrepancy}, #{inventoryQuantity}, #{storeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy})
+ insert into mt_inventory_details(goods_id, inventory_id, purchase_price, stock, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
+ values (#{goodsId}, #{inventoryId}, #{purchasePrice}, #{stock}, #{profitLossAmount}, #{inventoryDiscrepancy}, #{inventoryQuantity}, #{storeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy})
- insert into mt_inventory_details(product_id, inventory_id, purchase_price, stock, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
+ insert into mt_inventory_details(goods_id, inventory_id, purchase_price, stock, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
values
- (#{entity.productId}, #{entity.inventoryId}, #{entity.purchasePrice}, #{entity.stock}, #{entity.profitLossAmount}, #{entity.inventoryDiscrepancy}, #{entity.inventoryQuantity}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
+ (#{entity.goodsId}, #{entity.inventoryId}, #{entity.purchasePrice}, #{entity.stock}, #{entity.profitLossAmount}, #{entity.inventoryDiscrepancy}, #{entity.inventoryQuantity}, #{entity.storeId},NOW(), NOW(), #{entity.createBy}, #{entity.updateBy})
- insert into mt_inventory_details(product_id, inventory_id, purchase_price, stock, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
+ insert into mt_inventory_details(goods_id, inventory_id, purchase_price, stock, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
values
- (#{entity.productId}, #{entity.inventoryId}, #{entity.purchasePrice}, #{entity.stock}, #{entity.profitLossAmount}, #{entity.inventoryDiscrepancy}, #{entity.inventoryQuantity}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
+ (#{entity.goodsId}, #{entity.inventoryId}, #{entity.purchasePrice}, #{entity.stock}, #{entity.profitLossAmount}, #{entity.inventoryDiscrepancy}, #{entity.inventoryQuantity}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
on duplicate key update
- product_id = values(product_id),
+ goods_id = values(goods_id),
inventory_id = values(inventory_id),
purchase_price = values(purchase_price),
stock = values(stock),
@@ -160,8 +204,8 @@
update mt_inventory_details
-
- product_id = #{productId},
+
+ goods_id = #{goodsId},
inventory_id = #{inventoryId},
@@ -199,6 +243,51 @@
where id = #{id}
+
+
+ update mt_inventory_details
+
+
+ goods_id = #{user.goodsId},
+
+
+ inventory_id = #{user.inventoryId},
+
+
+ purchase_price = #{user.purchasePrice},
+
+
+ stock = #{user.stock},
+
+
+ profit_loss_amount = #{user.profitLossAmount},
+
+
+ inventory_discrepancy = #{user.inventoryDiscrepancy},
+
+
+ inventory_quantity = #{user.inventoryQuantity},
+
+
+ store_id = #{user.storeId},
+
+
+ create_time = #{user.createTime},
+
+
+ update_time = #{user.updateTime},
+
+
+ create_by = #{user.createBy},
+
+
+ update_by = #{user.updateBy},
+
+
+ where id = #{user.id}
+
+
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryMapper.xml
index de621016a..eb8e45155 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtInventoryMapper.xml
@@ -3,7 +3,7 @@
-
+
@@ -22,19 +22,19 @@
+
-
+
insert into mt_inventory(order_number, approval_status, order_date, approver, confirmer, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
- values (#{orderNumber}, #{approvalStatus}, #{orderDate}, #{approver}, #{confirmer}, #{profitLossAmount}, #{inventoryDiscrepancy}, #{inventoryQuantity}, #{storeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy})
+ values (#{orderNumber}, #{approvalStatus}, #{orderDate}, #{approver}, #{confirmer}, #{profitLossAmount}, #{inventoryDiscrepancy}, #{inventoryQuantity}, #{storeId}, #{createTime}, #{createTime}, #{createBy}, #{updateBy})
-
+
insert into mt_inventory(order_number, approval_status, order_date, approver, confirmer, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
values
@@ -142,7 +208,7 @@
-
+
insert into mt_inventory(order_number, approval_status, order_date, approver, confirmer, profit_loss_amount, inventory_discrepancy, inventory_quantity, store_id, create_time, update_time, create_by, update_by)
values
@@ -192,6 +258,9 @@
inventory_quantity = #{inventoryQuantity},
+
+ product_quantity = #{productQuantity},
+
store_id = #{storeId},
@@ -208,12 +277,12 @@
update_by = #{updateBy},
- where inventory_id = #{inventoryId}
+ where id = #{id}
- delete from mt_inventory where inventory_id = #{inventoryId}
+ delete from mt_inventory where id = #{id}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtReturnsMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtReturnsMapper.xml
index 15f156752..58727a708 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtReturnsMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/MtReturnsMapper.xml
@@ -138,15 +138,14 @@
LEFT JOIN mt_staff ms1 ON mp.create_by = ms1.id
LEFT JOIN mt_staff ms2 ON mp.approver = ms2.id
+ mp.store_id = #{mtReturns.storeId}
+
and approval_status = #{mtReturns.approvalStatus}
and order_number LIKE CONCAT('%', #{mtReturns.orderNumber}, '%')
-
- and mp.store_id = #{mtReturns.storeId}
-
and mp.store_id = #{mtReturns.storeId}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageDetailsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageDetailsService.java
new file mode 100644
index 000000000..73b62285c
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageDetailsService.java
@@ -0,0 +1,66 @@
+package com.fuint.business.convenienceSore.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.fuint.business.convenienceSore.entity.MtDamageDetails;
+import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
+import com.fuint.business.convenienceSore.vo.MtDamageDetailsVO;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+
+import java.util.List;
+
+/**
+ * 报损详情表(MtDamageDetails)表服务接口
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+public interface MtDamageDetailsService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ MtDamageDetails queryById(Integer id);
+
+ /**
+ * 分页查询
+ *
+ * @param mtDamageDetails 筛选条件
+ * @param page 分页对象
+ * @return 查询结果
+ */
+ IPage queryByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamageDetails mtDamageDetails);
+ IPage getListByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamageDetails mtDamageDetails);
+
+ /**
+ * 新增数据
+ *
+ * @param mtDamageDetails 实例对象
+ * @return 实例对象
+ */
+ MtDamageDetails insert(MtDamageDetails mtDamageDetails);
+
+ /**
+ * 修改数据
+ *
+ * @param mtDamageDetails 实例对象
+ * @return 实例对象
+ */
+ MtDamageDetails update(MtDamageDetails mtDamageDetails);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer id);
+
+ boolean batchProcessing(List mtPurchaseDetails);
+
+
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageService.java
new file mode 100644
index 000000000..c327ea28e
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtDamageService.java
@@ -0,0 +1,62 @@
+package com.fuint.business.convenienceSore.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.fuint.business.convenienceSore.entity.MtDamage;
+import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.vo.MtDamageVO;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+
+/**
+ * 报损表(MtDamage)表服务接口
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+public interface MtDamageService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ MtDamage queryById(Integer id);
+
+ /**
+ * 分页查询
+ *
+ * @param mtDamage 筛选条件
+ * @param pageRequest 分页对象
+ * @return 查询结果
+ */
+ IPage queryByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamage mtDamage);
+ IPage getListByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamage mtDamage);
+
+
+
+ /**
+ * 新增数据
+ *
+ * @param mtDamage 实例对象
+ * @return 实例对象
+ */
+ MtDamage insert(MtDamage mtDamage);
+
+ /**
+ * 修改数据
+ *
+ * @param mtDamage 实例对象
+ * @return 实例对象
+ */
+ MtDamage update(MtDamage mtDamage);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer id);
+
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryDetailsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryDetailsService.java
index d67016047..797c9a73e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryDetailsService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryDetailsService.java
@@ -3,6 +3,10 @@ package com.fuint.business.convenienceSore.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
+import com.fuint.business.convenienceSore.vo.MtInventoryDetailsVO;
+
+import java.util.List;
/**
@@ -30,6 +34,8 @@ public interface MtInventoryDetailsService {
*/
IPage queryByPage(Page page, MtInventoryDetails mtInventoryDetails);
+ IPage getListByPage(Page page, MtInventoryDetails mtInventoryDetails);
+
/**
* 新增数据
*
@@ -54,4 +60,6 @@ public interface MtInventoryDetailsService {
*/
boolean deleteById(Integer id);
+ boolean batchProcessing(List mtPurchaseDetails);
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryService.java
index de70b6644..03fe4d2d6 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/MtInventoryService.java
@@ -1,10 +1,9 @@
package com.fuint.business.convenienceSore.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.MtInventory;
-import com.fuint.business.convenienceSore.entity.MtPurchase;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
+import com.fuint.business.convenienceSore.vo.MtInventoryVO;
/**
* 商品盘点表(MtInventory)表服务接口
@@ -29,7 +28,9 @@ public interface MtInventoryService {
* @param page 分页对象
* @return 查询结果
*/
- IPage queryByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtInventory mtInventory);
+ IPage queryByPage(Page page, MtInventory mtInventory);
+
+ IPage getListByPage(Page page, MtInventory mtInventory);
/**
* 新增数据
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageDetailsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageDetailsServiceImpl.java
new file mode 100644
index 000000000..b01256df0
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageDetailsServiceImpl.java
@@ -0,0 +1,134 @@
+package com.fuint.business.convenienceSore.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.fuint.business.convenienceSore.entity.MtDamageDetails;
+import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
+import com.fuint.business.convenienceSore.mapper.MtDamageDetailsMapper;
+import com.fuint.business.convenienceSore.service.MtDamageDetailsService;
+import com.fuint.business.convenienceSore.vo.MtDamageDetailsVO;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
+import org.springframework.stereotype.Service;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 报损详情表(MtDamageDetails)表服务实现类
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+@Service("mtDamageDetailsService")
+public class MtDamageDetailsServiceImpl implements MtDamageDetailsService {
+ @Resource
+ private MtDamageDetailsMapper mtDamageDetailsDao;
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ @Override
+ public MtDamageDetails queryById(Integer id) {
+ return this.mtDamageDetailsDao.queryById(id);
+ }
+
+ /**
+ * 分页查询
+ *
+ * @param mtDamageDetails 筛选条件
+ * @param page
+ * 分页对象
+ * @return 查询结果
+ */
+ @Override
+ public IPage queryByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamageDetails mtDamageDetails) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer storeId = nowAccountInfo.getStoreId();
+ mtDamageDetails.setStoreId(storeId);
+ IPage MtInventoryDetailsIPage = mtDamageDetailsDao.queryAllByLimit(page, mtDamageDetails);
+ return MtInventoryDetailsIPage;
+ }
+ @Override
+ public IPage getListByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamageDetails mtDamageDetails) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer storeId = nowAccountInfo.getStoreId();
+ mtDamageDetails.setStoreId(storeId);
+ IPage MtInventoryDetailsIPage = mtDamageDetailsDao.getListByPage(page, mtDamageDetails);
+ return MtInventoryDetailsIPage;
+ }
+ /**
+ * 新增数据
+ *
+ * @param mtDamageDetails 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public MtDamageDetails insert(MtDamageDetails mtDamageDetails) {
+ this.mtDamageDetailsDao.insert(mtDamageDetails);
+ return mtDamageDetails;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param mtDamageDetails 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public MtDamageDetails update(MtDamageDetails mtDamageDetails) {
+ this.mtDamageDetailsDao.update(mtDamageDetails);
+ return this.queryById(mtDamageDetails.getId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer id) {
+ return this.mtDamageDetailsDao.deleteById(id) > 0;
+ }
+
+ /**
+ * 批量处理
+ * @param
+ * @return
+ */
+ @Override
+ public boolean batchProcessing(List mtDamageDetails) {
+ List mtDamageDetailsIns = new ArrayList<>();
+ List mtDamageDetailsEdit = new ArrayList<>();
+
+ AccountInfo accountInfoByToken = TokenUtil.getNowAccountInfo();
+
+ if (mtDamageDetails.size() > 0) {
+ for (MtDamageDetails mtDamageDetails1 : mtDamageDetails) {
+ mtDamageDetails1.setStoreId(accountInfoByToken.getStoreId());
+ mtDamageDetails1.setCreateBy(accountInfoByToken.getStaffId().toString());
+ if (mtDamageDetails1.getId() != null) {
+ mtDamageDetailsEdit.add(mtDamageDetails1);
+ }else {
+ mtDamageDetailsIns.add(mtDamageDetails1);
+ }
+ }
+ if (mtDamageDetailsIns.size()>0) {
+ mtDamageDetailsDao.insertBatch(mtDamageDetailsIns);
+ }
+ if (mtDamageDetailsEdit.size()>0) {
+ mtDamageDetailsDao.editBatch(mtDamageDetailsEdit);
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageServiceImpl.java
new file mode 100644
index 000000000..2011b5c88
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtDamageServiceImpl.java
@@ -0,0 +1,134 @@
+package com.fuint.business.convenienceSore.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.fuint.business.convenienceSore.entity.MtDamage;
+import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.mapper.MtDamageMapper;
+import com.fuint.business.convenienceSore.mapper.MtPurchaseMapper;
+import com.fuint.business.convenienceSore.service.MtDamageService;
+import com.fuint.business.convenienceSore.vo.MtDamageVO;
+import com.fuint.business.convenienceSore.vo.MtPurchaseVO;
+import com.fuint.business.convenienceSore.vo.MtReturnsVO;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
+import org.springframework.stereotype.Service;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 报损表(MtDamage)表服务实现类
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+@Service("mtDamageService")
+public class MtDamageServiceImpl implements MtDamageService {
+ @Resource
+ private MtDamageMapper mtDamageDao;
+ @Resource
+ private MtPurchaseMapper mtPurchaseDao;
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ @Override
+ public MtDamage queryById(Integer id) {
+ return this.mtDamageDao.queryById(id);
+ }
+
+ /**
+ * 分页查询
+ *
+ * @param mtDamage 筛选条件
+ * @param page 分页对象
+ * @return 查询结果
+ */
+ @Override
+ public IPage queryByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamage mtDamage) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer storeId = nowAccountInfo.getStoreId();
+ mtDamage.setStoreId(storeId);
+ IPage MtInventoryDetailsIPage = mtDamageDao.queryAllByLimit(page, mtDamage);
+ return MtInventoryDetailsIPage;
+ }
+
+ @Override
+ public IPage getListByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtDamage mtDamage) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer storeId = nowAccountInfo.getStoreId();
+ mtDamage.setStoreId(storeId);
+ IPage MtInventoryDetailsIPage = mtDamageDao.getListByPage(page, mtDamage);
+
+ for (MtDamageVO record : MtInventoryDetailsIPage.getRecords()) {
+ // 根据订单查询所有的供应商信息
+ List returnsList = mtDamageDao.getDamageList(record.getId());
+ record.setSupplierName(assemblyData(returnsList));
+ }
+
+ return MtInventoryDetailsIPage;
+ }
+
+
+ private String assemblyData(List returnsList) {
+ if (returnsList.size()>0) {
+ int index = 0;
+ StringBuilder stringBuilder = new StringBuilder();
+ for (MtDamageVO mtDamageVO : returnsList) {
+ if (!stringBuilder.toString().contains(mtDamageVO.getSupplierName())) {
+ if (index == 0) {
+ stringBuilder.append(mtDamageVO.getSupplierName());
+ }else {
+ stringBuilder.append("/").append(mtDamageVO.getSupplierName());
+ }
+ }
+ index++;
+ }
+ return stringBuilder.toString();
+ }
+ return "-";
+ }
+ /**
+ * 新增数据
+ *
+ * @param mtDamage 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public MtDamage insert(MtDamage mtDamage) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ mtDamage.setStoreId(nowAccountInfo.getStoreId());
+ mtDamage.setCreateBy(nowAccountInfo.getStaffId().toString());
+ this.mtDamageDao.insert(mtDamage);
+ return mtDamage;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param mtDamage 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public MtDamage update(MtDamage mtDamage) {
+ this.mtDamageDao.update(mtDamage);
+ return this.queryById(mtDamage.getId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer id) {
+ return this.mtDamageDao.deleteById(id) > 0;
+ }
+}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryDetailsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryDetailsServiceImpl.java
index fb831c60e..504c93336 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryDetailsServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryDetailsServiceImpl.java
@@ -1,18 +1,19 @@
package com.fuint.business.convenienceSore.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
-import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import com.fuint.business.convenienceSore.entity.MtPurchaseDetails;
import com.fuint.business.convenienceSore.mapper.MtInventoryDetailsMapper;
import com.fuint.business.convenienceSore.service.MtInventoryDetailsService;
+import com.fuint.business.convenienceSore.vo.MtInventoryDetailsVO;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageImpl;
-import org.springframework.data.domain.PageRequest;
import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
/**
* 盘点详情表(MtInventoryDetails)表服务实现类
@@ -52,6 +53,15 @@ public class MtInventoryDetailsServiceImpl implements MtInventoryDetailsService
return MtInventoryDetailsIPage;
}
+ @Override
+ public IPage getListByPage(Page page, MtInventoryDetails mtInventoryDetails) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ Integer storeId = nowAccountInfo.getStoreId();
+ mtInventoryDetails.setStoreId(storeId);
+ IPage MtInventoryDetailsIPage = mtInventoryDetailsDao.getListByPage(page, mtInventoryDetails);
+ return MtInventoryDetailsIPage;
+ }
+
/**
* 新增数据
*
@@ -86,4 +96,38 @@ public class MtInventoryDetailsServiceImpl implements MtInventoryDetailsService
public boolean deleteById(Integer id) {
return this.mtInventoryDetailsDao.deleteById(id) > 0;
}
+
+
+ /**
+ * 批量处理
+ * @param mtPurchaseDetails
+ * @return
+ */
+ @Override
+ public boolean batchProcessing(List mtPurchaseDetails) {
+ List mtPurchaseDetailsIns = new ArrayList<>();
+ List mtPurchaseDetailsEdit = new ArrayList<>();
+
+ AccountInfo accountInfoByToken = TokenUtil.getNowAccountInfo();
+
+ if (mtPurchaseDetails.size() > 0) {
+ for (MtInventoryDetails mtPurchaseDetail : mtPurchaseDetails) {
+ mtPurchaseDetail.setStoreId(accountInfoByToken.getStoreId());
+ mtPurchaseDetail.setCreateBy(accountInfoByToken.getStaffId().toString());
+ if (mtPurchaseDetail.getId() != null) {
+ mtPurchaseDetailsEdit.add(mtPurchaseDetail);
+ }else {
+ mtPurchaseDetailsIns.add(mtPurchaseDetail);
+ }
+ }
+ if (mtPurchaseDetailsIns.size()>0) {
+ mtInventoryDetailsDao.insertBatch(mtPurchaseDetailsIns);
+ }
+ if (mtPurchaseDetailsEdit.size()>0) {
+ mtInventoryDetailsDao.editBatch(mtPurchaseDetailsEdit);
+ }
+ return true;
+ }
+ return false;
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryServiceImpl.java
index 759ab2246..42fc57931 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/service/impl/MtInventoryServiceImpl.java
@@ -5,6 +5,7 @@ import com.fuint.business.convenienceSore.entity.MtInventory;
import com.fuint.business.convenienceSore.entity.MtInventory;
import com.fuint.business.convenienceSore.mapper.MtInventoryMapper;
import com.fuint.business.convenienceSore.service.MtInventoryService;
+import com.fuint.business.convenienceSore.vo.MtInventoryVO;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
@@ -53,6 +54,15 @@ public class MtInventoryServiceImpl implements MtInventoryService {
return MtInventoryIPage;
}
+ @Override
+ public IPage getListByPage(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, MtInventory mtInventory) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ mtInventory.setStoreId(nowAccountInfo.getStoreId());
+// mtInventory.setCreateBy(nowAccountInfo.getStaffId().toString());
+ IPage MtInventoryIPage = mtInventoryDao.getListByPage(page, mtInventory);
+ return MtInventoryIPage;
+ }
+
/**
* 新增数据
*
@@ -61,6 +71,9 @@ public class MtInventoryServiceImpl implements MtInventoryService {
*/
@Override
public MtInventory insert(MtInventory mtInventory) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ mtInventory.setCreateBy(nowAccountInfo.getStaffId().toString());
+ mtInventory.setStoreId(nowAccountInfo.getStoreId());
this.mtInventoryDao.insert(mtInventory);
return mtInventory;
}
@@ -74,7 +87,7 @@ public class MtInventoryServiceImpl implements MtInventoryService {
@Override
public MtInventory update(MtInventory mtInventory) {
this.mtInventoryDao.update(mtInventory);
- return this.queryById(mtInventory.getInventoryId());
+ return this.queryById(mtInventory.getId());
}
/**
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageDetailsVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageDetailsVO.java
new file mode 100644
index 000000000..5272cacbc
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageDetailsVO.java
@@ -0,0 +1,26 @@
+package com.fuint.business.convenienceSore.vo;
+
+import com.fuint.business.convenienceSore.entity.MtDamageDetails;
+import com.fuint.framework.entity.BaseEntity;
+import lombok.Data;
+
+/**
+ * 报损详情表(MtDamageDetails)实体类
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+@Data
+public class MtDamageDetailsVO extends MtDamageDetails {
+ private String commodityName; // 商品名称·
+ private String unit; // 商品名称·
+ private Integer supplierId; // 供应商
+ private Integer cvsGoodId; // 分类
+ private Integer stock; // 分类
+ /**
+ * 业务单号
+ */
+ private String orderNumber;
+
+}
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageVO.java
new file mode 100644
index 000000000..dd94e45d7
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtDamageVO.java
@@ -0,0 +1,22 @@
+package com.fuint.business.convenienceSore.vo;
+
+import com.fuint.business.convenienceSore.entity.MtDamage;
+import com.fuint.framework.entity.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 报损表(MtDamage)实体类
+ *
+ * @author makejava
+ * @since 2023-10-30 15:14:26
+ */
+@Data
+public class MtDamageVO extends MtDamage {
+ private String createByName;
+ private String approverName;
+ private String supplierName;
+ private Integer detailsId;
+ private Integer supplierId;
+}
\ No newline at end of file
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryDetailsVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryDetailsVO.java
index 5f2b8c0f3..7f9c0af35 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryDetailsVO.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryDetailsVO.java
@@ -1,4 +1,19 @@
package com.fuint.business.convenienceSore.vo;
-public class MtInventoryDetailsVO {
+import com.fuint.business.convenienceSore.entity.MtInventoryDetails;
+import lombok.Data;
+
+@Data
+public class MtInventoryDetailsVO extends MtInventoryDetails {
+
+ private String commodityName; // 商品名称·
+ private String unit; // 商品名称·
+ private String goodsNo; // 商品名称·
+ private Integer supplierId; // 供应商
+ private Integer cvsGoodId; // 分类
+ private Integer stock; // 分类
+ /**
+ * 业务单号
+ */
+ private String orderNumber;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryVO.java
index e97e7fe70..284eb510e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryVO.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/vo/MtInventoryVO.java
@@ -1,4 +1,11 @@
package com.fuint.business.convenienceSore.vo;
-public class MtInventoryVO {
+import com.fuint.business.convenienceSore.entity.MtInventory;
+import lombok.Data;
+
+@Data
+public class MtInventoryVO extends MtInventory {
+ private String createByName;
+ private String approverName;
+ private String confirmerName;
}