This commit is contained in:
2022-07-07 12:28:19 +08:00
15 changed files with 963 additions and 411 deletions

View File

@@ -227,6 +227,7 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
WQLObject PDM_BI_WorkOrder = WQLObject.getWQLObject("PDM_BI_WorkOrder");
WQLObject PDM_BI_Formula = WQLObject.getWQLObject("PDM_BI_Formula");
WQLObject PDM_BI_WorkTask = WQLObject.getWQLObject("PDM_BI_WorkTask");
WQLObject PDM_BI_WorkTaskJob = WQLObject.getWQLObject("PDM_BI_WorkTaskJob");
WQLObject PDM_BI_ProduceProcessRoute = WQLObject.getWQLObject("pdm_bi_productprocessroute");
@@ -256,6 +257,11 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
if (jsonMst == null) {
throw new BadRequestException(jo.getString("workorder_code") + "当前工令记录状态异常,操作失败!");
}
JSONObject Formula = PDM_BI_Formula.query("workorder_id ='" + jo.getString("workorder_id") + "' and is_delete = '0' and is_audit='0' ").uniqueResult(0);
if (Formula != null) {
throw new BadRequestException(jo.getString("workorder_code") + "工令对应配方未审核,操作失败!");
}
String nowStatus = jsonMst.getString("status");
JSONObject Route = PDM_BI_ProduceProcessRoute.query("is_delete='0' and productprocess_status='20' and material_id='" + jsonMst.getString("material_id") + "'").uniqueResult(0);
if (Route == null) {

View File

@@ -58,6 +58,14 @@ public class FormulaController {
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
return new ResponseEntity<>(formulaService.queryAll(whereJson,page),HttpStatus.OK);
}
@PostMapping("/audit")
@Log("保存")
@ApiOperation("保存")
public ResponseEntity<Object> audit(@RequestBody JSONObject whereJson){
formulaService.audit(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/cancel")
@Log("保存")
@ApiOperation("保存")

View File

@@ -25,6 +25,11 @@ public interface FormulaService {
* @param whereJson /
*/
void cancel(JSONObject whereJson);
/**
* 编辑
* @param whereJson /
*/
void audit(JSONObject whereJson);
/**
* 提交

View File

@@ -710,58 +710,64 @@ public class AutoformulaServiceImpl implements AutoformulaService {
cw_list.add(C_weight);
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-C;
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
yzj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double value = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*value/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
yzj_map.put(tjj_material_id,tjj_map_jo);
if(bom_ivt_qty<0){
flag = false;
}else{
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
yzj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double value = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*value/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
yzj_map.put(tjj_material_id,tjj_map_jo);
}
});
}
//判断已含添加剂与需配添加剂大小
yzj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
//判断已含添加剂与需配添加剂大小
yzj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
}
if(!flag){
@@ -793,6 +799,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
cw_list.add(C_weight);
//更新碳化钨配粉重量
double bom_ivt_qty = X21p-X21_jian;
if(bom_ivt_qty<0){
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
}
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
if(bom_ivt_qty<=0){
@@ -970,58 +979,62 @@ public class AutoformulaServiceImpl implements AutoformulaService {
cw_list.add(W_weight);
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-W;
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
yzj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double value = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*value/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
yzj_map.put(tjj_material_id,tjj_map_jo);
if(bom_ivt_qty<0){
flag = false;
}else{
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
yzj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double value = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*value/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
yzj_map.put(tjj_material_id,tjj_map_jo);
}
});
}
//判断已含添加剂与需配添加剂大小
yzj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
//判断已含添加剂与需配添加剂大小
yzj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
}
if(!flag){
@@ -1053,6 +1066,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
//更新碳化钨配粉重量
double bom_ivt_qty = X21p-X21_jian;
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
if(bom_ivt_qty<0){
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
}
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
@@ -1576,58 +1592,62 @@ public class AutoformulaServiceImpl implements AutoformulaService {
cw_list.add(C_weight);
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-C;
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
tjj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double is_tan = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*is_tan/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
tjj_map.put(tjj_material_id,tjj_map_jo);
if(bom_ivt_qty<0){
flag = false;
}else{
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
tjj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double is_tan = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*is_tan/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
tjj_map.put(tjj_material_id,tjj_map_jo);
}
});
}
//判断已含添加剂与需配添加剂大小
tjj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
//判断已含添加剂与需配添加剂大小
tjj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
}
if(!flag){
@@ -1660,6 +1680,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
//更新碳化钨配粉重量
double bom_ivt_qty = X21p-X21_jian;
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
if(bom_ivt_qty<0){
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
}
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));
@@ -1836,58 +1859,62 @@ public class AutoformulaServiceImpl implements AutoformulaService {
cw_list.add(W_weight);
//更新碳化钨配粉重量
double bom_ivt_qty = X22p-W;
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
tjj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double is_tan = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*is_tan/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
tjj_map.put(tjj_material_id,tjj_map_jo);
if(bom_ivt_qty<0){
flag = false;
}else{
bomdlt_Cr3C2_X22p.put("bom_ivt_qty",bom_ivt_qty);
bomdlts_plan_map.put(bomdlt_Cr3C2_X22p.getString("stockrecord_id"),bomdlt_Cr3C2_X22p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X22p.getString("stockrecord_id"));
}
//循环碳化钨
for(int i=0;i<bomdlts_Cr3C2.size();i++){
JSONObject jo = bomdlts_Cr3C2.getJSONObject(i);
double bom_ivt_qty_jo = jo.getDouble("bom_ivt_qty");
//计算不需要移库的添加剂
tjj_map.forEach((key,tjj_map_jo)->{
//获取添加剂id
String tjj_material_id = tjj_map_jo.getString("material_id");
JSONObject tjj_finished = WQL.getWO("QPF_AUTOFORMULA01")
.addParam("material_id",jo.getString("material_id"))
.addParam("pcsn",jo.getString("pcsn"))
.addParam("item_material_id",tjj_material_id)
.addParam("flag","5")
.process()
.uniqueResult(0);
if(tjj_finished!=null){
//已配重量
double finished_qty = tjj_map_jo.getDouble("finished_qty");
//质保书含量比
double is_tan = tjj_finished.getDouble("value");
//当前含量重量
double finished = bom_ivt_qty_jo*is_tan/100.0;
//累计各碳化钨中已含添加剂重量
tjj_map_jo.put("finished_qty",finished_qty+finished);
tjj_map.put(tjj_material_id,tjj_map_jo);
}
});
}
//判断已含添加剂与需配添加剂大小
tjj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
//判断已含添加剂与需配添加剂大小
tjj_map.forEach((key,tjj_map_now)->{
//需配添加剂重量
double need_qty = NumberUtil.round(tjj_map_now.getDouble("need_qty"),3).doubleValue();
//当前添加剂已配
double finished_qty = NumberUtil.round(tjj_map_now.getDouble("finished_qty"),3).doubleValue();
//已配小于需配
if(finished_qty<need_qty){
tjj_map_now.put("formula_qty",need_qty-finished_qty);
tjj_map_now.put("material_type","01");
tjj_map_now.put("is_need_move","0");
tjj_map_now.put("is_need_manage","1");
tjj_map_now.put("is_rf_xl","0");
tjj_map_now.put("ivt_level","01");
tjj_map_now.put("is_active","1");
tjj_map_now.put("quality_scode","01");
yzj_list.add(tjj_map_now);
}
});
}
}
if(!flag){
@@ -1919,6 +1946,9 @@ public class AutoformulaServiceImpl implements AutoformulaService {
//更新碳化钨配粉重量
double bom_ivt_qty = X21p-X21_jian;
bomdlt_Cr3C2_X21p.put("bom_ivt_qty",bom_ivt_qty);
if(bom_ivt_qty<0){
throw new BadRequestException("碳化钨倒数第二条配粉结果为负数,当前配粉无解!");
}
bomdlts_plan_map.put(bomdlt_Cr3C2_X21p.getString("stockrecord_id"),bomdlt_Cr3C2_X21p);
if(bom_ivt_qty<=0){
bomdlts_plan_map.remove(bomdlt_Cr3C2_X21p.getString("stockrecord_id"));

View File

@@ -60,6 +60,7 @@ public class FlourworkServiceImpl implements FlourworkService {
String is_all = MapUtil.getStr(whereJson, "is_all");
String biz_date = MapUtil.getStr(whereJson, "biz_date");
String pcsn = MapUtil.getStr(whereJson, "pcsn");
String formula_code = MapUtil.getStr(whereJson, "formula_code");
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
map.put("device_id", MapUtil.getStr(whereJson, "device_id"));
@@ -70,6 +71,7 @@ public class FlourworkServiceImpl implements FlourworkService {
}
if (StrUtil.equals(is_all, "0")) map.put("status", "99");
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
if (ObjectUtil.isNotEmpty(formula_code)) map.put("formula_code", "%"+formula_code+"%");
JSONObject json = WQL.getWO("QPDM_BI_FORMULA01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "fMst.status,task.start_time,fMst.bucket_type ASC");
return json;
}
@@ -383,127 +385,137 @@ public class FlourworkServiceImpl implements FlourworkService {
String formula_code = whereJson.getString("formula_code");
String device_id = whereJson.getString("device_id");
WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_FormulaDtl");
WQLObject mstTab = WQLObject.getWQLObject("PDM_BI_Formula");
WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_FormulaDtl"); // 配方明细表
WQLObject mstTab = WQLObject.getWQLObject("PDM_BI_Formula"); // 配方主表
WQLObject workTab = WQLObject.getWQLObject("PDM_BI_WorkTask"); // 工序任务表
HashMap<String, String> param = new HashMap<>();
param.put("flag", "8");
param.put("formula_code", formula_code);
param.put("device_id", device_id);
JSONArray mstArr = WQL.getWO("QPDM_BI_FORMULA01").addParamMap(param).process().getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(mstArr)) {
throw new BadRequestException("此配粉工位有配方正在作业");
}
/*
* 下发电气: 配方编号,当前配粉物料编码、物料重量、配粉槽重量、小秤误差值、中秤误差值、大秤误差值
*/
JSONObject jsonDtl = dtlTab.query("formuladtl_id = '" + formuladtl_id + "'").uniqueResult(0);
// 查询配粉槽重量
JSONObject jsonMst = mstTab.query("formula_id ='" + jsonDtl.getString("formula_id") + "'").uniqueResult(0);
String storagevehicle_id = jsonMst.getString("storagevehicle_id");
if (ObjectUtil.isEmpty(storagevehicle_id)) throw new BadRequestException("此配方没有配粉槽");
HashMap<String, String> map = new HashMap<>();
map.put("flag", "8");
map.put("storagevehicle_id", storagevehicle_id);
JSONObject jsonIvt = WQL.getWO("QPDM_BI_FORMULA02").addParamMap(map).process().uniqueResult(0);
// 校验配方状态为30生产中 或者 配方状态为20提交并且工序任务状态为30开始生产
String statusMst = jsonMst.getString("status");
JSONObject jsonWork = workTab.query("workorder_id = '" + jsonMst.getString("workorder_id") + "' and workprocedure_code = 'GX001' and status = '30'").uniqueResult(0);
if (StrUtil.equals(statusMst, "30") || (StrUtil.equals(statusMst, "20") && ObjectUtil.isNotEmpty(jsonWork))) {
HashMap<String, String> param = new HashMap<>();
param.put("flag", "8");
param.put("formula_code", formula_code);
param.put("device_id", device_id);
JSONArray mstArr = WQL.getWO("QPDM_BI_FORMULA01").addParamMap(param).process().getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(mstArr)) {
throw new BadRequestException("此配粉工位有配方正在作业");
}
// 准备下发的参数
JSONArray array = new JSONArray();
// 配方编码
JSONObject data1 = new JSONObject();
data1.put("device_code", device_code);
data1.put("code", "to_formula_code");
data1.put("value", jsonDtl.getString("formula_code"));
array.add(data1);
// 当前配粉物料编码
JSONObject data2 = new JSONObject();
data2.put("device_code", device_code);
data2.put("code", "to_material_code");
data2.put("value", data.getString("material_code"));
array.add(data2);
// 物料重量
JSONObject data3 = new JSONObject();
data3.put("device_code", device_code);
data3.put("code", "to_formula_qty");
data3.put("value", jsonDtl.getString("formula_qty"));
array.add(data3);
// 配粉槽重量
JSONObject data4 = new JSONObject();
data4.put("device_code", device_code);
data4.put("code", "to_masterbucket_qty");
data4.put("value", jsonMst.getString("masterbucket_qty"));
array.add(data4);
// 配方明细id
JSONObject data8 = new JSONObject();
data8.put("device_code", device_code);
data8.put("code", "to_formuladtl_id");
data8.put("value", jsonDtl.getString("formuladtl_id"));
array.add(data8);
/*
* 下发电气: 配方编号,当前配粉物料编码、物料重量、配粉槽重量、小秤误差值、中秤误差值、大秤误差值
*/
String storagevehicle_id = jsonMst.getString("storagevehicle_id");
if (ObjectUtil.isEmpty(storagevehicle_id)) throw new BadRequestException("此配方没有配粉槽");
HashMap<String, String> map = new HashMap<>();
map.put("flag", "8");
map.put("storagevehicle_id", storagevehicle_id);
JSONObject jsonIvt = WQL.getWO("QPDM_BI_FORMULA02").addParamMap(map).process().uniqueResult(0);
// 小称误差值
JSONObject data5 = new JSONObject();
data5.put("device_code", device_code);
data5.put("code", "to_small_scale_error");
// 中称误差值
JSONObject data6 = new JSONObject();
data6.put("device_code", device_code);
data6.put("code", "to_middle_scale_error");
// 大称误差值
JSONObject data7 = new JSONObject();
data7.put("device_code", device_code);
data7.put("code", "to_big_scale_error");
// 准备下发的参数
JSONArray array = new JSONArray();
// 配方编码
JSONObject data1 = new JSONObject();
data1.put("device_code", device_code);
data1.put("code", "to_formula_code");
data1.put("value", jsonDtl.getString("formula_code"));
array.add(data1);
// 当前配粉物料编码
JSONObject data2 = new JSONObject();
data2.put("device_code", device_code);
data2.put("code", "to_material_code");
data2.put("value", data.getString("material_code"));
array.add(data2);
// 物料重量
JSONObject data3 = new JSONObject();
data3.put("device_code", device_code);
data3.put("code", "to_formula_qty");
data3.put("value", jsonDtl.getString("formula_qty"));
array.add(data3);
// 配粉槽重量
JSONObject data4 = new JSONObject();
data4.put("device_code", device_code);
data4.put("code", "to_masterbucket_qty");
data4.put("value", jsonMst.getString("masterbucket_qty"));
array.add(data4);
// 配方明细id
JSONObject data8 = new JSONObject();
data8.put("device_code", device_code);
data8.put("code", "to_formuladtl_id");
data8.put("value", jsonDtl.getString("formuladtl_id"));
array.add(data8);
switch (device_code) {
case "PFW001":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE1").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE1").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE1").getValue());
break;
case "PFW002":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE2").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE2").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE2").getValue());
break;
case "PFW003":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE3").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE3").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE3").getValue());
break;
}
array.add(data5);
array.add(data6);
array.add(data7);
// 小称误差值
JSONObject data5 = new JSONObject();
data5.put("device_code", device_code);
data5.put("code", "to_small_scale_error");
// 中称误差值
JSONObject data6 = new JSONObject();
data6.put("device_code", device_code);
data6.put("code", "to_middle_scale_error");
// 大称误差值
JSONObject data7 = new JSONObject();
data7.put("device_code", device_code);
data7.put("code", "to_big_scale_error");
// 调用电气接口 下发电气
Map<String, Object> result = wmsToAcsService.action(array);
String status = MapUtil.getStr(result, "status");
if (!StrUtil.equals(status, "200")) {
String message = MapUtil.getStr(result, "message");
throw new BadRequestException("下发电气失败:" + message);
switch (device_code) {
case "PFW001":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE1").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE1").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE1").getValue());
break;
case "PFW002":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE2").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE2").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE2").getValue());
break;
case "PFW003":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE3").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE3").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE3").getValue());
break;
}
array.add(data5);
array.add(data6);
array.add(data7);
// 调用电气接口 下发电气
Map<String, Object> result = wmsToAcsService.action(array);
String status = MapUtil.getStr(result, "status");
if (!StrUtil.equals(status, "200")) {
String message = MapUtil.getStr(result, "message");
throw new BadRequestException("下发电气失败:" + message);
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
// 更新主表开始时间 和状态为执行中
String start_time = jsonMst.getString("start_time");
if (ObjectUtil.isEmpty(start_time)) {
jsonMst.put("start_id", currentUserId);
jsonMst.put("start_name", nickName);
jsonMst.put("start_time", now);
}
if (!StrUtil.equals(jsonMst.getString("status"), "30")) {
jsonMst.put("status", "30");
}
mstTab.update(jsonMst);
// 更新明细状态为开始作业
jsonDtl.put("status", "20");
jsonDtl.put("start_id", currentUserId);
jsonDtl.put("start_name", nickName);
jsonDtl.put("start_time", now);
dtlTab.update(jsonDtl);
} else {
throw new BadRequestException("配方状态不为生产中或者工序任务不为生产中");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
// 更新主表开始时间 和状态为执行中
String start_time = jsonMst.getString("start_time");
if (ObjectUtil.isEmpty(start_time)) {
jsonMst.put("start_id", currentUserId);
jsonMst.put("start_name", nickName);
jsonMst.put("start_time", now);
}
if (!StrUtil.equals(jsonMst.getString("status"), "30")) {
jsonMst.put("status", "30");
}
mstTab.update(jsonMst);
// 更新明细状态为开始作业
jsonDtl.put("status", "20");
jsonDtl.put("start_id", currentUserId);
jsonDtl.put("start_name", nickName);
jsonDtl.put("start_time", now);
dtlTab.update(jsonDtl);
}
@Override
@@ -900,87 +912,96 @@ public class FlourworkServiceImpl implements FlourworkService {
WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_FormulaDtl");
WQLObject mstTab = WQLObject.getWQLObject("PDM_BI_Formula");
WQLObject workTab = WQLObject.getWQLObject("PDM_BI_WorkTask"); // 工序任务表
/*
* 下发电气: 配方编号,当前配粉物料编码、物料重量、配粉槽重量、小秤误差值、中秤误差值、大秤误差值
*/
JSONObject jsonDtl = dtlTab.query("formuladtl_id = '" + formuladtl_id + "'").uniqueResult(0);
// 查询配粉槽重量
JSONObject jsonMst = mstTab.query("formula_id ='" + jsonDtl.getString("formula_id") + "'").uniqueResult(0);
// 准备下发的参数
JSONArray array = new JSONArray();
// 配方编码
JSONObject data1 = new JSONObject();
data1.put("device_code", device_code);
data1.put("code", "to_formula_code");
data1.put("value", jsonDtl.getString("formula_code"));
array.add(data1);
// 当前配粉物料编码
JSONObject data2 = new JSONObject();
data2.put("device_code", device_code);
data2.put("code", "to_material_code");
data2.put("value", data.getString("material_code"));
array.add(data2);
// 物料重量
JSONObject data3 = new JSONObject();
data3.put("device_code", device_code);
data3.put("code", "to_formula_qty");
data3.put("value", jsonDtl.getString("formula_qty"));
array.add(data3);
// 配粉槽重量
JSONObject data4 = new JSONObject();
data4.put("device_code", device_code);
data4.put("code", "to_masterbucket_qty");
data4.put("value", jsonMst.getString("masterbucket_qty"));
array.add(data4);
// 配方明细id
JSONObject data8 = new JSONObject();
data8.put("device_code", device_code);
data8.put("code", "to_formuladtl_id");
data8.put("value", jsonDtl.getString("formuladtl_id"));
array.add(data8);
String statusMst = jsonMst.getString("status");
JSONObject jsonWork = workTab.query("workorder_id = '" + jsonMst.getString("workorder_id") + "' and workprocedure_code = 'GX001' and status = '30'").uniqueResult(0);
if (StrUtil.equals(statusMst, "30") || (StrUtil.equals(statusMst, "20") && ObjectUtil.isNotEmpty(jsonWork))) {
/*
* 下发电气: 配方编号,当前配粉物料编码、物料重量、配粉槽重量、小秤误差值、中秤误差值、大秤误差值
*/
// 准备下发的参数
JSONArray array = new JSONArray();
// 配方编码
JSONObject data1 = new JSONObject();
data1.put("device_code", device_code);
data1.put("code", "to_formula_code");
data1.put("value", jsonDtl.getString("formula_code"));
array.add(data1);
// 当前配粉物料编码
JSONObject data2 = new JSONObject();
data2.put("device_code", device_code);
data2.put("code", "to_material_code");
data2.put("value", data.getString("material_code"));
array.add(data2);
// 物料重量
JSONObject data3 = new JSONObject();
data3.put("device_code", device_code);
data3.put("code", "to_formula_qty");
data3.put("value", jsonDtl.getString("formula_qty"));
array.add(data3);
// 配粉槽重量
JSONObject data4 = new JSONObject();
data4.put("device_code", device_code);
data4.put("code", "to_masterbucket_qty");
data4.put("value", jsonMst.getString("masterbucket_qty"));
array.add(data4);
// 配方明细id
JSONObject data8 = new JSONObject();
data8.put("device_code", device_code);
data8.put("code", "to_formuladtl_id");
data8.put("value", jsonDtl.getString("formuladtl_id"));
array.add(data8);
// 小称误差值
JSONObject data5 = new JSONObject();
data5.put("device_code", device_code);
data5.put("code", "to_small_scale_error");
// 中称误差值
JSONObject data6 = new JSONObject();
data6.put("device_code", device_code);
data6.put("code", "to_middle_scale_error");
// 大称误差值
JSONObject data7 = new JSONObject();
data7.put("device_code", device_code);
data7.put("code", "to_big_scale_error");
// 小称误差值
JSONObject data5 = new JSONObject();
data5.put("device_code", device_code);
data5.put("code", "to_small_scale_error");
// 中称误差值
JSONObject data6 = new JSONObject();
data6.put("device_code", device_code);
data6.put("code", "to_middle_scale_error");
// 大称误差值
JSONObject data7 = new JSONObject();
data7.put("device_code", device_code);
data7.put("code", "to_big_scale_error");
switch (device_code) {
case "PFW001":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE1").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE1").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE1").getValue());
break;
case "PFW002":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE2").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE2").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE2").getValue());
break;
case "PFW003":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE3").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE3").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE3").getValue());
break;
switch (device_code) {
case "PFW001":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE1").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE1").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE1").getValue());
break;
case "PFW002":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE2").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE2").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE2").getValue());
break;
case "PFW003":
data5.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SMALL_BALANCE3").getValue());
data6.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MIDDLE_BALANCE3").getValue());
data7.put("value", SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("BIG_BALANCE3").getValue());
break;
}
array.add(data5);
array.add(data6);
array.add(data7);
// 调用电气接口 下发电气
Map<String, Object> result = wmsToAcsService.action(array);
String status = MapUtil.getStr(result, "status");
if (!StrUtil.equals(status, "200")) {
String message = MapUtil.getStr(result, "message");
throw new BadRequestException("下发电气失败:" + message);
}
} else {
throw new BadRequestException("配方状态不为生产中或者工序任务不为生产中");
}
array.add(data5);
array.add(data6);
array.add(data7);
// 调用电气接口 下发电气
Map<String, Object> result = wmsToAcsService.action(array);
String status = MapUtil.getStr(result, "status");
if (!StrUtil.equals(status, "200")) {
String message = MapUtil.getStr(result, "message");
throw new BadRequestException("下发电气失败:" + message);
}
}
}

View File

@@ -66,6 +66,10 @@ public class FormulaServiceImpl implements FormulaService {
if (StrUtil.isNotEmpty(workorder_code)) {
map.put("workorder_code", "%" + workorder_code + "%");
}
String formula_code = map.get("formula_code");
if (StrUtil.isNotEmpty(formula_code)) {
map.put("formula_code", "%" + formula_code + "%");
}
String pcsn = map.get("pcsn");
if (StrUtil.isNotEmpty(pcsn)) {
map.put("pcsn", "%" + pcsn + "%");
@@ -145,6 +149,30 @@ public class FormulaServiceImpl implements FormulaService {
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void audit(JSONObject whereJson) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
WQLObject PDM_BI_Formula = WQLObject.getWQLObject("PDM_BI_Formula");
JSONArray rows = whereJson.getJSONArray("rows");
for(int i=0;i<rows.size();i++){
JSONObject jo = rows.getJSONObject(i);
String formula_id = jo.getString("formula_id");
JSONObject jo_old = PDM_BI_Formula.query("is_delete='0' and formula_id ='"+formula_id+"' and status='20'").uniqueResult(0);
if(jo_old ==null){
throw new BadRequestException("当前配方 "+jo.getString("formula_code")+"非提交状态,不可审核!");
}
jo_old.put("is_audit","1");
jo_old.put("audit_id",currentUserId);
jo_old.put("audit_name",nickName);
jo_old.put("audit_time",now);
PDM_BI_Formula.update(jo_old);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void submit(JSONObject whereJson) {
@@ -210,6 +238,10 @@ public class FormulaServiceImpl implements FormulaService {
}
Formula.put("masterbucket_qty",masterbucket_qty+"");
Formula.put("extadd_qty",extadd_qty+"");
Formula.put("is_audit", "1");
Formula.put("audit_id",currentUserId);
Formula.put("audit_name",nickName);
Formula.put("audit_time",now);
Formula.put("add_id", currentUserId);
Formula.put("add_name", nickName);
Formula.put("add_time", now);

View File

@@ -115,6 +115,10 @@
task.device_id = 输入.device_id
ENDOPTION
OPTION 输入.formula_code <> ""
fMst.formula_code like 输入.formula_code
ENDOPTION
OPTION 输入.pcsn <> ""
fMst.pcsn like 输入.pcsn
ENDOPTION

View File

@@ -22,6 +22,7 @@
输入.end_time TYPEAS s_string
输入.formula_id TYPEAS s_string
输入.pcsn TYPEAS s_string
输入.is_audit TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
@@ -75,6 +76,9 @@
OPTION 输入.status <> ""
Formula.status = 输入.status
ENDOPTION
OPTION 输入.is_audit <> ""
Formula.is_audit = 输入.is_audit
ENDOPTION
OPTION 输入.formula_code <> ""
Formula.formula_code like 输入.formula_code
ENDOPTION

View File

@@ -80,7 +80,7 @@ https://juejin.cn/post/6844903775631572999
<!--生产环境:打印控制台和输出到文件-->
<springProfile name="prod">
<root level="info">
<root level="DEBUG">
<appender-ref ref="asyncFileAppender"/>
</root>
<logger name="jdbc.audit" level="ERROR" additivity="false">