Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

master
yinzuomei 4 years ago
parent
commit
a63f511eed
  1. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetmessage/InfoProfileDao.xml
  2. 10
      epmet-module/epmet-message/epmet-message-server/src/main/resources/db/migration/V0.3.17__alter_info_table_ucase.sql
  3. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java

14
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetmessage/InfoProfileDao.xml

@ -75,9 +75,9 @@
SELECT
ir.INFO_ID,
ip.content,
ii.CREATED_TIME,
ip.CREATED_TIME,
ir.READ_FLAG,
ii.publish_staff_id,
ip.publish_staff_id,
ip.first_att_id,
ia.ATTACHMENT_NAME AS name,
ia.ATTACHMENT_FORMAT AS format,
@ -91,18 +91,20 @@
end) as duration
FROM
info_receivers ir
INNER JOIN info ii ON ( ir.INFO_ID = ii.ID )
INNER JOIN info_profile ip ON ( ii.ID = ip.INFO_ID AND ip.DEL_FLAG = '0' )
<if test="null != content and content !=''">
INNER JOIN info ii ON ( ir.INFO_ID = ii.ID )
</if>
INNER JOIN info_profile ip ON ( ir.INFO_ID = ip.INFO_ID AND ip.DEL_FLAG = '0' )
LEFT JOIN info_att ia on ( ip.first_att_id = ia.id AND ia.DEL_FLAG = '0' )
WHERE
ir.DEL_FLAG = '0'
AND ii.DEL_FLAG = '0'
AND ir.STAFF_ID = #{userId}
<if test="null != content and content !=''">
AND ii.DEL_FLAG = '0'
and ii.content like concat('%',trim(#{content}),'%')
</if>
ORDER BY
ii.CREATED_TIME DESC
ip.CREATED_TIME DESC
</select>
<select id="selectInfoDetail" parameterType="java.lang.String" resultType="com.epmet.dataaggre.dto.message.result.InfoDetailResDTO">

10
epmet-module/epmet-message/epmet-message-server/src/main/resources/db/migration/V0.3.17__alter_info_table_ucase.sql

@ -0,0 +1,10 @@
alter table info_profile change column publish_staff_id PUBLISH_STAFF_ID varchar(64) not null comment '发布人id';
alter table info_profile change column content CONTENT varchar(512) not null comment '内容概要,取前100字';
alter table info_profile change column first_att_id FIRST_ATT_ID varchar(64) comment '默认附件表的第一个条用于展示';
alter table info_profile change column total_receiver TOTAL_RECEIVER int(11) not null comment '应读人数';
alter table info_profile change column read_total READ_TOTAL int(11) not null default '0' comment '已读人数,插入是为0';
alter table info change column publish_staff_id PUBLISH_STAFF_ID varchar(64)not null comment '发布人id';
alter table info change column content CONTENT varchar(1024) not null comment '内容,这里存储全部的内容。';
alter table info_group_receivers change column info_receiver_group_id INFO_RECEIVER_GROUP_ID varchar(64) not null comment '群组id';

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java

@ -39,6 +39,7 @@ import com.epmet.service.CustomerDepartmentService;
import com.epmet.service.CustomerGridService;
import com.epmet.service.CustomerStaffAgencyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -241,9 +242,9 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaf
*/
@Override
public Set<String> queryOrgStaffs(OrgStaffFormDTO formDTO) {
Set<String> agencyUserIds=customerStaffAgencyDao.selectAgencyStaffs(formDTO.getCustomerId(),formDTO.getAgencyIds());
Set<String> deptUserIds=customerStaffAgencyDao.selectDeptStaffs(formDTO.getCustomerId(),formDTO.getDeptIds());
Set<String> gridUserIds=customerStaffAgencyDao.selectGridStaffs(formDTO.getCustomerId(),formDTO.getGridIds());
Set<String> agencyUserIds= CollectionUtils.isNotEmpty(formDTO.getAgencyIds())?customerStaffAgencyDao.selectAgencyStaffs(formDTO.getCustomerId(),formDTO.getAgencyIds()):new HashSet<>();
Set<String> deptUserIds=CollectionUtils.isNotEmpty(formDTO.getDeptIds())?customerStaffAgencyDao.selectDeptStaffs(formDTO.getCustomerId(),formDTO.getDeptIds()):new HashSet<>();
Set<String> gridUserIds=CollectionUtils.isNotEmpty(formDTO.getGridIds())?customerStaffAgencyDao.selectGridStaffs(formDTO.getCustomerId(),formDTO.getGridIds()):new HashSet<>();
Set<String> result=new LinkedHashSet<String>();
result.addAll(agencyUserIds);
result.addAll(deptUserIds);

Loading…
Cancel
Save