From e487d886533bb60618864642b85f13957252f70d Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期三, 30 十月 2024 13:42:07 +0800
Subject: [PATCH] nologin add command list
---
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java | 9 ++++++++-
pms-parent/pms-global/src/main/resources/mapper/TstCommandMapper.xml | 2 +-
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java | 8 +++++++-
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java | 15 +++++++++++++++
4 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java
index 636e66c..e195700 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/aop/LogAspect.java
@@ -25,6 +25,9 @@
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.util.UriComponentsBuilder;
+import java.lang.reflect.Array;
+import java.util.Arrays;
+
@Slf4j
@Aspect
@Component
@@ -62,7 +65,10 @@
// 鑾峰彇IP鍦板潃
String ip = getRemoteHost();
// 璁板綍鏃ュ織
- logSv.save(user.id,user.name, operationName,ip,result.getCode(),result.getMsg());
+ //msg 鏂规硶鍚� + 鍙傛暟鍊� + 杩斿洖鍊�
+ String args = JSONObject.toJSONString(joinPoint.getArgs());
+ //String args1 = Arrays.toString(joinPoint.getArgs());
+ logSv.save(user.id,user.name, operationName,ip,result.getCode(),args+" "+ result.getMsg());
}
}catch (Exception e){
log.error("璁板綍鏃ュ織寮傚父:"+e.getMessage());
diff --git a/pms-parent/pms-global/src/main/resources/mapper/TstCommandMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/TstCommandMapper.xml
index 0491b4d..67550f4 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/TstCommandMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/TstCommandMapper.xml
@@ -58,7 +58,7 @@
name like concat('%', #{name}, '%') and
</if>
<if test="proId != null">
- pro_id = #{proId,jdbcType=BIGINT} and
+ pro_id = #{proId} and
</if>
<if test="value != null and value !=''">
value like concat('%', #{value}, '%') and
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 689638f..57032ee 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
@@ -11,6 +11,7 @@
import com.dy.pmsGlobal.pojoPr.PrProductionNode;
import com.dy.pmsGlobal.pojoSta.StaDeviceLife;
import com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog;
+import com.dy.pmsGlobal.pojoTst.TstCommand;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -186,5 +187,11 @@
PrAssemblyPlan result = sv.queryPlanByDeviceNo(deviceNo);
return BaseResponseUtils.buildSuccess(result);
}
-
+ //鑷姩鍖栨祴璇� 鏍规嵁浜у搧ID鏌ュ嚭鍏ㄩ儴鎸囦护
+ @GetMapping(path = "getCommand")
+ public BaseResponse<TstCommand> getCommand(String proId) {
+ log.info("AssemblyStepCtrl.getCommand():{}", proId);
+ List<TstCommand> result = sv.getCommand(proId);
+ return BaseResponseUtils.buildSuccess(result);
+ }
}
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 76d27ab..779917a 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
@@ -7,6 +7,7 @@
import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper;
import com.dy.pmsGlobal.daoPr.PrProductionNodeMapper;
import com.dy.pmsGlobal.daoSta.*;
+import com.dy.pmsGlobal.daoTst.TstCommandMapper;
import com.dy.pmsGlobal.dyFile.FileOperate;
import com.dy.pmsGlobal.dyFile.FileRestVo;
import com.dy.pmsGlobal.pojoOth.OthFile;
@@ -16,10 +17,13 @@
import com.dy.pmsGlobal.pojoPr.PrProductionNode;
import com.dy.pmsGlobal.pojoPr.PrWorkingInstruction;
import com.dy.pmsGlobal.pojoSta.*;
+import com.dy.pmsGlobal.pojoTst.TstCommand;
import com.dy.pmsGlobal.util.DeviceResult;
import com.dy.pmsGlobal.util.DeviceStatus;
import com.dy.pmsGlobal.util.QrCodeConstant;
+import com.dy.pmsGlobal.util.UserUtil;
import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -51,6 +55,7 @@
private StaRepairInfoMapper repairInfoDao;
private PltProductQualityInspectionItemsMapper qualityItemsDao;
private PltProductTestInspectionItemsMapper testItemsDao;
+ private TstCommandMapper tstCommandDao;
private PltProductMapper productDao;
private PltProParamsMapper paramsDao;
private PltProductFileMapper productFileDao;
@@ -137,6 +142,11 @@
@Autowired
public void setDeviceLifeLastDao(StaDeviceLifeLastMapper deviceLifeLastDao) {
this.deviceLifeLastDao = deviceLifeLastDao;
+ }
+
+ @Autowired
+ public void setTstCommandDao(TstCommandMapper tstCommandDao) {
+ this.tstCommandDao = tstCommandDao;
}
@Transactional
@@ -621,4 +631,9 @@
bill.orgName = file.orgName;
bill.extName = file.extName;
}
+ public List<TstCommand> getCommand(String proId) {
+ Map<String, Object> params = new HashMap<>();
+ params.put("proId", proId);
+ return tstCommandDao.selectSome(params);
+ }
}
--
Gitblit v1.8.0