Merge branch 'master' into master-手术随访
已重命名1个文件
已修改16个文件
已添加1个文件
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.github.pagehelper.ISelect; |
| | | import com.github.pagehelper.Page; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.PreachFormEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.utils.reflect.ReflectUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysUserDeptService; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO; |
| | | import com.smartor.domain.VO.ServiceSubtaskVO; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import com.smartor.mapper.PatMedInhospMapper; |
| | | import com.smartor.mapper.PatMedOuthospMapper; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import com.smartor.service.impl.ServiceSubtaskServiceImpl; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import net.bytebuddy.implementation.bytecode.Throw; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.web.bind.WebDataBinder; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.DecimalFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @RestController |
| | | @RequestMapping("/smartor/serviceSubtask") |
| | | public class ServiceSubtaskController extends BaseController { |
| | | @InitBinder |
| | | public void initBinder(WebDataBinder binder) { |
| | | binder.setAutoGrowCollectionLimit(1024); // æ 2048ã4096 ç |
| | | } |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskService serviceSubtaskService; |
| | | |
| | |
| | | // ç´æ¥ä»å·²æèåç»ææ¨ç®totalï¼é¿å
廿å页ååå
¨éæ¥ä¸é大表 |
| | | long total = 0L; |
| | | try { |
| | | long wzx = map.get("wzx") != null ? ((Number) map.get("wzx")).longValue() : 0L; |
| | | long ysf = map.get("ysf") != null ? ((Number) map.get("ysf")).longValue() : 0L; |
| | | long dsf = map.get("dsf") != null ? ((Number) map.get("dsf")).longValue() : 0L; |
| | | long yc = map.get("yc") != null ? ((Number) map.get("yc")).longValue() : 0L; |
| | | long jg = map.get("jg") != null ? ((Number) map.get("jg")).longValue() : 0L; |
| | | long fssb = map.get("fssb") != null ? ((Number) map.get("fssb")).longValue() : 0L; |
| | | long yfs = map.get("yfs") != null ? ((Number) map.get("yfs")).longValue() : 0L; |
| | | long blq = map.get("blq") != null ? ((Number) map.get("blq")).longValue() : 0L; |
| | | total = wzx + ysf + dsf + yc + jg + fssb + yfs + blq; |
| | | // * wzx: æªæ§è¡æ°é |
| | | // * ysf: å·²é访æ°é |
| | | // * fssb: åé失败æ°é |
| | | // * yfs: å·²åéæ°é |
| | | // * dsf: å¾
é访æ°é |
| | | |
| | | // long wzx = map.get("wzx") != null ? ((Number) map.get("wzx")).longValue() : 0L; |
| | | // long ysf = map.get("ysf") != null ? ((Number) map.get("ysf")).longValue() : 0L; |
| | | // long dsf = map.get("dsf") != null ? ((Number) map.get("dsf")).longValue() : 0L; |
| | | // long fssb = map.get("fssb") != null ? ((Number) map.get("fssb")).longValue() : 0L; |
| | | total = map.get("total") != null ? ((Number) map.get("total")).longValue() : 0L; |
| | | |
| | | } catch (Exception e) { |
| | | // å
åºï¼å
¨écount |
| | | serviceSubtaskEntity.setPageNum(null); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:export')") |
| | | @Log(title = "åä¸ä»»å¡ï¼é访宣æï¼", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/patItemExport") |
| | | public void patItemExport(HttpServletResponse response, @RequestBody ServiceSubtaskEntity serviceSubtaskVO) { |
| | | public void patItemExport(HttpServletResponse response, ServiceSubtaskEntity serviceSubtaskVO) { |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | serviceSubtaskVO.setOrgid(user.getOrgid()); |
| | | List<ServiceSubtaskRes> serviceSubtaskList = null; |
| | | if (serviceSubtaskVO != null) { |
| | | if (serviceSubtaskVO.getPageNum() != null && serviceSubtaskVO.getPageSize() != null) |
| | | PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); |
| | | serviceSubtaskList = serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | } |
| | | List<ServiceSubtaskExprot> serviceSubtaskExprots = null; |
| | | List<ServiceSubtaskExport> serviceSubtaskExports = null; |
| | | if (!CollectionUtils.isEmpty(serviceSubtaskList)) { |
| | | serviceSubtaskExprots = DtoConversionUtils.sourceToTarget(serviceSubtaskList, ServiceSubtaskExprot.class); |
| | | for (ServiceSubtaskExprot serviceSubtaskExprot : serviceSubtaskExprots) { |
| | | String pf = PreachFormEnum.getDescByCode(serviceSubtaskExprot.getPreachform()); |
| | | serviceSubtaskExprot.setPreachform(pf); |
| | | serviceSubtaskExports = DtoConversionUtils.sourceToTarget(serviceSubtaskList, ServiceSubtaskExport.class); |
| | | for (ServiceSubtaskExport serviceSubtaskExport : serviceSubtaskExports) { |
| | | String pf = PreachFormEnum.getDescByCode(serviceSubtaskExport.getPreachform()); |
| | | serviceSubtaskExport.setPreachform(pf); |
| | | |
| | | //计ç®åºé¢å¤©æ° |
| | | if (!Objects.isNull(serviceSubtaskExport.getEndtime())) { |
| | | Integer endDay = DateUtils.differentDaysByMillisecond(serviceSubtaskExport.getEndtime(), new Date()); |
| | | serviceSubtaskExport.setEndDay(endDay); |
| | | } |
| | | } |
| | | |
| | | } |
| | | ExcelUtil<ServiceSubtaskExprot> util = new ExcelUtil<ServiceSubtaskExprot>(ServiceSubtaskExprot.class); |
| | | util.exportExcel(response, serviceSubtaskExprots, "æ£è
é访信æ¯è¡¨å"); |
| | | ExcelUtil<ServiceSubtaskExport> util = new ExcelUtil<ServiceSubtaskExport>(ServiceSubtaskExport.class); |
| | | util.exportExcel(response, serviceSubtaskExports, "æ£è
é访信æ¯è¡¨å"); |
| | | } |
| | | |
| | | |
| | |
| | | @PostMapping("/getSfStatisticsExport") |
| | | public void export(HttpServletResponse response, ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | List<ServiceSubtaskStatistic> sfStatistics = serviceSubtaskService.getSfStatisticsExport(serviceSubtaskCountReq); |
| | | |
| | | ExcelUtil<ServiceSubtaskStatistic> util = new ExcelUtil<ServiceSubtaskStatistic>(ServiceSubtaskStatistic.class); |
| | | |
| | | String sheetName = ""; |
| | | String fileName = ""; |
| | | if (active.equals("ls") || active.equals("druid")) { |
| | |
| | | } |
| | | return success(serviceSubtaskService.getSfStatisticsJoydetails(serviceSubtaskCountReq)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * å»¶ç»æ¤çç»è®¡ |
| | | */ |
| | | @ApiOperation("å»¶ç»æ¤çç»è®¡") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/getContinueNerseCount") |
| | | public AjaxResult getContinueNerseCount(@RequestBody ServiceSubtaskCotinueCountVO serviceSubtaskCotinueCountVO) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | serviceSubtaskCotinueCountVO.setOrgid(user.getOrgid()); |
| | | serviceSubtaskCotinueCountVO.setCampusid(user.getCampusid()); |
| | | boolean hasDistrict = !CollectionUtils.isEmpty(serviceSubtaskCotinueCountVO.getLeavehospitaldistrictcodes()); |
| | | boolean hasDept = !CollectionUtils.isEmpty(serviceSubtaskCotinueCountVO.getDeptcodes()); |
| | | if (hasDistrict && hasDept) { |
| | | return error("ç
åºCodeéåä¸ç§å®¤Codeéåäºæ¥ï¼ä¸è½åæ¶ä¼ å
¥"); |
| | | } |
| | | return success(serviceSubtaskService.getContinueNurseCount(serviceSubtaskCotinueCountVO)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * è·åé访åç±»ç»è®¡æç» |
| | |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://9.209.1.5:2883/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://9.209.1.5:2883/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000 |
| | | username: root@sfxx#other_cluster02 |
| | | password: Y5oapyS8 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | # çç«åå¾· |
| | | url: jdbc:mysql://192.88.117.237:3306/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://192.88.117.237:3306/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000 |
| | | username: root |
| | | password: Smartor.2023 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | # æ°å |
| | | url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000 |
| | | username: smartor |
| | | password: Smartor.2023 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime); |
| | | List<String> list = new ArrayList<>(); |
| | | // list.add("FH0108.02"); |
| | | list.add("FH0109.22"); |
| | | list.add("FH0109.23"); |
| | | list.add("FH0109.53"); |
| | |
| | | //2夿ä¸ä¸ï¼å½åçsortæ¯ä¸æ¯çäºéè¦æ§è¡çæ»ä¸ªæ°ï¼å¦æçäºçè¯ï¼è¯´ææ¯æåä¸ä¸ªï¼ç´æ¥å°servuce_subtaskçç¶ææ¹æ5ï¼æ§è¡å¤±è´¥å°±è¡äº |
| | | Long cs = currentSort.get(); |
| | | if (cs.equals(serviceSubtaskPreachforms.size())) { |
| | | if(serviceSubtask.getPreachform().equals("1")){ |
| | | if (serviceSubtask.getPreachform().equals("1")) { |
| | | serviceSubtask.setSendstate(7L); |
| | | serviceSubtask.setRemark("å¤çè¡¥å¿ä»»å¡,å½åå¤çæåè¡¥å¿ äººå·¥è¶
æ¶"); |
| | | }else { |
| | | } else { |
| | | serviceSubtask.setSendstate(5L); |
| | | serviceSubtask.setRemark("å¤çè¡¥å¿ä»»å¡,å½åå¤çæåè¡¥å¿ï¼å
¨é¨æ§è¡å¤±è´¥"); |
| | | } |
| | | |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | //ä¿®æ¹åéæ¹å¼çç¶æä¸ºå¤±è´¥ |
| | | if(serviceSubtaskPreachform.getPreachform().equals("1")){ |
| | | if (serviceSubtaskPreachform.getPreachform().equals("1")) { |
| | | serviceSubtaskPreachform.setSendstate("7"); |
| | | serviceSubtaskPreachform.setId(id.get()); |
| | | }else { |
| | | } else { |
| | | serviceSubtaskPreachform.setSendstate("5"); |
| | | serviceSubtaskPreachform.setId(id.get()); |
| | | } |
| | |
| | | //说æå
¨åéå¤±è´¥äº |
| | | serviceSubtask.setSendstate(5L); |
| | | log.error("getSendPreachformæ¹æ³ æ£æ¥æ¯å¦ææsendstateä¸çäº9, å
¨å¤±è´¥äº"); |
| | | serviceSubtask.setRemark("ææåéæ¹å¼åæªè·åç»æï¼ä»»å¡å¤±è´¥"); |
| | | //人工åéè¶
æ¶ |
| | | if(ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")){ |
| | | if (ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtask.setSendstate(7L); |
| | | serviceSubtask.setRemark("人工åéè¶
æ¶"); |
| | | } |
| | |
| | | subtaskPreachform.setSendstate("5"); |
| | | subtaskPreachform.setId(id.get()); |
| | | //人工åéè¶
æ¶ |
| | | if(ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")){ |
| | | if (ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | subtaskPreachform.setSendstate("7"); |
| | | subtaskPreachform.setRemark("人工åéè¶
æ¶"); |
| | | } |
| | |
| | | if (failSendstate.equals("2")) serviceSubtaskPreachform1.setSendstate("9"); |
| | | } |
| | | serviceSubtaskPreachform1.setRemark(remark); |
| | | if(ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")){ |
| | | if (ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")) { |
| | | serviceSubtaskPreachform1.setSendstate("7"); |
| | | serviceSubtaskPreachform1.setRemark("人工åéè¶
æ¶"); |
| | | } |
| | |
| | | |
| | | //妿å½åçpreachformå·²ç»æ¯æåä¸ä¸ªäºï¼é£ç´æ¥å°serviceSubtaskçsendstateç¶ææ¹æ5å°±è¡äº(å
¨å¤±è´¥äº) |
| | | if (serviceSubtaskPreachform1.getSort() == sspCount.size()) { |
| | | if(ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")){ |
| | | if (ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")) { |
| | | serviceSubtask.setCurrentPreachform(preachform); |
| | | serviceSubtask.setSendstate(7L); |
| | | serviceSubtask.setRemark("人工åéè¶
æ¶"); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | return true; |
| | | }else { |
| | | } else { |
| | | if (failSendstate.equals("4") || failSendstate.equals("5")) { |
| | | serviceSubtask.setCurrentPreachform(preachform); |
| | | serviceSubtask.setSendstate(5L); |
| | | log.error("setSuccessPreachFormæ¹æ³ï¼å½åçpreachformå·²ç»æ¯æåä¸ä¸ªäºï¼å
¨é¨æ§è¡å¤±è´¥"); |
| | | serviceSubtask.setRemark("ææåéæ¹å¼åæªè·åç»æï¼ä»»å¡å¤±è´¥"); |
| | | //serviceSubtask.setRemark("setSuccessPreachFormæ¹æ³ï¼å½åçpreachformå·²ç»æ¯æåä¸ä¸ªäºï¼å
¨é¨æ§è¡å¤±è´¥"); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | return true; |
| | |
| | | //å°ä¸ä¸æ¬¡çé访æ¶é´ä¸å½åæ§è¡æ¹å¼è®°å½ä¸ä¸ |
| | | serviceSubtask.setVisitTime(getNextVisitTime(serviceSubtask.getId(), serviceSubtask.getTaskid(), serviceSubtask.getVisitTime())); |
| | | serviceSubtask.setCurrentPreachform(preachform); |
| | | if(ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")){ |
| | | if (ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")) { |
| | | serviceSubtask.setSendstate(7L); |
| | | serviceSubtask.setRemark("人工åéè¶
æ¶"); |
| | | }else { |
| | | } else { |
| | | serviceSubtask.setSendstate(3L); |
| | | } |
| | | if (serviceSubtask.getType().equals("3") || serviceSubtask.getType().equals("4")) { |
| | |
| | | questionnaireCategorys.add(map); |
| | | } |
| | | } |
| | | satisfactionCategories.put("questionnaireCategorys", CollectionUtils.isEmpty(questionnaireCategorys) ? null : questionnaireCategorys); |
| | | satisfactionCategories.put("questionnaireCategorys", questionnaireCategorys); |
| | | |
| | | //设置å½åç¨æ·ç声é³é®é¢åç±»åé®å·é®é¢åç±» |
| | | sysUser.setSatisfactionCategories(satisfactionCategories); |
| | |
| | | @ApiModelProperty(value = "å¼å¸¸é¢è¦ï¼0绿è²ï¼1红è²ï¼2é»è²; 3å·²å¤ç") |
| | | private Integer isabnormal; |
| | | |
| | | @ApiModelProperty(value = "ç»§ç»æ è¯") |
| | | @ApiModelProperty(value = "ç»§ç»æ è¯:1å¦ 2æ¯") |
| | | private Integer continueFlag; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/ServiceSubtaskExprot.java ÐÞ¸Ä |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * åä¸ä»»å¡ï¼é访ï¼å¯¹è±¡ ivr_taskcall |
| | |
| | | * @author ruoyi |
| | | * @date 2024-02-02 |
| | | */ |
| | | @ApiModel(value = "ServiceSubtaskExprot", description = "åä¸é访任å¡å
¥å") |
| | | @ApiModel(value = "ServiceSubtaskExport", description = "åä¸é访任å¡å
¥å") |
| | | @Data |
| | | public class ServiceSubtaskExprot extends BaseEntity { |
| | | public class ServiceSubtaskExport extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * åé人 |
| | | */ |
| | | @Excel(name = " åé人 ") |
| | | @Excel(name = " å§å ") |
| | | @ApiModelProperty(value = "åé人") |
| | | private String sendname; |
| | | |
| | | /** |
| | | * å建è
|
| | | * åéç¶æ |
| | | */ |
| | | @Excel(name = "é访人") |
| | | private String updateBy; |
| | | @Excel(name = " ä»»å¡ç¶æ ") |
| | | @ApiModelProperty(value = "åéç¶æ 1 被é¢å(å¨ä»»å¡ä¸æ¯æ°å»ºï¼å¨æå¡ä¸æ¯è¢«é¢å) 2 å¾
åé 3 å·²åé 4 䏿§è¡ 5 åé失败 6 已宿 7 è¶
æ¶(人工)") |
| | | private Long sendstate; |
| | | |
| | | /** |
| | | * 宿æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " 宿æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "宿æ¶é´") |
| | | private Date finishtime; |
| | | |
| | |
| | | * åºé¢æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " åºé¢æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " åºé¢æ¥æ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "åºé¢æ¶é´") |
| | | private Date endtime; |
| | | |
| | | /** |
| | | * åºéè®¿æ¥æ |
| | | */ |
| | | @Excel(name = "åºéè®¿æ¥æ",dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "åºéè®¿æ¥æ") |
| | | private Date visitTime; |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "å»çå§å") |
| | | private String drname; |
| | | |
| | | /** |
| | | * é访人å |
| | | */ |
| | | @Excel(name = "é访人å") |
| | | private String updateBy; |
| | | |
| | | @Excel(name = "åºé¢å¤©æ°", suffix = "天") |
| | | @ApiModelProperty(value = "åºé¢å¤©æ°") |
| | | private Integer endDay; |
| | | |
| | | /** |
| | | * 身份è¯å· |
| | |
| | | /** |
| | | * 宣æå½¢å¼ :ææ¬ãå¾çãè¯é³ãè§é¢ãæ··å |
| | | */ |
| | | @Excel(name = "任塿§è¡æ¹å¼") |
| | | @ApiModelProperty(value = "ä»»å¡å½¢å¼(1,人工 2,纸质 3,çµè¯ 4,çä¿¡ 5.微信å
¬ä¼å· 6.微信å°ç¨åº 7.æ¯ä»å®å°ç¨åº 8.æºè½æºå¨äºº 9.éé 10.导å
¥)") |
| | | @Excel(name = "任塿§è¡æ¹å¼") |
| | | private String preachform; |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain.VO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å»¶ç»æ¤çç»è®¡è¯·æ± |
| | | * |
| | | * @author ls |
| | | * @date 2026-04-11 |
| | | */ |
| | | @ApiModel(value = "ServiceSubtaskCotinueCountVO", description = "å»¶ç»æ¤çç»è®¡è¯·æ±") |
| | | @Data |
| | | public class ServiceSubtaskCotinueCountVO { |
| | | |
| | | @ApiModelProperty(value = "ç
åºCodeéå") |
| | | private List<String> leavehospitaldistrictcodes; |
| | | |
| | | @ApiModelProperty(value = "ç§å®¤Codeéå") |
| | | private List<String> deptcodes; |
| | | |
| | | @ApiModelProperty("æºæç¼ç ") |
| | | private String orgid; |
| | | |
| | | @ApiModelProperty("é¢åºç¼ç ") |
| | | private String campusid; |
| | | |
| | | } |
| | |
| | | |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.VO.PatSatisfactionReqVO; |
| | | import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import com.smartor.domain.entity.ServiceSubtaskSatisfactionEntity; |
| | | import org.apache.ibatis.annotations.MapKey; |
| | |
| | | |
| | | List<Long> querySendCount(ServiceSubtaskSatisfactionEntity serviceSubtaskSatisfactionEntity); |
| | | |
| | | /** |
| | | * æç
åºåç»ç»è®¡å»¶ç»æ¤çæ°é |
| | | * |
| | | * @param vo æ¥è¯¢æ¡ä»¶ |
| | | * @return æ¯ä¸ªç
åºçç»è®¡ç»æ |
| | | */ |
| | | List<Map<String, Object>> getContinueNurseCount(ServiceSubtaskCotinueCountVO vo); |
| | | |
| | | /** |
| | | * æç§å®¤åç»ç»è®¡å»¶ç»æ¤çæ°é |
| | | * |
| | | * @param vo æ¥è¯¢æ¡ä»¶ |
| | | * @return æ¯ä¸ªç§å®¤çç»è®¡ç»æ |
| | | */ |
| | | List<Map<String, Object>> getContinueNurseCountByDept(ServiceSubtaskCotinueCountVO vo); |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | |
| | | public List<ServiceSubtaskDiagname> convertToDiagnameList(List<ServiceSubtask> subtaskList) ; |
| | | |
| | | public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity entity); |
| | | |
| | | /** |
| | | * æç
åºæç§å®¤ç»è®¡å»¶ç»æ¤çæ°é |
| | | * é½ä¸ä¼ æ¶åæ¶æç
åºåç§å®¤åç»è®¡ä¸é |
| | | * |
| | | * @param vo æ¥è¯¢æ¡ä»¶ï¼leavehospitaldistrictcodes ä¸ deptcodes äºæ¥ï¼ |
| | | * @return noContinueCountãContinueCount å detail å表 |
| | | */ |
| | | Map<String, Object> getContinueNurseCount(ServiceSubtaskCotinueCountVO vo); |
| | | } |
| | |
| | | public PatMedRes selectPatMedInhospListCount(PatMedReq patMedReq) { |
| | | PatMedRes patMedRes = null; |
| | | // è·åå½åç»é人çé¨é¨æé |
| | | if (org.springframework.util.CollectionUtils.isEmpty(patMedReq.getDeptcodeList())) { |
| | | // Long userId = SecurityUtils.getUserId(); |
| | | // List<SysDept> sysDepts = sysUserDeptMapper.selectDeptListByUserId(userId); |
| | | // List<String> deptCode = new ArrayList<>(); |
| | | // for (SysDept sysDept : sysDepts) { |
| | | // deptCode.add(sysDept.getDeptId().toString()); |
| | | // } |
| | | // patMedReq.setDeptcodeList(deptCode); |
| | | // patMedRes = patMedInhospMapper.selectPatMedInhospCount(patMedReq); |
| | | } |
| | | patMedRes = patMedInhospMapper.selectPatMedInhospCount(patMedReq); |
| | | return patMedRes; |
| | | } |
| | |
| | | |
| | | /** |
| | | * å¤ç»´åº¦é访 |
| | | * |
| | | * @param config |
| | | * @return |
| | | */ |
| | |
| | | * æç»´åº¦æ¾å°ææå¹é
é¿æä»»å¡ï¼æ¹éçæ subtask |
| | | * type: 1=ç§å®¤, 2=ç
åº, 3=ç¾ç
|
| | | */ |
| | | private void processTasksByDimension(PatMedInhosp patMedInhosp1, |
| | | PatArchive patArchive, |
| | | String config, int type) { |
| | | private void processTasksByDimension(PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, int type) { |
| | | List<Long> matchedTaskIds = findMatchingTaskIds(patMedInhosp1, type); |
| | | |
| | | if (CollectionUtils.isEmpty(matchedTaskIds)) { |
| | | String reason = getDimensionReason(type); |
| | | markFlagAsNoConfig(patMedInhosp1, type, reason); |
| | | String reason = getDimensionReason(type); |
| | | markFlagAsNoConfig(patMedInhosp1, type, reason); |
| | | return; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private String getDimensionReason(int type){ |
| | | private String getDimensionReason(int type) { |
| | | switch (type) { |
| | | case 1: { // ç§å®¤ |
| | | return "æªæ¾å°ç§å®¤å¹é
çé¿æä»»å¡"; |
| | | } |
| | | } |
| | | case 2: { // ç
åº |
| | | return "æªæ¾å°ç
åºå¹é
çé¿æä»»å¡"; |
| | | } |
| | |
| | | return "å¤ç»´é¿æä»»å¡-å¹é
ç±»å为空"; |
| | | } |
| | | |
| | | private void markFlagAsNoConfig(PatMedInhosp patMedInhosp, |
| | | int type, |
| | | String reason){ |
| | | private void markFlagAsNoConfig(PatMedInhosp patMedInhosp, int type, String reason) { |
| | | switch (type) { |
| | | case 1: { // ç§å®¤ |
| | | patMedInhosp.setDeptcheckFlag("2"); |
| | |
| | | |
| | | } |
| | | |
| | | private void markAllFlagsAsError(PatMedInhosp patMedInhosp, |
| | | String reason){ |
| | | private void markAllFlagsAsError(PatMedInhosp patMedInhosp, String reason) { |
| | | patMedInhosp.setDeptcheckFlag("2"); |
| | | patMedInhosp.setWardcheckFlag("2"); |
| | | patMedInhosp.setDiagcheckFlag("2"); |
| | | patMedInhosp.setRemark(reason); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç»´åº¦ç±»åæ¥è¯¢å¹é
çé¿æä»»å¡ ID å表 |
| | | */ |
| | |
| | | query.setDeptCode(patMedInhosp1.getLeaveldeptcode()); |
| | | query.setDeptType("1"); |
| | | query.setOrgid(patMedInhosp1.getOrgid()); |
| | | return serviceTaskdeptMapper.selectServiceTaskdeptList(query) |
| | | .stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList()); |
| | | return serviceTaskdeptMapper.selectServiceTaskdeptList(query).stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList()); |
| | | } |
| | | case 2: { // ç
åº |
| | | ServiceTaskdept query = new ServiceTaskdept(); |
| | |
| | | query.setDeptCode(patMedInhosp1.getLeavehospitaldistrictcode()); |
| | | query.setDeptType("2"); |
| | | query.setOrgid(patMedInhosp1.getOrgid()); |
| | | return serviceTaskdeptMapper.selectServiceTaskdeptList(query) |
| | | .stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList()); |
| | | return serviceTaskdeptMapper.selectServiceTaskdeptList(query).stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList()); |
| | | } |
| | | case 3: { // ç¾ç
|
| | | if (StringUtils.isEmpty(patMedInhosp1.getLeaveicd10code())) return Collections.emptyList(); |
| | |
| | | query.setLongtask(1L); |
| | | query.setIcd10code(patMedInhosp1.getLeaveicd10code()); |
| | | query.setOrgid(patMedInhosp1.getOrgid()); |
| | | return serviceTaskdiagMapper.selectServiceTaskdiagList(query) |
| | | .stream().map(ServiceTaskdiag::getTaskId).collect(Collectors.toList()); |
| | | return serviceTaskdiagMapper.selectServiceTaskdiagList(query).stream().map(ServiceTaskdiag::getTaskId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | return Collections.emptyList(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param taskid ä»»å¡id |
| | | * @param check æ¯å¦éè¦æ ¡éª |
| | | * @param taskid ä»»å¡id |
| | | * @param check æ¯å¦éè¦æ ¡éª |
| | | * @param patMedInhosp1 ç
人åºå
¥é¢ä¿¡æ¯ |
| | | * @param patArchive ç
äººä¿¡æ¯ |
| | | * @param type é访类å(1-ç§å®¤ï¼2-ç
åºï¼3-ç¾ç
ï¼ |
| | | * @param config é
ç½®ä¿¡æ¯ visit.early.day |
| | | * @param patArchive ç
äººä¿¡æ¯ |
| | | * @param type é访类å(1-ç§å®¤ï¼2-ç
åºï¼3-ç¾ç
ï¼ |
| | | * @param config é
ç½®ä¿¡æ¯ visit.early.day |
| | | */ |
| | | //å°æ£è
æ¾å°subtaskä¸ |
| | | private void writeInSubTask(Long taskid, Boolean check, PatMedInhosp patMedInhosp1, PatArchive patArchive, Integer type, String config) { |
| | |
| | | } |
| | | //æ¯å® åºé¢é¦æ¬¡ï¼7天ï¼é访ä¸å®è¦å |
| | | boolean firstVisit = false; |
| | | if (serviceSubtask1.getOrgid().equals("47255004333112711A1001") |
| | | && serviceSubtask1.getVisitCount() != null && serviceSubtask1.getVisitCount() == 1) { |
| | | if (serviceSubtask1.getOrgid().equals("47255004333112711A1001") && serviceSubtask1.getVisitCount() != null && serviceSubtask1.getVisitCount() == 1) { |
| | | firstVisit = true; |
| | | } |
| | | if (!firstVisit) { |
| | |
| | | if (org.apache.commons.lang3.StringUtils.isNotBlank(patMedOuthosp.getSerialnum())) { |
| | | int exists = patMedOuthospMapper.countBySerialnum(targetTable, patMedOuthosp.getSerialnum()); |
| | | if (exists > 0) { |
| | | log.debug("[insert] serialnum={} å·²åå¨äºè¡¨ {}ï¼è·³è¿æå
¥", patMedOuthosp.getSerialnum(), targetTable); |
| | | log.info("[insert] serialnum={} å·²åå¨äºè¡¨ {}ï¼è·³è¿æå
¥", patMedOuthosp.getSerialnum(), targetTable); |
| | | return 0; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | private void processResultList(List<ServiceSLTDInhospResDTO> resultList, List<String> types, String cry, String campusId) { |
| | | for (String type : types) |
| | | // é¨è¯(FH0108.01)忥è¯(FH0108.03)å¨ä¸å¡ä¸æ¯åä¸ç±»æ°æ®ï¼å
±ç¨åä¸ä¸ª resultListã |
| | | // è¥ types åæ¶å
å«ä¸¤è
ï¼outHospitalDate ä¼è¢«è°ç¨ä¸¤æ¬¡å¯¼è´éå¤å
¥åºã |
| | | // å æ¤åªè¦ types ä¸å«æä»»æä¸ä¸ªé¨æ¥è¯ç±»åï¼å°±åªå¤ç䏿¬¡ã |
| | | boolean outpProcessed = false; |
| | | for (String type : types) { |
| | | switch (type) { |
| | | case "FH0108.01": |
| | | log.info("ãparseResponseDataãè§£æé¨è¯æ°æ®"); |
| | | outHospitalDate(resultList); |
| | | case "FH0108.03": |
| | | if (!outpProcessed) { |
| | | log.info("ãparseResponseDataãè§£æé¨æ¥è¯æ°æ®ï¼types={}", types); |
| | | outHospitalDate(resultList); |
| | | outpProcessed = true; |
| | | } else { |
| | | log.info("ãparseResponseDataã鍿¥è¯æ°æ®å·²å¤çï¼è·³è¿ type={}", type); |
| | | } |
| | | break; |
| | | case "FH0109.26": |
| | | log.info("ãparseResponseDataãè§£æä½é¢æ°æ®"); |
| | |
| | | log.info("ãparseResponseDataãè§£æé¢ä½é¢ï¼å
¶ä»ï¼æ°æ®"); |
| | | inHospitalDate(resultList, cry); |
| | | break; |
| | | // case "FH0108.03": |
| | | // log.info("ãparseResponseDataãè§£ææ¥è¯æ°æ®"); |
| | | // outHospitalDate(resultList); |
| | | // break; |
| | | default: |
| | | log.warn("ãparseResponseDataãæªç¥çæ°æ®ç±»åï¼{}", type); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private Boolean outHospitalDate(List<ServiceSLTDInhospResDTO> resultList) { |
| | |
| | | } |
| | | |
| | | } else if (cry.equals("1")) { |
| | | // åºé¢æ°æ®å¤ç |
| | | if (CollectionUtils.isEmpty(existingInhosps)) { |
| | | //å¦æä¸ºç©ºï¼è¦å
夿ï¼é¢å
¥é¢æ¯å¦æå¼ï¼æå¼çè¯åæ´æ° |
| | | // åºé¢æ°æ®å¤ç |
| | | if (CollectionUtils.isNotEmpty(existingInhosps)) { |
| | | // å·²åå¨åºé¢è®°å½ï¼ç´æ¥æ´æ°ï¼ä¿æææ°æ°æ®ï¼ |
| | | patMedInhosp.setInhospid(existingInhosps.get(0).getInhospid()); |
| | | patMedInhospService.updatePatMedInhosp(patMedInhosp); |
| | | log.info("åºé¢è®°å½å·²åå¨ï¼æ§è¡æ´æ°ï¼serialnum={}, orgid={}", patMedInhosp.getSerialnum(), patMedInhosp.getOrgid()); |
| | | } else { |
| | | // ä¸åå¨åºé¢è®°å½ï¼å
æ¥é¢å
¥é¢ï¼state=3ï¼ï¼åæ¥å
¥é¢ï¼state=0ï¼ |
| | | queryInhosp.setInhospstate("3"); |
| | | log.info("-----patMedInhospListè¿æ¥äºä¸ï¼å
¥å为ï¼{}", queryInhosp); |
| | | log.info("-----æ¥è¯¢é¢å
¥é¢è®°å½ï¼å
¥å为ï¼{}", queryInhosp); |
| | | List<PatMedInhosp> patMedInhospList = patMedInhospService.selectPatMedInhosp(queryInhosp); |
| | | log.info("----patMedInhospListè¿æ¥äºä¸ï¼è¿å为ï¼{}", CollectionUtils.isEmpty(patMedInhospList) ? null : patMedInhospList.get(0).getSerialnum()); |
| | | log.info("----é¢å
¥é¢æ¥è¯¢ç»æï¼{}", CollectionUtils.isEmpty(patMedInhospList) ? "空" : patMedInhospList.get(0).getSerialnum()); |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) { |
| | | //妿é¢å
¥é¢ä¸ä¸ºç©ºï¼åè¿è¡ä¿®æ¹ |
| | | // åå¨é¢å
¥é¢è®°å½ï¼æ´æ°ä¸ºåºé¢ç¶æ |
| | | patMedInhosp.setInhospid(patMedInhospList.get(0).getInhospid()); |
| | | patMedInhospService.updatePatMedInhosp(patMedInhosp); |
| | | log.info("ç±é¢å
¥é¢æ´æ°ä¸ºåºé¢ï¼serialnum={}", patMedInhosp.getSerialnum()); |
| | | } else { |
| | | //妿å
¥é¢ä¸ä¸ºç©ºï¼åè¿è¡ä¿®æ¹ |
| | | // 忥å
¥é¢è®°å½ï¼state=0ï¼ |
| | | queryInhosp.setInhospstate("0"); |
| | | patMedInhospList = patMedInhospService.selectPatMedInhosp(queryInhosp); |
| | | log.debug("å
¥é¢æ¥è¯¢ç»æï¼{}", CollectionUtils.isEmpty(patMedInhospList) ? "空" : patMedInhospList.size()); |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) { |
| | | // åå¨å
¥é¢è®°å½ï¼æ´æ°ä¸ºåºé¢ç¶æ |
| | | patMedInhosp.setInhospid(patMedInhospList.get(0).getInhospid()); |
| | | patMedInhospService.updatePatMedInhosp(patMedInhosp); |
| | | } |
| | | } |
| | | |
| | | //妿é½ä¸ºç©ºï¼åè¿è¡æ°å¢ |
| | | if (CollectionUtils.isEmpty(patMedInhospList)) { |
| | | //妿å
¥é¢ä¸ä¸ºç©ºï¼åè¿è¡ä¿®æ¹ |
| | | queryInhosp.setInhospstate("0"); |
| | | log.debug("åºé¢queryInhospå
¥å为ï¼{}", queryInhosp); |
| | | List<PatMedInhosp> patMedInhosps = patMedInhospService.selectPatMedInhosp(queryInhosp); |
| | | log.debug("åºé¢patMedInhospListè¿å为ï¼{}", CollectionUtils.isEmpty(patMedInhosps) ? null : patMedInhosps.size()); |
| | | if (CollectionUtils.isNotEmpty(patMedInhosps)) { |
| | | patMedInhospService.updatePatMedInhosp(patMedInhosp); |
| | | log.info("ç±å
¥é¢æ´æ°ä¸ºåºé¢ï¼serialnum={}", patMedInhosp.getSerialnum()); |
| | | } else { |
| | | // é¢å
¥é¢åå
¥é¢åä¸åå¨ï¼ç´æ¥æ°å¢åºé¢è®°å½ |
| | | try { |
| | | patMedInhospService.insertPatMedInhosp(patMedInhosp); |
| | | log.info("æ°å¢åºé¢è®°å½ï¼serialnum={}", patMedInhosp.getSerialnum()); |
| | | } catch (org.springframework.dao.DuplicateKeyException e) { |
| | | log.warn("åºé¢è®°å½å·²åå¨ï¼è·³è¿ï¼serialnum={}, orgid={}, state={}", patMedInhosp.getSerialnum(), patMedInhosp.getOrgid(), patMedInhosp.getInhospstate()); |
| | | } |
| | |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(ssVO); |
| | | |
| | | ServiceSubtask serviceSubtask = new ServiceSubtask(); |
| | | serviceSubtask.setId(subid); |
| | | serviceSubtask.setTaskid(tid); |
| | | serviceSubtask.setPatid(pid); |
| | | serviceSubtask.setSubmit(1L); |
| | |
| | | serviceSubtaskDetailVO.setCreateTime(new Date()); |
| | | serviceSubtaskDetailVO.setUpdateTime(new Date()); |
| | | serviceSubtaskDetailVO.setTemplateType(2); |
| | | serviceSubtaskDetailVO.setLibTemplateid(CollectionUtils.isNotEmpty(selectServiceSubtaskList) ? selectServiceSubtaskList.get(0).getLibtemplateid().intValue() : null); |
| | | serviceSubtaskDetailVO.setLibTemplateid(CollectionUtils.isNotEmpty(selectServiceSubtaskList) ? |
| | | (ObjectUtils.isNotEmpty(selectServiceSubtaskList.get(0).getLibtemplateid()) ? |
| | | selectServiceSubtaskList.get(0).getLibtemplateid().intValue() : null): null); |
| | | if (ObjectUtils.isNotEmpty(serviceTask)) { |
| | | serviceSubtaskDetailVO.setGuid(serviceTask.getGuid()); |
| | | serviceSubtaskDetailVO.setOrgid(serviceTask.getOrgid()); |
| | |
| | | import com.smartor.common.FtpService; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.*; |
| | |
| | | // å¤ç空å¼å¸¸ |
| | | if (MapUtils.isEmpty(result)) { |
| | | result = new HashMap<>(); |
| | | // ç¡®ä¿ææ key 齿å¼ï¼é¿å
空æéå¼å¸¸ |
| | | // MyBatis ç SUM 卿²¡æå¹é
è¡æ¶ä¼è¿å null |
| | | result.putIfAbsent("wzx", 0); |
| | | result.putIfAbsent("ysf", 0); |
| | | result.putIfAbsent("yc", 0); |
| | | result.putIfAbsent("jg", 0); |
| | | result.putIfAbsent("fssb", 0); |
| | | result.putIfAbsent("yfs", 0); |
| | | result.putIfAbsent("blq", 0); |
| | | result.putIfAbsent("dsf", 0); |
| | | result.putIfAbsent("total", 0); |
| | | } |
| | | // ç¡®ä¿ææ key 齿å¼ï¼é¿å
空æéå¼å¸¸ |
| | | // MyBatis ç SUM 卿²¡æå¹é
è¡æ¶ä¼è¿å null |
| | | result.putIfAbsent("wzx", 0); |
| | | result.putIfAbsent("ysf", 0); |
| | | result.putIfAbsent("yc", 0); |
| | | result.putIfAbsent("jg", 0); |
| | | result.putIfAbsent("fssb", 0); |
| | | result.putIfAbsent("yfs", 0); |
| | | result.putIfAbsent("blq", 0); |
| | | result.putIfAbsent("dsf", 0); |
| | | |
| | | return result; |
| | | } |
| | | |
| | |
| | | // if (existSize > 0) return pullTaskVOList; |
| | | int count = 0; |
| | | long size = listOps.size("cache-0"); |
| | | log.error("---------æçµè¯ä¹åç¼åä¸çæ°æ®éï¼{}", size); |
| | | log.info("---------æçµè¯ä¹åç¼åä¸çæ°æ®éï¼{}", size); |
| | | if (size > 0) { |
| | | //phoneCount() éè¿ç»åºçæ¯ä¸ªå°æ¶éè¦æåºççµè¯éï¼ç®åºå°æä¸8ç¹ä¸ç¹è½æåºå¤å°ä¸ªçµè¯ï¼è·åå°æ»é |
| | | //妿éè¦ç«å³æ§è¡çæ°æ®é大äºä¸å¤©è¦æ§è¡çä¸éï¼ååªåä¸éçæ°éï¼å
¶å®çåæ¾åredisä¸ |
| | |
| | | } |
| | | } |
| | | // if (existList.size() != 0) redisCache.setCacheListRight("cache-exist", existList); |
| | | log.error("-----------å®é
æåççµè¯æ°æ®éï¼{}", CollectionUtils.isNotEmpty(pullTaskVOList) ? pullTaskVOList.size() : null); |
| | | log.info("-----------å®é
æåççµè¯æ°æ®éï¼{}", CollectionUtils.isNotEmpty(pullTaskVOList) ? pullTaskVOList.size() : null); |
| | | return pullTaskVOList; |
| | | } |
| | | |
| | |
| | | if (serviceSubtaskPreachform1.getSort() == spSize.size() && failSendstate.equals("4")) { |
| | | serviceSubtask.setCurrentPreachform(preachform); |
| | | serviceSubtask.setSendstate(5L); |
| | | // serviceSubtask.setRemark("setFailPreachFormæ¹æ³ å½åçpreachformå·²ç»æ¯æåä¸ä¸ªäºï¼å
¨å¤±è´¥äº"); |
| | | serviceSubtask.setRemark("ææåéæ¹å¼åæªè·åç»æï¼ä»»å¡å¤±è´¥"); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | return true; |
| | | } |
| | |
| | | public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity entity) { |
| | | return serviceSubtaskMapper.getCurrentUserServiceSubtaskCount(entity); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getContinueNurseCount(ServiceSubtaskCotinueCountVO vo) { |
| | | boolean hasDistrict = !CollectionUtils.isEmpty(vo.getLeavehospitaldistrictcodes()); |
| | | boolean hasDept = !CollectionUtils.isEmpty(vo.getDeptcodes()); |
| | | |
| | | List<Map<String, Object>> districtRows; |
| | | List<Map<String, Object>> deptRows; |
| | | |
| | | if (hasDistrict) { |
| | | // åªä¼ äºç
åºï¼ä»
æç
åºç»´åº¦ç»è®¡ |
| | | districtRows = serviceSubtaskMapper.getContinueNurseCount(vo); |
| | | deptRows = Collections.emptyList(); |
| | | } else if (hasDept) { |
| | | // åªä¼ äºç§å®¤ï¼ä»
æç§å®¤ç»´åº¦ç»è®¡ |
| | | districtRows = Collections.emptyList(); |
| | | deptRows = serviceSubtaskMapper.getContinueNurseCountByDept(vo); |
| | | } else { |
| | | // 齿ªä¼ ï¼ç
åºåç§å®¤åç»è®¡ä¸é |
| | | districtRows = serviceSubtaskMapper.getContinueNurseCount(vo); |
| | | deptRows = serviceSubtaskMapper.getContinueNurseCountByDept(vo); |
| | | } |
| | | |
| | | long totalNoContinue = 0L; |
| | | long totalContinue = 0L; |
| | | List<Map<String, Object>> detail = new ArrayList<>(); |
| | | |
| | | for (Map<String, Object> row : districtRows) { |
| | | String groupName = row.get("groupName") == null |
| | | ? (row.get("groupCode") == null ? "" : row.get("groupCode").toString()) |
| | | : row.get("groupName").toString(); |
| | | long noCnt = row.get("noContinueCnt") == null ? 0L : Long.parseLong(row.get("noContinueCnt").toString()); |
| | | long yesCnt = row.get("continueCnt") == null ? 0L : Long.parseLong(row.get("continueCnt").toString()); |
| | | totalNoContinue += noCnt; |
| | | totalContinue += yesCnt; |
| | | Map<String, Object> item = new LinkedHashMap<>(); |
| | | item.put("æªå»¶ç»_" + groupName, noCnt); |
| | | item.put("已延ç»_"+groupName, yesCnt); |
| | | detail.add(item); |
| | | } |
| | | |
| | | for (Map<String, Object> row : deptRows) { |
| | | String groupName = row.get("groupName") == null |
| | | ? (row.get("groupCode") == null ? "" : row.get("groupCode").toString()) |
| | | : row.get("groupName").toString(); |
| | | long noCnt = row.get("noContinueCnt") == null ? 0L : Long.parseLong(row.get("noContinueCnt").toString()); |
| | | long yesCnt = row.get("continueCnt") == null ? 0L : Long.parseLong(row.get("continueCnt").toString()); |
| | | totalNoContinue += noCnt; |
| | | totalContinue += yesCnt; |
| | | Map<String, Object> item = new LinkedHashMap<>(); |
| | | item.put("æªå»¶ç»_" + groupName, noCnt); |
| | | item.put("已延ç»_" + groupName, yesCnt); |
| | | detail.add(item); |
| | | } |
| | | |
| | | Map<String, Object> result = new LinkedHashMap<>(); |
| | | result.put("æªå»¶ç»æ»æ°é", totalNoContinue); |
| | | result.put("å·²å»¶ç»æ»æ°é", totalContinue); |
| | | result.put("详æ
", detail); |
| | | return result; |
| | | } |
| | | } |
| | |
| | | |
| | | <select id="selectPatMedInhospCount" parameterType="com.smartor.domain.PatMedReq" |
| | | resultType="com.smartor.domain.PatMedRes"> |
| | | SELECT SUM( rs ) AS rs, |
| | | SUM( rc ) AS rc, |
| | | SUM( scsf ) AS scsf, |
| | | SUM( zcsf ) AS zcsf, |
| | | SUM( zbsf ) AS zbsf |
| | | SELECT SUM(rc) AS rc, |
| | | SUM(rs) AS rs, |
| | | SUM(scsf) AS scsf, |
| | | SUM(zcsf) AS zcsf, |
| | | SUM(zbsf) AS zbsf |
| | | FROM ( |
| | | <!-- åºé¢äººæ¬¡--> |
| | | SELECT |
| | | COUNT(1) AS rc, |
| | | 0 AS rs, |
| | | 0 AS scsf, |
| | | 0 AS zcsf, |
| | | 0 AS zbsf |
| | | FROM |
| | | pat_med_inhosp |
| | | JOIN |
| | | pat_archive ON pat_archive.id = pat_med_inhosp.patid |
| | | where 1=1 |
| | | and pat_med_inhosp.del_flag=0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and pat_med_inhosp.orgid = #{orgid} |
| | | </if> |
| | | AND pat_archive.idcardno IS NOT NULL |
| | | <if test="zy != null"> |
| | | and pat_med_inhosp.inhospstate=0 |
| | | and date_format(pat_med_inhosp.starttime,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(pat_med_inhosp.starttime,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and pat_med_inhosp.deptcode in |
| | | <!-- åºé¢äººæ¬¡ï¼å»æ date_format å
è£
ï¼ä½¿æ¥æå段索å¼çæ --> |
| | | SELECT |
| | | COUNT(1) AS rc, |
| | | 0 AS rs, |
| | | 0 AS scsf, |
| | | 0 AS zcsf, |
| | | 0 AS zbsf |
| | | FROM pat_med_inhosp |
| | | JOIN pat_archive ON pat_archive.id = pat_med_inhosp.patid |
| | | WHERE pat_med_inhosp.del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND pat_med_inhosp.orgid = #{orgid} |
| | | </if> |
| | | AND pat_archive.idcardno IS NOT NULL |
| | | <if test="zy != null"> |
| | | AND pat_med_inhosp.inhospstate = 0 |
| | | AND pat_med_inhosp.starttime >= #{startDate} |
| | | AND pat_med_inhosp.starttime < DATE_ADD(#{endDate}, INTERVAL 1 DAY) |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | AND pat_med_inhosp.deptcode IN |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | <if test="cy != null"> |
| | | AND pat_med_inhosp.inhospstate = 1 |
| | | AND pat_med_inhosp.endtime >= #{startDate} |
| | | AND pat_med_inhosp.endtime < DATE_ADD(#{endDate}, INTERVAL 1 DAY) |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | AND pat_med_inhosp.leaveldeptcode IN |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | UNION ALL |
| | | <!-- é访æå¡/馿¬¡/忬¡/ä¸ç
é访ï¼åå¹¶ä¸ºåæ¬¡æ«æï¼ç¨æ¡ä»¶èå代æ¿4个 UNION ALL --> |
| | | SELECT |
| | | 0 AS rc, |
| | | COUNT(1) AS rs, |
| | | SUM(CASE WHEN service_type = 2 AND visit_count = 1 THEN 1 ELSE 0 END) AS scsf, |
| | | SUM(CASE WHEN service_type = 2 AND visit_count > 1 THEN 1 ELSE 0 END) AS zcsf, |
| | | SUM(CASE WHEN service_type = 13 THEN 1 ELSE 0 END) AS zbsf |
| | | FROM service_subtask |
| | | WHERE del_flag = 0 |
| | | AND service_type IN (2, 13) |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND visit_time >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND visit_time < DATE_ADD(#{endDate}, INTERVAL 1 DAY) |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | AND deptcode IN |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | <if test="cy != null"> |
| | | and pat_med_inhosp.inhospstate=1 |
| | | and date_format(pat_med_inhosp.endtime,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(pat_med_inhosp.endtime,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and pat_med_inhosp.leaveldeptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | <!-- é访æå¡äººæ° --> |
| | | union all |
| | | select |
| | | 0 AS rc, |
| | | count(1) AS rs, |
| | | 0 AS scsf, |
| | | 0 AS zcsf, |
| | | 0 AS zbsf |
| | | FROM |
| | | service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <!-- 馿¬¡éè®¿äººæ° --> |
| | | union all |
| | | select |
| | | 0 AS rc, |
| | | 0 AS rs, |
| | | count(1) AS scsf, |
| | | 0 AS zcsf, |
| | | 0 AS zbsf |
| | | FROM |
| | | service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | and visit_count is not null |
| | | and visit_count = 1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <!-- 忬¡éè®¿äººæ° --> |
| | | union all |
| | | select |
| | | 0 AS rc, |
| | | 0 AS rs, |
| | | 0 AS scsf, |
| | | count(1) AS zcsf, |
| | | 0 AS zbsf |
| | | FROM |
| | | service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | and visit_count is not null |
| | | and visit_count > 1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <!-- ä¸ç
éè®¿äººæ° --> |
| | | union all |
| | | select |
| | | 0 AS rc, |
| | | 0 AS rs, |
| | | 0 AS scsf, |
| | | 0 AS zcsf, |
| | | count(1) AS zbsf |
| | | FROM |
| | | service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=13 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | ) AS combined_data |
| | | </select> |
| | | |
| | |
| | | <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | | where del_flag = 0 |
| | | <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if> |
| | | <if test="continueTimeNow != null ">and continue_time_now = #{continueTimeNow,jdbcType=TIMESTAMP}</if> |
| | | <if test="continueCount != null ">and continue_count = #{continueCount}</if> |
| | |
| | | <if test="continueContent != null ">continue_content = #{continueContent},</if> |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | <if test="id != null "> |
| | | and id = #{id} |
| | | </if> |
| | | </update> |
| | | |
| | | <update id="updateServiceSubtaskByTaskGuid" parameterType="com.smartor.domain.ServiceSubtask"> |
| | |
| | | SUM(CASE WHEN sendstate = 2 THEN 1 ELSE 0 END) AS dsf, |
| | | SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq, |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep = '1' THEN 1 ELSE 0 END) AS yc, |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep = '2' THEN 1 ELSE 0 END) AS jg |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep = '2' THEN 1 ELSE 0 END) AS jg, |
| | | COUNT(1) as total |
| | | FROM service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- |
| | | æç
åºæç§å®¤åç»ç»è®¡ continue_flag æ°é |
| | | ä¼ äº leavehospitaldistrictcodes â æç
åºç»´åº¦ |
| | | ä¼ äº deptcodes â æç§å®¤ç»´åº¦ |
| | | é½ä¸ä¼ â æç
åºç»´åº¦ç»è®¡å
¨é |
| | | --> |
| | | <!-- æç
åºåç»ç»è®¡å»¶ç»æ¤çæ°é --> |
| | | <select id="getContinueNurseCount" |
| | | parameterType="com.smartor.domain.VO.ServiceSubtaskCotinueCountVO" |
| | | resultType="java.util.Map"> |
| | | SELECT |
| | | leavehospitaldistrictcode AS groupCode, |
| | | leavehospitaldistrictname AS groupName, |
| | | SUM(CASE WHEN continue_flag = 1 THEN 1 ELSE 0 END) AS noContinueCnt, |
| | | SUM(CASE WHEN continue_flag = 2 THEN 1 ELSE 0 END) AS continueCnt |
| | | FROM service_subtask |
| | | WHERE del_flag = 0 |
| | | AND continue_flag IN (1, 2) |
| | | AND leavehospitaldistrictcode IS NOT NULL AND leavehospitaldistrictcode != '' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="code" open="(" separator="," close=")"> |
| | | #{code} |
| | | </foreach> |
| | | </if> |
| | | GROUP BY leavehospitaldistrictcode, leavehospitaldistrictname |
| | | ORDER BY groupCode |
| | | </select> |
| | | |
| | | <!-- æç§å®¤åç»ç»è®¡å»¶ç»æ¤çæ°é --> |
| | | <select id="getContinueNurseCountByDept" |
| | | parameterType="com.smartor.domain.VO.ServiceSubtaskCotinueCountVO" |
| | | resultType="java.util.Map"> |
| | | SELECT |
| | | deptcode AS groupCode, |
| | | deptname AS groupName, |
| | | SUM(CASE WHEN continue_flag = 1 THEN 1 ELSE 0 END) AS noContinueCnt, |
| | | SUM(CASE WHEN continue_flag = 2 THEN 1 ELSE 0 END) AS continueCnt |
| | | FROM service_subtask |
| | | WHERE del_flag = 0 |
| | | AND continue_flag IN (1, 2) |
| | | AND deptcode IS NOT NULL AND deptcode != '' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="deptcodes != null and deptcodes.size() > 0"> |
| | | AND deptcode IN |
| | | <foreach collection="deptcodes" item="code" open="(" separator="," close=")"> |
| | | #{code} |
| | | </foreach> |
| | | </if> |
| | | GROUP BY deptcode, deptname |
| | | ORDER BY groupCode |
| | | </select> |
| | | |
| | | </mapper> |