Merge branch 'master' into master-任务组
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.security.MessageDigest; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | |
| | | |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | // èææ¥å
¥ç |
| | | @Value("${xhsmsjrm}") |
| | | private String xhsmsjrm; |
| | | |
| | | @Value("${server.port}") |
| | | private String port; |
| | |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(serviceSubtask.getOrgid()); |
| | | serviceOutPath.setDeptCode(serviceSubtask.getDeptcode()); |
| | | serviceOutPath.setWardCode(serviceSubtask.getLeavehospitaldistrictcode()); |
| | | serviceOutPath.setDeptName(serviceSubtask.getDeptname()); |
| | | serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); |
| | | //转æ16è¿å¶ |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | serviceOutPath.setUrl(ip + ":" + req_path + "/sf?p=" + format); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/sf?p=" + format); |
| | | SysConfig sysConfig = new SysConfig(); |
| | | if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("6")) { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("zymyd.sms.template"); |
| | | }else if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("14")) { |
| | | } else if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("14")) { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("mzmyd.sms.template"); |
| | | }else { |
| | | } else { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("wj.sms.template"); |
| | | } |
| | | if (!Objects.isNull(sysConfig)) { |
| | |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(serviceSubtask.getOrgid()); |
| | | serviceOutPath.setDeptCode(serviceSubtask.getDeptcode()); |
| | | serviceOutPath.setWardCode(serviceSubtask.getLeavehospitaldistrictcode()); |
| | | serviceOutPath.setDeptName(serviceSubtask.getDeptname()); |
| | | serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | serviceOutPath.setUrl(StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/wt?p=" + format : ip + "/wt?p=" + format); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | |
| | | SysConfig sysConfig = new SysConfig(); |
| | | if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("6")) { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("zymyd.sms.template"); |
| | | }else if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("14")) { |
| | | } else if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("14")) { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("mzmyd.sms.template"); |
| | | }else { |
| | | } else { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("wj.sms.template"); |
| | | } |
| | | if (!Objects.isNull(sysConfig)) { |
| | |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(serviceSubtask.getOrgid()); |
| | | serviceOutPath.setDeptCode(serviceSubtask.getDeptcode()); |
| | | serviceOutPath.setWardCode(serviceSubtask.getLeavehospitaldistrictcode()); |
| | | serviceOutPath.setDeptName(serviceSubtask.getDeptname()); |
| | | serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | | serviceOutPath.setRadix(format); |
| | |
| | | String s = null; |
| | | if (active.equals("xh")) { |
| | | //æ°åççä¿¡åéæ¹å¼ |
| | | Map<String, String> req = new HashMap<>(); |
| | | req.put("phone", sendMagParam.getPhone()); |
| | | req.put("content", sendMagParam.getContent()); |
| | | log.info("contentè¿åå¼çå
容æ¯ï¼{}", sendMagParam.getContent()); |
| | | s = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | } else if (active.equals("ls")) { |
| | | // String url = configService.selectConfigByKey("token.360", serviceSubtask.getOrgid()); |
| | | // log.info("-------00token.360çURL为ï¼{}", url); |
| | | Map<String, String> map2 = new HashMap<String, String>(); |
| | | map2.put("action", "send"); |
| | | map2.put("account", xhsmsAccount); |
| | | map2.put("password", xhsmsPwd); |
| | | map2.put("mobile", sendMagParam.getPhone()); |
| | | map2.put("content", sendMagParam.getContent()); |
| | | map2.put("extno", xhsmsjrm); |
| | | map2.put("rt", "json"); |
| | | StringBuilder encodedParams = new StringBuilder(); |
| | | |
| | | for (Map.Entry<String, String> entry : map2.entrySet()) { |
| | | if (encodedParams.length() > 0) { |
| | | encodedParams.append("&"); |
| | | } |
| | | // 对é®åå¼è¿è¡URLç¼ç |
| | | String encodedKey = URLEncoder.encode(entry.getKey(), "UTF-8"); |
| | | String encodedValue = URLEncoder.encode(entry.getValue(), "UTF-8"); |
| | | encodedParams.append(encodedKey).append("=").append(encodedValue); |
| | | } |
| | | Boolean isSuccess = HttpUtil.postJsonRequest(xhsmsPath, encodedParams.toString()); |
| | | if (isSuccess) s = "true"; |
| | | } else if (active.equals("ls")) { |
| | | //丽水ççä¿¡åéæ¹å¼ |
| | | SysConfig config = new SysConfig(); |
| | | config.setConfigKey("ls.msg.info"); |
| | |
| | | String sign = Md5Utils.hash(xhsmsAccount + timestamp + Md5Utils.hash(xhsmsPwd)); |
| | | String content = sendMagParam.getContent(); |
| | | String jsonMsg = "{" + "\"userName\": \"" + xhsmsAccount + "\"," + "\"content\": \"" + content + "\"," + "\"phoneList\": [" + sendMagParam.getPhone() + "]," + "\"timestamp\": " + timestamp + "," + "\"sign\": \"" + sign + "\"" + "}"; |
| | | s = HttpUtil.postJsonRequest(xhsmsPath, jsonMsg); |
| | | Boolean b = HttpUtil.postJsonRequest(xhsmsPath, jsonMsg); |
| | | if (b) s = "true"; |
| | | log.info("------å¸ä¸çä¿¡åéçå¼ä¸ºï¼{}", s); |
| | | if (StringUtils.isNotEmpty(s)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(serviceSubtask.getOrgid()); |
| | | serviceOutPath.setDeptCode(serviceSubtask.getDeptcode()); |
| | | serviceOutPath.setWardCode(serviceSubtask.getLeavehospitaldistrictcode()); |
| | | serviceOutPath.setDeptName(serviceSubtask.getDeptname()); |
| | | serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | | serviceOutPath.setRadix(format); |
| | |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setOrgid(serviceSubtask.getOrgid()); |
| | | serviceOutPath.setDeptCode(serviceSubtask.getDeptcode()); |
| | | serviceOutPath.setWardCode(serviceSubtask.getLeavehospitaldistrictcode()); |
| | | serviceOutPath.setDeptName(serviceSubtask.getDeptname()); |
| | | serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | | serviceOutPath.setRadix(format); |
| | |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setDeptCode(serviceSubtask.getDeptcode()); |
| | | serviceOutPath.setWardCode(serviceSubtask.getLeavehospitaldistrictcode()); |
| | | serviceOutPath.setDeptName(serviceSubtask.getDeptname()); |
| | | serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname()); |
| | | serviceOutPath.setOrgid(serviceSubtask.getOrgid()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | |
| | | import com.ruoyi.common.utils.HttpUtil; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.smartor.common.MtSubmitSmUtil; |
| | | import com.smartor.common.ShiyiSmsUtil; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Date; |
| | |
| | | |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | // èææ¥å
¥ç |
| | | @Value("${xhsmsjrm}") |
| | | private String xhsmsjrm; |
| | | |
| | | @Value("${localIP}") |
| | | private String ip; |
| | |
| | | } |
| | | } |
| | | } else if (active.equals("xh")) { |
| | | Map<String, String> req = new HashMap<>(); |
| | | req.put("phone", vo.getPhone()); |
| | | req.put("content", vo.getContent()); |
| | | sendMsg = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | // Map<String, String> req = new HashMap<>(); |
| | | // req.put("phone", vo.getPhone()); |
| | | // req.put("content", vo.getContent()); |
| | | // Boolean result = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | Map<String, String> map2 = new HashMap<String, String>(); |
| | | map2.put("action", "send"); |
| | | map2.put("account", xhsmsAccount); |
| | | map2.put("password", xhsmsPwd); |
| | | map2.put("mobile", vo.getPhone()); |
| | | map2.put("content", vo.getContent()); |
| | | map2.put("extno", xhsmsjrm); |
| | | map2.put("rt", "json"); |
| | | StringBuilder encodedParams = new StringBuilder(); |
| | | |
| | | for (Map.Entry<String, String> entry : map2.entrySet()) { |
| | | if (encodedParams.length() > 0) { |
| | | encodedParams.append("&"); |
| | | } |
| | | // 对é®åå¼è¿è¡URLç¼ç |
| | | String encodedKey = URLEncoder.encode(entry.getKey(), "UTF-8"); |
| | | String encodedValue = URLEncoder.encode(entry.getValue(), "UTF-8"); |
| | | encodedParams.append(encodedKey).append("=").append(encodedValue); |
| | | } |
| | | Boolean result = HttpUtils.sendPost(xhsmsPath, encodedParams.toString()); |
| | | if (result) { |
| | | sendMsg = "true"; |
| | | } |
| | | } else if (active.equals("ls")) { |
| | | //丽水13å®¶å»é¢ï¼æç¹ä¸æ¹ä¾¿ï¼æç©ºåæ¥ |
| | | return AjaxResult.error("该çä¿¡åè½è¿æªå¼é"); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.MedicationDoseInfo; |
| | | import com.smartor.service.IMedicationDoseInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¯ååéä¿¡æ¯Controller |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Api("è¯ååéä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/smartor/medicationDoseInfo") |
| | | public class MedicationDoseInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IMedicationDoseInfoService medicationDoseInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯ååéä¿¡æ¯å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢è¯ååéä¿¡æ¯å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:info:list')") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody MedicationDoseInfo medicationDoseInfo) |
| | | { |
| | | startPage(); |
| | | List<MedicationDoseInfo> list = medicationDoseInfoService.selectMedicationDoseInfoList(medicationDoseInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè¯ååéä¿¡æ¯å表 |
| | | */ |
| | | @ApiOperation("导åºè¯ååéä¿¡æ¯å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:info:export')") |
| | | @Log(title = "è¯ååéä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, MedicationDoseInfo medicationDoseInfo) |
| | | { |
| | | List<MedicationDoseInfo> list = medicationDoseInfoService.selectMedicationDoseInfoList(medicationDoseInfo); |
| | | ExcelUtil<MedicationDoseInfo> util = new ExcelUtil<MedicationDoseInfo>(MedicationDoseInfo.class); |
| | | util.exportExcel(response, list, "è¯ååéä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åè¯ååéä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åè¯ååéä¿¡æ¯è¯¦ç»ä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:info:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(medicationDoseInfoService.selectMedicationDoseInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¯ååéä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("æ°å¢è¯ååéä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:info:add')") |
| | | @Log(title = "è¯ååéä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody MedicationDoseInfo medicationDoseInfo) |
| | | { |
| | | return toAjax(medicationDoseInfoService.insertMedicationDoseInfo(medicationDoseInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯ååéä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹è¯ååéä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:info:edit')") |
| | | @Log(title = "è¯ååéä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody MedicationDoseInfo medicationDoseInfo) |
| | | { |
| | | return toAjax(medicationDoseInfoService.updateMedicationDoseInfo(medicationDoseInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¯ååéä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("å é¤è¯ååéä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:info:remove')") |
| | | @Log(title = "è¯ååéä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(medicationDoseInfoService.deleteMedicationDoseInfoByIds(ids)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.MedicationItem; |
| | | import com.smartor.service.IMedicationItemService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¯åä¿¡æ¯Controller |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Api("è¯åä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/smartor/medicationitem") |
| | | public class MedicationItemController extends BaseController { |
| | | @Autowired |
| | | private IMedicationItemService medicationItemService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯åä¿¡æ¯å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢è¯åä¿¡æ¯å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:item:list')") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody MedicationItem medicationItem) { |
| | | startPage(); |
| | | List<MedicationItem> list = medicationItemService.selectMedicationItemList(medicationItem); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè¯åä¿¡æ¯å表 |
| | | */ |
| | | @ApiOperation("导åºè¯åä¿¡æ¯å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:item:export')") |
| | | @Log(title = "è¯åä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, MedicationItem medicationItem) { |
| | | List<MedicationItem> list = medicationItemService.selectMedicationItemList(medicationItem); |
| | | ExcelUtil<MedicationItem> util = new ExcelUtil<MedicationItem>(MedicationItem.class); |
| | | util.exportExcel(response, list, "è¯åä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åè¯åä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åè¯åä¿¡æ¯è¯¦ç»ä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:item:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(medicationItemService.selectMedicationItemById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¯åä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("æ°å¢è¯åä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:item:add')") |
| | | @Log(title = "è¯åä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody MedicationItem medicationItem) { |
| | | return toAjax(medicationItemService.insertMedicationItem(medicationItem)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯åä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹è¯åä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:item:edit')") |
| | | @Log(title = "è¯åä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody MedicationItem medicationItem) { |
| | | return toAjax(medicationItemService.updateMedicationItem(medicationItem)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¯åä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("å é¤è¯åä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:item:remove')") |
| | | @Log(title = "è¯åä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(medicationItemService.deleteMedicationItemByIds(ids)); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.google.zxing.BarcodeFormat; |
| | | import com.google.zxing.EncodeHintType; |
| | | import com.google.zxing.WriterException; |
| | | import com.google.zxing.client.j2se.MatrixToImageWriter; |
| | | import com.google.zxing.common.BitMatrix; |
| | | import com.google.zxing.qrcode.QRCodeWriter; |
| | | import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; |
| | | import com.mchange.v2.uid.UidUtils; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.awt.Color; |
| | | import java.awt.Graphics2D; |
| | | import java.awt.RenderingHints; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.StringWriter; |
| | | import java.net.URI; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | |
| | | |
| | | @Value("${ruoyi.profile}") |
| | | private String profile; |
| | | |
| | | /** |
| | | * å
¬å¸logoå¨classpathä¸çè·¯å¾ï¼æå
è¿jaråä»»ä½ç¯å¢é½è½è¯»åå° |
| | | */ |
| | | private static final String LOGO_CLASSPATH = "/images/hrslogo.png"; |
| | | |
| | | @Autowired |
| | | private ServerConfig serverConfig; |
| | |
| | | @PostMapping(value = "/getQRcode") |
| | | public AjaxResult getQRcode(@RequestParam("url") String url) { |
| | | log.info("è·åé®å·äºç»´ç çå
¥åï¼{}", url); |
| | | String uuid = UUID.randomUUID().toString().replace("-", ""); |
| | | String filePath = profile + "\\qrpath" + "\\" + uuid + ".png"; // ä¿åäºç»´ç å¾åçæä»¶è·¯å¾ |
| | | // å°è¯ä»url䏿åpåæ°çå¼ä½ä¸ºå¾çåç§°ï¼å¼ä¸ºç©ºåç¨UUID |
| | | String fileName = UUID.randomUUID().toString().replace("-", ""); |
| | | try { |
| | | URI uri = new URI(url); |
| | | String query = uri.getQuery(); |
| | | if (query != null) { |
| | | for (String param : query.split("&")) { |
| | | String[] pair = param.split("=", 2); |
| | | if ("p".equals(pair[0]) && pair.length > 1 && !pair[1].isEmpty()) { |
| | | fileName = pair[1] + "-" + System.currentTimeMillis(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.warn("è§£æurlä¸çpåæ°å¤±è´¥ï¼ä½¿ç¨UUIDä½ä¸ºæä»¶å"); |
| | | } |
| | | String filePath = profile + "\\qrpath" + "\\" + fileName + ".png"; // ä¿åäºç»´ç å¾åçæä»¶è·¯å¾ |
| | | //夿æä»¶å¤¹æ¯å¦åå¨ |
| | | File file = new File(profile + "\\qrpath"); |
| | | if (!file.exists()) { |
| | | file.mkdirs(); |
| | | } |
| | | generateQRCode(url, filePath); |
| | | return AjaxResult.success(serverConfig.getUrl() + "/profile/qrpath/" + uuid + ".png"); |
| | | return AjaxResult.success(serverConfig.getUrl() + "/profile/qrpath/" + fileName + ".png"); |
| | | } |
| | | |
| | | private void generateQRCode(String url, String filePath) { |
| | | QRCodeWriter qrCodeWriter = new QRCodeWriter(); |
| | | try { |
| | | BitMatrix bitMatrix = qrCodeWriter.encode(url, BarcodeFormat.QR_CODE, 500, 500); |
| | | // 使ç¨é«å®¹é级å«ï¼H级ï¼30%容éï¼ï¼ç¡®ä¿äºç»´ç ä¸é´åµå
¥logoåä»å¯æ£å¸¸æ«æ |
| | | Map<EncodeHintType, Object> hints = new HashMap<>(); |
| | | hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); |
| | | hints.put(EncodeHintType.CHARACTER_SET, "UTF-8"); |
| | | hints.put(EncodeHintType.MARGIN, 1); |
| | | |
| | | BitMatrix bitMatrix = qrCodeWriter.encode(url, BarcodeFormat.QR_CODE, 500, 500, hints); |
| | | |
| | | // å°BitMatrix转为äºå¼BufferedImageï¼é»ç½ï¼ |
| | | BufferedImage binaryImage = MatrixToImageWriter.toBufferedImage(bitMatrix); |
| | | |
| | | // å建RGB彩è²å¾åï¼æäºç»´ç ç»ä¸å»ï¼å¦ååç»ç»å¶logoä¼ä¸¢å¤±é¢è² |
| | | BufferedImage qrImage = new BufferedImage(500, 500, BufferedImage.TYPE_INT_RGB); |
| | | Graphics2D graphics = qrImage.createGraphics(); |
| | | graphics.setColor(Color.WHITE); |
| | | graphics.fillRect(0, 0, 500, 500); |
| | | graphics.drawImage(binaryImage, 0, 0, null); |
| | | |
| | | // ä»classpath读ålogoå¹¶ç»å¶å°äºç»´ç ä¸é´ |
| | | try (InputStream logoStream = this.getClass().getResourceAsStream(LOGO_CLASSPATH)) { |
| | | if (logoStream != null) { |
| | | BufferedImage logoImage = ImageIO.read(logoStream); |
| | | |
| | | // 计ç®logo尺寸ï¼è®¾ä¸ºäºç»´ç ç1/5 |
| | | int logoWidth = qrImage.getWidth() / 5; |
| | | int logoHeight = qrImage.getHeight() / 5; |
| | | |
| | | // 计ç®logoå±
ä¸ä½ç½® |
| | | int logoX = (qrImage.getWidth() - logoWidth) / 2; |
| | | int logoY = (qrImage.getHeight() - logoHeight) / 2; |
| | | |
| | | // ç»å¶ç½è²åè§èæ¯ï¼è®©logoæ´çªåº |
| | | int padding = 6; |
| | | graphics.setColor(Color.WHITE); |
| | | graphics.fillRoundRect(logoX - padding, logoY - padding, logoWidth + padding * 2, logoHeight + padding * 2, 10, 10); |
| | | |
| | | // ç»å¶logo |
| | | graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
| | | graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
| | | graphics.drawImage(logoImage, logoX, logoY, logoWidth, logoHeight, null); |
| | | } else { |
| | | log.warn("classpath䏿ªæ¾å°äºç»´ç logo: {}", LOGO_CLASSPATH); |
| | | } |
| | | } |
| | | graphics.dispose(); |
| | | |
| | | // è¾åºæç»å¾ç |
| | | File outputFile = new File(filePath); |
| | | MatrixToImageWriter.writeToPath(bitMatrix, "PNG", outputFile.toPath()); |
| | | ImageIO.write(qrImage, "PNG", outputFile); |
| | | } catch (WriterException | IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.ServiceAppointRecord; |
| | | import com.smartor.service.IServiceAppointRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é¢çº¦è®°å½Controller |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-06 |
| | | */ |
| | | @Api("é¢çº¦è®°å½") |
| | | @RestController |
| | | @RequestMapping("/smartor/record") |
| | | public class ServiceAppointRecordController extends BaseController { |
| | | @Autowired |
| | | private IServiceAppointRecordService serviceAppointRecordService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢çº¦è®°å½å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢é¢çº¦è®°å½å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:record:list')") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceAppointRecord serviceAppointRecord) { |
| | | startPage(); |
| | | List<ServiceAppointRecord> list = serviceAppointRecordService.selectServiceAppointRecordList(serviceAppointRecord); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºé¢çº¦è®°å½å表 |
| | | */ |
| | | @ApiOperation("导åºé¢çº¦è®°å½å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:record:export')") |
| | | @Log(title = "é¢çº¦è®°å½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceAppointRecord serviceAppointRecord) { |
| | | List<ServiceAppointRecord> list = serviceAppointRecordService.selectServiceAppointRecordList(serviceAppointRecord); |
| | | ExcelUtil<ServiceAppointRecord> util = new ExcelUtil<ServiceAppointRecord>(ServiceAppointRecord.class); |
| | | util.exportExcel(response, list, "é¢çº¦è®°å½æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åé¢çº¦è®°å½è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åé¢çº¦è®°å½è¯¦ç»ä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:record:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(serviceAppointRecordService.selectServiceAppointRecordById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é¢çº¦è®°å½ |
| | | */ |
| | | @ApiOperation("æ°å¢é¢çº¦è®°å½") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:record:add')") |
| | | @Log(title = "é¢çº¦è®°å½", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody ServiceAppointRecord serviceAppointRecord) { |
| | | return toAjax(serviceAppointRecordService.insertServiceAppointRecord(serviceAppointRecord)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é¢çº¦è®°å½ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹é¢çº¦è®°å½") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:record:edit')") |
| | | @Log(title = "é¢çº¦è®°å½", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody ServiceAppointRecord serviceAppointRecord) { |
| | | return toAjax(serviceAppointRecordService.updateServiceAppointRecord(serviceAppointRecord)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é¢çº¦è®°å½ |
| | | */ |
| | | @ApiOperation("å é¤é¢çº¦è®°å½") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:record:remove')") |
| | | @Log(title = "é¢çº¦è®°å½", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceAppointRecordService.deleteServiceAppointRecordByIds(ids)); |
| | | } |
| | | } |
| | |
| | | return toAjax(serviceOutPathService.insertServiceOutPath(serviceOutPath)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ä¸»é® |
| | | */ |
| | | @ApiOperation("æ°å¢ä¸»é®") |
| | | @Log(title = "主é®", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOutPath") |
| | | public AjaxResult addOutPath(@RequestBody ServiceOutPath serviceOutPath) { |
| | | return success(serviceOutPathService.addOutPath(serviceOutPath)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¸»é® |
| | | */ |
| | |
| | | @PostMapping("/getQuestionCache") |
| | | public AjaxResult getQuestionCache(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) { |
| | | log.info("ãsaveQuestionCache-----getQuestionCacheãçå
¥å为ï¼{}", serviceSubTaskCacheReq); |
| | | if (StringUtils.isEmpty(serviceSubTaskCacheReq.getParam1()) || StringUtils.isEmpty(serviceSubTaskCacheReq.getParam2())) |
| | | throw new BaseException("è¯·æ£æ¥param1æparam2çå¼"); |
| | | // if (StringUtils.isEmpty(serviceSubTaskCacheReq.getParam1()) || StringUtils.isEmpty(serviceSubTaskCacheReq.getParam2())) |
| | | // throw new BaseException("è¯·æ£æ¥param1æparam2çå¼"); |
| | | return AjaxResult.success(serviceSubtaskAnswerService.getQuestionCache(serviceSubTaskCacheReq, 0L)); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.github.pagehelper.ISelect; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.dx.MessageSend; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.MsgLSEnum; |
| | | import com.ruoyi.common.enums.PreachFormEnum; |
| | | import com.ruoyi.common.enums.SendStateEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | |
| | | import com.ruoyi.common.utils.reflect.ReflectUtils; |
| | | import com.ruoyi.quartz.service.ICollectHISService; |
| | | import com.ruoyi.quartz.task.RyTask; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysUserDeptService; |
| | | import com.smartor.common.LSHospTokenUtil; |
| | | import com.smartor.common.QwenLLMUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.VO.HeLibraryCountVO; |
| | | import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | |
| | | @ApiOperation("æ¥è¯¢æ£è
é访信æ¯") |
| | | @PostMapping("/patItem") |
| | | public Map<String, Object> patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | |
| | | serviceSubtaskVO.setPageNum(PageUtils.getOffset(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize())); |
| | | List<ServiceSubtaskRes> serviceSubtaskList = null; |
| | | LoginUser loginUser = getLoginUser(); |
| | |
| | | if (ObjectUtils.isNotEmpty(loginUser) && ObjectUtils.isNotEmpty(loginUser.getUser())) { |
| | | userId = loginUser.getUser().getUserId(); |
| | | } |
| | | if (serviceSubtaskEntity.getSendstateView() != null) { |
| | | // 1ï¼å¾
é访ï¼1 被é¢åã2 å¾
åéã3 å·²åéã5 åé失败ã7ãè¶
æ¶ï¼ï¼2ï¼å·²å®æï¼ 6 已宿ï¼ã3ï¼æ éé访ï¼4 䏿§è¡ï¼ |
| | | if (serviceSubtaskEntity.getSendstateView() == 1) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(1L, 2L, 3L, 5L, 7L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 2) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 3) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(4L))); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(userId)) { |
| | | Map<String, Object> redisMap = redisCache.getCacheObject(userId + "patItemCount"); |
| | | Boolean redisFlag = false; |
| | |
| | | |
| | | //è·åserviceSubtaskListä¸çæætaskid |
| | | List<Long> taskIds = serviceSubtaskList.stream().map(ServiceSubtaskRes::getTaskid).filter(ObjectUtils::isNotEmpty).distinct().collect(Collectors.toList()); |
| | | serviceSubtaskDetailRatioExports = serviceSubtaskService.statQuestionOption(taskIds); |
| | | serviceSubtaskDetailRatioExports = serviceSubtaskService.statQuestionOption(taskIds, serviceSubtaskVO.getStartOutHospTime(), serviceSubtaskVO.getEndOutHospTime()); |
| | | |
| | | } |
| | | |
| | | |
| | | ExcelUtil<ServiceSubtaskExport> util = new ExcelUtil<ServiceSubtaskExport>(ServiceSubtaskExport.class); |
| | | util.exportExcelTwoSheet(response, serviceSubtaskExports, "æ£è
é访信æ¯è¡¨å", |
| | | serviceSubtaskDetailRatioExports, "é®é¢è¯¦æ
å æ¯", ServiceSubtaskDetailRatioExport.class); |
| | | util.exportExcelTwoSheet(response, serviceSubtaskExports, "æ£è
é访信æ¯è¡¨å", serviceSubtaskDetailRatioExports, "é®é¢è¯¦æ
å æ¯", ServiceSubtaskDetailRatioExport.class); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (statisticaltype == 1) { |
| | | if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())) { |
| | | //å
¨é¨ç
åº |
| | | String deptInfo = user.getDeptInfo(); |
| | | List<String> leavehospitaldistrictcodes = JSON.parseArray(deptInfo).stream().map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList()); |
| | | List<String> leavehospitaldistrictcodes = null; |
| | | SysUserDept sysUserWard = new SysUserDept(); |
| | | sysUserWard.setUserId(user.getUserId()); |
| | | sysUserWard.setOrgid(user.getOrgid()); |
| | | sysUserWard.setDeptType("2"); |
| | | List<SysUserDept> wardList = sysUserDeptService.selectSysUserDeptList(sysUserWard); |
| | | if(CollectionUtils.isNotEmpty(wardList)) { |
| | | leavehospitaldistrictcodes = wardList.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList()); |
| | | } |
| | | serviceSubtaskCountReq.setLeavehospitaldistrictcodes(leavehospitaldistrictcodes); |
| | | } |
| | | } else if (statisticaltype == 2) { |
| | | if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getDeptcodes())) { |
| | | //å
¨é¨ç§å®¤ |
| | | String hospInfo = user.getHospInfo(); |
| | | List<String> deptCodes = JSON.parseArray(hospInfo).stream().map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList()); |
| | | List<String> deptCodes = null; |
| | | SysUserDept sysUserDept = new SysUserDept(); |
| | | sysUserDept.setUserId(user.getUserId()); |
| | | sysUserDept.setOrgid(user.getOrgid()); |
| | | sysUserDept.setDeptType("1"); |
| | | List<SysUserDept> deptList = sysUserDeptService.selectSysUserDeptList(sysUserDept); |
| | | if(CollectionUtils.isNotEmpty(deptList)){ |
| | | deptCodes = deptList.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList()); |
| | | } |
| | | serviceSubtaskCountReq.setDeptcodes(deptCodes); |
| | | } |
| | | } |
| | |
| | | log.info("getScriptInfoByConditionå
¥å为ï¼{}", serviceTaskScriptQues); |
| | | try { |
| | | tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key)); |
| | | pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key)); |
| | | if (StringUtils.isNotEmpty(serviceTaskScriptQues.getParam2())) |
| | | pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key)); |
| | | } catch (Exception e) { |
| | | log.error("getScriptInfoByConditionæ¥éäºï¼{}", e.getMessage()); |
| | | } |
| | | |
| | | log.info("tidåpidçå¼ä¸ºï¼{},{}", tid, pid); |
| | | if (StringUtils.isEmpty(serviceTaskScriptQues.getPatfrom())) serviceTaskScriptQues.setPatfrom("0"); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(),null)); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(), null)); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | log.info("tidåpidçå¼ä¸ºï¼{},{}", tid, pid); |
| | | if (StringUtils.isEmpty(serviceTaskScriptQues.getPatfrom())) serviceTaskScriptQues.setPatfrom("0"); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(),null)); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom(), null)); |
| | | } |
| | | |
| | | |
| | |
| | | return httpClient; |
| | | } |
| | | |
| | | public static String postJsonRequest(String url, String request) throws HttpRequestException { |
| | | public static Boolean postJsonRequest(String url, String request) throws HttpRequestException { |
| | | Assert.hasLength(url, "请æ±urlä¸è½ä¸ºç©ºå符串ã"); |
| | | EntityEnclosingMethod httpMethod = new PostMethod(url); |
| | | |
| | |
| | | if (inputStream == null) { |
| | | throw new HttpRequestException(RESPONSE_NULL_ERROR_CODE, "ååºä¸ºnull"); |
| | | } |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream,charset)); |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, charset)); |
| | | StringBuffer stringBuffer = new StringBuffer(); |
| | | String str = ""; |
| | | while ((str = reader.readLine()) != null) { |
| | |
| | | String respJson = stringBuffer.toString(); |
| | | // String respJson = httpMethod.getResponseBodyAsString(); |
| | | if (resultCode == OK) { |
| | | return respJson; |
| | | return true; |
| | | } else { |
| | | throw new HttpRequestException(resultCode, respJson); |
| | | } |
| | |
| | | * jsonçpostè¯·æ± |
| | | * |
| | | * @param url 请æ±url |
| | | * @param reqEntity 请æ±å¤´ä¸è¯·æ±ä½çå°è£
|
| | | * @param respBodyClass ååºä½ç±»å |
| | | * @return è¿åçååºç»æ |
| | | */ |
| | | public static String postXmlRequest(String url, String request) throws HttpRequestException { |
| | |
| | | * @param param 请æ±åæ°ï¼è¯·æ±åæ°åºè¯¥æ¯ name1=value1&name2=value2 çå½¢å¼ã |
| | | * @return æä»£è¡¨è¿ç¨èµæºçååºç»æ |
| | | */ |
| | | public static String sendPost(String url, String param) { |
| | | public static Boolean sendPost(String url, String param) { |
| | | PrintWriter out = null; |
| | | BufferedReader in = null; |
| | | StringBuilder result = new StringBuilder(); |
| | | boolean success = false; |
| | | try { |
| | | log.info("sendPost - {}", url); |
| | | URL realUrl = new URL(url); |
| | |
| | | result.append(line); |
| | | } |
| | | log.info("recv - {}", result); |
| | | success = true; |
| | | } catch (ConnectException e) { |
| | | log.error("è°ç¨HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e); |
| | | } catch (SocketTimeoutException e) { |
| | |
| | | log.error("è°ç¨in.close Exception, url=" + url + ",param=" + param, ex); |
| | | } |
| | | } |
| | | return result.toString(); |
| | | return success; |
| | | } |
| | | |
| | | public static String sendPostByHeaderOld(String url, String param, Map<String, String> headers) { |
| | |
| | | "\"timestamp\": " + timestamp + "," + |
| | | "\"sign\": \"" + sign + "\"" + |
| | | "}"; |
| | | String sendMsg=HttpUtil.postJsonRequest(url, jsonMsg); |
| | | return sendMsg; |
| | | Boolean sendMsg=HttpUtil.postJsonRequest(url, jsonMsg); |
| | | return sendMsg.toString(); |
| | | |
| | | } |
| | | |
| | |
| | | "\"timestamp\": " + timestamp + "," + |
| | | "\"sign\": \"" + sign + "\"" + |
| | | "}"; |
| | | String sendMsg=HttpUtil.postJsonRequest(url, jsonMsg); |
| | | return sendMsg; |
| | | Boolean sendMsg=HttpUtil.postJsonRequest(url, jsonMsg); |
| | | return sendMsg.toString(); |
| | | |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.enums.MsgLSEnum; |
| | | import com.ruoyi.common.enums.ServiceFromEnum; |
| | | import com.ruoyi.common.enums.WxGZHEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static cn.hutool.core.convert.Convert.toHex; |
| | |
| | | |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | // èææ¥å
¥ç |
| | | @Value("${xhsmsjrm}") |
| | | private String xhsmsjrm; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | |
| | | serviceSubtaskAnswerService.saveQuestionAnswer(null, 0L); |
| | | } |
| | | |
| | | /** |
| | | * è·åé¢çº¦åè¯è®°å½ä¿¡æ¯ |
| | | * |
| | | */ |
| | | public void getAppointRecordInfo() { |
| | | LocalDateTime tomorrowStart = LocalDate.now().plusDays(1).atStartOfDay(); // æå¤© 00:00:00 |
| | | LocalDateTime tomorrowEnd = tomorrowStart.plusDays(1).minusSeconds(1); // æå¤© 23:59:59 |
| | | ixhGatherPatArchiveService.getAppointRecordInfo("2", tomorrowStart, tomorrowEnd); |
| | | } |
| | | |
| | | /** |
| | | * HISæ°æ®éé |
| | |
| | | aBoolean = serviceSLTDHealthcareRecordService.queryHospUserInfoList(reqVO); |
| | | } |
| | | log.info("ãdealHisDataãçç«åå¾·âç¨æ·ä¿¡æ¯âç»æééæ°æ®ï¼{}", aBoolean); |
| | | //ç¾ç
åå
¸éé |
| | | iIcd10Service.queryAddIcd10(); |
| | | } |
| | | //ç¾ç
åå
¸éé |
| | | iIcd10Service.queryAddIcd10(); |
| | | |
| | | // çç«åå¾·æ°æ®éé |
| | | for (Long cid : campusidList) { |
| | | log.info("ãdealHisDataãçç«åå¾·âé¢å
¥é¢âå¼å§ééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | String nowTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | ServiceSLTDInhospReqVO serviceSLTDInhospReqVO = new ServiceSLTDInhospReqVO(); |
| | | serviceSLTDInhospReqVO.setOrgId("20001001"); |
| | | serviceSLTDInhospReqVO.setCampusId(cid); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime); |
| | | if (active.trim().equals("nhfy")) { |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | // nhfy/sltdåæº¯30天忮µééå¤æï¼æ¯æ®µæå¤7å¤©ï¼ |
| | | boolean isBackfill = (active.trim().equals("nhfy") || active.trim().equals("sltd")) && StringUtils.isNotBlank(todayZeroStr); |
| | | if (isBackfill) { |
| | | DateTimeFormatter dateFmt = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | LocalDate segStart = todayZero.toLocalDate().minusDays(30); |
| | | LocalDate segEndDate = todayZero.toLocalDate(); |
| | | int segCount = 0; |
| | | while (!segStart.isAfter(segEndDate)) { |
| | | LocalDate segEnd = segStart.plusDays(6); |
| | | if (segEnd.isAfter(segEndDate)) { |
| | | segEnd = segEndDate; |
| | | } |
| | | segCount++; |
| | | log.info("ãdealHisDataã{}åæº¯ç¬¬{}段ééï¼æ¥æèå´ï¼{} ~ {}", active.trim(), segCount, segStart.format(dateFmt), segEnd.format(dateFmt)); |
| | | for (Long cid : campusidList) { |
| | | collectSegmentData(cid, segStart.format(dateFmt), segEnd.format(dateFmt)); |
| | | } |
| | | segStart = segEnd.plusDays(1); |
| | | } |
| | | List<String> list = new ArrayList<>(); |
| | | list.add("FH0109.22"); |
| | | list.add("FH0109.23"); |
| | | list.add("FH0109.53"); |
| | | serviceSLTDInhospReqVO.setStatusList(list); |
| | | log.info("ãdealHisDataãçç«åå¾·âé¢å
¥é¢âééæ°æ®å
¥åï¼{}", serviceSLTDInhospReqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âé¢å
¥é¢âçµæééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | log.info("ãdealHisDataã{}åæº¯éé宿ï¼å
±{}段", active.trim(), segCount); |
| | | } |
| | | |
| | | log.info("ãdealHisDataãçç«åå¾·âå
¥é¢âå¼å§ééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | serviceSLTDInhospReqVO.setOrgId("20001001"); |
| | | serviceSLTDInhospReqVO.setCampusId(cid); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(null); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(null); |
| | | serviceSLTDInhospReqVO.setStartHeadTime(nowTime); |
| | | serviceSLTDInhospReqVO.setStartTailTime(nowTime); |
| | | if (active.trim().equals("nhfy")) { |
| | | serviceSLTDInhospReqVO.setStartHeadTime(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setStartTailTime(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | List<String> listStr = new ArrayList<>(); |
| | | listStr.add("FH0109.24"); |
| | | serviceSLTDInhospReqVO.setStatusList(listStr); |
| | | log.info("ãdealHisDataãçç«åå¾·âå
¥é¢âééæ°æ®å
¥åï¼{}", serviceSLTDInhospReqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âå
¥é¢âçµæééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | // çç«åå¾·æ°æ®ééï¼éåæº¯æ¨¡å¼ææ§è¡ï¼ |
| | | if (!isBackfill) { |
| | | for (Long cid : campusidList) { |
| | | log.info("ãdealHisDataãçç«åå¾·é¢å
¥é¢å¼å§ééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | String nowTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | ServiceSLTDInhospReqVO serviceSLTDInhospReqVO = new ServiceSLTDInhospReqVO(); |
| | | serviceSLTDInhospReqVO.setOrgId("20001001"); |
| | | serviceSLTDInhospReqVO.setCampusId(cid); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime); |
| | | if (active.trim().equals("nhfy")) { |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | List<String> list = new ArrayList<>(); |
| | | list.add("FH0109.22"); |
| | | list.add("FH0109.23"); |
| | | list.add("FH0109.53"); |
| | | serviceSLTDInhospReqVO.setStatusList(list); |
| | | log.info("ãdealHisDataãçç«åå¾·âé¢å
¥é¢âééæ°æ®å
¥åï¼{}", serviceSLTDInhospReqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âé¢å
¥é¢âçµæééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | |
| | | log.info("ãdealHisDataãçç«åå¾·âåºé¢âå¼å§ééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | serviceSLTDInhospReqVO.setStartHeadTime(null); |
| | | serviceSLTDInhospReqVO.setStartTailTime(null); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(null); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(null); |
| | | serviceSLTDInhospReqVO.setPreOutHospitalHeadDate(nowTime); |
| | | serviceSLTDInhospReqVO.setPreOutHospitalTailDate(nowTime); |
| | | if (active.trim().equals("nhfy")) { |
| | | serviceSLTDInhospReqVO.setPreOutHospitalHeadDate(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setPreOutHospitalTailDate(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | serviceSLTDInhospReqVO.setHealthcareRecordTypeList(null); |
| | | List<String> list2 = new ArrayList<>(); |
| | | log.info("ãdealHisDataãçç«åå¾·âå
¥é¢âå¼å§ééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | serviceSLTDInhospReqVO.setOrgId("20001001"); |
| | | serviceSLTDInhospReqVO.setCampusId(cid); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(null); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(null); |
| | | serviceSLTDInhospReqVO.setStartHeadTime(nowTime); |
| | | serviceSLTDInhospReqVO.setStartTailTime(nowTime); |
| | | if (active.trim().equals("nhfy")) { |
| | | serviceSLTDInhospReqVO.setStartHeadTime(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setStartTailTime(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | List<String> listStr = new ArrayList<>(); |
| | | listStr.add("FH0109.24"); |
| | | serviceSLTDInhospReqVO.setStatusList(listStr); |
| | | log.info("ãdealHisDataãçç«åå¾·âå
¥é¢âééæ°æ®å
¥åï¼{}", serviceSLTDInhospReqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âå
¥é¢âçµæééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | |
| | | log.info("ãdealHisDataãçç«åå¾·âåºé¢âå¼å§ééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | serviceSLTDInhospReqVO.setStartHeadTime(null); |
| | | serviceSLTDInhospReqVO.setStartTailTime(null); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(null); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(null); |
| | | serviceSLTDInhospReqVO.setPreOutHospitalHeadDate(nowTime); |
| | | serviceSLTDInhospReqVO.setPreOutHospitalTailDate(nowTime); |
| | | if (active.trim().equals("nhfy")) { |
| | | serviceSLTDInhospReqVO.setPreOutHospitalHeadDate(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setPreOutHospitalTailDate(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | serviceSLTDInhospReqVO.setHealthcareRecordTypeList(null); |
| | | List<String> list2 = new ArrayList<>(); |
| | | // list2.add("FH0108.02"); |
| | | //åºé¢ |
| | | list2.add("FH0109.27"); |
| | | //é¢åºé¢ |
| | | list2.add("FH0109.25"); |
| | | serviceSLTDInhospReqVO.setStatusList(list2); |
| | | log.info("ãdealHisDataãçç«åå¾·âåºé¢âééæ°æ®å
¥åï¼{}", serviceSLTDInhospReqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âåºé¢âæééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | //åºé¢ |
| | | list2.add("FH0109.27"); |
| | | //é¢åºé¢ |
| | | list2.add("FH0109.25"); |
| | | serviceSLTDInhospReqVO.setStatusList(list2); |
| | | log.info("ãdealHisDataãçç«åå¾·âåºé¢âééæ°æ®å
¥åï¼{}", serviceSLTDInhospReqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âåºé¢âæééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | } |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ãdealHisDataãçç«åå¾·æ°æ®ééå¼å¸¸", e); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * åæ®µééæ°æ®ï¼é¢å
¥é¢ãå
¥é¢ãåºé¢ï¼ |
| | | * ç¨äºnhfy/sltdåæº¯ééï¼æ¯æ¬¡æå¤æ¥è¯¢7å¤©æ°æ® |
| | | * |
| | | * @param cid é¢åºID |
| | | * @param startDateStr æ¥æå¼å§ yyyy-MM-dd |
| | | * @param endDateStr æ¥æç»æ yyyy-MM-dd |
| | | */ |
| | | private void collectSegmentData(Long cid, String startDateStr, String endDateStr) { |
| | | // é¢å
¥é¢ |
| | | log.info("ãdealHisDataãé¢å
¥é¢å¼å§ééæ°æ®ï¼é¢åºï¼{}ï¼æ¶é´æ®µï¼{} ~ {}", cid, startDateStr, endDateStr); |
| | | ServiceSLTDInhospReqVO reqVO = new ServiceSLTDInhospReqVO(); |
| | | reqVO.setOrgId("20001001"); |
| | | reqVO.setCampusId(cid); |
| | | reqVO.setEncounterTimeStart(startDateStr); |
| | | reqVO.setEncounterTimeEnd(endDateStr); |
| | | List<String> preAdmitStatus = new ArrayList<>(); |
| | | preAdmitStatus.add("FH0109.22"); |
| | | preAdmitStatus.add("FH0109.23"); |
| | | preAdmitStatus.add("FH0109.53"); |
| | | reqVO.setStatusList(preAdmitStatus); |
| | | log.info("ãdealHisDataãé¢å
¥é¢ééæ°æ®å
¥åï¼{}", reqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(reqVO); |
| | | log.info("ãdealHisDataãé¢å
¥é¢çµäºééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | |
| | | // å
¥é¢ |
| | | log.info("ãdealHisDataãå
¥é¢å¼å§ééæ°æ®ï¼é¢åºï¼{}ï¼æ¶é´æ®µï¼{} ~ {}", cid, startDateStr, endDateStr); |
| | | reqVO = new ServiceSLTDInhospReqVO(); |
| | | reqVO.setOrgId("20001001"); |
| | | reqVO.setCampusId(cid); |
| | | reqVO.setStartHeadTime(startDateStr); |
| | | reqVO.setStartTailTime(endDateStr); |
| | | List<String> admitStatus = new ArrayList<>(); |
| | | admitStatus.add("FH0109.24"); |
| | | reqVO.setStatusList(admitStatus); |
| | | log.info("ãdealHisDataãå
¥é¢ééæ°æ®å
¥åï¼{}", reqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(reqVO); |
| | | log.info("ãdealHisDataãå
¥é¢çµäºééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | |
| | | // åºé¢ |
| | | log.info("ãdealHisDataãåºé¢å¼å§ééæ°æ®ï¼é¢åºï¼{}ï¼æ¶é´æ®µï¼{} ~ {}", cid, startDateStr, endDateStr); |
| | | reqVO = new ServiceSLTDInhospReqVO(); |
| | | reqVO.setOrgId("20001001"); |
| | | reqVO.setCampusId(cid); |
| | | reqVO.setPreOutHospitalHeadDate(startDateStr); |
| | | reqVO.setPreOutHospitalTailDate(endDateStr); |
| | | List<String> dischargeStatus = new ArrayList<>(); |
| | | //åºé¢ |
| | | dischargeStatus.add("FH0109.27"); |
| | | //é¢åºé¢ |
| | | dischargeStatus.add("FH0109.25"); |
| | | reqVO.setStatusList(dischargeStatus); |
| | | log.info("ãdealHisDataãåºé¢ééæ°æ®å
¥åï¼{}", reqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(reqVO); |
| | | log.info("ãdealHisDataãåºé¢ç»æééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | } |
| | | |
| | | /** |
| | |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | todayZero = LocalDateTime.parse(todayZeroStr, formatter); |
| | | } |
| | | LocalDateTime yesterdayZero = todayZero.minusDays(1); |
| | | LocalDateTime tomorrowdayZero = todayZero.plusDays(1); |
| | | |
| | | if (active.trim().equals("sltd") || active.trim().equals("nhfy")) { |
| | | //çç«åå¾·ä¸ååéä¸ç¨åä¸å¥ééæ¹æ³ï¼é½æ¯æ¥æªæ¥æä¾ï¼ |
| | |
| | | } |
| | | |
| | | // çç«åå¾·æ°æ®éé |
| | | log.info("--campusidListçå¼ä¸ºï¼{}", campusidList); |
| | | for (Long cid : campusidList) { |
| | | String nowTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | ServiceSLTDInhospReqVO serviceSLTDInhospReqVO = new ServiceSLTDInhospReqVO(); |
| | |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime); |
| | | |
| | | // 鍿¥è¯å页ééï¼æ¯é¡µ1000æ¡ï¼ç´å°æ æ°æ®ä¸ºæ¢(ååéä¸çå
ä¸é鍿¥è¯æ°æ®) |
| | | // 鍿¥è¯å页ééï¼æ¯é¡µ40æ¡ï¼ç´å°æ æ°æ®ä¸ºæ¢(ååéä¸çå
ä¸é鍿¥è¯æ°æ®) |
| | | if (active.trim().equals("sltd")) { |
| | | log.info("ãdealHisDataãçç«åå¾·â鍿¥è¯âå¼å§å页ééæ°æ®ï¼é¢åºï¼{}", cid); |
| | | serviceSLTDInhospReqVO.setStartHeadTime(null); |
| | | serviceSLTDInhospReqVO.setStartTailTime(null); |
| | | // serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime); |
| | | // serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime); |
| | | // if (yesterdayZero != null) { |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | // } |
| | | //æ¥è¯¢å½å¤©çæ°æ® |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(tomorrowdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setStatusList(null); |
| | | List<String> list1 = new ArrayList<>(); |
| | | list1.add("FH0108.01"); |
| | | list1.add("FH0108.03"); |
| | | serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list1); |
| | | long outpPage = 1L; |
| | | final long OUTP_PAGE_SIZE = 1000L; |
| | | //ä»ç¼åéè·åèµ·å§é¡µï¼é¶ç¹å10åéå
ç¨æ¨å¤©çæ¥æï¼é¿å
跨天æ¼éï¼ |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | String mzCacheDate = (now.getHour() == 0 && now.getMinute() < 10) ? now.minusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) : now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | Long outpPage = redisCache.getCacheObject("mzCurrent" + cid + mzCacheDate); |
| | | if (outpPage == null) outpPage = 1L; |
| | | //é£è¾¹ææ¶åªè½è®¾ç½®40 |
| | | final long OUTP_PAGE_SIZE = 500L; |
| | | while (true) { |
| | | serviceSLTDInhospReqVO.setCurrent(outpPage); |
| | | serviceSLTDInhospReqVO.setSize(OUTP_PAGE_SIZE); |
| | |
| | | } |
| | | log.info("ãdealHisDataãçç«åå¾·â鍿¥è¯â第{}页éé{}æ¡ï¼é¢åºï¼{}", outpPage, outpResult.size(), cid); |
| | | if (outpResult.size() < OUTP_PAGE_SIZE) { |
| | | //设置ä¸ä¸ªç¼åï¼ç¨æ¥åå¨ä¸æ¬¡çèµ·å§é¡µ |
| | | redisCache.setCacheObject("mzCurrent" + cid + mzCacheDate, outpPage, 24, TimeUnit.HOURS); |
| | | log.info("ãdealHisDataãçç«åå¾·â鍿¥è¯âçç¼åkey:{}䏿¬¡çèµ·å§é¡µ{}ï¼é¢åºï¼{}", "mzCurrent" + cid + mzCacheDate, outpPage, cid); |
| | | break; |
| | | } |
| | | outpPage++; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * åå¾·è¯åæ°æ®éé |
| | | */ |
| | | |
| | | public void dealHisDataMedication() { |
| | | final long OUTP_PAGE_SIZE = 500L; |
| | | ServiceSLTDInhospReqVO serviceSLTDInhospReqVO = new ServiceSLTDInhospReqVO(); |
| | | serviceSLTDInhospReqVO.setOrgId("20001001"); |
| | | Long outpPage = 1L; |
| | | while (true) { |
| | | serviceSLTDInhospReqVO.setCurrent(outpPage); |
| | | serviceSLTDInhospReqVO.setSize(OUTP_PAGE_SIZE); |
| | | log.info("ãdealHisDataãçç«åå¾·âè¯åæ°æ®âéé第{}é¡µæ°æ®", outpPage); |
| | | Boolean b = serviceSLTDHealthcareRecordService.queryMedicationItemList(serviceSLTDInhospReqVO); |
| | | log.info("ãdealHisDataãçç«åå¾·âè¯åæ°æ®âééç»æï¼{}", b); |
| | | outpPage++; |
| | | } |
| | | } |
| | | |
| | | |
| | | public void dealHisDataSLTD() { |
| | | log.info("ãdealHisDataãå¼å§æ§è¡HISæ°æ®ééä»»å¡"); |
| | |
| | | SysConfig sysConfig = new SysConfig(); |
| | | if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("6")) { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("zymyd.sms.template"); |
| | | }else if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("14")) { |
| | | } else if (StringUtils.isNotEmpty(serviceSubtask.getServiceType()) && serviceSubtask.getServiceType().equals("14")) { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("mzmyd.sms.template"); |
| | | }else { |
| | | } else { |
| | | sysConfig = sysConfigMapper.checkConfigKeyUnique("wj.sms.template"); |
| | | } |
| | | if (!Objects.isNull(sysConfig)) { |
| | |
| | | log.info("activeçå¼ä¸ºï¼{}", active); |
| | | if (active.equals("xh")) { |
| | | Map<String, String> req = new HashMap<>(); |
| | | req.put("phone", sendMagParam.getPhone()); |
| | | req.put("content", sendMagParam.getContent()); |
| | | isSuccess = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | // req.put("phone", sendMagParam.getPhone()); |
| | | // req.put("content", sendMagParam.getContent()); |
| | | Map<String, String> map2 = new HashMap<String, String>(); |
| | | map2.put("action", "send"); |
| | | map2.put("account", xhsmsAccount); |
| | | map2.put("password", xhsmsPwd); |
| | | map2.put("mobile", sendMagParam.getPhone()); |
| | | map2.put("content", sendMagParam.getContent()); |
| | | map2.put("extno", xhsmsjrm); |
| | | map2.put("rt", "json"); |
| | | StringBuilder encodedParams = new StringBuilder(); |
| | | |
| | | for (Map.Entry<String, String> entry : map2.entrySet()) { |
| | | if (encodedParams.length() > 0) { |
| | | encodedParams.append("&"); |
| | | } |
| | | // 对é®åå¼è¿è¡URLç¼ç |
| | | String encodedKey = URLEncoder.encode(entry.getKey(), "UTF-8"); |
| | | String encodedValue = URLEncoder.encode(entry.getValue(), "UTF-8"); |
| | | encodedParams.append(encodedKey).append("=").append(encodedValue); |
| | | } |
| | | Boolean result = HttpUtils.sendPost(xhsmsPath, new Gson().toJson(req)); |
| | | if (result) isSuccess = "true"; |
| | | } else if (active.equals("ls")) { |
| | | // String url = configService.selectConfigByKey("token.360", serviceSubtask.getOrgid()); |
| | | // //丽水ççä¿¡åéæ¹å¼ |
| | |
| | | return serviceTaskMap; |
| | | } |
| | | |
| | | public int qwenLLMTest(String questionText, String voiceText,String value,String regexText) { |
| | | public int qwenLLMTest(String questionText, String voiceText, String value, String regexText) { |
| | | int result = QwenLLMUtil.matchRegex(questionText, voiceText, value, regexText); |
| | | return result; |
| | | } |
| | |
| | | <result property="futypedesc" column="futypedesc"/> |
| | | <result property="fuadvice" column="fuadvice"/> |
| | | <result property="fuspecialadvice" column="fuspecialadvice"/> |
| | | <result property="inhospMydFlag" column="inhosp_myd_flag"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedOuthosp" id="PatMedOuthospResult"> |
| | |
| | | b.leavehospitaldistrictname, |
| | | b.leavehospitaldistrictid, |
| | | b.deptid, |
| | | b.inhosp_myd_flag, |
| | | b.leaveldeptid |
| | | FROM |
| | | healthy_inhosp b |
| | |
| | | |
| | | public int deleteSysUserDeptByCode(SysUserDept sysUserDept); |
| | | |
| | | public int deleteSysUserDeptByUserId(SysUserDept sysUserDept); |
| | | |
| | | public int updateSysUserDeptForSync(SysUserDept sysUserDept); |
| | | } |
| | |
| | | // sysUserDeptMapper.insertSysUserDept(sysUserDep); |
| | | // } |
| | | // } |
| | | //å é¤åæå
³ç³» |
| | | SysUserDept delSysUserDept = new SysUserDept(); |
| | | delSysUserDept.setUserId(user.getUserId()); |
| | | delSysUserDept.setOrgid(user.getOrgid()); |
| | | sysUserDeptMapper.deleteSysUserDeptByUserId(delSysUserDept); |
| | | |
| | | if (!CollectionUtils.isEmpty(user.getDeptCodes())) { |
| | | for (String deptCode : user.getDeptCodes()) { |
| | | SysDept sysDept = sysDeptMapper.selectDeptByCode("1", user.getOrgid(), deptCode); |
| | |
| | | sysUserDept.setOrgid(user.getOrgid()); |
| | | sysUserDept.setDeptCode(deptCode); |
| | | sysUserDept.setDeptId(sysDept.getDeptId()); |
| | | List<SysUserDept> sysUserDepts = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | sysUserDept.setDelFlag(0L); |
| | | sysUserDept.setDeptType("1"); |
| | | sysUserDept.setDeptName(sysDept.getDeptName()); |
| | | sysUserDept.setUpdateTime(new Date()); |
| | | if (!CollectionUtils.isEmpty(sysUserDepts)) { |
| | | sysUserDept.setId(sysUserDepts.get(0).getId()); |
| | | sysUserDeptMapper.updateSysUserDept(sysUserDept); |
| | | continue; |
| | | } |
| | | sysUserDept.setCreateTime(new Date()); |
| | | sysUserDeptMapper.insertSysUserDept(sysUserDept); |
| | | } |
| | | } |
| | | |
| | | if (!CollectionUtils.isEmpty(user.getWardCodes())) { |
| | | for (String wardCode : user.getWardCodes()) { |
| | | SysDept sysDept = sysDeptMapper.selectDeptByCode("2", user.getOrgid(), wardCode); |
| | |
| | | sysUserDept.setDeptCode(wardCode); |
| | | sysUserDept.setDeptId(sysDept.getDeptId()); |
| | | sysUserDept.setOrgid(user.getOrgid()); |
| | | List<SysUserDept> sysUserDepts = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | sysUserDept.setDelFlag(0L); |
| | | sysUserDept.setDeptType("2"); |
| | | sysUserDept.setOrgid(user.getOrgid()); |
| | | sysUserDept.setDeptName(sysDept.getDeptName()); |
| | | sysUserDept.setUpdateTime(new Date()); |
| | | if (!CollectionUtils.isEmpty(sysUserDepts)) { |
| | | sysUserDeptMapper.updateSysUserDept(sysUserDept); |
| | | continue; |
| | | } |
| | | sysUserDept.setCreateTime(new Date()); |
| | | sysUserDeptMapper.insertSysUserDept(sysUserDept); |
| | | } |
| | |
| | | where user_id =#{userId} and dept_code=#{deptCode} |
| | | </update> |
| | | |
| | | <update id="deleteSysUserDeptByUserId" parameterType="String"> |
| | | update sys_user_dept |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1, |
| | | update_time = sysdate() |
| | | </trim> |
| | | where del_flag = 0 |
| | | <if test="userId != null"> |
| | | and user_id =#{userId} |
| | | </if> |
| | | <if test="orgid != null "> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="deptType != null "> |
| | | and dept_type = #{deptType} |
| | | </if> |
| | | </update> |
| | | |
| | | <update id="updateSysUserDeptForSync" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept"> |
| | | update sys_user_dept |
| | | <trim prefix="SET" suffixOverrides=","> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * è¯ååéä¿¡æ¯å¯¹è±¡ medication_dose_info |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¯ååéä¿¡æ¯") |
| | | public class MedicationDoseInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®ID */ |
| | | @ApiModelProperty("主é®ID") |
| | | //æ°æ®åºèªå¢æ¹æ@TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** è¯åIDï¼å
³èmedication_item.idï¼ */ |
| | | @ApiModelProperty("è¯åIDï¼å
³èmedication_item.idï¼") |
| | | @Excel(name = "è¯åID", readConverterExp = "å
³=èmedication_item.id") |
| | | private Long medicationItemId; |
| | | |
| | | /** åéå°å
è£
è½¬æ¢æ¯ */ |
| | | @ApiModelProperty("åéå°å
è£
è½¬æ¢æ¯") |
| | | @Excel(name = "åéå°å
è£
è½¬æ¢æ¯") |
| | | private BigDecimal doseSmallPackageRation; |
| | | |
| | | /** åé */ |
| | | @ApiModelProperty("åé") |
| | | @Excel(name = "åé") |
| | | private Long dose; |
| | | |
| | | /** åéå°å
è£
æ°é */ |
| | | @ApiModelProperty("åéå°å
è£
æ°é") |
| | | @Excel(name = "åéå°å
è£
æ°é") |
| | | private Long doseSmallPackageNum; |
| | | |
| | | /** åéåä½ */ |
| | | @ApiModelProperty("åéåä½") |
| | | @Excel(name = "åéåä½") |
| | | private String doseUnit; |
| | | |
| | | /** åéåä½ç±»å */ |
| | | @ApiModelProperty("åéåä½ç±»å") |
| | | @Excel(name = "åéåä½ç±»å") |
| | | private Long doseUnitType; |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¯åä¿¡æ¯å¯¹è±¡ medication_item |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¯åä¿¡æ¯") |
| | | public class MedicationItem extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®ID */ |
| | | @ApiModelProperty("主é®ID") |
| | | //æ°æ®åºèªå¢æ¹æ@TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** è¯åè¯å«ç */ |
| | | @ApiModelProperty("è¯åè¯å«ç ") |
| | | @Excel(name = "è¯åè¯å«ç ") |
| | | private String identificationCode; |
| | | |
| | | /** äºç¬ç */ |
| | | @ApiModelProperty("äºç¬ç ") |
| | | @Excel(name = "äºç¬ç ") |
| | | private String wbm; |
| | | |
| | | /** è¯åéç¨å */ |
| | | @ApiModelProperty("è¯åéç¨å") |
| | | @Excel(name = "è¯åéç¨å") |
| | | private String medicationCommonName; |
| | | |
| | | /** ç产åå®¶åç§° */ |
| | | @ApiModelProperty("ç产åå®¶åç§°") |
| | | @Excel(name = "ç产åå®¶åç§°") |
| | | private String manufacturerName; |
| | | |
| | | /** è¯åç¼ç */ |
| | | @ApiModelProperty("è¯åç¼ç ") |
| | | @Excel(name = "è¯åç¼ç ") |
| | | private String itemCode; |
| | | |
| | | /** 大å°å
è£
è½¬æ¢æ¯ */ |
| | | @ApiModelProperty("大å°å
è£
è½¬æ¢æ¯") |
| | | @Excel(name = "大å°å
è£
è½¬æ¢æ¯") |
| | | private Long smallLargePackageRatio; |
| | | |
| | | /** æºæID */ |
| | | @ApiModelProperty("æºæID") |
| | | @Excel(name = "æºæID") |
| | | private Long orgId; |
| | | |
| | | /** è¯ååç§° */ |
| | | @ApiModelProperty("è¯ååç§°") |
| | | @Excel(name = "è¯ååç§°") |
| | | private String itemName; |
| | | |
| | | /** è¯åç±»å */ |
| | | @ApiModelProperty("è¯åç±»å") |
| | | @Excel(name = "è¯åç±»å") |
| | | private String medicationType; |
| | | |
| | | /** æèè¯ç©ç级ç¼ç */ |
| | | @ApiModelProperty("æèè¯ç©ç级ç¼ç ") |
| | | @Excel(name = "æèè¯ç©ç级ç¼ç ") |
| | | private String antimicrobialGradeCode; |
| | | |
| | | /** æ¹åæå· */ |
| | | @ApiModelProperty("æ¹åæå·") |
| | | @Excel(name = "æ¹åæå·") |
| | | private String licenseNumber; |
| | | |
| | | /** é»è®¤ç¨æ³åç§° */ |
| | | @ApiModelProperty("é»è®¤ç¨æ³åç§°") |
| | | @Excel(name = "é»è®¤ç¨æ³åç§°") |
| | | private String defaultUsageName; |
| | | |
| | | /** ç¹æ®è¯ååç§° */ |
| | | @ApiModelProperty("ç¹æ®è¯ååç§°") |
| | | @Excel(name = "ç¹æ®è¯ååç§°") |
| | | private String specialDrugsName; |
| | | |
| | | /** æèè¯ç©ç级åç§° */ |
| | | @ApiModelProperty("æèè¯ç©ç级åç§°") |
| | | @Excel(name = "æèè¯ç©ç级åç§°") |
| | | private String antimicrobialGradeName; |
| | | |
| | | /** éç¨åæ¼é³ */ |
| | | @ApiModelProperty("éç¨åæ¼é³") |
| | | @Excel(name = "éç¨åæ¼é³") |
| | | private String commonPinyin; |
| | | |
| | | /** éç¨åäºç¬ç */ |
| | | @ApiModelProperty("éç¨åäºç¬ç ") |
| | | @Excel(name = "éç¨åäºç¬ç ") |
| | | private String commonWbm; |
| | | |
| | | /** ç产åå®¶ID */ |
| | | @ApiModelProperty("ç产åå®¶ID") |
| | | @Excel(name = "ç产åå®¶ID") |
| | | private Long manufacturerId; |
| | | |
| | | /** é»è®¤ç¨æ³ID */ |
| | | @ApiModelProperty("é»è®¤ç¨æ³ID") |
| | | @Excel(name = "é»è®¤ç¨æ³ID") |
| | | private Long defaultUsageId; |
| | | |
| | | /** è§æ ¼ */ |
| | | @ApiModelProperty("è§æ ¼") |
| | | @Excel(name = "è§æ ¼") |
| | | private String specification; |
| | | |
| | | /** å°å
è£
åä½ */ |
| | | @ApiModelProperty("å°å
è£
åä½") |
| | | @Excel(name = "å°å
è£
åä½") |
| | | private String smallPackageUnit; |
| | | |
| | | /** è¯åIDï¼ä¸å¡ä¸»é®ï¼ */ |
| | | @ApiModelProperty("è¯åIDï¼ä¸å¡ä¸»é®ï¼") |
| | | @Excel(name = "è¯åID", readConverterExp = "ä¸=å¡ä¸»é®") |
| | | private Long itemId; |
| | | |
| | | /** ç¹æ®è¯åç¼ç */ |
| | | @ApiModelProperty("ç¹æ®è¯åç¼ç ") |
| | | @Excel(name = "ç¹æ®è¯åç¼ç ") |
| | | private String specialDrugsCode; |
| | | |
| | | /** æ¼é³ */ |
| | | @ApiModelProperty("æ¼é³") |
| | | @Excel(name = "æ¼é³") |
| | | private String pinyin; |
| | | |
| | | /** åååç§° */ |
| | | @ApiModelProperty("åååç§°") |
| | | @Excel(name = "åååç§°") |
| | | private String doseFormName; |
| | | |
| | | /** 大å
è£
åä½ */ |
| | | @ApiModelProperty("大å
è£
åä½") |
| | | @Excel(name = "大å
è£
åä½") |
| | | private String largePackageUnit; |
| | | |
| | | /** é¶å®ä»· */ |
| | | @ApiModelProperty("é¶å®ä»·") |
| | | @Excel(name = "é¶å®ä»·") |
| | | private BigDecimal retailPrice; |
| | | |
| | | /** ç¶æ */ |
| | | @ApiModelProperty("ç¶æ") |
| | | @Excel(name = "ç¶æ") |
| | | private Long status; |
| | | |
| | | @ApiModelProperty("åéä¿¡æ¯å表") |
| | | private List<MedicationDoseInfo> doseInfoList; |
| | | |
| | | } |
| | | |
| | |
| | | * ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | | private String deptcheckFlag; |
| | | private String deptcheckFlag; |
| | | /** |
| | | * ç
åºé¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | |
| | | * å
¥é¢ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | | private String inDeptcheckFlag; |
| | | private String inDeptcheckFlag; |
| | | |
| | | /** |
| | | * å
¥é¢ç
åºé¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | |
| | | @ApiModelProperty("é¢åº") |
| | | @Excel(name = " é¢åº ") |
| | | private String campusid; |
| | | |
| | | /** |
| | | * '满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼ |
| | | */ |
| | | @ApiModelProperty("'满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼") |
| | | @Excel(name = " '满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼ ") |
| | | private String inhospMydFlag; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.google.gson.annotations.SerializedName; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * é¢çº¦è®°å½å¯¹è±¡ service_appoint_record |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-06 |
| | | */ |
| | | @Data |
| | | @ApiModel("é¢çº¦è®°å½") |
| | | public class ServiceAppointRecord extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主é®ID |
| | | */ |
| | | @ApiModelProperty("主é®ID") |
| | | //æ°æ®åºèªå¢æ¹æ@TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * é¢çº¦è®°å½åºå· |
| | | */ |
| | | @ApiModelProperty("é¢çº¦è®°å½åºå·") |
| | | @Excel(name = "é¢çº¦è®°å½åºå·") |
| | | private String appointRecSn; |
| | | |
| | | /** |
| | | * æ¢è¯é¢çº¦è®°å½åºå· |
| | | */ |
| | | @ApiModelProperty("æ¢è¯é¢çº¦è®°å½åºå·") |
| | | @Excel(name = "æ¢è¯é¢çº¦è®°å½åºå·") |
| | | private String changeAppointRecSn; |
| | | |
| | | /** |
| | | * ç»ç»ç§å®¤ä»£ç |
| | | */ |
| | | @ApiModelProperty("ç»ç»ç§å®¤ä»£ç ") |
| | | @Excel(name = "ç»ç»ç§å®¤ä»£ç ") |
| | | private String orgCode; |
| | | |
| | | /** |
| | | * ç
人档æ¡åºå· |
| | | */ |
| | | @ApiModelProperty("ç
人档æ¡åºå·") |
| | | @Excel(name = "ç
人档æ¡åºå·") |
| | | private String patFileSn; |
| | | |
| | | /** |
| | | * ç
人ä»è´¨åºå· |
| | | */ |
| | | @ApiModelProperty("ç
人ä»è´¨åºå·") |
| | | @Excel(name = "ç
人ä»è´¨åºå·") |
| | | private String patMediaSn; |
| | | |
| | | /** |
| | | * ç
人ä»è´¨å·ç |
| | | */ |
| | | @ApiModelProperty("ç
人ä»è´¨å·ç ") |
| | | @Excel(name = "ç
人ä»è´¨å·ç ") |
| | | private String patMediaNum; |
| | | |
| | | /** |
| | | * ç
人类å«åºå· |
| | | */ |
| | | @ApiModelProperty("ç
人类å«åºå·") |
| | | @Excel(name = "ç
人类å«åºå·") |
| | | private String patCateSn; |
| | | |
| | | /** |
| | | * ç
人æ§è´¨åºå· |
| | | */ |
| | | @ApiModelProperty("ç
人æ§è´¨åºå·") |
| | | @Excel(name = "ç
人æ§è´¨åºå·") |
| | | private String patNatureSn; |
| | | |
| | | /** |
| | | * ç
人档æ¡å§å |
| | | */ |
| | | @ApiModelProperty("ç
人档æ¡å§å") |
| | | @Excel(name = "ç
人档æ¡å§å") |
| | | private String patFileName; |
| | | |
| | | /** |
| | | * ç
äººæ¡£æ¡æ§å« |
| | | */ |
| | | @ApiModelProperty("ç
äººæ¡£æ¡æ§å«") |
| | | @Excel(name = "ç
äººæ¡£æ¡æ§å«") |
| | | private String patFileGender; |
| | | |
| | | /** |
| | | * ç
人é¢çº¦å¹´é¾ |
| | | */ |
| | | @ApiModelProperty("ç
人é¢çº¦å¹´é¾") |
| | | @Excel(name = "ç
人é¢çº¦å¹´é¾") |
| | | private String patAge; |
| | | |
| | | /** |
| | | * ç
人åºçæ¥æ |
| | | */ |
| | | @ApiModelProperty("ç
人åºçæ¥æ") |
| | | @Excel(name = "ç
人åºçæ¥æ") |
| | | private String patBirthday; |
| | | |
| | | /** |
| | | * ç
人è¯ä»¶ç±»åç¼ç |
| | | */ |
| | | @ApiModelProperty("ç
人è¯ä»¶ç±»åç¼ç ") |
| | | @Excel(name = "ç
人è¯ä»¶ç±»åç¼ç ") |
| | | private String patCardTypeCode; |
| | | |
| | | /** |
| | | * ç
人è¯ä»¶ç±»å |
| | | */ |
| | | @ApiModelProperty("ç
人è¯ä»¶ç±»å") |
| | | @Excel(name = "ç
人è¯ä»¶ç±»å") |
| | | private String patCardType; |
| | | |
| | | /** |
| | | * ç
人è¯ä»¶å·ç |
| | | */ |
| | | @ApiModelProperty("ç
人è¯ä»¶å·ç ") |
| | | @Excel(name = "ç
人è¯ä»¶å·ç ") |
| | | private String patIdCardNum; |
| | | |
| | | /** |
| | | * ç
人èç³»å°å |
| | | */ |
| | | @ApiModelProperty("ç
人èç³»å°å") |
| | | @Excel(name = "ç
人èç³»å°å") |
| | | private String patAddr; |
| | | |
| | | /** |
| | | * ç
人èç³»çµè¯ |
| | | */ |
| | | @ApiModelProperty("ç
人èç³»çµè¯") |
| | | @Excel(name = "ç
人èç³»çµè¯") |
| | | private String patTel; |
| | | |
| | | /** |
| | | * ç
äººæ¥æºç¼ç |
| | | */ |
| | | @ApiModelProperty("ç
äººæ¥æºç¼ç ") |
| | | @Excel(name = "ç
äººæ¥æºç¼ç ") |
| | | private String patWayCode; |
| | | |
| | | /** |
| | | * ç
äººæ¥æº |
| | | */ |
| | | @ApiModelProperty("ç
äººæ¥æº") |
| | | @Excel(name = "ç
äººæ¥æº") |
| | | private String patWay; |
| | | |
| | | /** |
| | | * é¢çº¦ç±»ååºå· |
| | | */ |
| | | @ApiModelProperty("é¢çº¦ç±»ååºå·") |
| | | @Excel(name = "é¢çº¦ç±»ååºå·") |
| | | private String appointTypeSn; |
| | | |
| | | /** |
| | | * é¢çº¦æä½æ¥æ |
| | | */ |
| | | @ApiModelProperty("é¢çº¦æä½æ¥æ") |
| | | @Excel(name = "é¢çº¦æä½æ¥æ") |
| | | private Date appointDate; |
| | | |
| | | /** |
| | | * é¢çº¦æä½äººid |
| | | */ |
| | | @ApiModelProperty("é¢çº¦æä½äººid") |
| | | @Excel(name = "é¢çº¦æä½äººid") |
| | | private String appointOperatorId; |
| | | |
| | | /** |
| | | * é¢çº¦æä½äººå§å |
| | | */ |
| | | @ApiModelProperty("é¢çº¦æä½äººå§å") |
| | | @Excel(name = "é¢çº¦æä½äººå§å") |
| | | private String appointOperatorName; |
| | | |
| | | /** |
| | | * é¢çº¦æå·æ¥æ |
| | | */ |
| | | @ApiModelProperty("é¢çº¦æå·æ¥æ") |
| | | @Excel(name = "é¢çº¦æå·æ¥æ") |
| | | private Date appointRegistDate; |
| | | |
| | | /** |
| | | * æå·æçåºå· |
| | | */ |
| | | @ApiModelProperty("æå·æçåºå·") |
| | | @Excel(name = "æå·æçåºå·") |
| | | private String registerScheduleSn; |
| | | |
| | | /** |
| | | * é¨è¯ç±»å«åºå· |
| | | */ |
| | | @ApiModelProperty("é¨è¯ç±»å«åºå·") |
| | | @Excel(name = "é¨è¯ç±»å«åºå·") |
| | | private String outpatCateSn; |
| | | |
| | | /** |
| | | * é¨è¯ç±»å«åç§° |
| | | */ |
| | | @ApiModelProperty("é¨è¯ç±»å«åç§°") |
| | | @Excel(name = "é¨è¯ç±»å«åç§°") |
| | | private String outpatCateName; |
| | | |
| | | /** |
| | | * æå·ç§å®¤ç¼ç |
| | | */ |
| | | @ApiModelProperty("æå·ç§å®¤ç¼ç ") |
| | | @Excel(name = "æå·ç§å®¤ç¼ç ") |
| | | private String registDeptCode; |
| | | |
| | | /** |
| | | * æå·ç§å®¤åç§° |
| | | */ |
| | | @ApiModelProperty("æå·ç§å®¤åç§°") |
| | | @Excel(name = "æå·ç§å®¤åç§°") |
| | | private String registDeptName; |
| | | |
| | | /** |
| | | * ç§å®¤æ¼é³ç¼ç |
| | | */ |
| | | @ApiModelProperty("ç§å®¤æ¼é³ç¼ç ") |
| | | @Excel(name = "ç§å®¤æ¼é³ç¼ç ") |
| | | private String deptPinyinCode; |
| | | |
| | | /** |
| | | * æå·å»ç代ç |
| | | */ |
| | | @ApiModelProperty("æå·å»ç代ç ") |
| | | @Excel(name = "æå·å»ç代ç ") |
| | | private String registDoctCode; |
| | | |
| | | /** |
| | | * æå·å»çå§å |
| | | */ |
| | | @ApiModelProperty("æå·å»çå§å") |
| | | @Excel(name = "æå·å»çå§å") |
| | | private String registDoctName; |
| | | |
| | | /** |
| | | * èå·¥æ¼é³ç¼ç |
| | | */ |
| | | @ApiModelProperty("èå·¥æ¼é³ç¼ç ") |
| | | @Excel(name = "èå·¥æ¼é³ç¼ç ") |
| | | private String staffPinyinCode; |
| | | |
| | | /** |
| | | * æå·æ¶é´ç±»å« |
| | | */ |
| | | @ApiModelProperty("æå·æ¶é´ç±»å«") |
| | | @Excel(name = "æå·æ¶é´ç±»å«") |
| | | private Long registTimeCate; |
| | | |
| | | /** |
| | | * ç
人æå·åºå· |
| | | */ |
| | | @ApiModelProperty("ç
人æå·åºå·") |
| | | @Excel(name = "ç
人æå·åºå·") |
| | | private Long patiRegistSn; |
| | | |
| | | /** |
| | | * é¢çº¦æå·è´¹ç¨ |
| | | */ |
| | | @ApiModelProperty("é¢çº¦æå·è´¹ç¨") |
| | | @Excel(name = "é¢çº¦æå·è´¹ç¨") |
| | | private BigDecimal scheduleRegistCharge; |
| | | |
| | | /** |
| | | * æå·è®°å½åºå· |
| | | */ |
| | | @ApiModelProperty("æå·è®°å½åºå·") |
| | | @Excel(name = "æå·è®°å½åºå·") |
| | | private String registRecSn; |
| | | |
| | | /** |
| | | * ç»è®°ç¨æ·åºå· |
| | | */ |
| | | @ApiModelProperty("ç»è®°ç¨æ·åºå·") |
| | | @Excel(name = "ç»è®°ç¨æ·åºå·") |
| | | private String regUserSn; |
| | | |
| | | /** |
| | | * ç»è®°ç¨æ·å§å |
| | | */ |
| | | @ApiModelProperty("ç»è®°ç¨æ·å§å") |
| | | @Excel(name = "ç»è®°ç¨æ·å§å") |
| | | private String regUserName; |
| | | |
| | | /** |
| | | * ç»è®°æä½æ¶é´ |
| | | */ |
| | | @ApiModelProperty("ç»è®°æä½æ¶é´") |
| | | @Excel(name = "ç»è®°æä½æ¶é´") |
| | | private Date regOptTime; |
| | | |
| | | /** |
| | | * æ¤éç¨æ·åºå· |
| | | */ |
| | | @ApiModelProperty("æ¤éç¨æ·åºå·") |
| | | @Excel(name = "æ¤éç¨æ·åºå·") |
| | | private String revokeUserSn; |
| | | |
| | | /** |
| | | * æ¤é人å§å |
| | | */ |
| | | @ApiModelProperty("æ¤é人å§å") |
| | | @Excel(name = "æ¤é人å§å") |
| | | private String revokeUserName; |
| | | |
| | | /** |
| | | * æ¤éæä½æ¶é´ |
| | | */ |
| | | @ApiModelProperty("æ¤éæä½æ¶é´") |
| | | @Excel(name = "æ¤éæä½æ¶é´") |
| | | private Date revokeOptTime; |
| | | |
| | | /** |
| | | * éå·æ¶é´ |
| | | */ |
| | | @ApiModelProperty("éå·æ¶é´") |
| | | @Excel(name = "éå·æ¶é´") |
| | | private Date withdrawalTime; |
| | | |
| | | /** |
| | | * é¢çº¦ç¶ææ å¿(0:å·²é¢çº¦ 1:å·²æå· 2:å·²éå· 3:å·²å°±è¯ -1:ç
äººåæ¶ -2:å»é¢åæ¶ -3:æçåè¯) |
| | | */ |
| | | @ApiModelProperty("é¢çº¦ç¶ææ å¿(0:å·²é¢çº¦ 1:å·²æå· 2:å·²éå· 3:å·²å°±è¯ -1:ç
äººåæ¶ -2:å»é¢åæ¶ -3:æçåè¯)") |
| | | @Excel(name = "é¢çº¦ç¶ææ å¿(0:å·²é¢çº¦ 1:å·²æå· 2:å·²éå· 3:å·²å°±è¯ -1:ç
äººåæ¶ -2:å»é¢åæ¶ -3:æçåè¯)") |
| | | private Long scheduleStatusFlag; |
| | | |
| | | /** |
| | | * é¢çº¦å¤æ³¨è¯´æ |
| | | */ |
| | | @ApiModelProperty("é¢çº¦å¤æ³¨è¯´æ") |
| | | @Excel(name = "é¢çº¦å¤æ³¨è¯´æ") |
| | | private String scheduleMemoDesc; |
| | | |
| | | /** |
| | | * é¢çº¦åè¯å·ç |
| | | */ |
| | | @ApiModelProperty("é¢çº¦åè¯å·ç ") |
| | | @Excel(name = "é¢çº¦åè¯å·ç ") |
| | | private String scheduleCredenceNum; |
| | | |
| | | /** |
| | | * é¢è®¡å°±è¯æ¶é´ |
| | | */ |
| | | @ApiModelProperty("é¢è®¡å°±è¯æ¶é´") |
| | | @Excel(name = "é¢è®¡å°±è¯æ¶é´") |
| | | private String registTimeRange; |
| | | |
| | | /** |
| | | * å
·ä½æç»è¡¨æç»åºå· |
| | | */ |
| | | @ApiModelProperty("å
·ä½æç»è¡¨æç»åºå·") |
| | | @Excel(name = "å
·ä½æç»è¡¨æç»åºå·") |
| | | private String scheduleDetailSn; |
| | | |
| | | /** |
| | | * å°±è¯æ¶é´ |
| | | */ |
| | | @ApiModelProperty("å°±è¯æ¶é´") |
| | | @Excel(name = "å°±è¯æ¶é´") |
| | | @SerializedName("treatDate") |
| | | private Date treatDate; |
| | | |
| | | /** |
| | | * å°±è¯å»çç¼ç |
| | | */ |
| | | @ApiModelProperty("å°±è¯å»çç¼ç ") |
| | | @Excel(name = "å°±è¯å»çç¼ç ") |
| | | private String treatDoctCode; |
| | | |
| | | /** |
| | | * å°±è¯å»çåç§° |
| | | */ |
| | | @ApiModelProperty("å°±è¯å»çåç§°") |
| | | @Excel(name = "å°±è¯å»çåç§°") |
| | | private String treatDoctName; |
| | | |
| | | /** |
| | | * é¢çº¦æ¸ éç¼ç |
| | | */ |
| | | @ApiModelProperty("é¢çº¦æ¸ éç¼ç ") |
| | | @Excel(name = "é¢çº¦æ¸ éç¼ç ") |
| | | private String regWayCode; |
| | | |
| | | /** |
| | | * é¢çº¦æ¸ é |
| | | */ |
| | | @ApiModelProperty("é¢çº¦æ¸ é") |
| | | @Excel(name = "é¢çº¦æ¸ é") |
| | | private String regWay; |
| | | |
| | | /** |
| | | * é¢çº¦ç³»ç»ç¼ç |
| | | */ |
| | | @ApiModelProperty("é¢çº¦ç³»ç»ç¼ç ") |
| | | @Excel(name = "é¢çº¦ç³»ç»ç¼ç ") |
| | | private String regSystemWayCode; |
| | | |
| | | /** |
| | | * é¢çº¦ç³»ç» |
| | | */ |
| | | @ApiModelProperty("é¢çº¦ç³»ç»") |
| | | @Excel(name = "é¢çº¦ç³»ç»") |
| | | private String regSystemWay; |
| | | |
| | | /** |
| | | * åè¯å¤è¯å¤å«ï¼0åè¯ 1å¤è¯ï¼ |
| | | */ |
| | | @ApiModelProperty("åè¯å¤è¯å¤å«ï¼0åè¯ 1å¤è¯ï¼") |
| | | @Excel(name = "åè¯å¤è¯å¤å«", readConverterExp = "0=åè¯,1=å¤è¯") |
| | | private Long visitFlag; |
| | | |
| | | /** |
| | | * çä¿¡åéæä½äººid |
| | | */ |
| | | @ApiModelProperty("çä¿¡åéæä½äººid") |
| | | @Excel(name = "çä¿¡åéæä½äººid") |
| | | private String senderId; |
| | | |
| | | /** |
| | | * çä¿¡åéæä½äººå§å |
| | | */ |
| | | @ApiModelProperty("çä¿¡åéæä½äººå§å") |
| | | @Excel(name = "çä¿¡åéæä½äººå§å") |
| | | private String senderName; |
| | | |
| | | /** |
| | | * çä¿¡åéæ¶é´ |
| | | */ |
| | | @ApiModelProperty("çä¿¡åéæ¶é´") |
| | | @Excel(name = "çä¿¡åéæ¶é´") |
| | | private Date sendTime; |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private String delFlag; |
| | | |
| | | |
| | | @ApiModelProperty(value = "è¿å¶") |
| | | private String radix; |
| | | |
| | | @ApiModelProperty(value = "å¤é¾å°å") |
| | | private String url; |
| | | |
| | | @ApiModelProperty(value = "ç
åºç¼ç ") |
| | | private String wardCode; |
| | | |
| | | @ApiModelProperty(value = "ç
åºåç§°") |
| | | private String wardName; |
| | | |
| | | @ApiModelProperty(value = "ç§å®¤ç¼ç ") |
| | | private String deptCode; |
| | | |
| | | @ApiModelProperty(value = "ç§å®¤åç§°") |
| | | private String deptName; |
| | | |
| | | @ApiModelProperty(value = "ç
人信æ¯") |
| | | private PatArchive patArchive; |
| | | |
| | |
| | | private String param4; |
| | | |
| | | /** |
| | | * patfrom |
| | | * æ£è
æ¥æº |
| | | */ |
| | | @Excel(name = "patfrom ") |
| | | @ApiModelProperty(value = "patfrom") |
| | | private String patfrom = "0"; |
| | | |
| | | /** |
| | | * ç±»åï¼0å å¯ 1ä¸å å¯ |
| | | */ |
| | | @ApiModelProperty(value = "ç±»åï¼0å å¯ 1ä¸å å¯") |
| | | private String type = "0"; |
| | | |
| | | } |
| | |
| | | private String taskDesc; |
| | | |
| | | /** |
| | | * pageSize |
| | | * æ¯å¦æ¯é¿æä»»å¡ 0ï¼ä¸´æ¶ä»»å¡ 1ï¼é¿æä»»å¡ 2åºå®ä»»å¡ 3循ç¯ä»»å¡ |
| | | */ |
| | | @ApiModelProperty("æ¯å¦æ¯é¿æä»»å¡ 0ï¼ä¸æ¯ 1ï¼æ¯") |
| | | @ApiModelProperty("æ¯å¦æ¯é¿æä»»å¡ 0ï¼ä¸´æ¶ä»»å¡ 1ï¼é¿æä»»å¡ 2åºå®ä»»å¡ 3循ç¯ä»»å¡") |
| | | private Integer longTask = 0; |
| | | |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.smartor.domain.MedicationDoseInfo; |
| | | |
| | | /** |
| | | * è¯ååéä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Mapper |
| | | public interface MedicationDoseInfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param id è¯ååéä¿¡æ¯ä¸»é® |
| | | * @return è¯ååéä¿¡æ¯ |
| | | */ |
| | | public MedicationDoseInfo selectMedicationDoseInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯ååéä¿¡æ¯å表 |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return è¯ååéä¿¡æ¯éå |
| | | */ |
| | | public List<MedicationDoseInfo> selectMedicationDoseInfoList(MedicationDoseInfo medicationDoseInfo); |
| | | |
| | | /** |
| | | * æ°å¢è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo); |
| | | |
| | | /** |
| | | * å é¤è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param id è¯ååéä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationDoseInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationDoseInfoByIds(Long[] ids); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.smartor.domain.MedicationItem; |
| | | |
| | | /** |
| | | * è¯åä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Mapper |
| | | public interface MedicationItemMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¯åä¿¡æ¯ |
| | | * |
| | | * @param id è¯åä¿¡æ¯ä¸»é® |
| | | * @return è¯åä¿¡æ¯ |
| | | */ |
| | | public MedicationItem selectMedicationItemById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯åä¿¡æ¯å表 |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return è¯åä¿¡æ¯éå |
| | | */ |
| | | public List<MedicationItem> selectMedicationItemList(MedicationItem medicationItem); |
| | | |
| | | /** |
| | | * æ°å¢è¯åä¿¡æ¯ |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertMedicationItem(MedicationItem medicationItem); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯åä¿¡æ¯ |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateMedicationItem(MedicationItem medicationItem); |
| | | |
| | | /** |
| | | * å é¤è¯åä¿¡æ¯ |
| | | * |
| | | * @param id è¯åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationItemById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯åä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationItemByIds(Long[] ids); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.smartor.domain.ServiceAppointRecord; |
| | | |
| | | /** |
| | | * é¢çº¦è®°å½Mapperæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-06 |
| | | */ |
| | | @Mapper |
| | | public interface ServiceAppointRecordMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢é¢çº¦è®°å½ |
| | | * |
| | | * @param id é¢çº¦è®°å½ä¸»é® |
| | | * @return é¢çº¦è®°å½ |
| | | */ |
| | | public ServiceAppointRecord selectServiceAppointRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢çº¦è®°å½å表 |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return é¢çº¦è®°å½éå |
| | | */ |
| | | public List<ServiceAppointRecord> selectServiceAppointRecordList(ServiceAppointRecord serviceAppointRecord); |
| | | |
| | | /** |
| | | * æ°å¢é¢çº¦è®°å½ |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceAppointRecord(ServiceAppointRecord serviceAppointRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹é¢çº¦è®°å½ |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateServiceAppointRecord(ServiceAppointRecord serviceAppointRecord); |
| | | |
| | | /** |
| | | * å é¤é¢çº¦è®°å½ |
| | | * |
| | | * @param id é¢çº¦è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceAppointRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤é¢çº¦è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceAppointRecordByIds(Long[] ids); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | /** |
| | | * ç»è®¡é®é¢çé项çç¾åæ¯ |
| | | * |
| | | * @param taskIds |
| | | * @return |
| | | */ |
| | | List<ServiceSubtaskDetailRatioExport> statQuestionOption(@Param("taskIds") List<Long> taskIds); |
| | | List<ServiceSubtaskDetailRatioExport> statQuestionOption(@Param("taskIds") List<Long> taskIds, @Param("startOutHospTime") Date startOutHospTime, @Param("endOutHospTime") Date endOutHospTime); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.MedicationDoseInfo; |
| | | |
| | | /** |
| | | * è¯ååéä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | public interface IMedicationDoseInfoService |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param id è¯ååéä¿¡æ¯ä¸»é® |
| | | * @return è¯ååéä¿¡æ¯ |
| | | */ |
| | | public MedicationDoseInfo selectMedicationDoseInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯ååéä¿¡æ¯å表 |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return è¯ååéä¿¡æ¯éå |
| | | */ |
| | | public List<MedicationDoseInfo> selectMedicationDoseInfoList(MedicationDoseInfo medicationDoseInfo); |
| | | |
| | | /** |
| | | * æ°å¢è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çè¯ååéä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationDoseInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤è¯ååéä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id è¯ååéä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationDoseInfoById(Long id); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.MedicationItem; |
| | | |
| | | /** |
| | | * è¯åä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | public interface IMedicationItemService |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¯åä¿¡æ¯ |
| | | * |
| | | * @param id è¯åä¿¡æ¯ä¸»é® |
| | | * @return è¯åä¿¡æ¯ |
| | | */ |
| | | public MedicationItem selectMedicationItemById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯åä¿¡æ¯å表 |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return è¯åä¿¡æ¯éå |
| | | */ |
| | | public List<MedicationItem> selectMedicationItemList(MedicationItem medicationItem); |
| | | |
| | | /** |
| | | * æ°å¢è¯åä¿¡æ¯ |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertMedicationItem(MedicationItem medicationItem); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯åä¿¡æ¯ |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateMedicationItem(MedicationItem medicationItem); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯åä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çè¯åä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationItemByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤è¯åä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id è¯åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteMedicationItemById(Long id); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.ServiceAppointRecord; |
| | | |
| | | /** |
| | | * é¢çº¦è®°å½Serviceæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-06 |
| | | */ |
| | | public interface IServiceAppointRecordService |
| | | { |
| | | /** |
| | | * æ¥è¯¢é¢çº¦è®°å½ |
| | | * |
| | | * @param id é¢çº¦è®°å½ä¸»é® |
| | | * @return é¢çº¦è®°å½ |
| | | */ |
| | | public ServiceAppointRecord selectServiceAppointRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢çº¦è®°å½å表 |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return é¢çº¦è®°å½éå |
| | | */ |
| | | public List<ServiceAppointRecord> selectServiceAppointRecordList(ServiceAppointRecord serviceAppointRecord); |
| | | |
| | | /** |
| | | * æ°å¢é¢çº¦è®°å½ |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceAppointRecord(ServiceAppointRecord serviceAppointRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹é¢çº¦è®°å½ |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateServiceAppointRecord(ServiceAppointRecord serviceAppointRecord); |
| | | |
| | | /** |
| | | * æ¹éå é¤é¢çº¦è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çé¢çº¦è®°å½ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceAppointRecordByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤é¢çº¦è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param id é¢çº¦è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceAppointRecordById(Long id); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 主é®Serviceæ¥å£ |
| | | * |
| | | * |
| | | * @author lihu |
| | | * @date 2024-11-04 |
| | | */ |
| | | public interface IServiceOutPathService |
| | | public interface IServiceOutPathService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ä¸»é® |
| | | * |
| | | * |
| | | * @param id 主é®ä¸»é® |
| | | * @return ä¸»é® |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸»é®å表 |
| | | * |
| | | * |
| | | * @param serviceOutPath ä¸»é® |
| | | * @return 主é®éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢ä¸»é® |
| | | * |
| | | * |
| | | * @param serviceOutPath ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceOutPath(ServiceOutPath serviceOutPath); |
| | | |
| | | /** |
| | | * æ°å¢ä¸»é® |
| | | * |
| | | * @param serviceOutPath ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public String addOutPath(ServiceOutPath serviceOutPath); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¸»é® |
| | | * |
| | | * |
| | | * @param serviceOutPath ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¸»é® |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤ç主é®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤ä¸»é®ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param id 主é®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import afu.org.checkerframework.checker.oigj.qual.O; |
| | | import com.smartor.domain.MedicationItem; |
| | | import com.smartor.domain.ServiceSLTDDeptReqVO; |
| | | import com.smartor.domain.ServiceSLTDInhospReqVO; |
| | | import com.smartor.domain.ServiceSLTDInhospResDTO; |
| | |
| | | List<ServiceSLTDInhospResDTO> queryHealthcareRecordList(ServiceSLTDInhospReqVO reqVO); |
| | | |
| | | /** |
| | | * ééå¨é¢æ£è
ç¨è¯ä¿¡æ¯ |
| | | * |
| | | * @param reqVO æ¥è¯¢è¯·æ±åæ° |
| | | * @return è¯åå表 |
| | | */ |
| | | Boolean queryMedicationItemList(ServiceSLTDInhospReqVO reqVO); |
| | | |
| | | /** |
| | | * ééå»é¢ç¨æ·ä¿¡æ¯ |
| | | * |
| | | * @param reqVO |
| | |
| | | * } |
| | | */ |
| | | Boolean queryDeptWardAreaInfoList(ServiceSLTDDeptReqVO serviceSLTDDeptReqVO); |
| | | |
| | | public void aa(Map<String, Object> map); |
| | | |
| | | |
| | | } |
| | |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @param taskIds |
| | | * @return |
| | | */ |
| | | public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds); |
| | | public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime); |
| | | } |
| | |
| | | */ |
| | | public void getInHospDataGather(String cry, LocalDateTime startTime, LocalDateTime endTime); |
| | | |
| | | /** |
| | | * è·åé¢çº¦åè¯è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param cry åºå
¥é¢ç±»åï¼0-å
¥é¢ï¼1-åºé¢ 2,é¢çº¦è®°å½ |
| | | * @param startTime å¼å§æ¶é´ |
| | | * @param endTime ç»ææ¶é´ |
| | | */ |
| | | public void getAppointRecordInfo(String cry, LocalDateTime startTime, LocalDateTime endTime); |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.mapper.MedicationDoseInfoMapper; |
| | | import com.smartor.domain.MedicationDoseInfo; |
| | | import com.smartor.service.IMedicationDoseInfoService; |
| | | |
| | | /** |
| | | * è¯ååéä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Service |
| | | public class MedicationDoseInfoServiceImpl implements IMedicationDoseInfoService |
| | | { |
| | | @Autowired |
| | | private MedicationDoseInfoMapper medicationDoseInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param id è¯ååéä¿¡æ¯ä¸»é® |
| | | * @return è¯ååéä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public MedicationDoseInfo selectMedicationDoseInfoById(Long id) |
| | | { |
| | | return medicationDoseInfoMapper.selectMedicationDoseInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯ååéä¿¡æ¯å表 |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return è¯ååéä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<MedicationDoseInfo> selectMedicationDoseInfoList(MedicationDoseInfo medicationDoseInfo) |
| | | { |
| | | return medicationDoseInfoMapper.selectMedicationDoseInfoList(medicationDoseInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo) |
| | | { |
| | | medicationDoseInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return medicationDoseInfoMapper.insertMedicationDoseInfo(medicationDoseInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param medicationDoseInfo è¯ååéä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo) |
| | | { |
| | | medicationDoseInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return medicationDoseInfoMapper.updateMedicationDoseInfo(medicationDoseInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯ååéä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çè¯ååéä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteMedicationDoseInfoByIds(Long[] ids) |
| | | { |
| | | return medicationDoseInfoMapper.deleteMedicationDoseInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¯ååéä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id è¯ååéä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteMedicationDoseInfoById(Long id) |
| | | { |
| | | return medicationDoseInfoMapper.deleteMedicationDoseInfoById(id); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.mapper.MedicationItemMapper; |
| | | import com.smartor.domain.MedicationItem; |
| | | import com.smartor.service.IMedicationItemService; |
| | | |
| | | /** |
| | | * è¯åä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-17 |
| | | */ |
| | | @Service |
| | | public class MedicationItemServiceImpl implements IMedicationItemService |
| | | { |
| | | @Autowired |
| | | private MedicationItemMapper medicationItemMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯åä¿¡æ¯ |
| | | * |
| | | * @param id è¯åä¿¡æ¯ä¸»é® |
| | | * @return è¯åä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public MedicationItem selectMedicationItemById(Long id) |
| | | { |
| | | return medicationItemMapper.selectMedicationItemById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯åä¿¡æ¯å表 |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return è¯åä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<MedicationItem> selectMedicationItemList(MedicationItem medicationItem) |
| | | { |
| | | return medicationItemMapper.selectMedicationItemList(medicationItem); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¯åä¿¡æ¯ |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertMedicationItem(MedicationItem medicationItem) |
| | | { |
| | | medicationItem.setCreateTime(DateUtils.getNowDate()); |
| | | return medicationItemMapper.insertMedicationItem(medicationItem); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯åä¿¡æ¯ |
| | | * |
| | | * @param medicationItem è¯åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateMedicationItem(MedicationItem medicationItem) |
| | | { |
| | | medicationItem.setUpdateTime(DateUtils.getNowDate()); |
| | | return medicationItemMapper.updateMedicationItem(medicationItem); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯åä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çè¯åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteMedicationItemByIds(Long[] ids) |
| | | { |
| | | return medicationItemMapper.deleteMedicationItemByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¯åä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id è¯åä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteMedicationItemById(Long id) |
| | | { |
| | | return medicationItemMapper.deleteMedicationItemById(id); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.mapper.ServiceAppointRecordMapper; |
| | | import com.smartor.domain.ServiceAppointRecord; |
| | | import com.smartor.service.IServiceAppointRecordService; |
| | | |
| | | /** |
| | | * é¢çº¦è®°å½Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author lihu |
| | | * @date 2026-07-06 |
| | | */ |
| | | @Service |
| | | public class ServiceAppointRecordServiceImpl implements IServiceAppointRecordService |
| | | { |
| | | @Autowired |
| | | private ServiceAppointRecordMapper serviceAppointRecordMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢çº¦è®°å½ |
| | | * |
| | | * @param id é¢çº¦è®°å½ä¸»é® |
| | | * @return é¢çº¦è®°å½ |
| | | */ |
| | | @Override |
| | | public ServiceAppointRecord selectServiceAppointRecordById(Long id) |
| | | { |
| | | return serviceAppointRecordMapper.selectServiceAppointRecordById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é¢çº¦è®°å½å表 |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return é¢çº¦è®°å½ |
| | | */ |
| | | @Override |
| | | public List<ServiceAppointRecord> selectServiceAppointRecordList(ServiceAppointRecord serviceAppointRecord) |
| | | { |
| | | return serviceAppointRecordMapper.selectServiceAppointRecordList(serviceAppointRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é¢çº¦è®°å½ |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertServiceAppointRecord(ServiceAppointRecord serviceAppointRecord) |
| | | { |
| | | serviceAppointRecord.setCreateTime(DateUtils.getNowDate()); |
| | | return serviceAppointRecordMapper.insertServiceAppointRecord(serviceAppointRecord); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é¢çº¦è®°å½ |
| | | * |
| | | * @param serviceAppointRecord é¢çº¦è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateServiceAppointRecord(ServiceAppointRecord serviceAppointRecord) |
| | | { |
| | | serviceAppointRecord.setUpdateTime(DateUtils.getNowDate()); |
| | | return serviceAppointRecordMapper.updateServiceAppointRecord(serviceAppointRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤é¢çº¦è®°å½ |
| | | * |
| | | * @param ids éè¦å é¤çé¢çº¦è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteServiceAppointRecordByIds(Long[] ids) |
| | | { |
| | | return serviceAppointRecordMapper.deleteServiceAppointRecordByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é¢çº¦è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param id é¢çº¦è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteServiceAppointRecordById(Long id) |
| | | { |
| | | return serviceAppointRecordMapper.deleteServiceAppointRecordById(id); |
| | | } |
| | | } |
| | |
| | | int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | | } |
| | | |
| | | //ç¦»é¢æ¹å¼ä»£ç 1-å»ç©ç¦»é¢ 2-å»å±è½¬é¢ 3-å»å±è½¬ç¤¾åºå«çæå¡æºæ/乡éå«çé¢ |
| | | // 4-éå»å±ç¦»é¢ 5-æ»äº¡ 9-å
¶ä» 10-ä»å
¥å®¤ 20-ææ¯å®¤ |
| | | String liYuanQxdm = ObjectUtils.isNotEmpty(JiuZhenXX.get("LiYuanQXDM")) ? JiuZhenXX.get("LiYuanQXDM").toString() : null; |
| | | if (ObjectUtils.isNotEmpty(liYuanQxdm) && ("5").equals(liYuanQxdm)) { |
| | | deathPatProcess(liYuanQxdm,patMedInhosp1); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | //ç¦»é¢æ¹å¼ä»£ç 1-å»ç©ç¦»é¢ 2-å»å±è½¬é¢ 3-å»å±è½¬ç¤¾åºå«çæå¡æºæ/乡éå«çé¢ |
| | | // 4-éå»å±ç¦»é¢ 5-æ»äº¡ 9-å
¶ä» 10-ä»å
¥å®¤ 20-ææ¯å®¤ |
| | | String liYuanQxdm = ObjectUtils.isNotEmpty(JiuZhenXX.get("LiYuanQXDM")) ? JiuZhenXX.get("LiYuanQXDM").toString() : null; |
| | | if (ObjectUtils.isNotEmpty(liYuanQxdm) && ("5").equals(liYuanQxdm)) { |
| | | deathPatProcess(liYuanQxdm,patMedInhosp1); |
| | | } |
| | | return true; |
| | | } else { |
| | |
| | | return requestParams; |
| | | } |
| | | |
| | | /** |
| | | * æ»äº¡æ£è
å¤ç |
| | | * @param liYuanQxdm |
| | | * @param patMedInhosp |
| | | * @return |
| | | */ |
| | | private int deathPatProcess(String liYuanQxdm, PatMedInhosp patMedInhosp){ |
| | | //æ»äº¡æ è®° |
| | | Boolean deathFlag = false; |
| | | //夿ç
人æ¯å¦æ»äº¡ |
| | | if (ObjectUtils.isNotEmpty(liYuanQxdm) && ("5").equals(liYuanQxdm)) { |
| | | deathFlag = true; |
| | | } |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp.getPatid()); |
| | | if(ObjectUtils.isNotEmpty(patArchive)) { |
| | | patMedInhosp.setInhospstate("1"); |
| | | if (deathFlag) { |
| | | //ç
人æ»äº¡æ é¡»é访 |
| | | patMedInhosp.setFuflag("0"); |
| | | //æ´æ°ç
人 notrequiredFlag |
| | | patArchive.setNotrequiredFlag("1"); |
| | | patArchive.setNotrequiredreason("æ£è
已离ä¸"); |
| | | patArchiveMapper.updatePatArchive(patArchive); |
| | | //对已ç»çæçé访任å¡è¿è¡å¤ç |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | | serviceSubtaskVO.setPatid(patArchive.getId()); |
| | | serviceSubtaskVO.setSendstate(2L); |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | serviceSubtask.setSendstate(4L); |
| | | serviceSubtask.setRemark(serviceSubtask.getRemark() + ";æ£è
已离ä¸ï¼ä¸é访"); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | } else { |
| | | return 0; |
| | | } |
| | | }else { |
| | | return -1; |
| | | } |
| | | return 1; |
| | | } |
| | | } |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.smartor.domain.ServiceOutPath; |
| | | import com.smartor.domain.ServiceTask; |
| | | import com.smartor.mapper.ServiceOutPathMapper; |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.service.IServiceOutPathService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class ServiceOutPathServiceImpl implements IServiceOutPathService { |
| | | @Autowired |
| | | private ServiceOutPathMapper serviceOutPathMapper; |
| | | @Autowired |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | | @Value("${localIP}") |
| | | private String localIP; |
| | | @Value("${req_path}") |
| | | private String req_path; |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸»é® |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä¸»é® |
| | | * |
| | | * @param serviceOutPath ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public String addOutPath(ServiceOutPath serviceOutPath) { |
| | | ServiceTask serviceTask = serviceTaskMapper.selectServiceTaskByTaskid(Long.valueOf(serviceOutPath.getParam1())); |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(serviceOutPath.getParam1().toString(), pub_key); |
| | | String patid= rsaPublicKeyExample.encryptedData(serviceOutPath.getParam2().toString(), pub_key); |
| | | String subid= rsaPublicKeyExample.encryptedData(serviceOutPath.getParam6().toString(), pub_key); |
| | | Date now = DateUtils.getNowDate(); |
| | | ServiceOutPath sop = new ServiceOutPath(); |
| | | sop.setParam1(taskId); |
| | | sop.setParam2(patid); |
| | | sop.setParam3(serviceTask.getTaskName()); |
| | | sop.setParam6(subid); |
| | | sop.setCreateTime(now); |
| | | sop.setUpdateTime(now); |
| | | sop.setOrgid(serviceTask.getOrgid()); |
| | | sop.setDeptCode(serviceTask.getDeptcode()); |
| | | sop.setWardCode(serviceTask.getLeavehospitaldistrictcode()); |
| | | sop.setDeptName(serviceTask.getDeptname()); |
| | | sop.setWardName(serviceTask.getLeavehospitaldistrictname()); |
| | | serviceOutPathMapper.insertServiceOutPath(sop); |
| | | //转æ16è¿å¶å¹¶ååradixåupdateTime |
| | | serviceOutPath.setRadix(String.format("%03X", sop.getId())); |
| | | serviceOutPath.setUrl(localIP + ":" + req_path + "/wt?p=" + sop.getRadix()); |
| | | serviceOutPathMapper.updateServiceOutPath(serviceOutPath); |
| | | return serviceOutPath.getUrl(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¸»é® |
| | | * |
| | | * @param serviceOutPath ä¸»é® |
| | |
| | | private SysUserRole2Mapper sysUserRoleMapper; |
| | | |
| | | @Autowired |
| | | private MedicationItemMapper medicationItemMapper; |
| | | |
| | | @Autowired |
| | | private MedicationDoseInfoMapper medicationDoseInfoMapper; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, String> redisTemplate; |
| | | |
| | | @Value("${sltd_pub_path}") |
| | |
| | | Map<String, Object> requestParams = buildRequestParams(reqVO); |
| | | Map<String, String> headers = buildRequestHeaders(); |
| | | log.info("请æ±åæ°åºé¢æ°æ®å°åï¼{},appKey:{}", sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", APP_KEY); |
| | | String result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", new Gson().toJson(requestParams), headers); |
| | | String result = null; |
| | | if (reqVO.getSize() == null && reqVO.getCurrent() == null) |
| | | result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", new Gson().toJson(requestParams), headers); |
| | | else |
| | | result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcPageHealthcareRecordList", new Gson().toJson(requestParams), headers); |
| | | log.info("queryHealthcareRecordList--resultè¿åçç»æå¼ï¼{}", result == null ? "空å¼" : "æå¼"); |
| | | |
| | | String cry = determineCry(reqVO); |
| | | log.info("cryçå¼ä¸ºï¼{}", cry); |
| | |
| | | log.error("ãqueryHealthcareRecordListãè°ç¨çç«åå¾·å¥åº·è®°å½æ¥è¯¢æ¥å£å¼å¸¸ï¼è¯·æ±åæ°ï¼{}", reqVO, e); |
| | | throw new RuntimeException("è°ç¨çç«åå¾·å¥åº·è®°å½æ¥è¯¢æ¥å£å¤±è´¥:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Boolean queryMedicationItemList(ServiceSLTDInhospReqVO reqVO) { |
| | | try { |
| | | Map<String, Object> requestParams = buildRequestParams(reqVO); |
| | | Map<String, String> headers = buildRequestHeaders(); |
| | | log.info("请æ±åè¯åä¿¡æ¯å°åï¼{},appKey:{}", sltdPubPath + "/hbos-thirdparty-integration/standard/base/mc/service/medication/queryMedicationInfoPage", APP_KEY); |
| | | String result = HttpUtils.sendPostByHeader(sltdPubPath + "/hbos-thirdparty-integration/standard/base/mc/service/medication/queryMedicationInfoPage", new Gson().toJson(requestParams), headers); |
| | | List<Map<String, Object>> dataList = getDataList(result, 2); |
| | | for (Map<String, Object> dataItem : dataList) { |
| | | MedicationItem medicationItem = convertToMedication(dataItem); |
| | | log.info("medicationItemçå¼ä¸ºï¼{}", medicationItem); |
| | | medicationItemMapper.insertMedicationItem(medicationItem); |
| | | List<MedicationDoseInfo> doseInfoList = medicationItem.getDoseInfoList(); |
| | | for (MedicationDoseInfo doseInfo : doseInfoList) { |
| | | doseInfo.setMedicationItemId(medicationItem.getId()); |
| | | medicationDoseInfoMapper.insertMedicationDoseInfo(doseInfo); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("ãqueryMedicationItemListãè°ç¨çç«åå¾·è¯åä¿¡æ¯æ¥è¯¢æ¥å£å¼å¸¸ï¼è¯·æ±åæ°ï¼{}", reqVO, e); |
| | | throw new RuntimeException(e); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | |
| | | Map<String, String> headers = buildRequestHeaders(); |
| | | String result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/dept/queryDeptList", new Gson().toJson(params), headers); |
| | | log.info("ãqueryDeptWardAreaInfoListãæ¥å£ååºç»æï¼{}", StringUtils.isEmpty(result) ? "空ç" : "ä¸ç©º"); |
| | | List<Map<String, Object>> dataList = getDataList(result); |
| | | List<Map<String, Object>> dataList = getDataList(result, 1); |
| | | log.info("-----------dataListæ¥å£ååºç»æï¼{}", dataList.size()); |
| | | for (Map<String, Object> dataItem : dataList) { |
| | | SysDept sysDept = new SysDept(); |
| | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void aa(Map<String, Object> map) { |
| | | List<String> types = new ArrayList<>(); |
| | | types.add("FH0109.27"); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | String jsonString = objectMapper.writeValueAsString(map); |
| | | parseResponseData(jsonString, types, "1", "20001001"); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ééå»é¢ç¨æ·ä¿¡æ¯ |
| | |
| | | Map<String, String> headers = buildRequestHeaders(); |
| | | String result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/staff/queryStaffList", new Gson().toJson(requestParams), headers); |
| | | log.info("ãqueryHealthcareRecordListãæ¥å£ååºç»ææ¯å¦æå¼ï¼{}", StringUtils.isEmpty(result) ? "没å¼" : "æå¼"); |
| | | List<Map<String, Object>> dataList = getDataList(result); |
| | | List<Map<String, Object>> dataList = getDataList(result, 1); |
| | | for (Map<String, Object> dataItem : dataList) { |
| | | SysUser sysUser = new SysUser(); |
| | | if (StringUtils.isEmpty(getStringValue(dataItem, "accountNo"))) { |
| | |
| | | } |
| | | |
| | | private String determineCry(ServiceSLTDInhospReqVO reqVO) { |
| | | if (CollectionUtils.isEmpty(reqVO.getStatusList())) return null; |
| | | |
| | | if (reqVO.getStatusList().contains("FH0109.24")) { |
| | | //å
¥é¢ |
| | | return "0"; |
| | | } else if (reqVO.getStatusList().contains("FH0109.27")) { |
| | | //åºé¢ |
| | | return "1"; |
| | | } else if (reqVO.getStatusList().contains("FH0109.22") || reqVO.getStatusList().contains("FH0109.23") || reqVO.getStatusList().contains("FH0109.53")) { |
| | | //é¢å
¥é¢ |
| | | return "3"; |
| | | if (CollectionUtils.isEmpty(reqVO.getStatusList()) && CollectionUtils.isEmpty(reqVO.getHealthcareRecordTypeList())) |
| | | return null; |
| | | if (reqVO.getStatusList() != null) { |
| | | if (reqVO.getStatusList().contains("FH0109.24")) { |
| | | //å
¥é¢ |
| | | return "0"; |
| | | } else if (reqVO.getStatusList().contains("FH0109.27")) { |
| | | //åºé¢ |
| | | return "1"; |
| | | } else if (reqVO.getStatusList().contains("FH0109.22") || reqVO.getStatusList().contains("FH0109.23") || reqVO.getStatusList().contains("FH0109.53")) { |
| | | //é¢å
¥é¢ |
| | | return "3"; |
| | | } |
| | | } |
| | | if (reqVO.getHealthcareRecordTypeList() != null) { |
| | | if (reqVO.getHealthcareRecordTypeList().contains("FH0108.03") || reqVO.getHealthcareRecordTypeList().contains("FH0108.01")) { |
| | | //鍿¥è¯ |
| | | return "4"; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | |
| | | params.put("orgId", Long.parseLong(reqVO.getOrgId())); |
| | | } |
| | | if (reqVO.getCampusId() != null) { |
| | | params.put("campusId", reqVO.getCampusId()); |
| | | params.put("campusIds", reqVO.getCampusId()); |
| | | } |
| | | if (reqVO.getStartHeadTime() != null) { |
| | | params.put("startHeadTime", reqVO.getStartHeadTime()); |
| | |
| | | |
| | | private List<ServiceSLTDInhospResDTO> parseResponseData(String result, List<String> types, String cry, String campusId) { |
| | | try { |
| | | List<Map<String, Object>> dataList = getDataList(result); |
| | | List<Map<String, Object>> dataList = getDataList(result, cry.equals("4") ? 2 : 1); |
| | | log.info("ãparseResponseDataãæåè§£ædataList:{}æ¡å¥åº·è®°å½æ°æ®", dataList.size()); |
| | | List<ServiceSLTDInhospResDTO> resultList = new ArrayList<>(); |
| | | for (Map<String, Object> dataItem : dataList) { |
| | | resultList.add(convertToDTO(dataItem)); |
| | | } |
| | | log.info("ãparseResponseDataãæåè§£æ{}æ¡å¥åº·è®°å½æ°æ®", resultList.size()); |
| | | log.info("ãparseResponseDataãæåè§£æresultList:{}æ¡å¥åº·è®°å½æ°æ®", resultList.size()); |
| | | |
| | | processResultList(resultList, types, cry, campusId); |
| | | return resultList; |
| | |
| | | } |
| | | } |
| | | |
| | | public List<Map<String, Object>> getDataList(String result) { |
| | | /** |
| | | * è§£ææ¥å£è¿åæ°æ® |
| | | * |
| | | * @param result æ¥å£è¿åæ°æ® |
| | | * @param flag 1ä»£è¡¨ï¼æ°ç»å¨dataéï¼2代表æ°ç»å¨data/recordsé |
| | | * @return è§£æåçæ°æ®å表 |
| | | */ |
| | | |
| | | public List<Map<String, Object>> getDataList(String result, Integer flag) { |
| | | Gson gson = new Gson(); |
| | | Type mapType = new TypeToken<Map<String, Object>>() { |
| | | }.getType(); |
| | | Map<String, Object> responseMap = gson.fromJson(result, mapType); |
| | | log.info("ãparseResponseDataãæ¥å£è¿åæ°æ®çresponseMapï¼{}", Objects.isNull(responseMap) ? "空ç" : "æå¼"); |
| | | Number codeNum = (Number) responseMap.get("code"); |
| | | String code = BigDecimal.valueOf(codeNum.longValue()).toPlainString(); |
| | | if (StringUtils.isEmpty(code) || !code.equals("200")) { |
| | |
| | | } |
| | | |
| | | Object dataObj = responseMap.get("data"); |
| | | if (flag == 1) { |
| | | dataObj = responseMap.get("data"); |
| | | } else if (flag == 2) { |
| | | //鍿¥è¯çåé¡µæ°æ®æ¯å¨recordsä¸ |
| | | dataObj = ((Map<String, Object>) responseMap.get("data")).get("records"); |
| | | log.info("ãparseResponseDataãæ¥å£è¿åæ°æ®çdataObjï¼{}", Objects.isNull(dataObj) ? "空ç" : "æå¼"); |
| | | } |
| | | if (dataObj == null) { |
| | | log.info("ãparseResponseDataãæ¥å£è¿åæ°æ®ä¸ºç©º"); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | String dataJson = gson.toJson(dataObj); |
| | | Type listType = new TypeToken<List<Map<String, Object>>>() { |
| | | }.getType(); |
| | | List<Map<String, Object>> dataList = gson.fromJson(dataJson, listType); |
| | | // å
¼å®¹data为æ°ç»æå¯¹è±¡ä¸¤ç§æ
åµï¼æ¥å£æ£å¸¸æ¶data为[{...}]æ°ç»ï¼ |
| | | // å¼å¸¸æç©ºæ°æ®æ¶å¯è½è¿å{}对象ï¼ç´æ¥æListè§£æä¼æJsonSyntaxException |
| | | List<Map<String, Object>> dataList; |
| | | if (dataObj instanceof List) { |
| | | String dataJson = gson.toJson(dataObj); |
| | | Type listType = new TypeToken<List<Map<String, Object>>>() { |
| | | }.getType(); |
| | | dataList = gson.fromJson(dataJson, listType); |
| | | } else { |
| | | log.info("ãparseResponseDataãæ¥å£è¿ådata䏿¯æ°ç»ï¼èæ¯å¯¹è±¡ç±»åï¼dataå
容ï¼{}", gson.toJson(dataObj)); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | // ä½¿ç¨ Set å»éï¼ç¡®ä¿æ²¡æéå¤çæ°æ® |
| | | Set<Map<String, Object>> uniqueDataSet = new HashSet<>(dataList); |
| | |
| | | List<PatMedInhosp> patMedInhospList3 = patMedInhospService.selectPatMedInhosp(queryInhosp); |
| | | if (CollectionUtils.isEmpty(patMedInhospList3)) { |
| | | try { |
| | | //è·åä¸ä¸å
¥é¢ç³è¯·å |
| | | Map<String, String> headers = buildRequestHeaders(); |
| | | Map<String, Object> requestParams = new HashMap<>(); |
| | | requestParams.put("orgId", "20001001"); |
| | | requestParams.put("20001001", patArchive.getPatidHis()); |
| | | String result = HttpUtils.sendPostByHeader(sltdPubPath + "/hospitalizedApply/query", new Gson().toJson(requestParams), headers); |
| | | |
| | | |
| | | patMedInhospService.insertPatMedInhosp(patMedInhosp); |
| | | log.debug("æåæå
¥é¢å
¥é¢è®°å½ï¼serialnum={}", patMedInhosp.getSerialnum()); |
| | | } catch (Exception e) { |
| | |
| | | return dto; |
| | | } |
| | | |
| | | private MedicationItem convertToMedication(Map<String, Object> dataItem) { |
| | | MedicationItem dto = new MedicationItem(); |
| | | dto.setOrgId(getLongValue(dataItem, "orgId")); |
| | | dto.setIdentificationCode(getStringValue(dataItem, "identificationCode")); |
| | | dto.setWbm(getStringValue(dataItem, "wbm")); |
| | | dto.setMedicationCommonName(getStringValue(dataItem, "medicationCommonName")); |
| | | dto.setManufacturerName(getStringValue(dataItem, "manufacturerName")); |
| | | dto.setItemCode(getStringValue(dataItem, "itemCode")); |
| | | dto.setSmallLargePackageRatio(getLongValue(dataItem, "smallLargePackageRatio")); |
| | | dto.setRemark(getStringValue(dataItem, "remark")); |
| | | dto.setItemName(getStringValue(dataItem, "itemName")); |
| | | dto.setMedicationType(getStringValue(dataItem, "medicationType")); |
| | | Object mainDiagObj = dataItem.get("doseInfoList"); |
| | | List<MedicationDoseInfo> doseInfoList = new ArrayList<>(); |
| | | if (mainDiagObj instanceof List) { |
| | | List<Map<String, Object>> mainDiagList = (List<Map<String, Object>>) mainDiagObj; |
| | | for (Map<String, Object> mainDiagMap : mainDiagList) { |
| | | MedicationDoseInfo medicationDoseInfo = new MedicationDoseInfo(); |
| | | medicationDoseInfo.setDoseSmallPackageRation(getBigDecimalValue(mainDiagMap, "doseSmallPackageRation")); |
| | | medicationDoseInfo.setDose(getLongValue(mainDiagMap, "dose")); |
| | | medicationDoseInfo.setDoseSmallPackageNum(getLongValue(mainDiagMap, "doseSmallPackageNum")); |
| | | medicationDoseInfo.setDoseUnit(getStringValue(mainDiagMap, "doseUnit")); |
| | | medicationDoseInfo.setDoseUnitType(getLongValue(mainDiagMap, "doseUnitType")); |
| | | doseInfoList.add(medicationDoseInfo); |
| | | } |
| | | } |
| | | dto.setDoseInfoList(doseInfoList); |
| | | dto.setAntimicrobialGradeCode(getStringValue(dataItem, "antimicrobialGradeCode")); |
| | | dto.setLicenseNumber(getStringValue(dataItem, "licenseNumber")); |
| | | dto.setDefaultUsageName(getStringValue(dataItem, "defaultUsageName")); |
| | | dto.setSpecialDrugsName(getStringValue(dataItem, "specialDrugsName")); |
| | | dto.setAntimicrobialGradeName(getStringValue(dataItem, "antimicrobialGradeName")); |
| | | dto.setCommonPinyin(getStringValue(dataItem, "commonPinyin")); |
| | | dto.setCommonWbm(getStringValue(dataItem, "commonWbm")); |
| | | dto.setManufacturerId(getLongValue(dataItem, "manufacturerId")); |
| | | dto.setDefaultUsageId(getLongValue(dataItem, "defaultUsageId")); |
| | | dto.setSpecification(getStringValue(dataItem, "specification")); |
| | | dto.setSmallPackageUnit(getStringValue(dataItem, "smallPackageUnit")); |
| | | dto.setItemId(getLongValue(dataItem, "itemId")); |
| | | dto.setSpecialDrugsCode(getStringValue(dataItem, "specialDrugsCode")); |
| | | dto.setPinyin(getStringValue(dataItem, "pinyin")); |
| | | dto.setDoseFormName(getStringValue(dataItem, "doseFormName")); |
| | | dto.setLargePackageUnit(getStringValue(dataItem, "largePackageUnit")); |
| | | dto.setRetailPrice(getBigDecimalValue(dataItem, "retailPrice")); |
| | | dto.setStatus(getLongValue(dataItem, "status")); |
| | | return dto; |
| | | } |
| | | |
| | | |
| | | private List<ServiceSLTDContactsResDTO> parseContacts(List<?> contactsList) { |
| | | List<ServiceSLTDContactsResDTO> contacts = new ArrayList<>(); |
| | | for (Object contactObj : contactsList) { |
| | |
| | | return value instanceof Number ? new BigDecimal(value.toString()).toPlainString() : value.toString(); |
| | | } |
| | | |
| | | private BigDecimal getBigDecimalValue(Map<String, Object> map, String key) { |
| | | Object value = map.get(key); |
| | | if (value == null) { |
| | | return null; |
| | | } |
| | | |
| | | // åªå¤çæ°åç±»åï¼é¿å
ç§å¦è®¡æ°æ³ |
| | | return new BigDecimal(value.toString()); |
| | | } |
| | | |
| | | private Long getLongValue(Map<String, Object> map, String key) { |
| | | Object value = map.get(key); |
| | | if (value == null) return null; |
| | |
| | | if (key.contains("-WJscriptCache")) { |
| | | List<SvyTaskTemplateScriptVO> cacheList = redisCache.getCacheList(key); |
| | | cacheList.sort(Comparator.comparingLong(SvyTaskTemplateScriptVO::getSort)); |
| | | log.info("é®å·åçç»æï¼{}", cacheList); |
| | | log.info("é®å·åçç»æï¼{}", CollectionUtils.isEmpty(cacheList) ? null : cacheList.size()); |
| | | for (int i = 0; i < cacheList.size(); i++) { |
| | | if (i == 0) { |
| | | //è¿ä¸ªæ¶é´è¦æ¾å°ç¬¬ä¸é¢ |
| | |
| | | } else { |
| | | SvyTaskTemplateScriptVO svyTaskTemplateScriptVO = cacheList.get(i); |
| | | log.info("svyTaskTemplateScriptVOçä¿¡æ¯ä¸ºï¼{}ï¼içå¼ä¸ºï¼{}", svyTaskTemplateScriptVO.getScriptno(), i); |
| | | // SvyTaskTemplateScriptVO svyTaskTemplateScriptVO = DtoConversionUtils.sourceToTarget(cacheList.get(i), SvyTaskTemplateScriptVO.class); |
| | | List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = cacheList.get(i).getSvyTaskTemplateTargetoptions(); |
| | | // List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = DtoConversionUtils.sourceToTarget(cacheList.get(i).getSvyTaskTemplateTargetoptions(), SvyTaskTemplateTargetoption.class); |
| | | svyTaskTemplateScriptVO.setSvyTaskTemplateTargetoptions(svyTaskTemplateTargetoptions); |
| | | |
| | | if (svyTaskTemplateScriptVO.getSort() != null && svyTaskTemplateScriptVO.getSort().equals(nextScriptno)) { |
| | | // log.error("svyTaskTemplateScriptVOçå¼ä¸ºï¼{}", svyTaskTemplateScriptVO); |
| | | Map<String, String> map = setWJInfo(svyTaskTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0]), Objects.isNull(split[2]) ? null : Long.valueOf(split[2])); |
| | | log.error("nextScriptNoçä¿¡æ¯ä¸ºï¼{}", map.get("nextScriptNo")); |
| | | if (!Objects.isNull(map.get("nextScriptNo"))) |
| | |
| | | } else if (key.contains("-SFscriptCache")) { |
| | | List<IvrTaskTemplateScriptVO> cacheList = redisCache.getCacheList(key); |
| | | cacheList.sort(Comparator.comparingLong(IvrTaskTemplateScriptVO::getSort)); |
| | | log.error("çµè¯é访é®å·åçç»æï¼{}", cacheList.size()); |
| | | log.error("çµè¯é访é®å·åçç»æï¼{}", CollectionUtils.isEmpty(cacheList) ? null : cacheList.size()); |
| | | for (int i = 0; i < cacheList.size(); i++) { |
| | | if (i == 0) { |
| | | //è¿ä¸ªæ¶é´è¦æ¾å°ç¬¬ä¸é¢ |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : cacheList) { |
| | | if (ivrTaskTemplateScriptVO.getSort() == 1L) { |
| | | //è¯´ææ¯ç¬¬ä¸é¢ |
| | | // IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = DtoConversionUtils.sourceToTarget(cacheList.get(0), IvrTaskTemplateScriptVO.class); |
| | | List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = cacheList.get(0).getIvrTaskScriptTargetoptionList(); |
| | | // List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = DtoConversionUtils.sourceToTarget(ivrLibaTemplateTargetoptions, IvrTaskTemplateTargetoption.class); |
| | | ivrTaskTemplateScriptVO.setIvrTaskScriptTargetoptionList(ivrTaskTemplateTargetoptions); |
| | | Map<String, String> map = setSFInfo(ivrTaskTemplateScriptVO, tid, pid, subid); |
| | | if (!Objects.isNull(map.get("nextScriptNo"))) |
| | |
| | | if (serviceSubTaskCacheReq.getType() == 2) { |
| | | List<SvyTaskTemplateScriptVO> cacheList = serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOS(); |
| | | cacheList.sort(Comparator.comparingLong(SvyTaskTemplateScriptVO::getSort)); |
| | | log.info("é®å·åçç»æï¼{}", cacheList); |
| | | log.info("é®å·åçç»æï¼{}", CollectionUtils.isEmpty(cacheList) ? null : cacheList.size()); |
| | | // 颿¥è¯¢å¾ªç¯ä¸ä¸åçæ°æ®ï¼é¿å
æ¯é¢é夿¥æ°æ®åº |
| | | ServiceSubtaskEntity preSubtaskVO = new ServiceSubtaskEntity(); |
| | | preSubtaskVO.setTaskid(tid); |
| | |
| | | } else if (serviceSubTaskCacheReq.getType() == 1) { |
| | | List<IvrTaskTemplateScriptVO> cacheList = serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList(); |
| | | cacheList.sort(Comparator.comparingLong(vo -> Optional.ofNullable(vo.getSort()).orElse(0))); |
| | | log.error("çµè¯é访é®å·åçç»æï¼{}", cacheList.size()); |
| | | log.error("çµè¯é访é®å·åçç»æï¼{}", CollectionUtils.isEmpty(cacheList) ? null : cacheList.size()); |
| | | for (int i = 0; i < cacheList.size(); i++) { |
| | | if (i == 0) { |
| | | //è¿ä¸ªæ¶é´è¦æ¾å°ç¬¬ä¸é¢ |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å°é®é¢ä¿åå°ç¼åä¸ |
| | | * |
| | |
| | | map.put("templateName", serviceSubtask.getTemplatename()); |
| | | map.put("upTaskName", null); |
| | | if (ObjectUtils.isNotEmpty(serviceSubtask) && serviceSubtask.getUpid() != null) { |
| | | Map<String, Object> scriptInfoByCondition2 = serviceTaskService.getScriptInfoByCondition(serviceSubTaskQueryReq.getTaskid(), serviceSubTaskQueryReq.getPatid(), serviceSubTaskQueryReq.getIsFinish(), serviceSubTaskQueryReq.getPatfrom(),serviceSubTaskQueryReq.getSubId()); |
| | | Map<String, Object> scriptInfoByCondition2 = serviceTaskService.getScriptInfoByCondition(serviceSubTaskQueryReq.getTaskid(), serviceSubTaskQueryReq.getPatid(), serviceSubTaskQueryReq.getIsFinish(), serviceSubTaskQueryReq.getPatfrom(), serviceSubTaskQueryReq.getSubId()); |
| | | Map<String, Object> map1 = getMap(scriptInfoByCondition2, Long.valueOf(serviceSubtask.getUpid()), serviceSubTaskQueryReq.getPatid()); |
| | | if (!map1.isEmpty()) { |
| | | map.put("upScriptResult", map1.get("scriptResult")); |
| | |
| | | return map; |
| | | } |
| | | |
| | | private Map<String, String> setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid, Long subid, |
| | | List<ServiceSubtask> selectServiceSubtaskList, ServiceTask serviceTask, |
| | | Map<Long, Long> existingDetailIdMap, Map<Long, Long> existingTraceIdMap) { |
| | | private Map<String, String> setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid, Long subid, List<ServiceSubtask> selectServiceSubtaskList, ServiceTask serviceTask, Map<Long, Long> existingDetailIdMap, Map<Long, Long> existingTraceIdMap) { |
| | | log.error("-----svyTaskTemplateScriptVOçå¼ä¸ºï¼{}", svyTaskTemplateScriptVO); |
| | | String score = "0"; |
| | | //ä¸é¢è·³è½¬ |
| | |
| | | serviceSubtaskDetailVO.setAsrtext(StringUtils.isEmpty(svyTaskTemplateScriptVO.getScriptResult()) ? "" : svyTaskTemplateScriptVO.getScriptResult().replaceAll("^\"|\"$", "")); |
| | | serviceSubtaskDetailVO.setMatchedtext(StringUtils.isEmpty(svyTaskTemplateScriptVO.getScriptResult()) ? "" : svyTaskTemplateScriptVO.getScriptResult().replaceAll("^\"|\"$", "")); |
| | | serviceSubtaskDetailVO.setScore(svyTaskTemplateScriptVO.getScore() != null ? svyTaskTemplateScriptVO.getScore().toString() : "0"); |
| | | serviceSubtaskDetailVO.setAnswerps(svyTaskTemplateScriptVO.getAnswerps()); |
| | | } else { |
| | | //éåå¤é |
| | | if (StringUtils.isNotEmpty(svyTaskTemplateScriptVO.getScriptResult())) { |
| | |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.dx.MessageSend; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | |
| | | |
| | | @Autowired |
| | | private IPatMedOuthospService patMedOuthospService; |
| | | @Autowired |
| | | private SysDept2Mapper sysDept2Mapper; |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | |
| | | if (serviceSubtaskRes.getSendstate() == 6) serviceSubtaskRes.setSendstateView(2L); |
| | | if (serviceSubtaskRes.getSendstate() == 4) serviceSubtaskRes.setSendstateView(3L); |
| | | // å¡«å
å½åè¡¥å¿ |
| | | if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())){ |
| | | if(StringUtils.isNotEmpty(serviceSubtask.getPreachform())){ |
| | | if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())) { |
| | | if (StringUtils.isNotEmpty(serviceSubtask.getPreachform())) { |
| | | //é»è®¤å第ä¸ä¸ª |
| | | serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0]); |
| | | } |
| | |
| | | serviceTask.setTemplatename(tempName); |
| | | } |
| | | serviceTask.setLeaveldeptcodes(serviceTaskVO.getLeaveldeptcodes()); |
| | | serviceTask.setLeavehospitaldistrictcode(serviceTask.getLeavehospitaldistrictcode()); |
| | | if (StringUtils.isEmpty(serviceTask.getLeavehospitaldistrictname()) && StringUtils.isNotEmpty(serviceTask.getLeavehospitaldistrictcode())) { |
| | | SysDept sysDept = sysDept2Mapper.selectDeptByCode(serviceTask.getLeavehospitaldistrictcode(), null); |
| | | serviceTask.setLeavehospitaldistrictname(sysDept.getDeptName()); |
| | | } |
| | | if (serviceTaskVO.getLongTask() == 1) serviceTask.setSendState(2L); |
| | | serviceTask.setCreateTime(new Date()); |
| | | serviceTask.setUpdateTime(new Date()); |
| | |
| | | //ååéä¸çicd10codeæ¯æéå¤çï¼æä»¥ä¸è½ç¨ååéä¸çicd10code廿¥è¯¢ |
| | | log.info("----serviceTaskdiagçå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | if (!StringUtils.isEmpty(serviceTaskVO.getIcd10name())) { |
| | | String[] Icd10Names = serviceTaskVO.getIcd10name().split("$"); |
| | | String[] Icd10codes = serviceTaskVO.getIcd10code().split("$"); |
| | | String[] Icd10Names = serviceTaskVO.getIcd10name().split(","); |
| | | String[] Icd10codes = serviceTaskVO.getIcd10code().split(","); |
| | | for (int i = 0; i < Icd10Names.length; i++) { |
| | | serviceTaskdiag.setIcd10code(Icd10codes[i]); |
| | | serviceTaskdiag.setIcd10name(Icd10Names[i]); |
| | |
| | | serviceSubtask.setRemark("çµè¯æ¥éæåï¼æ£è
æç»é访"); |
| | | serviceSubtask.setId(Long.valueOf(phoneCallRecordVO.getTaskid())); |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | // int startIndex = phoneCallRecordVO.getRecord_path().indexOf("voice") + "voice".length() + 1; // å 1æ¯è·³è¿/ç¬¦å· |
| | | // int endIndex = phoneCallRecordVO.getRecord_path().lastIndexOf("/"); |
| | |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("phone", serviceSubtask.getPhone()); |
| | | map.put("content", sendMagParam.getContent()); |
| | | String result = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(map)); |
| | | HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(map)); |
| | | redisCache.setCacheObject(subTaskId + "recordAccept-hungup", "1", 10, TimeUnit.MINUTES); |
| | | if (StringUtils.isNotEmpty(serviceSubtask.getRemark())) |
| | | serviceSubtask.setRemark("çµè¯åéææ¥,çä¿¡è¡¥å¿åéæå"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds) { |
| | | return serviceSubtaskMapper.statQuestionOption(taskIds); |
| | | public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime) { |
| | | return serviceSubtaskMapper.statQuestionOption(taskIds, startOutHospTime, endOutHospTime); |
| | | } |
| | | |
| | | private Boolean saveServiceSubtaskDetail(ServiceSubtask serviceSubtask) { |
| | |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | public class ServiceTaskServiceImpl implements IServiceTaskService { |
| | | @Autowired |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceTaskdeptMapper serviceTaskdeptMapper; |
| | | |
| | | @Autowired |
| | | private PatArchiveImportMapper patArchiveImportMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskPreachformMapper serviceSubtaskPreachformMapper; |
| | | |
| | | @Autowired |
| | | private HeLibraryMapper heLibraryMapper; |
| | | |
| | | @Autowired |
| | | private SvyTaskTemplateScriptMapper svyTaskTemplateScriptMapper; |
| | | @Autowired |
| | | private IvrTaskTemplateScriptMapper ivrTaskTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private SvyLibTemplateScriptMapper svyLibTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private PatArchiveMapper patArchiveMapper; |
| | | |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | |
| | | @Autowired |
| | | private PatMedOuthospMapper patMedOuthospMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private SvyLibTemplateTargetoptionMapper svyLibTemplateTargetoptionMapper; |
| | | @Autowired |
| | | private IvrTaskTemplateTargetoptionMapper ivrTaskTemplateTargetOptionMapper; |
| | | |
| | | @Autowired |
| | | private SvyTaskTemplateTargetoptionMapper svyTaskTemplateTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | |
| | | serviceSubtaskPreachformMapper.updateServiceSubtaskPreachform(ssp); |
| | | } |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(serviceTask.getKcb())) map.put("kcb", serviceTask.getKcb()); |
| | | map.put("script", info); |
| | | if (StringUtils.isNotEmpty(serviceTask.getJsy())) map.put("jsy", serviceTask.getJsy()); |
| | | map.put("type", serviceTask.getType()); |
| | | map.put("taskName", serviceTask.getTaskName()); |
| | | map.put("submit", "0"); |
| | | if (serviceTask != null) { |
| | | if (StringUtils.isNotEmpty(serviceTask.getKcb())) map.put("kcb", serviceTask.getKcb()); |
| | | map.put("script", info); |
| | | if (StringUtils.isNotEmpty(serviceTask.getJsy())) map.put("jsy", serviceTask.getJsy()); |
| | | map.put("type", serviceTask.getType()); |
| | | map.put("taskName", serviceTask.getTaskName()); |
| | | map.put("submit", "0"); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptContent())) { |
| | | for (Map<String, String> map : mapList) { |
| | | for (String key : map.keySet()) { |
| | | |
| | | ivrTaskTemplateScriptVO.setScriptContent(ivrTaskTemplateScriptVO.getScriptContent().replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : "")); |
| | | } |
| | | } |
| | |
| | | //éè¿æ¨¡æ¿IDè·åé®é¢ä¿¡æ¯ |
| | | SvyTaskTemplateScript svyTaskTemplateScript = new SvyTaskTemplateScript(); |
| | | svyTaskTemplateScript.setTemplateID(Long.valueOf(serviceTask.getTemplateid())); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList) && serviceSubtaskList.get(0).getTemplateid() != null) |
| | | svyTaskTemplateScript.setTemplateID(serviceSubtaskList.get(0).getTemplateid()); |
| | | if (serviceTask.getTemplateid() != null) svyTaskTemplateScript.setTemplateID(serviceTask.getTemplateid()); |
| | | svyTaskTemplateScript.setDelFlag("0"); |
| | | List<SvyTaskTemplateScript> svyTaskTemplateScripts = svyTaskTemplateScriptMapper.selectSvyTaskTemplateScriptList(svyTaskTemplateScript); |
| | | if (CollectionUtils.isEmpty(svyTaskTemplateScripts) || svyTaskTemplateScripts.size() == 0) { |
| | |
| | | import com.google.common.reflect.TypeToken; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.JsonArray; |
| | | import com.google.gson.JsonElement; |
| | | import com.google.gson.JsonObject; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.entity.SysUserDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | import com.ruoyi.common.utils.HttpUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IHNGatherPatArchiveService; |
| | | import com.smartor.service.IPatArchiveService; |
| | | import com.smartor.service.IPatMedInhospService; |
| | | import com.smartor.service.IXHGatherPatArchiveService; |
| | | import com.smartor.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | import java.lang.reflect.Type; |
| | | import java.net.URLEncoder; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | |
| | | |
| | | @Value("${hosp_info_url}") |
| | | private String hospInfoUrl; |
| | | |
| | | |
| | | @Autowired |
| | | IPatMedInhospService patMedInhospService; |
| | | |
| | | @Autowired |
| | | IPatArchiveService patArchiveService; |
| | | @Autowired |
| | | IServiceAppointRecordService iServiceAppointRecordService; |
| | | @Autowired |
| | | private SysConfigMapper sysConfigMapper; |
| | | @Value("${xhsmsPath}") |
| | | private String xhsmsPath; |
| | | // å¸å· |
| | | @Value("${xhsmsAccount}") |
| | | private String xhsmsAccount; |
| | | // æ¥å£å¯ç |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | // èææ¥å
¥ç |
| | | @Value("${xhsmsjrm}") |
| | | private String xhsmsjrm; |
| | | |
| | | |
| | | /** |
| | | * è·åæ£è
åºå
¥é¢ä¿¡æ¯ |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åé¢çº¦åè¯è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param cry åºå
¥é¢ç±»åï¼0-å
¥é¢ï¼1-åºé¢ 2,é¢çº¦è®°å½ |
| | | * @param startTime å¼å§æ¶é´ |
| | | * @param endTime ç»ææ¶é´ |
| | | */ |
| | | public void getAppointRecordInfo(String cry, LocalDateTime startTime, LocalDateTime endTime) { |
| | | log.info("ãgetAppointRecordInfoãå¼å§è·ååé¢çº¦åè¯è®°å½ä¿¡æ¯ï¼æ¶é´èå´ï¼{} ~ {}", startTime, endTime); |
| | | long startTimeMillis = System.currentTimeMillis(); |
| | | |
| | | try { |
| | | // ç¬¬ä¸æ¥ï¼æå»ºè¯·æ±åæ°å¹¶è°ç¨HISæ¥å£ |
| | | List<ServiceAppointRecord> appointRecordFromHIS = getAppointRecordFromHIS(cry, startTime, endTime); |
| | | |
| | | if (CollectionUtils.isEmpty(appointRecordFromHIS)) { |
| | | log.info("ãgetAppointRecordInfoãè·åé¢çº¦åè¯è®°å½ä¿¡æ¯ä¸ºç©ºï¼è·³è¿å¤ç"); |
| | | return; |
| | | } |
| | | log.info("ãgetAppointRecordInfoãè·åé¢çº¦åè¯è®°å½ä¿¡æ¯{}æ¡", appointRecordFromHIS.size()); |
| | | SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique("yytz.sms.template"); |
| | | if (sysConfig != null) { |
| | | String smsContemt = sysConfig.getConfigValue(); |
| | | // ç¬¬äºæ¥ï¼å¤çåè¯è®°å½ä¿¡æ¯ |
| | | for (ServiceAppointRecord serviceAppointRecord : appointRecordFromHIS) { |
| | | String replace = smsContemt.replace("${patFileName}", StringUtils.defaultString(serviceAppointRecord.getPatFileName())).replace("${registTimeRange}", StringUtils.defaultString(serviceAppointRecord.getRegistTimeRange())).replace("${registDeptName}", StringUtils.defaultString(serviceAppointRecord.getRegistDeptName())).replace("${treatDoctName}", StringUtils.defaultString(serviceAppointRecord.getTreatDoctName())); |
| | | Map<String, String> map2 = new HashMap<String, String>(); |
| | | map2.put("action", "send"); |
| | | map2.put("account", xhsmsAccount); |
| | | map2.put("password", xhsmsPwd); |
| | | map2.put("mobile", serviceAppointRecord.getPatTel()); |
| | | map2.put("content", replace); |
| | | map2.put("extno", xhsmsjrm); |
| | | map2.put("rt", "json"); |
| | | StringBuilder encodedParams = new StringBuilder(); |
| | | |
| | | for (Map.Entry<String, String> entry : map2.entrySet()) { |
| | | if (encodedParams.length() > 0) { |
| | | encodedParams.append("&"); |
| | | } |
| | | // 对é®åå¼è¿è¡URLç¼ç |
| | | String encodedKey = URLEncoder.encode(entry.getKey(), "UTF-8"); |
| | | String encodedValue = URLEncoder.encode(entry.getValue(), "UTF-8"); |
| | | encodedParams.append(encodedKey).append("=").append(encodedValue); |
| | | } |
| | | Boolean isSuccess = HttpUtils.sendPost(xhsmsPath, encodedParams.toString()); |
| | | if (isSuccess) { |
| | | log.info("---å¤çåè¯è®°å½ä¿¡æ¯åéæå,å
¥å为:{}", encodedParams.toString()); |
| | | serviceAppointRecord.setSendTime(new Date()); |
| | | serviceAppointRecord.setSenderName("ç³»ç»ç®¡çå"); |
| | | iServiceAppointRecordService.insertServiceAppointRecord(serviceAppointRecord); |
| | | } else { |
| | | log.info("å¤çåè¯è®°å½ä¿¡æ¯åé失败"); |
| | | iServiceAppointRecordService.insertServiceAppointRecord(serviceAppointRecord); |
| | | } |
| | | } |
| | | } |
| | | long endTimeMillis = System.currentTimeMillis(); |
| | | log.info("ãgetAppointRecordInfoã{},é¢çº¦åè¯è®°å½ä¿¡æ¯å¤ç宿ï¼èæ¶ï¼{}ms", endTimeMillis - startTimeMillis); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ãgetAppointRecordInfoãè·åé¢çº¦åè¯è®°å½ä¿¡æ¯å¤çå¼å¸¸", e); |
| | | throw new RuntimeException("è·åé¢çº¦åè¯è®°å½ä¿¡æ¯å¤çå¼å¸¸", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¬¬ä¸æ¥ï¼è°ç¨HISæ¥å£è·åæ°æ® |
| | |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | |
| | | private List<ServiceAppointRecord> getAppointRecordFromHIS(String cry, LocalDateTime startTime, LocalDateTime endTime) { |
| | | try { |
| | | // æå»ºè¯·æ±åæ° |
| | | Map<String, String> requestParams = buildRequestParams(cry, startTime, endTime); |
| | | |
| | | // æå»ºè¯·æ±å¤´ |
| | | Map<String, String> headers = buildRequestHeaders(startTime); |
| | | |
| | | // åéHTTPè¯·æ± |
| | | log.info("ãgetAppointRecordFromHISãåéHTTP请æ±ï¼è¯·æ±åæ°ï¼{},请æ±å°åï¼{}", new Gson().toJson(requestParams), hospInfoUrl); |
| | | String result = HttpUtils.sendPostByHeader(hospInfoUrl, new Gson().toJson(requestParams), headers); |
| | | |
| | | // è§£æååºæ°æ® |
| | | return parseResponseData2(result); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ãfetchHisDataãè°ç¨HISæ¥å£å¼å¸¸", e); |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¬¬äºæ¥ï¼ä¿ååå§æ°æ®å°æä»¶ |
| | |
| | | private Map<String, String> buildRequestHeaders(LocalDateTime startTime) { |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S"); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("x-hcsb-serviceno", "IS002347"); |
| | | header.put("x-hcsb-serviceno", "IS044056"); |
| | | // header.put("x-hcsb-serviceno", "IS002347"); |
| | | header.put("x-hcsb-version", "2.0"); |
| | | header.put("x-hcsb-sourcesyscode", "14"); |
| | | header.put("x-hcsb-token", "ArGE2JnHtxG/Zx5nrnGY4eOfMUJGGJokAJHigG1BrCY="); |
| | |
| | | req.put("cashStartDate", startTime.format(formatter)); |
| | | req.put("cashEndDate", endTime.format(formatter)); |
| | | req.put("currStatus", "4"); |
| | | } else { |
| | | } else if ("0".equals(cry)) { |
| | | // å
¥é¢åæ° |
| | | req.put("admissStartDate", startTime.format(formatter)); |
| | | req.put("admissEndDate", endTime.format(formatter)); |
| | | req.put("currStatus", "2"); |
| | | } else if ("2".equals(cry)) { |
| | | // é¢çº¦è®°å½æ¥è¯¢ |
| | | req.put("appointRegistDateBegin", startTime.format(formatter)); |
| | | req.put("appointRegistDateEnd", endTime.format(formatter)); |
| | | // æçåè¯ ï¼é¢çº¦ç¶ææ å¿(0:å·²é¢çº¦ 1:å·²æå· 2:å·²éå· 3:å·²å°±è¯ -1:ç
äººåæ¶ -2:å»é¢åæ¶ -3:æçåè¯)ï¼ |
| | | req.put("scheduleStatusFlag", "-3"); |
| | | } |
| | | |
| | | return req; |
| | |
| | | try { |
| | | Gson gson = new Gson(); |
| | | JsonObject jsonObject = gson.fromJson(result, JsonObject.class); |
| | | JsonArray resultArray = jsonObject.getAsJsonObject("data").getAsJsonArray("result"); |
| | | |
| | | // æ ¡éªdataåæ®µæ¯å¦ä¸ºJsonObject |
| | | JsonElement dataElement = jsonObject.get("data"); |
| | | if (dataElement == null || !dataElement.isJsonObject()) { |
| | | log.warn("ãparseResponseDataãååºæ°æ®ä¸dataåæ®µä¸ºç©ºæé对象类åï¼åå§æ°æ®ï¼{}", result); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | JsonObject dataObject = dataElement.getAsJsonObject(); |
| | | JsonElement resultElement = dataObject.get("result"); |
| | | if (resultElement == null || !resultElement.isJsonArray()) { |
| | | log.warn("ãparseResponseDataãååºæ°æ®ä¸resultåæ®µä¸ºç©ºæéæ°ç»ç±»åï¼åå§æ°æ®ï¼{}", result); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | JsonArray resultArray = resultElement.getAsJsonArray(); |
| | | Type resultType = new TypeToken<List<ThiedInhospInfo>>() { |
| | | }.getType(); |
| | | return gson.fromJson(resultArray, resultType); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è§£æååºæ°æ® |
| | | */ |
| | | private List<ServiceAppointRecord> parseResponseData2(String result) { |
| | | try { |
| | | Gson gson = new Gson(); |
| | | JsonObject jsonObject = gson.fromJson(result, JsonObject.class); |
| | | |
| | | // æ ¡éªdataåæ®µæ¯å¦ä¸ºJsonObject |
| | | JsonElement dataElement = jsonObject.get("data"); |
| | | if (dataElement == null || !dataElement.isJsonObject()) { |
| | | log.warn("ãparseResponseData2ãååºæ°æ®ä¸dataåæ®µä¸ºç©ºæé对象类åï¼åå§æ°æ®ï¼{}", result); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | JsonObject dataObject = dataElement.getAsJsonObject(); |
| | | JsonElement resultElement = dataObject.get("result"); |
| | | if (resultElement == null || !resultElement.isJsonArray()) { |
| | | log.warn("ãparseResponseData2ãååºæ°æ®ä¸resultåæ®µä¸ºç©ºæéæ°ç»ç±»åï¼åå§æ°æ®ï¼{}", result); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | JsonArray resultArray = resultElement.getAsJsonArray(); |
| | | Type resultType = new TypeToken<List<ServiceAppointRecord>>() { |
| | | }.getType(); |
| | | return gson.fromJson(resultArray, resultType); |
| | | } catch (Exception e) { |
| | | log.error("ãparseResponseData2ãè§£æååºæ°æ®å¼å¸¸ï¼åå§æ°æ®ï¼{}", result, e); |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¤çå个æ£è
æ°æ® |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.MedicationDoseInfoMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.MedicationDoseInfo" id="MedicationDoseInfoResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="medicationItemId" column="medication_item_id"/> |
| | | <result property="doseSmallPackageRation" column="dose_small_package_ration"/> |
| | | <result property="dose" column="dose"/> |
| | | <result property="doseSmallPackageNum" column="dose_small_package_num"/> |
| | | <result property="doseUnit" column="dose_unit"/> |
| | | <result property="doseUnitType" column="dose_unit_type"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectMedicationDoseInfoVo"> |
| | | select id, medication_item_id, dose_small_package_ration, dose, dose_small_package_num, dose_unit, dose_unit_type, remark, create_by, create_time, update_by, update_time |
| | | from medication_dose_info |
| | | </sql> |
| | | |
| | | <select id="selectMedicationDoseInfoList" parameterType="com.smartor.domain.MedicationDoseInfo" |
| | | resultMap="MedicationDoseInfoResult"> |
| | | <include refid="selectMedicationDoseInfoVo"/> |
| | | where 1=1 |
| | | and del_flag=0 |
| | | <if test="medicationItemId != null "> |
| | | and medication_item_id = #{medicationItemId} |
| | | </if> |
| | | <if test="doseSmallPackageRation != null "> |
| | | and dose_small_package_ration = #{doseSmallPackageRation} |
| | | </if> |
| | | <if test="dose != null "> |
| | | and dose = #{dose} |
| | | </if> |
| | | <if test="doseSmallPackageNum != null "> |
| | | and dose_small_package_num = #{doseSmallPackageNum} |
| | | </if> |
| | | <if test="doseUnit != null and doseUnit != ''"> |
| | | and dose_unit = #{doseUnit} |
| | | </if> |
| | | <if test="doseUnitType != null "> |
| | | and dose_unit_type = #{doseUnitType} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectMedicationDoseInfoById" parameterType="Long" |
| | | resultMap="MedicationDoseInfoResult"> |
| | | <include refid="selectMedicationDoseInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertMedicationDoseInfo" parameterType="com.smartor.domain.MedicationDoseInfo" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into medication_dose_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="medicationItemId != null">medication_item_id, |
| | | </if> |
| | | <if test="doseSmallPackageRation != null">dose_small_package_ration, |
| | | </if> |
| | | <if test="dose != null">dose, |
| | | </if> |
| | | <if test="doseSmallPackageNum != null">dose_small_package_num, |
| | | </if> |
| | | <if test="doseUnit != null">dose_unit, |
| | | </if> |
| | | <if test="doseUnitType != null">dose_unit_type, |
| | | </if> |
| | | <if test="remark != null">remark, |
| | | </if> |
| | | <if test="createBy != null">create_by, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateBy != null">update_by, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="medicationItemId != null">#{medicationItemId}, |
| | | </if> |
| | | <if test="doseSmallPackageRation != null">#{doseSmallPackageRation}, |
| | | </if> |
| | | <if test="dose != null">#{dose}, |
| | | </if> |
| | | <if test="doseSmallPackageNum != null">#{doseSmallPackageNum}, |
| | | </if> |
| | | <if test="doseUnit != null">#{doseUnit}, |
| | | </if> |
| | | <if test="doseUnitType != null">#{doseUnitType}, |
| | | </if> |
| | | <if test="remark != null">#{remark}, |
| | | </if> |
| | | <if test="createBy != null">#{createBy}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">#{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateMedicationDoseInfo" parameterType="com.smartor.domain.MedicationDoseInfo"> |
| | | update medication_dose_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="medicationItemId != null">medication_item_id = |
| | | #{medicationItemId}, |
| | | </if> |
| | | <if test="doseSmallPackageRation != null">dose_small_package_ration = |
| | | #{doseSmallPackageRation}, |
| | | </if> |
| | | <if test="dose != null">dose = |
| | | #{dose}, |
| | | </if> |
| | | <if test="doseSmallPackageNum != null">dose_small_package_num = |
| | | #{doseSmallPackageNum}, |
| | | </if> |
| | | <if test="doseUnit != null">dose_unit = |
| | | #{doseUnit}, |
| | | </if> |
| | | <if test="doseUnitType != null">dose_unit_type = |
| | | #{doseUnitType}, |
| | | </if> |
| | | <if test="remark != null">remark = |
| | | #{remark}, |
| | | </if> |
| | | <if test="createBy != null">create_by = |
| | | #{createBy}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">update_by = |
| | | #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteMedicationDoseInfoById" parameterType="Long"> |
| | | update medication_dose_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteMedicationDoseInfoByIds" parameterType="String"> |
| | | update medication_dose_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.MedicationItemMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.MedicationItem" id="MedicationItemResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="identificationCode" column="identification_code"/> |
| | | <result property="wbm" column="wbm"/> |
| | | <result property="medicationCommonName" column="medication_common_name"/> |
| | | <result property="manufacturerName" column="manufacturer_name"/> |
| | | <result property="itemCode" column="item_code"/> |
| | | <result property="smallLargePackageRatio" column="small_large_package_ratio"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="orgId" column="org_id"/> |
| | | <result property="itemName" column="item_name"/> |
| | | <result property="medicationType" column="medication_type"/> |
| | | <result property="antimicrobialGradeCode" column="antimicrobial_grade_code"/> |
| | | <result property="licenseNumber" column="license_number"/> |
| | | <result property="defaultUsageName" column="default_usage_name"/> |
| | | <result property="specialDrugsName" column="special_drugs_name"/> |
| | | <result property="antimicrobialGradeName" column="antimicrobial_grade_name"/> |
| | | <result property="commonPinyin" column="common_pinyin"/> |
| | | <result property="commonWbm" column="common_wbm"/> |
| | | <result property="manufacturerId" column="manufacturer_id"/> |
| | | <result property="defaultUsageId" column="default_usage_id"/> |
| | | <result property="specification" column="specification"/> |
| | | <result property="smallPackageUnit" column="small_package_unit"/> |
| | | <result property="itemId" column="item_id"/> |
| | | <result property="specialDrugsCode" column="special_drugs_code"/> |
| | | <result property="pinyin" column="pinyin"/> |
| | | <result property="doseFormName" column="dose_form_name"/> |
| | | <result property="largePackageUnit" column="large_package_unit"/> |
| | | <result property="retailPrice" column="retail_price"/> |
| | | <result property="status" column="status"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectMedicationItemVo"> |
| | | select id, |
| | | identification_code, |
| | | wbm, |
| | | medication_common_name, |
| | | manufacturer_name, |
| | | item_code, |
| | | small_large_package_ratio, |
| | | remark, |
| | | org_id, |
| | | item_name, |
| | | medication_type, |
| | | antimicrobial_grade_code, |
| | | license_number, |
| | | default_usage_name, |
| | | special_drugs_name, |
| | | antimicrobial_grade_name, |
| | | common_pinyin, |
| | | common_wbm, |
| | | manufacturer_id, |
| | | default_usage_id, |
| | | specification, |
| | | small_package_unit, |
| | | item_id, |
| | | special_drugs_code, |
| | | pinyin, |
| | | dose_form_name, |
| | | large_package_unit, |
| | | retail_price, |
| | | status, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time |
| | | from medication_item |
| | | </sql> |
| | | |
| | | <select id="selectMedicationItemList" parameterType="com.smartor.domain.MedicationItem" |
| | | resultMap="MedicationItemResult"> |
| | | <include refid="selectMedicationItemVo"/> |
| | | where 1=1 |
| | | and del_flag=0 |
| | | <if test="identificationCode != null and identificationCode != ''"> |
| | | and identification_code = #{identificationCode} |
| | | </if> |
| | | <if test="wbm != null and wbm != ''"> |
| | | and wbm = #{wbm} |
| | | </if> |
| | | <if test="medicationCommonName != null and medicationCommonName != ''"> |
| | | and medication_common_name like concat('%', #{medicationCommonName}, '%') |
| | | </if> |
| | | <if test="manufacturerName != null and manufacturerName != ''"> |
| | | and manufacturer_name like concat('%', #{manufacturerName}, '%') |
| | | </if> |
| | | <if test="itemCode != null and itemCode != ''"> |
| | | and item_code = #{itemCode} |
| | | </if> |
| | | <if test="smallLargePackageRatio != null "> |
| | | and small_large_package_ratio = #{smallLargePackageRatio} |
| | | </if> |
| | | <if test="orgId != null "> |
| | | and org_id = #{orgId} |
| | | </if> |
| | | <if test="itemName != null and itemName != ''"> |
| | | and item_name like concat('%', #{itemName}, '%') |
| | | </if> |
| | | <if test="medicationType != null and medicationType != ''"> |
| | | and medication_type = #{medicationType} |
| | | </if> |
| | | <if test="antimicrobialGradeCode != null and antimicrobialGradeCode != ''"> |
| | | and antimicrobial_grade_code = #{antimicrobialGradeCode} |
| | | </if> |
| | | <if test="licenseNumber != null and licenseNumber != ''"> |
| | | and license_number = #{licenseNumber} |
| | | </if> |
| | | <if test="defaultUsageName != null and defaultUsageName != ''"> |
| | | and default_usage_name like concat('%', #{defaultUsageName}, '%') |
| | | </if> |
| | | <if test="specialDrugsName != null and specialDrugsName != ''"> |
| | | and special_drugs_name like concat('%', #{specialDrugsName}, '%') |
| | | </if> |
| | | <if test="antimicrobialGradeName != null and antimicrobialGradeName != ''"> |
| | | and antimicrobial_grade_name like concat('%', #{antimicrobialGradeName}, '%') |
| | | </if> |
| | | <if test="commonPinyin != null and commonPinyin != ''"> |
| | | and common_pinyin = #{commonPinyin} |
| | | </if> |
| | | <if test="commonWbm != null and commonWbm != ''"> |
| | | and common_wbm = #{commonWbm} |
| | | </if> |
| | | <if test="manufacturerId != null "> |
| | | and manufacturer_id = #{manufacturerId} |
| | | </if> |
| | | <if test="defaultUsageId != null "> |
| | | and default_usage_id = #{defaultUsageId} |
| | | </if> |
| | | <if test="specification != null and specification != ''"> |
| | | and specification = #{specification} |
| | | </if> |
| | | <if test="smallPackageUnit != null and smallPackageUnit != ''"> |
| | | and small_package_unit = #{smallPackageUnit} |
| | | </if> |
| | | <if test="itemId != null "> |
| | | and item_id = #{itemId} |
| | | </if> |
| | | <if test="specialDrugsCode != null and specialDrugsCode != ''"> |
| | | and special_drugs_code = #{specialDrugsCode} |
| | | </if> |
| | | <if test="pinyin != null and pinyin != ''"> |
| | | and pinyin = #{pinyin} |
| | | </if> |
| | | <if test="doseFormName != null and doseFormName != ''"> |
| | | and dose_form_name like concat('%', #{doseFormName}, '%') |
| | | </if> |
| | | <if test="largePackageUnit != null and largePackageUnit != ''"> |
| | | and large_package_unit = #{largePackageUnit} |
| | | </if> |
| | | <if test="retailPrice != null "> |
| | | and retail_price = #{retailPrice} |
| | | </if> |
| | | <if test="status != null "> |
| | | and status = #{status} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectMedicationItemById" parameterType="Long" |
| | | resultMap="MedicationItemResult"> |
| | | <include refid="selectMedicationItemVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertMedicationItem" parameterType="com.smartor.domain.MedicationItem" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into medication_item |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="identificationCode != null">identification_code, |
| | | </if> |
| | | <if test="wbm != null">wbm, |
| | | </if> |
| | | <if test="medicationCommonName != null">medication_common_name, |
| | | </if> |
| | | <if test="manufacturerName != null">manufacturer_name, |
| | | </if> |
| | | <if test="itemCode != null">item_code, |
| | | </if> |
| | | <if test="smallLargePackageRatio != null">small_large_package_ratio, |
| | | </if> |
| | | <if test="remark != null">remark, |
| | | </if> |
| | | <if test="orgId != null">org_id, |
| | | </if> |
| | | <if test="itemName != null">item_name, |
| | | </if> |
| | | <if test="medicationType != null">medication_type, |
| | | </if> |
| | | <if test="antimicrobialGradeCode != null">antimicrobial_grade_code, |
| | | </if> |
| | | <if test="licenseNumber != null">license_number, |
| | | </if> |
| | | <if test="defaultUsageName != null">default_usage_name, |
| | | </if> |
| | | <if test="specialDrugsName != null">special_drugs_name, |
| | | </if> |
| | | <if test="antimicrobialGradeName != null">antimicrobial_grade_name, |
| | | </if> |
| | | <if test="commonPinyin != null">common_pinyin, |
| | | </if> |
| | | <if test="commonWbm != null">common_wbm, |
| | | </if> |
| | | <if test="manufacturerId != null">manufacturer_id, |
| | | </if> |
| | | <if test="defaultUsageId != null">default_usage_id, |
| | | </if> |
| | | <if test="specification != null">specification, |
| | | </if> |
| | | <if test="smallPackageUnit != null">small_package_unit, |
| | | </if> |
| | | <if test="itemId != null">item_id, |
| | | </if> |
| | | <if test="specialDrugsCode != null">special_drugs_code, |
| | | </if> |
| | | <if test="pinyin != null">pinyin, |
| | | </if> |
| | | <if test="doseFormName != null">dose_form_name, |
| | | </if> |
| | | <if test="largePackageUnit != null">large_package_unit, |
| | | </if> |
| | | <if test="retailPrice != null">retail_price, |
| | | </if> |
| | | <if test="status != null">status, |
| | | </if> |
| | | <if test="createBy != null">create_by, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateBy != null">update_by, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="identificationCode != null">#{identificationCode}, |
| | | </if> |
| | | <if test="wbm != null">#{wbm}, |
| | | </if> |
| | | <if test="medicationCommonName != null">#{medicationCommonName}, |
| | | </if> |
| | | <if test="manufacturerName != null">#{manufacturerName}, |
| | | </if> |
| | | <if test="itemCode != null">#{itemCode}, |
| | | </if> |
| | | <if test="smallLargePackageRatio != null">#{smallLargePackageRatio}, |
| | | </if> |
| | | <if test="remark != null">#{remark}, |
| | | </if> |
| | | <if test="orgId != null">#{orgId}, |
| | | </if> |
| | | <if test="itemName != null">#{itemName}, |
| | | </if> |
| | | <if test="medicationType != null">#{medicationType}, |
| | | </if> |
| | | <if test="antimicrobialGradeCode != null">#{antimicrobialGradeCode}, |
| | | </if> |
| | | <if test="licenseNumber != null">#{licenseNumber}, |
| | | </if> |
| | | <if test="defaultUsageName != null">#{defaultUsageName}, |
| | | </if> |
| | | <if test="specialDrugsName != null">#{specialDrugsName}, |
| | | </if> |
| | | <if test="antimicrobialGradeName != null">#{antimicrobialGradeName}, |
| | | </if> |
| | | <if test="commonPinyin != null">#{commonPinyin}, |
| | | </if> |
| | | <if test="commonWbm != null">#{commonWbm}, |
| | | </if> |
| | | <if test="manufacturerId != null">#{manufacturerId}, |
| | | </if> |
| | | <if test="defaultUsageId != null">#{defaultUsageId}, |
| | | </if> |
| | | <if test="specification != null">#{specification}, |
| | | </if> |
| | | <if test="smallPackageUnit != null">#{smallPackageUnit}, |
| | | </if> |
| | | <if test="itemId != null">#{itemId}, |
| | | </if> |
| | | <if test="specialDrugsCode != null">#{specialDrugsCode}, |
| | | </if> |
| | | <if test="pinyin != null">#{pinyin}, |
| | | </if> |
| | | <if test="doseFormName != null">#{doseFormName}, |
| | | </if> |
| | | <if test="largePackageUnit != null">#{largePackageUnit}, |
| | | </if> |
| | | <if test="retailPrice != null">#{retailPrice}, |
| | | </if> |
| | | <if test="status != null">#{status}, |
| | | </if> |
| | | <if test="createBy != null">#{createBy}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">#{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateMedicationItem" parameterType="com.smartor.domain.MedicationItem"> |
| | | update medication_item |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="identificationCode != null">identification_code = |
| | | #{identificationCode}, |
| | | </if> |
| | | <if test="wbm != null">wbm = |
| | | #{wbm}, |
| | | </if> |
| | | <if test="medicationCommonName != null">medication_common_name = |
| | | #{medicationCommonName}, |
| | | </if> |
| | | <if test="manufacturerName != null">manufacturer_name = |
| | | #{manufacturerName}, |
| | | </if> |
| | | <if test="itemCode != null">item_code = |
| | | #{itemCode}, |
| | | </if> |
| | | <if test="smallLargePackageRatio != null">small_large_package_ratio = |
| | | #{smallLargePackageRatio}, |
| | | </if> |
| | | <if test="remark != null">remark = |
| | | #{remark}, |
| | | </if> |
| | | <if test="orgId != null">org_id = |
| | | #{orgId}, |
| | | </if> |
| | | <if test="itemName != null">item_name = |
| | | #{itemName}, |
| | | </if> |
| | | <if test="medicationType != null">medication_type = |
| | | #{medicationType}, |
| | | </if> |
| | | <if test="antimicrobialGradeCode != null">antimicrobial_grade_code = |
| | | #{antimicrobialGradeCode}, |
| | | </if> |
| | | <if test="licenseNumber != null">license_number = |
| | | #{licenseNumber}, |
| | | </if> |
| | | <if test="defaultUsageName != null">default_usage_name = |
| | | #{defaultUsageName}, |
| | | </if> |
| | | <if test="specialDrugsName != null">special_drugs_name = |
| | | #{specialDrugsName}, |
| | | </if> |
| | | <if test="antimicrobialGradeName != null">antimicrobial_grade_name = |
| | | #{antimicrobialGradeName}, |
| | | </if> |
| | | <if test="commonPinyin != null">common_pinyin = |
| | | #{commonPinyin}, |
| | | </if> |
| | | <if test="commonWbm != null">common_wbm = |
| | | #{commonWbm}, |
| | | </if> |
| | | <if test="manufacturerId != null">manufacturer_id = |
| | | #{manufacturerId}, |
| | | </if> |
| | | <if test="defaultUsageId != null">default_usage_id = |
| | | #{defaultUsageId}, |
| | | </if> |
| | | <if test="specification != null">specification = |
| | | #{specification}, |
| | | </if> |
| | | <if test="smallPackageUnit != null">small_package_unit = |
| | | #{smallPackageUnit}, |
| | | </if> |
| | | <if test="itemId != null">item_id = |
| | | #{itemId}, |
| | | </if> |
| | | <if test="specialDrugsCode != null">special_drugs_code = |
| | | #{specialDrugsCode}, |
| | | </if> |
| | | <if test="pinyin != null">pinyin = |
| | | #{pinyin}, |
| | | </if> |
| | | <if test="doseFormName != null">dose_form_name = |
| | | #{doseFormName}, |
| | | </if> |
| | | <if test="largePackageUnit != null">large_package_unit = |
| | | #{largePackageUnit}, |
| | | </if> |
| | | <if test="retailPrice != null">retail_price = |
| | | #{retailPrice}, |
| | | </if> |
| | | <if test="status != null">status = |
| | | #{status}, |
| | | </if> |
| | | <if test="createBy != null">create_by = |
| | | #{createBy}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">update_by = |
| | | #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteMedicationItemById" parameterType="Long"> |
| | | update medication_item |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteMedicationItemByIds" parameterType="String"> |
| | | update medication_item |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <result property="managementDoctor" column="management_doctor"/> |
| | | <result property="managementDoctorCode" column="management_doctor_code"/> |
| | | <result property="campusid" column="campusid"/> |
| | | <result property="inhospMydFlag" column="inhosp_myd_flag"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedInhospVo"> |
| | | select inhospid, |
| | | patname, |
| | | inhosp_myd_flag, |
| | | campusid, |
| | | fuflag, |
| | | management_doctor, |
| | |
| | | b.futypedesc, |
| | | b.fuadvice, |
| | | b.fuspecialadvice, |
| | | b.inhosp_myd_flag, |
| | | a.idcardno |
| | | FROM |
| | | pat_med_inhosp b |
| | |
| | | concat('%', #{hospitaldistrictname}, '%') |
| | | </if> |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="inhospMydFlag != null ">and b.inhosp_myd_flag = #{inhospMydFlag}</if> |
| | | <if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if> |
| | | <if test="managementDoctorCode != null ">and b.management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | |
| | | b.futypecode, |
| | | b.futypedesc, |
| | | b.fuadvice, |
| | | b.inhosp_myd_flag, |
| | | b.fuspecialadvice |
| | | FROM |
| | | pat_med_inhosp b |
| | | where 1=1 |
| | | <if test="inhospMydFlag != null ">and b.inhosp_myd_flag = #{inhospMydFlag}</if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | |
| | | b.futypedesc, |
| | | b.fuadvice, |
| | | b.fuspecialadvice, |
| | | b.inhosp_myd_flag, |
| | | b.schemetime |
| | | FROM |
| | | pat_med_inhosp b, |
| | |
| | | and b.del_flag=0 |
| | | and a.id = b.patid |
| | | AND a.idcardno != '' |
| | | <if test="inhospMydFlag != null ">and b.inhosp_myd_flag = #{inhospMydFlag}</if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and a.orgid = #{orgid} |
| | | </if> |
| | |
| | | <if test="cry != null and cry == 0 ">and inhospstate=0</if> |
| | | <if test="cry != null and cry == 1 ">and inhospstate=1</if> |
| | | <if test="cry != null and cry == 3 ">and inhospstate=3</if> |
| | | <if test="inhospMydFlag != null ">and inhosp_myd_flag = #{inhospMydFlag}</if> |
| | | <if test="serialnum != null">and serialnum = #{serialnum}</if> |
| | | <if test="hospitalname != null">and hospitalname = #{hospitalname}</if> |
| | | <if test="hospitalcode != null">and hospitalcode = #{hospitalcode}</if> |
| | |
| | | <if test="managementDoctor != null ">management_doctor,</if> |
| | | <if test="managementDoctorCode != null ">management_doctor_code,</if> |
| | | <if test="campusid != null ">campusid,</if> |
| | | <if test="inhospMydFlag != null ">inhosp_myd_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | |
| | | <if test="managementDoctor != null ">#{managementDoctor},</if> |
| | | <if test="managementDoctorCode != null ">#{managementDoctorCode},</if> |
| | | <if test="campusid != null ">#{campusid},</if> |
| | | <if test="inhospMydFlag != null ">#{inhospMydFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | nurse_id, nurse_name, out_way_id, out_way_name, guid, |
| | | operator, operator_id, inhospno, remark, |
| | | fuflag, fudate, fuperiod, futypecode, futypedesc, fuadvice, fuspecialadvice, management_doctor, |
| | | management_doctor_doctor,campusid |
| | | management_doctor_doctor,campusid, inhosp_myd_flag |
| | | ) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | |
| | | #{item.nurseId}, #{item.nurseName}, #{item.outWayId}, #{item.outWayName}, #{item.guid}, |
| | | #{item.operator}, #{item.operatorId}, #{item.inhospno}, #{item.remark}, |
| | | #{item.fuflag}, #{item.fudate}, #{item.fuperiod}, #{item.futypecode}, #{item.futypedesc}, #{item.fuadvice}, |
| | | #{item.fuspecialadvice}, #{item.managementDoctor}, #{item.managementDoctorCode}, #{item.campusid} |
| | | #{item.fuspecialadvice}, #{item.managementDoctor}, #{item.managementDoctorCode}, #{item.campusid}, #{item.inhospMydFlag} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="fuspecialadvice != null ">fuspecialadvice = #{fuspecialadvice},</if> |
| | | <if test="managementDoctor != null ">management_doctor = #{managementDoctor},</if> |
| | | <if test="managementDoctorCode != null ">management_doctor_code = #{managementDoctorCode},</if> |
| | | <if test="campusid != null ">campusid = #{campusid}</if> |
| | | |
| | | <if test="campusid != null ">campusid = #{campusid},</if> |
| | | <if test="inhospMydFlag != null ">inhosp_myd_flag = #{inhospMydFlag},</if> |
| | | </trim> |
| | | where inhospid = #{inhospid} |
| | | </update> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.ServiceAppointRecordMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceAppointRecord" id="ServiceAppointRecordResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="appointRecSn" column="appoint_rec_sn"/> |
| | | <result property="changeAppointRecSn" column="change_appoint_rec_sn"/> |
| | | <result property="orgCode" column="org_code"/> |
| | | <result property="patFileSn" column="pat_file_sn"/> |
| | | <result property="patMediaSn" column="pat_media_sn"/> |
| | | <result property="patMediaNum" column="pat_media_num"/> |
| | | <result property="patCateSn" column="pat_cate_sn"/> |
| | | <result property="patNatureSn" column="pat_nature_sn"/> |
| | | <result property="patFileName" column="pat_file_name"/> |
| | | <result property="patFileGender" column="pat_file_gender"/> |
| | | <result property="patAge" column="pat_age"/> |
| | | <result property="patBirthday" column="pat_birthday"/> |
| | | <result property="patCardTypeCode" column="pat_card_type_code"/> |
| | | <result property="patCardType" column="pat_card_type"/> |
| | | <result property="patIdCardNum" column="pat_id_card_num"/> |
| | | <result property="patAddr" column="pat_addr"/> |
| | | <result property="patTel" column="pat_tel"/> |
| | | <result property="patWayCode" column="pat_way_code"/> |
| | | <result property="patWay" column="pat_way"/> |
| | | <result property="appointTypeSn" column="appoint_type_sn"/> |
| | | <result property="appointDate" column="appoint_date"/> |
| | | <result property="appointOperatorId" column="appoint_operator_id"/> |
| | | <result property="appointOperatorName" column="appoint_operator_name"/> |
| | | <result property="appointRegistDate" column="appoint_regist_date"/> |
| | | <result property="registerScheduleSn" column="register_schedule_sn"/> |
| | | <result property="outpatCateSn" column="outpat_cate_sn"/> |
| | | <result property="outpatCateName" column="outpat_cate_name"/> |
| | | <result property="registDeptCode" column="regist_dept_code"/> |
| | | <result property="registDeptName" column="regist_dept_name"/> |
| | | <result property="deptPinyinCode" column="dept_pinyin_code"/> |
| | | <result property="registDoctCode" column="regist_doct_code"/> |
| | | <result property="registDoctName" column="regist_doct_name"/> |
| | | <result property="staffPinyinCode" column="staff_pinyin_code"/> |
| | | <result property="registTimeCate" column="regist_time_cate"/> |
| | | <result property="patiRegistSn" column="pati_regist_sn"/> |
| | | <result property="scheduleRegistCharge" column="schedule_regist_charge"/> |
| | | <result property="registRecSn" column="regist_rec_sn"/> |
| | | <result property="regUserSn" column="reg_user_sn"/> |
| | | <result property="regUserName" column="reg_user_name"/> |
| | | <result property="regOptTime" column="reg_opt_time"/> |
| | | <result property="revokeUserSn" column="revoke_user_sn"/> |
| | | <result property="revokeUserName" column="revoke_user_name"/> |
| | | <result property="revokeOptTime" column="revoke_opt_time"/> |
| | | <result property="withdrawalTime" column="withdrawal_time"/> |
| | | <result property="scheduleStatusFlag" column="schedule_status_flag"/> |
| | | <result property="scheduleMemoDesc" column="schedule_memo_desc"/> |
| | | <result property="scheduleCredenceNum" column="schedule_credence_num"/> |
| | | <result property="registTimeRange" column="regist_time_range"/> |
| | | <result property="scheduleDetailSn" column="schedule_detail_sn"/> |
| | | <result property="treatDate" column="treat_date"/> |
| | | <result property="treatDoctCode" column="treat_doct_code"/> |
| | | <result property="treatDoctName" column="treat_doct_name"/> |
| | | <result property="regWayCode" column="reg_way_code"/> |
| | | <result property="regWay" column="reg_way"/> |
| | | <result property="regSystemWayCode" column="reg_system_way_code"/> |
| | | <result property="regSystemWay" column="reg_system_way"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="visitFlag" column="visit_flag"/> |
| | | <result property="senderId" column="sender_id"/> |
| | | <result property="senderName" column="sender_name"/> |
| | | <result property="sendTime" column="send_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceAppointRecordVo"> |
| | | select id, |
| | | appoint_rec_sn, |
| | | change_appoint_rec_sn, |
| | | org_code, |
| | | pat_file_sn, |
| | | pat_media_sn, |
| | | pat_media_num, |
| | | pat_cate_sn, |
| | | pat_nature_sn, |
| | | pat_file_name, |
| | | pat_file_gender, |
| | | pat_age, |
| | | pat_birthday, |
| | | pat_card_type_code, |
| | | pat_card_type, |
| | | pat_id_card_num, |
| | | pat_addr, |
| | | pat_tel, |
| | | pat_way_code, |
| | | pat_way, |
| | | appoint_type_sn, |
| | | appoint_date, |
| | | appoint_operator_id, |
| | | appoint_operator_name, |
| | | appoint_regist_date, |
| | | register_schedule_sn, |
| | | outpat_cate_sn, |
| | | outpat_cate_name, |
| | | regist_dept_code, |
| | | regist_dept_name, |
| | | dept_pinyin_code, |
| | | regist_doct_code, |
| | | regist_doct_name, |
| | | staff_pinyin_code, |
| | | regist_time_cate, |
| | | pati_regist_sn, |
| | | schedule_regist_charge, |
| | | regist_rec_sn, |
| | | reg_user_sn, |
| | | reg_user_name, |
| | | reg_opt_time, |
| | | revoke_user_sn, |
| | | revoke_user_name, |
| | | revoke_opt_time, |
| | | withdrawal_time, |
| | | schedule_status_flag, |
| | | schedule_memo_desc, |
| | | schedule_credence_num, |
| | | regist_time_range, |
| | | schedule_detail_sn, |
| | | treat_date, |
| | | treat_doct_code, |
| | | treat_doct_name, |
| | | reg_way_code, |
| | | reg_way, |
| | | reg_system_way_code, |
| | | reg_system_way, |
| | | create_time, |
| | | update_time, |
| | | visit_flag, |
| | | sender_id, |
| | | sender_name, |
| | | send_time |
| | | from service_appoint_record |
| | | </sql> |
| | | |
| | | <select id="selectServiceAppointRecordList" parameterType="com.smartor.domain.ServiceAppointRecord" |
| | | resultMap="ServiceAppointRecordResult"> |
| | | <include refid="selectServiceAppointRecordVo"/> |
| | | where 1=1 |
| | | and del_flag=0 |
| | | <if test="appointRecSn != null and appointRecSn != ''"> |
| | | and appoint_rec_sn = #{appointRecSn} |
| | | </if> |
| | | <if test="changeAppointRecSn != null and changeAppointRecSn != ''"> |
| | | and change_appoint_rec_sn = #{changeAppointRecSn} |
| | | </if> |
| | | <if test="orgCode != null and orgCode != ''"> |
| | | and org_code = #{orgCode} |
| | | </if> |
| | | <if test="patFileSn != null and patFileSn != ''"> |
| | | and pat_file_sn = #{patFileSn} |
| | | </if> |
| | | <if test="patMediaSn != null and patMediaSn != ''"> |
| | | and pat_media_sn = #{patMediaSn} |
| | | </if> |
| | | <if test="patMediaNum != null and patMediaNum != ''"> |
| | | and pat_media_num = #{patMediaNum} |
| | | </if> |
| | | <if test="patCateSn != null and patCateSn != ''"> |
| | | and pat_cate_sn = #{patCateSn} |
| | | </if> |
| | | <if test="patNatureSn != null and patNatureSn != ''"> |
| | | and pat_nature_sn = #{patNatureSn} |
| | | </if> |
| | | <if test="patFileName != null and patFileName != ''"> |
| | | and pat_file_name like concat('%', #{patFileName}, '%') |
| | | </if> |
| | | <if test="patFileGender != null and patFileGender != ''"> |
| | | and pat_file_gender = #{patFileGender} |
| | | </if> |
| | | <if test="patAge != null and patAge != ''"> |
| | | and pat_age = #{patAge} |
| | | </if> |
| | | <if test="patBirthday != null and patBirthday != ''"> |
| | | and pat_birthday = #{patBirthday} |
| | | </if> |
| | | <if test="patCardTypeCode != null and patCardTypeCode != ''"> |
| | | and pat_card_type_code = #{patCardTypeCode} |
| | | </if> |
| | | <if test="patCardType != null and patCardType != ''"> |
| | | and pat_card_type = #{patCardType} |
| | | </if> |
| | | <if test="patIdCardNum != null and patIdCardNum != ''"> |
| | | and pat_id_card_num = #{patIdCardNum} |
| | | </if> |
| | | <if test="patAddr != null and patAddr != ''"> |
| | | and pat_addr = #{patAddr} |
| | | </if> |
| | | <if test="patTel != null and patTel != ''"> |
| | | and pat_tel = #{patTel} |
| | | </if> |
| | | <if test="patWayCode != null and patWayCode != ''"> |
| | | and pat_way_code = #{patWayCode} |
| | | </if> |
| | | <if test="patWay != null and patWay != ''"> |
| | | and pat_way = #{patWay} |
| | | </if> |
| | | <if test="appointTypeSn != null and appointTypeSn != ''"> |
| | | and appoint_type_sn = #{appointTypeSn} |
| | | </if> |
| | | <if test="appointDate != null and appointDate != ''"> |
| | | and appoint_date = #{appointDate} |
| | | </if> |
| | | <if test="appointOperatorId != null and appointOperatorId != ''"> |
| | | and appoint_operator_id = #{appointOperatorId} |
| | | </if> |
| | | <if test="appointOperatorName != null and appointOperatorName != ''"> |
| | | and appoint_operator_name like concat('%', #{appointOperatorName}, '%') |
| | | </if> |
| | | <if test="appointRegistDate != null and appointRegistDate != ''"> |
| | | and appoint_regist_date = #{appointRegistDate} |
| | | </if> |
| | | <if test="registerScheduleSn != null and registerScheduleSn != ''"> |
| | | and register_schedule_sn = #{registerScheduleSn} |
| | | </if> |
| | | <if test="outpatCateSn != null and outpatCateSn != ''"> |
| | | and outpat_cate_sn = #{outpatCateSn} |
| | | </if> |
| | | <if test="outpatCateName != null and outpatCateName != ''"> |
| | | and outpat_cate_name like concat('%', #{outpatCateName}, '%') |
| | | </if> |
| | | <if test="registDeptCode != null and registDeptCode != ''"> |
| | | and regist_dept_code = #{registDeptCode} |
| | | </if> |
| | | <if test="registDeptName != null and registDeptName != ''"> |
| | | and regist_dept_name like concat('%', #{registDeptName}, '%') |
| | | </if> |
| | | <if test="deptPinyinCode != null and deptPinyinCode != ''"> |
| | | and dept_pinyin_code = #{deptPinyinCode} |
| | | </if> |
| | | <if test="registDoctCode != null and registDoctCode != ''"> |
| | | and regist_doct_code = #{registDoctCode} |
| | | </if> |
| | | <if test="registDoctName != null and registDoctName != ''"> |
| | | and regist_doct_name like concat('%', #{registDoctName}, '%') |
| | | </if> |
| | | <if test="staffPinyinCode != null and staffPinyinCode != ''"> |
| | | and staff_pinyin_code = #{staffPinyinCode} |
| | | </if> |
| | | <if test="registTimeCate != null "> |
| | | and regist_time_cate = #{registTimeCate} |
| | | </if> |
| | | <if test="patiRegistSn != null "> |
| | | and pati_regist_sn = #{patiRegistSn} |
| | | </if> |
| | | <if test="scheduleRegistCharge != null "> |
| | | and schedule_regist_charge = #{scheduleRegistCharge} |
| | | </if> |
| | | <if test="registRecSn != null and registRecSn != ''"> |
| | | and regist_rec_sn = #{registRecSn} |
| | | </if> |
| | | <if test="regUserSn != null and regUserSn != ''"> |
| | | and reg_user_sn = #{regUserSn} |
| | | </if> |
| | | <if test="regUserName != null and regUserName != ''"> |
| | | and reg_user_name like concat('%', #{regUserName}, '%') |
| | | </if> |
| | | <if test="regOptTime != null and regOptTime != ''"> |
| | | and reg_opt_time = #{regOptTime} |
| | | </if> |
| | | <if test="revokeUserSn != null and revokeUserSn != ''"> |
| | | and revoke_user_sn = #{revokeUserSn} |
| | | </if> |
| | | <if test="revokeUserName != null and revokeUserName != ''"> |
| | | and revoke_user_name like concat('%', #{revokeUserName}, '%') |
| | | </if> |
| | | <if test="revokeOptTime != null and revokeOptTime != ''"> |
| | | and revoke_opt_time = #{revokeOptTime} |
| | | </if> |
| | | <if test="withdrawalTime != null and withdrawalTime != ''"> |
| | | and withdrawal_time = #{withdrawalTime} |
| | | </if> |
| | | <if test="scheduleStatusFlag != null "> |
| | | and schedule_status_flag = #{scheduleStatusFlag} |
| | | </if> |
| | | <if test="scheduleMemoDesc != null and scheduleMemoDesc != ''"> |
| | | and schedule_memo_desc = #{scheduleMemoDesc} |
| | | </if> |
| | | <if test="scheduleCredenceNum != null and scheduleCredenceNum != ''"> |
| | | and schedule_credence_num = #{scheduleCredenceNum} |
| | | </if> |
| | | <if test="registTimeRange != null and registTimeRange != ''"> |
| | | and regist_time_range = #{registTimeRange} |
| | | </if> |
| | | <if test="scheduleDetailSn != null and scheduleDetailSn != ''"> |
| | | and schedule_detail_sn = #{scheduleDetailSn} |
| | | </if> |
| | | <if test="treatDate != null and treatDate != ''"> |
| | | and treat_date = #{treatDate} |
| | | </if> |
| | | <if test="treatDoctCode != null and treatDoctCode != ''"> |
| | | and treat_doct_code = #{treatDoctCode} |
| | | </if> |
| | | <if test="treatDoctName != null and treatDoctName != ''"> |
| | | and treat_doct_name like concat('%', #{treatDoctName}, '%') |
| | | </if> |
| | | <if test="regWayCode != null and regWayCode != ''"> |
| | | and reg_way_code = #{regWayCode} |
| | | </if> |
| | | <if test="regWay != null and regWay != ''"> |
| | | and reg_way = #{regWay} |
| | | </if> |
| | | <if test="regSystemWayCode != null and regSystemWayCode != ''"> |
| | | and reg_system_way_code = #{regSystemWayCode} |
| | | </if> |
| | | <if test="regSystemWay != null and regSystemWay != ''"> |
| | | and reg_system_way = #{regSystemWay} |
| | | </if> |
| | | <if test="visitFlag != null "> |
| | | and visit_flag = #{visitFlag} |
| | | </if> |
| | | <if test="senderId != null and senderId != ''"> |
| | | and sender_id = #{senderId} |
| | | </if> |
| | | <if test="senderName != null and senderName != ''"> |
| | | and sender_name like concat('%', #{senderName}, '%') |
| | | </if> |
| | | <if test="sendTime != null and sendTime != ''"> |
| | | and send_time = #{sendTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectServiceAppointRecordById" parameterType="Long" |
| | | resultMap="ServiceAppointRecordResult"> |
| | | <include refid="selectServiceAppointRecordVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertServiceAppointRecord" parameterType="com.smartor.domain.ServiceAppointRecord" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into service_appoint_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="appointRecSn != null">appoint_rec_sn, |
| | | </if> |
| | | <if test="changeAppointRecSn != null">change_appoint_rec_sn, |
| | | </if> |
| | | <if test="orgCode != null">org_code, |
| | | </if> |
| | | <if test="patFileSn != null">pat_file_sn, |
| | | </if> |
| | | <if test="patMediaSn != null">pat_media_sn, |
| | | </if> |
| | | <if test="patMediaNum != null">pat_media_num, |
| | | </if> |
| | | <if test="patCateSn != null">pat_cate_sn, |
| | | </if> |
| | | <if test="patNatureSn != null">pat_nature_sn, |
| | | </if> |
| | | <if test="patFileName != null">pat_file_name, |
| | | </if> |
| | | <if test="patFileGender != null">pat_file_gender, |
| | | </if> |
| | | <if test="patAge != null">pat_age, |
| | | </if> |
| | | <if test="patBirthday != null">pat_birthday, |
| | | </if> |
| | | <if test="patCardTypeCode != null">pat_card_type_code, |
| | | </if> |
| | | <if test="patCardType != null">pat_card_type, |
| | | </if> |
| | | <if test="patIdCardNum != null">pat_id_card_num, |
| | | </if> |
| | | <if test="patAddr != null">pat_addr, |
| | | </if> |
| | | <if test="patTel != null">pat_tel, |
| | | </if> |
| | | <if test="patWayCode != null">pat_way_code, |
| | | </if> |
| | | <if test="patWay != null">pat_way, |
| | | </if> |
| | | <if test="appointTypeSn != null">appoint_type_sn, |
| | | </if> |
| | | <if test="appointDate != null">appoint_date, |
| | | </if> |
| | | <if test="appointOperatorId != null">appoint_operator_id, |
| | | </if> |
| | | <if test="appointOperatorName != null">appoint_operator_name, |
| | | </if> |
| | | <if test="appointRegistDate != null">appoint_regist_date, |
| | | </if> |
| | | <if test="registerScheduleSn != null">register_schedule_sn, |
| | | </if> |
| | | <if test="outpatCateSn != null">outpat_cate_sn, |
| | | </if> |
| | | <if test="outpatCateName != null">outpat_cate_name, |
| | | </if> |
| | | <if test="registDeptCode != null">regist_dept_code, |
| | | </if> |
| | | <if test="registDeptName != null">regist_dept_name, |
| | | </if> |
| | | <if test="deptPinyinCode != null">dept_pinyin_code, |
| | | </if> |
| | | <if test="registDoctCode != null">regist_doct_code, |
| | | </if> |
| | | <if test="registDoctName != null">regist_doct_name, |
| | | </if> |
| | | <if test="staffPinyinCode != null">staff_pinyin_code, |
| | | </if> |
| | | <if test="registTimeCate != null">regist_time_cate, |
| | | </if> |
| | | <if test="patiRegistSn != null">pati_regist_sn, |
| | | </if> |
| | | <if test="scheduleRegistCharge != null">schedule_regist_charge, |
| | | </if> |
| | | <if test="registRecSn != null">regist_rec_sn, |
| | | </if> |
| | | <if test="regUserSn != null">reg_user_sn, |
| | | </if> |
| | | <if test="regUserName != null">reg_user_name, |
| | | </if> |
| | | <if test="regOptTime != null">reg_opt_time, |
| | | </if> |
| | | <if test="revokeUserSn != null">revoke_user_sn, |
| | | </if> |
| | | <if test="revokeUserName != null">revoke_user_name, |
| | | </if> |
| | | <if test="revokeOptTime != null">revoke_opt_time, |
| | | </if> |
| | | <if test="withdrawalTime != null">withdrawal_time, |
| | | </if> |
| | | <if test="scheduleStatusFlag != null">schedule_status_flag, |
| | | </if> |
| | | <if test="scheduleMemoDesc != null">schedule_memo_desc, |
| | | </if> |
| | | <if test="scheduleCredenceNum != null">schedule_credence_num, |
| | | </if> |
| | | <if test="registTimeRange != null">regist_time_range, |
| | | </if> |
| | | <if test="scheduleDetailSn != null">schedule_detail_sn, |
| | | </if> |
| | | <if test="treatDate != null">treat_date, |
| | | </if> |
| | | <if test="treatDoctCode != null">treat_doct_code, |
| | | </if> |
| | | <if test="treatDoctName != null">treat_doct_name, |
| | | </if> |
| | | <if test="regWayCode != null">reg_way_code, |
| | | </if> |
| | | <if test="regWay != null">reg_way, |
| | | </if> |
| | | <if test="regSystemWayCode != null">reg_system_way_code, |
| | | </if> |
| | | <if test="regSystemWay != null">reg_system_way, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | <if test="visitFlag != null">visit_flag, |
| | | </if> |
| | | <if test="senderId != null">sender_id, |
| | | </if> |
| | | <if test="senderName != null">sender_name, |
| | | </if> |
| | | <if test="sendTime != null">send_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="appointRecSn != null">#{appointRecSn}, |
| | | </if> |
| | | <if test="changeAppointRecSn != null">#{changeAppointRecSn}, |
| | | </if> |
| | | <if test="orgCode != null">#{orgCode}, |
| | | </if> |
| | | <if test="patFileSn != null">#{patFileSn}, |
| | | </if> |
| | | <if test="patMediaSn != null">#{patMediaSn}, |
| | | </if> |
| | | <if test="patMediaNum != null">#{patMediaNum}, |
| | | </if> |
| | | <if test="patCateSn != null">#{patCateSn}, |
| | | </if> |
| | | <if test="patNatureSn != null">#{patNatureSn}, |
| | | </if> |
| | | <if test="patFileName != null">#{patFileName}, |
| | | </if> |
| | | <if test="patFileGender != null">#{patFileGender}, |
| | | </if> |
| | | <if test="patAge != null">#{patAge}, |
| | | </if> |
| | | <if test="patBirthday != null">#{patBirthday}, |
| | | </if> |
| | | <if test="patCardTypeCode != null">#{patCardTypeCode}, |
| | | </if> |
| | | <if test="patCardType != null">#{patCardType}, |
| | | </if> |
| | | <if test="patIdCardNum != null">#{patIdCardNum}, |
| | | </if> |
| | | <if test="patAddr != null">#{patAddr}, |
| | | </if> |
| | | <if test="patTel != null">#{patTel}, |
| | | </if> |
| | | <if test="patWayCode != null">#{patWayCode}, |
| | | </if> |
| | | <if test="patWay != null">#{patWay}, |
| | | </if> |
| | | <if test="appointTypeSn != null">#{appointTypeSn}, |
| | | </if> |
| | | <if test="appointDate != null">#{appointDate}, |
| | | </if> |
| | | <if test="appointOperatorId != null">#{appointOperatorId}, |
| | | </if> |
| | | <if test="appointOperatorName != null">#{appointOperatorName}, |
| | | </if> |
| | | <if test="appointRegistDate != null">#{appointRegistDate}, |
| | | </if> |
| | | <if test="registerScheduleSn != null">#{registerScheduleSn}, |
| | | </if> |
| | | <if test="outpatCateSn != null">#{outpatCateSn}, |
| | | </if> |
| | | <if test="outpatCateName != null">#{outpatCateName}, |
| | | </if> |
| | | <if test="registDeptCode != null">#{registDeptCode}, |
| | | </if> |
| | | <if test="registDeptName != null">#{registDeptName}, |
| | | </if> |
| | | <if test="deptPinyinCode != null">#{deptPinyinCode}, |
| | | </if> |
| | | <if test="registDoctCode != null">#{registDoctCode}, |
| | | </if> |
| | | <if test="registDoctName != null">#{registDoctName}, |
| | | </if> |
| | | <if test="staffPinyinCode != null">#{staffPinyinCode}, |
| | | </if> |
| | | <if test="registTimeCate != null">#{registTimeCate}, |
| | | </if> |
| | | <if test="patiRegistSn != null">#{patiRegistSn}, |
| | | </if> |
| | | <if test="scheduleRegistCharge != null">#{scheduleRegistCharge}, |
| | | </if> |
| | | <if test="registRecSn != null">#{registRecSn}, |
| | | </if> |
| | | <if test="regUserSn != null">#{regUserSn}, |
| | | </if> |
| | | <if test="regUserName != null">#{regUserName}, |
| | | </if> |
| | | <if test="regOptTime != null">#{regOptTime}, |
| | | </if> |
| | | <if test="revokeUserSn != null">#{revokeUserSn}, |
| | | </if> |
| | | <if test="revokeUserName != null">#{revokeUserName}, |
| | | </if> |
| | | <if test="revokeOptTime != null">#{revokeOptTime}, |
| | | </if> |
| | | <if test="withdrawalTime != null">#{withdrawalTime}, |
| | | </if> |
| | | <if test="scheduleStatusFlag != null">#{scheduleStatusFlag}, |
| | | </if> |
| | | <if test="scheduleMemoDesc != null">#{scheduleMemoDesc}, |
| | | </if> |
| | | <if test="scheduleCredenceNum != null">#{scheduleCredenceNum}, |
| | | </if> |
| | | <if test="registTimeRange != null">#{registTimeRange}, |
| | | </if> |
| | | <if test="scheduleDetailSn != null">#{scheduleDetailSn}, |
| | | </if> |
| | | <if test="treatDate != null">#{treatDate}, |
| | | </if> |
| | | <if test="treatDoctCode != null">#{treatDoctCode}, |
| | | </if> |
| | | <if test="treatDoctName != null">#{treatDoctName}, |
| | | </if> |
| | | <if test="regWayCode != null">#{regWayCode}, |
| | | </if> |
| | | <if test="regWay != null">#{regWay}, |
| | | </if> |
| | | <if test="regSystemWayCode != null">#{regSystemWayCode}, |
| | | </if> |
| | | <if test="regSystemWay != null">#{regSystemWay}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | <if test="visitFlag != null">#{visitFlag}, |
| | | </if> |
| | | <if test="senderId != null">#{senderId}, |
| | | </if> |
| | | <if test="senderName != null">#{senderName}, |
| | | </if> |
| | | <if test="sendTime != null">#{sendTime}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateServiceAppointRecord" parameterType="com.smartor.domain.ServiceAppointRecord"> |
| | | update service_appoint_record |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="appointRecSn != null">appoint_rec_sn = |
| | | #{appointRecSn}, |
| | | </if> |
| | | <if test="changeAppointRecSn != null">change_appoint_rec_sn = |
| | | #{changeAppointRecSn}, |
| | | </if> |
| | | <if test="orgCode != null">org_code = |
| | | #{orgCode}, |
| | | </if> |
| | | <if test="patFileSn != null">pat_file_sn = |
| | | #{patFileSn}, |
| | | </if> |
| | | <if test="patMediaSn != null">pat_media_sn = |
| | | #{patMediaSn}, |
| | | </if> |
| | | <if test="patMediaNum != null">pat_media_num = |
| | | #{patMediaNum}, |
| | | </if> |
| | | <if test="patCateSn != null">pat_cate_sn = |
| | | #{patCateSn}, |
| | | </if> |
| | | <if test="patNatureSn != null">pat_nature_sn = |
| | | #{patNatureSn}, |
| | | </if> |
| | | <if test="patFileName != null">pat_file_name = |
| | | #{patFileName}, |
| | | </if> |
| | | <if test="patFileGender != null">pat_file_gender = |
| | | #{patFileGender}, |
| | | </if> |
| | | <if test="patAge != null">pat_age = |
| | | #{patAge}, |
| | | </if> |
| | | <if test="patBirthday != null">pat_birthday = |
| | | #{patBirthday}, |
| | | </if> |
| | | <if test="patCardTypeCode != null">pat_card_type_code = |
| | | #{patCardTypeCode}, |
| | | </if> |
| | | <if test="patCardType != null">pat_card_type = |
| | | #{patCardType}, |
| | | </if> |
| | | <if test="patIdCardNum != null">pat_id_card_num = |
| | | #{patIdCardNum}, |
| | | </if> |
| | | <if test="patAddr != null">pat_addr = |
| | | #{patAddr}, |
| | | </if> |
| | | <if test="patTel != null">pat_tel = |
| | | #{patTel}, |
| | | </if> |
| | | <if test="patWayCode != null">pat_way_code = |
| | | #{patWayCode}, |
| | | </if> |
| | | <if test="patWay != null">pat_way = |
| | | #{patWay}, |
| | | </if> |
| | | <if test="appointTypeSn != null">appoint_type_sn = |
| | | #{appointTypeSn}, |
| | | </if> |
| | | <if test="appointDate != null">appoint_date = |
| | | #{appointDate}, |
| | | </if> |
| | | <if test="appointOperatorId != null">appoint_operator_id = |
| | | #{appointOperatorId}, |
| | | </if> |
| | | <if test="appointOperatorName != null">appoint_operator_name = |
| | | #{appointOperatorName}, |
| | | </if> |
| | | <if test="appointRegistDate != null">appoint_regist_date = |
| | | #{appointRegistDate}, |
| | | </if> |
| | | <if test="registerScheduleSn != null">register_schedule_sn = |
| | | #{registerScheduleSn}, |
| | | </if> |
| | | <if test="outpatCateSn != null">outpat_cate_sn = |
| | | #{outpatCateSn}, |
| | | </if> |
| | | <if test="outpatCateName != null">outpat_cate_name = |
| | | #{outpatCateName}, |
| | | </if> |
| | | <if test="registDeptCode != null">regist_dept_code = |
| | | #{registDeptCode}, |
| | | </if> |
| | | <if test="registDeptName != null">regist_dept_name = |
| | | #{registDeptName}, |
| | | </if> |
| | | <if test="deptPinyinCode != null">dept_pinyin_code = |
| | | #{deptPinyinCode}, |
| | | </if> |
| | | <if test="registDoctCode != null">regist_doct_code = |
| | | #{registDoctCode}, |
| | | </if> |
| | | <if test="registDoctName != null">regist_doct_name = |
| | | #{registDoctName}, |
| | | </if> |
| | | <if test="staffPinyinCode != null">staff_pinyin_code = |
| | | #{staffPinyinCode}, |
| | | </if> |
| | | <if test="registTimeCate != null">regist_time_cate = |
| | | #{registTimeCate}, |
| | | </if> |
| | | <if test="patiRegistSn != null">pati_regist_sn = |
| | | #{patiRegistSn}, |
| | | </if> |
| | | <if test="scheduleRegistCharge != null">schedule_regist_charge = |
| | | #{scheduleRegistCharge}, |
| | | </if> |
| | | <if test="registRecSn != null">regist_rec_sn = |
| | | #{registRecSn}, |
| | | </if> |
| | | <if test="regUserSn != null">reg_user_sn = |
| | | #{regUserSn}, |
| | | </if> |
| | | <if test="regUserName != null">reg_user_name = |
| | | #{regUserName}, |
| | | </if> |
| | | <if test="regOptTime != null">reg_opt_time = |
| | | #{regOptTime}, |
| | | </if> |
| | | <if test="revokeUserSn != null">revoke_user_sn = |
| | | #{revokeUserSn}, |
| | | </if> |
| | | <if test="revokeUserName != null">revoke_user_name = |
| | | #{revokeUserName}, |
| | | </if> |
| | | <if test="revokeOptTime != null">revoke_opt_time = |
| | | #{revokeOptTime}, |
| | | </if> |
| | | <if test="withdrawalTime != null">withdrawal_time = |
| | | #{withdrawalTime}, |
| | | </if> |
| | | <if test="scheduleStatusFlag != null">schedule_status_flag = |
| | | #{scheduleStatusFlag}, |
| | | </if> |
| | | <if test="scheduleMemoDesc != null">schedule_memo_desc = |
| | | #{scheduleMemoDesc}, |
| | | </if> |
| | | <if test="scheduleCredenceNum != null">schedule_credence_num = |
| | | #{scheduleCredenceNum}, |
| | | </if> |
| | | <if test="registTimeRange != null">regist_time_range = |
| | | #{registTimeRange}, |
| | | </if> |
| | | <if test="scheduleDetailSn != null">schedule_detail_sn = |
| | | #{schedDetailSn}, |
| | | </if> |
| | | <if test="treatDate != null">treat_date = |
| | | #{treatDate}, |
| | | </if> |
| | | <if test="treatDoctCode != null">treat_doct_code = |
| | | #{treatDoctCode}, |
| | | </if> |
| | | <if test="treatDoctName != null">treat_doct_name = |
| | | #{treatDoctName}, |
| | | </if> |
| | | <if test="regWayCode != null">reg_way_code = |
| | | #{regWayCode}, |
| | | </if> |
| | | <if test="regWay != null">reg_way = |
| | | #{regWay}, |
| | | </if> |
| | | <if test="regSystemWayCode != null">reg_system_way_code = |
| | | #{regSystemWayCode}, |
| | | </if> |
| | | <if test="regSystemWay != null">reg_system_way = |
| | | #{regSystemWay}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="visitFlag != null">visit_flag = |
| | | #{visitFlag}, |
| | | </if> |
| | | <if test="senderId != null">sender_id = |
| | | #{senderId}, |
| | | </if> |
| | | <if test="senderName != null">sender_name = |
| | | #{senderName}, |
| | | </if> |
| | | <if test="sendTime != null">send_time = |
| | | #{sendTime}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteServiceAppointRecordById" parameterType="Long"> |
| | | update service_appoint_record |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteServiceAppointRecordByIds" parameterType="String"> |
| | | update service_appoint_record |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <result property="radix" column="radix"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="url" column="url"/> |
| | | <result property="wardCode" column="ward_code"/> |
| | | <result property="wardName" column="ward_name"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="deptName" column="dept_name"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceOutPathVo"> |
| | |
| | | radix, |
| | | guid, |
| | | orgid, |
| | | url, |
| | | ward_code, |
| | | ward_name, |
| | | dept_code, |
| | | dept_name, |
| | | del_flag |
| | | from service_out_path |
| | | </sql> |
| | |
| | | <if test="radix != null and radix != ''"> |
| | | and radix=#{radix} |
| | | </if> |
| | | <if test="url != null and url != ''"> |
| | | and url=#{url} |
| | | </if> |
| | | <if test="wardCode != null and wardCode != ''"> |
| | | and ward_code=#{wardCode} |
| | | </if> |
| | | |
| | | <if test="wardName != null and wardName != ''"> |
| | | and ward_name=#{wardName} |
| | | </if> |
| | | <if test="deptCode != null and deptCode != ''"> |
| | | and dept_code=#{deptCode} |
| | | </if> |
| | | <if test="deptName != null and deptName != ''"> |
| | | and dept_name=#{deptName} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectServiceOutPathById" parameterType="Long" |
| | |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="url != null">url, |
| | | </if> |
| | | <if test="wardCode != null">ward_code, |
| | | </if> |
| | | <if test="wardName != null">ward_name, |
| | | </if> |
| | | <if test="deptCode != null">dept_code, |
| | | </if> |
| | | <if test="deptName != null">dept_name, |
| | | </if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="orgid != null">#{orgid}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="url != null">#{url}, |
| | | </if> |
| | | <if test="wardCode != null">#{wardCode}, |
| | | </if> |
| | | <if test="wardName != null">#{wardName}, |
| | | </if> |
| | | <if test="deptCode != null">#{deptCode}, |
| | | </if> |
| | | <if test="deptName != null">#{deptName}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="orgid != null">orgid = |
| | | #{orgid}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="url != null">url = |
| | | #{url}, |
| | | </if> |
| | | <if test="wardCode != null">ward_code = |
| | | #{wardCode}, |
| | | </if> |
| | | <if test="wardName != null">ward_name = |
| | | #{wardName}, |
| | | </if> |
| | | <if test="deptCode != null">dept_code = |
| | | #{deptCode}, |
| | | </if> |
| | | <if test="deptName != null">dept_name = |
| | | #{deptName}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | #{state} |
| | | </foreach> |
| | | </if> |
| | | <if test="subIdList != null and sendstates.size() > 0"> |
| | | <if test="subIdList != null and subIdList.size() > 0"> |
| | | AND id IN |
| | | <foreach collection="subIdList" item="subId" open="(" separator="," close=")"> |
| | | #{subId} |
| | |
| | | <if test="endSendDateTime != null"> |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{endSendDateTime},'%y%m%d') |
| | | </if> |
| | | |
| | | <if test="longSendTime != null"> |
| | | AND date_format(long_send_time,'%y%m%d') <= date_format(#{longSendTime},'%y%m%d') |
| | | </if> |
| | |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if>) |
| | | </if> |
| | | ) |
| | | </if> |
| | | <if test="deptOrDistrict==3"> |
| | | AND (1=1 |
| | |
| | | </if> |
| | | ) |
| | | </if> |
| | | |
| | | <if test="deptOrDistrict==4"> |
| | | AND (1=1 |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | |
| | | </if> |
| | | ) |
| | | </if> |
| | | |
| | | <if test="visitTime != null"> |
| | | AND date_format(visit_time,'%y%m%d') = date_format(#{visitTime},'%y%m%d') |
| | | </if> |
| | |
| | | <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if> |
| | | <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename}</if> |
| | | <if test="openid != null ">and openid = #{openid}</if> |
| | | <if test="longSendTime != null ">and long_send_time = #{longSendTime}</if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | <if test="drname != null and drname != ''">and drname like concat('%', #{drname}, '%')</if> |
| | | <if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if> |
| | |
| | | <if test="continueTimeNext != null ">continue_time_next = #{continueTimeNext,jdbcType=TIMESTAMP},</if> |
| | | <if test="continueContent != null ">continue_content = #{continueContent},</if> |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | where |
| | | <if test="patid != null "> |
| | | patid = #{patid} |
| | | </if> |
| | | <if test="taskid != null "> |
| | | and taskid = #{taskid} |
| | | </if> |
| | | <if test="id != null "> |
| | | and id = #{id} |
| | | </if> |
| | |
| | | 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 |
| | | where del_flag = 0 |
| | | <if test="continueFlag != null ">and continue_flag = #{continueFlag}</if> |
| | | <if test="sendname != null and sendname != ''"> |
| | | AND sendname LIKE CONCAT('%', #{sendname}, '%') |
| | | </if> |
| | |
| | | #{taskId} |
| | | </foreach> |
| | | AND s.sendstate = 6 |
| | | <if test="startOutHospTime != null"> |
| | | AND date_format(s.endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endOutHospTime != null"> |
| | | AND date_format(s.endtime,'%y%m%d') <= date_format(#{endOutHospTime},'%y%m%d') |
| | | </if> |
| | | GROUP BY |
| | | t.taskid, |
| | | d.questiontext, |
| | |
| | | <if test="leavehospitaldistrictname != null ">and service_task.leavehospitaldistrictname = |
| | | #{leavehospitaldistrictname} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes!=null and leavehospitaldistrictcodes.size()>0"> |
| | | AND service_task.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="leaveldeptcodes!=null and leaveldeptcodes.size()>0"> |
| | | AND service_task.deptcode IN |
| | | <foreach collection="leaveldeptcodes" item="deptcode" open="(" separator="," |
| | | close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <choose> |
| | | <when test="(leavehospitaldistrictcodes!=null and leavehospitaldistrictcodes.size()>0) and (leaveldeptcodes!=null and leaveldeptcodes.size()>0)"> |
| | | AND ( |
| | | service_task.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | OR service_task.deptcode IN |
| | | <foreach collection="leaveldeptcodes" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | <if test="leavehospitaldistrictcodes!=null and leavehospitaldistrictcodes.size()>0"> |
| | | AND service_task.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="leaveldeptcodes!=null and leaveldeptcodes.size()>0"> |
| | | AND service_task.deptcode IN |
| | | <foreach collection="leaveldeptcodes" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </otherwise> |
| | | </choose> |
| | | <if test="leavehospitaldistrictcode != null ">and service_task.leavehospitaldistrictcode = |
| | | #{leavehospitaldistrictcode} |
| | | </if> |
| | |
| | | del_flag =1, |
| | | update_time = sysdate() |
| | | </trim> |
| | | where user_id =#{userId} and dept_code=#{deptCode} |
| | | where del_flag = 0 |
| | | and user_id =#{userId} |
| | | and dept_code=#{deptCode} |
| | | </update> |
| | | |
| | | <update id="updateSysUserDeptForSync" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept"> |