优化
This commit is contained in:
@@ -229,6 +229,7 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
if("1".equals(jo.getString("is_need_manage"))){
|
||||
billpure_qty = billpure_qty+jo.getDouble("formula_qty");
|
||||
}
|
||||
bill_qty = bill_qty+jo.getDouble("formula_qty");
|
||||
JSONObject md_jo = md_me_materialbase.query("is_delete='0' and material_id='"+jo.getString("material_id")+"'").uniqueResult(0);
|
||||
if(md_jo!=null){
|
||||
//是否软废
|
||||
@@ -319,18 +320,6 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
Formula.put("total_qty",Formula.getDouble("masterbucket_qty")+Formula.getDouble("extadd_qty"));
|
||||
PDM_BI_Formula.update(Formula);
|
||||
|
||||
JSONArray Formulas = PDM_BI_Formula.query("is_delete='0' and workorder_id='"+workorder_id+"'").getResultJSONArray(0);
|
||||
for(int i = 0;i<Formulas.size();i++){
|
||||
JSONObject jo = Formulas.getJSONObject(i);
|
||||
JSONArray dtls = PDM_BI_FormulaDtl.query("formula_id='"+jo.getString("formula_id")+"'").getResultJSONArray(0);
|
||||
for(int j = 0;j<dtls.size();j++){
|
||||
JSONObject dtl = dtls.getJSONObject(j);
|
||||
if("1".equals(dtl.getString("is_need_manage"))){
|
||||
billpure_qty = billpure_qty + dtl.getDouble("formula_qty");
|
||||
}
|
||||
bill_qty = bill_qty+dtl.getDouble("formula_qty");
|
||||
}
|
||||
}
|
||||
//更新工令、工序
|
||||
order.put("billpure_qty",billpure_qty);
|
||||
order.put("bill_qty",bill_qty);
|
||||
|
||||
Reference in New Issue
Block a user