合并分支 'dev_20230216' 到 'master'

Dev 20230216

查看合并请求 laws-foton-slrs/foton-slrs-system-rest!93
This commit is contained in:
高嵩
2023-05-31 18:16:08 +08:00
6 changed files with 169 additions and 35 deletions
@@ -26,6 +26,7 @@ import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandState;
import com.adc.da.slrs.sarBussionessStandState.service.ISarBussionessStandStateService;
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao;
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.IQualityEvaluationService;
import com.adc.da.slrs.sarLawsAttrInfo.service.ISarLawsAttrInfoService;
@@ -112,6 +113,9 @@ public class ActSarItemsBussEOService {
@Autowired
private SarBussionessStandDao sarBussionessStandEODao;
@Autowired
private QualityEvaluationDao qualityEvaluationDao;
public void processCreateFsBuss(String standJson) throws Exception {
Map<String,Object> standMap = new HashMap();
@@ -559,7 +563,12 @@ public class ActSarItemsBussEOService {
});
}
});
qualityEvaluationService.saveBatch(evaluations);
if (evaluations.get(0).getProcessNode().equals("重新技术委员会评审、评审意见修改")){
qualityEvaluationService.saveBatch(evaluations);
qualityEvaluationDao.updateByProcessNode(evaluations.get(0).getLawId());
}else {
qualityEvaluationService.saveBatch(evaluations);
}
}
}
@@ -3,7 +3,7 @@
# 数据库配置
#=============================================
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://121.36.69.172:3307/foton_slrs_test?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.url = jdbc:mysql://121.36.69.172:3307/foton_slrs_20230531?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.username = root
spring.datasource.password = hzwlsoft.com
@@ -1850,36 +1850,38 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
// 查询属性表数据
if (StringUtils.isNotBlank(fieldInfo)) {
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
if(getAttrMap.get("FBGBUSS")!=null){
if(org.apache.commons.lang3.StringUtils.isNotBlank(getAttrMap.get("FBGBUSS").toString())){
String[] split = getAttrMap.get("FBGBUSS").toString().split(",");
String fileId = "";
for (String id :split){
if(id.contains("ATT_FILE_")){
//则是正规数据
if(org.apache.commons.lang3.StringUtils.isNotBlank(fileId)){
fileId = fileId+","+ id;
}else {
fileId = id;
}
}else {
//加工数据
QueryWrapper<OnlineFileLog> onlineFileLogQueryWrapper = new QueryWrapper<>();
onlineFileLogQueryWrapper.eq("HIS_ID",id);
onlineFileLogQueryWrapper.orderByDesc("CREATE_TIME");
List<OnlineFileLog> onlineFileLogs = onlineFileLogDao.selectList(onlineFileLogQueryWrapper);
if(!onlineFileLogs.isEmpty()){
if(org.apache.commons.lang3.StringUtils.isNotBlank(fileId)){
fileId = fileId+","+onlineFileLogs.get(0).getAttFileId();
}else {
fileId = onlineFileLogs.get(0).getAttFileId();
if(getAttrMap!=null) {
if (getAttrMap.get("FBGBUSS") != null) {
if (org.apache.commons.lang3.StringUtils.isNotBlank(getAttrMap.get("FBGBUSS").toString())) {
String[] split = getAttrMap.get("FBGBUSS").toString().split(",");
String fileId = "";
for (String id : split) {
if (id.contains("ATT_FILE_")) {
//则是正规数据
if (org.apache.commons.lang3.StringUtils.isNotBlank(fileId)) {
fileId = fileId + "," + id;
} else {
fileId = id;
}
} else {
//加工数据
QueryWrapper<OnlineFileLog> onlineFileLogQueryWrapper = new QueryWrapper<>();
onlineFileLogQueryWrapper.eq("HIS_ID", id);
onlineFileLogQueryWrapper.orderByDesc("CREATE_TIME");
List<OnlineFileLog> onlineFileLogs = onlineFileLogDao.selectList(onlineFileLogQueryWrapper);
if (!onlineFileLogs.isEmpty()) {
if (org.apache.commons.lang3.StringUtils.isNotBlank(fileId)) {
fileId = fileId + "," + onlineFileLogs.get(0).getAttFileId();
} else {
fileId = onlineFileLogs.get(0).getAttFileId();
}
}
}
}
}
Object obj = fileId;
getAttrMap.put("FBGBUSS", obj);
}
Object obj = fileId;
getAttrMap.put("FBGBUSS",obj);
}
}
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
@@ -26,4 +26,15 @@ public interface QualityEvaluationDao extends BaseMapper<QualityEvaluation> {
public List<QualityEvaluation> getEvaluationForm(@Param(Constants.WRAPPER) QueryWrapper<QualityEvaluation> queryWrapper);
List<Integer> selectCountZQYJ(@Param("node") String node,@Param("lawId") String lawId);
List<Integer> selectCountJSWY(@Param("node") String node,@Param("lawId") String lawId);
List<Integer> selectCXJSWY(@Param("node") String node,@Param("lawId") String lawId);
List<Integer> selectBZHFS(@Param("node") String node,@Param("lawId") String lawId);
List<Integer> selectBZSH(@Param("node") String node,@Param("lawId") String lawId);
void updateByProcessNode(@Param("lawId") String lawId);
}
@@ -81,6 +81,9 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
}else {
upObj.setReason("-");
}
if ("重新技术委员会评审、评审意见修改".equals(upObj.getProcessNode())){
qualityEvaluationDao.updateByProcessNode(tableData.get(0).getLawId());
}
return upObj;
}).orElse(null))
.collect(Collectors.toList());
@@ -96,6 +99,9 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
item.setScore(String.valueOf (Double.parseDouble(item.getScore()) * 2) );
}
if ("重新技术委员会评审、评审意见修改".equals(item.getProcessNode())){
qualityEvaluationDao.updateByProcessNode(tableData.get(0).getLawId());
}
});
return this.saveBatch(tableData);
}
@@ -180,6 +186,52 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
// ));
Integer countZQYJStr = null;
Integer countJSWYStr = null;
Integer countCXJSWYStr = null;
Integer countBZHFSStr = null;
Integer countBZSHStr = null;
if(!list.isEmpty()){
for (QualityEvaluation qualityEvaluations :list){
if(qualityEvaluations.getProcessNode().equals("征求意见")) {
List<Integer> countZQYJList = qualityEvaluationDao.selectCountZQYJ(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
if(!countZQYJList.isEmpty()){
countZQYJStr = countZQYJList.size();
}
}
if(qualityEvaluations.getProcessNode().equals("技术委员会评审、评审意见修改")) {
List<Integer> countJSWYList = qualityEvaluationDao.selectCountJSWY(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
if(!countJSWYList.isEmpty()){
countJSWYStr = countJSWYList.size();
}
}
if(qualityEvaluations.getProcessNode().equals("重新技术委员会评审、评审意见修改")) {
List<Integer> countCXJSWYList = qualityEvaluationDao.selectCXJSWY(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
if(!countCXJSWYList.isEmpty()){
countCXJSWYStr = countCXJSWYList.size();
}
}
if(qualityEvaluations.getProcessNode().equals("标准化复审")) {
List<Integer> countBZHFSList = qualityEvaluationDao.selectBZHFS(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
if(!countBZHFSList.isEmpty()){
countBZHFSStr = countBZHFSList.size();
}
}
if(qualityEvaluations.getProcessNode().equals("标准法规部高级经理审核")) {
List<Integer> countBZSHList = qualityEvaluationDao.selectBZSH(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
if(!countBZSHList.isEmpty()){
countBZSHStr = countBZSHList.size();
}
}
}
}
final Integer countZQYJ = countZQYJStr;
final Integer countJSWY = countJSWYStr;
final Integer countCXJSWY = countCXJSWYStr;
final Integer countBZHFS = countBZHFSStr;
final Integer countBZSH = countBZSHStr;
HashMap<String, Double> result = new HashMap<>();
result.put("dynamic",0.0);
result.put("quality",0.0);
@@ -203,19 +255,19 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
}
switch (value){
case "征求意见":
score=Double.valueOf(item.getScore()) * 0.3;
score=Double.valueOf(item.getScore()) / countZQYJ * 0.3;
break;
case "技术委员会评审、评审意见修改":
score=Double.valueOf(item.getScore()) * 0.4;
score=Double.valueOf(item.getScore()) / countJSWY * 0.4;
break;
case "重新技术委员会评审、评审意见修改":
score=Double.valueOf(item.getScore()) * 0.4;
score=Double.valueOf(item.getScore()) / countCXJSWY * 0.4;
break;
case "标准化复审":
score=Double.valueOf(item.getScore()) * 0.15;
score=Double.valueOf(item.getScore()) / countBZHFS * 0.15;
break;
case "标准法规部高级经理审核":
score=Double.valueOf(item.getScore()) * 0.15;
score=Double.valueOf(item.getScore()) / countBZSH * 0.15;
break;
default: score=Double.valueOf(item.getScore());
@@ -2,6 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao">
<update id="updateByProcessNode">
update quality_evaluation set score = '0' where law_id = #{lawId} and process_node = '技术委员会评审、评审意见修改'
</update>
<select id="getHistory"
resultType="com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation">
@@ -11,8 +15,9 @@
`index`.value_type as valueType,
eva.evaluation_type as evaluationType,
process_node as processNode,
sum(eva.score * `index`.weight) AS score,
max(eva.create_time) as createTiem
sum(eva.score) AS score,
max(eva.create_time) as createTiem,
eva.law_id
FROM
quality_evaluation AS eva
LEFT JOIN ts_user `user` ON eva.user_id = `user`.USID
@@ -64,4 +69,59 @@
)
ORDER BY `index`.index_sort
</select>
<select id="selectCountZQYJ" resultType="java.lang.Integer">
select
count(1)
from
quality_evaluation
where
law_id = #{lawId}
and process_node = '征求意见'
group by user_id
</select>
<select id="selectCountJSWY" resultType="java.lang.Integer">
select
count(1)
from
quality_evaluation
where
law_id = #{lawId}
and process_node = '技术委员会评审、评审意见修改'
group by user_id
</select>
<select id="selectCXJSWY" resultType="java.lang.Integer">
select
count(1)
from
quality_evaluation
where
law_id = #{lawId}
and process_node = '重新技术委员会评审、评审意见修改'
group by user_id
</select>
<select id="selectBZHFS" resultType="java.lang.Integer">
select
count(1)
from
quality_evaluation
where
law_id = #{lawId}
and process_node = '标准化复审'
group by user_id
</select>
<select id="selectBZSH" resultType="java.lang.Integer">
select
count(1)
from
quality_evaluation
where
law_id = #{lawId}
and process_node = '标准法规部高级经理审核'
group by user_id
</select>
</mapper>