liding
6 天以前 3728fa293e1faf4bf4f9bf41105b84ddb43dc82e
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
@@ -302,6 +302,9 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int addInsOrder(List<SampleProductDto> list, InsOrder insOrder) {
        if (insOrder == null || insOrder.getSampleDate() == null) {
            throw new ErrorException("送样日期不能为空");
        }
        // todo: 下单判断抽样计划的唯一性
        if (insOrder.getQuarterItemId() != null) {
            Long quarterItemCount = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery()
@@ -846,6 +849,7 @@
            snapshot.setTemplateId(template.getId());
            snapshot.setName(template.getName());
            snapshot.setNumber(template.getNumber());
            snapshot.setStandardRequirement(template.getStandardRequirement());
            snapshot.setRemark(template.getRemark());
            snapshot.setThing(template.getThing());
            snapshot.setSort(selection.getSort());
@@ -1091,6 +1095,7 @@
                                .select(InsOrderStandardTemplate::getTemplateId,
                                        InsOrderStandardTemplate::getTemperature,
                                        InsOrderStandardTemplate::getDetectionTime,
                                        InsOrderStandardTemplate::getDetectionEndTime,
                                        InsOrderStandardTemplate::getDetectionPlace,
                                        InsOrderStandardTemplate::getInsResult)
                                .orderByAsc(InsOrderStandardTemplate::getSort,
@@ -1100,6 +1105,8 @@
                    condition.setTemplateId(snapshot.getTemplateId());
                    condition.setTemperature(snapshot.getTemperature());
                    condition.setDetectionTime(snapshot.getDetectionTime());
                    condition.setDetectionEndTime(snapshot.getDetectionEndTime() == null
                            ? snapshot.getDetectionTime() : snapshot.getDetectionEndTime());
                    condition.setDetectionPlace(snapshot.getDetectionPlace());
                    condition.setInsResult(snapshot.getInsResult());
                    condition.setDeviceIds(templateDeviceIds.getOrDefault(
@@ -1799,7 +1806,7 @@
                List<String> unqualifiedList = insProductMapper.selectUnqualifiedList(orderDto.getId());
                orderDto.setUnqualifiedItem(CollUtil.join(unqualifiedList, ","));
            }
            orderDto.setCreateTimeString(orderDto.getCreateTime() == null ? "" : orderDto.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
            orderDto.setSampleDateString(orderDto.getSampleDate() == null ? "" : orderDto.getSampleDate().toString());
        }