This commit is contained in:
18188916393
2022-09-26 14:58:42 +08:00
parent cceed8779f
commit bf7d53c6ea
3 changed files with 30 additions and 3 deletions

View File

@@ -54,7 +54,7 @@
struct.struct_name, struct.struct_name,
structivt.vehicle_code, structivt.vehicle_code,
structivt.canuse_qty as ivt_qty, structivt.canuse_qty as ivt_qty,
structivt.pcsn,
structivt.qty_unit_id, structivt.qty_unit_id,
unit.unit_name, unit.unit_name,
'1' as is_show '1' as is_show

View File

@@ -1,5 +1,7 @@
package org.nl.mongodb; package org.nl.mongodb;
import cn.hutool.core.util.StrUtil;
import org.nl.exception.BadRequestException;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
public class Test { public class Test {
@@ -56,4 +58,29 @@ public class Test {
PageHelper pageHelper = mongoUtil.pageHelper(count, teachers);*/ PageHelper pageHelper = mongoUtil.pageHelper(count, teachers);*/
} }
public static void main(String[] args) {
String a = "231";
String b = "8";
String c = "23";
String d = "3242";
String e = "43243";
String aa = String.format("%0" + 4 + "d", Integer.parseInt(a) + 1);
String bb = String.format("%0" + 4 + "d", Integer.parseInt(b) + 1);
String cc = String.format("%0" + 4 + "d", Integer.parseInt(c) + 1);
String dd = String.format("%0" + 4 + "d", Integer.parseInt(d) + 1);
String ee = String.format("%0" + 4 + "d", Integer.parseInt(e) + 1);
System.out.println(aa);
System.out.println(bb);
System.out.println(cc);
System.out.println(dd);
System.out.println(ee);
}
public String autoGenericCode(String vehicle_code) {
if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("托盘号不能为空!");
}
return String.format("%0" + 4 + "d", Integer.parseInt(vehicle_code) + 1);
}
} }

View File

@@ -13,7 +13,7 @@
<!--表单组件--> <!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px"> <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
<el-form-item label="托盘编码" prop="vehicle_code"> <el-form-item label="托盘编码" prop="vehicle_code">
<el-input v-model="form.vehicle_code" style="width: 370px;" @focus="getVehicle" /> <el-input v-model="form.vehicle_code" style="width: 370px;" @focus="getVehicle" />
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="物料id"> <el-form-item v-if="false" label="物料id">
@@ -46,7 +46,7 @@
<!--表格--> <!--表格-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column prop="group_id" label="组盘标识" /> <el-table-column v-if="false" prop="group_id" label="组盘标识" />
<el-table-column prop="vehicle_code" label="托盘编码" /> <el-table-column prop="vehicle_code" label="托盘编码" />
<el-table-column prop="material_code" label="物料编码" /> <el-table-column prop="material_code" label="物料编码" />
<el-table-column prop="material_name" label="物料名称 " /> <el-table-column prop="material_name" label="物料名称 " />