value
2024-04-19 bb9499352faae20bb2c898f3f6078f7a4e9ceef2
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -91,6 +91,9 @@
    @Resource
    private InsProductResultMapper insProductResultMapper;
    @Resource
    private InsProductUserMapper insProductUserMapper;
    @Override
    public Map<String, Object> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) {
        Map<String, Object> map = new HashMap<>();
@@ -144,7 +147,6 @@
    public void saveInsContext(Map<String, Object> insContext) {
        Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId");
        CompletableFuture.supplyAsync(() -> {
            AtomicInteger count = new AtomicInteger();
            insContext.forEach((k, v) -> {
                JSONObject jo = JSON.parseObject(JSON.toJSONString(v));
                InsProduct insProduct = new InsProduct();
@@ -168,7 +170,8 @@
                                map.put("u", insValue.get("u"));
                            }
                            iv.add(map);
                        }catch (Exception e){}
                        } catch (Exception e) {
                        }
                    }
                    result.setInsValue(JSON.toJSONString(iv));
                }
@@ -206,11 +209,17 @@
                }
                insProduct.setUpdateUser(userId);
                insProductMapper.updateById(insProduct);
                if (count.get() == 0) {
                insProductUserMapper.insert(new InsProductUser(null, userId, LocalDateTime.now(), insProduct.getId()));
                    InsSample insSample = insSampleMapper.selectById(insProductMapper.selectById(insProduct.getId()).getInsSampleId());
                    insSample.setInsState(1);
                    count.addAndGet(1);
                Long l = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery()
                        .eq(InsProduct::getInsSampleId, insSample.getId()));
                Long l1 = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery()
                        .eq(InsProduct::getInsSampleId, insSample.getId()).isNotNull(InsProduct::getInsResult));
                if (l == l1) {
                    insSample.setInsState(2);
                }
                insSampleMapper.updateById(insSample);
            });
            return null;
        }).thenAccept(res -> {
@@ -491,8 +500,8 @@
                Map<String, Object> style = new HashMap<>();
                style.put("rowlen", config.get("rowlen"));
                style.put("columnlen", config.get("columnlen"));
//                int r = -1;
                /*if (BeanUtil.isNotEmpty(cellData)) {
                /*int r = -1;
                if (BeanUtil.isNotEmpty(cellData)) {
                    for (JSONObject o : cellData) {
                        JSONObject v = JSON.parseObject(JSON.toJSONString(o.get("v")));
                        tableData.add(o);