Merge remote-tracking branch 'origin/develop_master' into develop_3

This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-15 10:41:51 +08:00
25 changed files with 220 additions and 35 deletions
@@ -77,13 +77,13 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
queryWrapper.eq("STAND_ID",standId).eq("USE_MODEL","WEB_FILE");
List<SarStandFileEO> sarStandFileEOS = sarStandFileEODao.selectList(queryWrapper);
//开耀这地方我把selectOne改成了批量因为 查单个数据里面出了问题你看看给改一下
sarStandFileEOS.forEach(item->{
QueryWrapper<SarStandFileEO> wrapper = new QueryWrapper<>();
wrapper.eq("ORI_ATT_ID",item.getOriAttId())
.eq("USE_MODEL","SOURCE_FILE");
SarStandFileEO sarStandFileEO = sarStandFileEODao.selectOne(wrapper);
item.setFileOldName(sarStandFileEO.getFileName());
.eq("USE_MODEL","SOURCE_FILE").orderByDesc("CREATION_TIME");
List<SarStandFileEO> sarStandFileEO = sarStandFileEODao.selectList(wrapper);
item.setFileOldName(sarStandFileEO.get(0).getFileOldName());
});
return sarStandFileEOS;
@@ -54,11 +54,11 @@ public class WgDeptShow extends BaseEntity {
@ApiModelProperty(value = "中文名")
private String name;
@ApiModelProperty(value = "单位")
@ApiModelProperty(value = "单位名称")
private String unit;
@ApiModelProperty(value = "单位名称")
private String unitName;
@ApiModelProperty(value = "单位")
private String unitId;
@ApiModelProperty(value = "电话")
private String phone;
@@ -48,11 +48,11 @@ public class WgNetInfoDTO extends BaseEntity {
@ApiModelProperty(value = "中文名")
private String name;
@ApiModelProperty(value = "单位")
@ApiModelProperty(value = "单位名称")
private String unit;
@ApiModelProperty(value = "单位名称")
private String unitName;
@ApiModelProperty(value = "单位")
private String unitId;
@ApiModelProperty(value = "电话")
private String phone;
@@ -23,6 +23,7 @@ import com.adc.da.slrs.wgWorkGroup.dao.WgWorkGroupDao;
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupDTO;
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
import com.adc.da.slrs.wgWorkGroup.service.IWgWorkGroupService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -333,15 +334,21 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
WgDept wgDept=new WgDept();
BeanUtils.copyProperties(wgDeptShow,wgDept);
if (null==wgDept.getWgId()){
wgDept.setWgId(wgWorkGroupShowDTO.getId());
}
wgDepts.add(wgDept);
});
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
}
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
List<String> removeMeet = new ArrayList<>();
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
if (null==wgMeetingInfo.getId()){
wgMeetingInfo.setId(String.valueOf(UUID.randomUUID()));
wgMeetingInfo.setWgId(wgWorkGroupShowDTO.getId());
}
wgMeetingInfo.getMeetingPeople().forEach(s -> {
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
wgMeetingUserRelation.setUserId(s);
@@ -350,27 +357,42 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
});
removeMeet.add(wgMeetingInfo.getId());
});
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
if (!removeMeet.isEmpty()) {
wgMeetingUserRelationService.removeByIds(removeMeet);
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
}
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
}
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
List<WgNetInfo> wgNetInfos = new ArrayList<>();
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
WgNetInfo wgNetInfo = new WgNetInfo();
BeanUtils.copyProperties(wgNetInfoDTO, wgNetInfo);
if (null==wgNetInfo.getWgId()){
wgNetInfo.setWgId(wgWorkGroupShowDTO.getId());
}
wgNetInfos.add(wgNetInfo);
});
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
}
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
if (!wgWorkGroupShowDTO.getWgPayInfos().isEmpty()){
wgWorkGroupShowDTO.getWgPayInfos().forEach(wgPayInfo -> {
if (null==wgPayInfo.getWgId()){
wgPayInfo.setWgId(wgWorkGroupShowDTO.getId());
}
});
}
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
}
if (null != wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size() > 0) {
if (!wgWorkGroupShowDTO.getWgStandorpolicyInfos().isEmpty()){
wgWorkGroupShowDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
if (null==wgStandorpolicyInfo.getWgId()){
wgStandorpolicyInfo.setWgId(wgWorkGroupShowDTO.getId());
}
});
}
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
}
@@ -16,7 +16,7 @@
left join ts_user on sar_public_idea_all.user_id=ts_user.USID
WHERE
sar_public_idea_all.idea_id = #{ideaId}
LIMIT ${(page-1)*size},${page*size}
LIMIT ${(page-1)*size},${size}
</select>
<select id="getAllDataByIdeaCount" resultType="java.lang.Integer">
@@ -168,7 +168,7 @@
</if>
</if>
limit ${(page-1)*size},${page*size}
limit ${(page-1)*size},${size}
</select>
<select id="selectPagessolostar" resultType="java.lang.String">
@@ -256,7 +256,7 @@
</if>
</if>
)
limit ${(page-1)*size},${page*size}
limit ${(page-1)*size},${size}
</select>
@@ -61,7 +61,7 @@
c.*
FROM
(
SELECT b.*,sar_standards_info.STAND_TYPE as standType FROM (
SELECT b.*,sar_standards_info.STAND_TYPE as standType , ts_user.UNAME as dutyEngineerName , ts_user.INSTITUTION_NAME as responsibleUnit FROM (
SELECT (@i:=@i+1) as rows,sar_stand_unqualified.* FROM
sar_stand_unqualified,(SELECT @i:=0)j
WHERE
@@ -83,6 +83,7 @@
limit #{start},#{end}
)b
left join sar_standards_info on b.STAND_ID = sar_standards_info.id
left join ts_user on ts_user.USID = b.DUTY_ENGINEER
)c
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
</select>
@@ -59,7 +59,7 @@
AND specific_item like concat(concat('%',#{specificItem}),'%')
</if>
ORDER BY STAND_ID, specific_item
LIMIT ${(current-1)*size},${current*size}
LIMIT ${(current-1)*size},${size}
) c ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.specific_item,1,(SELECT LOCATE('.',CONCAT(c.specific_item,'.')))),SIGNED) ,rows
</select>
<select id="getAllDatasCout" resultType="java.lang.Integer">
@@ -33,7 +33,7 @@
</if>
ORDER BY
PRODUCT_NAME ASC
limit ${(page-1)*pageSize},${page*pageSize}
limit ${(page-1)*pageSize},${pageSize}
</select>
<select id="selectPagesCount"
@@ -759,7 +759,7 @@
SAR_STANDARDS_INFO.STAND_YEAR),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ','')) and SAR_STANDARDS_INFO.STAND_YEAR != '')
or (trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER),' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ',''))
<if test="mark == 996">
or (stand_name like concat(concat('%',#{page.standNumber}),'%'))
or (trim(replace(stand_name,' ','')) like trim(replace(concat(concat('%',#{page.standNumber}),'%'),' ','')) )
</if>
)
<!-- and SAR_STANDARDS_INFO.STAND_YEAR = ''-->
@@ -12,8 +12,8 @@
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
select wg_dept.* ,ts_user.UNAME as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
,ts_user.INSTITUTION_NAME as deptName ,ts_institution.name as unitName , ts_institution.id as unit
select wg_dept.* ,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
,ts_user.INSTITUTION_NAME as deptName ,ts_institution.name as unit , ts_institution.id as unitId
from wg_dept
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
left join wg_work_group on wg_work_group.id = wg_dept.wg_id
@@ -12,7 +12,7 @@
<select id="getMeetingAllPeoples"
resultType="com.adc.da.slrs.wgMeetingUserRelation.entity.WgMeetingUserRelationShow">
select wg_meeting_user_relation.*,ts_user.UNAME as name from wg_meeting_user_relation
select wg_meeting_user_relation.*,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name from wg_meeting_user_relation
left join ts_user on ts_user.ACCOUNT = wg_meeting_user_relation.user_id
left join wg_meeting_info on wg_meeting_info.id = wg_meeting_user_relation.meeting_id
left join wg_work_group on wg_work_group.id = wg_meeting_info.wg_id
@@ -11,11 +11,12 @@
</select>
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
select wg_net_info.net_id,ts_user.UNAME as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id
select wg_net_info.net_id,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id ,ts_institution.name as unit , ts_institution.id as unitId
from wg_net_info
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
left join wg_work_group on wg_work_group.id = wg_net_info.wg_id
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
where wg_work_group.type = #{type}
</select>