guoyuji
2024-05-23 ef5a518c3e2c1fe41aa60f56ca31ddafa0cb1561
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
@@ -26,10 +26,10 @@
    //未排产查询
    public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) {
        Map<String, Object> map = new HashMap<>();
        if(orderId.equals("null")){
        if("null".equals(orderId)){
            orderId="";
        }
        if (processes.equals("null")){
        if ("null".equals(processes)){
            processes="";
        }
@@ -47,9 +47,16 @@
    //首次查询排产数据
    public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,ProductionScheduling productionScheduling ) {
    public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,String processes,String orderId,ProductionScheduling productionScheduling ) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", productionSchedulingMapper.selectLastSchedulingMp(selectTime1, selectTime2, productionScheduling));
        if("null".equals(orderId)){
            orderId="";
        }
        if ("null".equals(processes)){
            processes="";
        }
        map.put("data", productionSchedulingMapper.selectLastSchedulingMp(selectTime1, selectTime2,processes,orderId, productionScheduling));
        map.put("process", productionSchedulingMapper.selectProcess());
        return map;
    }
@@ -84,10 +91,10 @@
        if (!schedulinglist.isEmpty()) {
            for (ProductionScheduling productionScheduling : schedulinglist) {
                //查询已排产工序数量
              Integer num =  productionSchedulingMapper.selectNumberMp(productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes);
             // Integer num =  productionSchedulingMapper.selectNumberMp(productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes);
               productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes());
               // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
             productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),productionScheduling.getTechnologyNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes());
                //System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getTechnologyNumber());
            }
            return true;
        }