chenlu
2025-02-26 e9e776e4ad2f191496defcca1a0250b2c49c9f4f
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -1061,8 +1061,8 @@
        Float shelfThickness =  Float.parseFloat(object.get("shelfThickness").toString())*1000;
        Float spacerThickness =  Float.parseFloat(object.get("spacerThickness").toString());
        */
        Integer inMaxQuantity = 30;
        Float inWeight = 50.0f;
        Integer inMaxQuantity = 1;
        Float inWeight = 100.0f;
        Float shelfThickness = 2000.0f;
        /*垫片厚度*/
        Float spacerThickness = 0.0f;
@@ -1102,7 +1102,6 @@
                    if (orderDetail1.getFlowCardId().equals(FlowCardId)) {
                        flowCardWeight += orderDetail1.getHeight()*orderDetail1.getQuantity()* orderDetail1.getWidth()* glassThickness* 2.5 / 1000000;
                    }
                }
                if(flowCardWeight>0){
                    //System.out.println(inWeight+","+flowCardWeight);
@@ -1164,6 +1163,25 @@
    }
    public Boolean revokeComposingSv(Map<String, Object> object) {
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("composing")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            for (FlowCard flowCard : flowCardList) {
                //获取没有工程号的条数,已生成工程号不能撤回
              Integer count =  flowCardMapper.selectProjectNo(flowCard.getProcessId());
              if (count == 0){
                  flowCardMapper.revokeComposing(flowCard.getProcessId());
              } else {
                  return false;
              }
            }
            return true;
        } else {
            return false;
        }
    }
}