add 功能安全中心成员-发布提醒列表查询
This commit is contained in:
+34
@@ -10,13 +10,20 @@ import com.jero.common.aspect.annotation.DictPoint;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.functionalsafetycenter.entity.SafetyCenter;
|
||||
import com.jero.functionalsafetycenter.entity.SafetyCenterSubitem;
|
||||
import com.jero.functionalsafetycenter.service.SafetyCenterService;
|
||||
import com.jero.functionalsafetycenter.service.SafetyCenterSubitemService;
|
||||
import com.jero.functionalsafetycenter.vo.SafetyCenterSubitemImport;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -27,6 +34,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 功能安全中心成员(pay_functional_safety_center_subitem)表控制层
|
||||
@@ -44,6 +52,9 @@ public class SafetyCenterSubitemController extends JeroController<SafetyCenterSu
|
||||
@Resource
|
||||
private SafetyCenterSubitemService safetyCenterSubitemService;
|
||||
|
||||
@Resource
|
||||
private SafetyCenterService safetyCenterService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@@ -211,6 +222,29 @@ public class SafetyCenterSubitemController extends JeroController<SafetyCenterSu
|
||||
return super.importExcel(request, response, SafetyCenterSubitem.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能安全中心成员-发布提醒列表查询
|
||||
*/
|
||||
@RequiresPermissions("safetyCenterMember:search")
|
||||
@ApiOperation(value = "功能安全中心成员-发布提醒列表查询")
|
||||
@GetMapping(value = "/publishReminderList")
|
||||
public Result<?> publishReminderList(SafetyCenterSubitem safetyCenterSubitem,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
if (StringUtils.isBlank(safetyCenterSubitem.getProjectId())) {
|
||||
return Result.error("功能安全中心id不能为空!");
|
||||
}
|
||||
if(!StringUtils.isBlank(safetyCenterSubitem.getCompanyName())){
|
||||
safetyCenterSubitem.setCompanyName(oConvertUtils.replaceAllPercent(safetyCenterSubitem.getCompanyName()));
|
||||
}
|
||||
SafetyCenter safetyCenter = safetyCenterService.getById(safetyCenterSubitem.getProjectId());
|
||||
if(Objects.isNull(safetyCenter)){
|
||||
return Result.error("功能安全中心!");
|
||||
}
|
||||
Page<SafetyCenterSubitem> page = new Page<>(pageNo, pageSize);
|
||||
IPage<SafetyCenterSubitem> pageList = safetyCenterSubitemService.publishReminderList(page, safetyCenterSubitem);
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+19
@@ -60,6 +60,11 @@ public class SafetyCenterSubitem {
|
||||
@Dict(dictTable = "pay_contacts_management", dicText = "name", dicCode = "id")
|
||||
private String contactsId;
|
||||
|
||||
/**企业联系人姓名*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "企业联系人姓名")
|
||||
private String contactsName;
|
||||
|
||||
/**企业联系人列表*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "企业联系人列表")
|
||||
@@ -101,4 +106,18 @@ public class SafetyCenterSubitem {
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**已提醒*/
|
||||
@TableField(exist = false)
|
||||
@Dict(dicCode = "yn")
|
||||
private Integer remind;
|
||||
|
||||
/**邮件提醒*/
|
||||
@TableField(exist = false)
|
||||
@Dict(dicCode = "yn")
|
||||
private Integer mailRemind;
|
||||
|
||||
/**会议id*/
|
||||
@TableField(exist = false)
|
||||
private String meetingId;
|
||||
}
|
||||
+3
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.functionalsafetycenter.entity.SafetyCenterSubitem;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -16,4 +17,6 @@ public interface SafetyCenterSubitemMapper extends BaseMapper<SafetyCenterSubite
|
||||
IPage<SafetyCenterSubitem> pageList(Page<SafetyCenterSubitem> page, @Param("safetyCenterSubitem") SafetyCenterSubitem safetyCenterSubitem);
|
||||
|
||||
List<SafetyCenterSubitem> listByParentIdAndCompanyId(@Param("parentId") String parentId, @Param("companyId") String companyId);
|
||||
|
||||
IPage<SafetyCenterSubitem> publishReminderList(Page<SafetyCenterSubitem> page, @Param("safetyCenterSubitem") SafetyCenterSubitem safetyCenterSubitem);
|
||||
}
|
||||
+28
@@ -40,4 +40,32 @@
|
||||
and pfscs.company_id = #{companyId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="publishReminderList" resultType="com.jero.functionalsafetycenter.entity.SafetyCenterSubitem">
|
||||
select distinct pcm.id as id,pcm.name as contacts_name,pcm.company_name as company_name
|
||||
,if(pmrr.id,'1','0') remind,
|
||||
if(pmrmr.id,'1','0') mailRemind
|
||||
from pay_contacts_management pcm
|
||||
left join pay_functional_safety_center_subitem_contacts pfscsc on pcm.id = pfscsc.contacts_id
|
||||
left join (SELECT * from pay_meeting_remind_record where meeting_id = #{param2.meetingId}) pmrr on pmrr.contact_id = pcm.id
|
||||
left join (SELECT * from pay_meeting_remind_mail_record where meeting_id = #{param2.meetingId}) pmrmr on pmrmr.contact_id = pcm.id
|
||||
<where>
|
||||
pfscsc.project_id = #{safetyCenterSubitem.projectId}
|
||||
<if test="safetyCenterSubitem.companyName != null and safetyCenterSubitem.companyName != ''">
|
||||
and pcm.company_name like concat('%',#{safetyCenterSubitem.companyName},'%')
|
||||
</if>
|
||||
<if test="safetyCenterSubitem.remind == 1">
|
||||
and pmrr.id is not null
|
||||
</if>
|
||||
<if test="safetyCenterSubitem.remind == 0">
|
||||
and pmrr.id is null
|
||||
</if>
|
||||
<if test="safetyCenterSubitem.mailRemind == 1">
|
||||
and pmrmr.id is not null
|
||||
</if>
|
||||
<if test="safetyCenterSubitem.mailRemind == 0">
|
||||
and pmrmr.id is null
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
+5
@@ -15,6 +15,7 @@ import com.jero.functionalsafetycenter.entity.SafetyCenter;
|
||||
import com.jero.functionalsafetycenter.entity.SafetyCenterSubitemContacts;
|
||||
import com.jero.functionalsafetycenter.vo.SafetyCenterSubitemContactsImport;
|
||||
import com.jero.functionalsafetycenter.vo.SafetyCenterSubitemImport;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -373,4 +374,8 @@ public class SafetyCenterSubitemService extends ServiceImpl<SafetyCenterSubitemM
|
||||
subitem.setContactsList(contactsList);
|
||||
return subitem;
|
||||
}
|
||||
|
||||
public IPage<SafetyCenterSubitem> publishReminderList(Page<SafetyCenterSubitem> page, SafetyCenterSubitem safetyCenterSubitem) {
|
||||
return baseMapper.publishReminderList(page,safetyCenterSubitem);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user