//package com.sw.mes;
//
//import com.alibaba.fastjson.JSON;
//import com.sw.mes.core.utils.NumberUtil;
//import com.sw.mes.gread.entity.GradeRule;
//import com.sw.mes.gread.service.GradeRuleService;
//import com.sw.mes.grade.service.GradeService;
//import com.sw.mes.grade.service.RuleTestService;
//import com.sw.mes.utils.StringUtils;
//
//
//import com.sw.mes.inspect.service.YbInspectDataService;
//import com.sw.mes.yb.plan.service.ProductionOrderService;
//import com.sw.mes.yb.scheduled.BlanConfigScheduling;
//import com.sw.mes.yb.turnstore.entity.TurnstoreTrayItem;
//import com.sw.mes.yb.turnstore.service.TurnstoreTrayItemService;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//import org.junit.Test;
//
//import java.math.BigDecimal;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = MesPcServerApplication.class)
//public class GradeTest {
//    @Autowired
//    private YbInspectDataService inspectDataBaseService;
//    @Autowired
//    private TurnstoreTrayItemService turnstoreTrayItemService;
//    @Autowired
//    private ProductionOrderService productionOrderService;
//
//    @Test
//    public void a() throws InterruptedException {
//        List<TurnstoreTrayItem> turnstoreTrayItems = turnstoreTrayItemService.getData();
//        int i = 0;
//        for (TurnstoreTrayItem turnstoreTrayItem : turnstoreTrayItems) {
//            String orderNo = productionOrderService.matchOrder(turnstoreTrayItem.getSectionNo(), turnstoreTrayItem.getPlanMaterialCode(),
//                    turnstoreTrayItem.getPlanOrderType(), turnstoreTrayItem.getOrderType(), turnstoreTrayItem.getPlanOrderNo(),
//                    turnstoreTrayItem.getCheckoutName(), turnstoreTrayItem.getOperationTime());
//            turnstoreTrayItemService.updateOrderNoById(turnstoreTrayItem.getId(), orderNo);
//            inspectDataBaseService.updateOrderNoBySectionNo(turnstoreTrayItem.getSectionNo(), orderNo);
//            System.out.println(++i + "：" + turnstoreTrayItem.getSectionNo() + "/" + orderNo);
//        }
//    }
//}
//
