Merge remote-tracking branch 'origin/dev_20230216' into dev_20230216
This commit is contained in:
+10
-1
@@ -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
|
||||
|
||||
|
||||
+3
@@ -133,5 +133,8 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
String selectByStandCode(String standCode);
|
||||
|
||||
SarBussionessStand selectByReplaceStandNum(String standCode);
|
||||
|
||||
@Select("select * from sar_bussioness_stand where TEXT_STATUS_BUSS is not null")
|
||||
List<SarBussionessStand> selectAllStandStatus();
|
||||
}
|
||||
|
||||
|
||||
+28
-26
@@ -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()) {
|
||||
|
||||
+112
@@ -4,10 +4,17 @@ import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandState;
|
||||
import com.adc.da.slrs.sarBussionessStandState.service.ISarBussionessStandStateService;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||
import com.adc.da.util.DateUtils;
|
||||
import com.adc.da.utils.util.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -37,6 +44,15 @@ public class StateSync {
|
||||
@Autowired
|
||||
private ISarBussionessStandStateService bussionessStandStateService;
|
||||
|
||||
@Autowired
|
||||
private SarStandardsInfoDao sarStandardsInfoDao;
|
||||
|
||||
@Autowired
|
||||
private SarStandAttrInfoDao sarStandAttrInfoEODao;
|
||||
|
||||
@Autowired
|
||||
private ISarUpdLogService sarUpdLogEOService;
|
||||
|
||||
/**
|
||||
* 根据配置文件设置是否开启定时器
|
||||
*/
|
||||
@@ -270,4 +286,100 @@ public class StateSync {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业标准更新文本状态定时器
|
||||
*/
|
||||
@Scheduled(cron = "0 0 5 * * ?") //每天早晨五点执行
|
||||
public void timeSarBussionessStand(){
|
||||
if (isNotScheduled){
|
||||
logger.info("开始执行企业标准更新文本状态定时器");
|
||||
List<SarBussionessStand> list = sarBussionessStandDao.selectAllStandStatus();
|
||||
if (ObjectUtils.isNotEmpty(list) && list != null){
|
||||
for (SarBussionessStand sarBussionessStand : list){
|
||||
if (StringUtils.isNotBlank(sarBussionessStand.getReplaceStandNum()) && sarBussionessStand != null){
|
||||
SarBussionessStand sarBussionessStand2 = sarBussionessStandDao.selectByReplaceStandNum(sarBussionessStand.getReplaceStandNum());
|
||||
//9z741h2m3j 有效,3lqnlgmgcn 作废
|
||||
if (sarBussionessStand2 != null && (sarBussionessStand.getTextStatusBuss().equals("9z741h2m3j")|| sarBussionessStand.getTextStatusBuss().equals("3lqnlgmgcn"))){
|
||||
sarBussionessStand2.setTextStatusBuss("3lqnlgmgcn");
|
||||
sarBussionessStandDao.updateById(sarBussionessStand2);
|
||||
logger.info("修改企业标准文本状态完成,修改的企业标准id为:" + sarBussionessStand2.getId() + ",企标名称为:" + sarBussionessStand2.getStandName() + ",企标编号为:" + sarBussionessStand2.getStandCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 国内外标准更新文本状态定时器
|
||||
*/
|
||||
@Scheduled(cron = "0 0 5 * * ?") //每天早晨五点执行
|
||||
public void timeSarStandardsInfo()throws Exception{
|
||||
if (isNotScheduled){
|
||||
logger.info("开始执行国内外标准更新文本状态定时器");
|
||||
List<SarStandardsInfo> sarStandardsInfoEOs = sarStandardsInfoDao.getSarStandardsInfo();
|
||||
if (ObjectUtils.isNotEmpty(sarStandardsInfoEOs) && sarStandardsInfoEOs != null) {
|
||||
for (SarStandardsInfo sarStandardsInfoEO : sarStandardsInfoEOs) {
|
||||
if (sarStandardsInfoEO != null && ObjectUtils.isNotEmpty(sarStandardsInfoEO)) {
|
||||
SarStandAttrInfo sarStandAttrInfo = sarStandAttrInfoEODao.getSarStandAttrInfo(sarStandardsInfoEO.getId());
|
||||
if (sarStandAttrInfo != null && ObjectUtils.isNotEmpty(sarStandAttrInfo)){
|
||||
sarStandardsInfoEO.setReplacedStandNum(sarStandAttrInfo.getDtbjh());
|
||||
}
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(sarStandardsInfoEO.getReplaceStandNum())){
|
||||
sarStandardsInfoDao.updateById(sarStandardsInfoEO);
|
||||
String id = sarStandardsInfoEO.getId();
|
||||
List<SarStandardsInfo> sarStandardsInfos = sarStandardsInfoDao.selectBy(id);
|
||||
if (ObjectUtils.isNotEmpty(sarStandardsInfos) && sarStandardsInfos != null){
|
||||
for (SarStandardsInfo sarStandardsInfo:sarStandardsInfos){
|
||||
if (sarStandardsInfo != null && sarStandardsInfo.getStandSort().equals("GB") && (sarStandardsInfoEO.getTextStatus().equals("vsaga7nwub") || sarStandardsInfoEO.getTextStatus().equals("chblaarg77") || sarStandardsInfoEO.getTextStatus().equals("qke0ckro2p"))){
|
||||
String textStatus = "chblaarg77";
|
||||
sarStandardsInfo.setTextStatus(textStatus);
|
||||
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
||||
logger.info("原标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成废止状态");
|
||||
|
||||
String content = "标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成废止状态";
|
||||
sarUpdLogEOService.createBaseLog(sarStandardsInfo.getId(), sarStandardsInfo.getStandType() + "_STAND", content);
|
||||
}else if (sarStandardsInfo != null && (sarStandardsInfoEO.getTextStatus().equals("vsaga7nwub") || sarStandardsInfoEO.getTextStatus().equals("chblaarg77") || sarStandardsInfoEO.getTextStatus().equals("qke0ckro2p"))){
|
||||
String textStatus = "qke0ckro2p";
|
||||
sarStandardsInfo.setTextStatus(textStatus);
|
||||
sarStandardsInfoDao.updateById(sarStandardsInfo);
|
||||
logger.info("原标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成被代替状态");
|
||||
|
||||
String content = "标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成被代替状态";
|
||||
sarUpdLogEOService.createBaseLog(sarStandardsInfo.getId(), sarStandardsInfo.getStandType() + "_STAND", content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<SarStandardsInfo> sarStandardsInfo1s = sarStandardsInfoDao.selectBy1(id);
|
||||
if (ObjectUtils.isNotEmpty(sarStandardsInfo1s) && sarStandardsInfo1s != null){
|
||||
for (SarStandardsInfo sarStandardsInfo1 : sarStandardsInfo1s){
|
||||
if (sarStandardsInfo1 != null && sarStandardsInfo1.getStandSort().equals("GB") && (sarStandardsInfoEO.getTextStatus().equals("vsaga7nwub") || sarStandardsInfoEO.getTextStatus().equals("chblaarg77") || sarStandardsInfoEO.getTextStatus().equals("qke0ckro2p"))){
|
||||
String textStatus = "chblaarg77";
|
||||
sarStandardsInfo1.setTextStatus(textStatus);
|
||||
sarStandardsInfoDao.updateById(sarStandardsInfo1);
|
||||
logger.info("原标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成废止状态");
|
||||
|
||||
String content = "标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成废止状态";
|
||||
sarUpdLogEOService.createBaseLog(sarStandardsInfo1.getId(), sarStandardsInfo1.getStandType() + "_STAND", content);
|
||||
}else if (sarStandardsInfo1 != null && (sarStandardsInfoEO.getTextStatus().equals("vsaga7nwub") || sarStandardsInfoEO.getTextStatus().equals("chblaarg77") || sarStandardsInfoEO.getTextStatus().equals("qke0ckro2p"))){
|
||||
String textStatus = "qke0ckro2p";
|
||||
sarStandardsInfo1.setTextStatus(textStatus);
|
||||
sarStandardsInfoDao.updateById(sarStandardsInfo1);
|
||||
logger.info("原标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成被代替状态");
|
||||
|
||||
String content = "标准号:"+ sarStandardsInfoEO.getReplaceStandNum() +"被代替标准号变更成被代替状态";
|
||||
sarUpdLogEOService.createBaseLog(sarStandardsInfo1.getId(), sarStandardsInfo1.getStandType() + "_STAND", content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -102,4 +102,10 @@ public class QualityEvaluationController extends BaseController<QualityEvaluatio
|
||||
|
||||
return Result.success(score);
|
||||
}
|
||||
|
||||
@ApiOperation("存在重新技术委员会评审、评审意见修改时将技术委员会评审、评审意见修改的评分更新成0")
|
||||
@PostMapping("/updateQualityEvaluation")
|
||||
public ResponseMessage<QualityEvaluation> updateQualityEvaluation(){
|
||||
return iQualityEvaluationService.updateQualityEvaluation();
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,4 +27,18 @@ 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);
|
||||
|
||||
@Select("select * from quality_evaluation")
|
||||
List<QualityEvaluation> selectAll();
|
||||
}
|
||||
|
||||
+3
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.FormVO;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -27,4 +28,6 @@ public interface IQualityEvaluationService extends IService<QualityEvaluation> {
|
||||
|
||||
|
||||
Map<String, Double> getScore(String lawId);
|
||||
|
||||
ResponseMessage<QualityEvaluation> updateQualityEvaluation();
|
||||
}
|
||||
|
||||
+88
-5
@@ -1,5 +1,7 @@
|
||||
package com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.impl;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.EvaluationIndex;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.FormVO;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||
@@ -12,6 +14,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.collections.IterableMap;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -81,6 +84,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 +102,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 +189,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 +258,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());
|
||||
@@ -227,6 +282,34 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 存在重新技术委员会评审、评审意见修改时将技术委员会评审、评审意见修改的评分更新成0
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ResponseMessage<QualityEvaluation> updateQualityEvaluation() {
|
||||
QualityEvaluation qualityEvaluation = new QualityEvaluation();
|
||||
//先查询数据库取出所有数据
|
||||
List<QualityEvaluation> list = qualityEvaluationDao.selectAll();
|
||||
Integer count = 0;
|
||||
//校验list不为空时将获取到的数据进行循环遍历
|
||||
if (ObjectUtils.isNotEmpty(list) && list != null){
|
||||
for (QualityEvaluation qualityEvaluation1 : list){
|
||||
if (qualityEvaluation1.getLawId() != null && !qualityEvaluation1.getLawId().equals("") && qualityEvaluation1.getProcessNode() != null && !qualityEvaluation1.getProcessNode().equals("")){
|
||||
qualityEvaluation.setLawId(qualityEvaluation1.getLawId());
|
||||
qualityEvaluation.setProcessNode(qualityEvaluation1.getProcessNode());
|
||||
if (qualityEvaluation.getProcessNode().equals("重新技术委员会评审、评审意见修改")){
|
||||
qualityEvaluationDao.updateByProcessNode(qualityEvaluation.getLawId());
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
return Result.error("list集合为空");
|
||||
}
|
||||
return Result.success("0","更新技术委员会评审、评审意见修改为空已完成,共修改" + count + "条数据");
|
||||
}
|
||||
|
||||
|
||||
// private Double getScoreSingle(QualityEvaluation item){
|
||||
//
|
||||
|
||||
+62
-2
@@ -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>
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
-- 福田 需要通过第三方调用的接口
|
||||
|
||||
--2023-06-01 09:41
|
||||
--名称 存在重新技术委员会评审、评审意见修改时将技术委员会评审、评审意见修改的评分更新成0
|
||||
--详情
|
||||
--路径 http://localhost:9090/api//sarEnterpriseStandardEvaluation/quality-evaluation/updateQualityEvaluation
|
||||
--参数
|
||||
--类型 post
|
||||
|
||||
|
||||
--2023-05-05 10:18
|
||||
--名称 海外标准文件名称 包含 中,CN/cn 译 的放置译文处
|
||||
--详情
|
||||
|
||||
Reference in New Issue
Block a user