修正值
This commit is contained in:
@@ -312,6 +312,10 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
}
|
||||
});
|
||||
}else if(StrUtil.isNotEmpty(material_type_id) && MaterOptTypeEnum.THW.getClass_idStr().contains(material_type_id)){//碳化钨新料
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(jo.getString("material_id"),jo.getString("pcsn"));
|
||||
jo.put("change_qty",change_qty);
|
||||
|
||||
//获取碳含量
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",jo.getString("material_id"))
|
||||
@@ -618,6 +622,11 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
double bom_ivt_qty = bomdlt_Cr3C2.getDouble("bom_ivt_qty");
|
||||
//含碳比
|
||||
double value = FactoryWarranty.getDouble("value");
|
||||
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(bomdlt_Cr3C2.getString("material_id"),bomdlt_Cr3C2.getString("pcsn"));
|
||||
value = value + change_qty;
|
||||
|
||||
//总碳
|
||||
CT1 = CT1 + bom_ivt_qty*value/100.0;
|
||||
|
||||
@@ -1685,6 +1694,10 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
double bom_ivt_qty = bomdlt_Cr3C2.getDouble("bom_ivt_qty");
|
||||
//含碳比
|
||||
double is_tan = FactoryWarranty.getDouble("value");
|
||||
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(bomdlt_Cr3C2.getString("material_id"),bomdlt_Cr3C2.getString("pcsn"));
|
||||
is_tan = is_tan + change_qty;
|
||||
//总碳
|
||||
CT1 = CT1 + bom_ivt_qty*is_tan/100.0;
|
||||
//总碳化钨
|
||||
@@ -2750,6 +2763,10 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
}
|
||||
});
|
||||
}else if(StrUtil.isNotEmpty(material_type_id) && MaterOptTypeEnum.THW.getClass_idStr().contains(material_type_id)){//碳化钨新料
|
||||
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(jo.getString("material_id"),jo.getString("pcsn"));
|
||||
jo.put("change_qty",change_qty);
|
||||
//获取碳含量
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",jo.getString("material_id"))
|
||||
@@ -3170,6 +3187,10 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
double bom_ivt_qty = bomdlt_Cr3C2.getDouble("bom_ivt_qty");
|
||||
//含碳比
|
||||
double is_tan = FactoryWarranty.getDouble("value");
|
||||
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(bomdlt_Cr3C2.getString("material_id"),bomdlt_Cr3C2.getString("pcsn"));
|
||||
is_tan = is_tan + change_qty;
|
||||
//总碳
|
||||
CT1 = CT1 + bom_ivt_qty*is_tan/100.0;
|
||||
//更新含碳比
|
||||
@@ -4134,4 +4155,26 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public double getWCChange(String material_id,String pcsn){
|
||||
WQLObject PDM_BI_SuppWCChange = WQLObject.getWQLObject("PDM_BI_SuppWCChange"); // 工艺路线主表
|
||||
double wcchange = 0.0;
|
||||
|
||||
//获取碳化钒
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_INITFORMULA01")
|
||||
.addParam("material_id",material_id)
|
||||
.addParam("pcsn",pcsn)
|
||||
.addParam("flag","9")
|
||||
.process()
|
||||
.uniqueResult(0);
|
||||
if(FactoryWarranty!=null){
|
||||
String source_id = FactoryWarranty.getString("source_id");
|
||||
JSONObject jo = PDM_BI_SuppWCChange.query("material_id='"+material_id+"' and supp_id='"+source_id+"'").uniqueResult(0);
|
||||
if(jo!=null){
|
||||
wcchange = jo.getDouble("change_qty");
|
||||
}
|
||||
}
|
||||
|
||||
return wcchange;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,6 +400,10 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
}
|
||||
});
|
||||
}else if(StrUtil.isNotEmpty(material_type_id) && MaterOptTypeEnum.THW.getClass_idStr().contains(material_type_id)){//碳化钨新料
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(jo.getString("material_id"),jo.getString("pcsn"));
|
||||
jo.put("change_qty",change_qty);
|
||||
|
||||
//获取碳含量
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",jo.getString("material_id"))
|
||||
@@ -521,6 +525,9 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
}
|
||||
});
|
||||
}else if(StrUtil.isNotEmpty(material_type_id) && MaterOptTypeEnum.THW.getClass_idStr().contains(material_type_id)){//碳化钨新料
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(jo.getString("material_id"),jo.getString("pcsn"));
|
||||
jo.put("change_qty",change_qty);
|
||||
//获取碳含量
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",jo.getString("material_id"))
|
||||
@@ -1045,4 +1052,26 @@ public class FormulaServiceImpl implements FormulaService {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public double getWCChange(String material_id,String pcsn){
|
||||
WQLObject PDM_BI_SuppWCChange = WQLObject.getWQLObject("PDM_BI_SuppWCChange"); // 工艺路线主表
|
||||
double wcchange = 0.0;
|
||||
|
||||
//获取碳化钒
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_INITFORMULA01")
|
||||
.addParam("material_id",material_id)
|
||||
.addParam("pcsn",pcsn)
|
||||
.addParam("flag","9")
|
||||
.process()
|
||||
.uniqueResult(0);
|
||||
if(FactoryWarranty!=null){
|
||||
String source_id = FactoryWarranty.getString("source_id");
|
||||
JSONObject jo = PDM_BI_SuppWCChange.query("material_id='"+material_id+"' and supp_id='"+source_id+"'").uniqueResult(0);
|
||||
if(jo!=null){
|
||||
wcchange = jo.getDouble("change_qty");
|
||||
}
|
||||
}
|
||||
|
||||
return wcchange;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,9 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
String material_type_id = jo.getString("material_type_id");
|
||||
//如果该物料是碳化钨
|
||||
if(MaterOptTypeEnum.THW.getClass_idStr().contains(material_type_id)){
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(jo.getString("material_id"),jo.getString("pcsn"));
|
||||
jo.put("change_qty",change_qty);
|
||||
//获取碳含量
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",jo.getString("material_id"))
|
||||
@@ -953,6 +956,10 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
}
|
||||
});
|
||||
}else if(StrUtil.isNotEmpty(material_type_id) && MaterOptTypeEnum.THW.getClass_idStr().contains(material_type_id)){//碳化钨新料
|
||||
|
||||
//获取修正值
|
||||
double change_qty = this.getWCChange(jo.getString("material_id"),jo.getString("pcsn"));
|
||||
jo.put("change_qty",change_qty);
|
||||
//获取碳含量
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",jo.getString("material_id"))
|
||||
@@ -1171,4 +1178,27 @@ public class InitformulaServiceImpl implements InitformulaService {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
public double getWCChange(String material_id,String pcsn){
|
||||
WQLObject PDM_BI_SuppWCChange = WQLObject.getWQLObject("PDM_BI_SuppWCChange"); // 工艺路线主表
|
||||
double wcchange = 0.0;
|
||||
|
||||
//获取碳化钒
|
||||
JSONObject FactoryWarranty = WQL.getWO("QPF_INITFORMULA01")
|
||||
.addParam("material_id",material_id)
|
||||
.addParam("pcsn",pcsn)
|
||||
.addParam("flag","9")
|
||||
.process()
|
||||
.uniqueResult(0);
|
||||
if(FactoryWarranty!=null){
|
||||
String source_id = FactoryWarranty.getString("source_id");
|
||||
JSONObject jo = PDM_BI_SuppWCChange.query("material_id='"+material_id+"' and supp_id='"+source_id+"'").uniqueResult(0);
|
||||
if(jo!=null){
|
||||
wcchange = jo.getDouble("change_qty");
|
||||
}
|
||||
}
|
||||
|
||||
return wcchange;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -566,5 +566,28 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "9"
|
||||
QUERY
|
||||
SELECT
|
||||
ReceiveMst.receive_id,
|
||||
ReceiveMst.source_id,
|
||||
ReceiveDtl.receivedtl_id,
|
||||
ReceiveDtl.material_id,
|
||||
ReceiveDtl.pcsn
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl ReceiveDtl
|
||||
LEFT JOIN PCS_RC_ReceiveMst ReceiveMst ON ReceiveMst.receive_id = ReceiveDtl.receive_id
|
||||
WHERE
|
||||
1 = 1 and ReceiveMst.is_delete='0' and ReceiveMst.source_type='01'
|
||||
OPTION 输入.material_id <> ""
|
||||
ReceiveDtl.material_id = 输入.material_id
|
||||
ENDOPTION
|
||||
OPTION 输入.pcsn <> ""
|
||||
ReceiveDtl.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -309,6 +309,7 @@
|
||||
<el-table-column prop="is_need_move" label="是否移库" align="center" width="70px" :formatter="is_need_moveFormat" />
|
||||
<el-table-column prop="is_add" label="是否补料" align="center" width="70px" :formatter="is_addFormat" />
|
||||
<el-table-column prop="is_tan" label="碳%" align="center" width="80px" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_09030102" label="钴%" align="center" width="80px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
@@ -821,7 +822,7 @@ export default {
|
||||
}
|
||||
if (!this.flagnow) {
|
||||
const row = { edit: false, status:'10', is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '' }
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -833,6 +834,7 @@ export default {
|
||||
row.ivt_level = item.ivt_level
|
||||
row.is_active = item.is_active
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
@@ -852,7 +854,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
const row = { edit: false, status:'10', is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '' }
|
||||
material_name: '', pcsn: '', quality_scode: '',need_sum_qty:'0', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_add: '1', is_tan: '', is_09030102: '', qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -863,6 +865,7 @@ export default {
|
||||
row.material_code = item.material_code
|
||||
row.ivt_level = item.ivt_level
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="100px" :formatter="is_need_manageFormat" />
|
||||
<el-table-column prop="is_need_move" label="是否需移库" align="center" width="100px" :formatter="is_need_moveFormat" />
|
||||
<el-table-column prop="is_tan" label="碳%" align="center" width="100px" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="100px" :formatter="is_need_manageFormat" />
|
||||
<el-table-column prop="is_need_move" label="是否需移库" align="center" width="100px" :formatter="is_need_moveFormat" />
|
||||
<el-table-column prop="is_tan" label="碳%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="change_qty" label="修正值%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_09030102" label="钴%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00021" label="碳化铬%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
<el-table-column prop="is_CJZB00020" label="碳化钒%" align="center" width="100px" :formatter="crud.formatQlNum4"/>
|
||||
@@ -963,7 +964,7 @@ export default {
|
||||
const row = { edit: false,is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
|
||||
material_name: '', pcsn: '', quality_scode: '', ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '',
|
||||
is_CXJ001: '', is_CXJ003: '',need_sum_qty:'0', is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
qty_unit_id: '', qty_unit_name: '' }
|
||||
qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -978,6 +979,7 @@ export default {
|
||||
row.qty_unit_id = item.qty_unit_id
|
||||
row.qty_unit_name = item.qty_unit_name
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
@@ -995,7 +997,7 @@ export default {
|
||||
const row = { edit: false, is_rf_xl: '1', bucket_type: '01', material_type: '01', material_id: '', material_code: '',
|
||||
material_name: '', pcsn: '', quality_scode: '', need_sum_qty:'0',ivt_level: '', is_active: '', formula_qty: '0', sum_ivt_qty: '', is_need_move: '', is_need_manage: '1', is_tan: '', is_09030102: '', is_CXJ001: '',
|
||||
is_CXJ003: '',is_CXJ004: '',is_CXJ005: '',is_CXJ006: '',is_CXJ007: '',is_CXJ008: '',is_CXJ002: '',is_CJZB00021: '',is_CJZB00020: '',
|
||||
qty_unit_id: '', qty_unit_name: '' }
|
||||
qty_unit_id: '', qty_unit_name: '',change_qty:'0' }
|
||||
row.material_id = item.material_id
|
||||
row.quality_scode = item.quality_scode
|
||||
row.pcsn = item.pcsn
|
||||
@@ -1010,6 +1012,7 @@ export default {
|
||||
row.qty_unit_id = item.qty_unit_id
|
||||
row.qty_unit_name = item.qty_unit_name
|
||||
row.is_tan = item.is_tan
|
||||
row.change_qty = item.change_qty
|
||||
row.is_09030102 = item.is_09030102
|
||||
row.is_CXJ001 = item.is_CXJ001
|
||||
row.is_CXJ003 = item.is_CXJ003
|
||||
|
||||
Reference in New Issue
Block a user