浏览代码

日志页面权限查询后台功能

oyq28 3 年之前
父节点
当前提交
877bf06e3f

+ 1 - 1
imcs-admin-boot/imcs-authority-server/src/main/java/com/github/zuihou/job/DashboardJob.java

@@ -182,7 +182,7 @@ public class DashboardJob {
             //返回还未处理、执行状态为失败、需要人工处理,并且还未推送的日志记录
             warnWrapper.eq(AAutoNodeLog::getExeResult, "0").eq(AAutoNodeLog::getStatus, "0").eq(AAutoNodeLog::getManual, "1")
                     .orderByDesc(AAutoNodeLog::getCreateTime);
-            IPage<AAutoNodeLog> warnData = aAutoNodeLogMapper.pageList(new Page<AAutoNodeLog>(1L, 5), warnWrapper, datascope);
+            IPage<AAutoNodeLog> warnData = aAutoNodeLogMapper.pageList(new Page<AAutoNodeLog>(1L, 5), warnWrapper, datascope, null);
 
             Map warnMap = Maps.newHashMap();
             warnMap.put("warnData", warnData);

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/dao/AAutoNodeLogMapper.java

@@ -21,5 +21,5 @@ import org.springframework.stereotype.Repository;
 @Repository
 public interface AAutoNodeLogMapper extends SuperMapper<AAutoNodeLog> {
 
-    IPage<AAutoNodeLog> pageList(IPage page, @Param(Constants.WRAPPER) Wrapper<AAutoNodeLog> queryWrapper, DataScope dataScope);
+    IPage<AAutoNodeLog> pageList(IPage page, @Param(Constants.WRAPPER) Wrapper<AAutoNodeLog> queryWrapper, DataScope dataScope, @Param("instructionName") String instructionName);
 }

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/AAutoNodeLogService.java

@@ -18,7 +18,7 @@ import java.util.List;
  */
 public interface AAutoNodeLogService extends SuperService<AAutoNodeLog> {
 
-    IPage<AAutoNodeLog> pageList(IPage page, LbqWrapper<AAutoNodeLog> wrapper);
+    IPage<AAutoNodeLog> pageList(IPage page, LbqWrapper<AAutoNodeLog> wrapper, String instructionName);
 
     Boolean updateStatus(List<Long> ids);
 }

+ 2 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/impl/AAutoNodeLogServiceImpl.java

@@ -36,8 +36,8 @@ public class AAutoNodeLogServiceImpl extends SuperServiceImpl<AAutoNodeLogMapper
     private AAutoNodeLogService aAutoNodeLogService;
 
     @Override
-    public IPage<AAutoNodeLog> pageList(IPage page, LbqWrapper<AAutoNodeLog> wrapper) {
-        return baseMapper.pageList(page,wrapper, new DataScope());
+    public IPage<AAutoNodeLog> pageList(IPage page, LbqWrapper<AAutoNodeLog> wrapper, String instructionName) {
+        return baseMapper.pageList(page,wrapper, new DataScope(), instructionName);
     }
 
     @Override

+ 4 - 1
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/AAutoNodeLogMapper.xml

@@ -27,7 +27,7 @@
         auto_node_id, exe_status, exe_result, start_time, end_time, feedback, feedback_file, status, resourceName,instructionName,procedureName,nodeNo
     </sql>
 
-    <select id="pageList" resultMap="BaseResultMap">
+    <select id="pageList" resultMap="BaseResultMap" parameterType="String">
         select
         <include refid="Base_Column_List"/>
         from (
@@ -38,6 +38,9 @@
         left join imcs_b_bom_procedure p ON d.procedure_id = p.id
         left join view_module_instruction i on l.method = i.code
         left join imcs_z_zone z on l.zone_id = z.id
+        <if test="instructionName != null and instructionName != ''">
+            where i.name like concat('%', #{instructionName}, '%')
+        </if>
         ) s ${ew.customSqlSegment}
     </select>
 

+ 2 - 3
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/dispatchRecord/DispatchExceptionController.java

@@ -80,15 +80,14 @@ public class DispatchExceptionController extends SuperSimpleController<AAutoNode
         IPage<AAutoNodeLog> page = params.buildPage();
         QueryWrap<AAutoNodeLog> wrap = handlerWrapper(null, params);
         LbqWrapper<AAutoNodeLog> wrapper = wrap.lambda();
-        wrapper.like(AAutoNodeLog::getInstructionName, params.getModel().getInstructionName())
-                //.geHeader(DispatchException::getOperationTime, StrUtil.isEmpty(params.getModel().getOperationTime_st())?null: LocalDateTime.parse(params.getModel().getOperationTime_st()))
+        wrapper.like(AAutoNodeLog::getFeedback, params.getModel().getFeedback())
                 .ge(AAutoNodeLog::getExecuteTime, DateUtil.stringToDate3(params.getModel().getExecuteTime_st()))
                 .le(AAutoNodeLog::getExecuteTime, DateUtil.stringToDate3(params.getModel().getExecuteTime_ed()))
 //                .leFooter(DispatchException::getOperationTime, StrUtil.isEmpty(params.getModel().getOperationTime_ed())?null:LocalDateTime.parse(params.getModel().getOperationTime_ed()))
                 .orderByDesc(AAutoNodeLog::getCreateTime);
         //查询弹框异常
         wrapper.eq(AAutoNodeLog::getExeResult,"0").eq(AAutoNodeLog::getManual, "1").eq(AAutoNodeLog::getStatus, "0");
-        aAutoNodeLogService.pageList(page, wrapper);
+        aAutoNodeLogService.pageList(page, wrapper, null);
         return this.success(page);
     }
 

+ 7 - 3
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/dispatchRecord/DispatchRecordController.java

@@ -4,13 +4,16 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ReflectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.core.MybatisConfiguration;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
 import com.github.zuihou.base.R;
 import com.github.zuihou.base.controller.SuperSimpleController;
 import com.github.zuihou.base.request.PageParams;
 import com.github.zuihou.business.dispatchRecord.entity.DispatchException;
 import com.github.zuihou.business.dispatchRecord.entity.DispatchRecord;
 import com.github.zuihou.business.dispatchRecord.service.DispatchRecordService;
+import com.github.zuihou.business.operationManagementCenter.entity.OrderProduct;
 import com.github.zuihou.business.productionReadyCenter.entity.AAutoNodeLog;
 import com.github.zuihou.business.productionReadyCenter.service.AAutoNodeLogService;
 import com.github.zuihou.business.productionResourceCenter.entity.Tool;
@@ -24,6 +27,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.builder.MapperBuilderAssistant;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -54,13 +58,13 @@ public class DispatchRecordController extends SuperSimpleController<AAutoNodeLog
         IPage<AAutoNodeLog> page = params.buildPage();
         QueryWrap<AAutoNodeLog> wrap = handlerWrapper(null, params);
         LbqWrapper<AAutoNodeLog> wrapper = wrap.lambda();
-        wrapper.like(AAutoNodeLog::getInstructionName, params.getModel().getInstructionName())
-                .ge(AAutoNodeLog::getExecuteTime, StrUtil.isEmpty(params.getModel().getExecuteTime_st())?null: DateUtil.stringToDate3(params.getModel().getExecuteTime_st()))
+
+        wrapper .ge(AAutoNodeLog::getExecuteTime, StrUtil.isEmpty(params.getModel().getExecuteTime_st())?null: DateUtil.stringToDate3(params.getModel().getExecuteTime_st()))
                 .le(AAutoNodeLog::getExecuteTime, StrUtil.isEmpty(params.getModel().getExecuteTime_ed())?null:DateUtil.stringToDate3(params.getModel().getExecuteTime_ed()))
                 .orderByDesc(AAutoNodeLog::getCreateTime);
         //只展示执行成功的调度指令
         wrapper.eq(AAutoNodeLog::getExeResult, "1");
-        aAutoNodeLogService.page(page, wrapper);
+        aAutoNodeLogService.pageList(page, wrapper, params.getModel().getInstructionName());
         return this.success(page);
     }
 

+ 1 - 1
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionReadyCenter/WarnLogController.java

@@ -50,7 +50,7 @@ public class WarnLogController extends SuperSimpleController<AAutoNodeLogService
         //wrapper.eq(AAutoNodeLog::getExeResult,"0").or(condition->condition.isNull(AAutoNodeLog::getExeResult).eq(AAutoNodeLog::getExeStatus,"2").lt(AAutoNodeLog::getStartTime, DateUtil.getAddSecondsTime(new Date(), TIMEOUT_THRESHOLD_SEC))).orderByAsc(AAutoNodeLog::getStatus).orderByDesc(AAutoNodeLog::getCreateTime);
         wrapper.eq(AAutoNodeLog::getExeResult,"0").orderByAsc(AAutoNodeLog::getStatus).orderByDesc(AAutoNodeLog::getCreateTime);
                 //or(condition->condition.isNull(AAutoNodeLog::getExeResult).eq(AAutoNodeLog::getExeStatus,"2").lt(AAutoNodeLog::getStartTime, DateUtil.getAddSecondsTime(new Date(), TIMEOUT_THRESHOLD_SEC)))
-        baseService.pageList(page,wrapper);
+        baseService.pageList(page,wrapper, null);
     }
 
     @Override

+ 3 - 1
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/constant/DictionaryKey.java

@@ -11,10 +11,12 @@ import java.util.*;
  */
 public interface DictionaryKey {
 
+    final String ZONE_LINE_NAME= "ZONE_LINE_NAME";
+
     //线边库最大库位数
     final Integer RESOURCE_MAX_NUM = 20;
     //指定接口URL地址
-    final String INSTRUCTION_URL = "http://106.15.38.8:8090/";
+    final String INSTRUCTION_URL = "http://106.15.38.8:8100/";
     //PLC
     String INTERFACETYPE_PLC = "01";
     //生产加工接口