From 635262464177d1bdf5becc6d37c20ec1e1d48539 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 09 一月 2025 11:47:19 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/eyes

---
 manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java |    4 +-
 manage/src/main/java/com/jilongda/manage/vo/TLensGoodsDetailVO.java             |    2 
 manage/src/main/resources/mapping/TOrderMapper.xml                              |   59 ++++++++++++++++++++++-------
 manage/src/main/resources/mapping/TLineUpMapper.xml                             |    6 ++-
 manage/src/main/java/com/jilongda/manage/controller/TOrderController.java       |   16 ++++----
 5 files changed, 59 insertions(+), 28 deletions(-)

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 f17d8e8..ae199ff 100644
--- a/manage/src/main/java/com/jilongda/manage/controller/TOrderController.java
+++ b/manage/src/main/java/com/jilongda/manage/controller/TOrderController.java
@@ -105,14 +105,14 @@
             query.setEndTime(query.getEndTime()+" 23:59:59");
         }
         List<Integer> orderIds = new ArrayList<>();
-        List<Integer> collect = tAppUserService.lambdaQuery()
-                .eq(StringUtils.hasLength(query.getWxName()), TAppUser::getName, query.getWxName())
-                .eq(StringUtils.hasLength(query.getPhone()), TAppUser::getName, query.getPhone()).list()
-                .stream().map(TAppUser::getId).collect(Collectors.toList());
-        if (StringUtils.hasLength(query.getWxName())||StringUtils.hasLength(query.getPhone())){
-            query.setUserIds(collect);
-            if (collect.isEmpty())return ApiResult.success(new PageInfo<>());
-        }
+//        List<Integer> collect = tAppUserService.lambdaQuery()
+//                .eq(StringUtils.hasLength(query.getWxName()), TAppUser::getName, query.getWxName())
+//                .eq(StringUtils.hasLength(query.getPhone()), TAppUser::getName, query.getPhone()).list()
+//                .stream().map(TAppUser::getId).collect(Collectors.toList());
+//        if (StringUtils.hasLength(query.getWxName())||StringUtils.hasLength(query.getPhone())){
+//            query.setUserIds(collect);
+//            if (collect.isEmpty())return ApiResult.success(new PageInfo<>());
+//        }
         List<Integer> collect1 = orderGoodsService.lambdaQuery()
                 .eq(StringUtils.hasLength(query.getBrandLens()), TOrderGoods::getBrandName, query.getBrandLens())
                 .eq(StringUtils.hasLength(query.getSeries()), TOrderGoods::getSeriesName, query.getSeries())
diff --git a/manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java b/manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java
index 03d2e4c..b7307a5 100644
--- a/manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java
+++ b/manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java
@@ -199,8 +199,8 @@
             tLensGoodsDetailVO.setTitle(byId3.getName()+byId2.getName()+t1+" "+byId.getRefractiveIndex());
         }
         // 查询这个商品的库存明细
-        List<TLensWarehousingDetail> list = lensWarehousingDetailService.lambdaQuery().eq(TLensWarehousingDetail::getSeriesId, byId.getSeriesId())
-                .eq(TLensWarehousingDetail::getRefractiveIndex, byId.getRefractiveIndex()).list();
+        List<TLensGoods> list = lensGoodsService.lambdaQuery().eq(TLensGoods::getSeriesId, byId.getSeriesId())
+                .eq(TLensGoods::getRefractiveIndex, byId.getRefractiveIndex()).list();
         tLensGoodsDetailVO.setList(list);
         return ApiResult.success(tLensGoodsDetailVO);
     }
diff --git a/manage/src/main/java/com/jilongda/manage/vo/TLensGoodsDetailVO.java b/manage/src/main/java/com/jilongda/manage/vo/TLensGoodsDetailVO.java
index 85704fa..3a1ae66 100644
--- a/manage/src/main/java/com/jilongda/manage/vo/TLensGoodsDetailVO.java
+++ b/manage/src/main/java/com/jilongda/manage/vo/TLensGoodsDetailVO.java
@@ -16,6 +16,6 @@
     @ApiModelProperty(value = "门店名称")
     private String storeName;
     @ApiModelProperty(value = "库存数据")
-    private List<TLensWarehousingDetail> list;
+    private List<TLensGoods> list;
 
 }
diff --git a/manage/src/main/resources/mapping/TLineUpMapper.xml b/manage/src/main/resources/mapping/TLineUpMapper.xml
index 11ee095..ec1695d 100644
--- a/manage/src/main/resources/mapping/TLineUpMapper.xml
+++ b/manage/src/main/resources/mapping/TLineUpMapper.xml
@@ -22,11 +22,13 @@
         id, code, userId, optometristId, storeId, status, createTime, updateTime, createBy, updateBy, isDelete
     </sql>
     <select id="pageList" resultType="com.jilongda.manage.model.TLineUp">
-        select t.*,u.name,u.phone,u.age,u.gender,u.realName,s.name storeName,o.name optometrist
+        select t.*,u.name,u.phone,u.age,u.gender,u.realName,s.name as storeName,o.name as optometrist
         from t_line_up t
         left join t_app_user u on t.userId = u.id
-        left join t_optometrist o on t.optometristId = o.id
+            left join t_optometry t1 on t1.lineUpId = t.id
+        left join t_optometrist o on t1.optometristId = o.id
         left join t_store s on t.storeId = s.id
+
         <where>
             <if test="query.status != null">
                 and t.status = #{query.status}
diff --git a/manage/src/main/resources/mapping/TOrderMapper.xml b/manage/src/main/resources/mapping/TOrderMapper.xml
index b0b423f..750e168 100644
--- a/manage/src/main/resources/mapping/TOrderMapper.xml
+++ b/manage/src/main/resources/mapping/TOrderMapper.xml
@@ -62,41 +62,70 @@
         where o.id = #{orderId} and o.isDelete = 0
     </select>
     <select id="pageList" resultType="com.jilongda.manage.model.TOrder">
-        select * from t_order
+        select o.id, o.code, o.userId, o.optometryId, o.storeId, o.color, o.series, o.rLens, o.lLens, o.`type`, o.refractiveIndex, o.createTime, o.updateTime, o.createBy,
+        o.updateBy, o.isDelete, o.sysId, o.couponId, o.itemsId, o.remark, o.isMail, o.mailName, o.mailPhone, o.mailAddress, o.orderMoney, o.couponMoney, o.payMoney,
+        o.isMachining, o.machiningCode, o.isAccounting, o.accountingName, o.accountingTime,o.phone, o.realName, o.age, o.gender,o.payTypeName
+        from t_order o
+        left join t_order_goods tog on o.id = tog.orderId
         where 1=1
         <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
-            and createTime between #{query.startTime} and #{query.endTime}
+            and o.createTime between #{query.startTime} and #{query.endTime}
         </if>
-          <if test="query.startMoney != null ">
-            and orderMoney between #{query.startMoney} and #{query.endMoney}
+        <if test="query.startMoney != null ">
+            and o.orderMoney between #{query.startMoney} and #{query.endMoney}
         </if>
         <if test="query.realName != null and query.realName != ''">
-            and realName like concat('%',#{query.realName},'%')
+            and o.realName like concat('%',#{query.realName},'%')
         </if>
-          <if test="query.phone != null and query.phone != ''">
-            and phone like concat('%',#{query.phone},'%')
+        <if test="query.wxName != null and query.wxName != ''">
+            and o.`name` like concat('%',#{query.wxName},'%')
+        </if>
+        <if test="query.phone != null and query.phone != ''">
+            and o.phone like concat('%',#{query.phone},'%')
+        </if>
+        <if test="query.brandFrame != null and query.brandFrame != ''">
+            and tog.brandName = #{query.brandFrame}
+        </if>
+        <if test="query.modelName != null and query.modelName != ''">
+            and tog.modelName = #{query.modelName}
+        </if>
+        <if test="query.color != null and query.color != ''">
+            and tog.color = #{query.color}
+        </if>
+        <if test="query.brandLens != null and query.brandLens != ''">
+            and tog.brandName = #{query.brandLens}
+        </if>
+        <if test="query.series != null and query.series != ''">
+            and tog.seriesName = #{query.series}
+        </if>
+        <if test="query.type != null">
+            and tog.type = #{query.type}
+        </if>
+        <if test="query.refractiveIndex != null  and query.refractiveIndex != ''">
+            and tog.refractiveIndex = #{query.refractiveIndex}
         </if>
         <if test="query.storeId != null">
-            and storeId = #{query.storeId}
+            and o.storeId = #{query.storeId}
         </if>
         <if test="query.sysId != null">
-            and sysId = #{query.sysId}
+            and o.sysId = #{query.sysId}
         </if>
-          <if test="query.userId != null">
-            and userId = #{query.userId}
+        <if test="query.userId != null">
+            and o.userId = #{query.userId}
         </if>
         <if test="query.userIds != null and query.userIds.size()>0">
-            AND userId IN
+            AND o.userId IN
             <foreach collection="query.userIds" close=")" open="(" item="id" separator=",">
                 #{id}
             </foreach>
         </if>
-          <if test="query.orderIds != null and query.orderIds.size()>0">
-            AND id IN
+        <if test="query.orderIds != null and query.orderIds.size()>0">
+            AND o.id IN
             <foreach collection="query.orderIds" close=")" open="(" item="id" separator=",">
                 #{id}
             </foreach>
         </if>
-        order by createTime desc
+        group by o.id
+        order by o.createTime desc
     </select>
 </mapper>

--
Gitblit v1.7.1