| | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ltkj.common.annotation.RepeatSubmit; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.core.domain.entity.SysUser; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.common.enums.DataSourceType; |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.common.utils.StringUtils; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.framework.config.UserHoder; |
| | | import com.ltkj.framework.datasource.DynamicDataSourceContextHolder; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.hosp.sqlDomain.*; |
| | | import com.ltkj.hosp.vodomain.CsProVo; |
| | | import com.ltkj.hosp.vodomain.UpdateOrderRemarkVo; |
| | | import com.ltkj.mall.mallOrderUtils.TjConstants; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import com.ltkj.system.service.ISysDeptService; |
| | | import com.ltkj.system.service.ISysUserService; |
| | | import com.ltkj.web.controller.his.HisApiMethodService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.var; |
| | | import org.aspectj.weaver.AjAttribute; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.save; |
| | | import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.setClipRect; |
| | | |
| | | /** |
| | | * @Author: 西安路泰科技有限公司/赵佳豪 |
| | |
| | | private ISysConfigService configService; |
| | | @Resource |
| | | private ISysDeptService deptService; |
| | | @Resource |
| | | private TestMapper testMapper; |
| | | @Resource |
| | | private TjvLtkjvtjpatService tjvLtkjvtjpatService; |
| | | @Resource |
| | | private LtkjMiddleDetailService middleDetailService; |
| | | @Resource |
| | | private LtkjMiddleHeadService headService; |
| | | @Resource |
| | | private LtkjExamJcbgdService ltkjExamJcbgdService; |
| | | @Resource |
| | | private LtkjExamJcsqdService ltkjExamJcsqdService; |
| | | @Resource |
| | | private LtkjHybgdService ltkjHybgdService; |
| | | @Resource |
| | | private LtkjHysqdService ltkjHysqdService; |
| | | @Autowired |
| | | private HisApiMethodService controller; |
| | | |
| | | |
| | | |
| | | @GetMapping("/getOperationPermissionsByTjNum") |
| | |
| | | @ApiParam(value = "开始时间") @RequestParam(required = false) String beginTime, |
| | | @ApiParam(value = "结束时间") @RequestParam(required = false) String endTime) { |
| | | |
| | | DateTime beginTimes = null; |
| | | DateTime endTimes = null; |
| | | if (null != beginTime && null != endTime) { |
| | | beginTimes = DateUtil.beginOfDay(DateUtil.parse(beginTime)); |
| | | endTimes = DateUtil.endOfDay(DateUtil.parse(endTime)); |
| | | } |
| | | //初始化体检订单表 |
| | | List<TjOrder> orderList = null; |
| | | List<TjCustomer> customerList = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | if (checkStatus == 0) |
| | | asyncService.wCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes)); |
| | | if (checkStatus == 1) |
| | | asyncService.yCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes)); |
| | | |
| | | //根据姓名查询 |
| | | if (null != name && !"".equals(name)) { |
| | | List<TjCustomer> list = customerService.getTjCustomerList(name); |
| | | if (null != list && list.size() > 0) { |
| | | List<TjCustomer> lists = new ArrayList<>(); |
| | | for (TjCustomer customer : list) { |
| | | orderList = orderService.getCsTjOrderListByCusId(customer.getCusId()); |
| | | if (null != orderList && orderList.size() > 0) { |
| | | for (TjOrder tjOrder : orderList) { |
| | | customer.setTjNumber(tjOrder.getTjNumber()); |
| | | customer.setTjStatus(Long.valueOf(tjOrder.getCheckStatus())); |
| | | customer.setOrderId(tjOrder.getOrderId()); |
| | | customer.setTjTime(tjOrder.getCreateTime()); |
| | | customer.setFinishTime(tjOrder.getFinishTime()); |
| | | customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); |
| | | customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | | customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); |
| | | customer.setConfirmStatus(String.valueOf(tjOrder.getStatus())); |
| | | if (tjOrder.getFirmId().equals("0")) { |
| | | customer.setTjCompName(null); |
| | | } else { |
| | | customer.setTjCompName(compService.selectDictCompByDrugManufacturerId(tjOrder.getFirmId()).getCnName()); |
| | | } |
| | | lists.add(customer); |
| | | } |
| | | } |
| | | } |
| | | List<TjCustomer> customers = null; |
| | | if (lists.size() > 0) { |
| | | customers = lists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | } |
| | | map.put("customers", customers); |
| | | map.put("total", lists.size()); |
| | | return AjaxResult.success(map); |
| | | } |
| | | return AjaxResult.success("暂无数据"); |
| | | } |
| | | |
| | | //条件查询 |
| | | if (null != tjNumber || null != compId || (null != beginTime && null != endTime)) { |
| | | orderList = orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | return getResult(page, pageSize, orderList, customerList, map); |
| | | } |
| | | |
| | | List<TjCustomer> customers = null; |
| | | if (checkStatus == 0) { |
| | | customers = redisCache.getCacheMapValue("cScheck", "ws"); |
| | | } |
| | | if (checkStatus == 1) { |
| | | customers = redisCache.getCacheMapValue("cScheck", "ys"); |
| | | } |
| | | if (customers != null && customers.size() > 0) { |
| | | List<TjCustomer> customerLists = customers.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | map.put("customers", customerLists); |
| | | map.put("total", customers.size()); |
| | | return AjaxResult.success(map); |
| | | } else { |
| | | orderList = orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | return getResult(page, pageSize, orderList, customerList, map); |
| | | } |
| | | // DateTime beginTimes = null; |
| | | // DateTime endTimes = null; |
| | | // if (null != beginTime && null != endTime) { |
| | | // beginTimes = DateUtil.beginOfDay(DateUtil.parse(beginTime)); |
| | | // endTimes = DateUtil.endOfDay(DateUtil.parse(endTime)); |
| | | // } |
| | | // //初始化体检订单表 |
| | | // List<TjOrder> orderList = null; |
| | | // List<TjCustomer> customerList = new ArrayList<>(); |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // |
| | | // if (checkStatus == 0) |
| | | // asyncService.wCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes)); |
| | | // if (checkStatus == 1) |
| | | // asyncService.yCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes)); |
| | | // |
| | | // //根据姓名查询 |
| | | // if (null != name && !"".equals(name)) { |
| | | // List<TjCustomer> list = customerService.getTjCustomerList(name); |
| | | // if (null != list && list.size() > 0) { |
| | | // List<TjCustomer> lists = new ArrayList<>(); |
| | | // for (TjCustomer customer : list) { |
| | | // orderList = orderService.getCsTjOrderListByCusId(customer.getCusId()); |
| | | // if (null != orderList && orderList.size() > 0) { |
| | | // for (TjOrder tjOrder : orderList) { |
| | | // customer.setTjNumber(tjOrder.getTjNumber()); |
| | | // customer.setTjStatus(Long.valueOf(tjOrder.getCheckStatus())); |
| | | // customer.setOrderId(tjOrder.getOrderId()); |
| | | // customer.setTjTime(tjOrder.getCreateTime()); |
| | | // customer.setFinishTime(tjOrder.getFinishTime()); |
| | | // customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); |
| | | // customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | | // customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); |
| | | // customer.setConfirmStatus(String.valueOf(tjOrder.getStatus())); |
| | | // if (tjOrder.getFirmId().equals("0")) { |
| | | // customer.setTjCompName(null); |
| | | // } else { |
| | | // customer.setTjCompName(compService.selectDictCompByDrugManufacturerId(tjOrder.getFirmId()).getCnName()); |
| | | // } |
| | | // lists.add(customer); |
| | | // } |
| | | // } |
| | | // } |
| | | // List<TjCustomer> customers = null; |
| | | // if (lists.size() > 0) { |
| | | // customers = lists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | // } |
| | | // map.put("customers", customers); |
| | | // map.put("total", lists.size()); |
| | | // return AjaxResult.success(map); |
| | | // } |
| | | // return AjaxResult.success("暂无数据"); |
| | | // } |
| | | // |
| | | // //条件查询 |
| | | // if (null != tjNumber || null != compId || (null != beginTime && null != endTime)) { |
| | | // orderList = orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | // return getResult(page, pageSize, orderList, customerList, map); |
| | | // } |
| | | // |
| | | // List<TjCustomer> customers = null; |
| | | // if (checkStatus == 0) { |
| | | // customers = redisCache.getCacheMapValue("cScheck", "ws"); |
| | | // } |
| | | // if (checkStatus == 1) { |
| | | // customers = redisCache.getCacheMapValue("cScheck", "ys"); |
| | | // } |
| | | // if (customers != null && customers.size() > 0) { |
| | | // List<TjCustomer> customerLists = customers.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | // map.put("customers", customerLists); |
| | | // map.put("total", customers.size()); |
| | | // return AjaxResult.success(map); |
| | | // } else { |
| | | // orderList = orderService.getCsTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | // return getResult(page, pageSize, orderList, customerList, map); |
| | | // } |
| | | String value = String.valueOf(compId); |
| | | if (tjNumber == null) tjNumber = ""; |
| | | if (compId == null) value = ""; |
| | | if (name == null) name = ""; |
| | | if (beginTime == null) beginTime = ""; |
| | | if (endTime == null) endTime = ""; |
| | | return AjaxResult.success(orderService.getCsCunChuGuoChengCustomerList(tjNumber, page, pageSize, checkStatus, value, beginTime, endTime, name)); |
| | | } |
| | | |
| | | |
| | |
| | | @GetMapping("/cSWebGetProByTjNumAndOrderId") |
| | | @ApiOperation(value = "(初审页面)点击体检人员展示体检项目接口") |
| | | public AjaxResult cSWebGetProByTjNumAndOrderId(@ApiParam(value = "体检号") @RequestParam String tjNumber) { |
| | | List<TjOrderRemark> orderRemarkList = orderRemarkService.getTjOrderRemarkListByTjNum(tjNumber); |
| | | List<CsProVo> list = new ArrayList<>(); |
| | | if (null != orderRemarkList && orderRemarkList.size() > 0) { |
| | | for (TjOrderRemark remark : orderRemarkList) { |
| | | CsProVo vo = new CsProVo(); |
| | | vo.setDeptName(deptService.getById(remark.getDeptId()).getDeptName()); |
| | | vo.setProName(projectService.getById(remark.getProId()).getProName()); |
| | | vo.setType(remark.getType()); |
| | | if (null != remark.getDoctorName()) { |
| | | vo.setDoctorName(userService.getById(remark.getDoctorName()).getNickName()); |
| | | vo.setBcdoctorName(userService.getById(remark.getDoctorName()).getNickName()); |
| | | } |
| | | vo.setSffs("统收"); |
| | | vo.setIsPay("已收费"); |
| | | vo.setQdcreateTime(remark.getCreateTime()); |
| | | vo.setBcupdateTime(remark.getUpdateTime()); |
| | | vo.setZhupdateTime(remark.getUpdateTime()); |
| | | list.add(vo); |
| | | } |
| | | // List<TjOrderRemark> orderRemarkList = orderRemarkService.getTjOrderRemarkListByTjNum(tjNumber); |
| | | // List<CsProVo> list = new ArrayList<>(); |
| | | // if (null != orderRemarkList && orderRemarkList.size() > 0) { |
| | | // for (TjOrderRemark remark : orderRemarkList) { |
| | | // CsProVo vo = new CsProVo(); |
| | | // vo.setDeptName(deptService.getById(remark.getDeptId()).getDeptName()); |
| | | // vo.setProName(projectService.getById(remark.getProId()).getProName()); |
| | | // vo.setType(remark.getType()); |
| | | // if (null != remark.getDoctorName()) { |
| | | // vo.setDoctorName(userService.getById(remark.getDoctorName()).getNickName()); |
| | | // vo.setBcdoctorName(userService.getById(remark.getDoctorName()).getNickName()); |
| | | // } |
| | | // vo.setSffs("统收"); |
| | | // vo.setIsPay("已收费"); |
| | | // vo.setQdcreateTime(remark.getCreateTime()); |
| | | // vo.setBcupdateTime(remark.getUpdateTime()); |
| | | // vo.setZhupdateTime(remark.getUpdateTime()); |
| | | // list.add(vo); |
| | | // } |
| | | // List<CsProVo> list1 = orderRemarkService.cSWebGetProByTjNumAndOrderId(tjNumber); |
| | | // Collections.sort(list, new Comparator<CsProVo>() { |
| | | // @Override |
| | | // public int compare(CsProVo o1, CsProVo o2) { |
| | | // return o1.getType() - o2.getType(); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | Collections.sort(list, new Comparator<CsProVo>() { |
| | | List<CsProVo> list = orderRemarkService.cSWebGetProByTjNumAndOrderId(tjNumber); |
| | | if (null != list && list.size() > 0) { |
| | | list.sort(new Comparator<CsProVo>() { |
| | | @Override |
| | | public int compare(CsProVo o1, CsProVo o2) { |
| | | return o1.getType() - o2.getType(); |
| | |
| | | */ |
| | | @GetMapping("/confirmOrder") |
| | | @ApiOperation(value = "初审(并修改状态)接口") |
| | | // @PreAuthorize("@ss.hasPermi('check:check:confirmOrder')") |
| | | @Transactional |
| | | public AjaxResult confirmOrder(@ApiParam(value = "tjNumber") @RequestParam String tjNumber, |
| | | @ApiParam(value = "状态 0同意 1拒绝 默认同意") @RequestParam(defaultValue = "0") Integer status, |
| | | @ApiParam(value = "驳回理由") @RequestParam(required = false) String remark) { |
| | | int num = orderRemarkService.getTjYqOrderRemarkByTjNum(tjNumber); |
| | | if (num > 0) return AjaxResult.error("有延期项目暂不能审核!"); |
| | | if (num > 0) return AjaxResult.error("请检查是否存在未检或延期项目"); |
| | | if (null != tjNumber) { |
| | | Long userId = Long.valueOf(SecurityUtils.getLoginUser().getUserId()); |
| | | SysUser sysUser = userService.getById(userId); |
| | | LambdaQueryWrapper<TjOrder> wq1 = new LambdaQueryWrapper<>(); |
| | | wq1.eq(TjOrder::getTjNumber, tjNumber); |
| | | TjOrder tjOrder = orderService.getOne(wq1); |
| | | TjOrder tjOrder = orderService.getOrderByTjNum(tjNumber); |
| | | if (null != tjOrder) { |
| | | tjOrder.setConfirmTime(new DateTime()); |
| | | tjOrder.setConfirmDoctor(sysUser.getNickName()); |
| | | tjOrder.setConfirmStatus(remark); |
| | | tjOrder.setConfirmStatus(String.valueOf(status)); |
| | | if (status == 0) { |
| | | tjOrder.setStatus(TjConstants.TJ_CHECK); |
| | | asyncService.updateCheckType(tjNumber); |
| | |
| | | confirmLog.setTjNum(tjNumber); |
| | | confirmLog.setStatus(status); |
| | | confirmLogService.save(confirmLog); |
| | | asyncService.wCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, 0, null, null, null)); |
| | | asyncService.yCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, 1, null, null, null)); |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | | return AjaxResult.error("操作失败"); |
| | |
| | | |
| | | |
| | | /** |
| | | * 同步sql server数据到本地数据库数据接口 |
| | | */ |
| | | @GetMapping("/dataSynchronization") |
| | | @ApiOperation(value = "同步sql server数据到本地数据库数据接口") |
| | | @RepeatSubmit |
| | | @Transactional |
| | | public AjaxResult dataSynchronization(@RequestParam String tjNumber) { |
| | | //根据配置调取存储过程 将临时表数据存入预约表2023.12.12 |
| | | final String getInfoFromSqlData = configService.selectConfigByKey("getInfoFromSqlData"); |
| | | |
| | | final String sfkqdyhis = configService.selectConfigByKey("sfkqdyhis"); |
| | | TjOrder order = orderService.getOrderByTjNum(tjNumber); |
| | | if(null !=order){ |
| | | |
| | | //开启字典弹窗 |
| | | if ("Y".equals(getInfoFromSqlData)) { |
| | | tbhyxm(order); |
| | | // List<LtkjExamJcsqd> one2 = testMapper.getExamJcsqdTmh(tjNumber); |
| | | // if (one2 != null && one2.size() > 0) { |
| | | // DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | // ltkjExamJcsqdService.saveBatch(one2); |
| | | // DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | // for (LtkjExamJcsqd ltkjExamJcsqd : one2) { |
| | | // List<LtkjExamJcbgd> one3 = testMapper.getExamJcbgdByTjh(ltkjExamJcsqd.getTmh()); |
| | | // if (one3 != null && one3.size() > 0) { |
| | | // DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | // ltkjExamJcbgdService.saveBatch(one3); |
| | | // DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | // } |
| | | // } |
| | | // } |
| | | //同步化验项目 |
| | | testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId()); |
| | | //同步检查项目 |
| | | testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId()); |
| | | asyncService.updateCheckType(order.getTjNumber()); |
| | | |
| | | } |
| | | |
| | | //开启和his对接 |
| | | if(null !=sfkqdyhis && sfkqdyhis.equals("Y")){ |
| | | |
| | | List<String> baoGaoDans = ltkjHybgdService.getJianYanBaoGaoDan(order.getCardId()); |
| | | if(null !=baoGaoDans && baoGaoDans.size()>0){ |
| | | |
| | | // List<LtkjHysqd> one = testMapper.getHysqdByTmh(order.getCardId()); |
| | | // if (one != null && one.size() > 0) { |
| | | // for (LtkjHysqd ltkjHysqd : one) { |
| | | // ltkjHysqdService.deletedLtkjHysqdByTjhAndTmh(ltkjHysqd.getTjh(), ltkjHysqd.getTmh()); |
| | | // ltkjHybgdService.deletedLtkjHybgdByTjhAndTmh(ltkjHysqd.getTmh()); |
| | | // } |
| | | // } |
| | | // for (String baoGaoDan : baoGaoDans) { |
| | | Date dates = new Date(); |
| | | Map<String,Object> map=new HashMap<>(); |
| | | map.put("his_registration_id",order.getCardId()); |
| | | map.put("ksbm",""); |
| | | map.put("pationid",""); |
| | | map.put("ksrq",DateUtil.format(DateUtil.beginOfDay(order.getCreateTime()), "yyyy-MM-dd HH:mm:ss")); |
| | | map.put("jsrq",DateUtil.format(DateUtil.endOfDay(dates), "yyyy-MM-dd HH:mm:ss")); |
| | | map.put("pagecount",10); |
| | | map.put("page",1); |
| | | AjaxResult result = controller.Getlabreportinfo(map); |
| | | String result1 = getAjaxResult(result); |
| | | JSONObject object = getJSONObject(result1); |
| | | String code = object.getStr("ResultCode"); |
| | | if(null ==code || !code.equals("0")){ |
| | | return AjaxResult.error("化验项目暂时无结果,请稍后同步!!!"); |
| | | } |
| | | JSONArray data = object.getJSONArray("ResultData"); |
| | | for (Object datum : data) { |
| | | JSONObject jsonObject = (JSONObject)datum; |
| | | LtkjHysqd jybgid = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(order.getCardId(), jsonObject.getStr("JYBGID")); |
| | | if(null !=jybgid){ |
| | | ltkjHysqdService.deletedLtkjHysqdByTjhAndTmh(order.getCardId(),jsonObject.getStr("JYBGID")); |
| | | ltkjHybgdService.deletedLtkjHybgdByTjhAndTmh(jybgid.getTmh()); |
| | | } |
| | | LtkjHysqd hysqd=new LtkjHysqd(); |
| | | hysqd.setTjh(order.getCardId()); |
| | | hysqd.setTmh(jsonObject.getStr("JYBGID")); |
| | | hysqd.setBbbh(jsonObject.getStr("BBDM")); |
| | | hysqd.setBbmc(jsonObject.getStr("BBMC")); |
| | | hysqd.setXmid(jsonObject.getStr("JYXMDM")); |
| | | hysqd.setXmmc(jsonObject.getStr("JYXMMC")); |
| | | hysqd.setSqsj(jsonObject.getStr("SQRQ")); |
| | | hysqd.setSqys(jsonObject.getStr("SQRBH")); |
| | | hysqd.setJgsj(jsonObject.getStr("JYBGRQ")); |
| | | hysqd.setSqrxm(jsonObject.getStr("SQRXM")); |
| | | hysqd.setSqdh(jsonObject.getStr("SQDBH")); |
| | | if (ltkjHysqdService.save(hysqd)) { |
| | | Map<String,Object> hashMap=new HashMap<>(); |
| | | hashMap.put("jybgid",hysqd.getTmh()); |
| | | AjaxResult bgdres = controller.Getlabdetailinfo(hashMap); |
| | | String result2 = getAjaxResult(bgdres); |
| | | JSONObject object1 = getJSONObject(result2); |
| | | String code1 = object1.getStr("ResultCode"); |
| | | if(null ==code1 || !code1.equals("0")){ |
| | | return AjaxResult.error("化验项目暂时无结果,请稍后同步!!!"); |
| | | } |
| | | JSONArray datas = object1.getJSONArray("ResultData"); |
| | | for (Object o : datas) { |
| | | JSONObject js = (JSONObject)o; |
| | | // ltkjHybgdService.deletedLtkjHybgdByTjhAndTmh(jsonObject.getStr("JYBGID")); |
| | | LtkjHybgd bgd=new LtkjHybgd(); |
| | | bgd.setTmh(hysqd.getTmh()); |
| | | bgd.setJcxmid(js.getStr("JCZBDM")); |
| | | bgd.setJcxm(js.getStr("JCZBMC")); |
| | | bgd.setTdh(js.getStr("")); |
| | | bgd.setJyjg(js.getStr("JCZBJG")); |
| | | bgd.setJgdw(js.getStr("JLDW")); |
| | | bgd.setFwzdz(js.getStr("")); |
| | | bgd.setFwzgz(js.getStr("")); |
| | | bgd.setFwz(js.getStr("CKZFW")); |
| | | bgd.setJysj(js.getStr("BGRQ")); |
| | | bgd.setJyys(js.getStr("JCRBH")); |
| | | bgd.setShsj(js.getStr("BGRQ")); |
| | | bgd.setShsj(js.getStr("BGRQ")); |
| | | bgd.setShys(js.getStr("SHRBH")); |
| | | bgd.setYcbz(js.getStr("YCTS")); |
| | | // bgd.setTpurl(js.getStr("")); |
| | | ltkjHybgdService.save(bgd); |
| | | } |
| | | } |
| | | } |
| | | // } |
| | | //同步化验项目 |
| | | testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId()); |
| | | //同步检查项目 |
| | | testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId()); |
| | | asyncService.updateCheckType(order.getTjNumber()); |
| | | } |
| | | |
| | | |
| | | } |
| | | return AjaxResult.success("同步成功"); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | //将方法返回值解析成json格式 |
| | | public JSONObject getJSONObject(String builder) { |
| | | String Response = JSONUtil.parseObj(builder).getStr("Response"); |
| | | return JSONUtil.parseObj(Response); |
| | | } |
| | | |
| | | //获取方法返回值信息 |
| | | public String getAjaxResult(AjaxResult result) { |
| | | return result.get("data").toString(); |
| | | } |
| | | |
| | | private void tbhyxm(TjOrder order) { |
| | | List<LtkjHysqd> one = testMapper.getHysqdByTmh(order.getCardId()); |
| | | if (one != null && one.size() > 0) { |
| | | for (LtkjHysqd ltkjHysqd : one) { |
| | | ltkjHysqdService.deletedLtkjHysqdByTjhAndTmh(ltkjHysqd.getTjh(), ltkjHysqd.getTmh()); |
| | | ltkjHybgdService.deletedLtkjHybgdByTjhAndTmh(ltkjHysqd.getTmh()); |
| | | LtkjHysqd hysqd = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(ltkjHysqd.getTjh(), ltkjHysqd.getTmh()); |
| | | if (hysqd == null) { |
| | | ltkjHysqdService.save(ltkjHysqd); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(ltkjHysqd.getTmh()); |
| | | if (one1 != null && one1.size() > 0) { |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | ltkjHybgdService.saveBatch(one1); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询体检记录客户列表 |
| | | * |
| | | * @param tjNumber |
| | | * @param checkStatus |
| | | * @param page |
| | | * @param pageSize |
| | | * @param compId |
| | | * @param beginTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @GetMapping("/getList") |
| | | @ApiOperation(value = "查询体检记录客户列表")//0待1已 |
| | |
| | | @ApiParam(value = "姓名)") @RequestParam(required = false) String name, |
| | | @ApiParam(value = "开始时间") @RequestParam(required = false) String beginTime, |
| | | @ApiParam(value = "结束时间") @RequestParam(required = false) String endTime) { |
| | | // String config = configService.selectConfigByKey("tj_confirm"); |
| | | // DateTime beginTimes = null; |
| | | // DateTime endTimes = null; |
| | | // if (null != beginTime && null != endTime) { |
| | | // beginTimes = DateUtil.beginOfDay(DateUtil.parse(beginTime)); |
| | | // endTimes = DateUtil.endOfDay(DateUtil.parse(endTime)); |
| | | // } |
| | | // asyncService.checkSetCustomerLisByRedis(config); |
| | | // //初始化体检订单表 |
| | | // List<TjOrder> orderList = null; |
| | | // List<TjCustomer> customerList = new ArrayList<>(); |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // |
| | | // //姓名查询 |
| | | // if (null != name && !"".equals(name)) { |
| | | // List<TjCustomer> list = customerService.getTjCustomerList(name); |
| | | // if (null != list && list.size() > 0) { |
| | | // List<TjCustomer> lists = new ArrayList<>(); |
| | | // for (TjCustomer customer : list) { |
| | | // if ("Y".equals(config)) { |
| | | // orderList = orderService.getCsTjOrderListByCusId1(customer.getCusId()); |
| | | // } else { |
| | | // orderList = orderService.getTjOrderListByCusId(customer.getCusId()); |
| | | // } |
| | | // if (null != orderList && orderList.size() > 0) { |
| | | // for (TjOrder tjOrder : orderList) { |
| | | // customer.setTjNumber(tjOrder.getTjNumber()); |
| | | // customer.setTjStatus(Long.valueOf(tjOrder.getCheckStatus())); |
| | | // customer.setOrderId(tjOrder.getOrderId()); |
| | | // customer.setTjTime(tjOrder.getFinishTime()); |
| | | // customer.setFinishTime(tjOrder.getFinishTime()); |
| | | // customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); |
| | | // customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | | // customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); |
| | | // customer.setConfirmStatus(String.valueOf(tjOrder.getStatus())); |
| | | // customer.setTjCategory(tjOrder.getTjCategory()); |
| | | // if (tjOrder.getFirmId().equals("0")) { |
| | | // customer.setTjCompName(null); |
| | | // } else { |
| | | // customer.setTjCompName(compService.selectDictCompByDrugManufacturerId(tjOrder.getFirmId()).getCnName()); |
| | | // } |
| | | // lists.add(customer); |
| | | // } |
| | | // } |
| | | // } |
| | | // List<TjCustomer> customers = null; |
| | | // if (lists.size() > 0) { |
| | | // customers = lists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | // } |
| | | // map.put("customers", customers); |
| | | // map.put("total", lists.size()); |
| | | // return AjaxResult.success(map); |
| | | // } |
| | | // return AjaxResult.success("暂无数据"); |
| | | // } |
| | | // |
| | | // //条件查询 |
| | | // if (null != tjNumber || null != compId || (null != beginTime && null != endTime)) { |
| | | // //判断是否开启初审 |
| | | // if ("Y".equals(config)) { |
| | | // orderList = orderService.getCsTjOrderList1(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | // } else { |
| | | // orderList = orderService.getTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | // } |
| | | // return getResult(page, pageSize, orderList, customerList, map); |
| | | // } |
| | | // |
| | | // List<TjCustomer> customers = null; |
| | | // if (null != checkStatus && checkStatus == 0) { |
| | | // customers = redisCache.getCacheMapValue("check", "ws"); |
| | | // } |
| | | // if (null != checkStatus && checkStatus == 1) { |
| | | // customers = redisCache.getCacheMapValue("check", "ys"); |
| | | // } |
| | | // if (customers != null && customers.size() > 0) { |
| | | //// asyncService.addRedis(customers); |
| | | // List<TjCustomer> customerLists = customers.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | // map.put("customers", customerLists); |
| | | // map.put("total", customers.size()); |
| | | // return AjaxResult.success(map); |
| | | // } else { |
| | | // //判断是否开启初审 |
| | | // if ("Y".equals(config)) { |
| | | // orderList = orderService.getCsTjOrderList1(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | // } else { |
| | | // orderList = orderService.getTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | // } |
| | | // return getResult(page, pageSize, orderList, customerList, map); |
| | | // } |
| | | |
| | | String config = configService.selectConfigByKey("tj_confirm"); |
| | | DateTime beginTimes = null; |
| | | DateTime endTimes = null; |
| | | if (null != beginTime && null != endTime) { |
| | | beginTimes = DateUtil.beginOfDay(DateUtil.parse(beginTime)); |
| | | endTimes = DateUtil.endOfDay(DateUtil.parse(endTime)); |
| | | } |
| | | asyncService.checkSetCustomerLisByRedis(config); |
| | | //初始化体检订单表 |
| | | List<TjOrder> orderList = null; |
| | | List<TjCustomer> customerList = new ArrayList<>(); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | //姓名查询 |
| | | if (null != name && !"".equals(name)) { |
| | | List<TjCustomer> list = customerService.getTjCustomerList(name); |
| | | if (null != list && list.size() > 0) { |
| | | List<TjCustomer> lists = new ArrayList<>(); |
| | | for (TjCustomer customer : list) { |
| | | if ("Y".equals(config)) { |
| | | orderList = orderService.getCsTjOrderListByCusId1(customer.getCusId()); |
| | | } else { |
| | | orderList = orderService.getTjOrderListByCusId(customer.getCusId()); |
| | | } |
| | | if (null != orderList && orderList.size() > 0) { |
| | | for (TjOrder tjOrder : orderList) { |
| | | customer.setTjNumber(tjOrder.getTjNumber()); |
| | | customer.setTjStatus(Long.valueOf(tjOrder.getCheckStatus())); |
| | | customer.setOrderId(tjOrder.getOrderId()); |
| | | customer.setTjTime(tjOrder.getFinishTime()); |
| | | customer.setFinishTime(tjOrder.getFinishTime()); |
| | | customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); |
| | | customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | | customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); |
| | | customer.setConfirmStatus(String.valueOf(tjOrder.getStatus())); |
| | | if (tjOrder.getFirmId().equals("0")) { |
| | | customer.setTjCompName(null); |
| | | } else { |
| | | customer.setTjCompName(compService.selectDictCompByDrugManufacturerId(tjOrder.getFirmId()).getCnName()); |
| | | } |
| | | lists.add(customer); |
| | | } |
| | | } |
| | | } |
| | | List<TjCustomer> customers = null; |
| | | if (lists.size() > 0) { |
| | | customers = lists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | } |
| | | map.put("customers", customers); |
| | | map.put("total", lists.size()); |
| | | return AjaxResult.success(map); |
| | | } |
| | | return AjaxResult.success("暂无数据"); |
| | | } |
| | | |
| | | //条件查询 |
| | | if (null != tjNumber || null != compId || (null != beginTime && null != endTime)) { |
| | | //判断是否开启初审 |
| | | if ("Y".equals(config)) { |
| | | orderList = orderService.getCsTjOrderList1(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | } else { |
| | | orderList = orderService.getTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | } |
| | | return getResult(page, pageSize, orderList, customerList, map); |
| | | } |
| | | |
| | | List<TjCustomer> customers = null; |
| | | if (null != checkStatus && checkStatus == 0) { |
| | | customers = redisCache.getCacheMapValue("check", "ws"); |
| | | } |
| | | if (null != checkStatus && checkStatus == 1) { |
| | | customers = redisCache.getCacheMapValue("check", "ys"); |
| | | } |
| | | if (customers != null && customers.size() > 0) { |
| | | asyncService.addRedis(customers); |
| | | List<TjCustomer> customerLists = customers.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | map.put("customers", customerLists); |
| | | map.put("total", customers.size()); |
| | | return AjaxResult.success(map); |
| | | } else { |
| | | //判断是否开启初审 |
| | | if ("Y".equals(config)) { |
| | | orderList = orderService.getCsTjOrderList1(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | } else { |
| | | orderList = orderService.getTjOrderList(tjNumber, checkStatus, compId, beginTimes, endTimes); |
| | | } |
| | | return getResult(page, pageSize, orderList, customerList, map); |
| | | } |
| | | String value = String.valueOf(compId); |
| | | if (tjNumber == null) tjNumber = ""; |
| | | if (compId == null) value = ""; |
| | | if (name == null) name = ""; |
| | | if (beginTime == null) beginTime = ""; |
| | | if (endTime == null) endTime = ""; |
| | | return AjaxResult.success(orderService.getCunChuGuoChengCustomerList(tjNumber, page, pageSize, checkStatus, value, beginTime, endTime, name)); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (null != customer) { |
| | | customer.setCusNumber(customer.getCusNumber() + 1); |
| | | if (customerService.updateById(customer)) { |
| | | LambdaQueryWrapper<TbTransition> wqq = new LambdaQueryWrapper<>(); |
| | | wqq.eq(TbTransition::getCusId, customer.getCusIdcard()); |
| | | transitionService.remove(wqq); |
| | | // LambdaQueryWrapper<TbTransition> wqq = new LambdaQueryWrapper<>(); |
| | | // wqq.eq(TbTransition::getCusId, customer.getCusIdcard()); |
| | | // wqq.eq(TbTransition::getCardId, customer.getCardId()); |
| | | // transitionService.remove(wqq); |
| | | asyncService.updateCheckType(tjNumber); |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | | return AjaxResult.error("操作失败"); |
| | |
| | | |
| | | |
| | | /** |
| | | * 总检点击体检信息详情 |
| | | * 总检点击体检信息详情————非化验项目 |
| | | * |
| | | * @param tjNumber |
| | | * @return |
| | | */ |
| | | @GetMapping("/updateCheckType") |
| | | @ApiOperation(value = "总检点击体检信息详情") |
| | | // @PreAuthorize("@ss.hasPermi('check:check:updateCheckType')") |
| | | @ApiOperation(value = "总检点击体检信息详情————非化验项目") |
| | | public AjaxResult updateCheckType(@ApiParam(value = "客户体检号") @RequestParam String tjNumber) { |
| | | if(redisCache.hasKey("updateCheckType"+tjNumber)) { |
| | | return redisCache.getCacheMapValue("updateCheckType" + tjNumber, tjNumber); |
| | | } |
| | | // if (redisCache.hasKey("updateCheckType" + tjNumber)) { |
| | | // List<Map<String, Object>> cacheMapValue = redisCache.getCacheMapValue("updateCheckType" + tjNumber, tjNumber); |
| | | // return AjaxResult.success(cacheMapValue); |
| | | // } |
| | | return getAjaxResult(tjNumber); |
| | | } |
| | | |
| | | private AjaxResult getAjaxResult(String tjNumber) { |
| | | final long l = System.currentTimeMillis(); |
| | | |
| | | asyncService.updateCheckType(tjNumber); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | TjOrder one = orderService.getOrderByTjNum(tjNumber); |
| | | |
| | |
| | | Map<String, Object> parent = new HashMap<>(); |
| | | parent.put("checkAdvice", one.getCheckAdvice()); |
| | | TjProject project = projectService.selectTjProjectByProId(remark.getProId()); |
| | | //判断该项目是否需要打印报告 |
| | | if ("N".equals(project.getNeedReport())) { |
| | | continue; |
| | | } |
| | | |
| | | //判断该项目是否检验科项目 2024/2/28g |
| | | if (project.getDeptId() == 241) { |
| | | continue; |
| | | } |
| | | |
| | | if (null != project) { |
| | | parent.put("parent", project.getProName()); |
| | | parent.put("parentId", project.getProId().toString()); |
| | |
| | | if (null != tjOrderDetails && tjOrderDetails.size() > 0) { |
| | | for (TjOrderDetail tjOrderDetail : tjOrderDetails) { |
| | | final TjProject byId = projectService.selectTjProjectByProId(tjOrderDetail.getProId()); |
| | | tjOrderDetail.setProject(byId); |
| | | if (null == byId) { |
| | | detailService.removeById(tjOrderDetail.getOrderDetailId()); |
| | | } else { |
| | | tjOrderDetail.setProject(byId); |
| | | String metering = byId.getProMetering(); |
| | | if (StrUtil.isNotBlank(metering)) |
| | | tjOrderDetail.setUnit(metering); |
| | | } |
| | | List<TjStandard> list2 = tjStandardService.getTjStandardListByProId(String.valueOf(tjOrderDetail.getProId())); |
| | | if (list2.size() == 0) { |
| | | tjOrderDetail.setStandard(new TjStandard()); |
| | |
| | | tjOrderDetail.setStandard(list2.get(0)); |
| | | } else { |
| | | final int ageType = StringUtils.getAgeType(DateUtil.ageOfNow(customer.getCusBrithday())); |
| | | TjStandard tjStandard1=tjStandardService.getListBySexAndType(customer.getCusSex(),ageType, String.valueOf(tjOrderDetail.getProId())); |
| | | TjStandard tjStandard1 = tjStandardService.getListBySexAndType(customer.getCusSex(), ageType, String.valueOf(tjOrderDetail.getProId())); |
| | | tjOrderDetail.setStandard(tjStandard1); |
| | | } |
| | | } |
| | | String summary = remark.getSummary(); |
| | | if (null != summary) { |
| | | String[] split = summary.split(";"); |
| | | parent.put("parentAdvice", tjAdviceService.getAdviceStringByIds(Arrays.asList(split))); |
| | | String[] split = summary.split(";"); |
| | | // List<Long> longList = new ArrayList<>(); |
| | | // for (String str : split) { |
| | | // if(!"".equals(str)){ |
| | | // longList.add(Long.valueOf(str)); |
| | | // } |
| | | // } |
| | | parent.put("parentAdvice", tjAdviceService.getAdviceStringByIds(split)); |
| | | |
| | | } else { |
| | | parent.put("parentAdvice", null); |
| | |
| | | } else { |
| | | return AjaxResult.success("该客户没有体检项目数据"); |
| | | } |
| | | // } |
| | | } |
| | | final long l1 = System.currentTimeMillis(); |
| | | System.out.println("++++++++++++++++++++++++++++++++++++++++++==============="+(l1-l)); |
| | | return AjaxResult.success(list); |
| | | } |
| | | return AjaxResult.success("该客户没有体检项目数据!"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 总检点击体检信息详情————化验项目 |
| | | * |
| | | * @param tjNumber |
| | | * @return |
| | | */ |
| | | @GetMapping("/updateCheckTypeHuaYan") |
| | | @ApiOperation(value = "总检点击体检信息详情————化验项目") |
| | | public AjaxResult updateCheckTypeHuaYan(@ApiParam(value = "客户体检号") @RequestParam String tjNumber) { |
| | | // asyncService.updateCheckType(tjNumber); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | TjOrder one = orderService.getOrderByTjNum(tjNumber); |
| | | |
| | | if (one == null) { |
| | | return AjaxResult.error("暂无数据!!"); |
| | | } |
| | | final String getInfoFromSqlData = configService.selectConfigByKey("getInfoFromSqlData"); |
| | | if(null !=getInfoFromSqlData && getInfoFromSqlData.equals("Y")) |
| | | tbhyxm(one); |
| | | // TjCustomer customer = customerService.getById(one.getUserId()); |
| | | List<TjOrderRemark> remarkList = orderRemarkService.addHuaYanTable(tjNumber); |
| | | List<TjOrderDetail> tjOrderDetails = detailService.addHuaYanTable(tjNumber); |
| | | |
| | | |
| | | if (null != remarkList && remarkList.size() > 0) { |
| | | for (TjOrderRemark remark : remarkList) { |
| | | Map<String, Object> parent = new HashMap<>(); |
| | | parent.put("checkAdvice", one.getCheckAdvice()); |
| | | parent.put("parent", remark.getProName()); |
| | | parent.put("parentId", remark.getProId().toString()); |
| | | List<TjOrderDetail> dels=new ArrayList<>(); |
| | | if (null != tjOrderDetails && tjOrderDetails.size() > 0) { |
| | | for (TjOrderDetail tjOrderDetail : tjOrderDetails) { |
| | | if(remark.getProId().equals(tjOrderDetail.getProId())){ |
| | | String ckfw = tjOrderDetail.getStanId(); |
| | | if (StrUtil.isNotBlank(tjOrderDetail.getProAdvice())){ |
| | | ckfw = ckfw.replace(tjOrderDetail.getProAdvice().trim(),""); |
| | | } |
| | | if (StrUtil.isNotBlank(ckfw)) { |
| | | try { |
| | | Integer.parseInt(tjOrderDetail.getYcbz()); |
| | | String[] split = ckfw.split("-"); |
| | | BigDecimal min = new BigDecimal(split[0]); |
| | | BigDecimal max = new BigDecimal(split[1]); |
| | | String proResult = tjOrderDetail.getProResult(); |
| | | BigDecimal jyjgval = new BigDecimal(proResult); |
| | | if (jyjgval.compareTo(min) < 0) { |
| | | tjOrderDetail.setYcbz("↓"); |
| | | } else if (jyjgval.compareTo(max) > 0) { |
| | | tjOrderDetail.setYcbz("↑"); |
| | | }else { |
| | | tjOrderDetail.setYcbz(""); |
| | | } |
| | | } catch (NumberFormatException ignored) { |
| | | ignored.printStackTrace(); |
| | | } |
| | | } |
| | | if(null !=tjOrderDetail.getYcbz() && !tjOrderDetail.getYcbz().equals("")){ |
| | | tjOrderDetail.setProResult(tjOrderDetail.getProResult()+" ["+tjOrderDetail.getYcbz()+"]"); |
| | | } |
| | | dels.add(tjOrderDetail); |
| | | } |
| | | } |
| | | String summary = remark.getSummary(); |
| | | if (null != summary) { |
| | | String[] split = summary.split(";"); |
| | | parent.put("parentAdvice", tjAdviceService.getAdviceStringByIds(split)); |
| | | } else { |
| | | parent.put("parentAdvice", null); |
| | | } |
| | | if(dels.size()==0){ |
| | | continue; |
| | | } |
| | | parent.put("sons", dels); |
| | | parent.put("remark", remark.getRemark()); |
| | | if (remark.getDoctorName() != null && null != userService.getById(remark.getDoctorName())) { |
| | | parent.put("doctorName", userService.getById(remark.getDoctorName()).getNickName()); |
| | | } |
| | | |
| | | list.add(parent); |
| | | } else { |
| | | return AjaxResult.success("该客户没有体检项目数据"); |
| | | } |
| | | } |
| | | return AjaxResult.success(list); |
| | | } |
| | | return AjaxResult.success("该客户没有体检项目数据!"); |
| | |
| | | customer.setTjTime(tjOrder.getCreateTime()); |
| | | customer.setFinishTime(tjOrder.getFinishTime()); |
| | | customer.setConfirmStatus(String.valueOf(tjOrder.getStatus())); |
| | | customer.setTjCategory(tjOrder.getTjCategory()); |
| | | if (tjOrder.getFirmId() == null) { |
| | | customer.setTjCompName("无"); |
| | | } else { |