| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | hashMap.put("examNo", examNo); |
| | | hashMap.put("name", name); |
| | | log.info("作废检查 ->{}",JSONUtil.toJsonStr(hashMap)); |
| | | // return getMethodService.getPacsData("updatePacsApply",hashMap); |
| | | return AjaxResult.success(); |
| | | return getMethodService.getPacsData("updatePacsApply",hashMap); |
| | | } |
| | | |
| | | public Boolean save(TjOrder tjOrder, TjCustomer tjCustomer,List<TbTransition> detailList) { |
| | | JSONArray array = JSONUtil.createArray(); |
| | | try { |
| | | if (detailList != null && !detailList.isEmpty()) { |
| | | LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | wq.in(TjProject::getProId, detailList.stream().map(TbTransition::getParentProId).collect(Collectors.toList())); |
| | |
| | | Date date = new Date(); |
| | | String regNo = "jk_"+DateFormatUtils.format(date, "yyyyMMddHHmmss") +"_"+project.getHisXmbm(); |
| | | savePacsApply.setRegNo(regNo); |
| | | JSONObject jsonObject = JSONUtil.createObj(); |
| | | jsonObject.putOpt("cardId",tjOrder.getCardId()); |
| | | jsonObject.putOpt("regNo",regNo); |
| | | jsonObject.putOpt("name",tjCustomer.getCusName()); |
| | | array.add(jsonObject); |
| | | savePacsApply.setCheckItemID(project.getHisXmbm()); |
| | | savePacsApply.setCheckItem(project.getHisXmmc()); |
| | | // TODO 检查部位 |
| | |
| | | // TODO 检查设备类型 |
| | | savePacsApply.setDeviceType(""); |
| | | log.info("检查申请 ->{}",JSONUtil.toJsonStr(savePacsApply)); |
| | | if (true) |
| | | return false; |
| | | AjaxResult ajaxResult = savePacsApply(savePacsApply); |
| | | String result = ajaxResult.get("data").toString(); |
| | | JSONObject object = JSONUtil.parseObj(JSONUtil.parseObj(result).getStr("Response")); |
| | |
| | | log.error("失败 ->{}",errorPacsList); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | for (Object object : array) { |
| | | JSONObject jsonObject = (JSONObject) object; |
| | | updatePacsApply(jsonObject.getStr("regNo"), jsonObject.getStr("cardId"),jsonObject.getStr("name")); |
| | | } |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |