update code
parent
0821f9a41b
commit
f7fa9a0217
|
@ -4,6 +4,7 @@ import com.ruoyi.common.constant.Constants;
|
|||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.sign.Md5Utils;
|
||||
import com.yanzhu.jh.video.domain.SurProjectPhotography;
|
||||
import com.yanzhu.jh.video.service.ISurProjectPhotographyService;
|
||||
|
@ -25,16 +26,20 @@ public class ProjectPhotographyController extends BaseController {
|
|||
private RedisCache redisCache;
|
||||
|
||||
@GetMapping("/listPhotography")
|
||||
public AjaxResult listPhotography(long projectId){
|
||||
public AjaxResult listPhotography(long projectId,long deptId){
|
||||
SurProjectPhotography where =new SurProjectPhotography();
|
||||
where.setProjectId(projectId);
|
||||
String key="bgscreen_photography_listPhotography_"+where.getProjectId()+"-"+where.getProType()+"-"+ Md5Utils.hash(where.getPrjIds());;
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return AjaxResult.success(obj);
|
||||
if(deptId<=0){
|
||||
if (SecurityUtils.isUserB()) {
|
||||
where.setPrjIds(getProjectIds());
|
||||
}
|
||||
}else{
|
||||
where.setProjectDeptId(""+deptId);
|
||||
}
|
||||
List<SurProjectPhotography> list=photographyService.selectSurProjectPhotographyList(where);
|
||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||
|
||||
|
||||
List<SurProjectPhotography> list=photographyService.selectSurProjectPhotographyListForBg(where);
|
||||
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
private String workerPhoto;
|
||||
@Excel(name = "性别0:男 1:女")
|
||||
private Long workerGender;
|
||||
@Excel(name = "出生日期时间戳")
|
||||
|
||||
private Long birthDate;
|
||||
@Excel(name = "所属班组")
|
||||
private String groupName;
|
||||
|
@ -173,13 +173,11 @@ public class SurProjectAttendanceData extends BaseEntity
|
|||
private String phone;
|
||||
@Excel(name = "是否特殊工种")
|
||||
private Integer specWorkType;
|
||||
@Excel(name = "分包商类型")
|
||||
|
||||
private String companyTypeId;
|
||||
@Excel(name = "分包商名称")
|
||||
private String companyName;
|
||||
/** 工人Id */
|
||||
@Excel(name = "工人Id")
|
||||
|
||||
private String workerId;
|
||||
|
||||
/** 考勤时间yyyy-MM-dd HH:mm:ss */
|
||||
|
|
|
@ -62,4 +62,5 @@ public interface SurProjectPhotographyMapper
|
|||
public List<SurProjectPhotography> selectLastPhotography(SurProjectPhotography where);
|
||||
|
||||
List<SurProjectPhotography> querySurProjectPhotographyList(SurProjectPhotography where);
|
||||
List<SurProjectPhotography> selectSurProjectPhotographyListForBg(SurProjectPhotography where);
|
||||
}
|
||||
|
|
|
@ -62,4 +62,6 @@ public interface ISurProjectPhotographyService
|
|||
public List<SurProjectPhotography> selectLastPhotography(SurProjectPhotography where);
|
||||
|
||||
List<SurProjectPhotography> querySurProjectPhotographyList(SurProjectPhotography surProjectPhotography);
|
||||
|
||||
List<SurProjectPhotography> selectSurProjectPhotographyListForBg(SurProjectPhotography where);
|
||||
}
|
||||
|
|
|
@ -102,4 +102,9 @@ public class SurProjectPhotographyServiceImpl implements ISurProjectPhotographyS
|
|||
public List<SurProjectPhotography> querySurProjectPhotographyList(SurProjectPhotography where) {
|
||||
return surProjectPhotographyMapper.querySurProjectPhotographyList(where);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurProjectPhotography> selectSurProjectPhotographyListForBg(SurProjectPhotography where) {
|
||||
return surProjectPhotographyMapper.selectSurProjectPhotographyListForBg(where);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
<if test="params.date != null"> and date(dapd.create_time) = date(#{params.date})</if>
|
||||
</where>
|
||||
|
||||
group by dapd.alarm_type
|
||||
) dapd ON sdd.dict_value = dapd.alarm_type
|
||||
WHERE
|
||||
sdd.dict_type = 'aibox_alarm_type'
|
||||
|
|
|
@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectSurProjectPhotographyList" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">
|
||||
<include refid="selectSurProjectPhotographyVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
||||
<if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
|
||||
|
@ -39,6 +39,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by video_date
|
||||
</select>
|
||||
|
||||
<select id="selectSurProjectPhotographyListForBg" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">
|
||||
select spp.id, spp.project_id, spp.image_url, spp.video_url, spp.video_date, spp.state, spp.remark, spp.is_del, spp.create_by,
|
||||
spp.create_date, spp.update_date,sp.projectName update_by
|
||||
from sur_project_photography as spp
|
||||
left join sur_project sp on sp.id = spp.project_id
|
||||
where sp.isDel=0 and sp.progressVisible=0
|
||||
<if test="projectId != null and projectId!=0"> and spp.project_id = #{projectId}</if>
|
||||
<if test="imageUrl != null and imageUrl != ''"> and spp.image_url = #{imageUrl}</if>
|
||||
<if test="videoUrl != null and videoUrl != ''"> and spp.video_url = #{videoUrl}</if>
|
||||
<if test="videoDate != null "> and spp.video_date = #{videoDate}</if>
|
||||
<if test="state != null "> and spp.state = #{state}</if>
|
||||
<if test="isDel != null "> and spp.is_del = #{isDel}</if>
|
||||
<if test="createDate != null "> and spp.create_date = #{createDate}</if>
|
||||
<if test="updateDate != null "> and spp.update_date = #{updateDate}</if>
|
||||
<!-- 查询条件-项目部门 -->
|
||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||
<if test='proType != null and proType != "" and proType != "0"'> and sp.projectType = #{proType}</if>
|
||||
<if test="prjIds !=null and prjIds.size()>0">
|
||||
and spp.project_id in
|
||||
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by spp.video_date desc
|
||||
</select>
|
||||
|
||||
<select id="querySurProjectPhotographyList" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">
|
||||
SELECT a.id, a.project_id, a.image_url, a.video_url, a.video_date, a.state, a.is_del, a.create_by, a.create_date, a.update_by, a.update_date,sp.projectName remark
|
||||
FROM sur_project_photography a,sur_project sp
|
||||
|
|
Loading…
Reference in New Issue