Merge remote-tracking branch 'origin/test' into txb
| | |
| | | public class ComActQuestnaireSubVO { |
| | | @ApiModelProperty("id") |
| | | private Long id; |
| | | @ApiModelProperty("类型 0单选1多选2问答题") |
| | | @ApiModelProperty("类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框") |
| | | private int type; |
| | | @ApiModelProperty("题目内容") |
| | | private String content; |
| | |
| | | private Date updateAt; |
| | | |
| | | @ApiModelProperty(value = "身份证") |
| | | @Sensitive(strategy = SensitiveStrategy.ID_CARD) |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | |
| | | private int sort; |
| | | @ApiModelProperty(value = "题目内容") |
| | | private String label; |
| | | @ApiModelProperty(value = "类型 0 单选 1 多选 2 输入框 2姓名输入框 3 手机号 4 身份证 5 文字描述 6 日期选择", example = "0") |
| | | @ApiModelProperty(value = "类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框", example = "0") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "问卷题目选项") |
| | | private List<QuestnaiteSubSelectionVO> options; |
| | |
| | | private String values; |
| | | |
| | | /** |
| | | * 0单选1多选2问答题 |
| | | * 类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 |
| | | */ |
| | | public interface type { |
| | | int danxuan = 0; |
| | | int duoxuan = 1; |
| | | int wenda = 2; |
| | | int phone = 3; |
| | | int card = 4; |
| | | int describe = 5; |
| | | int date = 6; |
| | | int time = 7; |
| | | int input = 8; |
| | | int name = 9; |
| | | } |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("回答内容") |
| | | private String answerContent; |
| | | |
| | | @ApiModelProperty("类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框") |
| | | private Integer type; |
| | | } |
| | |
| | | @ApiModelProperty("题目内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty("类型 0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框") |
| | | private Integer type; |
| | | |
| | | public ComActReserveSubListVO() { |
| | | } |
| | | |
| | |
| | | head1.add("登记时间"); |
| | | headList.add(head1); |
| | | subVOList.forEach(sub -> { |
| | | if(sub.getType() != 5){ |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | headn.add(sub.getContent()); |
| | | headList.add(headn); |
| | | } |
| | | }); |
| | | List<List<Object>> datalist = new ArrayList<>(); |
| | | List<ComActQuestnaireAnswerContentVO> answerContentVOList = questnaireAnswersDTOS.getAnswers(); |
| | |
| | | StringBuffer sb = new StringBuffer(); |
| | | Boolean isDX = false; |
| | | for (ComActQuestnaireAnswerContentVO userAnswers:usersAnswers) { |
| | | if (userAnswers.getOptionType().equals(5)){ |
| | | continue; |
| | | } |
| | | if(reserveRecordId == null){ |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | |
| | | + " left join com_act_questnaire_user_answer as caqua on caqua.questnaire_id = caq.id and caqua.user_id = #{pageQuestnaireDTO.userId} " |
| | | + "WHERE " + " caq.state IN ( 2, 3 ) " |
| | | + " AND caq.community_id = #{pageQuestnaireDTO.communityId} and caq.is_hide = 0 " + "ORDER BY " |
| | | + " caq.state ASC, " + " isAnswer desc, " + " caq.create_at DESC" + "</script>") |
| | | + " caq.state ASC, " + " isAnswer ASC, " + " caq.create_at DESC" + "</script>") |
| | | IPage<QuestnaireListVo> selectPageList(Page page, @Param("pageQuestnaireDTO") PageQuestnaireDTO pageQuestnaireDTO); |
| | | |
| | | @Select("<script>" |
| | |
| | | + " left join com_elders_auth e on t.id = e.id " + " LEFT JOIN sys_user u ON e.SUMIT_USER_ID = u.user_id " |
| | | + "<where>" + " <if test='pageEldersAuthRecordDTO.name!=null'>\n" |
| | | + " AND e.AUTH_USER_NAME like concat('%', #{pageEldersAuthRecordDTO.name}, '%')" + "</if>" |
| | | + " <if test='pageEldersAuthRecordDTO.idCard!=null'>\n" |
| | | + " AND e.ID_CARD like concat('%', #{pageEldersAuthRecordDTO.idCard}, '%')\n" + "</if>" |
| | | + " <if test='pageEldersAuthRecordDTO.idCard!=null and pageEldersAuthRecordDTO.idCard!=""'>\n" |
| | | + " AND e.ID_CARD = #{pageEldersAuthRecordDTO.idCard}\n" + "</if>" |
| | | + " <if test='pageEldersAuthRecordDTO.type!=null'>\n" + " AND e.type = #{pageEldersAuthRecordDTO.type}\n" |
| | | + "</if>" + " <if test='pageEldersAuthRecordDTO.month!=null'>\n" |
| | | + " AND month(e.CREATE_AT) = #{pageEldersAuthRecordDTO.month}\n" + "</if>\n" + "</where>\n" |
| | |
| | | String feedbackPhotoPathList = comActMicroWishVO.getFeedbackPhotoPathList(); |
| | | ComActMicroWishDO comActMicroWishDO=new ComActMicroWishDO(); |
| | | comActMicroWishDO.setId(id); |
| | | Boolean isUpdate = false; |
| | | Date date = new Date(); |
| | | ComActMicroWishOperationRecordDO comActMicroWishOperationRecordDO=new ComActMicroWishOperationRecordDO(); |
| | | comActMicroWishOperationRecordDO.setCreateTime(date); |
| | |
| | | // 1 审核通过 2驳回 3分配人员 4发起活动 5反馈 |
| | | switch (type){ |
| | | case 1: |
| | | isUpdate = true; |
| | | if(!microWishDO.getStatus().equals(ComActMicroWishDO.status.dsh)){ |
| | | return R.fail("该微心愿已审核,不可重复审核"); |
| | | } |
| | |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | break; |
| | | case 2: |
| | | isUpdate = true; |
| | | if(!microWishDO.getStatus().equals(ComActMicroWishDO.status.dsh)){ |
| | | return R.fail("该微心愿已审核,不可重复审核"); |
| | | } |
| | |
| | | comActMicroWishOperationRecordMapper.insert(comActMicroWishOperationRecordDO); |
| | | break; |
| | | case 3: |
| | | isUpdate = true; |
| | | comActMicroWishDO.setDistributionAt(date); |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);//进行中 |
| | | comActMicroWishDO.setForm(1); |
| | | break; |
| | | case 4: |
| | | isUpdate = true; |
| | | comActMicroWishDO.setDistributionAt(date); |
| | | comActMicroWishDO.setResponsibleId(responsibleId); |
| | | comActMicroWishDO.setStatus(3);//待确认 |
| | |
| | | comActMicroWishFeedbackDO.setMicroId(comActMicroWishVO.getId()); |
| | | comActMicroWishFeedbackDO.setUserId(comActMicroWishVO.getUserId()); |
| | | if(comActMicroWishVO.getStatus() != null && comActMicroWishVO.getStatus().equals(ComActMicroWishDO.status.ywc)){ |
| | | comActMicroWishDO.setStatus(comActMicroWishVO.getStatus()); |
| | | isUpdate = true; |
| | | comActMicroWishDO.setStatus(ComActMicroWishDO.status.ywc); |
| | | comActMicroWishDO.setFinishAt(date); |
| | | comActMicroWishDO.setFinish(feedback); |
| | | comActMicroWishDO.setFinishPhotoPathList(feedbackPhotoPathList); |
| | |
| | | // comActMicroWishDO.setStatus(3); |
| | | // } |
| | | comActMicroWishFeedbackMapper.insert(comActMicroWishFeedbackDO); |
| | | return R.ok(); |
| | | default: |
| | | break; |
| | | } |
| | | if(isUpdate){ |
| | | int update = comActMicroWishDAO.updateById(comActMicroWishDO); |
| | | if (update>0) { |
| | | return R.ok(); |
| | | } |
| | | }else{ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | |
| | | List<ComActReserveSubDO> list = comActReserveSubMapper.selectList(new QueryWrapper<ComActReserveSubDO>().lambda().eq(ComActReserveSubDO::getReserveId, reserveId)); |
| | | List<ComActQuestnaireSubVO> listSubVo = new ArrayList<>(); |
| | | list.forEach(subDo -> { |
| | | if(!subDo.getType().equals(5)){ |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | } |
| | | }); |
| | | result.setSubs(listSubVo); |
| | | |
| | |
| | | List<ComActReserveRegisterDetailedAnswerVO> registerDetailedAnswerList = this.baseMapper.getRegisterDetailedAnswerList(registerDetailed.getId()); |
| | | if(!registerDetailedAnswerList.isEmpty()){ |
| | | for (ComActReserveRegisterDetailedAnswerVO detailed:registerDetailedAnswerList) { |
| | | if(!detailed.getType().equals(5)){ |
| | | map.put(detailed.getReserveSubId() + "",detailed.getAnswerContent()); |
| | | } |
| | | } |
| | | } |
| | | //渲染登记流水号 |
| | | map.put("id",registerDetailed.getId()); |
| | | //渲染登记时间 |
| | |
| | | if(comActReserveDO!=null){ |
| | | //查询当前用户是否已预约并判断是否能继续预约 |
| | | if(comActReserveDO.getJoinAllCount()!=0){ |
| | | Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId())); |
| | | Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>() |
| | | .eq("reserve_id",comActReserveCommitVO.getId()) |
| | | .eq("status",ComActReserveRecordDO.status.cg)); |
| | | if(count>=comActReserveDO.getJoinAllCount()){ |
| | | return R.fail("预约已上限"); |
| | | } |
| | | } |
| | | |
| | | |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId()).eq("user_id",comActReserveCommitVO.getUserId()).in("status",1,2,3)); |
| | | if(!list.isEmpty()&&list.size()>1&&comActReserveDO.getIsRepeat()==ComActReserveDO.isRepeat.no){ |
| | |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | }else{ |
| | | //文字描述不做处理 |
| | | if(!questnaiteSub.getType().equals(QuestnaiteSubVO.type.describe)){ |
| | | //问答题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | } |
| | | } |
| | | if(!answerContentList.isEmpty()){ |
| | | //更新回答用户数量 |
| | | Integer joinCount = comActReserveDO.getJoinCount(); |
| | |
| | | List<ComActReserveSubListVO> resultList = new ArrayList<>(100); |
| | | resultList.add(new ComActReserveSubListVO("nub","序号")); |
| | | resultList.add(new ComActReserveSubListVO("nickName","用户昵称")); |
| | | List<ComActReserveSubListVO> list = this.baseMapper.getReserveSubjectList(reserveId); |
| | | if(list != null && !list.isEmpty()){ |
| | | resultList.addAll(list); |
| | | List<ComActReserveSubListVO> subList = this.baseMapper.getReserveSubjectList(reserveId); |
| | | if(subList != null && !subList.isEmpty()){ |
| | | subList.forEach(list -> { |
| | | if(!list.getType().equals(5)){ |
| | | resultList.add(list); |
| | | } |
| | | }); |
| | | // resultList.addAll(list); |
| | | } |
| | | resultList.add(new ComActReserveSubListVO("id","登记流水")); |
| | | resultList.add(new ComActReserveSubListVO("time","登记时间")); |
| | |
| | | } |
| | | comEldersAuthElderlyDO.setIsExist(eldersAuthElderlyDTO.getIsExist()); |
| | | comEldersAuthElderlyDO.setIsBigAge(eldersAuthElderlyDTO.getIsBigAge()); |
| | | if (!ObjectUtils.isEmpty(eldersAuthElderlyDTO.getIdCard())) { |
| | | try { |
| | | String idCard = AESUtil.encrypt128(eldersAuthElderlyDTO.getIdCard(), aesKey); |
| | | comEldersAuthElderlyDO.setIdCard(idCard); |
| | | } catch (Exception exp) { |
| | | log.error("身份证转义失败"); |
| | | } |
| | | } |
| | | comEldersAuthElderlyDO.setIdCard(eldersAuthElderlyDTO.getIdCard()); |
| | | // if (!ObjectUtils.isEmpty(eldersAuthElderlyDTO.getIdCard())) { |
| | | // try { |
| | | // String idCard = AESUtil.encrypt128(eldersAuthElderlyDTO.getIdCard(), aesKey); |
| | | // comEldersAuthElderlyDO.setIdCard(idCard); |
| | | // } catch (Exception exp) { |
| | | // log.error("身份证转义失败"); |
| | | // } |
| | | // } |
| | | baseMapper.updateEldersAuthElderly(comEldersAuthElderlyDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | SELECT |
| | | count( id ) AS examineNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 2 AND community_id = #{communityId} AND del_tag = 0 ) AS verificationNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` in (2,4) AND `is_publicity` = 1 AND community_id = #{communityId} AND del_tag = 0 ) AS rejectNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` in (1,2,4) AND `is_publicity` = 1 AND community_id = #{communityId} AND del_tag = 0 ) AS rejectNum, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 4 AND community_id = #{communityId} AND del_tag = 0 ) AS completeNum, |
| | | (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 1) as yzAllTotal, |
| | | (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 1 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as yzDayTotal, |
| | |
| | | |
| | | <select id="getRegisterDetailedAnswerList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO"> |
| | | SELECT |
| | | car.content as reserveSubContent, carac.answer_content as answerContent,carac.reserve_sub_id as reserveSubId |
| | | car.content as reserveSubContent, carac.answer_content as answerContent,carac.reserve_sub_id as reserveSubId,car.`type` |
| | | FROM |
| | | com_act_reserve_answer_content AS carac |
| | | LEFT JOIN com_act_reserve_sub AS car ON car.id = carac.reserve_sub_id |
| | |
| | | </sql> |
| | | |
| | | <select id="getReserveSubjectList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveSubListVO"> |
| | | select id,content from com_act_reserve_sub where reserve_id = #{reserveId} order by id asc |
| | | select id,content,`type` from com_act_reserve_sub where reserve_id = #{reserveId} order by id asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="idCard !=null"> |
| | | id_card = #{idCard}, |
| | | </if> |
| | | update_at = now(), |
| | | </set> |
| | | |
| | | where id = #{id} |
| | | |
| | | </update> |
| | | |
| | | <delete id="deleteEldersAuthUserById"> |