yangdamao 1 yıl önce
ebeveyn
işleme
8fc5d847be
35 değiştirilmiş dosya ile 475 ekleme ve 116 silme
  1. 3 4
      zhongzheng-admin-saas/src/main/java/com/zhongzheng/AdminSaasApplication.java
  2. 1 0
      zhongzheng-admin-saas/src/main/resources/application-dev.yml
  3. 1 0
      zhongzheng-admin-saas/src/main/resources/application-prod.yml
  4. 22 9
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java
  5. 8 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/UserController.java
  6. 1 0
      zhongzheng-admin/src/main/resources/application-dev.yml
  7. 1 0
      zhongzheng-admin/src/main/resources/application-prod.yml
  8. 1 0
      zhongzheng-api/src/main/resources/application-dev.yml
  9. 1 0
      zhongzheng-api/src/main/resources/application-prod.yml
  10. 71 0
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java
  11. 1 0
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/WxLoginService.java
  12. 27 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeServiceImpl.java
  13. 24 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java
  14. 6 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassGradeVo.java
  15. 10 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/CompanyOrderInvoiceBo.java
  16. 7 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderHandleQueryBo.java
  17. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderInvoiceQueryBo.java
  18. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/OrderHandle.java
  19. 40 27
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderHandleServiceImpl.java
  20. 6 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderInvoiceServiceImpl.java
  21. 10 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/CompanyOrderInvoiceVo.java
  22. 7 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderHandleVo.java
  23. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/tencentcloud/service/IFaceOcrService.java
  24. 25 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/tencentcloud/service/impl/FaceOcrServiceImpl.java
  25. 22 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserQueryBo.java
  26. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/User.java
  27. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserMapper.java
  28. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserHandleService.java
  29. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserService.java
  30. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserHandleServiceImpl.java
  31. 19 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserStudyTimeVo.java
  32. 11 2
      zhongzheng-system/src/main/resources/mapper/modules/order/OrderHandleMapper.xml
  33. 83 70
      zhongzheng-system/src/main/resources/mapper/modules/order/OrderInvoiceMapper.xml
  34. 1 1
      zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml
  35. 48 0
      zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

+ 3 - 4
zhongzheng-admin-saas/src/main/java/com/zhongzheng/AdminSaasApplication.java

@@ -7,15 +7,14 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
 
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
 @EnableScheduling
 public class AdminSaasApplication {
 
-    public static void main(String[] args)
-    {
+    public static void main(String[] args) {
         System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(AdminSaasApplication.class, args);
-        System.out.println("(♥◠‿◠)ノ゙  超级Admin启动成功   ლ(´ڡ`ლ)゙"+"超级Admin");
+        System.out.println("(♥◠‿◠)ノ゙  超级Admin启动成功   ლ(´ڡ`ლ)゙" + "超级Admin");
     }
 
 }

+ 1 - 0
zhongzheng-admin-saas/src/main/resources/application-dev.yml

@@ -173,6 +173,7 @@ oldSys:
     goods: http://gdxypx.xy.com/WitSystem/BussinessApi/NewYxtLogin
     question: http://192.168.1.121:8057/WordData/GetMeasureList
     questionDetail: http://192.168.1.121:8057/WordData/GetTopicList
+    studyCheck: http://gdxypx.xy.com/System/BussinessApi/EjStudyCheck
 
 invoice:
     host: http://192.168.1.222:7077/sys/common/openMplatform/log

+ 1 - 0
zhongzheng-admin-saas/src/main/resources/application-prod.yml

@@ -173,6 +173,7 @@ oldSys:
     goods: http://www.xyyxt.net/system/BussinessApi/NewYxtLogin
     question: http://192.168.1.121:8057/WordData/GetMeasureList
     questionDetail: http://192.168.1.121:8057/WordData/GetTopicList
+    studyCheck: http://www.xyyxt.net/System/BussinessApi/EjStudyCheck
 
 invoice:
     host: https://ptapi.gdzzkj.net/sys/common/openMplatform/log

+ 22 - 9
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -80,11 +80,14 @@ import com.zhongzheng.modules.system.service.ISysConfigService;
 import com.zhongzheng.modules.system.service.ISysTenantService;
 import com.zhongzheng.modules.system.service.ISysWebService;
 import com.zhongzheng.modules.system.vo.SysTenantVo;
+import com.zhongzheng.modules.tencentcloud.bo.FaceQueryBo;
+import com.zhongzheng.modules.tencentcloud.service.IFaceOcrService;
 import com.zhongzheng.modules.tencentcloud.service.IVodService;
 import com.zhongzheng.modules.top.user.bo.TopSysTenantRegisterAddBo;
 import com.zhongzheng.modules.top.user.service.ITopSysTenantRegisterService;
 import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.service.IUserSubscribeService;
+import com.zhongzheng.modules.user.vo.UserStudyTimeVo;
 import com.zhongzheng.modules.wx.bo.WxShareGoodsBo;
 import com.zhongzheng.modules.wx.service.IWxPayService;
 import io.swagger.annotations.ApiOperation;
@@ -93,10 +96,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
@@ -179,7 +179,8 @@ public class CommonController extends BaseController {
 
     @Autowired
     private IMajorService iMajorService;
-    private IZsBankService iZsBankService;
+    @Autowired
+    private  IFaceOcrService iFaceService;
     /**
      * 通用下载请求
      *
@@ -640,6 +641,12 @@ public class CommonController extends BaseController {
         return AjaxResult.success("成功", iDistributionCashWithdrawalService.payCashCallBack(bo) ? 1 : 0);
     }
 
+    @ApiOperation("根据身份证查询当前学员是否有学习")
+    @GetMapping("common/free/getStudyTimeByCard")
+    public AjaxResult<UserStudyTimeVo> getStudyTimeByCard(@RequestParam("idCard")String idCard,@RequestParam("type")Integer type) {
+        return AjaxResult.success(iUserService.getStudyTimeByCard(idCard,type));
+    }
+
     /**
      * 获取企业ID
      */
@@ -812,7 +819,7 @@ public class CommonController extends BaseController {
     @GetMapping("/common/free/zsBank")
     public AjaxResult zsBank() {
         String date = DateUtils.dateTimeNow("yyyyMMdd");
-        System.out.println(iZsBankService.searchBreakPoint(null,"755915680210507",date,date));
+   //     System.out.println(iZsBankService.searchBreakPoint(null,"755915680210507",date,date));
         return AjaxResult.success();
     }
 
@@ -881,9 +888,15 @@ public class CommonController extends BaseController {
     @ApiOperation("导入二建精选题目Word模板列表")
     @PreAuthorize("@ss.hasPermi('system:question:import')")
     @PostMapping("/importErJianWordQuestionList")
-    public AjaxResult<Map<String,Object>> importErJianWordQuestionList(MultipartFile file, Long eduId, Long projectId, Long businessId, Long subjectId) throws Exception
-    {
-        Map<String,Object> result = iQuestionService.importErJianWordQuestionList(file,  eduId,  projectId,  businessId, subjectId);
+    public AjaxResult<Map<String,Object>> importErJianWordQuestionList(MultipartFile file, Long eduId, Long projectId, Long businessId, Long subjectId) throws Exception {
+        Map<String, Object> result = iQuestionService.importErJianWordQuestionList(file, eduId, projectId, businessId, subjectId);
         return AjaxResult.success(result);
     }
+
+    @ApiOperation("人脸属性")
+    @PostMapping("/common/free/detectFaceAttributes")
+    public AjaxResult<Void> DetectFaceAttributes(@RequestBody FaceQueryBo bo) {
+        iFaceService.DetectFace(bo);
+        return AjaxResult.success();
+    }
 }

+ 8 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/UserController.java

@@ -113,6 +113,14 @@ public class UserController extends BaseController {
         return AjaxResult.success(iUserService.queryById(userId));
     }
 
+
+    @ApiOperation("获取客户端用户密码")
+    @PreAuthorize("@ss.hasPermi('app:user:query')")
+    @GetMapping("/viewPwd/{userId}")
+    public AjaxResult<Void> viewPwd(@PathVariable("userId" ) Long userId) {
+        return AjaxResult.success(iUserService.viewPwd(userId));
+    }
+
     /**
      * 新增客户端用户
      */

+ 1 - 0
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -174,6 +174,7 @@ oldSys:
     goods: http://gdxypx.xy.com/WitSystem/BussinessApi/NewYxtLogin
     question: http://192.168.1.121:8057/WordData/GetMeasureList
     questionDetail: http://192.168.1.121:8057/WordData/GetTopicList
+    studyCheck: http://gdxypx.xy.com/System/BussinessApi/EjStudyCheck
 
 invoice:
     host: http://192.168.1.222:7077/sys/common/openMplatform/log

+ 1 - 0
zhongzheng-admin/src/main/resources/application-prod.yml

@@ -173,6 +173,7 @@ oldSys:
     goods: http://www.xyyxt.net/system/BussinessApi/NewYxtLogin
     question: http://192.168.1.121:8057/WordData/GetMeasureList
     questionDetail: http://192.168.1.121:8057/WordData/GetTopicList
+    studyCheck: http://www.xyyxt.net/System/BussinessApi/EjStudyCheck
 
 invoice:
     host: https://ptapi.gdzzkj.net/sys/common/openMplatform/log

+ 1 - 0
zhongzheng-api/src/main/resources/application-dev.yml

@@ -176,6 +176,7 @@ oldSys:
     goods: http://gdxypx.xy.com/System/BussinessApi/NewYxtLogin
     question: http://192.168.1.121:8057/WordData/GetMeasureList
     questionDetail: http://192.168.1.121:8057/WordData/GetTopicList
+    studyCheck: http://gdxypx.xy.com/System/BussinessApi/EjStudyCheck
 
 invoice:
     host: http://192.168.1.222:7077/sys/common/openMplatform/log

+ 1 - 0
zhongzheng-api/src/main/resources/application-prod.yml

@@ -185,6 +185,7 @@ oldSys:
     goods: http://www.xyyxt.net/system/BussinessApi/NewYxtLogin
     question: http://192.168.1.121:8057/WordData/GetMeasureList
     questionDetail: http://192.168.1.121:8057/WordData/GetTopicList
+    studyCheck: http://www.xyyxt.net/System/BussinessApi/EjStudyCheck
 
 invoice:
     host: https://ptapi.gdzzkj.net/sys/common/openMplatform/log

+ 71 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -86,6 +86,13 @@ import java.math.BigDecimal;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.TemporalAdjusters;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
@@ -181,6 +188,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         return BeanUtil.toBean(db, UserVo.class);
     }
 
+    @Override
+    public String viewPwd(Long userId) {
+        User user = this.baseMapper.selectById(userId);
+        if(Validator.isNotEmpty(user.getPasswordAes())){
+            return EncryptHandler.decrypt(user.getPasswordAes());
+        }
+        return null;
+    }
+
     @Override
     public User queryByUnionId(String unionId) {
         User user = getOne(new LambdaQueryWrapper<User>()
@@ -262,6 +278,32 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
     @Override
     public List<UserVo> dangAnList(UserQueryBo bo) {
+        if (ObjectUtils.isNotNull(bo.getApplyDateTime()) && bo.getApplyDateTime().length() == 6){
+            //根据月份筛选
+            String dateStr = String.format(bo.getApplyDateTime()); // 指定年月
+            LocalDate date = LocalDate.parse(dateStr + "01", DateTimeFormatter.BASIC_ISO_DATE);
+            LocalDate dateFirst = date.with(TemporalAdjusters.firstDayOfMonth()); // 指定年月的第一天
+            LocalDate dateEnd = date.with(TemporalAdjusters.lastDayOfMonth()); // 指定年月的最后一天
+            ZonedDateTime zonedDateTime1 = dateFirst.atStartOfDay(ZoneId.systemDefault());
+            Date date1 = Date.from(zonedDateTime1.toInstant());
+            ZonedDateTime zonedDateTime = dateEnd.atStartOfDay(ZoneId.systemDefault());
+            Date date2 = Date.from(zonedDateTime.toInstant());
+            Long startTime = date1.getTime()/1000;
+            Long endTime = (date2.getTime()/1000) + 86400;
+            bo.setMonthStartTime(startTime);
+            bo.setMonthEndTime(endTime);
+        }else if (ObjectUtils.isNotNull(bo.getApplyDateTime()) && bo.getApplyDateTime().length() > 6){
+            //根据某天筛选
+            String dateStr = String.format(bo.getApplyDateTime());
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            try {
+                Date parse = sdf.parse(dateStr);
+                bo.setMonthStartTime(parse.getTime()/1000);
+                bo.setMonthEndTime(parse.getTime()/1000);
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+        }
         List<User> list = baseMapper.dangAnList(bo);
         return entity2UserVo(list);
     }
@@ -756,6 +798,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         }else {
             pwd =  bo.getTel().substring(bo.getTel().length() - 6);
         }
+        inertData.setPasswordAes(EncryptHandler.encrypt(pwd));
         inertData.setPassword(SecurityUtils.encryptPassword(pwd));
         if(!save(inertData)){
             throw new CustomException("注册失败");
@@ -814,6 +857,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         inertData.setLastLoginTime(DateUtils.getNowTime());
         inertData.setCreateTime(DateUtils.getNowTime());
         inertData.setUpdateTime(DateUtils.getNowTime());
+        inertData.setPasswordAes(EncryptHandler.encrypt(bo.getPwd()));
         inertData.setPassword(SecurityUtils.encryptPassword(bo.getPwd()));
         if (Validator.isNotEmpty(bo.getShareCode())) {
             inertData.setShareCode(bo.getShareCode());
@@ -931,6 +975,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
             //初始密码(身份证后6位)
             String idCard = itemImport.getIdCard();
             String pwd =  idCard.substring(idCard.length() - 6); // 随机密码
+            inertData.setPasswordAes(EncryptHandler.encrypt(pwd));
             inertData.setPassword(SecurityUtils.encryptPassword(pwd));
             inertData.setImportNo(importNo); //设置导入编号 一个导入页面同时导入多次算一个编号
             if(!save(inertData)){
@@ -1006,6 +1051,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         //初始密码(身份证后6位)
         String idCard = itemImport.getIdCard();
         String pwd =  idCard.substring(idCard.length() - 6); // 随机密码
+        inertData.setPasswordAes(EncryptHandler.encrypt(pwd));
         inertData.setPassword(SecurityUtils.encryptPassword(pwd));
         inertData.setImportNo(importNo); //设置导入编号 一个导入页面同时导入多次算一个编号
         if(!save(inertData)){
@@ -1032,6 +1078,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         if(!ToolsUtils.verifEasyPwd(bo.getNewPwd())){
             throw new CustomException("密码应由8-16位数字、大小写字母、符号组成");
         }
+        user.setPasswordAes(EncryptHandler.encrypt(bo.getNewPwd()));
         user.setPassword(SecurityUtils.encryptPassword(bo.getNewPwd()));
         user.setPwdTime(DateUtils.getNowTime());
         user.setUpdateTime(DateUtils.getNowTime());
@@ -1052,6 +1099,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         if(!ToolsUtils.verifEasyPwd(bo.getNewPwd())){
             throw new CustomException("密码应由6-18位组成");
         }
+        user.setPasswordAes(EncryptHandler.encrypt(bo.getNewPwd()));
         user.setPassword(SecurityUtils.encryptPassword(bo.getNewPwd()));
         user.setPwdTime(DateUtils.getNowTime());
         user.setUpdateTime(DateUtils.getNowTime());
@@ -1294,6 +1342,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         if(Validator.isEmpty(user)){
             throw new CustomException("该手机号未注册");
         }
+        user.setPasswordAes(EncryptHandler.encrypt(bo.getPwd()));
         user.setPassword(SecurityUtils.encryptPassword(bo.getPwd()));
         user.setPwdTime(DateUtils.getNowTime());
         user.setUpdateTime(DateUtils.getNowTime());
@@ -1796,6 +1845,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
             //初始密码(身份证后6位)
             String idCard = itemImport.getUserCard();
             String pwd =  idCard.substring(idCard.length() - 6); // 随机密码
+            inertData.setPasswordAes(EncryptHandler.encrypt(pwd));
             inertData.setPassword(SecurityUtils.encryptPassword(pwd));
             inertData.setImportNo(importNo); //设置导入编号 一个导入页面同时导入多次算一个编号
             if(!save(inertData)){
@@ -2020,6 +2070,27 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         iSysTaskService.updateById(task);
     }
 
+    @Override
+    public UserStudyTimeVo getStudyTimeByCard(String idCard,Integer type) {
+        UserStudyTimeVo vo = new UserStudyTimeVo();
+        vo.setIdCard(idCard);
+        User user = getByCardNoTenant(idCard);
+        if (ObjectUtils.isNull(user)){
+            vo.setStudyFlag(false);
+            return vo;
+        }
+        String business = type == 1? "继续教育二级建造师":"继续教育二级造价师";
+        //查询是否有二建课程在学习
+        Long studyTime = baseMapper.getFistStudyTime(user.getUserId(),user.getTenantId(),business);
+        if (ObjectUtils.isNull(studyTime)){
+            vo.setStudyFlag(false);
+            return vo;
+        }
+        vo.setStudyFlag(true);
+        vo.setStudyStartTime(studyTime);
+        return vo;
+    }
+
     @Override
     public Map<String, Object> accountLogin(UserAppAccountLoginBo bo) {
         if(Validator.isEmpty(bo.getAccount())){

+ 1 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/WxLoginService.java

@@ -390,6 +390,7 @@ public class WxLoginService implements IWxLoginService {
         bo.setUpdateTime(DateUtils.getNowTime());
 //        String pwd = ToolsUtils.getSmsCode(); // 随机密码
         String pwd = idCard.substring(idCard.length() - 6);
+        bo.setPasswordAes(EncryptHandler.encrypt(pwd));
         bo.setPassword(SecurityUtils.encryptPassword(pwd));
         if (inviteCode != null) {
             User inviteUser = iUserService.queryByAccount(inviteCode);

+ 27 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeServiceImpl.java

@@ -243,8 +243,34 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
                             return false;
                         }
                     }
+
+                    //二建/二造继教班级过滤
+                    String businessName = iGoodsService.getGoodsBusinessName(item.getGoodsId());
+                    if (businessName.contains("继续教育二级建造师") || businessName.contains("继续教育二级造价师")){
+                        if (gradeVo.getClassStatus() == 1 &&
+                                (gradeVo.getClassStartTime() > DateUtils.getNowTime() || gradeVo.getClassEndTime() < DateUtils.getNowTime())){
+                            //过期班级
+                            return false;
+                        }
+                        //班级人数
+                        Goods goods = iGoodsService.getById(item.getGoodsId());
+                        SysTenant tenant = iSysTenantService.getById(goods.getTenantId());
+                        if (tenant.getSevenClass() == 1){
+                            Integer numAll = getClassUserNumAll(gradeVo.getGradeId());
+                            if (gradeVo.getStudentUpper() <= numAll){
+                                //班级人数已满
+                                return false;
+                            }
+                        }else {
+                            Long num = baseMapper.getClassUserNumByTenant(gradeVo.getGradeId());
+                            if (gradeVo.getStudentUpper() <= num){
+                                //班级人数已满
+                                return false;
+                            }
+                        }
+                    }
                     return true;
-                }).collect(Collectors.toList());
+                }).sorted(Comparator.comparing(ClassGradeVo::getCreateTime).reversed()).collect(Collectors.toList());
                 item.setGradeList(collect);
             }
         });

+ 24 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.IdUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -32,6 +33,7 @@ import com.zhongzheng.modules.bank.bo.QuestionModuleChapterQueryBo;
 import com.zhongzheng.modules.bank.service.IQuestionChapterExamService;
 import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
 import com.zhongzheng.modules.bank.vo.ExamVo;
+import com.zhongzheng.modules.bank.vo.ExternalQuestionVo;
 import com.zhongzheng.modules.bank.vo.QuestionChapterVo;
 import com.zhongzheng.modules.base.service.IUserProfileService;
 import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
@@ -203,6 +205,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     @Value("${oldSys.host}")
     private String OLD_SYS_HOST;
 
+    @Value("${oldSys.studyCheck}")
+    private String OLD_STUDY_CHECK;
+
     @Autowired
     private IUserPeriodService iUserPeriodService;
 
@@ -3706,6 +3711,25 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
     @Override
     public Long checkFinishRequiredCourse(ClassGradeUserQueryBo bo) {
+        //查询旧系统是否有学习
+        String businessName = iGoodsService.getGoodsBusinessName(bo.getGoodsId());
+        if (businessName.contains("继续教育二级建造师") || businessName.contains("继续教育二级造价师")){
+            User user = iUserService.getById(bo.getUserId());
+            Integer type = "继续教育二级建造师".equals(businessName)?1:2;
+            String param = String.format("idnum=%s&type=%s",EncryptHandler.decrypt(user.getIdCard()),type);
+            String respone = "";
+            try {
+                respone = HttpUtils.sendGet(OLD_STUDY_CHECK, param);
+                JSONObject jsonObject1 = JSONObject.parseObject(respone);
+                UserStudyTimeVo timeVo = JSONArray.parseObject(jsonObject1.get("data").toString(), UserStudyTimeVo.class);
+                if (ObjectUtils.isNotNull(timeVo) && ObjectUtils.isNotNull(timeVo.getStudyStartTime()) && timeVo.getStudyFlag()){
+                    //旧系统正在学习中
+                    return 1L;
+                }
+            } catch (Exception e) {
+                throw new CustomException("旧系统二建继续校验接口请求失败"+e.getMessage());
+            }
+        }
         return baseMapper.checkFinishRequiredCourse(bo);
     }
 

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassGradeVo.java

@@ -206,4 +206,10 @@ public class ClassGradeVo {
 
 	@ApiModelProperty("七大员继教班级年份")
 	private String sevenYears;
+
+	@ApiModelProperty("添加时间")
+	private Long createTime;
+
+	@ApiModelProperty("修改时间")
+	private Long updateTime;
 }

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/CompanyOrderInvoiceBo.java

@@ -46,4 +46,14 @@ public class CompanyOrderInvoiceBo implements Serializable {
     @ApiModelProperty("关键字")
     private String keyword;
 
+    /** 系统订单操作人 */
+    @ApiModelProperty("系统订单操作人")
+    private String createUsername;
+
+    @ApiModelProperty("经办身份证")
+    private String idCard;
+    /** 经办手机号 */
+    @ApiModelProperty("经办手机号")
+    private String telphone;
+
 }

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

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.order.bo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -83,4 +84,10 @@ public class OrderHandleQueryBo extends BaseEntity {
 
 	@ApiModelProperty("超时关闭时间")
 	private Long overTime;
+	/** 经办身份证 */
+	@ApiModelProperty("经办身份证")
+	private String idCard;
+	/** 经办手机号 */
+	@ApiModelProperty("经办手机号")
+	private String telphone;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderInvoiceQueryBo.java

@@ -118,4 +118,6 @@ public class OrderInvoiceQueryBo extends BaseEntity {
 	private Long applyStartTime;
 	@ApiModelProperty("搜索kEY")
 	private String searchKey;
+	@ApiModelProperty("系统订单操作人")
+	private String createUsername;
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/OrderHandle.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.order.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;

+ 40 - 27
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderHandleServiceImpl.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.exception.CustomException;
+import com.zhongzheng.common.type.EncryptHandler;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.domain.CourseBusiness;
@@ -28,11 +29,15 @@ import com.zhongzheng.modules.system.domain.SysTenant;
 import com.zhongzheng.modules.system.service.ISysTenantService;
 import com.zhongzheng.modules.system.vo.SysTenantHandleAccountVo;
 import com.zhongzheng.modules.user.bo.SubjectStudyRecordQueryBo;
+import com.zhongzheng.modules.user.domain.User;
+import com.zhongzheng.modules.user.service.IUserHandleService;
 import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.service.IUserStudyRecordService;
 import com.zhongzheng.modules.user.vo.SubjectStudyRecordVo;
+import com.zhongzheng.modules.user.vo.UserHandleVo;
 import com.zhongzheng.modules.user.vo.UserVo;
 import com.zhongzheng.modules.wx.service.IWxPayService;
+import org.hibernate.validator.internal.util.StringHelper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -95,7 +100,12 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
     @Override
     public OrderHandleVo queryById(Long id) {
         OrderHandle db = this.baseMapper.selectById(id);
-        return BeanUtil.toBean(db, OrderHandleVo.class);
+        OrderHandleVo orderHandleVo = BeanUtil.toBean(db, OrderHandleVo.class);
+        User byIdNoTenant = iUserService.getByIdNoTenant(db.getCreateUserId());
+        orderHandleVo.setCreateUsername(byIdNoTenant.getRealname());
+        orderHandleVo.setIdCard(byIdNoTenant.getIdCard());
+        orderHandleVo.setTelphone(byIdNoTenant.getTelphone());
+        return orderHandleVo;
     }
 
     @Override
@@ -116,6 +126,7 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
         lqw.eq(bo.getInputFrom() != null, OrderHandle::getInputFrom, bo.getInputFrom());
         lqw.eq(bo.getPayStatus() != null, OrderHandle::getPayStatus, bo.getPayStatus());
         lqw.eq(bo.getGoodsType() != null, OrderHandle::getGoodsType, bo.getGoodsType());
+        lqw.eq(bo.getCreateUsername() != null, OrderHandle::getCreateUsername, bo.getCreateUsername());
         return entity2Vo(this.list(lqw));
     }
 
@@ -126,6 +137,8 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
             return new ArrayList<>();
         }
         orderHandleVos.forEach(item -> {
+            item.setIdCard(EncryptHandler.decrypt(item.getIdCard()));
+            item.setTelphone(EncryptHandler.decrypt(item.getTelphone()));
             //实际价格
             item.setRealPrice(item.getPayPrice().subtract(item.getGoodsRefund()));
             //发票
@@ -146,7 +159,7 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
                         item.setInvoiceStatus(invoice.getPeriodStatus());
                     } else if (invoice.getPeriodStatus() == 2) {
                         item.setInvoiceStatus(3);
-                    }else {
+                    } else {
                         item.setInvoiceStatus(invoice.getInvoiceStatus());
                     }
                     item.setHandleRemark(invoice.getHandleRemark());
@@ -269,32 +282,32 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
     @Override
     @Transactional(rollbackFor = Exception.class)
     public String createOrder(OrderHandleAddBo bo) {
-        String key = "SUBMIT_HANDLE:"+bo.getCreateUserId()+"-"+bo.getUserGoodsList().size();
+        String key = "SUBMIT_HANDLE:" + bo.getCreateUserId() + "-" + bo.getUserGoodsList().size();
         Long keyStatus = redisCache.getCacheObject(key);
-        if(Validator.isNotEmpty(keyStatus)&&keyStatus==100L){
-            throw new CustomException("禁止频繁提交",667);
+        if (Validator.isNotEmpty(keyStatus) && keyStatus == 100L) {
+            throw new CustomException("禁止频繁提交", 667);
         }
-        redisCache.setCacheObject(key, 100L,60, TimeUnit.SECONDS);
+        redisCache.setCacheObject(key, 100L, 60, TimeUnit.SECONDS);
 
         String handleOrderSn = insertByAddBo(bo);
         String importNo = ServletUtils.getEncoded("IMPORT");
-        Map<String,String> telMap = new HashMap<>();
-        Map<String,String> idMap = new HashMap<>();
+        Map<String, String> telMap = new HashMap<>();
+        Map<String, String> idMap = new HashMap<>();
         for (OrderHandleItemAddBo itemAddBo : bo.getUserGoodsList()) {
-            if(Validator.isNotEmpty(itemAddBo.getUser().getTelphone())){
-                if(!telMap.containsKey(itemAddBo.getUser().getTelphone())){
-                    telMap.put(itemAddBo.getUser().getTelphone(),itemAddBo.getUser().getIdCard());
-                }else{
+            if (Validator.isNotEmpty(itemAddBo.getUser().getTelphone())) {
+                if (!telMap.containsKey(itemAddBo.getUser().getTelphone())) {
+                    telMap.put(itemAddBo.getUser().getTelphone(), itemAddBo.getUser().getIdCard());
+                } else {
                     redisCache.deleteObject(key);
-                    throw new CustomException("本次名单存在手机号码"+itemAddBo.getUser().getTelphone()+"重复用户");
+                    throw new CustomException("本次名单存在手机号码" + itemAddBo.getUser().getTelphone() + "重复用户");
                 }
             }
-            if(Validator.isNotEmpty(itemAddBo.getUser().getIdCard())){
-                if(!idMap.containsKey(itemAddBo.getUser().getIdCard())){
-                    idMap.put(itemAddBo.getUser().getIdCard(),itemAddBo.getUser().getTelphone());
-                }else{
+            if (Validator.isNotEmpty(itemAddBo.getUser().getIdCard())) {
+                if (!idMap.containsKey(itemAddBo.getUser().getIdCard())) {
+                    idMap.put(itemAddBo.getUser().getIdCard(), itemAddBo.getUser().getTelphone());
+                } else {
                     redisCache.deleteObject(key);
-                    throw new CustomException("本次名单存在身份证号码"+itemAddBo.getUser().getIdCard ()+"重复用户");
+                    throw new CustomException("本次名单存在身份证号码" + itemAddBo.getUser().getIdCard() + "重复用户");
                 }
             }
         }
@@ -416,7 +429,7 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
         OrderHandleQueryBo bo = new OrderHandleQueryBo();
         bo.setOverTime(DateUtils.getNowTime());
         List<OrderHandleOverVo> list = this.baseMapper.selectOverTimeOrderList(bo);
-        for(OrderHandleOverVo orderHandle : list){
+        for (OrderHandleOverVo orderHandle : list) {
             ServletUtils.getRequestAttributes().getResponse().setHeader("TenantId", orderHandle.getTenantId());
             OrderHandleAddBo addBo = new OrderHandleAddBo();
             addBo.setHandleOrderSn(orderHandle.getHandleOrderSn());
@@ -439,7 +452,7 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
         if (Validator.isEmpty(orderHandle)) {
             throw new CustomException("录单单号不存在");
         }
-        if (orderHandle.getPayStatus()!=-2) {
+        if (orderHandle.getPayStatus() != -2) {
             throw new CustomException("非拒绝状态");
         }
         OrderHandle update = new OrderHandle();
@@ -640,9 +653,9 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
                 }
                 //退款金额
                 BigDecimal reduce = goodsRefundList.stream().map(OrderGoodsRefund::getRealRefundFee).reduce(BigDecimal.ZERO, BigDecimal::add);
-                if (ObjectUtils.isNotNull(orderHandle.getRefundedPrice())){
+                if (ObjectUtils.isNotNull(orderHandle.getRefundedPrice())) {
                     orderHandle.setRefundedPrice(orderHandle.getRefundedPrice().add(reduce));
-                }else {
+                } else {
                     orderHandle.setRefundedPrice(reduce);
                 }
                 orderHandle.setRefundStatus(1);//已退款
@@ -655,11 +668,11 @@ public class OrderHandleServiceImpl extends ServiceImpl<OrderHandleMapper, Order
                 //是否存在发票
                 List<OrderInvoiceOrder> list = iOrderInvoiceOrderService
                         .list(new LambdaQueryWrapper<OrderInvoiceOrder>().eq(OrderInvoiceOrder::getOrderSn, orderHandle.getHandleOrderSn()));
-                if (CollectionUtils.isNotEmpty(list)){
-                   iOrderInvoiceService.update(new LambdaUpdateWrapper<OrderInvoice>()
-                   .set(OrderInvoice::getWashStatus,1)//带冲红
-                   .set(OrderInvoice::getInvoiceStatus,4)//失效
-                   .in(OrderInvoice::getInvoiceId,list.stream().map(OrderInvoiceOrder::getInvoiceId).collect(Collectors.toList())));
+                if (CollectionUtils.isNotEmpty(list)) {
+                    iOrderInvoiceService.update(new LambdaUpdateWrapper<OrderInvoice>()
+                            .set(OrderInvoice::getWashStatus, 1)//带冲红
+                            .set(OrderInvoice::getInvoiceStatus, 4)//失效
+                            .in(OrderInvoice::getInvoiceId, list.stream().map(OrderInvoiceOrder::getInvoiceId).collect(Collectors.toList())));
                 }
                 break;
             case 2://不通过

+ 6 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderInvoiceServiceImpl.java

@@ -320,7 +320,12 @@ public class OrderInvoiceServiceImpl extends ServiceImpl<OrderInvoiceMapper, Ord
 
     @Override
     public List<CompanyOrderInvoiceVo> listCompanyOrderInvoice(CompanyOrderInvoiceBo bo) {
-        return baseMapper.listCompanyOrderInvoice(bo);
+        List<CompanyOrderInvoiceVo> companyOrderInvoiceVos = baseMapper.listCompanyOrderInvoice(bo);
+        companyOrderInvoiceVos.forEach(item->{
+            item.setIdCard(EncryptHandler.decrypt(item.getIdCard()));
+            item.setTelphone(EncryptHandler.decrypt(item.getTelphone()));
+        });
+        return companyOrderInvoiceVos;
     }
 
     @Override

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/CompanyOrderInvoiceVo.java

@@ -83,4 +83,14 @@ public class CompanyOrderInvoiceVo implements Serializable {
 
     @ApiModelProperty("审核状态")
     private Integer periodStatus;
+
+    /** 系统订单操作人 */
+    @ApiModelProperty("系统订单操作人")
+    private String createUsername;
+
+    @ApiModelProperty("经办身份证")
+    private String idCard;
+    /** 经办手机号 */
+    @ApiModelProperty("经办手机号")
+    private String telphone;
 }

+ 7 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderHandleVo.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.order.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.zhongzheng.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -159,5 +160,10 @@ public class OrderHandleVo {
 
 	@ApiModelProperty("退款申请原因")
 	private String refundApplyReason;
-
+	/** 经办身份证 */
+	@ApiModelProperty("经办身份证")
+	private String idCard;
+	/** 经办手机号 */
+	@ApiModelProperty("经办手机号")
+	private String telphone;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/tencentcloud/service/IFaceOcrService.java

@@ -15,6 +15,8 @@ public interface IFaceOcrService {
 
     Boolean DetectFace(FaceQueryBo bo);
 
+    Boolean DetectFaceAttributes(FaceQueryBo bo);
+
     Map<String,String> IDCardOCR(FaceQueryBo bo);
 
     Map<String,String> VatInvoiceOCR(InvoiceQueryBo bo);

+ 25 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/tencentcloud/service/impl/FaceOcrServiceImpl.java

@@ -156,6 +156,31 @@ public class FaceOcrServiceImpl implements IFaceOcrService {
         return true;
     }
 
+    @Override
+    public Boolean DetectFaceAttributes(FaceQueryBo bo) {
+        try{
+            Credential cred = new Credential(SecretId, SecretKey);
+            ClientProfile clientProfile = new ClientProfile();
+            clientProfile.setSignMethod(clientProfile.SIGN_TC3_256);
+            IaiClient iaiClient = new IaiClient(cred,"ap-guangzhou");
+            DetectFaceAttributesRequest faceRequest = new DetectFaceAttributesRequest();
+            if(Validator.isNotEmpty(bo.getUrlA())){
+                faceRequest.setUrl(bo.getUrlA());
+            }else{
+                faceRequest.setImage(bo.getImageA()); //学习拍照
+            }
+
+            DetectFaceAttributesResponse response = iaiClient.DetectFaceAttributes(faceRequest);
+            System.out.println(response.getImageWidth());
+            System.out.println(response.getImageHeight());
+            System.out.println(response.getFaceDetailInfos()[0].getFaceRect().getWidth());
+            System.out.println(response.getFaceDetailInfos()[0].getFaceRect().getHeight());
+        }catch (TencentCloudSDKException e){
+            throw new CustomException("人脸检测错误"+e.getMessage());
+        }
+        return true;
+    }
+
     @Override
     public Map<String,String> IDCardOCR(FaceQueryBo bo) {
         Map<String,String> rs = new HashMap<>();

+ 22 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserQueryBo.java

@@ -227,4 +227,26 @@ public class UserQueryBo extends BaseEntity {
 	@ApiModelProperty("承诺书签名:1是 0否")
 	private Integer promiseSign;
 
+	/** 考试开始时间段 */
+	@ApiModelProperty("考试开始时间段")
+	private String applySiteStartTime;
+
+	/** 考试结束时间段 */
+	@ApiModelProperty("考试结束时间段")
+	private String applySiteEndTime;
+
+	/** 考试日期 */
+	@ApiModelProperty("考试日期")
+	private Long applySiteExamTime;
+
+	/** 月份 */
+	@ApiModelProperty("时间")
+	private String ApplyDateTime;
+
+	@ApiModelProperty("月份开始时间")
+	private Long monthStartTime;
+
+	@ApiModelProperty("月份结束时间")
+	private Long monthEndTime;
+
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/User.java

@@ -235,4 +235,6 @@ private static final long serialVersionUID=1L;
     private String school;
 
     private String graduationTime;
+
+    private String passwordAes;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserMapper.java

@@ -86,4 +86,7 @@ public interface UserMapper extends BaseMapper<User> {
 
     @InterceptorIgnore(tenantLine = "true")
     User getByCardNoTenant(String idCard);
+
+    @InterceptorIgnore(tenantLine = "true")
+    Long getFistStudyTime(@Param("userId")Long userId,@Param("tenantId")Long tenantId,@Param("businessName")String businessName);
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserHandleService.java

@@ -6,6 +6,7 @@ import com.zhongzheng.modules.user.bo.UserHandleImportBo;
 import com.zhongzheng.modules.user.bo.UserHandleQueryBo;
 import com.zhongzheng.modules.user.domain.UserHandle;
 import com.zhongzheng.modules.user.vo.UserHandleVo;
+import com.zhongzheng.modules.user.vo.UserVo;
 
 import java.util.List;
 

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserService.java

@@ -25,6 +25,8 @@ public interface IUserService extends IService<User> {
 	 */
 	UserVo queryById(Long userId);
 
+	String viewPwd(Long userId);
+
 
 	User queryByUnionId(String unionId);
 
@@ -160,4 +162,6 @@ public interface IUserService extends IService<User> {
 	List<UserDownloadVo> userDataDownloadList(Long userId);
 
 	void userDataDownloadUp(UserDataDownloadUpBo bo);
+
+	UserStudyTimeVo getStudyTimeByCard(String idCard,Integer type);
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserHandleServiceImpl.java

@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.order.domain.OrderHandle;
+import com.zhongzheng.modules.order.vo.OrderHandleVo;
 import com.zhongzheng.modules.user.bo.UserHandleBo;
 import com.zhongzheng.modules.user.bo.UserHandleImportBo;
 import com.zhongzheng.modules.user.bo.UserHandleQueryBo;
@@ -88,4 +90,5 @@ public class UserHandleServiceImpl extends ServiceImpl<UserHandleMapper, UserHan
         }).collect(Collectors.toList());
         saveBatch(handles);
     }
+
 }

+ 19 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserStudyTimeVo.java

@@ -0,0 +1,19 @@
+package com.zhongzheng.modules.user.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author yangdamao
+ * @date 2024年03月20日 9:08
+ */
+@Data
+public class UserStudyTimeVo implements Serializable {
+
+    private String idCard;
+
+    private Boolean studyFlag;
+
+    private Long studyStartTime;
+}

+ 11 - 2
zhongzheng-system/src/main/resources/mapper/modules/order/OrderHandleMapper.xml

@@ -44,10 +44,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cb.business_name business_name,
         (select IFNULL(sum(og.goods_real_price),0) from order_goods og LEFT JOIN `order` o on o.order_sn = og.order_sn  where o.handle_order_sn = u.handle_order_sn and og.refund_status = 2) goods_refund
         FROM (SELECT
-        oh.*
+        oh.*,s.id_card,s.telphone,s.realname AS createUsername
         FROM
-        order_handle oh
+        order_handle oh left join user s on oh.create_user_id=s.user_id
         where 1=1
+        <if test="idCard != null and idCard != ''">
+            AND s.id_card = #{idCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
+        </if>
+        <if test="telphone != null and telphone != ''">
+            AND s.telphone = #{telphone,typeHandler=com.zhongzheng.common.type.EncryptHandler}
+        </if>
+        <if test="createUsername != null and createUsername != ''">
+            AND s.realname = #{createUsername}
+        </if>
         <if test="businessId != null and businessId != ''">
             AND oh.business_id = #{businessId}
         </if>

+ 83 - 70
zhongzheng-system/src/main/resources/mapper/modules/order/OrderInvoiceMapper.xml

@@ -143,78 +143,91 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="listCompanyOrderInvoice" parameterType="com.zhongzheng.modules.order.bo.CompanyOrderInvoiceBo"
             resultType="com.zhongzheng.modules.order.vo.CompanyOrderInvoiceVo">
         SELECT
-            oi.invoice_id,
-            CASE
-                WHEN oi.period_status = 1 THEN
-                    1
-                WHEN oi.period_status = 2 THEN
-                    3
-                WHEN oi.invoice_status = 2 THEN
-                    2 ELSE oi.invoice_status
-                END invoiceStatus,
-            oi.apply_time AS applyTime,
-            oi.make_out_time AS invoiceTime,
-            oh.handle_order_sn AS orderSn,
-            oi.amount AS invoicePrice,
-            oi.type,
-            oi.invoice_title,
-            oi.`subject`,
-            oi.tax_registry_number,
-            oi.invoice_remark as remark,
-            oi.consignee,
-            oi.collection_telephone,
-            oi.shipping_address,
-            oi.email,
-            oi.`status`,
-            oi.invoice_mode,
-            oi.open_remark,
-            oi.wash_status,
-            oi.handle_remark,
-            cet.education_name education_name,
-            cpt.project_name project_name,
-            cb.business_name business_name,
-            oh.goods_type
+        oi.invoice_id,
+        CASE
+        WHEN oi.period_status = 1 THEN
+        1
+        WHEN oi.period_status = 2 THEN
+        3
+        WHEN oi.invoice_status = 2 THEN
+        2 ELSE oi.invoice_status
+        END invoiceStatus,
+        oi.apply_time AS applyTime,
+        oi.make_out_time AS invoiceTime,
+        oh.handle_order_sn AS orderSn,
+        oi.amount AS invoicePrice,
+        oi.type,
+        oi.invoice_title,
+        oi.`subject`,
+        oi.tax_registry_number,
+        oi.invoice_remark as remark,
+        oi.consignee,
+        oi.collection_telephone,
+        oi.shipping_address,
+        oi.email,
+        oi.`status`,
+        oi.invoice_mode,
+        oi.open_remark,
+        oi.wash_status,
+        oi.handle_remark,
+        cet.education_name education_name,
+        cpt.project_name project_name,
+        cb.business_name business_name,
+        oh.goods_type,
+        u.id_card AS idCard,
+        u.telphone AS telphone,
+        u.realname AS createUsername
         FROM
-            order_invoice oi
-                LEFT JOIN order_invoice_order oio ON oi.invoice_id = oio.invoice_id
-                LEFT JOIN order_handle oh ON oio.order_sn = oh.handle_order_sn
-                LEFT JOIN course_education_type cet ON oh.education_type_id = cet.id
-                LEFT JOIN course_project_type cpt ON oh.project_id = cpt.id
-                LEFT JOIN course_business cb ON oh.business_id = cb.id
-                LEFT JOIN `user` u ON oh.create_user_id = u.user_id
+        order_invoice oi
+        LEFT JOIN order_invoice_order oio ON oi.invoice_id = oio.invoice_id
+        LEFT JOIN order_handle oh ON oio.order_sn = oh.handle_order_sn
+        LEFT JOIN course_education_type cet ON oh.education_type_id = cet.id
+        LEFT JOIN course_project_type cpt ON oh.project_id = cpt.id
+        LEFT JOIN course_business cb ON oh.business_id = cb.id
+        LEFT JOIN `user` u ON oh.create_user_id = u.user_id
         WHERE
-            oi.invoice_type = 2
-            <if test="goodsType != null and goodsType != ''">
-                AND oh.goods_type = #{goodsType}
-            </if>
-            <if test="educationTypeId != null and educationTypeId != ''">
-                AND oh.education_type_id = #{educationTypeId}
-            </if>
-            <if test="businessId != null and businessId != ''">
-                AND oh.business_id = #{businessId}
-            </if>
-            <if test="invoiceStatus != null and invoiceStatus == 1">
-                AND oi.period_status = 1
-            </if>
-            <if test="invoiceStatus != null and invoiceStatus == 2">
-                AND oi.invoice_status = 2
-            </if>
-            <if test="invoiceStatus != null and invoiceStatus == 3">
-                AND oi.period_status = 2
-            </if>
-            <if test="invoiceStatus != null and invoiceStatus == 4">
-                AND oi.invoice_status = 4
-            </if>
-            <if test="washStatus != null">
-                AND oi.wash_status = #{washStatus}
-            </if>
-            <if test="invoiceMode != null">
-                AND INSTR( oi.invoice_mode, #{invoiceMode})
-            </if>
-            <if test="keyword != null and keyword != ''">
-                AND ( oio.order_sn = #{keyword} OR u.realname like concat('%', #{keyword}, '%') OR u.id_card = #{keyword,typeHandler=com.zhongzheng.common.type.EncryptHandler} )
-            </if>
-            ORDER BY oi.create_time DESC
+        oi.invoice_type = 2
+        <if test="idCard != null and idCard != ''">
+            AND u.id_card = #{idCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
+        </if>
+        <if test="createUsername != null and createUsername != ''">
+            AND u.realname = #{createUsername}
+        </if>
+        <if test="telphone != null and telphone != ''">
+            AND u.telphone = #{telphone,typeHandler=com.zhongzheng.common.type.EncryptHandler}
+        </if>
+        <if test="goodsType != null and goodsType != ''">
+            AND oh.goods_type = #{goodsType}
+        </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND oh.education_type_id = #{educationTypeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND oh.business_id = #{businessId}
+        </if>
+        <if test="invoiceStatus != null and invoiceStatus == 1">
+            AND oi.period_status = 1
+        </if>
+        <if test="invoiceStatus != null and invoiceStatus == 2">
+            AND oi.invoice_status = 2
+        </if>
+        <if test="invoiceStatus != null and invoiceStatus == 3">
+            AND oi.period_status = 2
+        </if>
+        <if test="invoiceStatus != null and invoiceStatus == 4">
+            AND oi.invoice_status = 4
+        </if>
+        <if test="washStatus != null">
+            AND oi.wash_status = #{washStatus}
+        </if>
+        <if test="invoiceMode != null">
+            AND INSTR( oi.invoice_mode, #{invoiceMode})
+        </if>
+        <if test="keyword != null and keyword != ''">
+            AND ( oio.order_sn = #{keyword} OR u.realname like concat('%', #{keyword}, '%') OR u.id_card =
+            #{keyword,typeHandler=com.zhongzheng.common.type.EncryptHandler} )
+        </if>
+        ORDER BY oi.create_time DESC
     </select>
 
     <select id="listWashInvoice" parameterType="map" resultType="com.zhongzheng.modules.order.domain.OrderInvoice">

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

@@ -66,7 +66,7 @@
             AND vto.operation_type = #{operationType}
         </if>
         <if test="businessFullName != null and businessFullName != ''">
-            AND vto.business_full_name = #{businessFullName}
+            AND INSTR(vto.business_full_name,#{businessFullName})
         </if>
         <if test="checkStatus != null and checkStatus.size()!=0 ">
             AND vto.check_status in

+ 48 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

@@ -652,6 +652,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LIMIT 1
     </select>
 
+    <select id="getFistStudyTime" parameterType="map" resultType="java.lang.Long">
+        SELECT
+        ustp.create_time
+        FROM
+        user_study_record usr
+        INNER JOIN user_study_record_photo ustp ON usr.record_id = ustp.record_id
+        LEFT JOIN goods g ON usr.goods_id = g.goods_id
+        LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
+        LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
+        LEFT JOIN course_business cb ON g.business_id = cb.id
+        LEFT JOIN class_grade cg ON usr.grade_id = cg.grade_id
+        LEFT JOIN class_grade_user cgu ON usr.order_goods_id = cgu.order_goods_id
+        WHERE
+        usr.current_status = 1
+        AND cgu.period_status = -1
+        AND cgu.status = 1
+        AND usr.user_id = #{userId}
+        AND usr.tenant_id = #{tenantId}
+        AND INSTR( CONCAT( cet.education_name, cb.business_name, cpt.project_name ), #{businessName} )
+        AND cg.class_start_time &lt;= UNIX_TIMESTAMP(NOW())
+        AND cg.class_end_time &gt;= UNIX_TIMESTAMP(NOW())
+        AND cg.`status` = 1
+        ORDER BY ustp.create_time ASC LIMIT 1
+    </select>
+
     <select id="getUserOrderCount" parameterType="map" resultType="java.lang.Long">
         SELECT
             COUNT(o.order_sn)
@@ -718,6 +743,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND (SELECT COUNT(up.id) FROM user_profile up WHERE up.user_id = u.user_id AND up.current_status = 1
             AND INSTR(up.key_value,'"fieldKey":"commitment_electr_signature","value":"oss/images/avatar')) = 0
         </if>
+        <if test="(applySiteExamTime != null and applySiteExamTime != '' ) or
+                        (monthStartTime != null and monthStartTime != '' ) or
+                        (monthEndTime != null and monthEndTime != '') or
+                        (applySiteStartTime != null and applySiteStartTime != '') or
+                        (applySiteEndTime != null and applySiteEndTime != '')">
+            AND (SELECT COUNT(us.subscribe_id) FROM user_subscribe us WHERE us.user_id = u.user_id AND us.subscribe_status = 1
+            <if test="applySiteExamTime != null and applySiteExamTime != '' ">
+                and us.apply_site_exam_time = #{applySiteExamTime}
+            </if>
+            <if test="monthStartTime != null and monthStartTime != '' ">
+                and us.apply_site_exam_time &gt;= #{monthStartTime}
+            </if>
+            <if test="monthEndTime != null and monthEndTime != '' ">
+                and us.apply_site_exam_time &lt;= #{monthEndTime}
+            </if>
+            <if test="applySiteStartTime != null and applySiteStartTime != '' ">
+                and us.apply_site_start_time = #{applySiteStartTime}
+            </if>
+            <if test="applySiteEndTime != null and applySiteEndTime != '' ">
+                and us.apply_site_end_time = #{applySiteEndTime}
+            </if>
+            ) > 0
+        </if>
         order by u.user_id desc
     </select>