diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/service/impl/HandPFOutIvtServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/service/impl/HandPFOutIvtServiceImpl.java index 5b7b35b4..49f6e69a 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/service/impl/HandPFOutIvtServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/pda/st/out/service/impl/HandPFOutIvtServiceImpl.java @@ -465,7 +465,8 @@ public class HandPFOutIvtServiceImpl implements HandPFOutIvtService { } String area_type = pointObj.getString("area_type"); String bucketunique = jsonObject.get("bucketunique"); - String out_qty = NumberUtil.round(MapUtil.getStr(jsonObject,"out_qty"), 2).toString(); + //需出重量 + String out_qty = jsonObject.get("out_qty"); //根据桶查询物料批次信息 JSONObject bucketObj = WQLObject.getWQLObject("md_pb_bucketrecord").query("bucketunique='" + bucketunique + "'").uniqueResult(0); String material_id = bucketObj.getString("material_id"); diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java index c6aba6f6..7f9488a8 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DailyplanServiceImpl.java @@ -447,7 +447,7 @@ public class DailyplanServiceImpl implements DailyplanService { JSONObject jo_new = MPS_BD_ProductDailyPlan.query("dailyplan_id='"+jo.getString("dailyplan_id")+"' and status='01'").uniqueResult(0); if (jo_new!=null) { ja_new.add(jo); - MPS_BD_ProductDailyPlan.delete(jo); + MPS_BD_ProductDailyPlan.delete("dailyplan_id='"+jo.getString("dailyplan_id")+"' and status='01'"); } } @@ -523,7 +523,8 @@ public class DailyplanServiceImpl implements DailyplanService { Date planend_date = DateUtil.offsetDay(date,days-1); jo.put("planend_date",DateUtil.formatDate(planend_date)); - ja_new2.add(this.createDay(jo)); + JSONObject jo_now = this.createDay(jo); + ja_new2.add(jo_now); date = DateUtil.offsetDay(date,1); pcsn_num = pcsn_num - pcsn_num_day; @@ -537,7 +538,8 @@ public class DailyplanServiceImpl implements DailyplanService { Date planend_date = DateUtil.offsetDay(date,days-1); jo.put("planend_date",DateUtil.formatDate(planend_date)); - ja_new2.add(this.createDay(jo)); + JSONObject jo_now = this.createDay(jo); + ja_new2.add(jo_now); pcsn_num_day = pcsn_num_day - pcsn_num; if(pcsn_num_day <= 0){ @@ -559,7 +561,8 @@ public class DailyplanServiceImpl implements DailyplanService { Date planend_date = DateUtil.offsetDay(date,days-1); jo.put("planend_date",DateUtil.formatDate(planend_date)); - ja_new2.add(this.createDay(jo)); + JSONObject jo_now = this.createDay(jo); + ja_new2.add(jo_now); date = DateUtil.offsetDay(date,1); pcsn_num =pcsn_num - totalproducecapacity_qty; fact_weight = fact_weight - totalproducecapacity_qty*standard_weight; @@ -572,7 +575,8 @@ public class DailyplanServiceImpl implements DailyplanService { Date planend_date = DateUtil.offsetDay(date,days-1); jo.put("planend_date",DateUtil.formatDate(planend_date)); - ja_new2.add(this.createDay(jo)); + JSONObject jo_now = this.createDay(jo); + ja_new2.add(jo_now); pcsn_num_day = totalproducecapacity_qty - pcsn_num; if(pcsn_num_day <= 0){ date = DateUtil.offsetDay(date,1); @@ -584,17 +588,17 @@ public class DailyplanServiceImpl implements DailyplanService { } } - - //根据工作日和结束日期相同的天数进行更新开始日期 + //根据工作日和结束日期相同的天数进行更新开始日期dailyplan_id -> 1583321344530059264 ja_new = new JSONArray(); for (int i = 0; i < ja_new2.size(); i++) { JSONObject jo = ja_new2.getJSONObject(i); JSONObject jo_new = MPS_BD_ProductDailyPlan.query("dailyplan_id='"+jo.getString("dailyplan_id")+"' and status='01'").uniqueResult(0); if (jo_new!=null) { ja_new.add(jo); - MPS_BD_ProductDailyPlan.delete(jo); + MPS_BD_ProductDailyPlan.delete("dailyplan_id='"+jo.getString("dailyplan_id")+"' and status='01'"); } } + HashMap map = new HashMap(); for(int i=0;i 生成工令 + + 上移 + + + 下移 + - - - - + + @@ -272,6 +270,7 @@ export default { XLList: [], fileList: [], checkrows: [], + now_row: null, form: {}, rules: { }} @@ -299,6 +298,7 @@ export default { }, methods: { [CRUD.HOOK.beforeRefresh]() { + this.now_row = null return true }, checkboxT(row) { @@ -399,6 +399,48 @@ export default { this.crud.loading = false }) }, + handleDtlCurrentChange(current) { + if (current !== null) { + this.now_row = current + } else { + this.now_row = null + } + }, + moveUp2() { + if (this.now_row === null) { + return this.crud.notify('请选中一条数据!') + } + const data = this.crud.data + for (let i = 0; i < data.length; i++) { + if (data[i].plan_code === this.now_row.plan_code) { + if (i > 0) { + const upDate = this.crud.data[i - 1] + this.crud.data.splice(i - 1, 1) + this.crud.data.splice(i, 0, upDate) + } else { + this.$message.error('已经是第一条,不可上移') + } + } + } + }, + moveDown2() { + if (this.now_row === null) { + return this.crud.notify('请选中一条数据!') + } + const data = this.crud.data + for (let i = 0; i < data.length; i++) { + if (data[i].plan_code === this.now_row.plan_code) { + if ((i + 1) === this.crud.data.length) { + this.$message.error('已经是最后一条,不可下移') + } else { + const downDate = this.crud.data[i + 1] + this.crud.data.splice(i + 1, 1) + this.crud.data.splice(i, 0, downDate) + break + } + } + } + }, querytable() { this.crud.toQuery() }