he2802 1 год назад
Родитель
Сommit
186ee6d350

+ 11 - 10
zhongzheng-api/src/main/java/com/zhongzheng/controller/order/OrderHandleController.java

@@ -14,6 +14,7 @@ import com.zhongzheng.modules.order.bo.OrderHandleEditBo;
 import com.zhongzheng.modules.order.bo.OrderHandleQueryBo;
 import com.zhongzheng.modules.order.service.IOrderHandleService;
 import com.zhongzheng.modules.order.service.IOrderService;
+import com.zhongzheng.modules.order.vo.OrderHandleGoodsVo;
 import com.zhongzheng.modules.order.vo.OrderHandleVo;
 import com.zhongzheng.modules.user.entity.ClientLoginUser;
 import lombok.RequiredArgsConstructor;
@@ -94,14 +95,14 @@ public class OrderHandleController extends BaseController {
         return toAjax(iOrderHandleService.updateByEditBo(bo) ? 1 : 0);
     }
 
-    /**
-     * 新增订单
-     */
-   /* @ApiOperation("新增经办人子录单")
-    @PreAuthorize("@ss.hasPermi('system:order:add')")
-    @Log(title = "新增经办人子录单", businessType = BusinessType.INSERT)
-    @PostMapping("/inputOrder")
-    public AjaxResult addInputOrder(@RequestBody OrderAddBo bo) {
-        return AjaxResult.success(iOrderService.placePlatHandleOrder(bo));
-    }*/
+    @ApiOperation("查询经办录单商品列表")
+    @PreAuthorize("@ss.hasPermi('system:handle:list')")
+    @GetMapping("/goodsList")
+    public TableDataInfo<OrderHandleGoodsVo> goodsList(OrderHandleQueryBo bo) {
+        startPage();
+        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
+        bo.setCreateUserId(loginUser.getUser().getUserId());
+        List<OrderHandleGoodsVo> list = iOrderHandleService.selectOrderGoodsList(bo);
+        return getDataTable(list);
+    }
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderHandleQueryBo.java

@@ -69,4 +69,5 @@ public class OrderHandleQueryBo extends BaseEntity {
 
 	private String searchKey;
 
+
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderHandleMapper.java

@@ -3,6 +3,7 @@ package com.zhongzheng.modules.order.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.order.bo.OrderHandleQueryBo;
 import com.zhongzheng.modules.order.domain.OrderHandle;
+import com.zhongzheng.modules.order.vo.OrderHandleGoodsVo;
 import com.zhongzheng.modules.order.vo.OrderHandleVo;
 
 import java.util.List;
@@ -17,4 +18,6 @@ public interface OrderHandleMapper extends BaseMapper<OrderHandle> {
 
     List<OrderHandleVo> selectList(OrderHandleQueryBo bo);
 
+    List<OrderHandleGoodsVo> selectOrderGoodsList(OrderHandleQueryBo bo);
+
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderHandleService.java

@@ -7,6 +7,7 @@ import com.zhongzheng.modules.order.bo.OrderHandleQueryBo;
 import com.zhongzheng.modules.order.bo.OrderInputQueryBo;
 import com.zhongzheng.modules.order.domain.OrderHandle;
 import com.zhongzheng.modules.order.domain.OrderInput;
+import com.zhongzheng.modules.order.vo.OrderHandleGoodsVo;
 import com.zhongzheng.modules.order.vo.OrderHandleVo;
 import com.zhongzheng.modules.order.vo.OrderInputVo;
 
@@ -35,6 +36,8 @@ public interface IOrderHandleService extends IService<OrderHandle> {
 
 	List<OrderHandleVo> selectList(OrderHandleQueryBo bo);
 
+	List<OrderHandleGoodsVo> selectOrderGoodsList(OrderHandleQueryBo bo);
+
 	/**
 	 * 根据新增业务对象插入经办录单
 	 * @param bo 经办录单新增业务对象

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderHandleServiceImpl.java

@@ -12,6 +12,7 @@ import com.zhongzheng.modules.order.domain.OrderInput;
 import com.zhongzheng.modules.order.mapper.OrderHandleMapper;
 import com.zhongzheng.modules.order.service.IOrderHandleService;
 import com.zhongzheng.modules.order.service.IOrderService;
+import com.zhongzheng.modules.order.vo.OrderHandleGoodsVo;
 import com.zhongzheng.modules.order.vo.OrderHandleVo;
 import com.zhongzheng.modules.user.service.IUserService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -75,6 +76,11 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
         return this.baseMapper.selectList(bo);
     }
 
+    @Override
+    public List<OrderHandleGoodsVo> selectOrderGoodsList(OrderHandleQueryBo bo) {
+        return this.baseMapper.selectOrderGoodsList(bo);
+    }
+
     /**
     * 实体类转化成视图对象
     *

+ 74 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderHandleGoodsVo.java

@@ -0,0 +1,74 @@
+package com.zhongzheng.modules.order.vo;
+
+import com.zhongzheng.common.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+
+/**
+ * 经办录单视图对象 mall_package
+ *
+ * @author hjl
+ * @date 2024-01-19
+ */
+@Data
+@ApiModel("经办录单视图对象")
+public class OrderHandleGoodsVo {
+	private static final long serialVersionUID = 1L;
+
+	/** 真实姓名 */
+	@ApiModelProperty("真实姓名")
+	private String realname;
+
+	/** 学员编码 */
+	@Excel(name = "学员身份证")
+	@ApiModelProperty("学员身份证")
+	private String idCard;
+
+	/** 学员编码 */
+	@Excel(name = "学员电话")
+	@ApiModelProperty("学员电话")
+	private String telPhone;
+
+	/** 商品名称 */
+	@Excel(name = "商品名称")
+	@ApiModelProperty("商品名称")
+	private String goodsName;
+
+	@Excel(name = "商品年份")
+	@ApiModelProperty("商品年份")
+	private String year;
+
+	@Excel(name = "科目")
+	@ApiModelProperty("科目")
+	private String subjectNames;
+
+
+	@Excel(name = "金额")
+	@ApiModelProperty("金额")
+	private BigDecimal goodsRealPrice;
+
+
+	/** 学习进度 */
+	@ApiModelProperty("已学节数")
+	private Long stuAllNum;
+
+
+	/** 学习进度 */
+	@ApiModelProperty("总节数")
+	private Long secAllNum;
+
+
+	/** 节数 */
+	@ApiModelProperty("试卷数")
+	private Long examNum;
+
+
+	/** 已做试卷 */
+	@ApiModelProperty("已做试卷")
+	private Long recordNum;
+
+}

+ 20 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderHandleMapper.xml

@@ -48,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="createUserId != null">
             AND oh.create_user_id = #{createUserId}
         </if>
+        <if test="handleOrderSn != null and handleOrderSn != ''">
+            AND oh.handle_order_sn = #{handleOrderSn}
+        </if>
         <if test="payStauts != null and payStauts != ''">
             AND oh.pay_stauts = #{payStauts}
         </if>)u
@@ -59,4 +62,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ORDER BY u.create_time DESC
     </select>
 
+    <select id="selectOrderGoodsList" parameterType="com.zhongzheng.modules.order.bo.OrderHandleQueryBo" resultType="com.zhongzheng.modules.order.vo.OrderHandleGoodsVo">
+        SELECT
+            u.realname,
+            u.id_card,
+            u.telphone,
+            g.goods_name,
+            g.`year`,
+            (SELECT GROUP_CONCAT(subject_name) from course_subject where FIND_IN_SET(id,g.subject_ids)) subject_names,
+            og.goods_real_price
+        FROM
+            `order` o
+                LEFT JOIN order_goods og ON o.order_sn = og.order_sn
+                LEFT JOIN `user` u ON o.user_id = u.user_id
+                LEFT JOIN goods g ON og.goods_id = g.goods_id
+        WHERE
+            o.handle_order_sn = #{handleOrderSn}
+    </select>
 </mapper>