From 9f7fcb82f43ac4905623b0239d0f3ef7f4079e47 Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期二, 13 八月 2024 08:48:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java | 2
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java | 16 ++++----
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java | 4 +-
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessCtrl.java | 10 ++--
pms-parent/pms-global/src/main/resources/privileges-config.xml | 4 ++
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java | 12 +++---
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java | 10 ++--
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java | 50 +++++++++++++++---------
8 files changed, 62 insertions(+), 46 deletions(-)
diff --git a/pms-parent/pms-global/src/main/resources/privileges-config.xml b/pms-parent/pms-global/src/main/resources/privileges-config.xml
index 52b3a00..25ecad9 100644
--- a/pms-parent/pms-global/src/main/resources/privileges-config.xml
+++ b/pms-parent/pms-global/src/main/resources/privileges-config.xml
@@ -18,6 +18,8 @@
<!-- 鐢熶骇绠$悊 -->
<privilege num="10200000" name="鐢熶骇鏌ヨ" type="1020" typeName="鐢熶骇绠$悊"></privilege>
<privilege num="10200001" name="鐢熶骇绠$悊" type="1020" typeName="鐢熶骇绠$悊"></privilege>
+ <privilege num="10200002" name="娴佺▼鏌ヨ" type="1020" typeName="鐢熶骇绠$悊"></privilege>
+ <privilege num="10200003" name="娴佺▼绠$悊" type="1020" typeName="鐢熶骇绠$悊"></privilege>
<!-- 骞冲彴淇℃伅 -->
<privilege num="10300000" name="浜у搧鏌ヨ" type="1030" typeName="骞冲彴淇℃伅"></privilege>
@@ -32,6 +34,8 @@
<privilege num="10300009" name="涓嶅悎鏍煎師鍥犵鐞�" type="1030" typeName="骞冲彴淇℃伅"></privilege>
<privilege num="10300010" name="鎶ュ簾鍘熷洜鏌ヨ" type="1030" typeName="骞冲彴淇℃伅"></privilege>
<privilege num="10300011" name="鎶ュ簾鍘熷洜绠$悊" type="1030" typeName="骞冲彴淇℃伅"></privilege>
+ <privilege num="10300012" name="娴嬭瘯椤圭洰鏌ヨ" type="1030" typeName="骞冲彴淇℃伅"></privilege>
+ <privilege num="10300013" name="娴嬭瘯椤圭洰绠$悊" type="1030" typeName="骞冲彴淇℃伅"></privilege>
</privileges>
</config>
\ No newline at end of file
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
index e52b152..c613780 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
@@ -116,7 +116,7 @@
* @return
*/
@PostMapping(path="disabled")
- @SsoPowerAop(power = "10100011")
+ @SsoPowerAop(power = "10300003")
@Log("绂佺敤鎴栧惎鐢ㄨ川妫�椤圭洰")
public BaseResponse<Boolean> disabled(@RequestBody PltProductQualityInspectionItems reason){
int count = sv.disabled(reason.id,reason.disabled);
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
index 5bcf5e9..e5f2720 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proTestItems/ProTestItemsCtrl.java
@@ -34,7 +34,7 @@
* @return
*/
@PostMapping(path="save")
- @SsoPowerAop(power = "10300003")
+ @SsoPowerAop(power = "10300013")
@Log("淇濆瓨浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
public BaseResponse<Boolean> save(@RequestBody @Valid PltProductTestInspectionItems item){
item.deleted = false;
@@ -54,7 +54,7 @@
* @return
*/
@PostMapping(path="update")
- @SsoPowerAop(power = "10300003")
+ @SsoPowerAop(power = "10300013")
@Log("鏇存柊浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
public BaseResponse<Boolean> update(@RequestBody @Valid PltProductTestInspectionItems item){
int count = sv.update(item);
@@ -71,7 +71,7 @@
* @return
*/
@GetMapping(path="delete")
- @SsoPowerAop(power = "10300003")
+ @SsoPowerAop(power = "10300013")
@Log("鍒犻櫎浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
public BaseResponse<Boolean> delete(String id){
int count = sv.delete(Long.parseLong(id));
@@ -90,7 +90,7 @@
* @return
*/
@GetMapping(path="one")
- @SsoPowerAop(power = "10300002") //鐧诲綍涓庢潈闄愬悓鏃堕獙璇�
+ @SsoPowerAop(power = "10300012") //鐧诲綍涓庢潈闄愬悓鏃堕獙璇�
@Log("鏍规嵁ID鏌ヨ浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
public BaseResponse<PltProductTestInspectionItems> one(String id){
PltProductTestInspectionItems item=sv.selectById(id);
@@ -103,7 +103,7 @@
* @return
*/
@PostMapping(path="some")
- @SsoPowerAop(power = "10300002")
+ @SsoPowerAop(power = "10300012")
@Log("鏌ヨ浜у搧娴嬭瘯妫�鏌ラ」鐩俊鎭�")
public BaseResponse<QueryResultVo<List<PltProductTestInspectionItems>>> some(@RequestBody QueryVo vo){
QueryResultVo<List<PltProductTestInspectionItems>> list = sv.selectSome(vo) ;
@@ -115,7 +115,7 @@
* @return
*/
@PostMapping(path="disabled")
- @SsoPowerAop(power = "10100011")
+ @SsoPowerAop(power = "10300013")
@Log("绂佺敤鎴栧惎鐢ㄦ祴璇曢」鐩�")
public BaseResponse<Boolean> disabled(@RequestBody PltProductTestInspectionItems reason){
int count = sv.disabled(reason.id,reason.disabled);
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
index 4646f65..e1284e0 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
@@ -118,7 +118,7 @@
}
@PostMapping(path="disabled")
- @SsoPowerAop(power = "10100011")
+ @SsoPowerAop(power = "10300007")
@Log("绂佺敤鎴栧惎鐢ㄥ伐绔�")
public BaseResponse<Boolean> disabled(@RequestBody PltStation station){
int count = sv.disabled(station.id,station.disabled);
@@ -130,7 +130,7 @@
}
}
@PostMapping(path="export")
- @SsoPowerAop(power = "10300000")
+ @SsoPowerAop(power = "10300007")
@Log("瀵煎嚭宸ョ珯淇℃伅")
public void export(HttpServletResponse response){
List<Converter> list = new ArrayList<>() ;
diff --git a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessCtrl.java b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessCtrl.java
index 1060acf..77a4104 100644
--- a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessCtrl.java
+++ b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessCtrl.java
@@ -33,7 +33,7 @@
* @return
*/
@PostMapping(path="save")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200003")
@Log("淇濆瓨鐢熶骇娴佺▼")
public BaseResponse<Boolean> save(@RequestBody @Valid PrProductionProcess process){
int count = sv.save(process);
@@ -50,7 +50,7 @@
* @return
*/
@PostMapping(path="update")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200003")
@Log("鏇存柊鐢熶骇娴佺▼")
public BaseResponse<Boolean> update(@RequestBody @Valid PrProductionProcess process){
int count = sv.update(process);
@@ -66,7 +66,7 @@
* @return
*/
@GetMapping(path="one")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200002")
@Log("鏍规嵁ID鏌ヨ鐢熶骇娴佺▼")
public BaseResponse<PrProductionProcess> one(Long id){
PrProductionProcess process=sv.selectById(id);
@@ -79,7 +79,7 @@
* @return
*/
@PostMapping(path="some")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200002")
@Log("鍒嗛〉鏌ヨ鐢熶骇娴佺▼")
public BaseResponse<QueryResultVo<List<PrProductionProcess>>> some(@RequestBody QueryVo vo){
QueryResultVo<List<PrProductionProcess>> list = sv.selectSome(vo) ;
@@ -91,7 +91,7 @@
* @return
*/
@GetMapping(path="queryAll")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200002")
@Log("鏌ヨ鎵�鏈夌敓浜ф祦绋�")
public BaseResponse<List<Map<String,String>>> queryAll(Long proId){
return BaseResponseUtils.buildSuccess(sv.queryAll(proId));
diff --git a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java
index 5e5be8c..02566d8 100644
--- a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java
+++ b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java
@@ -37,7 +37,7 @@
}
@PostMapping(path="save")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("淇濆瓨缁勮浠诲姟璁″垝")
public BaseResponse<Boolean> save(@RequestBody @Valid PrAssemblyPlan plan){
int count = sv.save(plan);
@@ -54,7 +54,7 @@
* @return
*/
@PostMapping(path="update")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("鏇存柊缁勮浠诲姟璁″垝")
public BaseResponse<Boolean> update(@RequestBody @Valid PrAssemblyPlan plan){
int count = sv.update(plan);
@@ -66,7 +66,7 @@
}
@PostMapping(path="updateStatus")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("鏇存柊浠诲姟璁″垝鐘舵��")
public BaseResponse<Boolean> updateStatus(@RequestBody PrAssemblyPlan plan){
int count = sv.updateStatus(plan);
@@ -81,7 +81,7 @@
* @return
*/
@GetMapping(path="one")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200000")
@Log("鏍规嵁ID鏌ヨ缁勮浠诲姟璁″垝")
public BaseResponse<PrAssemblyPlan> one(Long id){
PrAssemblyPlan plan=sv.selectById(id);
@@ -94,7 +94,7 @@
* @return
*/
@PostMapping(path="some")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200000")
@Log("鍒嗛〉鏌ヨ缁勮浠诲姟璁″垝")
public BaseResponse<QueryResultVo<List<PrAssemblyPlan>>> some(@RequestBody QueryVo vo){
QueryResultVo<List<PrAssemblyPlan>> list = sv.selectSome(vo) ;
@@ -105,7 +105,7 @@
* 澧炲姞璁惧鍙�
*/
@PostMapping(path="addDevice")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("澧炲姞璁惧鍙�")
public BaseResponse<?> addDevice(@RequestBody QueryVo vo){
if(vo.addNum == null || vo.addNum <= 0 || vo.planId == null){
@@ -120,7 +120,7 @@
}
@PostMapping(path="someDevice")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200000")
@Log("鍒嗛〉鏌ヨ璁惧鍙�")
public BaseResponse<QueryResultVo<List<PrDevice>>> someDevice(@RequestBody QueryVo queryVo){
QueryResultVo<List<PrDevice>> list = sv.selectSomeDevice(queryVo) ;
@@ -128,7 +128,7 @@
}
@GetMapping(path="exportDevice")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("瀵煎嚭璁惧鍙�")
public void exportDevice(Long batchId, HttpServletResponse response){
Date start = new Date() ;
diff --git a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java
index 29ac7bf..6c54e0d 100644
--- a/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java
+++ b/pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java
@@ -28,7 +28,7 @@
@PostMapping(path="save")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("淇濆瓨缁勮浠诲姟璁″垝")
public BaseResponse<Boolean> save(@RequestBody @Valid PrDevOpsPlan plan){
int count = sv.save(plan);
@@ -45,7 +45,7 @@
* @return
*/
@PostMapping(path="update")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("鏇存柊缁勮浠诲姟璁″垝")
public BaseResponse<Boolean> update(@RequestBody @Valid PrDevOpsPlan plan){
int count = sv.update(plan);
@@ -57,7 +57,7 @@
}
@PostMapping(path="updateStatus")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200001")
@Log("鏇存柊浠诲姟璁″垝鐘舵��")
public BaseResponse<Boolean> updateStatus(@RequestBody PrDevOpsPlan plan){
int count = sv.updateStatus(plan);
@@ -73,7 +73,7 @@
* @return
*/
@GetMapping(path="one")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200000")
@Log("鏍规嵁ID鏌ヨ缁勮浠诲姟璁″垝")
public BaseResponse<PrDevOpsPlan> one(Long id){
PrDevOpsPlan plan=sv.selectById(id);
@@ -86,7 +86,7 @@
* @return
*/
@PostMapping(path="some")
- @SsoPowerAop(power = "-1")
+ @SsoPowerAop(power = "10200000")
@Log("鍒嗛〉鏌ヨ缁勮浠诲姟璁″垝")
public BaseResponse<QueryResultVo<List<PrDevOpsPlan>>> some(@RequestBody QueryVo vo){
QueryResultVo<List<PrDevOpsPlan>> list = sv.selectSome(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 438f790..f825f4a 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
@@ -240,6 +240,9 @@
if (record.outLineTime != null) {
isEnd = true;
}
+ if(StringUtils.isNotBlank(params.getContent())){
+ record.nodeContent = params.getContent();
+ }
} else {
PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId);
record.nodeContent = node.content;
@@ -284,7 +287,7 @@
*/
private Integer getStatus(String status, boolean isEnd, String workType) {
//缁勮 2024/07/17 鐩墠缁勮workType 1 鍙湁MarkOk //娴嬭瘯 //鍝佹
- if (WORK_TYPE_ASSEMBLY.equals(workType) || WORK_TYPE_TEST.equals(workType) || WORK_TYPE_INSPECTION.equals(workType) || WORK_TYPE_REPAIR.equals(workType)) {
+ if (WORK_TYPE_ASSEMBLY.equals(workType) || WORK_TYPE_TEST.equals(workType) || WORK_TYPE_INSPECTION.equals(workType) || WORK_TYPE_REPAIR.equals(workType)|| WORK_TYPE_OTHER.equals(workType)) {
return switch (status) {
case QrCodeConstant.MarkOk -> isEnd ? DeviceStatus.COMPLETED.getCode() : DeviceStatus.ASSEMBLING.getCode();
case QrCodeConstant.MarkQualified -> isEnd ? DeviceStatus.COMPLETED.getCode() : DeviceStatus.ASSEMBLING.getCode();
@@ -304,8 +307,8 @@
* @return 缁撴灉
*/
private Integer getResult(String status, String workType) {
- //缁勮
- if (WORK_TYPE_ASSEMBLY.equals(workType)) {
+ //缁勮 涓存椂浠诲姟-鍏朵粬
+ if (WORK_TYPE_ASSEMBLY.equals(workType) || WORK_TYPE_OTHER.equals(workType)) {
return switch (status) {
case QrCodeConstant.MarkOk -> DeviceResult.PASS.getCode();
default -> throw new RuntimeException("鐘舵�侀敊璇�");
@@ -410,22 +413,31 @@
if (workLast == null) {
throw new RuntimeException("绯荤粺涓病鏈夎鏉$櫥褰曚俊鎭�");
}
- //淇濆瓨宸ヤ綔璁板綍
- StaDeviceProductionLog log = new StaDeviceProductionLog();
- log.setId(null); // 璁惧鐢熶骇鏃ュ織ID璁句负null锛岃〃绀烘柊澧�
- log.setDeviceNo(""); //RepairId planId currNode deviceCycleContent memo
- log.setWorkId(workId);
- log.setStationId(workLast.getStationId());
- log.setNodeContent(vo.getContent());
- log.setStatus(DeviceStatus.COMPLETED.getCode());//瀹屾垚鐘舵��
- log.setResult(DeviceResult.PASS.getCode());//閫氳繃
- log.setErrorMsg(vo.getErrorMsg());
- log.setAssistants(workLast.getAssistants());
- log.setInTime(new Date());
- log.setOutTime(new Date());
- log.setUpdatedBy(workLast.getUserId());
- log.setNumber(vo.getNumber());
- int count = deviceProductionLogDao.insertSelective(log);
+ int count = 0;
+ //淇濆瓨宸ヤ綔璁板綍 //濡傛灉鏈夎澶囩爜
+ if(vo.deviceNo != null && StringUtils.isNotBlank(vo.deviceNo[0])){
+ StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]);
+ count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) :
+ deviceLastDao.updateByPrimaryKey(deviceLast);
+ saveDeviceProductionLog(deviceLast);
+ }else{
+ StaDeviceProductionLog log = new StaDeviceProductionLog();
+ log.setId(null); // 璁惧鐢熶骇鏃ュ織ID璁句负null锛岃〃绀烘柊澧�
+ log.setDeviceNo(""); //RepairId planId currNode deviceCycleContent memo
+ log.setWorkId(workId);
+ log.setStationId(workLast.getStationId());
+ log.setNodeContent(vo.getContent());
+ log.setStatus(DeviceStatus.COMPLETED.getCode());//瀹屾垚鐘舵��
+ log.setResult(DeviceResult.PASS.getCode());//閫氳繃
+ log.setErrorMsg(vo.getErrorMsg());
+ log.setAssistants(workLast.getAssistants());
+ log.setInTime(new Date());
+ log.setOutTime(new Date());
+ log.setUpdatedBy(workLast.getUserId());
+ log.setNumber(vo.getNumber());
+ count = deviceProductionLogDao.insertSelective(log);
+
+ }
return count;
}
--
Gitblit v1.8.0