| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 语音任务结果明细Controller |
| | |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setId(serviceSubTaskDetailReq.getSubId()); |
| | | serviceSubtask.setRemark("数据补充完成"); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setPreachform("1"); |
| | | serviceSubtask.setResult("success"); |
| | | aBoolean = serviceSubtaskService.updateServiceSubtask(serviceSubtask); |
| | | } |
| | |
| | | /** |
| | | * 宣教形式 : 1,短信、2,线下、3,语音、4,视频、5,纸质 6.链接 7.钉钉 8.微信 |
| | | */ |
| | | @Excel(name = " 宣教形式 : 1,短信、2,线下、3,语音、4,视频、5,纸质 6.二维码 7.钉钉 8.微信") |
| | | @ApiModelProperty("宣教形式 : 1,短信、2,线下、3,语音、4,视频、5,纸质 6.链接 7.钉钉 8.微信") |
| | | @Excel(name = " 任务形式 1,人工 2,纸质 3,电话 4,短信 5.微信公众号 6.微信小程序 7.支付宝 8.智能小程序 9.钉钉") |
| | | @ApiModelProperty("宣教形式 : 任务形式 1,人工 2,纸质 3,电话 4,短信 5.微信公众号 6.微信小程序 7.支付宝 8.智能小程序 9.钉钉") |
| | | private String preachform; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public List<BaseTag> selectBaseTagList(BaseTag baseTag); |
| | | |
| | | public List<BaseTag> selectBaseTagListByTagname(BaseTag baseTag); |
| | | |
| | | /** |
| | | * 新增标签 |
| | | * |
| | |
| | | patArchivetag.setGuid(patArchiveVO.getGuid()); |
| | | patArchivetag.setOrgid(patArchiveVO.getOrgid()); |
| | | if (patArchivetag.getIsoperation() != null && patArchivetag.getIsoperation() == 1 || patArchivetag.getIsoperation() == null && patArchiveVO.getIsoperation() == 1) { |
| | | //判断一下base_tag里是不是存在,如果不存在,先新增 |
| | | BaseTag baseTag = new BaseTag(); |
| | | baseTag.setTagname(patArchivetag.getTagname().trim()); |
| | | List<BaseTag> baseTags = baseTagMapper.selectBaseTagListByTagname(baseTag); |
| | | if (CollectionUtils.isEmpty(baseTags)) { |
| | | //先给放到未分类中 |
| | | baseTag.setTagcategoryid(6L); |
| | | baseTag.setOrgid(patArchiveVO.getOrgid()); |
| | | baseTag.setDelFlag("0"); |
| | | baseTag.setUpdateTime(new Date()); |
| | | baseTag.setCreateTime(new Date()); |
| | | baseTagMapper.insertBaseTag(baseTag); |
| | | patArchivetag.setTagid(baseTag.getTagid()); |
| | | } else { |
| | | patArchivetag.setTagid(baseTags.get(0).getTagid()); |
| | | } |
| | | //新增 |
| | | patArchivetag.setUpdateBy(null); |
| | | patArchivetag.setCreateTime(new Date()); |
| | |
| | | @Override |
| | | public List<ServiceSubtask> patItem(ServiceSubtaskVO serviceSubtaskVO) { |
| | | List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskVO); |
| | | //根据出院 时间倒序 |
| | | List<ServiceSubtask> sortedServiceSubtaskList = null; |
| | | if (serviceSubtaskVO.getSort() == null || serviceSubtaskVO.getSort() == 0) |
| | | sortedServiceSubtaskList = selectServiceSubtaskList.stream().sorted(Comparator.comparing(ServiceSubtask::getEndtime, Comparator.nullsLast(Comparator.naturalOrder()))).collect(Collectors.toList()); |
| | | if (serviceSubtaskVO.getSort() != null && serviceSubtaskVO.getSort() == 1) |
| | | sortedServiceSubtaskList = selectServiceSubtaskList.stream().sorted(Comparator.comparing(ServiceSubtask::getEndtime, Comparator.nullsLast(Comparator.naturalOrder())).reversed()).collect(Collectors.toList()); |
| | | if (serviceSubtaskVO.getSort() != null && serviceSubtaskVO.getSort() == 2) |
| | | sortedServiceSubtaskList = selectServiceSubtaskList.stream().sorted(Comparator.comparing(ServiceSubtask::getLongSendTime, Comparator.nullsLast(Comparator.naturalOrder()))).collect(Collectors.toList()); |
| | | if (serviceSubtaskVO.getSort() != null && serviceSubtaskVO.getSort() == 3) |
| | | sortedServiceSubtaskList = selectServiceSubtaskList.stream().sorted(Comparator.comparing(ServiceSubtask::getLongSendTime, Comparator.nullsLast(Comparator.naturalOrder())).reversed()).collect(Collectors.toList()); |
| | | |
| | | return sortedServiceSubtaskList; |
| | | return selectServiceSubtaskList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | <if test="isenable != null ">and isenable = #{isenable}</if> |
| | | </where> |
| | | </select> |
| | | <select id="selectBaseTagListByTagname" parameterType="com.smartor.domain.BaseTag" resultMap="BaseTagResult"> |
| | | <include refid="selectBaseTagVo"/> |
| | | <where> |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="tagname != null and tagname != ''">and tagname =#{tagname}</if> |
| | | <if test="tagdescription != null and tagdescription != ''">and tagdescription = #{tagdescription}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="isenable != null ">and isenable = #{isenable}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBaseTagByTagid" parameterType="Long" resultMap="BaseTagResult"> |
| | | <include refid="selectBaseTagVo"/> |
| | |
| | | <if test="createBy != null">and create_by = #{createBy}</if> |
| | | <if test="taskGuid != null">and task_guid = #{taskGuid}</if> |
| | | </where> |
| | | <if test="serviceType != null and serviceType != ''and serviceType != '2'and serviceType != '3'">order by |
| | | long_send_time desc |
| | | </if> |
| | | <if test="serviceType != null and serviceType != ''and serviceType == '2'">order by endtime desc</if> |
| | | <if test="serviceType != null and serviceType != ''and serviceType == '3'">order by admindate desc</if> |
| | | <if test="sort != null and sort==0">order by endtime asc</if> |
| | | <if test="sort != null and sort==1">order by endtime desc</if> |
| | | <if test="sort != null and sort==2">order by long_send_time asc</if> |
| | | <if test="sort != null and sort==3">order by long_send_time desc</if> |
| | | <if test="sort != null and sort==5">order by admindate asc</if> |
| | | <if test="sort != null and sort==6">order by admindate desc</if> |
| | | |
| | | <!-- order by update_time desc,id desc --> |
| | | </select> |
| | | |