| | |
| | | package com.hx.phip.controller.treat; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.guide.util.AuthUtil; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.common.LabelAscriptionConstants; |
| | | import com.hx.phiappt.common.TreatSingleConstants; |
| | | import com.hx.phiappt.dao.mapper.*; |
| | | import com.hx.phiappt.model.BaseEntity; |
| | | import com.hx.resultTool.Result; |
| | | import com.hx.util.DateUtil; |
| | | import com.hx.util.MapUtil; |
| | | import com.hx.util.StringUtils; |
| | | import com.hz.his.dto.treat.TreatSingleQueryDto; |
| | | import com.hz.his.feign.service.phis.SLabelService; |
| | | import com.hz.his.vo.label.LabelFindVo; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 治疗单数据 |
| | |
| | | @RestController |
| | | @RequestMapping("/treat/single/data") |
| | | public class TreatDataController extends BaseController { |
| | | |
| | | @Resource |
| | | private SLabelService sLabelService; |
| | | |
| | | /** 治疗单列表 */ |
| | | @RequestMapping(value = "/list") |
| | |
| | | .append(" , ts.drugStatus, ts.isUserSign, ts.isWillPhoto, ts.isRd, ts.isFirstFm ") |
| | | .append(" , ts.aDoctorName as doctorName, ts.aNurseName as nurseName, ts.anStatus, ts.orderClassify ") |
| | | .append(" , ts.remarkInfo, ts.allergyInfo, ts.aRemark, ts.roomName ") |
| | | .append(" , DATE_FORMAT(ts.createTime, '%H:%i %m/%d') AS createTime ") |
| | | .append(" , o.userId, u.name as userName, u.CIQ, u.userLevel ") |
| | | .append(" , DATE_FORMAT(ts.createTime, '%Y-%m-%d %H:%i:%s') AS createTime ") |
| | | .append(" , o.userId, u.name as userName, u.CIQ, u.userLevel, u.gender ") |
| | | .append(" , t.treatEndTime ") |
| | | .append(" from treat_single ts ") |
| | | .append(" left join v_visit_order o on o.id = ts.visitOrderId ") |
| | |
| | | throw new TipsException("查询不到治疗单信息!"); |
| | | } |
| | | |
| | | //查询用户标签 |
| | | String userId = MapUtil.getString(dataMap, "userId"); |
| | | List<String> labelList = null; |
| | | LabelFindVo labelFindVo = new LabelFindVo(); |
| | | labelFindVo.setRangeCodeNew(LabelAscriptionConstants.TYPE_USER_EXPERIENCE); |
| | | labelFindVo.setUserId(userId); |
| | | Result result = sLabelService.getLabelUserLabel(labelFindVo); |
| | | if(result.checkCode()){ |
| | | JSONArray arr = JSONArray.parseArray(JSON.toJSONString(result.getData())); |
| | | if(arr != null && arr.size() > 0){ |
| | | labelList = arr.stream().map(s->((JSONObject) s).getString("name")).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | dataMap.put("labelList", labelList); |
| | | |
| | | //治疗单签名信息 |
| | | sqlSentence.setSqlSentence(" select signPerType, signPerName, signImg, opMan from treat_single_sign s where isDel = 0 and treatSingleId = #{m.id} order by sortNo asc "); |
| | | List<Map<String, Object>> signList = commonService.selectListMap(TreatSingleSignMapper.class, sqlSentence); |