he2802 2 年 前
コミット
65df68d4c3

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseServiceImpl.java

@@ -479,7 +479,8 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
                             .notIn(UserProfile::getStatus, Arrays.asList(3, -1))
                             .eq(UserProfile::getUserId, goodsUserVo.getUserId())
                             .eq(UserProfile::getGoodsId, goodsUserVo.getGoodsId())
-                            .eq(UserProfile::getCurrentStatus, 1));
+//                            .eq(UserProfile::getCurrentStatus, 1)
+                    );
                     if (count > 0){
                         goodsUserVo.setUserProfile(1);
                     }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamApplyServiceImpl.java

@@ -426,7 +426,7 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
                 .eq(UserProfile::getUserId, bo.getUserId())
                 .eq(UserProfile::getOrderGoodsId, bo.getOrderGoodsId())
                 .eq(UserProfile::getGoodsId, bo.getGoodsId())
-                .eq(UserProfile::getStatus, 1)
+                .in(UserProfile::getStatus, Arrays.asList(1,2))
                 .eq(UserProfile::getChangeStatus, 1)
                 .last("limit 1"));
         if (ObjectUtils.isNull(userProfile) || ObjectUtils.isNull(userProfile.getKeyValue())){

+ 16 - 4
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java

@@ -17,7 +17,9 @@ import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.modules.base.bo.ConsoleQueryBo;
 import com.zhongzheng.modules.base.domain.ShoppingCart;
+import com.zhongzheng.modules.base.domain.UserProfile;
 import com.zhongzheng.modules.base.service.IShoppingCartService;
+import com.zhongzheng.modules.base.service.IUserProfileService;
 import com.zhongzheng.modules.course.mapper.CourseMapper;
 import com.zhongzheng.modules.course.mapper.CourseMenuMapper;
 import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
@@ -81,10 +83,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -165,6 +164,8 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
 
     @Autowired
     private IOrderInputService iOrderInputService;
+    @Autowired
+    private IUserProfileService iUserProfileService;
 
     @Override
     public OrderGoodsVo queryById(Long orderGoodsId) {
@@ -558,6 +559,17 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
             if(Validator.isNotEmpty(fullName)){
                 if(fullName.equals("继续教育二级建造师")||fullName.equals("继续教育二级造价师")){
                     goodsVo.setErJianErZao(true);
+                }else if (goodsVo.getEducationName().equals("考前培训") && goodsVo.getProjectName().equals("施工现场专业人员")){
+                    //七大员新考 判断是否提交学员资料
+                    int count = iUserProfileService.count(new LambdaQueryWrapper<UserProfile>()
+                                    .notIn(UserProfile::getStatus, Arrays.asList(3, -1))
+                                    .eq(UserProfile::getUserId, goodsVo.getUserId())
+                                    .eq(UserProfile::getGoodsId, goodsVo.getGoodsId())
+//                            .eq(UserProfile::getCurrentStatus, 1)
+                    );
+                    if (count > 0){
+                        goodsVo.setUserProfile(1);
+                    }
                 }
             }
 

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderGoodsVo.java

@@ -344,6 +344,9 @@ public class OrderGoodsVo {
 	@ApiModelProperty("1未开始 2已开始")
 	private Integer studyStatus;
 
+	@ApiModelProperty("学员资料是否已提交(七大员):1是 0否")
+	private Integer userProfile;
+
 	@ApiModelProperty("是否可以预约标识:1未参加考试 2已参加考试 3考试成绩未通过")
 	private Integer subscribeSign;
 }

+ 12 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/settle/service/impl/ITopInstSettleServiceImpl.java

@@ -1076,6 +1076,18 @@ public class ITopInstSettleServiceImpl extends ServiceImpl<TopInstSettleMapper,
     //结算订单导入校验
     private void importCheck(SettleOrderImportBo bo,String tpBusinessName) {
         TopOrderInfoVo orderInfoVo = baseMapper.getOrderInfo(bo.getOrderSn());
+        if (ObjectUtils.isNull(bo.getSubmitDataTime())){
+            throw new CustomException(String.format("订单【%s】签约时间不能为空!",bo.getOrderSn()));
+        }
+        if (ObjectUtils.isNull(bo.getOrderSn())){
+            throw new CustomException(String.format("订单号不能为空!",bo.getOrderSn()));
+        }
+        if (ObjectUtils.isNull(bo.getUserName())){
+            throw new CustomException(String.format("订单【%s】学员姓名不能为空!",bo.getOrderSn()));
+        }
+        if (ObjectUtils.isNull(bo.getUserCard())){
+            throw new CustomException(String.format("订单【%s】学员身份证不能为空!",bo.getOrderSn()));
+        }
         if (ObjectUtils.isNull(orderInfoVo)){
             throw new CustomException(String.format("订单【%s】信息获取有误!",bo.getOrderSn()));
         }

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/settle/ExamActivityMapper.xml

@@ -35,7 +35,7 @@
         FROM
             top_cost_inst_tp_item ct
         WHERE
-            ct.tp_id = #{id}
+            ct.id = #{id}
     </select>
 
     <select id="getGoodsBusinessNameList" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessBo" resultType="java.lang.String">