From 91991096ba5c8fb27399b317715c76b2c43a15f1 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 30 十二月 2024 15:35:06 +0800
Subject: [PATCH] 小程序

---
 manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java       |    4 ++--
 manage/src/main/java/com/jilongda/manage/controller/TOrderController.java           |    2 +-
 manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java |   15 +++++++++++----
 manage/src/main/java/com/jilongda/manage/vo/TOrderAftersalesDetailVO.java           |    1 +
 manage/src/main/java/com/jilongda/manage/vo/TOrderAccountVO.java                    |    5 ++++-
 manage/src/main/resources/mapping/TFrameGoods.xml                                   |    6 +++---
 6 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java b/manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java
index ae9f38a..f2db1be 100644
--- a/manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java
+++ b/manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java
@@ -77,7 +77,7 @@
             tInventoryFrameDetail.setInventoryId(tInventory.getId());
         }
         inventoryFrameDetailService.saveBatch(query.getList());
-        return ApiResult.success();
+        return ApiResult.success(tInventory.getId());
     }
     @ApiOperation(value = "镜片添加盘点")
     @PostMapping(value = "/addLensInventory")
@@ -89,7 +89,7 @@
             tInventoryFrameDetail.setInventoryId(tInventory.getId());
         }
         inventoryLensDetailService.saveBatch(query.getList());
-        return ApiResult.success();
+        return ApiResult.success(tInventory.getId());
     }
 
     @ApiOperation(value = "镜架-根据品牌id查询对应库存")
diff --git a/manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java b/manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java
index 91c8315..bd53699 100644
--- a/manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java
+++ b/manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java
@@ -53,6 +53,8 @@
     private SecFeeItemsService feeItemsService;
     @Autowired
     private LoginInfoUtil loginInfoUtil;
+    @Autowired
+    private TOptometryService optometryService;
     @ApiOperation(value = "核算订单分页列表")
     @PostMapping(value = "/pageList")
     public ApiResult<PageInfo<TOrderVO>> pageList(@RequestBody TOrderAccountingQuery query) {
@@ -73,12 +75,17 @@
             if(byId1!=null){
                 res.setName(byId1.getName());
                 res.setPhone(byId1.getPhone());
+                res.setRealName(byId1.getRealName());
+                res.setGender(byId1.getGender());
             }
+        }else {
+            res.setPhone(byId.getPhone());
+            res.setAge(byId.getAge());
+            res.setRealName(byId.getRealName());
+            res.setGender(byId.getGender());
         }
-        res.setPhone(byId.getPhone());
-        res.setAge(byId.getAge());
-        res.setRealName(byId.getRealName());
-        res.setGender(byId.getGender());
+        res.setUserId(byId.getUserId());
+        res.setOptometryId(byId.getOptometryId());
         List<TOptometryDetail> list = optometryDetailService.lambdaQuery().eq(TOptometryDetail::getOrderId, id)
                 .eq(TOptometryDetail::getType, 1).list();
         res.setOptometryDetails(list);
diff --git a/manage/src/main/java/com/jilongda/manage/controller/TOrderController.java b/manage/src/main/java/com/jilongda/manage/controller/TOrderController.java
index 588a034..2ed18f8 100644
--- a/manage/src/main/java/com/jilongda/manage/controller/TOrderController.java
+++ b/manage/src/main/java/com/jilongda/manage/controller/TOrderController.java
@@ -249,7 +249,7 @@
         orderGoodsService.saveBatch(orderGoods);
         lensGoodsService.updateBatchById(tLensGoods);
         frameGoodsService.updateBatchById(tFrameGoods);
-        return ApiResult.success();
+        return ApiResult.success(dto.getId());
     }
 
     @ApiOperation(value = "销售订单详情")
diff --git a/manage/src/main/java/com/jilongda/manage/vo/TOrderAccountVO.java b/manage/src/main/java/com/jilongda/manage/vo/TOrderAccountVO.java
index a15fb24..fea6a62 100644
--- a/manage/src/main/java/com/jilongda/manage/vo/TOrderAccountVO.java
+++ b/manage/src/main/java/com/jilongda/manage/vo/TOrderAccountVO.java
@@ -14,7 +14,10 @@
 @Data
 @ApiModel(value = "核算订单详情VO")
 public class TOrderAccountVO  {
-
+    @ApiModelProperty(value = "用户id")
+    private Integer userId;
+    @ApiModelProperty(value = "验光单id")
+    private Integer optometryId;
     @ApiModelProperty(value = "用户信息-微信昵称")
     private String name;
     @ApiModelProperty(value = "用户信息-手机号")
diff --git a/manage/src/main/java/com/jilongda/manage/vo/TOrderAftersalesDetailVO.java b/manage/src/main/java/com/jilongda/manage/vo/TOrderAftersalesDetailVO.java
index bf44ed7..c1141a3 100644
--- a/manage/src/main/java/com/jilongda/manage/vo/TOrderAftersalesDetailVO.java
+++ b/manage/src/main/java/com/jilongda/manage/vo/TOrderAftersalesDetailVO.java
@@ -43,4 +43,5 @@
 
     @ApiModelProperty(value = "支付金额")
     private BigDecimal payMoney;
+
 }
diff --git a/manage/src/main/resources/mapping/TFrameGoods.xml b/manage/src/main/resources/mapping/TFrameGoods.xml
index c2957ae..67379d2 100644
--- a/manage/src/main/resources/mapping/TFrameGoods.xml
+++ b/manage/src/main/resources/mapping/TFrameGoods.xml
@@ -36,16 +36,16 @@
         <if test="query.status != null ">
             and t1.status = #{query.status}
         </if>
-        <if test="query.isWarning != null and query.isWarning = 1">
+        <if test="query.isWarning != null and query.isWarning == 1">
             and t1.total &lt; t7.frameThreshold
         </if>
-        <if test="query.isWarning != null and query.isWarning = 2">
+        <if test="query.isWarning != null and query.isWarning == 2">
             and t1.total >= t7.frameThreshold
         </if>
         <if test="query.startCount != null and query.endCount != null">
             and t1.total between #{query.startCount} and #{query.endCount}
         </if>
-        and t1.isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
+        and t1.isDelete =  0
 
         order by t1.id
     </select>

--
Gitblit v1.7.1