| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | |
| | | private IdUtils idUtils; |
| | | @Autowired |
| | | private LtkjJybbzdService jybbzdService; |
| | | @Autowired |
| | | private LisJyflhbService lisJyflhbService; |
| | | |
| | | |
| | | @Override |
| | |
| | | String config = configService.selectConfigByKey("sfkqdyhis"); |
| | | if (lisApiMethod.isUseLisAndPacsRegister(order) && (null != config && config.equals("Y"))){ |
| | | AjaxResult ajaxResult = lisApiMethod.getJyFlHb(); |
| | | log.info("getJyFlHb ->{}",JSONUtil.toJsonStr(ajaxResult)); |
| | | if (ajaxResult.get("code").toString().equals("200")){ |
| | | String str = ajaxResult.get("data").toString(); |
| | | str = str.replace("=", ":"); |
| | | JSONArray array = JSONUtil.parseArray(str); |
| | | for (Object o : array) { |
| | | JSONObject object = (JSONObject) o; |
| | | LisJyflhb lisJyflhb = new LisJyflhb(); |
| | | lisJyflhb.setHbhxm(object.getStr("hbhxm")); |
| | | lisJyflhb.setFlmc(object.getStr("flmc")); |
| | | lisJyflhb.setMc(object.getStr("mc")); |
| | | lisJyflhb.setFlbm(object.getStr("flbm")); |
| | | LambdaQueryWrapper<LisJyflhb> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(LisJyflhb::getFlbm,lisJyflhb.getFlbm()); |
| | | LisJyflhb jyflhb = lisJyflhbService.getOne(wrapper); |
| | | if (jyflhb == null) { |
| | | lisJyflhb.setId(IdUtil.getSnowflake().nextId()); |
| | | lisJyflhbService.save(lisJyflhb); |
| | | }else { |
| | | lisJyflhb.setId(jyflhb.getId()); |
| | | lisJyflhbService.updateById(lisJyflhb); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } else { |
| | | // wqq.in(TbTransition::getProId, Arrays.asList(tjProIds)); |
| | | |
| | | //如果该项目存在 则 不保存 |
| | | |
| | | TjOrderDetail orderDetail = tjOrderDetailService.getTjOrderDetailByOrderId(String.valueOf(tjFlowingWater.getOrderId()), tjProId); |
| | | if(null !=orderDetail) continue; |
| | | |
| | | TjProject projects = projectService.selectTjProjectByProId(Long.valueOf(tjProId)); |
| | | if (null != projects) { |
| | | TjProject projectss = projectService.getById(projects.getProParentId()); |
| | |
| | | } |
| | | |
| | | } |
| | | List<TjOrderDetail> collect = tjOrderDetails.stream().filter(item -> { |
| | | TjProject project = projectService.getById(item.getProId()); |
| | | return project != null && project.getProParentId() == 0; |
| | | }).collect(Collectors.toList()); |
| | | addCaiYangDengJi(collect, !collect.isEmpty(), order, sysUser,jxbz); |
| | | // List<TjOrderDetail> collect = tjOrderDetails.stream().filter(item -> { |
| | | // TjProject project = projectService.getById(item.getProId()); |
| | | // return project != null && project.getProParentId() == 0; |
| | | // }).collect(Collectors.toList()); |
| | | //// addCaiYangDengJi(collect, !collect.isEmpty(), order, sysUser,jxbz); |
| | | List<TjOrderDetail> detailList = tjOrderDetailService.getCaiYangDengJi(order.getOrderId()); |
| | | addCaiYangDengJi(detailList,!detailList.isEmpty(), order, sysUser,jxbz); |
| | | |
| | | tjOrderDetails = new ArrayList<>(); |
| | | |
| | | ArrayList<TjProject> jianChaProjects = new ArrayList<>(); |
| | |
| | | } |
| | | } |
| | | } |
| | | collect = tjOrderDetails.stream().filter(item -> { |
| | | TjProject project = projectService.getById(item.getProId()); |
| | | return project != null && project.getProParentId() == 0; |
| | | }).collect(Collectors.toList()); |
| | | addCaiYangDengJi(collect, !collect.isEmpty(), order, sysUser,jxbz); |
| | | // collect = tjOrderDetails.stream().filter(item -> { |
| | | // TjProject project = projectService.getById(item.getProId()); |
| | | // return project != null && project.getProParentId() == 0; |
| | | // }).collect(Collectors.toList()); |
| | | //// addCaiYangDengJi(collect, !collect.isEmpty(), order, sysUser,jxbz); |
| | | List<TjOrderDetail> detailLists = tjOrderDetailService.getCaiYangDengJi(order.getOrderId()); |
| | | addCaiYangDengJi(detailLists,!detailLists.isEmpty(), order, sysUser,jxbz); |
| | | } |
| | | |
| | | Boolean useLisAndPacsRegister = lisApiMethod.isUseLisAndPacsRegister(order); |
| | |
| | | ltkjJianchajianyanTreeService.save(tree); |
| | | } |
| | | |
| | | // List<TjOrderDetail> detailList = tjOrderDetailService.getCaiYangDengJi(order.getOrderId()); |
| | | // addCaiYangDengJi(detailList,!detailList.isEmpty(), order, sysUser,jxbz); |
| | | |
| | | } |
| | | } |
| | | |