diff --git a/pom.xml b/pom.xml index cae24ac..04f6a07 100644 --- a/pom.xml +++ b/pom.xml @@ -175,6 +175,13 @@ easypoi-spring-boot-starter 4.1.0 + + + diff --git a/src/main/java/cn/com/tenlion/controller/api/applystudents/ApplyStudentsController.java b/src/main/java/cn/com/tenlion/controller/api/applystudents/ApplyStudentsController.java index 8304a2f..63e6c9b 100644 --- a/src/main/java/cn/com/tenlion/controller/api/applystudents/ApplyStudentsController.java +++ b/src/main/java/cn/com/tenlion/controller/api/applystudents/ApplyStudentsController.java @@ -101,6 +101,12 @@ public class ApplyStudentsController extends DefaultBaseController { return applyStudentsService.get(applyStudentsId); } + @GetMapping("get") + public ApplyStudentsDTO getInfo() { + Map params = requestParams(); + return applyStudentsService.get(params); + } + @ApiOperation(value = "班级学生表列表", notes = "班级学生表列表接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("list") diff --git a/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java b/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java index d45f721..48c8cea 100644 --- a/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java +++ b/src/main/java/cn/com/tenlion/controller/api/classplan/ClassPlanController.java @@ -486,7 +486,7 @@ public class ClassPlanController extends DefaultBaseController { public void exportApplyUserExcel(HttpServletResponse response) throws IOException { Map params = requestParams(); String [] headers = { - "姓名","性别","身份证号","手机号码","学历","作业类别","准操项目","单位","初训/复训/换证","审核状态"}; + "姓名","性别","身份证号","手机号码","学历","作业类别","准操项目","培训类别","单位","初训/复训/换证","审核状态"}; String excelName = "报名信息表"; String fileName = URLEncoder.encode(excelName, "UTF-8"); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); @@ -501,6 +501,9 @@ public class ClassPlanController extends DefaultBaseController { params.put("applyAuditStates", Arrays.asList(params.get("applyAuditStates").toString().split(","))); } List> listData = new ArrayList<>(); + if(params.get("applyIds") != null){ + params.put("applyIds", Arrays.asList(params.get("applyIds").toString().split(","))); + } List list = applyService.list(params); for (ApplyDTO item : list) { List el = new ArrayList<>(); @@ -513,6 +516,7 @@ public class ClassPlanController extends DefaultBaseController { WorkTypeDTO workTypeDTO = workTypeService.get(item.getApplyWorkTypeId()); el.add(workTypeDTO.getWorkTypeParentName()); el.add(workTypeDTO.getWorkTypeName()); + el.add(item.getApplyLeiBie()); el.add(item.getApplyUnitName()); String fenLei = item.getApplyFenLei(); el.add("1".equals(fenLei) ? "初训" : "2".equals(fenLei) ? "复训" : "3".equals(fenLei) ? "换证" : ""); @@ -520,6 +524,6 @@ public class ClassPlanController extends DefaultBaseController { el.add(applyAuditState == -1 ? "审核不通过" : applyAuditState == 0 ? "待审核" : applyAuditState == 2 ? "审核通过" : ""); listData.add(el); } - EasyExcel.write(response.getOutputStream()).sheet("人员基础信息异常数据").head(listHeader).doWrite(listData); + EasyExcel.write(response.getOutputStream()).sheet("异常数据").head(listHeader).doWrite(listData); } } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java b/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java index 861c4c9..c6cc4c4 100644 --- a/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java +++ b/src/main/java/cn/com/tenlion/controller/api/indexcount/IndexCountController.java @@ -1,12 +1,14 @@ package cn.com.tenlion.controller.api.indexcount; +import cn.com.tenlion.dao.apply.IApplyDao; import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO; import cn.com.tenlion.pojo.dtos.traininginstitutionworktype.TrainingInstitutionWorkTypeDTO; import cn.com.tenlion.service.apply.IApplyService; +import cn.com.tenlion.service.applystudents.IApplyStudentsService; import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.examapply.IExamApplyService; import cn.com.tenlion.service.examcheck.IExamCheckService; @@ -20,6 +22,7 @@ import ink.wgink.common.component.SecurityComponent; import ink.wgink.interfaces.consts.ISystemConstant; import ink.wgink.pojo.result.ErrorResult; import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.service.user.service.IUserService; import ink.wgink.util.date.DateUtil; import io.swagger.annotations.*; import org.apache.commons.lang3.StringUtils; @@ -69,6 +72,10 @@ public class IndexCountController extends DefaultBaseController { private IExamApplyService examApplyService; @Autowired private ITrainingInstitutionWorkTypeService TrainingInstitutionWorkTypeService; + @Autowired + private IApplyStudentsService studentsService; + @Autowired + private IUserService userService; @ApiOperation(value = "统计当前登录机构报名数量", notes = "统计当前登录机构报名数量接口") @@ -353,8 +360,25 @@ public class IndexCountController extends DefaultBaseController { return new SuccessResultData<>(list); } - - + @GetMapping("get-register-num") + public Object getRegisterNum(){ + Map query = new HashMap<>(8); + // 注册人数 + Integer registerCount = userService.count(null); + // 培训人数 + Integer trainingCount = studentsService.count(null); + Map res = new HashMap<>(); + // 开班申请 + query.put("checkStatus", "1"); + Integer classPlanCount = examCheckService.count(query); + // 考试申请 + Integer examCount = examApplyService.count(query); + res.put("registerCount", registerCount); + res.put("trainingCount", trainingCount); + res.put("classPlanCount", classPlanCount); + res.put("examCount", examCount); + return res; + } public String getInstitutionId(){ InstitutionDTO institutionDTO = trainingInstitutionUserService.getByUserId(securityComponent.getCurrentUser().getUserId()); diff --git a/src/main/java/cn/com/tenlion/controller/app/api/btyjaccountsync/BTYJAccountSyncAppController.java b/src/main/java/cn/com/tenlion/controller/app/api/btyjaccountsync/BTYJAccountSyncAppController.java new file mode 100644 index 0000000..a7efa04 --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/api/btyjaccountsync/BTYJAccountSyncAppController.java @@ -0,0 +1,35 @@ +package cn.com.tenlion.controller.app.api.btyjaccountsync; + +import cn.com.tenlion.service.btyjaccountsync.IBTYJUserAccountSyncService; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 包头应急-万安众联-账号同步接口 + * @author xwangs + * @create 2022-02-21 15:06 + * @description + */ +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/release/account-sync") +public class BTYJAccountSyncAppController extends DefaultBaseController { + + @Autowired + private IBTYJUserAccountSyncService userAccountSyncService; + + @PostMapping("btyj-user-account") + public List> btyjUserAccount(){ + Map query = requestParams(); + // 只查询注册学员信息 + List> userAccountList = userAccountSyncService.listUserAccountInfo(query); + return userAccountList; + } +} diff --git a/src/main/java/cn/com/tenlion/dao/btyjaccountsync/IBTYJUserAccountSyncDao.java b/src/main/java/cn/com/tenlion/dao/btyjaccountsync/IBTYJUserAccountSyncDao.java new file mode 100644 index 0000000..f50be11 --- /dev/null +++ b/src/main/java/cn/com/tenlion/dao/btyjaccountsync/IBTYJUserAccountSyncDao.java @@ -0,0 +1,22 @@ +package cn.com.tenlion.dao.btyjaccountsync; + +import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO; +import cn.com.tenlion.pojo.dtos.btyjuseraccountsync.BTYJUserAccountSyncDTO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @author xwangs + * @create 2022-02-21 15:25 + * @description + */ +@Repository +public interface IBTYJUserAccountSyncDao { + + + List listUserAccountInfo(Map query); + + List> listClassPlan(Map query); +} diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/btyjuseraccountsync/BTYJUserAccountSyncDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/btyjuseraccountsync/BTYJUserAccountSyncDTO.java new file mode 100644 index 0000000..b6d3b71 --- /dev/null +++ b/src/main/java/cn/com/tenlion/pojo/dtos/btyjuseraccountsync/BTYJUserAccountSyncDTO.java @@ -0,0 +1,29 @@ +package cn.com.tenlion.pojo.dtos.btyjuseraccountsync; + +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * @author xwangs + * @create 2022-02-21 15:32 + * @description + */ +@Data +public class BTYJUserAccountSyncDTO { + + // 账号 + private String userAccount; + // 昵称 + private String nickName; + // 真实姓名 + private String realName; + // 联系电话 + private String telephone; + // 身份证号 + private String idCardNumber; + // 培训类型 + private String trainingType; + +} diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index 6b47a56..256048e 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -1,6 +1,7 @@ package cn.com.tenlion.service.apply.impl; import cn.com.tenlion.dao.apply.IApplyDao; +import cn.com.tenlion.dao.basicuserinfo.IBasicUserInfoDao; import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; import cn.com.tenlion.pojo.bos.apply.ApplyBO; @@ -18,6 +19,7 @@ import cn.com.tenlion.pojo.vos.applyauditlog.ApplyAuditLogVO; import cn.com.tenlion.service.apply.IApplyService; import cn.com.tenlion.service.applyauditlog.IApplyAuditLogService; import cn.com.tenlion.service.applystudents.IApplyStudentsService; +import cn.com.tenlion.service.basicuserinfo.IBasicUserInfoService; import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.examcheck.IExamCheckService; import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService; @@ -98,6 +100,8 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic private IWorkTypeService workTypeService; @Autowired private ITrainingInstitutionServiceUserService trainingInstitutionServiceUserService; + @Autowired + private IBasicUserInfoDao basicUserInfoDao; /** @@ -141,7 +145,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic - + @Override public String saveRelationReturnId(ApplyVO applyVO){ String applyId = UUIDUtil.getUUID(); String userId = ""; @@ -160,6 +164,18 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic userVO.setUserType(1); userVO.setUserState(0); userId = userService.saveAndReturnId(userVO,false); + Map basic = new HashMap<>(); + basic.put("bindUserAccount", userId); + basic.put("userPhotoId", applyVO.getApplyUserCardPhoto()); + basic.put("fullName", applyVO.getApplyName()); + basic.put("gender", applyVO.getApplySex()); + basic.put("cardType", '0'); + basic.put("idCardNumber", applyVO.getApplyCardNumber()); + basic.put("telephone", applyVO.getApplyPhone()); + basic.put("gmtCreate", DateUtil.getTime()); + basic.put("gmtModified", DateUtil.getTime()); + basic.put("isDelete", "0"); + basicUserInfoDao.save(basic); }else{ userId = userDTO.getUserId(); } @@ -784,6 +800,4 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic result.put("weekTime",weekTime); return result; } - - } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/btyjaccountsync/IBTYJUserAccountSyncService.java b/src/main/java/cn/com/tenlion/service/btyjaccountsync/IBTYJUserAccountSyncService.java new file mode 100644 index 0000000..73a04cd --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/btyjaccountsync/IBTYJUserAccountSyncService.java @@ -0,0 +1,21 @@ +package cn.com.tenlion.service.btyjaccountsync; + +import cn.com.tenlion.pojo.dtos.btyjuseraccountsync.BTYJUserAccountSyncDTO; + +import java.util.List; +import java.util.Map; + +/** + * @author xwangs + * @create 2022-02-21 15:27 + * @description + */ +public interface IBTYJUserAccountSyncService { + + /** + * 查询系统中所有注册学员信息 + * @param query + * @return + */ + List> listUserAccountInfo(Map query); +} diff --git a/src/main/java/cn/com/tenlion/service/btyjaccountsync/impl/BTYJAccountSyncServiceImpl.java b/src/main/java/cn/com/tenlion/service/btyjaccountsync/impl/BTYJAccountSyncServiceImpl.java new file mode 100644 index 0000000..9d11f7a --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/btyjaccountsync/impl/BTYJAccountSyncServiceImpl.java @@ -0,0 +1,97 @@ +package cn.com.tenlion.service.btyjaccountsync.impl; + +import cn.com.tenlion.dao.btyjaccountsync.IBTYJUserAccountSyncDao; +import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO; +import cn.com.tenlion.pojo.dtos.btyjuseraccountsync.BTYJUserAccountSyncDTO; +import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO; +import cn.com.tenlion.service.applystudents.IApplyStudentsService; +import cn.com.tenlion.service.btyjaccountsync.IBTYJUserAccountSyncService; +import cn.com.tenlion.service.worktype.IWorkTypeService; +import ink.wgink.exceptions.ParamsException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author xwangs + * @create 2022-02-21 15:28 + * @description + */ +@Service +public class BTYJAccountSyncServiceImpl implements IBTYJUserAccountSyncService { + + @Autowired + private IBTYJUserAccountSyncDao accountSyncDao; + @Autowired + private IWorkTypeService workTypeService; + + @Override + public List> listUserAccountInfo(Map query) { + if(query.get("queryDate") == null || query.get("queryDate").toString().length() == 0){ + throw new ParamsException("查询参数缺失:queryDate"); + } + query.put("queryDate", query.get("queryDate").toString().substring(0,10)); + List> classQueryList = accountSyncDao.listClassPlan(query); + query.clear(); + List> classList = new ArrayList<>(); + for (Map item : classQueryList) { + Map classInfo = new HashMap<>(8); + classInfo.put("orgName", item.get("institution_name").toString()); + classInfo.put("parentWorkName", ""); + classInfo.put("workName", ""); + if(item.get("worker_catalog") != null){ + String workIds[] = item.get("worker_catalog").toString().split(","); + if("".equals(workIds[0])){ + classInfo.put("parentWorkName", item.get("parentWorkName")); + classInfo.put("workName", item.get("workName")); + } else { + String workName = ""; + String parentWorkName = ""; + for (int i = 0; i < workIds.length; i++){ + WorkTypeDTO workTypeDTO = workTypeService.get(workIds[i]); + if(i + 1 == workIds.length){ + workName += workTypeDTO.getWorkTypeName(); + parentWorkName = workTypeDTO.getWorkTypeParentName(); + } else { + workName += workTypeDTO.getWorkTypeName() + ","; + } + } + classInfo.put("parentWorkName", parentWorkName); + classInfo.put("workName", workName); + } + + } + classInfo.put("trainingPlanNumber", item.get("plan_number").toString()); + classInfo.put("trainingPlanName", item.get("plan_name").toString()); + classInfo.put("chargePerson", item.get("charge_person").toString()); + classInfo.put("chargePersonTel", item.get("charge_person_tel").toString()); + classInfo.put("trainingSTime", item.get("plan_start_time").toString().substring(0, 10)); + classInfo.put("trainingETime", item.get("plan_end_time").toString().substring(0, 10)); + query.put("classPlanId", item.get("class_plan_id").toString()); + List userList = accountSyncDao.listUserAccountInfo(query); + for (BTYJUserAccountSyncDTO u : userList) { + String trainingType = u.getTrainingType(); + switch (trainingType) { + case "1": + u.setTrainingType("初训"); + break; + case "2": + u.setTrainingType("复训"); + break; + case "3": + u.setTrainingType("换证"); + break; + default: + u.setTrainingType(""); + } + } + classInfo.put("userAccountList", userList); + classList.add(classInfo); + } + return classList; + } +} diff --git a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java index 312b1ee..526d684 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java @@ -1220,32 +1220,48 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl private void changeDataFormDict(ApplyDTO applyDTO){ // 处理性别 - DataDTO applySexName = dataService.get(applyDTO.getApplySex()); - applyDTO.setApplySexName(applySexName.getDataName()); + if(applyDTO.getApplySex() != null && !"".equals(applyDTO.getApplySex())){ + DataDTO applySexName = dataService.get(applyDTO.getApplySex()); + applyDTO.setApplySexName(applySexName.getDataName()); + } // 处理学历 - DataDTO applyCultureLevelName = dataService.get(applyDTO.getApplyCultureLevel()); - applyDTO.setApplyCultureLevelName(applyCultureLevelName.getDataName()); + if(applyDTO.getApplyCultureLevel() != null && !"".equals(applyDTO.getApplyCultureLevel())) { + DataDTO applyCultureLevelName = dataService.get(applyDTO.getApplyCultureLevel()); + applyDTO.setApplyCultureLevelName(applyCultureLevelName.getDataName()); + } // 工种名称 - WorkTypeDTO workTypeDTO = workTypeService.get(applyDTO.getApplyWorkTypeId()); - applyDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName()); + if(applyDTO.getApplyWorkTypeId() != null && !"".equals(applyDTO.getApplyWorkTypeId())){ + WorkTypeDTO workTypeDTO = workTypeService.get(applyDTO.getApplyWorkTypeId()); + applyDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName()); + } // 机构名称 - InstitutionDTO institutionDTO = iInstitutionService.get(applyDTO.getApplyInstitutionId()); - applyDTO.setApplyInstitutionName(institutionDTO.getInstitutionName()); + if(applyDTO.getApplyInstitutionId() != null && !"".equals(applyDTO.getApplyInstitutionId())){ + InstitutionDTO institutionDTO = iInstitutionService.get(applyDTO.getApplyInstitutionId()); + applyDTO.setApplyInstitutionName(institutionDTO.getInstitutionName()); + } } private void changeDataFormDict(ApplyStudentsDTO applyDTO){ // 处理性别 - DataDTO applySexName = dataService.get(applyDTO.getApplySex()); - applyDTO.setApplySexName(applySexName.getDataName()); + if(applyDTO.getApplySex() != null && !"".equals(applyDTO.getApplySex())){ + DataDTO applySexName = dataService.get(applyDTO.getApplySex()); + applyDTO.setApplySexName(applySexName.getDataName()); + } // 处理学历 - DataDTO applyCultureLevelName = dataService.get(applyDTO.getApplyCultureLevel()); - applyDTO.setApplyCultureLevelName(applyCultureLevelName.getDataName()); + if(applyDTO.getApplyCultureLevel() != null && !"".equals(applyDTO.getApplyCultureLevel())) { + DataDTO applyCultureLevelName = dataService.get(applyDTO.getApplyCultureLevel()); + applyDTO.setApplyCultureLevelName(applyCultureLevelName.getDataName()); + } // 工种名称 - WorkTypeDTO workTypeDTO = workTypeService.get(applyDTO.getApplyWorkTypeId()); - applyDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName()); + if(applyDTO.getApplyWorkTypeId() != null && !"".equals(applyDTO.getApplyWorkTypeId())){ + WorkTypeDTO workTypeDTO = workTypeService.get(applyDTO.getApplyWorkTypeId()); + applyDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName()); + } // 机构名称 - InstitutionDTO institutionDTO = iInstitutionService.get(applyDTO.getApplyInstitutionId()); - applyDTO.setApplyInstitutionName(institutionDTO.getInstitutionName()); + if(applyDTO.getApplyInstitutionId() != null && !"".equals(applyDTO.getApplyInstitutionId())){ + InstitutionDTO institutionDTO = iInstitutionService.get(applyDTO.getApplyInstitutionId()); + applyDTO.setApplyInstitutionName(institutionDTO.getInstitutionName()); + } } @Override diff --git a/src/main/java/cn/com/tenlion/systemexaminationsignup/SystemExaminationSignupApplication.java b/src/main/java/cn/com/tenlion/systemexaminationsignup/SystemExaminationSignupApplication.java index e05adf9..04b45cb 100644 --- a/src/main/java/cn/com/tenlion/systemexaminationsignup/SystemExaminationSignupApplication.java +++ b/src/main/java/cn/com/tenlion/systemexaminationsignup/SystemExaminationSignupApplication.java @@ -3,11 +3,13 @@ package cn.com.tenlion.systemexaminationsignup; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.ServletComponentScan; import springfox.documentation.swagger2.annotations.EnableSwagger2; @EnableSwagger2 @SpringBootApplication(scanBasePackages = {"cn.com.tenlion", "ink.wgink"}) @MapperScan(basePackages = {"cn.com.tenlion.**.dao", "ink.wgink.**.dao"}) +@ServletComponentScan(basePackages = "cn.com.tenlion") public class SystemExaminationSignupApplication { public static void main(String[] args) { diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index d085c51..9e9065b 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -99,4 +99,20 @@ logging: level: root: error ink.wgink: debug - cn.com.tenlion: debug \ No newline at end of file + cn.com.tenlion: debug + +open-platform: + wechat: + # 小程序 + mini-app: + # 激活状态 + active: true + api-url: https://api.weixin.qq.com + # 认证地址,固定 + authorizeUrl: ${open-platform.wechat.mini-app.api-url}/sns/jscode2session + # 认证方式,固定 + grantType: authorization_code + # 小程序的appKey + app-key: wx9f627e69ba43e6a2 + # 小程序秘钥 + app-secret: bbdb7f9ee8f5cf7b4439a3cd79a01000 \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/btyjaccountsync/btyj-user-account-sync-mapper.xml b/src/main/resources/mybatis/mapper/btyjaccountsync/btyj-user-account-sync-mapper.xml new file mode 100644 index 0000000..16b5c13 --- /dev/null +++ b/src/main/resources/mybatis/mapper/btyjaccountsync/btyj-user-account-sync-mapper.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml index a22ecef..f74bbc3 100644 --- a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml +++ b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml @@ -383,6 +383,7 @@ #{classPlanIdList[${index}]} + ORDER BY t1.gmt_create DESC diff --git a/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml b/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml index 11a393d..ce9dcab 100644 --- a/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml +++ b/src/main/resources/mybatis/mapper/examapply/exam-apply-mapper.xml @@ -534,6 +534,9 @@ management_exam_apply t1 WHERE t1.is_delete = 0 + + AND t1.check_status = #{checkStatus} + diff --git a/src/main/resources/mybatis/mapper/examcheck/exam-check-mapper.xml b/src/main/resources/mybatis/mapper/examcheck/exam-check-mapper.xml index 4c02dfd..cc8bf10 100644 --- a/src/main/resources/mybatis/mapper/examcheck/exam-check-mapper.xml +++ b/src/main/resources/mybatis/mapper/examcheck/exam-check-mapper.xml @@ -405,6 +405,9 @@ management_exam_check t1 WHERE t1.is_delete = 0 + + AND t1.check_status = #{checkStatus} + diff --git a/src/main/resources/static/route/classplan/list-signup.html b/src/main/resources/static/route/classplan/list-signup.html index 362d8f8..0120f99 100644 --- a/src/main/resources/static/route/classplan/list-signup.html +++ b/src/main/resources/static/route/classplan/list-signup.html @@ -152,7 +152,7 @@ if(orgId == ''){ return; } - var url = 'api/classplan/export-apply-user-excel?t=' + new Date(); + var url = 'api/classplan/export-apply-user-excel?t=747101512'; url += '&keywords=' + encodeURI($('#keywords').val()); if($('#applyAuditStates').val() == ''){ url += '&applyAuditStates=-1,0,2'; @@ -162,6 +162,19 @@ url += '&applyFenLei=' + $('#applyFenLei').val(); url += '&applyInstitutionId=' + orgId; url += '&applyWorkTypeId=' + workerCatalog; + var checkStatus = table.checkStatus('dataTable'); + var checkDatas = checkStatus.data; + if(checkDatas.length > 0){ + var applyIds = ""; + for (var i = 0,item; item = checkDatas[i++];){ + if(i == checkDatas.length){ + applyIds += item.applyId; + } else { + applyIds += item.applyId + ',' + } + } + url += '&applyIds=' + applyIds; + } window.open(url); return; }); @@ -398,13 +411,6 @@ }); } - // 事件 - 页面变化 - $win.on('resize', function() { - clearTimeout(resizeTimeout); - resizeTimeout = setTimeout(function() { - reloadTable(); - }, 500); - }); // 事件 - 搜索 $(document).on('click', '#search', function() { reloadTable(1); diff --git a/src/main/resources/static/route/classplan/save-user-register1.html b/src/main/resources/static/route/classplan/save-user-register1.html index b195c76..e6d944e 100644 --- a/src/main/resources/static/route/classplan/save-user-register1.html +++ b/src/main/resources/static/route/classplan/save-user-register1.html @@ -16,6 +16,28 @@
+
+
+ + +
+ +
+ +
+
+
@@ -343,8 +365,11 @@ var orgId = top.restAjax.params(window.location.href).orgId; var workerCatalog = top.restAjax.params(window.location.href).workerCatalog; + $('.layui-card').height($(window).height()); + // 初始化内容 function initData() { + clearCheckResultSelect(); if(typeof (orgId) === 'undefined' || orgId == ''){ top.dialog.msg('机构参数缺失'); closeBox(); @@ -364,6 +389,78 @@ } initData(); + $(document).on('click', '#checkResultBtn', function(){ + var keyWords = $('#keywords').val(); + if(keyWords == ""){ + clearCheckResultSelect(); + clearFrom(); + return; + } + top.restAjax.get(top.restAjax.path('api/applystudents/list', []), {keywords : keyWords}, null, function(code, data) { + laytpl(document.getElementById('check-result-template').innerHTML).render(data, function(html) { + document.getElementById('check-result-box').innerHTML = html; + form.render(); + }); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }); + + form.on('select(checkChange)', function(data){ + if(typeof (data.value) == 'undefined' || data.value == ''){ + clearFrom(); + return; + } + top.restAjax.get(top.restAjax.path('api/applystudents/get/{arg}', [data.value]), {}, null, function(code, data) { + $('#applyUserCardPhoto').val(data['applyUserCardPhoto']); + $('#idCardFrontPhoto').val(data['idCardFrontPhoto']); + $('#idCardBackPhoto').val(data['idCardBackPhoto']); + $('#educationPhoto').val(data['educationPhoto']); + $('#applyTakeCardPhoto').val(data['applyTakeCardPhoto']); + initApplyUserCardPhotoUploadFile(); + initIdCardFrontPhotoUploadFile(); + initIdCardBackPhotoUploadFile(); + initEducationPhotoUploadFile(); + initApplyTakeCardPhotoUploadFile(); + $('#applyName').val(data['applyName']); + $('#applySex').val(data['applySex']); + $('#applyCultureLevel').val(data['applyCultureLevel']); + $('#applyCardNumber').val(data['applyCardNumber']); + $('#applyPhone').val(data['applyPhone']); + $('#applyUnitName').val(data['applyUnitName']); + form.render(); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }); + + function clearCheckResultSelect(){ + laytpl(document.getElementById('check-result-template').innerHTML).render([], function(html) { + document.getElementById('check-result-box').innerHTML = html; + form.render(); + }); + } + + function clearFrom(){ + $('#applyUserCardPhoto').val(''); + $('#idCardFrontPhoto').val(''); + $('#idCardBackPhoto').val(''); + $('#educationPhoto').val(''); + $('#applyTakeCardPhoto').val(''); + initApplyUserCardPhotoUploadFile(); + initIdCardFrontPhotoUploadFile(); + initIdCardBackPhotoUploadFile(); + initEducationPhotoUploadFile(); + initApplyTakeCardPhotoUploadFile(); + $('#applyName').val(''); + $('#applySex').val(''); + $('#applyCultureLevel').val(''); + $('#applyCardNumber').val(''); + $('#applyPhone').val(''); + $('#applyUnitName').val(''); + form.render(); + } + function initWorkTypeName(){ top.restAjax.get(top.restAjax.path('api/classplan/get-work-type-name', []), {workerCatalog : workerCatalog}, null, function(code, data) { $('#parentWorkName').val(data.parentWorkName); diff --git a/src/main/resources/static/route/classplan/save-user-register2.html b/src/main/resources/static/route/classplan/save-user-register2.html index 9e8bcbf..a30395d 100644 --- a/src/main/resources/static/route/classplan/save-user-register2.html +++ b/src/main/resources/static/route/classplan/save-user-register2.html @@ -16,6 +16,28 @@
+
+
+ + +
+ +
+ +
+
+
@@ -222,10 +244,11 @@
-
+
- + +
@@ -345,8 +368,8 @@
- -
+ +
@@ -416,8 +439,11 @@ var orgId = top.restAjax.params(window.location.href).orgId; var workerCatalog = top.restAjax.params(window.location.href).workerCatalog; + $('.layui-card').height($(window).height()); + // 初始化内容 function initData() { + clearCheckResultSelect(); if(typeof (orgId) === 'undefined' || orgId == ''){ top.dialog.msg('机构参数缺失'); closeBox(); @@ -437,6 +463,94 @@ } initData(); + $(document).on('click', '#checkResultBtn', function(){ + var keyWords = $('#keywords').val(); + if(keyWords == ""){ + clearCheckResultSelect(); + clearFrom(); + return; + } + top.restAjax.get(top.restAjax.path('api/applystudents/list', []), {keywords : keyWords}, null, function(code, data) { + laytpl(document.getElementById('check-result-template').innerHTML).render(data, function(html) { + document.getElementById('check-result-box').innerHTML = html; + form.render(); + }); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }); + + form.on('select(checkChange)', function(data){ + if(typeof (data.value) == 'undefined' || data.value == ''){ + clearFrom(); + return; + } + top.restAjax.get(top.restAjax.path('api/applystudents/get/{arg}', [data.value]), {}, null, function(code, data) { + $('#applyUserCardPhoto').val(data['applyUserCardPhoto']); + $('#idCardFrontPhoto').val(data['idCardFrontPhoto']); + $('#idCardBackPhoto').val(data['idCardBackPhoto']); + $('#educationPhoto').val(data['educationPhoto']); + $('#applyTakeCardPhoto').val(data['applyTakeCardPhoto']); + $('#applyRePeiXunPhoto').val(data['applyRePeiXunPhoto']); + initApplyUserCardPhotoUploadFile(); + initIdCardFrontPhotoUploadFile(); + initIdCardBackPhotoUploadFile(); + initEducationPhotoUploadFile(); + initApplyTakeCardPhotoUploadFile(); + initApplyRePeiXunPhotoUploadFile(); + $('#applyName').val(data['applyName']); + $('#applySex').val(data['applySex']); + $('#applyPhone').val(data['applyPhone']); + $('#applyCultureLevel').val(data['applyCultureLevel']); + $('#applyCardNumber').val(data['applyCardNumber']); + $('#applyZhiCheng').val(data['applyZhiCheng']); + $('#applySchool').val(data['applySchool']); + $('#applySubject').val(data['applySubject']); + $('#applyUnitName').val(data['applyUnitName']); + $('#applyUnitType').val(data['applyUnitType']); + $('#applyUnitWork').val(data['applyUnitWork']); + $('#applyUnitBelong').val(data['applyUnitBelong']); + form.render(); + }, function(code, data) { + top.dialog.msg(data.msg); + }); + }); + + function clearCheckResultSelect(){ + laytpl(document.getElementById('check-result-template').innerHTML).render([], function(html) { + document.getElementById('check-result-box').innerHTML = html; + form.render(); + }); + } + + function clearFrom(){ + $('#applyUserCardPhoto').val(''); + $('#idCardFrontPhoto').val(''); + $('#idCardBackPhoto').val(''); + $('#educationPhoto').val(''); + $('#applyTakeCardPhoto').val(''); + $('#applyRePeiXunPhoto').val(''); + initApplyUserCardPhotoUploadFile(); + initIdCardFrontPhotoUploadFile(); + initIdCardBackPhotoUploadFile(); + initEducationPhotoUploadFile(); + initApplyTakeCardPhotoUploadFile(); + initApplyRePeiXunPhotoUploadFile(); + $('#applyName').val(''); + $('#applySex').val(''); + $('#applyPhone').val(''); + $('#applyCultureLevel').val(''); + $('#applyCardNumber').val(''); + $('#applyZhiCheng').val(''); + $('#applySchool').val(''); + $('#applySubject').val(''); + $('#applyUnitName').val(''); + $('#applyUnitType').val(''); + $('#applyUnitWork').val(''); + $('#applyUnitBelong').val(''); + form.render(); + } + form.on('radio(applyFenLeiFilter)', function(data){ var val = data.value;//被点击的radio的value值 if(val == 1){ diff --git a/src/main/resources/static/route/classplan/update-user-register2.html b/src/main/resources/static/route/classplan/update-user-register2.html index 1413e3b..319b20d 100644 --- a/src/main/resources/static/route/classplan/update-user-register2.html +++ b/src/main/resources/static/route/classplan/update-user-register2.html @@ -222,10 +222,11 @@
-
+
- + +
diff --git a/src/main/resources/templates/index2.html b/src/main/resources/templates/index2.html index dbc760c..d5c5e28 100644 --- a/src/main/resources/templates/index2.html +++ b/src/main/resources/templates/index2.html @@ -17,109 +17,37 @@
-
+ -
-
-
分类统计
+
数据简报
@@ -189,30 +117,27 @@ new Vue({ el: '#LAY-app', data: { - trainingInstitutionNum:0, - stationInstitutionNum:0, + registerCount:0, + trainingCount:0, + classPlanCount:0, + examCount:0, examinationNum:0, eChart0:null, eChart1:null, }, methods: { - initTrainingInstitutionNum:function(){ + initRegisterCount:function(){ var self = this; - top.restAjax.get('api/indexcount/count-training-institution-num', {}, null, function(code, data) { - self.trainingInstitutionNum = data.data['num']; + top.restAjax.get('api/indexcount/get-register-num', {}, null, function(code, data) { + self.registerCount = data['registerCount']; + self.trainingCount = data['trainingCount']; + self.classPlanCount = data['classPlanCount']; + self.examCount = data['examCount']; self.$nextTick(function() { - $('#trainingInstitutionNum').animateNumbers(self.trainingInstitutionNum); - }); - }, function(code, data) { - top.dialog.msg(data.msg); - }); - }, - initStationInstitutionNum:function(){ - var self = this; - top.restAjax.get('api/indexcount/count-station-institution-num', {}, null, function(code, data) { - self.stationInstitutionNum = data.data['num']; - self.$nextTick(function() { - $('#stationInstitutionNum').animateNumbers(self.stationInstitutionNum); + $('#registerCount').animateNumbers(self.registerCount); + $('#trainingCount').animateNumbers(self.trainingCount); + $('#classPlanCount').animateNumbers(self.classPlanCount); + $('#examCount').animateNumbers(self.examCount); }); }, function(code, data) { top.dialog.msg(data.msg); @@ -394,8 +319,7 @@ var self = this; $('#eChart0').width($('#layu-col-md4-panel').width()); $('#eChart1').width($('#layu-col-md4-panel').width()); - self.initTrainingInstitutionNum(); - self.initStationInstitutionNum(); + self.initRegisterCount(); self.initExaminationNum(); self.initFullCalendar(); self.initEChart0();