From cdfb66472c06c611c5370f442208b0388d6347ef Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期三, 24 七月 2024 09:53:57 +0800
Subject: [PATCH] 添加品检接口
---
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java | 20 +++++++++++++++++++-
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java | 22 ++++++++++++++++++++++
2 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
index 0e775ba..9c1ddde 100644
--- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
@@ -45,7 +45,7 @@
}
/**
- * 娴嬭瘯鎴栧搧妫�閮借皟鐢ㄨ繖涓帴鍙�
+ * 娴嬭瘯
* @param vo
* @return
*/
@@ -60,6 +60,24 @@
}
}
+ /**
+ * 鍝佹
+ * @param vo
+ * @return
+ */
+ @PostMapping(path = "inspectQuality")
+ public BaseResponse<Boolean> inspectQuality(QueryVo vo) {
+ log.info("AssemblyStepCtrl.inspectQuality():" + vo);
+ int count = sv.inspectQuality(vo);
+ if (count <= 0) {
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+ } else {
+ return BaseResponseUtils.buildSuccess(true);
+ }
+ }
+
+
+
@PostMapping(path = "repair")
public BaseResponse repair(@RequestBody @Valid QueryVo vo) {
log.info("AssemblyStepCtrl.repair():" + vo);
diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
index 3d7179b..b94f17d 100644
--- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -325,6 +325,7 @@
}
throw new RuntimeException("鐘舵�侀敊璇紝鏃犳晥鐨勮妭鐐圭被鍨�: " + workType);
}
+ @Transactional
public int repair(QueryVo vo) {
long workId = Long.parseLong(vo.workId);
StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
@@ -353,7 +354,26 @@
return count;
}
+ @Transactional
public int testing(QueryVo vo) {
+ long workId = Long.parseLong(vo.workId);
+ StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
+ if (workLast == null) {
+ throw new RuntimeException("绯荤粺涓病鏈夎鏉$櫥褰曚俊鎭�");
+ }
+ StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]);
+ int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
+ deviceLastDao.updateByPrimaryKeySelective(deviceLast);
+ saveDeviceProductionLog(deviceLast);
+ PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId);
+ if (node.isRecord) {
+ saveDeviceLife(deviceLast);
+ }
+ return count;
+ }
+
+ @Transactional
+ public int inspectQuality(QueryVo vo) {
long workId = Long.parseLong(vo.workId);
StaAssemblyWorkLast workLast = assemblyWorkLastDao.selectByPrimaryKey(workId);
if (workLast == null) {
@@ -525,4 +545,6 @@
public List<StaDeviceProductionLog> queryLogByDeviceNo(String devoiceNo) {
return deviceProductionLogDao.selectByDeviceNo(devoiceNo);
}
+
+
}
--
Gitblit v1.8.0