diff --git a/src/main/java/com/sztzjy/money_management/controller/GradeController.java b/src/main/java/com/sztzjy/money_management/controller/GradeController.java index 5489414..cce5786 100644 --- a/src/main/java/com/sztzjy/money_management/controller/GradeController.java +++ b/src/main/java/com/sztzjy/money_management/controller/GradeController.java @@ -19,7 +19,7 @@ import java.util.List; @RestController @Api(tags = "成绩相关") -@RequestMapping("api/ResourceController") +@RequestMapping("api/GradeController") public class GradeController { @Autowired StuTrainingMapper trainingMapper; @@ -29,7 +29,7 @@ public class GradeController { TrainingReportMapper trainingReportMapper; @AnonymousAccess - @ApiOperation("得分情况展示") + @ApiOperation("实训演练-学习成绩得分情况展示") @PostMapping("getScoreInfo") public ResultEntity getScoreInfo(@RequestParam String userId, @RequestParam String chapterId, @@ -80,11 +80,11 @@ public class GradeController { stuTrainingDto.setExpTrainingCompleteStatus(stuTraining.getExpTrainingCompleteStatus()); TrainingReportExample trainingReportExample = new TrainingReportExample(); trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId); - //设置返回对象得分 - stuTrainingDto.setKnowledgeSummaryScore(stuTraining.getKnowledgeSummaryScore()); - stuTrainingDto.setResourceLearningScore(stuTraining.getResourceLearningScore()); - stuTrainingDto.setLearningEvalScore(stuTraining.getLearningEvalScore()); - stuTrainingDto.setCaseStuScore(stuTraining.getExpTrainingScore()); + //设置返回对象得分 ***** 根据学生实训表完成情况 设置得分 + stuTrainingDto.setKnowledgeSummaryScore(studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(stuTraining.getKnowledgeSummaryCompleteStatus()))); + stuTrainingDto.setResourceLearningScore(studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(stuTraining.getResourceLearningCompleteStatus()))); + stuTrainingDto.setLearningEvalScore(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(stuTraining.getLearningEvalCompleteStatus()))); + stuTrainingDto.setCaseStuScore(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()))); //设置实验报告情况及得分 List trainingReports = trainingReportMapper.selectByExample(trainingReportExample); @@ -121,9 +121,30 @@ public class GradeController { } - //知识概要获取完成情况 - //资源学习获取完成情况 + //学生端 客户案例成绩展示 + @AnonymousAccess + @ApiOperation("学生端-成绩中心-客户案例成绩展示") + @PostMapping("getStuClientScoreInfo") + public ResultEntity getStuClientScoreInfo(@RequestParam String userId, + @RequestParam String chapterId, + @RequestParam String schoolId) { + return null; + } + + //学生端 综合规划成绩 + //学生端 综合规划审核报告展示 + + //学生端 理论考核成绩 + //学生端 成绩总览 + + + //教师端 客户案例成绩查询 + //教师端 客户案例导出 + //教师端 客户案例权重设置 + //教师端 客户案例章节成绩详情 + //教师端 客户案例实验报告列表查询 + //教师端 客户案例实验报告评阅 diff --git a/src/main/java/com/sztzjy/money_management/controller/KnowledgeNoteController.java b/src/main/java/com/sztzjy/money_management/controller/KnowledgeNoteController.java index e626391..447c1ca 100644 --- a/src/main/java/com/sztzjy/money_management/controller/KnowledgeNoteController.java +++ b/src/main/java/com/sztzjy/money_management/controller/KnowledgeNoteController.java @@ -65,6 +65,22 @@ public class KnowledgeNoteController { return new ResultEntity<>(knowledgeSummary); } + @AnonymousAccess + @ApiOperation("设置知识概要学习时间(分钟)") //获取之前的学习时间 并设置完成情况 + @PostMapping("setKnowledgeSummaryMinutes") + public ResultEntity getKnowledgeNote(@RequestParam String trainingId,@ApiParam("知识概要学习时间")@RequestParam Integer minutes) { + StuTrainingWithBLOBs stuTrainingWithBLOBs = trainingMapper.selectByPrimaryKey(trainingId); + Integer knowledgeSummaryCompleteStatus = stuTrainingWithBLOBs.getKnowledgeSummaryCompleteStatus(); + if(knowledgeSummaryCompleteStatus==null){ + stuTrainingWithBLOBs.setKnowledgeSummaryCompleteStatus(minutes); + }else { + stuTrainingWithBLOBs.setKnowledgeSummaryCompleteStatus(knowledgeSummaryCompleteStatus+minutes); + } + trainingMapper.updateByPrimaryKeyWithBLOBs(stuTrainingWithBLOBs); + return new ResultEntity<>(stuTrainingWithBLOBs.getKnowledgeNote()); + } + + @AnonymousAccess @ApiOperation("知识笔记-保存") @PostMapping("saveNote") @@ -103,4 +119,6 @@ public class KnowledgeNoteController { } + + } diff --git a/src/main/java/com/sztzjy/money_management/controller/ResourceController.java b/src/main/java/com/sztzjy/money_management/controller/ResourceController.java index 1674bba..824f3a2 100644 --- a/src/main/java/com/sztzjy/money_management/controller/ResourceController.java +++ b/src/main/java/com/sztzjy/money_management/controller/ResourceController.java @@ -3,7 +3,9 @@ package com.sztzjy.money_management.controller; import com.sztzjy.money_management.annotation.AnonymousAccess; import com.sztzjy.money_management.config.Constant; import com.sztzjy.money_management.entity.ResourceCenter; +import com.sztzjy.money_management.entity.StuTrainingWithBLOBs; import com.sztzjy.money_management.mapper.ResourceCenterMapper; +import com.sztzjy.money_management.mapper.StuTrainingMapper; import com.sztzjy.money_management.service.ResourceCenterService; import com.sztzjy.money_management.util.ResultEntity; import io.swagger.annotations.Api; @@ -34,6 +36,8 @@ public class ResourceController { ResourceCenterMapper resourceCenterMapper; @Value("${file.path}") private String filePath; + @Autowired + StuTrainingMapper trainingMapper; //上传资源文件 @PostMapping("uploadResource") @@ -132,6 +136,20 @@ public class ResourceController { resourceCenterService.downloadResource(resourceId, response); } + @AnonymousAccess + @ApiOperation("设置资源学习时间(分钟)") //获取之前的学习时间 并设置完成情况 + @PostMapping("setKnowledgeSummaryMinutes") + public ResultEntity getKnowledgeNote(@RequestParam String trainingId,@ApiParam("知识概要学习时间")@RequestParam Integer minutes) { + StuTrainingWithBLOBs stuTrainingWithBLOBs = trainingMapper.selectByPrimaryKey(trainingId); + Integer resourceLearningCompleteStatus = stuTrainingWithBLOBs.getResourceLearningCompleteStatus(); + if(resourceLearningCompleteStatus==null){ + stuTrainingWithBLOBs.setResourceLearningCompleteStatus(minutes); + }else { + stuTrainingWithBLOBs.setResourceLearningCompleteStatus(resourceLearningCompleteStatus+minutes); + } + trainingMapper.updateByPrimaryKeyWithBLOBs(stuTrainingWithBLOBs); + return new ResultEntity<>(stuTrainingWithBLOBs.getKnowledgeNote()); + } diff --git a/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java b/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java index fc23a09..9cb37f1 100644 --- a/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java +++ b/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java @@ -1,20 +1,27 @@ package com.sztzjy.money_management.controller; +import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.sztzjy.money_management.annotation.AnonymousAccess; -import com.sztzjy.money_management.entity.SynthesisPlanClient; -import com.sztzjy.money_management.mapper.SynthesisPlanClientMapper; +import com.sztzjy.money_management.config.Constant; +import com.sztzjy.money_management.entity.*; +import com.sztzjy.money_management.entity.dto.SynthesisPlanScoreDto; +import com.sztzjy.money_management.entity.dto.UserStatisticsDto; +import com.sztzjy.money_management.mapper.*; import com.sztzjy.money_management.util.ResultEntity; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; 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.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.UUID; +import java.util.regex.Pattern; //综合规划相关 @RestController @@ -23,15 +30,56 @@ import java.util.List; public class SynthesisPlanController { @Autowired SynthesisPlanClientMapper synthesisPlanClientMapper; + @Autowired + WorkScheduleMapper workScheduleMapper; + @Autowired + SynthesisPlanScoreMapper synthesisPlanScoreMapper; + @Autowired + UserInfoMapper userInfoMapper; + @Autowired + CaseInfoMapper caseInfoMapper; + @Autowired + UserStatisticsMapper userStatisticsMapper; //目标客户查询 //根据create_time排序 @AnonymousAccess @ApiOperation("目标客户查询") @PostMapping("selectTargetCustomer") - public ResultEntity> selectTargetCustomer(@RequestParam String userId, @RequestParam String schoolId) { - //先根据userID和schoolID查询所有数据 注意 - return null; + public ResultEntity> selectTargetCustomer(@RequestParam String userId, + @RequestParam String schoolId, + @RequestParam Integer index, + @RequestParam Integer size, + @ApiParam("客户姓名/身份证号") @RequestParam(required = false) String param) { + //先根据userID和source查询所有数据 注意 学生跟踪客户后 会生成一条SynthesisPlanClient数据,需要去重 + PageHelper.startPage(index, size); + List sourceList=new ArrayList<>(); + sourceList.add(Constant.BUILT_IN_SCHOOL_ID); + sourceList.add(schoolId); + SynthesisPlanClientExample neiZhiExample = new SynthesisPlanClientExample(); + SynthesisPlanClientExample.Criteria criteria = neiZhiExample.createCriteria(); + if (StringUtils.isNotBlank(param)){ + if(Pattern.matches("\\d+", param)){ + criteria.andIdcardLike("%"+param+"%"); + }else { + criteria.andNameLike("%"+param+"%"); + } + } + criteria.andUseridIsNull().andSourceIn(sourceList); + neiZhiExample.setOrderByClause("create_time asc"); + List synthesisPlanClients = synthesisPlanClientMapper.selectByExample(neiZhiExample); + + //获取领取状态 + for (int i = 0; i < synthesisPlanClients.size(); i++) { + SynthesisPlanClientExample example = new SynthesisPlanClientExample(); + example.createCriteria().andUseridEqualTo(userId).andCaseidEqualTo(synthesisPlanClients.get(i).getCaseid()).andGetStatusEqualTo("true"); + List stuClients = synthesisPlanClientMapper.selectByExample(example); + if(!stuClients.isEmpty()){ + synthesisPlanClients.get(i).setGetStatus("true"); + } + } + PageInfo pageInfo = new PageInfo<>(synthesisPlanClients); + return new ResultEntity<>(pageInfo); } //目标客户跟踪 @@ -46,4 +94,202 @@ public class SynthesisPlanController { int i = synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient); return i==1; } + + //工作日程新增与编辑 + @AnonymousAccess + @ApiOperation("工作日程新增与编辑") + @PostMapping("insertAndUpdateWorkSchedule") + public Boolean insertWorkSchedule(@RequestParam String userId, @RequestBody WorkSchedule workSchedule) { + if(StringUtils.isBlank(workSchedule.getWorkScheduleId())){ //代表新增 + workSchedule.setWorkScheduleId(String.valueOf(UUID.randomUUID())); + workSchedule.setUserId(userId); + int i = workScheduleMapper.insert(workSchedule); + return i==1; + }else { //编辑 + int i = workScheduleMapper.updateByPrimaryKeySelective(workSchedule); + return i==1; + } + } + + //工作日程列表查询 + @AnonymousAccess + @ApiOperation("工作日程列表查询") + @PostMapping("selectWorkScheduleList") + public ResultEntity> selectWorkScheduleList(@RequestParam String userId, + @ApiParam("开始时间") @RequestParam Date startTime, + @ApiParam("结束时间") @RequestParam Date endTime,@RequestParam Integer index,@RequestParam Integer size) { + PageHelper.startPage(index, size); + WorkScheduleExample example = new WorkScheduleExample(); + WorkScheduleExample.Criteria criteria = example.createCriteria(); + criteria.andUserIdEqualTo(userId).andOrderTimeBetween(startTime,endTime); + List workSchedules = workScheduleMapper.selectByExample(example); + PageInfo pageInfo = new PageInfo<>(workSchedules); + return new ResultEntity<>(HttpStatus.OK, "工作日程列表查询成功!",pageInfo); + } + + //工作日程详情查询 + @AnonymousAccess + @ApiOperation("工作日程详情查询") + @GetMapping("selectWorkSchedule") + public ResultEntity selectWorkSchedule(@RequestParam String workScheduleId) { + WorkSchedule workSchedule = workScheduleMapper.selectByPrimaryKey(workScheduleId); + return new ResultEntity<>(HttpStatus.OK, "工作日程详情查询成功!",workSchedule); + } + + //工作日程删除 + @AnonymousAccess + @ApiOperation("工作日程删除") + @GetMapping("deleteWorkSchedule") + public ResultEntity deleteWorkSchedule(@RequestParam String workScheduleId) { + int i = workScheduleMapper.deleteByPrimaryKey(workScheduleId); + if(i==1){ + return new ResultEntity<>(HttpStatus.OK, "工作日程删除成功!"); + } + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "工作日程删除失败!"); + } + + + //规划报告列表展示 + @AnonymousAccess + @ApiOperation("规划报告列表展示") + @PostMapping("selectPlanningReportList") + public ResultEntity> selectPlanningReportList(@RequestParam String userId, + @ApiParam("理财类型")@RequestParam String manageMoneyMattersType, + @ApiParam("提交状态")@RequestParam String submitStatus, + @ApiParam("查询参数")@RequestParam String param,@RequestParam Integer index,@RequestParam Integer size) { + PageHelper.startPage(index, size); + SynthesisPlanClientExample example = new SynthesisPlanClientExample(); + SynthesisPlanClientExample.Criteria criteria = example.createCriteria(); + criteria.andUseridEqualTo(userId); + if(StringUtils.isBlank(submitStatus)){ + List submitStatusList=new ArrayList<>(); + submitStatusList.add("未审核"); + submitStatusList.add("已审核"); + submitStatusList.add("未提交"); + criteria.andSubmitStatusIn(submitStatusList); + }else { + criteria.andSubmitStatusEqualTo(submitStatus); + } + if(StringUtils.isNotBlank(manageMoneyMattersType)){ + criteria.andManageMoneyMattersTypeEqualTo(manageMoneyMattersType); + } + if(StringUtils.isNotBlank(param)){ + SynthesisPlanClientExample.Criteria criteria1 = example.createCriteria(); + SynthesisPlanClientExample.Criteria criteria2 = example.createCriteria(); + SynthesisPlanClientExample.Criteria criteria3 = example.createCriteria(); + SynthesisPlanClientExample.Criteria criteria4 = example.createCriteria(); + criteria1.andProposalNumberLike("%" + param + "%"); + criteria2.andProposalNameLike("%" + param + "%"); + criteria3.andNameLike("%" + param + "%"); + criteria4.andIdcardLike("%" + param + "%"); + example.or(criteria1); + example.or(criteria2); + example.or(criteria3); + example.or(criteria4); + } + example.setOrderByClause("create_time asc"); + List synthesisPlanClients = synthesisPlanClientMapper.selectByExample(example); + PageInfo pageInfo = new PageInfo<>(synthesisPlanClients); + return new ResultEntity<>(HttpStatus.OK, "规划报告列表展示成功!",pageInfo); + } + + //规划报告提交 + @AnonymousAccess + @ApiOperation("规划报告提交") + @PostMapping("submitPlanningReport") + public ResultEntity submitPlanningReport(@RequestParam String stuClientId,@RequestParam String userId) { + SynthesisPlanClient synthesisPlanClient = synthesisPlanClientMapper.selectByPrimaryKey(stuClientId); + if(synthesisPlanClient.getUserid().equals(userId) && synthesisPlanClient.getSubmitStatus().equals("未提交")){ + synthesisPlanClient.setSubmitStatus("未审核"); + return new ResultEntity<>(HttpStatus.OK, "规划报告提交成功!"); + } + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "规划报告提交失败!提交状态错误"); + } + + //已有客户、规划报告删除 + @AnonymousAccess + @ApiOperation("已有客户、规划报告删除") + @PostMapping("deletePlanningReport") + public ResultEntity deletePlanningReport(@RequestParam String stuClientId) { + int i = synthesisPlanClientMapper.deleteByPrimaryKey(stuClientId); + if(i==1){ + return new ResultEntity<>(HttpStatus.OK, "删除成功!"); + } + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "删除失败!"); + } + + //规划报告审核报告展示 + @AnonymousAccess + @ApiOperation("规划报告审核报告展示") + @PostMapping("selectSynthesisPlanScoreList") + public ResultEntity selectSynthesisPlanScoreList(@RequestParam String caseId,@RequestParam String userId,@RequestParam Integer index,@RequestParam Integer size) { + //获取审核类容 + PageHelper.startPage(index, size); + SynthesisPlanScoreExample example = new SynthesisPlanScoreExample(); + example.createCriteria().andCaseidEqualTo(caseId).andUseridEqualTo(userId); + List synthesisPlanScores = synthesisPlanScoreMapper.selectByExample(example); + PageInfo pageInfo = new PageInfo<>(synthesisPlanScores); + SynthesisPlanScoreDto synthesisPlanScoreDto = new SynthesisPlanScoreDto(); + synthesisPlanScoreDto.setContent(pageInfo); + //根据userID获取学号和姓名 + UserInfo userInfo = userInfoMapper.selectByPrimaryKey(userId); + synthesisPlanScoreDto.setStudentId(userInfo.getStudentId()); + //根据caseID获取案例题客户背景 + CaseInfo caseInfo = caseInfoMapper.selectByPrimaryKey(caseId); + synthesisPlanScoreDto.setCustomerBackdrop(caseInfo.getCustomerBackdrop()); + //获取总成绩 + Double totalScore=synthesisPlanScoreMapper.getTotalScore(userId,caseId); + synthesisPlanScoreDto.setTotalScore(totalScore); + return new ResultEntity<>(HttpStatus.OK, "规划报告审核报告展示成功!",synthesisPlanScoreDto); + } + + //已有客户列表查询 + @AnonymousAccess + @ApiOperation("已有客户列表查询") + @PostMapping("selectExistingCustomersList") + public ResultEntity> selectExistingCustomersList(@RequestParam String userId, + @RequestParam Integer index, + @RequestParam Integer size, + @ApiParam("客户编号/客户姓名/身份证号") @RequestParam(required = false) String param) { + PageHelper.startPage(index, size); + SynthesisPlanClientExample example = new SynthesisPlanClientExample(); + SynthesisPlanClientExample.Criteria criteria = example.createCriteria(); + criteria.andUseridEqualTo(userId).andSubmitStatusEqualTo("已审核"); + if(StringUtils.isNotBlank(param)){ + SynthesisPlanClientExample.Criteria criteria1 = example.createCriteria(); + SynthesisPlanClientExample.Criteria criteria2 = example.createCriteria(); + SynthesisPlanClientExample.Criteria criteria3 = example.createCriteria(); + criteria1.andClientNumberLike("%" + param + "%"); + criteria2.andNameLike("%" + param + "%"); + criteria3.andIdcardLike("%" + param + "%"); + example.or(criteria1); + example.or(criteria2); + example.or(criteria3); + } + example.setOrderByClause("create_time asc"); + List synthesisPlanClients = synthesisPlanClientMapper.selectByExample(example); + PageInfo pageInfo = new PageInfo<>(synthesisPlanClients); + return new ResultEntity<>(HttpStatus.OK, "已有客户列表查询成功!",pageInfo); + } + + + //客户统计 + @AnonymousAccess + @ApiOperation("客户统计查询") + @PostMapping("selectUserStatistics") + public ResultEntity selectUserStatistics(@RequestParam String userId){ + //先获取已有客户总数 + Integer yiYouTotalCount=synthesisPlanClientMapper.selectYiYouTotalCount(userId); + //获取潜在客户总数 + Integer qianZaiTotalCount=synthesisPlanClientMapper.selectQianZaiTotalCount(userId); + + //获取高净值数据 + UserStatistics userStatistics = userStatisticsMapper.selectByPrimaryKey(userId); + UserStatisticsDto userStatisticsDto = new UserStatisticsDto(); + userStatisticsDto.setQianZaiTotalCount(qianZaiTotalCount); + userStatisticsDto.setYiYouTotalCount(yiYouTotalCount); + userStatisticsDto.setHighNetClientHaveCount(userStatistics.getHighNetClientHaveCount()); + userStatisticsDto.setHighNetClientLatentCount(userStatistics.getHighNetClientLatentCount()); + return new ResultEntity<>(HttpStatus.OK, "客户统计查询成功!",userStatisticsDto); + } } diff --git a/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java b/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java index 333afbb..dd25e28 100644 --- a/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java +++ b/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClient.java @@ -29,6 +29,12 @@ public class SynthesisPlanClient { @ApiModelProperty("客户编号") private String clientNumber; + @ApiModelProperty("建议书名称") + private String proposalName; + + @ApiModelProperty("建议书编号") + private String proposalNumber; + @ApiModelProperty("领取状态") private String getStatus; @@ -125,6 +131,22 @@ public class SynthesisPlanClient { this.clientNumber = clientNumber == null ? null : clientNumber.trim(); } + public String getProposalName() { + return proposalName; + } + + public void setProposalName(String proposalName) { + this.proposalName = proposalName == null ? null : proposalName.trim(); + } + + public String getProposalNumber() { + return proposalNumber; + } + + public void setProposalNumber(String proposalNumber) { + this.proposalNumber = proposalNumber == null ? null : proposalNumber.trim(); + } + public String getGetStatus() { return getStatus; } diff --git a/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClientExample.java b/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClientExample.java index d1dd77d..8346309 100644 --- a/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClientExample.java +++ b/src/main/java/com/sztzjy/money_management/entity/SynthesisPlanClientExample.java @@ -516,6 +516,146 @@ public class SynthesisPlanClientExample { return (Criteria) this; } + public Criteria andProposalNameIsNull() { + addCriterion("proposal_name is null"); + return (Criteria) this; + } + + public Criteria andProposalNameIsNotNull() { + addCriterion("proposal_name is not null"); + return (Criteria) this; + } + + public Criteria andProposalNameEqualTo(String value) { + addCriterion("proposal_name =", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameNotEqualTo(String value) { + addCriterion("proposal_name <>", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameGreaterThan(String value) { + addCriterion("proposal_name >", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameGreaterThanOrEqualTo(String value) { + addCriterion("proposal_name >=", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameLessThan(String value) { + addCriterion("proposal_name <", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameLessThanOrEqualTo(String value) { + addCriterion("proposal_name <=", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameLike(String value) { + addCriterion("proposal_name like", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameNotLike(String value) { + addCriterion("proposal_name not like", value, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameIn(List values) { + addCriterion("proposal_name in", values, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameNotIn(List values) { + addCriterion("proposal_name not in", values, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameBetween(String value1, String value2) { + addCriterion("proposal_name between", value1, value2, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNameNotBetween(String value1, String value2) { + addCriterion("proposal_name not between", value1, value2, "proposalName"); + return (Criteria) this; + } + + public Criteria andProposalNumberIsNull() { + addCriterion("proposal_number is null"); + return (Criteria) this; + } + + public Criteria andProposalNumberIsNotNull() { + addCriterion("proposal_number is not null"); + return (Criteria) this; + } + + public Criteria andProposalNumberEqualTo(String value) { + addCriterion("proposal_number =", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberNotEqualTo(String value) { + addCriterion("proposal_number <>", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberGreaterThan(String value) { + addCriterion("proposal_number >", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberGreaterThanOrEqualTo(String value) { + addCriterion("proposal_number >=", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberLessThan(String value) { + addCriterion("proposal_number <", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberLessThanOrEqualTo(String value) { + addCriterion("proposal_number <=", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberLike(String value) { + addCriterion("proposal_number like", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberNotLike(String value) { + addCriterion("proposal_number not like", value, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberIn(List values) { + addCriterion("proposal_number in", values, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberNotIn(List values) { + addCriterion("proposal_number not in", values, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberBetween(String value1, String value2) { + addCriterion("proposal_number between", value1, value2, "proposalNumber"); + return (Criteria) this; + } + + public Criteria andProposalNumberNotBetween(String value1, String value2) { + addCriterion("proposal_number not between", value1, value2, "proposalNumber"); + return (Criteria) this; + } + public Criteria andGetStatusIsNull() { addCriterion("get_status is null"); return (Criteria) this; diff --git a/src/main/java/com/sztzjy/money_management/entity/WorkSchedule.java b/src/main/java/com/sztzjy/money_management/entity/WorkSchedule.java new file mode 100644 index 0000000..d5be08e --- /dev/null +++ b/src/main/java/com/sztzjy/money_management/entity/WorkSchedule.java @@ -0,0 +1,77 @@ +package com.sztzjy.money_management.entity; + +import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; +/** + * + * @author xcj + * work_schedule + */ +public class WorkSchedule { + @ApiModelProperty("工作日程ID") + private String workScheduleId; + + @ApiModelProperty("用户ID") + private String userId; + + @ApiModelProperty("客户姓名") + private String clientName; + + @ApiModelProperty("预约时间") + private Date orderTime; + + @ApiModelProperty("服务类型") + private String serviceType; + + @ApiModelProperty("计划内容") + private String content; + + public String getWorkScheduleId() { + return workScheduleId; + } + + public void setWorkScheduleId(String workScheduleId) { + this.workScheduleId = workScheduleId == null ? null : workScheduleId.trim(); + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } + + public String getClientName() { + return clientName; + } + + public void setClientName(String clientName) { + this.clientName = clientName == null ? null : clientName.trim(); + } + + public Date getOrderTime() { + return orderTime; + } + + public void setOrderTime(Date orderTime) { + this.orderTime = orderTime; + } + + public String getServiceType() { + return serviceType; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType == null ? null : serviceType.trim(); + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content == null ? null : content.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/money_management/entity/WorkScheduleExample.java b/src/main/java/com/sztzjy/money_management/entity/WorkScheduleExample.java new file mode 100644 index 0000000..6f03301 --- /dev/null +++ b/src/main/java/com/sztzjy/money_management/entity/WorkScheduleExample.java @@ -0,0 +1,610 @@ +package com.sztzjy.money_management.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WorkScheduleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WorkScheduleExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andWorkScheduleIdIsNull() { + addCriterion("work_schedule_id is null"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdIsNotNull() { + addCriterion("work_schedule_id is not null"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdEqualTo(String value) { + addCriterion("work_schedule_id =", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdNotEqualTo(String value) { + addCriterion("work_schedule_id <>", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdGreaterThan(String value) { + addCriterion("work_schedule_id >", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdGreaterThanOrEqualTo(String value) { + addCriterion("work_schedule_id >=", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdLessThan(String value) { + addCriterion("work_schedule_id <", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdLessThanOrEqualTo(String value) { + addCriterion("work_schedule_id <=", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdLike(String value) { + addCriterion("work_schedule_id like", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdNotLike(String value) { + addCriterion("work_schedule_id not like", value, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdIn(List values) { + addCriterion("work_schedule_id in", values, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdNotIn(List values) { + addCriterion("work_schedule_id not in", values, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdBetween(String value1, String value2) { + addCriterion("work_schedule_id between", value1, value2, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andWorkScheduleIdNotBetween(String value1, String value2) { + addCriterion("work_schedule_id not between", value1, value2, "workScheduleId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andClientNameIsNull() { + addCriterion("client_name is null"); + return (Criteria) this; + } + + public Criteria andClientNameIsNotNull() { + addCriterion("client_name is not null"); + return (Criteria) this; + } + + public Criteria andClientNameEqualTo(String value) { + addCriterion("client_name =", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameNotEqualTo(String value) { + addCriterion("client_name <>", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameGreaterThan(String value) { + addCriterion("client_name >", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameGreaterThanOrEqualTo(String value) { + addCriterion("client_name >=", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameLessThan(String value) { + addCriterion("client_name <", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameLessThanOrEqualTo(String value) { + addCriterion("client_name <=", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameLike(String value) { + addCriterion("client_name like", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameNotLike(String value) { + addCriterion("client_name not like", value, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameIn(List values) { + addCriterion("client_name in", values, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameNotIn(List values) { + addCriterion("client_name not in", values, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameBetween(String value1, String value2) { + addCriterion("client_name between", value1, value2, "clientName"); + return (Criteria) this; + } + + public Criteria andClientNameNotBetween(String value1, String value2) { + addCriterion("client_name not between", value1, value2, "clientName"); + return (Criteria) this; + } + + public Criteria andOrderTimeIsNull() { + addCriterion("order_time is null"); + return (Criteria) this; + } + + public Criteria andOrderTimeIsNotNull() { + addCriterion("order_time is not null"); + return (Criteria) this; + } + + public Criteria andOrderTimeEqualTo(Date value) { + addCriterion("order_time =", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeNotEqualTo(Date value) { + addCriterion("order_time <>", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeGreaterThan(Date value) { + addCriterion("order_time >", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeGreaterThanOrEqualTo(Date value) { + addCriterion("order_time >=", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeLessThan(Date value) { + addCriterion("order_time <", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeLessThanOrEqualTo(Date value) { + addCriterion("order_time <=", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeIn(List values) { + addCriterion("order_time in", values, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeNotIn(List values) { + addCriterion("order_time not in", values, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeBetween(Date value1, Date value2) { + addCriterion("order_time between", value1, value2, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeNotBetween(Date value1, Date value2) { + addCriterion("order_time not between", value1, value2, "orderTime"); + return (Criteria) this; + } + + public Criteria andServiceTypeIsNull() { + addCriterion("service_type is null"); + return (Criteria) this; + } + + public Criteria andServiceTypeIsNotNull() { + addCriterion("service_type is not null"); + return (Criteria) this; + } + + public Criteria andServiceTypeEqualTo(String value) { + addCriterion("service_type =", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeNotEqualTo(String value) { + addCriterion("service_type <>", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeGreaterThan(String value) { + addCriterion("service_type >", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeGreaterThanOrEqualTo(String value) { + addCriterion("service_type >=", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeLessThan(String value) { + addCriterion("service_type <", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeLessThanOrEqualTo(String value) { + addCriterion("service_type <=", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeLike(String value) { + addCriterion("service_type like", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeNotLike(String value) { + addCriterion("service_type not like", value, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeIn(List values) { + addCriterion("service_type in", values, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeNotIn(List values) { + addCriterion("service_type not in", values, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeBetween(String value1, String value2) { + addCriterion("service_type between", value1, value2, "serviceType"); + return (Criteria) this; + } + + public Criteria andServiceTypeNotBetween(String value1, String value2) { + addCriterion("service_type not between", value1, value2, "serviceType"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/money_management/entity/dto/SynthesisPlanScoreDto.java b/src/main/java/com/sztzjy/money_management/entity/dto/SynthesisPlanScoreDto.java new file mode 100644 index 0000000..6a353e2 --- /dev/null +++ b/src/main/java/com/sztzjy/money_management/entity/dto/SynthesisPlanScoreDto.java @@ -0,0 +1,27 @@ +package com.sztzjy.money_management.entity.dto; + +import com.github.pagehelper.PageInfo; +import com.sztzjy.money_management.entity.SynthesisPlanScore; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + + +@Data +@NoArgsConstructor +public class SynthesisPlanScoreDto { + @ApiModelProperty("姓名") + private String name; + + @ApiModelProperty("学号") + private String studentId; + + @ApiModelProperty("客户背景") + private String customerBackdrop; + + @ApiModelProperty("客户成绩") + private Double totalScore; + + @ApiModelProperty("审核内容") + private PageInfo content; +} diff --git a/src/main/java/com/sztzjy/money_management/entity/dto/UserStatisticsDto.java b/src/main/java/com/sztzjy/money_management/entity/dto/UserStatisticsDto.java new file mode 100644 index 0000000..13fd05b --- /dev/null +++ b/src/main/java/com/sztzjy/money_management/entity/dto/UserStatisticsDto.java @@ -0,0 +1,21 @@ +package com.sztzjy.money_management.entity.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +public class UserStatisticsDto { + @ApiModelProperty("已有客户总数") + private Integer yiYouTotalCount; + + @ApiModelProperty("潜在客户总数") + private Integer qianZaiTotalCount; + + @ApiModelProperty("高净值已有客户总数") + private Integer highNetClientHaveCount; + + @ApiModelProperty("高净值潜在客户总数") + private Integer highNetClientLatentCount; +} diff --git a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java index d9c882c..d22c942 100644 --- a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java +++ b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java @@ -6,6 +6,8 @@ import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + @Mapper public interface SynthesisPlanClientMapper { long countByExample(SynthesisPlanClientExample example); @@ -29,4 +31,10 @@ public interface SynthesisPlanClientMapper { int updateByPrimaryKeySelective(SynthesisPlanClient record); int updateByPrimaryKey(SynthesisPlanClient record); + + @Select("select count(*) from synthesis_plan_client where user_id=#{userId}") + Integer selectQianZaiTotalCount(@Param("userId") String userId); + + @Select("select count(*) from synthesis_plan_client where user_id=#{userId} and submit_status='已审核'") + Integer selectYiYouTotalCount(String userId); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java index 1e84c5e..597651b 100644 --- a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java +++ b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java @@ -8,6 +8,8 @@ import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + @Mapper public interface SynthesisPlanScoreMapper { long countByExample(SynthesisPlanScoreExample example); @@ -37,4 +39,7 @@ public interface SynthesisPlanScoreMapper { int updateByPrimaryKeyWithBLOBs(SynthesisPlanScoreWithBLOBs record); int updateByPrimaryKey(SynthesisPlanScore record); + + @Select("SELECT SUM(score) FROM synthesis_plan_score WHERE user_id=#{userId} AND case_id=#{caseId}") + Double getTotalScore(@Param("userId") String userId,@Param("caseId") String caseId); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/money_management/mapper/WorkScheduleMapper.java b/src/main/java/com/sztzjy/money_management/mapper/WorkScheduleMapper.java new file mode 100644 index 0000000..0c10ff6 --- /dev/null +++ b/src/main/java/com/sztzjy/money_management/mapper/WorkScheduleMapper.java @@ -0,0 +1,32 @@ +package com.sztzjy.money_management.mapper; + +import com.sztzjy.money_management.entity.WorkSchedule; +import com.sztzjy.money_management.entity.WorkScheduleExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface WorkScheduleMapper { + long countByExample(WorkScheduleExample example); + + int deleteByExample(WorkScheduleExample example); + + int deleteByPrimaryKey(String workScheduleId); + + int insert(WorkSchedule record); + + int insertSelective(WorkSchedule record); + + List selectByExample(WorkScheduleExample example); + + WorkSchedule selectByPrimaryKey(String workScheduleId); + + int updateByExampleSelective(@Param("record") WorkSchedule record, @Param("example") WorkScheduleExample example); + + int updateByExample(@Param("record") WorkSchedule record, @Param("example") WorkScheduleExample example); + + int updateByPrimaryKeySelective(WorkSchedule record); + + int updateByPrimaryKey(WorkSchedule record); +} \ No newline at end of file diff --git a/src/main/resources/mapper/SynthesisPlanClientMapper.xml b/src/main/resources/mapper/SynthesisPlanClientMapper.xml index c90e450..da78799 100644 --- a/src/main/resources/mapper/SynthesisPlanClientMapper.xml +++ b/src/main/resources/mapper/SynthesisPlanClientMapper.xml @@ -8,6 +8,8 @@ + + @@ -84,9 +86,10 @@ - stu_client_id, caseid, userid, source, create_time, client_number, get_status, get_time, - name, namepy, age, year_income, idcard, phone_number, job, addr, telephone, email, - job_place, manage_money_matters_type, submit_status, use_time + stu_client_id, caseid, userid, source, create_time, client_number, proposal_name, + proposal_number, get_status, get_time, name, namepy, age, year_income, idcard, phone_number, + job, addr, telephone, email, job_place, manage_money_matters_type, submit_status, + use_time + select + + distinct + + + from work_schedule + + + + + order by ${orderByClause} + + + + + delete from work_schedule + where work_schedule_id = #{workScheduleId,jdbcType=VARCHAR} + + + delete from work_schedule + + + + + + insert into work_schedule (work_schedule_id, user_id, client_name, + order_time, service_type, content + ) + values (#{workScheduleId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{clientName,jdbcType=VARCHAR}, + #{orderTime,jdbcType=TIMESTAMP}, #{serviceType,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR} + ) + + + insert into work_schedule + + + work_schedule_id, + + + user_id, + + + client_name, + + + order_time, + + + service_type, + + + content, + + + + + #{workScheduleId,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{clientName,jdbcType=VARCHAR}, + + + #{orderTime,jdbcType=TIMESTAMP}, + + + #{serviceType,jdbcType=VARCHAR}, + + + #{content,jdbcType=VARCHAR}, + + + + + + update work_schedule + + + work_schedule_id = #{record.workScheduleId,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + client_name = #{record.clientName,jdbcType=VARCHAR}, + + + order_time = #{record.orderTime,jdbcType=TIMESTAMP}, + + + service_type = #{record.serviceType,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=VARCHAR}, + + + + + + + + update work_schedule + set work_schedule_id = #{record.workScheduleId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + client_name = #{record.clientName,jdbcType=VARCHAR}, + order_time = #{record.orderTime,jdbcType=TIMESTAMP}, + service_type = #{record.serviceType,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=VARCHAR} + + + + + + update work_schedule + + + user_id = #{userId,jdbcType=VARCHAR}, + + + client_name = #{clientName,jdbcType=VARCHAR}, + + + order_time = #{orderTime,jdbcType=TIMESTAMP}, + + + service_type = #{serviceType,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=VARCHAR}, + + + where work_schedule_id = #{workScheduleId,jdbcType=VARCHAR} + + + update work_schedule + set user_id = #{userId,jdbcType=VARCHAR}, + client_name = #{clientName,jdbcType=VARCHAR}, + order_time = #{orderTime,jdbcType=TIMESTAMP}, + service_type = #{serviceType,jdbcType=VARCHAR}, + content = #{content,jdbcType=VARCHAR} + where work_schedule_id = #{workScheduleId,jdbcType=VARCHAR} + + + \ No newline at end of file