Merge branch 'develop_master' into FOTON

This commit is contained in:
liyawei
2022-11-08 19:30:45 +08:00
11 changed files with 98 additions and 28 deletions
@@ -78,7 +78,8 @@ public class exportWkExcel {
char letter = 'A';
for(letter = 'A'; letter <= 'Z'; ++letter){
Map<String,String> typeMap = new HashMap<>();
typeMap.put("Q/FT "+letter,"Q/FT "+letter);
typeMap.put("label","Q/FT "+letter);
typeMap.put("value","Q/FT "+letter);
bussStandTypeList.add(typeMap);
}
resultMap.put("BUSSSTANDCLASS",bussStandTypeList);
@@ -45,4 +45,6 @@ public interface SarBussStandAttrInfoDao extends BaseMapper<SarBussStandAttrInfo
Map<String, Object> selectStandFieldAndData(@Param("fieldInfo") String fieldInfo, @Param("standId") String standId);
void updateFSQR(@Param("id") String id,@Param("time") String time);
}
@@ -15,6 +15,7 @@ import com.adc.da.slrs.sarRole.service.ITsRoleService;
import com.adc.da.sys.entity.UserEO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.ibatis.annotations.Delete;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
@@ -104,7 +105,7 @@ public class TsRoleController extends BaseController<TsRole> {
// tsRole.setParent(parent.getName());
// }
TsRole tsRole=tsRoleDao.getAllDatas(roleId);
if(tsRole.getParentId()!=null){
if(ObjectUtils.isNotEmpty(tsRole.getParentId())){
TsRole parent=tsRoleDao.getAllDatas(tsRole.getParentId());
tsRole.setParent(parent.getName());
}
@@ -16,6 +16,7 @@ import com.adc.da.slrs.sarUser.service.ITsUserService;
import com.adc.da.utils.util.ListUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -99,7 +100,7 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
@Override
public ResponseMessage<Object> addRole(TsRole tsRole) {
//判断是否是顶级角色
if(tsRole.getParentId()==null){
if(ObjectUtils.isEmpty(tsRole.getParentId())){
tsRole.setRoleHierarchy(1);
}else {
QueryWrapper<TsRole> parentQueryWrapper=new QueryWrapper<>();
@@ -478,8 +478,10 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
"(select count(*) from sar_stand_unqualified ssu " +
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + standId + "') as counts ",
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
" STAND_ID = r.stand_id and CLOSE_STATE = '1' AND PLAN_CLOSE_TIME is NOT NULL ) as endTimes ");
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( ssu.PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY ssu.PLAN_CLOSE_TIME ) from sar_stand_unqualified ssu " +
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' AND ssu.PLAN_CLOSE_TIME is NOT NULL and pn.id = '" + standId + "') as endTimes ");
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" +
"union all " +
"SELECT " +
@@ -507,13 +509,14 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + standId + "') as counts, "+
"(" +
"SELECT " +
"GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) " +
"GROUP_CONCAT( DISTINCT DATE_FORMAT( ssu.PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY ssu.PLAN_CLOSE_TIME ) " +
"FROM " +
"sar_stand_unqualified " +
"sar_stand_unqualified ssu inner join sar_stand_project_library pn on pn.project_number = ssu.product_id " +
"WHERE " +
"STAND_ID = r.stand_id " +
"AND CLOSE_STATE = '1' " +
"AND PLAN_CLOSE_TIME IS NOT NULL " +
"ssu.STAND_ID = r.stand_id " +
"AND ssu.CLOSE_STATE = '1' " +
"AND ssu.PLAN_CLOSE_TIME IS NOT NULL " +
"AND pn.id = '" + standId + "' " +
") AS endTimes " +
"FROM " +
"sar_bussioness_stand " +
@@ -555,11 +558,11 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
p.setTextStatus(s.getTextStatus());
if (s.getUnCount()==0L && s.getCounts()>0L) {
p.setUnCount(s.getUnCount());
p.setUnCount(s.getUnCount()); // uncount==0
}else if (s.getUnCount() == 0L && s.getCounts()==0L){
p.setUnCount(2L);
}else {
p.setUnCount(1L);
}else { // 有不满足时
p.setUnCount(1L); // 不符合
}
p.setEndTimes(s.getEndTimes());
for (SarStandAttrInfo a:list2){
@@ -573,12 +576,11 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
if(StringUtils.equals(s.getStandType(),"BUSINESS_STAND")){
p.setSSRQ(s.getIssueTime());
}
if (0L == s.getUnCount()) {
if (s.getIsCount() != 0L) {
p.setUnCount(0L);
}
if (s.getIsOverCount() != 0L) {
p.setUnCount(-1L);
if (0L == s.getUnCount()) { // 没有不满足时
if (s.getIsCount() != 0L) { // 只有满足和不涉及---符合
p.setUnCount(0L); // 符合
} else if (s.getIsOverCount() != 0L) { //只有不涉及---不涉及
p.setUnCount(-1L); // 不涉及
}
}
list.add(p);
@@ -161,4 +161,11 @@
FROM SAR_BUSS_STAND_ATTR_INFO
WHERE stand_id = #{standId} and valid_flag=0
</select>
<update id="updateFSQR">
update SAR_BUSS_STAND_ATTR_INFO set FSRQBUSS = #{time}
where id = #{id}
</update>
</mapper>
@@ -393,20 +393,20 @@
parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
SELECT
<include refid="Base_Column_List"/>,
DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH) AS reviewTime
DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH) AS reviewTime
FROM sar_bussioness_stand
WHERE stand_sort = 'Q/QCBFC'
AND ISSUE_TIME IS NOT NULL
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY)
UNION
SELECT
<include refid="Base_Column_List"/>,
DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH) AS reviewTime
DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH) AS reviewTime
FROM sar_bussioness_stand
WHERE stand_sort != 'Q/QCBFC'
AND ISSUE_TIME IS NOT NULL
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY)
</select>
@@ -418,7 +418,7 @@
</select>
<select id="selectListByids" resultType="java.lang.String">
select distinct sar_stand_project_relation.project_id as projectId
from sar_stand_project_relation
from sar_stand_project_relation
where sar_stand_project_relation.stand_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
@@ -439,6 +439,9 @@
<if test="sarStandProjectLibrary.categoryName != null and sarStandProjectLibrary.categoryName != ''">
and sar_stand_project_library.category_name=#{sarStandProjectLibrary.categoryName}
</if>
<if test="sarStandProjectLibrary.projectGroup != null and sarStandProjectLibrary.projectGroup != ''">
and sar_stand_project_library.project_group like concat(concat('%',#{sarStandProjectLibrary.projectGroup}),'%')
</if>
GROUP BY sar_stand_project_library.project_group
limit ${(current-1) * size},${size}
</select>
@@ -457,7 +460,12 @@
</if>
<if test="sarStandProjectLibrary.categoryName != null and sarStandProjectLibrary.categoryName != ''">
and sar_stand_project_library.category_name=#{sarStandProjectLibrary.categoryName}
</if> )a
</if>
<if test="sarStandProjectLibrary.projectGroup != null and sarStandProjectLibrary.projectGroup != ''">
and sar_stand_project_library.project_group like concat(concat('%',#{sarStandProjectLibrary.projectGroup}),'%')
</if>
GROUP BY sar_stand_project_library.project_group
)a
</select>
<select id="queryProjects"
resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
@@ -480,6 +488,9 @@
<if test="sarStandProjectLibrary.projectStatus != null and sarStandProjectLibrary.projectStatus != ''">
and sar_stand_project_library.project_status=#{sarStandProjectLibrary.projectStatus}
</if>
<if test="sarStandProjectLibrary.projectName != null and sarStandProjectLibrary.projectName != ''">
and sar_stand_project_library.project_name like concat(concat('%',#{sarStandProjectLibrary.projectName}),'%')
</if>
<if test="null != groups and groups.size()>0">
and sar_stand_project_library.project_group in
<foreach collection="groups" index="index" item="item" open="(" separator="," close=")">
@@ -509,6 +520,9 @@
<if test="sarStandProjectLibrary.projectStatus != null and sarStandProjectLibrary.projectStatus != ''">
and sar_stand_project_library.project_status=#{sarStandProjectLibrary.projectStatus}
</if>
<if test="sarStandProjectLibrary.projectName != null and sarStandProjectLibrary.projectName != ''">
and sar_stand_project_library.project_name like concat(concat('%',#{sarStandProjectLibrary.projectName}),'%')
</if>
<if test="null != groups and groups.size()>0">
and sar_stand_project_library.project_group in
<foreach collection="groups" index="index" item="item" open="(" separator="," close=")">