Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
@@ -645,6 +645,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
yzj_map.put(tjj_material_id,tjj_map_jo);
|
yzj_map.put(tjj_material_id,tjj_map_jo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
yzj_map.forEach((key,tjj_map_now)->{
|
yzj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -663,7 +665,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类id
|
||||||
|
W_weight.put("material_id","1503644362234531840");
|
||||||
|
W_weight.put("material_name","钨粉");
|
||||||
|
W_weight.put("material_code","09030103");
|
||||||
|
W_weight.put("material_type","02");
|
||||||
|
W_weight.put("is_need_move","0");
|
||||||
|
W_weight.put("is_need_manage","1");
|
||||||
|
W_weight.put("is_rf_xl","0");
|
||||||
|
W_weight.put("ivt_level","01");
|
||||||
|
W_weight.put("is_active","1");
|
||||||
|
W_weight.put("quality_scode","01");
|
||||||
|
cw_list.add(W_weight);
|
||||||
|
}
|
||||||
}else{//大于等于2条库粗你明细时
|
}else{//大于等于2条库粗你明细时
|
||||||
//最后一个为X22p
|
//最后一个为X22p
|
||||||
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
||||||
@@ -751,6 +771,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
yzj_map.forEach((key,tjj_map_now)->{
|
yzj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -769,7 +791,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类id
|
||||||
|
W_weight.put("material_id","1503644362234531840");
|
||||||
|
W_weight.put("material_name","钨粉");
|
||||||
|
W_weight.put("material_code","09030103");
|
||||||
|
W_weight.put("material_type","02");
|
||||||
|
W_weight.put("is_need_move","0");
|
||||||
|
W_weight.put("is_need_manage","1");
|
||||||
|
W_weight.put("is_rf_xl","0");
|
||||||
|
W_weight.put("ivt_level","01");
|
||||||
|
W_weight.put("is_active","1");
|
||||||
|
W_weight.put("quality_scode","01");
|
||||||
|
cw_list.add(W_weight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -843,6 +883,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
yzj_map.forEach((key,tjj_map_now)->{
|
yzj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -861,7 +903,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类id
|
||||||
|
W_weight.put("material_id","1503644362234531840");
|
||||||
|
W_weight.put("material_name","钨粉");
|
||||||
|
W_weight.put("material_code","09030103");
|
||||||
|
W_weight.put("material_type","02");
|
||||||
|
W_weight.put("is_need_move","0");
|
||||||
|
W_weight.put("is_need_manage","1");
|
||||||
|
W_weight.put("is_rf_xl","0");
|
||||||
|
W_weight.put("ivt_level","01");
|
||||||
|
W_weight.put("is_active","1");
|
||||||
|
W_weight.put("quality_scode","01");
|
||||||
|
cw_list.add(W_weight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1537,6 +1597,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map.put(tjj_material_id,tjj_map_jo);
|
tjj_map.put(tjj_material_id,tjj_map_jo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
tjj_map.forEach((key,tjj_map_now)->{
|
tjj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -1554,8 +1616,26 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("is_active","1");
|
tjj_map_now.put("is_active","1");
|
||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类id
|
||||||
|
W_weight.put("material_id","1503644362234531840");
|
||||||
|
W_weight.put("material_name","钨粉");
|
||||||
|
W_weight.put("material_code","09030103");
|
||||||
|
W_weight.put("material_type","02");
|
||||||
|
W_weight.put("is_need_move","0");
|
||||||
|
W_weight.put("is_need_manage","1");
|
||||||
|
W_weight.put("is_rf_xl","0");
|
||||||
|
W_weight.put("ivt_level","01");
|
||||||
|
W_weight.put("is_active","1");
|
||||||
|
W_weight.put("quality_scode","01");
|
||||||
|
cw_list.add(W_weight);
|
||||||
|
}
|
||||||
}else{//大于等于2条库粗你明细时
|
}else{//大于等于2条库粗你明细时
|
||||||
//最后一个为X22p
|
//最后一个为X22p
|
||||||
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
JSONObject bomdlt_Cr3C2_X22p = bomdlts_Cr3C2.getJSONObject(bomdlts_Cr3C2.size()-1);
|
||||||
@@ -1641,6 +1721,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
tjj_map.forEach((key,tjj_map_now)->{
|
tjj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -1659,7 +1741,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类id
|
||||||
|
W_weight.put("material_id","1503644362234531840");
|
||||||
|
W_weight.put("material_name","钨粉");
|
||||||
|
W_weight.put("material_code","09030103");
|
||||||
|
W_weight.put("material_type","02");
|
||||||
|
W_weight.put("is_need_move","0");
|
||||||
|
W_weight.put("is_need_manage","1");
|
||||||
|
W_weight.put("is_rf_xl","0");
|
||||||
|
W_weight.put("ivt_level","01");
|
||||||
|
W_weight.put("is_active","1");
|
||||||
|
W_weight.put("quality_scode","01");
|
||||||
|
cw_list.add(W_weight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1729,6 +1829,8 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
JSONObject W_weight = new JSONObject();
|
||||||
|
AtomicReference<Double> W = new AtomicReference<>(0.0);
|
||||||
//判断已含添加剂与需配添加剂大小
|
//判断已含添加剂与需配添加剂大小
|
||||||
tjj_map.forEach((key,tjj_map_now)->{
|
tjj_map.forEach((key,tjj_map_now)->{
|
||||||
//需配添加剂重量
|
//需配添加剂重量
|
||||||
@@ -1747,7 +1849,25 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
tjj_map_now.put("quality_scode","01");
|
tjj_map_now.put("quality_scode","01");
|
||||||
yzj_list.add(tjj_map_now);
|
yzj_list.add(tjj_map_now);
|
||||||
}
|
}
|
||||||
|
if(finished_qty>0){
|
||||||
|
W.set(W.get() + finished_qty);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if(W.get() > 0){
|
||||||
|
W_weight.put("formula_qty",W.get());
|
||||||
|
//钨分类id
|
||||||
|
W_weight.put("material_id","1503644362234531840");
|
||||||
|
W_weight.put("material_name","钨粉");
|
||||||
|
W_weight.put("material_code","09030103");
|
||||||
|
W_weight.put("material_type","02");
|
||||||
|
W_weight.put("is_need_move","0");
|
||||||
|
W_weight.put("is_need_manage","1");
|
||||||
|
W_weight.put("is_rf_xl","0");
|
||||||
|
W_weight.put("ivt_level","01");
|
||||||
|
W_weight.put("is_active","1");
|
||||||
|
W_weight.put("quality_scode","01");
|
||||||
|
cw_list.add(W_weight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ public class AutoCreateRepair {
|
|||||||
JSONObject json = fileArr.getJSONObject(i);
|
JSONObject json = fileArr.getJSONObject(i);
|
||||||
String devicerecord_id = json.getString("devicerecord_id");
|
String devicerecord_id = json.getString("devicerecord_id");
|
||||||
|
|
||||||
JSONObject jsonPlanMst = planMstTab.query("devicerecord_id = '" + devicerecord_id + "' and is_active = '1'").uniqueResult(0);
|
JSONArray jsonPlanMstArr = planMstTab.query("devicerecord_id = '" + devicerecord_id + "' and is_active = '1'").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonPlanMst)) {
|
if (ObjectUtil.isNotEmpty(jsonPlanMstArr)) {
|
||||||
|
for (int j = 0; j < jsonPlanMstArr.size(); j++) {
|
||||||
|
JSONObject jsonPlanMst = jsonPlanMstArr.getJSONObject(j);
|
||||||
// 2.1 判断维修计划表中:实际开始时间、实际结束时间 为空
|
// 2.1 判断维修计划表中:实际开始时间、实际结束时间 为空
|
||||||
String real_start_date = jsonPlanMst.getString("real_start_date");
|
String real_start_date = jsonPlanMst.getString("real_start_date");
|
||||||
String real_end_date = jsonPlanMst.getString("real_end_date");
|
String real_end_date = jsonPlanMst.getString("real_end_date");
|
||||||
@@ -128,6 +130,7 @@ public class AutoCreateRepair {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ public class AutoCreateUpkeep {
|
|||||||
JSONObject json = fileArr.getJSONObject(i);
|
JSONObject json = fileArr.getJSONObject(i);
|
||||||
String devicerecord_id = json.getString("devicerecord_id");
|
String devicerecord_id = json.getString("devicerecord_id");
|
||||||
|
|
||||||
JSONObject jsonPlanMst = planMstTab.query("devicerecord_id = '" + devicerecord_id + "' and is_active = '1'").uniqueResult(0);
|
JSONArray jsonPlanMstArr = planMstTab.query("devicerecord_id = '" + devicerecord_id + "' and is_active = '1'").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonPlanMst)) {
|
if (ObjectUtil.isNotEmpty(jsonPlanMstArr)) {
|
||||||
|
for (int j = 0; j < jsonPlanMstArr.size(); j++) {
|
||||||
|
JSONObject jsonPlanMst = jsonPlanMstArr.getJSONObject(j);
|
||||||
// 2.1 判断保养计划表中:实际开始时间、实际结束时间 为空
|
// 2.1 判断保养计划表中:实际开始时间、实际结束时间 为空
|
||||||
String real_start_date = jsonPlanMst.getString("real_start_date");
|
String real_start_date = jsonPlanMst.getString("real_start_date");
|
||||||
String real_end_date = jsonPlanMst.getString("real_end_date");
|
String real_end_date = jsonPlanMst.getString("real_end_date");
|
||||||
@@ -118,6 +120,7 @@ public class AutoCreateUpkeep {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建保养单共用方法
|
* 创建保养单共用方法
|
||||||
|
|||||||
@@ -724,9 +724,11 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryBom(Map whereJson, Pageable page) {
|
public Map<String, Object> queryBom(Map whereJson, Pageable page) {
|
||||||
String material_code = MapUtil.getStr(whereJson, "material_code");
|
String material_code = MapUtil.getStr(whereJson, "material_code");
|
||||||
|
String material_id = MapUtil.getStr(whereJson, "material_id");
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("flag", "5");
|
map.put("flag", "5");
|
||||||
if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%");
|
if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%");
|
||||||
|
if (ObjectUtil.isNotEmpty(material_id)) map.put("material_id", material_id);
|
||||||
|
|
||||||
JSONObject jsonObject = WQL.getWO("EM_BI_DEVICEREPAIR001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.sparepart_only_id ASC");
|
JSONObject jsonObject = WQL.getWO("EM_BI_DEVICEREPAIR001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.sparepart_only_id ASC");
|
||||||
|
|
||||||
|
|||||||
@@ -117,6 +117,10 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
|||||||
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanMst");
|
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanMst");
|
||||||
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanDtl");
|
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanDtl");
|
||||||
|
|
||||||
|
// 校验 : 是否有相同设备 相同周期
|
||||||
|
JSONObject jsonObject = mstTab.query("devicerecord_id = '" + whereJson.getString("devicerecord_id") + "' and maintenancecycle = '" + whereJson.getString("maintenancecycle") + "' and is_delete = '0'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此设备已经存在此周期的计划");
|
||||||
|
|
||||||
// 插入主表
|
// 插入主表
|
||||||
JSONObject jsonMst = new JSONObject();
|
JSONObject jsonMst = new JSONObject();
|
||||||
jsonMst.put("repair_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
jsonMst.put("repair_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
@@ -239,6 +243,10 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
|||||||
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanMst");
|
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanMst");
|
||||||
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanDtl");
|
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceRepairPlanDtl");
|
||||||
|
|
||||||
|
// 校验 : 是否有相同设备 相同周期
|
||||||
|
JSONObject jsonObject = mstTab.query("devicerecord_id = '" + whereJson.getString("devicerecord_id") + "' and maintenancecycle = '" + whereJson.getString("maintenancecycle") + "' and is_delete = '0'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此设备已经存在此周期的计划");
|
||||||
|
|
||||||
// 插入主表
|
// 插入主表
|
||||||
JSONObject jsonMst = new JSONObject();
|
JSONObject jsonMst = new JSONObject();
|
||||||
jsonMst.put("repair_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
jsonMst.put("repair_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
|||||||
@@ -186,6 +186,10 @@
|
|||||||
mater.material_name like 输入.material_code)
|
mater.material_name like 输入.material_code)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
mater.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
group by mst.material_id,mst.pcsn,mst.sparepart_only_id
|
group by mst.material_id,mst.pcsn,mst.sparepart_only_id
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
|
|||||||
@@ -117,6 +117,10 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
|||||||
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanMst");
|
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanMst");
|
||||||
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanDtl");
|
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanDtl");
|
||||||
|
|
||||||
|
// 校验:相同的设备、周期只能存在一个
|
||||||
|
JSONObject jsonObject = mstTab.query("devicerecord_id = '" + whereJson.getString("devicerecord_id") + "' and maintenancecycle = '" + whereJson.getString("maintenancecycle") + "' and is_delete = '0'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此计划的周期只能存在一个");
|
||||||
|
|
||||||
// 插入主表
|
// 插入主表
|
||||||
JSONObject jsonMst = new JSONObject();
|
JSONObject jsonMst = new JSONObject();
|
||||||
jsonMst.put("maint_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
jsonMst.put("maint_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
@@ -263,6 +267,10 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
|||||||
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanMst");
|
WQLObject mstTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanMst");
|
||||||
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanDtl");
|
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenancePlanDtl");
|
||||||
|
|
||||||
|
// 校验:相同的设备、周期只能存在一个
|
||||||
|
JSONObject jsonObject = mstTab.query("devicerecord_id = '" + whereJson.getString("devicerecord_id") + "' and maintenancecycle = '" + whereJson.getString("maintenancecycle") + "' and is_delete = '0'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonObject)) throw new BadRequestException("此计划的周期只能存在一个");
|
||||||
|
|
||||||
// 插入主表
|
// 插入主表
|
||||||
JSONObject jsonMst = new JSONObject();
|
JSONObject jsonMst = new JSONObject();
|
||||||
jsonMst.put("maint_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
jsonMst.put("maint_plan_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
|||||||
@@ -28,19 +28,20 @@
|
|||||||
:load-options="loadClass"
|
:load-options="loadClass"
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
:disabled="crud.status.view > 0"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="BOM编码" prop="device_bom_code">
|
<el-form-item label="BOM编码" prop="device_bom_code">
|
||||||
<el-input v-model="form.device_bom_code" style="width: 250px;" />
|
<el-input v-model="form.device_bom_code" style="width: 250px;" :disabled="crud.status.view > 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="BOM名称" prop="material_name">
|
<el-form-item label="BOM名称" prop="material_name">
|
||||||
<el-input v-model="form.material_name" style="width: 250px;" />
|
<el-input v-model="form.material_name" style="width: 250px;" :disabled="crud.status.view > 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -65,6 +66,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-check"
|
icon="el-icon-check"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
:disabled="crud.status.view > 0"
|
||||||
@click="putMaterial"
|
@click="putMaterial"
|
||||||
>
|
>
|
||||||
添加物料
|
添加物料
|
||||||
@@ -106,20 +108,20 @@
|
|||||||
:controls="false"
|
:controls="false"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:min="0"
|
:min="0"
|
||||||
:disabled="scope.row.edit"
|
:disabled="crud.status.view > 0"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column show-overflow-tooltip prop="base_unit_id_name" label="单位" align="center" />
|
<el-table-column show-overflow-tooltip prop="base_unit_id_name" label="单位" align="center" />
|
||||||
<el-table-column prop="dtl_remark" label="备注" align="center">
|
<el-table-column prop="dtl_remark" label="备注" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select"/>
|
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select" :disabled="crud.status.view > 0" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" />
|
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" :disabled="crud.status.view > 0" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -163,7 +165,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
handler(newValue, oldValue) {
|
handler(newValue, oldValue) {
|
||||||
debugger
|
|
||||||
this.dialogVisible = newValue
|
this.dialogVisible = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -194,8 +195,8 @@ export default {
|
|||||||
}
|
}
|
||||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
this.class_idStr = res.class_idStr
|
this.class_idStr = res.class_idStr
|
||||||
this.crud.query.class_idStr = this.class_idStr
|
// this.crud.query.class_idStr = this.class_idStr
|
||||||
this.crud.toQuery()
|
// this.crud.toQuery()
|
||||||
this.queryClassId()
|
this.queryClassId()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -214,7 +215,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToEdit]() {
|
[CRUD.HOOK.afterToEdit]() {
|
||||||
debugger
|
|
||||||
const data = {
|
const data = {
|
||||||
'device_bom_id': this.form.device_bom_id
|
'device_bom_id': this.form.device_bom_id
|
||||||
}
|
}
|
||||||
@@ -222,6 +222,40 @@ export default {
|
|||||||
this.form.tableData = res
|
this.form.tableData = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
[CRUD.HOOK.afterToView]() {
|
||||||
|
const data = {
|
||||||
|
'device_bom_id': this.form.device_bom_id
|
||||||
|
}
|
||||||
|
crudDevicebom.getDtl(data).then(res => {
|
||||||
|
this.form.tableData = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
[CRUD.HOOK.afterToCU](crud, form) {
|
||||||
|
debugger
|
||||||
|
if (!form.device_bom_code) {
|
||||||
|
this.queryClassId()
|
||||||
|
} else {
|
||||||
|
this.getSubTypes(form.material_type_id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getSubTypes(id) {
|
||||||
|
crudClassstandard.getClassSuperior(id).then(res => {
|
||||||
|
debugger
|
||||||
|
const date = res.content
|
||||||
|
this.buildClass(date)
|
||||||
|
this.classes = date
|
||||||
|
})
|
||||||
|
},
|
||||||
|
buildClass(classes) {
|
||||||
|
classes.forEach(data => {
|
||||||
|
if (data.children) {
|
||||||
|
this.buildClass(data.children)
|
||||||
|
}
|
||||||
|
if (data.hasChildren && !data.children) {
|
||||||
|
data.children = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
this.$confirm('确认关闭?')
|
this.$confirm('确认关闭?')
|
||||||
.then(_ => {
|
.then(_ => {
|
||||||
|
|||||||
@@ -67,7 +67,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="class_name" label="设备分类" />
|
<el-table-column prop="class_name" label="设备分类" />
|
||||||
<el-table-column prop="device_bom_code" label="BOM编码" />
|
<el-table-column prop="device_bom_code" label="BOM编码">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.device_bom_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="material_name" label="BOM名称" />
|
<el-table-column prop="material_name" label="BOM名称" />
|
||||||
<el-table-column prop="remark" label="备注" />
|
<el-table-column prop="remark" label="备注" />
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
|||||||
@@ -286,6 +286,7 @@
|
|||||||
<el-input-number v-model="scope.row.formula_qty" :disabled="scope.row.edit" :precision="3" :controls="false" :min="0" :max="is_rf_xl(scope.row)" style="width: 120px" />
|
<el-input-number v-model="scope.row.formula_qty" :disabled="scope.row.edit" :precision="3" :controls="false" :min="0" :max="is_rf_xl(scope.row)" style="width: 120px" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="fact_qty" label="实际重量(KG)" :formatter="crud.formatNum3" align="center" />
|
||||||
<el-table-column prop="need_sum_qty" label="需配重量(KG)" :formatter="crud.formatNum3" align="center" />
|
<el-table-column prop="need_sum_qty" label="需配重量(KG)" :formatter="crud.formatNum3" align="center" />
|
||||||
<el-table-column prop="sum_ivt_qty" label="库存重量(KG)" :formatter="crud.formatNum3" align="center" />
|
<el-table-column prop="sum_ivt_qty" label="库存重量(KG)" :formatter="crud.formatNum3" align="center" />
|
||||||
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="70px" :formatter="is_need_manageFormat" />
|
<el-table-column prop="is_need_manage" label="是否配粉" align="center" width="70px" :formatter="is_need_manageFormat" />
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<BomDialog :dialog-show.sync="bomShow" :is-single="true" @tableChanged2="tableChanged2"/>
|
<BomDialog :dialog-show.sync="bomShow" :is-single="true" :open-param="openBom" @tableChanged2="tableChanged2"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -137,6 +137,7 @@ export default {
|
|||||||
fileBom: [],
|
fileBom: [],
|
||||||
fileBomJson: null,
|
fileBomJson: null,
|
||||||
fileBomindex: null,
|
fileBomindex: null,
|
||||||
|
openBom: null,
|
||||||
bomShow: false,
|
bomShow: false,
|
||||||
dialogVisible: false
|
dialogVisible: false
|
||||||
}
|
}
|
||||||
@@ -192,6 +193,7 @@ export default {
|
|||||||
this.bomShow = true
|
this.bomShow = true
|
||||||
this.nowindex = index
|
this.nowindex = index
|
||||||
this.nowrow = row
|
this.nowrow = row
|
||||||
|
this.openBom = row
|
||||||
},
|
},
|
||||||
tableChanged2(row) {
|
tableChanged2(row) {
|
||||||
debugger
|
debugger
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
destroy-on-close
|
destroy-on-close
|
||||||
width="1000px"
|
width="1000px"
|
||||||
@close="close"
|
@close="close"
|
||||||
|
@open="open"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
:inline="true"
|
:inline="true"
|
||||||
@@ -76,7 +77,8 @@ export default {
|
|||||||
return CRUD({
|
return CRUD({
|
||||||
title: '备件Bom',
|
title: '备件Bom',
|
||||||
url: 'api/devicerepairmst/queryBom',
|
url: 'api/devicerepairmst/queryBom',
|
||||||
crudMethod: { ...crudDevicerepairmst }, optShow: {}})
|
crudMethod: { ...crudDevicerepairmst }, optShow: {},
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header()],
|
mixins: [presenter(), header()],
|
||||||
props: {
|
props: {
|
||||||
@@ -87,6 +89,9 @@ export default {
|
|||||||
isSingle: {
|
isSingle: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -94,6 +99,7 @@ export default {
|
|||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableRadio: null,
|
tableRadio: null,
|
||||||
checkrow: null,
|
checkrow: null,
|
||||||
|
material_id: null,
|
||||||
rows: [],
|
rows: [],
|
||||||
XLList: []
|
XLList: []
|
||||||
}
|
}
|
||||||
@@ -106,6 +112,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
open() {
|
||||||
|
debugger
|
||||||
|
this.material_id = this.openParam.material_id
|
||||||
|
this.query.material_id = this.material_id
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
this.tableRadio = item
|
this.tableRadio = item
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ export default {
|
|||||||
this.form1 = this.openParam.form
|
this.form1 = this.openParam.form
|
||||||
this.form1.tableData = this.openParam.tabData
|
this.form1.tableData = this.openParam.tabData
|
||||||
this.form1.devicerecord_id = null
|
this.form1.devicerecord_id = null
|
||||||
|
this.form1.device_code = null
|
||||||
this.form1.repair_plan_code = null
|
this.form1.repair_plan_code = null
|
||||||
this.form1.repair_plan_name = null
|
this.form1.repair_plan_name = null
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ const defaultForm = {
|
|||||||
devicerecord_id: null,
|
devicerecord_id: null,
|
||||||
maintenancecycle: null,
|
maintenancecycle: null,
|
||||||
plan_start_date: null,
|
plan_start_date: null,
|
||||||
|
device_code: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
tableData: []
|
tableData: []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ export default {
|
|||||||
this.form1 = this.openParam.form
|
this.form1 = this.openParam.form
|
||||||
this.form1.tableData = this.openParam.tabData
|
this.form1.tableData = this.openParam.tabData
|
||||||
this.form1.devicerecord_id = null
|
this.form1.devicerecord_id = null
|
||||||
|
this.form1.device_code = null
|
||||||
this.form1.maint_plan_code = null
|
this.form1.maint_plan_code = null
|
||||||
this.form1.maint_plan_name = null
|
this.form1.maint_plan_name = null
|
||||||
},
|
},
|
||||||
@@ -223,7 +224,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tableChanged2(row) {
|
tableChanged2(row) {
|
||||||
this.form1.devicerecord_id = row.devicerecord_id
|
this.form1.devicerecord_id = row.devicerecord_id
|
||||||
this.form.device_code = row.device_code
|
this.form1.device_code = row.device_code
|
||||||
},
|
},
|
||||||
delRow(index, rows) {
|
delRow(index, rows) {
|
||||||
rows.splice(index, 1)
|
rows.splice(index, 1)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="设备">
|
<el-form-item label="保养项目">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.maint_item_code"
|
v-model="query.maint_item_code"
|
||||||
clearable
|
clearable
|
||||||
|
|||||||
Reference in New Issue
Block a user