| | |
| | | * 投诉 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 芯导软件(江苏)有限公司 |
| | | * @author |
| | | * @since 2024-11-02 09:29:11 |
| | | */ |
| | | @Service |
| | |
| | | |
| | | @Override |
| | | public int addProcessComplain(ProcessComplain processComplain) { |
| | | //判断报告编号和样品编号是否存在 |
| | | InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().eq(InsReport::getCode, processComplain.getCode())); |
| | | if (ObjectUtils.isEmpty(insReport)) throw new ErrorException("报告编号输入有误"); |
| | | processComplain.setInsReportId(insReport.getId()); |
| | | InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getSampleCode, processComplain.getSampleCode())); |
| | | if (ObjectUtils.isEmpty(insSample)) throw new ErrorException("样品编号输入有误"); |
| | | //投诉编号生成 |
| | | String giveCode = this.giveCode.giveCode("JCZX-", "cnas_process_complain", "", "yyMMdd"); |
| | | processComplain.setComplainNo(giveCode); |