修改潜在客户列表展示接口条件 题库列表新增 区分管理员和老师数据隔离 修改批量导入客观题逻辑 修改新增案例题接口 新增删除案例题等接口

master
xiaoCJ 6 months ago
parent b91ed33bca
commit 1e8f87d902

@ -49,10 +49,31 @@ public class CaseController {
@PostMapping("/insertOrUpdateInvestmentPlan")
@ApiOperation("新增/编辑案例,投资规划")
private ResultEntity<HttpStatus> insertOrUpdateInvestmentPlan(@ApiParam("老师或管理员新增修改不传userId")@RequestBody CaseInvestmentPlanDto caseInvestmentPlanDto) {
private ResultEntity<HttpStatus> insertOrUpdateInvestmentPlan(@ApiParam("老师或管理员新增修改不传userId") @RequestBody CaseInvestmentPlanDto caseInvestmentPlanDto) {
return caseService.insertOrUpdateInvestmentPlan(caseInvestmentPlanDto);
}
@PostMapping("/deleteCase")
@ApiOperation("删除案例题")
private ResultEntity<HttpStatus> deleteCase(@RequestParam String caseId,
@ApiParam("管理员/老师")@RequestParam String role) {
CaseInfo caseInfo = caseInfoMapper.selectByPrimaryKey(caseId);
if (role.equals("老师")) {
if (caseInfo.getSource().equals("999999999")) {
return new ResultEntity<HttpStatus>(HttpStatus.BAD_REQUEST, "内置题目,无法删除");
}
caseInfoMapper.deleteByPrimaryKey(caseId);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "删除成功");
}
if (role.equals("管理员")) {
caseInfoMapper.deleteByPrimaryKey(caseId);
return new ResultEntity<HttpStatus>(HttpStatus.OK, "删除成功");
}
return null;
}
@PostMapping("/ZHGHType")
@ApiOperation("综合规划下方展示类型")
@AnonymousAccess

@ -65,7 +65,8 @@ public class ProductCenter {
@PostMapping("selectBankDeposits")
@ApiOperation("银行储蓄查询")
@AnonymousAccess
public ResultEntity<PageInfo<BankDeposits>> selectBankDeposits(@RequestParam(required = false) String bankName, @RequestParam String schoolId,
public ResultEntity<PageInfo<BankDeposits>> selectBankDeposits(@RequestParam(required = false) String bankName,
@RequestParam String schoolId,
@RequestParam Integer index,
@RequestParam Integer size) {
PageHelper.startPage(index, size);

@ -58,9 +58,9 @@ public class TopicController {
if (!objectiveQuestion.getOutline().equals("普通题库") && StringUtils.isBlank(objectiveQuestion.getSubclass())) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "大纲子类不能为空!");
}
if (StringUtils.isBlank(objectiveQuestion.getChapterId()) || StringUtils.isBlank(objectiveQuestion.getChapterName())) {
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "所属章节信息不能为空!");
}
// if (StringUtils.isBlank(objectiveQuestion.getChapterId()) || StringUtils.isBlank(objectiveQuestion.getChapterName())) {
// return new ResultEntity<>(HttpStatus.BAD_REQUEST, "所属章节信息不能为空!");
// }
if (objectiveQuestion.getType() == 1 || objectiveQuestion.getType() == 0) {
if (StringUtils.isBlank(objectiveQuestion.getQuestionA()) || StringUtils.isBlank(objectiveQuestion.getQuestionB())
|| StringUtils.isBlank(objectiveQuestion.getQuestionC()) || StringUtils.isBlank(objectiveQuestion.getQuestionD()))
@ -141,12 +141,13 @@ public class TopicController {
@AnonymousAccess
private ResultEntity<PageInfo<ObjectiveQuestionWithBLOBs>> getObjectiveByType(@RequestParam Integer index,
@RequestParam Integer size,
@ApiParam("0单选1多选2判断") @RequestParam int type,
@ApiParam("0单选1多选2判断") @RequestParam(required = false) Integer type,
@ApiParam("普通题库/金融智能/银行从业") @RequestParam String outLine,
@ApiParam("理论知识/专业能力公共基础/个人理财/风险管理/公司信贷/个人贷款") @RequestParam(required = false) String subClass,
@RequestParam(required = false) String content) {
@RequestParam(required = false) String content,
@RequestParam(required = false) String schoolId) {
PageHelper.startPage(index, size);
List<ObjectiveQuestionWithBLOBs> list = objectiveQuestionMapper.getObjectiveByType(type, outLine, subClass, content);
List<ObjectiveQuestionWithBLOBs> list = objectiveQuestionMapper.getObjectiveByType(type, outLine, subClass, content,schoolId);
PageInfo pageInfo = new PageInfo(list);
return new ResultEntity<PageInfo<ObjectiveQuestionWithBLOBs>>(pageInfo);
}
@ -165,8 +166,8 @@ public class TopicController {
@AnonymousAccess
private ResultEntity<List<ObjectiveQuestionDto>> getObjectiveRecord(@RequestParam String chapterId,
@RequestParam String trainingId,
@ApiParam("重新作答按钮传true")@RequestParam boolean flag) {
List<ObjectiveQuestionDto> list = objectiveQuestionService.getObjectiveRecord(chapterId, trainingId,flag);
@ApiParam("重新作答按钮传true") @RequestParam boolean flag) {
List<ObjectiveQuestionDto> list = objectiveQuestionService.getObjectiveRecord(chapterId, trainingId, flag);
return new ResultEntity<List<ObjectiveQuestionDto>>(list);
}

@ -43,10 +43,11 @@ public interface ObjectiveQuestionMapper {
List<TopicDto> getObjectiveCountByChapterId(@Param("outLine") String outLine,
@Param("chapterId") String chapterId);
List<ObjectiveQuestionWithBLOBs> getObjectiveByType(@Param("type") int type,
List<ObjectiveQuestionWithBLOBs> getObjectiveByType(@Param("type") Integer type,
@Param("outLine") String outLine,
@Param("subClass") String subClass,
@Param("content") String content);
@Param("content") String content,
@Param("schoolId") String schoolId);
int batchDelete(@Param("list") List<String> objectiveQuestionId);

@ -361,7 +361,7 @@ public class CaseServiceImpl implements CaseService {
}
if (type.equals("生涯规划-消费规划")) {
CaseConsumptionPlanWithBLOBs caseConsumptionPlan = gson.fromJson(json, CaseConsumptionPlanWithBLOBs.class);
CaseConsumptionPlan caseConsumptionPlan = gson.fromJson(json, CaseConsumptionPlan.class);
if (StringUtils.isBlank(caseConsumptionPlan.getCaseConsumptionPlanId())) {
caseConsumptionPlan.setCaseConsumptionPlanId(IdUtil.randomUUID());
caseConsumptionPlanMapper.insert(caseConsumptionPlan);
@ -2006,7 +2006,7 @@ public class CaseServiceImpl implements CaseService {
} else {
criteria.andUserIdEqualTo(userId);
}
List<CaseConsumptionPlan> CaseConsumptionPlans = caseConsumptionPlanMapper.selectByExampleWithBLOBs(example);
List<CaseConsumptionPlan> CaseConsumptionPlans = caseConsumptionPlanMapper.selectByExample(example);
if (CaseConsumptionPlans == null || CaseConsumptionPlans.isEmpty()) {
return null;
}

@ -12,7 +12,6 @@ import com.sztzjy.money_management.service.ObjectiveQuestionService;
import com.sztzjy.money_management.util.ResultEntity;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.hibernate.event.spi.SaveOrUpdateEvent;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@ -114,7 +113,13 @@ public class ObjectiveQuestionServiceImpl implements ObjectiveQuestionService {
}
objectiveQuestionList.add(obj);
}
if (objectiveQuestionList.isEmpty()) {
return new ResultEntity<>(HttpStatus.INTERNAL_SERVER_ERROR, "数据为空");
}
int result = objectiveQuestionMapper.insertBatch(objectiveQuestionList);
if (result > 0) {
return new ResultEntity<>(HttpStatus.OK, "批量导入成功!");
} else {

@ -478,6 +478,9 @@
<if test="subClass !=null and subClass !=''">
and subclass = #{subClass}
</if>
<if test="schoolId !=null and schoolId!=''">
and source in ('999999999',#{schoolId})
</if>
</where>
</select>

@ -2,31 +2,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.money_management.mapper.SynthesisPlanClientMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.money_management.entity.SynthesisPlanClient">
<id column="stu_client_id" jdbcType="VARCHAR" property="stuClientId" />
<result column="caseid" jdbcType="VARCHAR" property="caseid" />
<result column="userid" jdbcType="VARCHAR" property="userid" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="client_number" jdbcType="VARCHAR" property="clientNumber" />
<result column="proposal_name" jdbcType="VARCHAR" property="proposalName" />
<result column="proposal_number" jdbcType="VARCHAR" property="proposalNumber" />
<result column="get_status" jdbcType="VARCHAR" property="getStatus" />
<result column="get_time" jdbcType="TIMESTAMP" property="getTime" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="namepy" jdbcType="VARCHAR" property="namepy" />
<result column="age" jdbcType="INTEGER" property="age" />
<result column="year_income" jdbcType="DECIMAL" property="yearIncome" />
<result column="idcard" jdbcType="VARCHAR" property="idcard" />
<result column="phone_number" jdbcType="VARCHAR" property="phoneNumber" />
<result column="job" jdbcType="VARCHAR" property="job" />
<result column="addr" jdbcType="VARCHAR" property="addr" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="job_place" jdbcType="VARCHAR" property="jobPlace" />
<result column="manage_money_matters_type" jdbcType="VARCHAR" property="manageMoneyMattersType" />
<result column="submit_status" jdbcType="CHAR" property="submitStatus" />
<result column="use_time" jdbcType="DECIMAL" property="useTime" />
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
<id column="stu_client_id" jdbcType="VARCHAR" property="stuClientId"/>
<result column="caseid" jdbcType="VARCHAR" property="caseid"/>
<result column="userid" jdbcType="VARCHAR" property="userid"/>
<result column="source" jdbcType="VARCHAR" property="source"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="client_number" jdbcType="VARCHAR" property="clientNumber"/>
<result column="proposal_name" jdbcType="VARCHAR" property="proposalName"/>
<result column="proposal_number" jdbcType="VARCHAR" property="proposalNumber"/>
<result column="get_status" jdbcType="VARCHAR" property="getStatus"/>
<result column="get_time" jdbcType="TIMESTAMP" property="getTime"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="namepy" jdbcType="VARCHAR" property="namepy"/>
<result column="age" jdbcType="INTEGER" property="age"/>
<result column="year_income" jdbcType="DECIMAL" property="yearIncome"/>
<result column="idcard" jdbcType="VARCHAR" property="idcard"/>
<result column="phone_number" jdbcType="VARCHAR" property="phoneNumber"/>
<result column="job" jdbcType="VARCHAR" property="job"/>
<result column="addr" jdbcType="VARCHAR" property="addr"/>
<result column="telephone" jdbcType="VARCHAR" property="telephone"/>
<result column="email" jdbcType="VARCHAR" property="email"/>
<result column="job_place" jdbcType="VARCHAR" property="jobPlace"/>
<result column="manage_money_matters_type" jdbcType="VARCHAR" property="manageMoneyMattersType"/>
<result column="submit_status" jdbcType="CHAR" property="submitStatus"/>
<result column="use_time" jdbcType="DECIMAL" property="useTime"/>
<result column="school_id" jdbcType="VARCHAR" property="schoolId"/>
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -46,7 +46,8 @@
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
@ -75,7 +76,8 @@
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
@ -87,20 +89,22 @@
</where>
</sql>
<sql id="Base_Column_List">
stu_client_id, caseid, userid, source, create_time, client_number, proposal_name,
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, school_id
</sql>
<select id="selectByExample" parameterType="com.sztzjy.money_management.entity.SynthesisPlanClientExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="com.sztzjy.money_management.entity.SynthesisPlanClientExample"
resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
<include refid="Base_Column_List"/>
from synthesis_plan_client
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
@ -108,18 +112,19 @@
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
<include refid="Base_Column_List"/>
from synthesis_plan_client
where stu_client_id = #{stuClientId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from synthesis_plan_client
delete
from synthesis_plan_client
where stu_client_id = #{stuClientId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.money_management.entity.SynthesisPlanClientExample">
delete from synthesis_plan_client
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.money_management.entity.SynthesisPlanClient">
@ -299,10 +304,11 @@
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.money_management.entity.SynthesisPlanClientExample" resultType="java.lang.Long">
<select id="countByExample" parameterType="com.sztzjy.money_management.entity.SynthesisPlanClientExample"
resultType="java.lang.Long">
select count(*) from synthesis_plan_client
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
@ -385,7 +391,7 @@
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
@ -416,7 +422,7 @@
use_time = #{record.useTime,jdbcType=DECIMAL},
school_id = #{record.schoolId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.money_management.entity.SynthesisPlanClient">
@ -529,9 +535,10 @@
<select id="getPotentialCustomerList" resultMap="BaseResultMap">
SELECT * FROM synthesis_plan_client
WHERE get_status = 'true'
AND (submit_status IN ('未提交', '未审核') OR submit_status IS NULL)
<if test="keyWord !=null and keyWord !=''">
AND submit_status is not '已审核'
AND name LIKE CONCAT ('%',#{keyWord},'%')
AND
name LIKE CONCAT ('%',#{keyWord},'%')
OR idcard LIKE CONCAT ('%',#{keyWord},'%')
OR client_number LIKE CONCAT ('%',#{keyWord},'%')
</if>

Loading…
Cancel
Save