Просмотр исходного кода

权限问题、测试问题修改

liujh лет назад: 3
Родитель
Сommit
a119fff6a7

+ 5 - 4
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSecurityApplyController.java

@@ -102,6 +102,7 @@ public class LabSecurityApplyController extends BaseController
             labSecurityApplyVO.setSubjectAdminid(sysUser.getUserId());// 教职工登录,实验室负责人为当前用户的数据
         }else if(UserConstants.USER_TYPE_STUDENT.equals(sysUser.getUserType())){
             //labSecurityApply.setUserId(sysUser.getUserId());// 学生登录(学生无审核权限),申请人id 为当前用户id的数据
+            return getDataTable(new ArrayList());
         }
 
         startPage();
@@ -388,7 +389,7 @@ public class LabSecurityApplyController extends BaseController
         R<SysUser> rDate =remoteUserService.getUserInfoByUserId(tokensysUser.getUserId(), SecurityConstants.INNER);
         SysUser  sysUser = rDate.getData();
 
-        /*LabSecurityApplyVO labapplyVo=new LabSecurityApplyVO();
+        LabSecurityApplyVO labapplyVo=new LabSecurityApplyVO();
         labapplyVo.setBeginTime(beginTime);
         labapplyVo.setEndTime(endTime);
         labapplyVo.setSubjectId(subjectId);
@@ -396,10 +397,10 @@ public class LabSecurityApplyController extends BaseController
         List<LabSecurityApplyVO> listapplyuser = labSecurityApplyService.selectLabSecurityApplyListByTime(labapplyVo);
         if(listapplyuser.size()>0){
             throw new ServiceException("该时间段已存在准入申请,请修改申请时间后在提交申请!");
-        }*/
+        }
 
         //申请时校验是否存在
-        if(StringUtils.isNotBlank(remark)){
+        /*if(StringUtils.isNotBlank(remark)){
             //校验用户是否已有申请中的数据
             LabSecurityApplyVO labSecurityApplyVo = new LabSecurityApplyVO();
             labSecurityApplyVo.setSubjectId(subjectId);
@@ -409,7 +410,7 @@ public class LabSecurityApplyController extends BaseController
             if(listapp!=null && listapp.size()>0){
                 throw new ServiceException("已申请该实验室,无需重复申请!");
             }
-        }
+        }*/
 
         List<LabSecurityMaterialDataVO> listTeacher=Collections.emptyList();//教职工
         List<LabSecurityMaterialDataVO> listStudent=Collections.emptyList();//学生

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabCheckRecordReleaseMapper.xml

@@ -131,7 +131,7 @@
 
     <!-- 额外扩充参数集合查询-->
     <select id="selectListByParameter" parameterType="com.zd.laboratory.domain.vo.LabCheckRecordReleaseVO" resultMap="LabCheckRecordReleaseResultVO">
-        select rr.*,DATE_FORMAT(rr.create_time,'%Y-%m-%d %h:%i') strTime,
+        select rr.*,DATE_FORMAT(rr.create_time,'%Y-%m-%d %H:%i') strTime,
                (length( rr.check_id) - length(REPLACE(rr.check_id,',','' ))+1 ) laboratorNum,
                (select count(1) from lab_check_record cr,lab_check_record_details rd where cr.id in ( rr.check_id) and cr.id = rd.check_id ) laboratorYhsl,
                (select count(1) from lab_check_record cr,lab_check_record_details rd where cr.id in ( rr.check_id) and cr.id = rd.check_id and rd.is_zg=0) laboratorYzg

+ 2 - 2
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabSecurityApplyMapper.xml

@@ -155,10 +155,10 @@
             <if test="rejectMaterial != null  and rejectMaterial != ''"> and reject_material = #{rejectMaterial}</if>
             <if test="creatTime != null "> and DATE_FORMAT(creat_time,'%Y-%m-%d')=DATE_FORMAT(#{creatTime},'%Y-%m-%d')</if>
             <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
-                AND creat_time &gt;= str_to_date(#{beginTime},'%Y-%m-%d')
+                AND DATE_FORMAT(t.creat_time,'%Y-%m-%d') &gt;= date_format(#{beginTime},'%Y-%m-%d')
             </if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
-                AND creat_time &lt;= str_to_date(#{endTime},'%Y-%m-%d')
+                AND DATE_FORMAT(t.creat_time,'%Y-%m-%d') &lt;= date_format(#{endTime},'%Y-%m-%d')
             </if>
 
             <if test="validLength != null "> and valid_length = #{validLength}</if>