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()); 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 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); } } 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); } }