提价bug
This commit is contained in:
@@ -195,20 +195,30 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
if(bom==null){
|
||||
throw new BadRequestException("当前成品未查询到相关bom!");
|
||||
}
|
||||
String bom_id = bom.getString("bom_id");
|
||||
double workorder_qty = Double.valueOf(map.get("workorder_qty"));
|
||||
map.put("bom_id", bom.getString("bom_id"));
|
||||
map.put("material_ids", MaterOptTypeEnum.TJJ_AND_OTHER.getClass_idStr());
|
||||
JSONArray json = WQL.getWO("QPF_INITFORMULA01").addParamMap(map).process().getResultJSONArray(0);
|
||||
// JSONArray ja = new JSONArray();
|
||||
// for(int i=0;i<json.size();i++){
|
||||
// JSONObject jo = json.getJSONObject(i);
|
||||
// if(StrUtil.isNotEmpty(jo.getString("mater_standard_rate"))){
|
||||
// double mater_standard_rate = jo.getDouble("mater_standard_rate");
|
||||
// //需配总量
|
||||
// jo.put("need_sum_qty",workorder_qty*mater_standard_rate/100.0);
|
||||
// }
|
||||
// ja.add(jo);
|
||||
// }
|
||||
JSONArray ja = new JSONArray();
|
||||
WQLObject md_pd_productbomdtl = WQLObject.getWQLObject("md_pd_productbomdtl");
|
||||
for(int i=0;i<json.size();i++){
|
||||
JSONObject jo = json.getJSONObject(i);
|
||||
String jo_material_id = jo.getString("material_id");
|
||||
JSONObject bomdtl = md_pd_productbomdtl.query("bom_id='"+bom_id+"' and material_id='"+jo_material_id+"'").uniqueResult(0);
|
||||
if(bomdtl!=null){
|
||||
double mater_standard_rate = bomdtl.getDouble("standard_rate");
|
||||
//需配总量
|
||||
jo.put("need_sum_qty",workorder_qty*mater_standard_rate/100.0);
|
||||
jo.put("mater_standard_rate",mater_standard_rate);
|
||||
}else{
|
||||
//需配总量
|
||||
jo.put("need_sum_qty","0");
|
||||
//需配总量
|
||||
jo.put("mater_standard_rate","0");
|
||||
}
|
||||
ja.add(jo);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<el-form-item label="产品" prop="material_code">
|
||||
<label slot="label">产品:</label>
|
||||
<el-input v-model="form.material_code" style="width: 210px" disabled class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater" v-show="crud.status.add === 1" />
|
||||
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="系列" prop="product_series_id">
|
||||
@@ -73,7 +73,7 @@
|
||||
<el-form-item label="生产批次" prop="pcsn">
|
||||
<label slot="label">生产批次:</label>
|
||||
<el-input v-model="form.pcsn" style="width: 210px" disabled class="input-with-select">
|
||||
<el-button slot="append" @click="createPcsn" v-show="crud.status.add === 1" >生成</el-button>
|
||||
<el-button slot="append" @click="createPcsn">生成</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="workorder_qty">
|
||||
|
||||
Reference in New Issue
Block a user