From 38e999b3229108e6fd4fdb56d2b28235a36aa049 Mon Sep 17 00:00:00 2001
From: zhc077 <565291854>
Date: Fri, 3 Feb 2023 16:57:07 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=8A=E6=8C=82=E5=9F=BA=E6=9C=AC=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=202.2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/hanger/ZyHangPointList.vue | 69 +++---
.../src/views/hanger/modules/ZyHangForm.vue | 3 +
.../views/hanger/modules/ZyHangPointForm.vue | 197 ++++++++++--------
.../views/productplan/ZyProductPlanList.vue | 8 +-
.../controller/ZyHangPointController.java | 9 +
.../modules/hanger/entity/ZyHangPoint.java | 2 +
.../hanger/service/IZyHangPointService.java | 1 +
.../service/impl/ZyHangPointServiceImpl.java | 17 ++
8 files changed, 174 insertions(+), 132 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/hanger/ZyHangPointList.vue b/ant-design-vue-jeecg/src/views/hanger/ZyHangPointList.vue
index ce4cb2f1..4162226f 100644
--- a/ant-design-vue-jeecg/src/views/hanger/ZyHangPointList.vue
+++ b/ant-design-vue-jeecg/src/views/hanger/ZyHangPointList.vue
@@ -4,6 +4,21 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
@@ -13,11 +28,11 @@
新增
导出
-
- 导入
-
+
+
+
-
+
删除
@@ -47,43 +62,12 @@
class="j-table-force-nowrap"
@change="handleTableChange">
-
-
-
-
- 无图片
-
-
-
- 无文件
-
- 下载
-
-
-
编辑
-
-
-
- 更多
-
-
- 详情
-
-
- handleDelete(record.id)">
+
+ handleDelete(record.id)">
删除
-
-
-
@@ -124,7 +108,7 @@
{
title:'吊挂编号',
align:"center",
- dataIndex: 'code_dictText'
+ dataIndex: 'code'
},
{
title:'工站编号',
@@ -132,7 +116,7 @@
dataIndex: 'point'
},
{
- title:'工位id',
+ title:'工位名称',
align:"center",
dataIndex: 'stationId_dictText'
},
@@ -151,7 +135,7 @@
deleteBatch: "/org.jeecg.modules.hanger/zyHangPoint/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.hanger/zyHangPoint/exportXls",
importExcelUrl: "org.jeecg.modules.hanger/zyHangPoint/importExcel",
-
+
},
dictOptions:{},
superFieldList:[],
@@ -177,7 +161,4 @@
}
}
}
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangForm.vue b/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangForm.vue
index f8e1ad1d..78055be1 100644
--- a/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangForm.vue
+++ b/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangForm.vue
@@ -61,6 +61,8 @@
+
+
@@ -105,6 +107,7 @@ export default {
},
data () {
return {
+ // enterprisesManager: "sys_user,realname,id",
model:{
status:1,
},
diff --git a/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangPointForm.vue b/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangPointForm.vue
index f31173ae..4681f939 100644
--- a/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangPointForm.vue
+++ b/ant-design-vue-jeecg/src/views/hanger/modules/ZyHangPointForm.vue
@@ -5,17 +5,26 @@
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
@@ -26,93 +35,111 @@
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
index 2429657f..7bd5c2bb 100644
--- a/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
+++ b/ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
@@ -282,7 +282,6 @@ export default {
// },
},
methods: {
-
jumpPage1(record) {
this.$router.push({
path: '/productplan/ProductplanManage',
@@ -308,19 +307,22 @@ export default {
}
}).finally(() => {
this.loading = false
+ this.loadData();
})
},
- getPaiWeiTu(record) {
+ async getPaiWeiTu(record) {
// alert(JSON.stringify(record));
getAction(this.url.paiweitu, record).then((res) => {
if (res.success) {
- console.log("the paiweitu----------" + JSON.stringify(res.result))
+ // console.log("the paiweitu----------" + JSON.stringify(res.result));
+ // alert(JSON.stringify(res.result));
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
+ this.loadData();
})
},
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/controller/ZyHangPointController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/controller/ZyHangPointController.java
index 44a2db0c..26c2cb64 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/controller/ZyHangPointController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/controller/ZyHangPointController.java
@@ -57,6 +57,13 @@ public class ZyHangPointController extends JeecgController getLastPointCode(HttpServletRequest req) {
+ return Result.OK(zyHangPointService.getLastPointCode());
+ }
+
/**
* 添加
*
@@ -67,6 +74,8 @@ public class ZyHangPointController extends JeecgController add(@RequestBody ZyHangPoint zyHangPoint) {
+ String pointCode = zyHangPointService.getLastPointCode();
+ zyHangPoint.setPoint(pointCode);
zyHangPointService.save(zyHangPoint);
return Result.OK("添加成功!");
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/entity/ZyHangPoint.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/entity/ZyHangPoint.java
index eb0d0f24..286059b7 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/entity/ZyHangPoint.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/entity/ZyHangPoint.java
@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
+import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@@ -77,5 +78,6 @@ public class ZyHangPoint implements Serializable {
*/
@Excel(name = "工位id", width = 15)
@ApiModelProperty(value = "工位id")
+ @Dict(dictTable = "station", dicCode = "id", dicText = "station_name")
private String stationId;
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/IZyHangPointService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/IZyHangPointService.java
index 054f8193..a080cd01 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/IZyHangPointService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/IZyHangPointService.java
@@ -12,4 +12,5 @@ import org.jeecg.modules.hanger.entity.ZyHangPoint;
*/
public interface IZyHangPointService extends IService {
+ String getLastPointCode();
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/impl/ZyHangPointServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/impl/ZyHangPointServiceImpl.java
index e6e580a3..49a31a5e 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/impl/ZyHangPointServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/impl/ZyHangPointServiceImpl.java
@@ -1,11 +1,15 @@
package org.jeecg.modules.hanger.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.hanger.entity.ZyHangPoint;
import org.jeecg.modules.hanger.mapper.ZyHangPointMapper;
import org.jeecg.modules.hanger.service.IZyHangPointService;
import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
+
+import java.util.List;
/**
* @Description: 吊挂工位表
@@ -16,4 +20,17 @@ import org.springframework.stereotype.Service;
@Service
public class ZyHangPointServiceImpl extends ServiceImpl implements IZyHangPointService {
+ @Override
+ public String getLastPointCode() {
+ List pointList = this.list(new LambdaQueryWrapper().orderByDesc(ZyHangPoint::getPoint));
+ String code = "";
+ if (ObjectUtils.isEmpty(pointList)) {
+ code = "P100";
+ } else {
+ String[] dgs = pointList.get(0).getPoint().split("P");
+ int val = new Integer(dgs[1]).intValue() + 1;
+ code = "P" + val + "";
+ }
+ return code;
+ }
}