瀏覽代碼

fix 学时审核

he2802 3 年之前
父節點
當前提交
5a9d2e9e5e

+ 11 - 9
zhongzheng-admin/src/main/java/com/zhongzheng/controller/order/OrderController.java

@@ -1,18 +1,16 @@
 package com.zhongzheng.controller.order;
 
-import java.util.List;
-import java.util.Arrays;
-import java.util.Map;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
 
 import com.zhongzheng.common.core.domain.model.LoginUser;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.framework.web.service.TokenService;
-import com.zhongzheng.modules.order.bo.OrderAddBo;
-import com.zhongzheng.modules.order.bo.OrderEditBo;
-import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
-import com.zhongzheng.modules.order.bo.OrderQueryBo;
+import com.zhongzheng.modules.grade.vo.ClassPeriodStudentExportAllVo;
+import com.zhongzheng.modules.order.bo.*;
 import com.zhongzheng.modules.order.service.IOrderGoodsService;
 import com.zhongzheng.modules.order.service.IOrderService;
 import com.zhongzheng.modules.order.vo.OrderGoodsVo;
@@ -137,8 +135,12 @@ public class OrderController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:profile:export')")
     @Log(title = "导出错误录入订单", businessType = BusinessType.EXPORT)
     @GetMapping("/exportWrongInputOrder")
-    public AjaxResult<Map<String,Object>> exportWrongInputOrder(UserSubscribeExportBo bo) {
-        return null;
+    public AjaxResult<Map<String,Object>> exportWrongInputOrder(List<OrderInputWrongImportBo> bo) {
+        Map<String,Object> map = new HashMap<>();
+        String timeStr= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+        ExcelUtil<OrderInputWrongImportBo> util = new ExcelUtil<OrderInputWrongImportBo>(OrderInputWrongImportBo.class);
+        map.put("excel",util.exportEasyExcel(util.exportEasyData(bo), "导出订单错误数据-"+timeStr));
+        return AjaxResult.success(map);
     }
 
 }

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/UserPeriodServiceImpl.java

@@ -199,6 +199,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
         if (gradePeriodStatus == 0) {
             bo.setStatus(gradePeriodStatus);
             bo.setGoodsId(userPeriodVo.getGoodsId());
+            bo.setUserId(userPeriodVo.getUserId());
             sendPeriodSMS(bo);
             sendPeriodSevenSMS(bo);
         }
@@ -485,7 +486,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
 
     private void sendPeriodSevenSMS(UserPeriodEditBo bo) {
         if(Validator.isEmpty(bo.getGoodsId())||Validator.isEmpty(bo.getUserId())){
-            throw new CustomException("信息参数确实");
+            throw new CustomException("信息参数缺失");
         }
         String key = "PeriodSeven-" + bo.getGoodsId() + "-" + bo.getUserId();
         Long value = redisCache.getCacheObject(key);

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderInputGoodsImportBo.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.order.bo;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -11,18 +12,22 @@ import java.math.BigDecimal;
 @ApiModel("订单录入错误信息模板添加对象")
 public class OrderInputGoodsImportBo {
 
+    @Excel(name = "商品名称")
     @ApiModelProperty("商品名称")
     private String goodsName;
 
     /** 商品标准价格 */
+    @Excel(name = "商品标准价格")
     @ApiModelProperty("商品标准价格")
     private BigDecimal goodsPrice;
 
     /** 商品成交价格 */
+    @Excel(name = "商品成交价格")
     @ApiModelProperty("商品成交价格")
     private BigDecimal goodsRealPrice;
 
     /** 已收金额 */
+    @Excel(name = "已收金额")
     @ApiModelProperty("已收金额")
     private BigDecimal goodsReceived;
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderInputWrongImportBo.java

@@ -12,20 +12,25 @@ import java.util.List;
 @ApiModel("订单录入错误信息模板添加对象")
 public class OrderInputWrongImportBo {
 
+    @Excel(name = "姓名")
     @ApiModelProperty("真实姓名")
     private String realname;
 
     /** 身份证号 */
+    @Excel(name = "身份证号")
     @ApiModelProperty("身份证号")
     private String idCard;
 
     /** 手机号码 */
+    @Excel(name = "手机号码")
     @ApiModelProperty("手机号码")
     private String telphone;
 
+    @Excel(name = "科目名称")
     @ApiModelProperty("科目名称")
     private String subjectName;
 
+    @Excel(name = "商品列表")
     @ApiModelProperty("商品列表")
     private List<OrderInputGoodsImportBo> goodsList;
 

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderInputMapper.xml

@@ -69,6 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="businessId != null and businessId != ''">
         AND oi.business_id = #{businessId}
         </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND oi.education_type_id = #{educationTypeId}
+        </if>
         <if test="searchKey != null and searchKey != ''">
             AND (oi.create_username like concat('%', #{searchKey}, '%') or oi.input_order_sn = #{searchKey})
         </if>

+ 4 - 2
zhongzheng-system/src/main/resources/mapper/modules/user/UserExamWrongRecordMapper.xml

@@ -75,7 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT DISTINCT
         q.*,
         uew.goods_id,
-        uew.exam_id
+        uew.exam_id,
+        uew.order_goods_id
         FROM
         user_exam_wrong_record uew
         LEFT JOIN question q ON q.question_id = uew.question_id
@@ -121,7 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT DISTINCT
         q.*,
         uew.goods_id,
-        uew.exam_id
+        uew.exam_id,
+        uew.order_goods_id
         FROM
         user_exam_wrong_record uew
         LEFT JOIN question q ON uew.question_id = q.question_id