| | |
| | | wrapper.eq(TjSampling::getParentId, sampling.getId()); |
| | | List<TjSampling> list = tjSamplingService.list(wrapper); |
| | | for (TjSampling tjSampling : list) { |
| | | tjSampling.setIsSignFor("1"); |
| | | } |
| | | updChild = tjSamplingService.updateBatchById(list); |
| | | } else { |
| | | updChild = true; |
| | | } |
| | | if (!tjSamplingService.updateById(sampling) && !updChild) { |
| | | // lisApiMethod.cancel(sampling.getJyxh(), tjOrder.getCardId(), PinyinUtil.getFirstLetter(tjCustomer.getCusName(), "")); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("操作失败请重试"); |
| | | } |
| | | } else { |
| | | return AjaxResult.error("操作失败请重试"); |
| | | } |
| | | } |
| | | if (StrUtil.isNotBlank(errorMsg)) return AjaxResult.error(errorMsg); |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | | |
| | | /** |
| | | * 采样管理 确认采码按钮调用 |
| | | * @param ids |
| | | * @param config |
| | | * @param mergeRequest |
| | | * @return |
| | | */ |
| | | public AjaxResult confirmApi(List<String> ids,String config,String mergeRequest) { |
| | | |
| | | |
| | | |
| | | // sfkqdshitulianjie |
| | | if (null == ids || ids.isEmpty()) { |
| | | return AjaxResult.error("请选择要确认项"); |
| | | } |
| | | List<TjSampling> tjSamplings = tjSamplingService.listByIds(ids); |
| | | if (tjSamplings.isEmpty()) |
| | | return AjaxResult.error("请选择要确认项"); |
| | | String errorMsg = ""; |
| | | for (TjSampling sampling : tjSamplings) { |
| | | if (!sysConfigService.selectConfigByKey("sfkqdshitulianjie").toLowerCase().equals("y")) { |
| | | if (sampling.getJyxmdm() == null) |
| | | errorMsg+=sampling.getProName()+"在lis系统未找到对应编码无法发出申请"; |
| | | } |
| | | sampling.setIsSignFor("0"); |
| | | |
| | | |
| | | |
| | | |
| | | // LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | // wq.eq(TjProject::getProParentId, sampling.getProId()); |
| | | // List<TjProject> projectList = projectService.list(wq); |
| | | // List<String> collect = new ArrayList<>(); |
| | | // for (TjProject project : projectList) { |
| | | // Long proId = project.getProId(); |
| | | // collect.add(String.valueOf(proId)); |
| | | // } |
| | | // LambdaQueryWrapper<TjSampling> wq1 = new LambdaQueryWrapper<>(); |
| | | // wq1.eq(TjSampling::getTjNum, sampling.getTjNum()); |
| | | // wq1.in(TjSampling::getProId, collect); |
| | | // List<TjSampling> samplingList = tjSamplingService.list(wq1); |
| | | // if (null != samplingList && samplingList.size() > 0) { |
| | | // for (TjSampling tjSampling : samplingList) { |
| | | // tjSampling.setIsSignFor("0"); |
| | | // tjSamplingService.updateById(tjSampling); |
| | | // } |
| | | // } |
| | | TjOrder tjOrder = orderService.getOrderByTjNum(sampling.getTjNum()); |
| | | if(null==tjOrder) return AjaxResult.error("体检记录不存在"); |
| | | TjCustomer tjCustomer = customerService.getById(tjOrder.getUserId()); |
| | | boolean updChild; |
| | | Boolean save; |
| | | // String is_request_common_his_api = sysConfigService.selectConfigByKey("is_request_common_his_api"); |
| | | // if (null != config && config.equals("Y") && !mergeRequest.equals("Y")) { |
| | | // save = lisApiMethod.save(sampling, tjOrder, tjCustomer); |
| | | // } else if (is_request_common_his_api.equals("Y")){ |
| | | //// String apiUrl = sysConfigService.selectConfigByKey("common_api_url"); |
| | | //// String hospbm = sysConfigService.selectConfigByKey("common_api_service_hospbm"); |
| | | //// save = sendLis(sampling,tjOrder,apiUrl,hospbm); |
| | | // save = true; |
| | | // }else { |
| | | // save = true; |
| | | // } |
| | | save = true; |
| | | if (save) { |
| | | if (sampling.getIsMerge() == 1) { |
| | | LambdaQueryWrapper<TjSampling> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjSampling::getParentId, sampling.getId()); |
| | | List<TjSampling> list = tjSamplingService.list(wrapper); |
| | | for (TjSampling tjSampling : list) { |
| | | tjSampling.setIsSignFor("0"); |
| | | } |
| | | updChild = tjSamplingService.updateBatchById(list); |
| | |
| | | entries.putOpt("sfxmid",project.getProId()); |
| | | entries.putOpt("sfxmname",project.getProName()); |
| | | |
| | | // 取tb表 |
| | | QueryWrapper<TbTransition> wrapper = new QueryWrapper<>(); |
| | | wrapper |
| | | .select("sum(now_price) as now_price") |