Merge branch 'dev_20230424_TJ'

# Conflicts:
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLawsInventoryEOController.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLawsInventoryEOService.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java
#	jero-web/src/common/lang/en-us.js
This commit is contained in:
高嵩
2023-05-06 18:39:04 +08:00
75 changed files with 8226 additions and 2258 deletions
@@ -622,3 +622,25 @@ INSERT INTO `sys_dict_item`(`id`, `dict_id`, `item_text`, `item_value`, `descrip
-- 市场认证清单 增加字段 2023-04-17 未同步生产环境 -- 市场认证清单 增加字段 2023-04-17 未同步生产环境
ALTER TABLE `auth_dummy_inventory_info` ALTER TABLE `auth_dummy_inventory_info`
ADD COLUMN `attestation_type` varchar(2000) NULL COMMENT '认证类型' AFTER `deliverable_template`; ADD COLUMN `attestation_type` varchar(2000) NULL COMMENT '认证类型' AFTER `deliverable_template`;
-- 市场法规清单 增加字段 2023-04-24 未同步生产环境
ALTER TABLE `dummy_inventory_base`
ADD COLUMN `version_num` varchar(2000) NULL COMMENT '版本号' AFTER `dummy_inventory_info_id`,
ADD COLUMN `upgrade_explanation` varchar(2000) NULL COMMENT '升版说明' AFTER `version_num`;
-- 市场认证清单 增加字段 2023-04-24 未同步生产环境
ALTER TABLE `auth_dummy_inventory_base`
ADD COLUMN `version_num` varchar(2000) NULL COMMENT '版本号' AFTER `state`,
ADD COLUMN `upgrade_explanation` varchar(2000) NULL COMMENT '升版说明' AFTER `version_num`;
-- 法规/认证任务计划 增加字段 2023-05-05 未同步生产环境
ALTER TABLE `project_task_planning`
ADD COLUMN `zero` datetime(0) NULL COMMENT '概念验证阶段' AFTER `sys_org_code`,
ADD COLUMN `one` datetime(0) NULL COMMENT '初样阶段' AFTER `zero`,
ADD COLUMN `two` datetime(0) NULL COMMENT '工艺方案阶段' AFTER `one`,
ADD COLUMN `three` datetime(0) NULL COMMENT '零件试制阶段' AFTER `two`,
ADD COLUMN `four` datetime(0) NULL COMMENT '整车装配工艺方案阶段' AFTER `three`,
ADD COLUMN `five` datetime(0) NULL COMMENT '预生产阶段' AFTER `four`,
ADD COLUMN `six` datetime(0) NULL COMMENT '试产阶段' AFTER `five`,
ADD COLUMN `seven` datetime(0) NULL COMMENT '小批量生产阶段' AFTER `six`,
ADD COLUMN `eight` datetime(0) NULL COMMENT '大规模生产阶段' AFTER `seven`;
@@ -112,6 +112,13 @@ public class SysDictItem implements Serializable {
@ApiModelProperty(value = "字典英文名称") @ApiModelProperty(value = "字典英文名称")
private String enName; private String enName;
/**
* 统计节点(主要为责任领域)
*/
@Excel(name = "统计节点", width = 15)
@ApiModelProperty(value = "统计节点")
private String statNode;
@TableField(exist = false) @TableField(exist = false)
private String cut; private String cut;
} }
@@ -4,6 +4,7 @@ import com.jero.modules.system.entity.SysDictItem;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -46,4 +47,12 @@ public interface ISysDictItemService extends IService<SysDictItem> {
* @return * @return
*/ */
String disposeShowDictItemText(List<SysDictItem> sysDictItems,String fieldTexts,String cut,String dicCode); String disposeShowDictItemText(List<SysDictItem> sysDictItems,String fieldTexts,String cut,String dicCode);
/**
* 根据字典code获取一级数据字典
* @param dictCode
* @param sysDictItems
* @return
*/
Map<String, List<SysDictItem>> getFirstLevelSysDictItemByDictCode(String dictCode,List<SysDictItem> sysDictItems);
} }
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.CommonConstant; import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.modules.enums.DictCodeEnum;
import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.mapper.SysDictItemMapper; import com.jero.modules.system.mapper.SysDictItemMapper;
import com.jero.modules.system.service.ISysDictItemService; import com.jero.modules.system.service.ISysDictItemService;
@@ -13,7 +14,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@@ -231,4 +234,27 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
} }
return result; return result;
} }
@Override
public Map<String, List<SysDictItem>> getFirstLevelSysDictItemByDictCode(String dictCode,List<SysDictItem> sysDictItems) {
List<SysDictItem> sysDictItemByDictCode = sysDictItems.stream().filter(sysDict -> {
boolean flag = false;
if (StringUtils.equals(sysDict.getDictCode(), dictCode)) {
flag = true;
}
return flag;
}).collect(Collectors.toList());
Map<String, List<SysDictItem>> result = null;
if(CollectionUtils.isNotEmpty(sysDictItemByDictCode)){
result = sysDictItems.stream().filter(sysDict -> {
boolean flag = false;
if (StringUtils.isNotEmpty(sysDict.getStatNode())) {
flag = true;
}
return flag;
}).collect(Collectors.groupingBy(SysDictItem::getStatNode));
}
return result;
}
} }
@@ -84,4 +84,16 @@ public class AuthDummyInventoryBaseEO implements Serializable {
/**订阅标识*/ /**订阅标识*/
@TableField(exist = false) @TableField(exist = false)
private String readFlag; private String readFlag;
/**版本号*/
@ApiModelProperty(value = "版本号")
private String versionNum;
/**升版说明*/
@ApiModelProperty(value = "升版说明")
private String upgradeExplanation;
// 是否升级 1是2否
@TableField(exist = false)
private String upgradeOrNot;
} }
@@ -11,17 +11,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum; import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.authDummy.entity.AuthDummyContentChangeEO; import com.jero.modules.authDummy.entity.*;
import com.jero.modules.authDummy.entity.AuthDummyInventoryBaseEO;
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
import com.jero.modules.authDummy.entity.AuthDummyReadEO;
import com.jero.modules.authDummy.mapper.AuthDummyInventoryBaseEOMapper; import com.jero.modules.authDummy.mapper.AuthDummyInventoryBaseEOMapper;
import com.jero.modules.authDummy.service.IAuthDummyContentChangeEOService; import com.jero.modules.authDummy.service.*;
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService;
import com.jero.modules.authDummy.service.IAuthDummyReadEOService;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.dummy.entity.DummyContentChangeEO; import com.jero.modules.dummy.entity.DummyContentChangeEO;
import com.jero.modules.dummy.entity.DummyInventoryBaseEO; import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
@@ -29,8 +24,12 @@ import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
import com.jero.modules.dummy.entity.DummyReadEO; import com.jero.modules.dummy.entity.DummyReadEO;
import com.jero.modules.dummy.enums.InventoryStateEnum; import com.jero.modules.dummy.enums.InventoryStateEnum;
import com.jero.modules.dummy.enums.ReadFlagEnum; import com.jero.modules.dummy.enums.ReadFlagEnum;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.feishu.vo.FeishuMsgVo; import com.jero.modules.feishu.vo.FeishuMsgVo;
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
import com.jero.modules.log.enums.ListTypeEnum;
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
import com.jero.modules.system.entity.SysAnnouncement; import com.jero.modules.system.entity.SysAnnouncement;
import com.jero.modules.system.service.ISysAnnouncementService; import com.jero.modules.system.service.ISysAnnouncementService;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
@@ -43,10 +42,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -94,6 +90,11 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
@Resource @Resource
private IFeishuService iFeishuService; private IFeishuService iFeishuService;
@Autowired
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
@Autowired
private IAuthDummyLogService authDummyLogService;
/** /**
* 保存 * 保存
* *
@@ -142,6 +143,35 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
@Override @Override
public void deleteByIds(List<String> ids) { public void deleteByIds(List<String> ids) {
removeByIds(ids); removeByIds(ids);
// 市场认证清单明细数据
QueryWrapper<AuthDummyInventoryInfoEO> adiRemoveWrap = new QueryWrapper<>();
adiRemoveWrap.lambda().in(AuthDummyInventoryInfoEO::getAuthDummyInventoryBaseId,ids);
this.iAuthDummyInventoryInfoEOService.remove(adiRemoveWrap);
// 内容变更表数据
QueryWrapper<AuthDummyContentChangeEO> adccConnectIdRemoveWrap = new QueryWrapper<>();
adccConnectIdRemoveWrap.lambda().in(AuthDummyContentChangeEO::getConnectId,ids);
this.iAuthDummyContentChangeEOService.remove(adccConnectIdRemoveWrap);
QueryWrapper<AuthDummyContentChangeEO> adccPidRemoveWrap = new QueryWrapper<>();
adccPidRemoveWrap.lambda().in(AuthDummyContentChangeEO::getParentId,ids);
this.iAuthDummyContentChangeEOService.remove(adccPidRemoveWrap);
// 更新log数据
QueryWrapper<AuthDummyLog> adlRemoveWrap = new QueryWrapper<>();
adlRemoveWrap.lambda().in(AuthDummyLog::getAuthDummyInventoryBaseId,ids);
this.authDummyLogService.remove(adlRemoveWrap);
// 订阅数据
QueryWrapper<AuthDummyReadEO> adrRemoveWrap = new QueryWrapper<>();
adrRemoveWrap.lambda().in(AuthDummyReadEO::getAuthDummyInventoryBaseId,ids);
this.authDummyReadEOService.remove(adrRemoveWrap);
// 市场清单版本历史数据
QueryWrapper<MarketListVersionUpdateLogEO> mlvLogRemoveWrap = new QueryWrapper<>();
mlvLogRemoveWrap.lambda().eq(MarketListVersionUpdateLogEO::getListType,ListTypeEnum.MARKET_CERTIFICATION_LIST.getValue());
mlvLogRemoveWrap.lambda().in(MarketListVersionUpdateLogEO::getListId,ids);
this.marketListVersionUpdateLogEOService.remove(mlvLogRemoveWrap);
} }
/** /**
@@ -258,10 +288,24 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
baseWrapper.set("update_by",sysUser.getUsername()) baseWrapper.set("update_by",sysUser.getUsername())
.set("update_time",now); .set("update_time",now);
} }
if(org.apache.commons.lang3.StringUtils.equals(authDummyInventoryBaseEO.getUpgradeOrNot(), YesOrNoEnum.YES.getValue())){
String upgradeExplanation = authDummyInventoryBaseEO.getUpgradeExplanation();
String versionNum = authDummyInventoryBaseEO.getVersionNum();
baseWrapper.set("upgrade_explanation",upgradeExplanation);
baseWrapper.set("version_num",versionNum);
// 将数据添加到市场清单版本更新log中。
MarketListVersionUpdateLogEO mlvLogEo = new MarketListVersionUpdateLogEO();
mlvLogEo.setListId(authDummyInventoryBaseEO.getId());
mlvLogEo.setVersionNum(versionNum);
mlvLogEo.setUpgradeExplanation(upgradeExplanation);
mlvLogEo.setListType(ListTypeEnum.MARKET_CERTIFICATION_LIST.getValue());
this.marketListVersionUpdateLogEOService.add(mlvLogEo);
}
baseWrapper.eq("id",authDummyInventoryBaseEO.getId()); baseWrapper.eq("id",authDummyInventoryBaseEO.getId());
authDummyInventoryBaseEOMapper.update(null,baseWrapper); authDummyInventoryBaseEOMapper.update(null,baseWrapper);
if(InventoryStateEnum.ISSUE.getValue().equals(authDummyInventoryBaseEO.getState())){ if(InventoryStateEnum.ISSUE.getValue().equals(authDummyInventoryBaseEO.getState()) && org.apache.commons.lang3.StringUtils.equals(authDummyInventoryBaseEO.getUpgradeOrNot(),YesOrNoEnum.YES.getValue())){
//先判断第一次发布的时候是否保存过数据 //先判断第一次发布的时候是否保存过数据
LambdaQueryWrapper<AuthDummyContentChangeEO> wrapper =new LambdaQueryWrapper<>(); LambdaQueryWrapper<AuthDummyContentChangeEO> wrapper =new LambdaQueryWrapper<>();
wrapper.in(AuthDummyContentChangeEO::getConnectId,authDummyInventoryBaseEO.getId()); wrapper.in(AuthDummyContentChangeEO::getConnectId,authDummyInventoryBaseEO.getId());
@@ -395,8 +439,9 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
List<String> userNameList = authDummyReadEOService.queryReadUserInfo(authDummyInventoryBaseEO.getId()); List<String> userNameList = authDummyReadEOService.queryReadUserInfo(authDummyInventoryBaseEO.getId());
List<String> thirdIdList = new ArrayList<>(); List<String> thirdIdList = new ArrayList<>();
List<String> userIdList = new ArrayList<>();
if(userNameList.size() != 0){ if(userNameList.size() != 0){
List<String> userIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getId()).collect(Collectors.toList()); userIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getId()).collect(Collectors.toList());
thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList()); thirdIdList = sysUserService.queryUserIdListByNameList(userNameList).stream().map(e -> e.getThirdId()).collect(Collectors.toList());
if(userIdList.size() != 0){ if(userIdList.size() != 0){
//封装消息的实体类 //封装消息的实体类
@@ -418,15 +463,41 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
String href = backUrl + "/virtualAuthenticationListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单"; String href = backUrl + "/virtualAuthenticationListDetails?name=" + baseEO.getName() + "&useExplain=" + baseEO.getUseExplain() +"&id=" + baseEO.getId() +"&title=维护虚拟清单";
try { try {
String contentInfoFeiCn = "您所订阅的"+baseEO.getName()+"虚拟认证清单已更新,更新内容如下:"; String contentInfoFeiCn = "您所订阅的"+baseEO.getName()+"虚拟认证清单已更新,更新内容如下:";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); // FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName()); // feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
feishuMsgVo.setUrl(href); // feishuMsgVo.setUrl(href);
feishuMsgVo.setContentEn(contentLogFeishuTemp); // feishuMsgVo.setContentEn(contentLogFeishuTemp);
feishuMsgVo.setContent(contentInfoFeiCn); // feishuMsgVo.setContent(contentInfoFeiCn);
//
iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}),feishuMsgVo,serialNumberAddList,serialNumberDeleteList); // iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}),feishuMsgVo,serialNumberAddList,serialNumberDeleteList);
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentLogFeishu, MessageTypeEnum.PUSH.getName(), href); // iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentLogFeishu, MessageTypeEnum.PUSH.getName(), href);
} catch (IOException e) {
String contentCn = "";
String contentEn = "";
if(!serialNumberAddList.isEmpty() && serialNumberDeleteList.isEmpty()){
contentCn = "1. 新增文档: " + org.apache.commons.lang3.StringUtils.join(serialNumberAddList,",");
contentEn = "1. New regulations: " + org.apache.commons.lang3.StringUtils.join(serialNumberAddList,",");
}
if(serialNumberAddList.isEmpty() && !serialNumberDeleteList.isEmpty()){
contentCn = "1. 删除文档: " + org.apache.commons.lang3.StringUtils.join(serialNumberDeleteList,",");
contentEn = "1. Remove regulations: " + org.apache.commons.lang3.StringUtils.join(serialNumberDeleteList,",");
}
if(!serialNumberAddList.isEmpty() && !serialNumberDeleteList.isEmpty()){
contentCn = "1. 新增文档: " + org.apache.commons.lang3.StringUtils.join(serialNumberAddList,",") + "\n"
+"2. 删除文档: " + org.apache.commons.lang3.StringUtils.join(serialNumberDeleteList,",");
contentEn = "1. New regulations: " + org.apache.commons.lang3.StringUtils.join(serialNumberAddList,",") + "\n"
+"2. Remove regulations: " + org.apache.commons.lang3.StringUtils.join(serialNumberDeleteList,",");
}
//飞书消息(模板-20230410
Map<String,Object> params = new HashMap<>();
params.put("contentInfoFeiCn",contentInfoFeiCn + "\n" + contentCn);
params.put("contentInfoFeiEn",contentLogFeishuTemp + "\n" + contentEn);
params.put("userIdList",userIdList);
params.put("back_url",href);
params.put("titleCn", TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameCn());
params.put("titleEn",TemplateInfoEnum2.SUBSCRIPTION_INFORM.getNameEn());
iFeishuService.sendMessageSubscriptionNotification(TemplateInfoEnum2.SUBSCRIPTION_INFORM.getValue(),params);
} catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
@@ -35,4 +35,6 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
IPage selectpage(@Param("page") IPage page, @Param("sqlJoin") String sqlJoin, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO); IPage selectpage(@Param("page") IPage page, @Param("sqlJoin") String sqlJoin, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO);
List<ParamsCollectManifestEO> queryByProjectId(@Param("projectId") String projectId); List<ParamsCollectManifestEO> queryByProjectId(@Param("projectId") String projectId);
List<ParamsCollectManifestEO> getList(@Param("params") Map<String, Object> params);
} }
@@ -139,5 +139,8 @@
<select id="queryByProjectId" resultMap="ParamsCollectManifestEOResultMap"> <select id="queryByProjectId" resultMap="ParamsCollectManifestEOResultMap">
SELECT * from params_collect_manifest pcm LEFT JOIN params_manifest pm ON pm.id = pcm.params_manifest_id WHERE pm.project_id = #{projectId} SELECT * from params_collect_manifest pcm LEFT JOIN params_manifest pm ON pm.id = pcm.params_manifest_id WHERE pm.project_id = #{projectId}
</select> </select>
<select id="getList" resultType="com.jero.modules.cert.collect.entity.ParamsCollectManifestEO">
SELECT id,params_manifest_id,state FROM params_collect_manifest
</select>
</mapper> </mapper>
@@ -200,4 +200,6 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
// 认证工程师-批量编辑截止时间 // 认证工程师-批量编辑截止时间
Result<?> batchEditDeadline(ParamsCollectManifestVO paramsCollectManifestVO); Result<?> batchEditDeadline(ParamsCollectManifestVO paramsCollectManifestVO);
List<ParamsCollectManifestEO> getList(Map<String,Object> params);
} }
@@ -7256,4 +7256,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
return Result.OK("批量编辑截止时间成功!"); return Result.OK("批量编辑截止时间成功!");
} }
@Override
public List<ParamsCollectManifestEO> getList(Map<String,Object> params) {
List<ParamsCollectManifestEO> result = this.baseMapper.getList(params);
return result;
}
} }
@@ -4303,7 +4303,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (key.equals(fieldName)) { if (key.equals(fieldName)) {
//字段类型(判断是输入框还是下拉,等等) //字段类型(判断是输入框还是下拉,等等)
String fieldType = (String) map.get("field_show_type");//字段类型 String fieldType = (String) map.get("field_show_type");//字段类型
if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldType) || FieldTypeEnum.TEXT_NUMBER.getValue().equals(fieldType)) { if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldType) || FieldTypeEnum.TEXT_NUMBER.getValue().equals(fieldType)|| FieldTypeEnum.STANDARD.getValue().equals(fieldType)) {
//输入框 LIKE CONCAT("%", '/%', "%") ESCAPE '/' //输入框 LIKE CONCAT("%", '/%', "%") ESCAPE '/'
if (value.contains("%")) { if (value.contains("%")) {
value = value.replace("%", "/%"); value = value.replace("%", "/%");
@@ -95,4 +95,15 @@ public class DummyInventoryBaseEO implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String orderByField; private String orderByField;
/**版本号*/
@ApiModelProperty(value = "版本号")
private String versionNum;
/**升版说明*/
@ApiModelProperty(value = "升版说明")
private String upgradeExplanation;
// 是否升级 1是0否 对应枚举类 YesOrNoEnum
@TableField(exist = false)
private String upgradeOrNot;
} }
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum; import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
@@ -30,6 +31,9 @@ import com.jero.modules.dummy.service.IDummyReadEOService;
import com.jero.modules.dummy.vo.VirtualCreaterVo; import com.jero.modules.dummy.vo.VirtualCreaterVo;
import com.jero.modules.feishu.enums.TemplateInfoEnum2; import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService; import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
import com.jero.modules.log.enums.ListTypeEnum;
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.system.entity.SysAnnouncement; import com.jero.modules.system.entity.SysAnnouncement;
@@ -105,6 +109,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
private DummyLogEOServiceImpl dummyLogEOService; private DummyLogEOServiceImpl dummyLogEOService;
@Autowired @Autowired
private DummyInventoryBaseEOMapper dummyInventoryBaseEOMapper; private DummyInventoryBaseEOMapper dummyInventoryBaseEOMapper;
@Autowired
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
/** /**
* 保存 * 保存
@@ -227,6 +233,17 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
QueryWrapper<DummyLogEO> logEOQueryWrapper = new QueryWrapper<>(); QueryWrapper<DummyLogEO> logEOQueryWrapper = new QueryWrapper<>();
logEOQueryWrapper.in("dummy_inventory_base_id",ids); logEOQueryWrapper.in("dummy_inventory_base_id",ids);
dummyLogEOService.remove(logEOQueryWrapper); dummyLogEOService.remove(logEOQueryWrapper);
// 订阅数据
QueryWrapper<DummyReadEO> drRemoveWrap = new QueryWrapper<>();
drRemoveWrap.lambda().in(DummyReadEO::getDummyInventoryBaseId,ids);
this.dummyReadEOService.remove(drRemoveWrap);
// 市场清单版本历史数据
QueryWrapper<MarketListVersionUpdateLogEO> mlvLogRemoveWrap = new QueryWrapper<>();
mlvLogRemoveWrap.lambda().eq(MarketListVersionUpdateLogEO::getListType,ListTypeEnum.MARKET_REGULATION_LIST.getValue());
mlvLogRemoveWrap.lambda().in(MarketListVersionUpdateLogEO::getListId,ids);
this.marketListVersionUpdateLogEOService.remove(mlvLogRemoveWrap);
} }
/** /**
@@ -346,6 +363,20 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
baseWrapper.set("update_by",sysUser.getUsername()) baseWrapper.set("update_by",sysUser.getUsername())
.set("update_time",now); .set("update_time",now);
} }
if(StringUtils.equals(dummyInventoryBaseEO.getUpgradeOrNot(), YesOrNoEnum.YES.getValue())){
String upgradeExplanation = dummyInventoryBaseEO.getUpgradeExplanation();
String versionNum = dummyInventoryBaseEO.getVersionNum();
baseWrapper.set("upgrade_explanation",upgradeExplanation);
baseWrapper.set("version_num",versionNum);
// 将数据添加到市场清单版本更新log中。
MarketListVersionUpdateLogEO mlvLogEo = new MarketListVersionUpdateLogEO();
mlvLogEo.setListId(dummyInventoryBaseEO.getId());
mlvLogEo.setVersionNum(versionNum);
mlvLogEo.setUpgradeExplanation(upgradeExplanation);
mlvLogEo.setListType(ListTypeEnum.MARKET_REGULATION_LIST.getValue());
this.marketListVersionUpdateLogEOService.add(mlvLogEo);
}
baseWrapper.eq("id",dummyInventoryBaseEO.getId()); baseWrapper.eq("id",dummyInventoryBaseEO.getId());
dummyInventoryBaseEOMapper.update(null,baseWrapper); dummyInventoryBaseEOMapper.update(null,baseWrapper);
// this.updateById(dummyInventoryBaseEO); // this.updateById(dummyInventoryBaseEO);
@@ -361,7 +392,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
//先判断是发布还是撤回 1-->发布 2-->撤回 //先判断是发布还是撤回 1-->发布 2-->撤回
//撤回需要发消息 //撤回需要发消息
if(InventoryStateEnum.ISSUE.getValue().equals(dummyInventoryBaseEO.getState())){ if(InventoryStateEnum.ISSUE.getValue().equals(dummyInventoryBaseEO.getState()) && StringUtils.equals(dummyInventoryBaseEO.getUpgradeOrNot(),YesOrNoEnum.YES.getValue())){
//先判断第一次发布的时候是否保存过数据 //先判断第一次发布的时候是否保存过数据
LambdaQueryWrapper<DummyContentChangeEO> wrapper =new LambdaQueryWrapper<>(); LambdaQueryWrapper<DummyContentChangeEO> wrapper =new LambdaQueryWrapper<>();
wrapper.in(DummyContentChangeEO::getConnectId,dummyInventoryBaseEO.getId()); wrapper.in(DummyContentChangeEO::getConnectId,dummyInventoryBaseEO.getId());
@@ -0,0 +1,170 @@
package com.jero.modules.log.controller;
import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
* @Description: 市场清单版本更新log表
* @Author: jero-boot
* @Date: 2023-04-24
* @Version: V1.0
*/
@Api(tags="市场清单版本更新log表")
@RestController
@RequestMapping("/log/marketListVersionUpdateLogEO")
@Slf4j
public class MarketListVersionUpdateLogEOController extends JeroController<MarketListVersionUpdateLogEO, IMarketListVersionUpdateLogEOService> {
@Autowired
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
/**
* 分页列表查询
*
* @param marketListVersionUpdateLogEO
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "市场清单版本更新log表-分页列表查询")
@ApiOperation(value="市场清单版本更新log表-分页列表查询", notes="市场清单版本更新log表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MarketListVersionUpdateLogEO> queryWrapper = QueryGenerator.initQueryWrapper(marketListVersionUpdateLogEO, req.getParameterMap());
Page<MarketListVersionUpdateLogEO> page = new Page<MarketListVersionUpdateLogEO>(pageNo, pageSize);
IPage<MarketListVersionUpdateLogEO> pageList = marketListVersionUpdateLogEOService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "市场清单版本更新log表-列表查询")
@ApiOperation(value="市场清单版本更新log表-列表查询", notes="市场清单版本更新log表-列表查询")
@GetMapping(value = "/list")
public Result<List<MarketListVersionUpdateLogEO>> queryList() {
List<MarketListVersionUpdateLogEO> list = marketListVersionUpdateLogEOService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param marketListVersionUpdateLogEO
* @return
*/
@AutoLog(value = "市场清单版本更新log表-添加")
@ApiOperation(value="市场清单版本更新log表-添加", notes="市场清单版本更新log表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
marketListVersionUpdateLogEOService.add(marketListVersionUpdateLogEO);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param marketListVersionUpdateLogEO
* @return
*/
@AutoLog(value = "市场清单版本更新log表-编辑")
@ApiOperation(value="市场清单版本更新log表-编辑", notes="市场清单版本更新log表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
marketListVersionUpdateLogEOService.editById(marketListVersionUpdateLogEO);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "市场清单版本更新log表-通过id删除")
@ApiOperation(value="市场清单版本更新log表-通过id删除", notes="市场清单版本更新log表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
marketListVersionUpdateLogEOService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "市场清单版本更新log表-批量删除")
@ApiOperation(value="市场清单版本更新log表-批量删除", notes="市场清单版本更新log表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.marketListVersionUpdateLogEOService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "市场清单版本更新log表-通过id查询")
@ApiOperation(value="市场清单版本更新log表-通过id查询", notes="市场清单版本更新log表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
MarketListVersionUpdateLogEO marketListVersionUpdateLogEO = marketListVersionUpdateLogEOService.queryById(id);
if(marketListVersionUpdateLogEO==null) {
return Result.error("未找到对应数据");
}
return Result.OK(marketListVersionUpdateLogEO);
}
/**
* 导出excel
*
* @param request
* @param marketListVersionUpdateLogEO
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
return super.exportXls(request, marketListVersionUpdateLogEO, MarketListVersionUpdateLogEO.class, "市场清单版本更新log表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MarketListVersionUpdateLogEO.class);
}
}
@@ -0,0 +1,81 @@
package com.jero.modules.log.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 市场清单版本更新log表
* @Author: jero-boot
* @Date: 2023-04-24
* @Version: V1.0
*/
@Data
@TableName("market_list_version_update_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="market_list_version_update_log对象", description="市场清单版本更新log表")
public class MarketListVersionUpdateLogEO implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**版本号*/
@Excel(name = "版本号", width = 15)
@ApiModelProperty(value = "版本号")
private String versionNum;
/**升版说明*/
@Excel(name = "升版说明", width = 15)
@ApiModelProperty(value = "升版说明")
private String upgradeExplanation;
/**清单类型*/
@Excel(name = "清单类型", width = 15)
@ApiModelProperty(value = "清单类型")
private String listType;
/**清单id*/
@Excel(name = "清单id", width = 15)
@ApiModelProperty(value = "清单id")
private String listId;
}
@@ -0,0 +1,33 @@
package com.jero.modules.log.enums;
/**
* 清单类型枚举类
*/
public enum ListTypeEnum {
MARKET_REGULATION_LIST("市场法规清单","Market Regulation List"),
MARKET_CERTIFICATION_LIST("市场认证清单","Market Certification List");
String name;
String value;
private ListTypeEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@@ -0,0 +1,17 @@
package com.jero.modules.log.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 市场清单版本更新log表
* @Author: jero-boot
* @Date: 2023-04-24
* @Version: V1.0
*/
public interface MarketListVersionUpdateLogEOMapper extends BaseMapper<MarketListVersionUpdateLogEO> {
}
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jero.modules.log.mapper.MarketListVersionUpdateLogEOMapper">
<resultMap id="MarketListVersionUpdateLogEOResultMap" type="com.jero.modules.log.entity.MarketListVersionUpdateLogEO">
<id column="id" property="id" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="sys_org_code" property="sysOrgCode" />
<result column="version_num" property="versionNum" />
<result column="upgrade_explanation" property="upgradeExplanation" />
<result column="list_type" property="listType" />
<result column="list_id" property="listId" />
</resultMap>
</mapper>
@@ -0,0 +1,61 @@
package com.jero.modules.log.service;
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 市场清单版本更新log表
* @Author: jero-boot
* @Date: 2023-04-24
* @Version: V1.0
*/
public interface IMarketListVersionUpdateLogEOService extends IService<MarketListVersionUpdateLogEO> {
/**
* 保存
*
* @param marketListVersionUpdateLogEO
* @return
*/
void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO);
/**
* 更新
*
* @param marketListVersionUpdateLogEO
* @return
*/
void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO);
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
MarketListVersionUpdateLogEO queryById(String id);
/**
* 列表查询
*
* @return
*/
List<MarketListVersionUpdateLogEO> queryList();
}
@@ -0,0 +1,89 @@
package com.jero.modules.log.service.impl;
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
import com.jero.modules.log.mapper.MarketListVersionUpdateLogEOMapper;
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 市场清单版本更新log表
* @Author: jero-boot
* @Date: 2023-04-24
* @Version: V1.0
*/
@Service
public class MarketListVersionUpdateLogEOServiceImpl extends ServiceImpl<MarketListVersionUpdateLogEOMapper, MarketListVersionUpdateLogEO> implements IMarketListVersionUpdateLogEOService {
/**
* 保存
*
* @param marketListVersionUpdateLogEO
* @return
*/
@Override
public void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
Date now = new Date();
marketListVersionUpdateLogEO.setCreateTime(now);
marketListVersionUpdateLogEO.setUpdateTime(now);
save(marketListVersionUpdateLogEO);
}
/**
* 更新
*
* @param marketListVersionUpdateLogEO
* @return
*/
@Override
public void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
Date now = new Date();
marketListVersionUpdateLogEO.setUpdateTime(now);
saveOrUpdate(marketListVersionUpdateLogEO);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public MarketListVersionUpdateLogEO queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
public List<MarketListVersionUpdateLogEO> queryList() {
return list();
}
}
@@ -540,4 +540,30 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
Map<String, List<Map<String, Object>>> res = this.projectLawsInventoryEOService.queryDutyPersonByProjectId(params); Map<String, List<Map<String, Object>>> res = this.projectLawsInventoryEOService.queryDutyPersonByProjectId(params);
return Result.OK(res); return Result.OK(res);
} }
/**
* 分页查询不符合项列表
* @return
*/
@AutoLog(value = "项目库-法规清单表-查询不符合项列表")
@ApiOperation(value="项目库-法规清单表-查询不符合项列表", notes="项目库-法规清单表-查询不符合项列表")
@GetMapping(value = "/queryNotComplianList")
public Result<?> queryNotComplianList(@RequestParam Map<String,Object> params) {
List<Map<String,Object>> result = this.projectLawsInventoryEOService.queryNotComplianList(params);
return Result.OK(result);
}
/**
* 导出不符合项列表
* @param request
* @param params
*/
@AutoLog(value = "项目库-法规清单表-导出不符合项列表")
@ApiOperation(value="项目库-法规清单表-导出不符合项列表", notes="项目库-法规清单表-导出不符合项列表")
@RequestMapping(value = "/exportNotComplianList")
public void exportNotComplianList(HttpServletResponse response,
HttpServletRequest request,
@RequestParam Map<String,Object> params) {
this.projectLawsInventoryEOService.exportNotComplianList(response,request, params);
}
} }
@@ -286,4 +286,9 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
return Result.OK(resList); return Result.OK(resList);
} }
// 导出项目进度统计(状态导出)
@RequestMapping(value = "/exportProjectProgressStatisticsXls")
public void exportProjectProgressStatisticsXls(HttpServletResponse response,HttpServletRequest request, @RequestParam Map<String,Object> params) {
this.projectLibraryBaseService.exportProjectProgressStatisticsXls(response,request, params);
}
} }
@@ -12,9 +12,11 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -81,6 +83,11 @@ public class ProjectStatusBoardController {
return Result.OK(mapList); return Result.OK(mapList);
} }
// 导出excel文件
@RequestMapping(value = "/exportXls")
public void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectLibraryBase projectLibraryBase) {
this.iProjectStatusBoardService.exportXls(response,request, projectLibraryBase);
}
@@ -13,6 +13,7 @@ import com.jero.modules.project.vo.TimeNodeVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -70,8 +71,12 @@ public class ProjectTaskPlanningController extends JeroController<ProjectTaskPla
@ApiOperation(value="法规,认证任务计划 (各阶段确认进度) 表-列表查询", notes="法规,认证任务计划 (各阶段确认进度) 表-列表查询") @ApiOperation(value="法规,认证任务计划 (各阶段确认进度) 表-列表查询", notes="法规,认证任务计划 (各阶段确认进度) 表-列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<ProjectTaskPlanning> queryList(@RequestParam(name="projectId",required=true) String projectId) { public Result<ProjectTaskPlanning> queryList(@RequestParam(name="projectId",required=true) String projectId) {
ProjectTaskPlanning result = new ProjectTaskPlanning();
List<ProjectTaskPlanning> projectTaskPlanning = projectTaskPlanningService.queryList(projectId); List<ProjectTaskPlanning> projectTaskPlanning = projectTaskPlanningService.queryList(projectId);
return Result.OK(projectTaskPlanning.get(0)); if(CollectionUtils.isNotEmpty(projectTaskPlanning)){
result = projectTaskPlanning.get(0);
}
return Result.OK(result);
} }
/** /**
@@ -522,4 +522,12 @@ public class ProjectLawsInventoryEO implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "验证符合性确认-责任确认截止时间") @ApiModelProperty(value = "验证符合性确认-责任确认截止时间")
private Date verifyDutyDueDate; private Date verifyDutyDueDate;
/**流程类型*/
@TableField(exist = false)
private String flowType;
/**流程类型展示名称*/
@TableField(exist = false)
private String flowTypeName;
} }
@@ -102,4 +102,49 @@ public class ProjectTaskPlanning implements Serializable {
@TableField(exist = false) @TableField(exist = false)
List<TimeNodeVO> timeNodeVOS; List<TimeNodeVO> timeNodeVOS;
/**概念验证阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date zero;
/**初样阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date one;
/**工艺方案阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date two;
/**零件试制阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date three;
/**整车装配工艺方案阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date four;
/**预生产阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date five;
/**试产阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date six;
/**小批量生产阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date seven;
/**大规模生产阶段*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date eight;
} }
@@ -38,6 +38,11 @@ public enum OperatorTypeEnum {
QUERY_PREHOMO_STATISTICS("查询prehomo统计","queryPrehomoStatistics"), QUERY_PREHOMO_STATISTICS("查询prehomo统计","queryPrehomoStatistics"),
QUERY_VERIFY_STATISTICS("查询验证符合性统计","queryVerifyStatistics"), QUERY_VERIFY_STATISTICS("查询验证符合性统计","queryVerifyStatistics"),
QUERY_CERTIFICATION_PROGRESS_STATISTICS("查询认证进度统计","queryCertificationProgressStatistics"), QUERY_CERTIFICATION_PROGRESS_STATISTICS("查询认证进度统计","queryCertificationProgressStatistics"),
QUERY_FG_TASK_TO_CONFIRM_STATISTICS("查询法规任务确认统计","queryFGTaskToConfirmStatistics"),
QUERY_RZ_TASK_TO_CONFIRM_STATISTICS("查询认证任务确认统计","queryRZTaskToConfirmStatistics"),
QUERY_CERTIFICATION_PROGRESS_STATISTICS_ALL("查询认证进度统计-全部","queryCertificationProgressStatisticsAll"),
QUERY_CERTIFICATION_PROGRESS_STATISTICS_CAR("查询认证进度统计-整车","queryCertificationProgressStatisticsCar"),
QUERY_CERTIFICATION_PROGRESS_STATISTICS_PART("查询认证进度统计-零部件","queryCertificationProgressStatisticsPart"),
ADD_LAWS_OPINION_GATHER("添加法规意见收集数据","addLawsOpinionGather"), ADD_LAWS_OPINION_GATHER("添加法规意见收集数据","addLawsOpinionGather"),
UPDATE_LAWS_OPINION_GATHER_GATHER_RESULT("更新法规意见收集数据收集结果","updateLawsOpinionGatherGatherResult"), UPDATE_LAWS_OPINION_GATHER_GATHER_RESULT("更新法规意见收集数据收集结果","updateLawsOpinionGatherGatherResult"),
@@ -10,7 +10,6 @@ public enum ProjectTaskPlanningNameEnum {
// PREHOMO_DEADLINE("摸底试验结束","Pre-Homo Confirmation"), // name:Pre-Homo value:Pre-Homo // PREHOMO_DEADLINE("摸底试验结束","Pre-Homo Confirmation"), // name:Pre-Homo value:Pre-Homo
// ATTESTATION_START_TIME("认证试验结束","Homo Completion"),// name:认证开始 value:Certification begins // ATTESTATION_START_TIME("认证试验结束","Homo Completion"),// name:认证开始 value:Certification begins
ATTESTATION_END_TIME("认证批准","Homo KO"),// name:认证结束 value:End of certification ATTESTATION_END_TIME("认证批准","Homo KO"),// name:认证结束 value:End of certification
// VERIFY_DEADLINE("验证符合性确认","Validation Compliance Confirmation"),
LIST_CONFIRMATION("清单发布","List Publishing"), LIST_CONFIRMATION("清单发布","List Publishing"),
LEGAL_TASK_CONFIRMATION("责任确认","Responsibility Confirmation"), LEGAL_TASK_CONFIRMATION("责任确认","Responsibility Confirmation"),
@@ -19,7 +18,16 @@ public enum ProjectTaskPlanningNameEnum {
ATTESTATION_START_TIME("认证开始","Certification Start"),// name:认证开始 value:Certification begins ATTESTATION_START_TIME("认证开始","Certification Start"),// name:认证开始 value:Certification begins
VERIFY_DEADLINE("验证核查","Verification And Verification"), VERIFY_DEADLINE("验证核查","Verification And Verification"),
CERTIFICATION_SUBMISSION("认证提交","Certification Submission"), CERTIFICATION_SUBMISSION("认证提交","Certification Submission"),
G_ZERO("G0","G0"),
G_ONE("G1","G1"),
G_TWO("G2","G2"),
G_THREE("G3","G3"),
G_FOUR("G4","G4"),
G_FIVE("G5","G5"),
G_SIX("G6","G6"),
G_SEVEN("G7","G7"),
// VERIFY_DEADLINE("验证符合性确认","Validation Compliance Confirmation"),
; ;
String name; String name;
String value; String value;
@@ -3,6 +3,7 @@ package com.jero.modules.project.mapper;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.jero.modules.project.entity.ProjectLawsInventoryEO; import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -44,4 +45,6 @@ public interface ProjectLawsInventoryEOMapper extends BaseMapper<ProjectLawsInve
* @return * @return
*/ */
List<Map<String, Object>> getTaskToConfirmStatisticsGroupByTerritory(@Param("projectLibraryId") String projectLibraryId, @Param("taskAffirmStatus") String taskAffirmStatus); List<Map<String, Object>> getTaskToConfirmStatisticsGroupByTerritory(@Param("projectLibraryId") String projectLibraryId, @Param("taskAffirmStatus") String taskAffirmStatus);
List<Map<String,Object>> queryNotComplianList(@Param("params") Map<String, Object> params);
} }
@@ -105,4 +105,91 @@
and task_affirm_status = #{taskAffirmStatus} and task_affirm_status = #{taskAffirmStatus}
group by duty_territory; group by duty_territory;
</select> </select>
<select id="queryNotComplianList" resultType="hashmap">
select
id as "id",
serial_number as "serialNumber",
title as "title",
flow_type as "flowType",
duty_territory as "dutyTerritory",
flow_status as "flowStatus",
regulation_owner_id as "regulationOwnerId",
duty_id as "dutyId",
stand_id as "standId"
from (
SELECT
id,
serial_number,
title,
"2" as flow_type,
duty_territory,
design_flow_status as flow_status,
regulation_owner_id,
design_duty_id as duty_id,
project_library_id,
stand_id
FROM
project_laws_inventory
WHERE
project_library_id = #{params.projectLibraryId}
and design_flow_status IN
<foreach collection="params.complianceFlowStatusList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
UNION
SELECT
id,
serial_number,
title,
"4" as flow_type,
duty_territory,
verify_flow_status as flow_status,
regulation_owner_id,
verify_duty_id as duty_id,
project_library_id,
stand_id
FROM
project_laws_inventory
WHERE
project_library_id = #{params.projectLibraryId}
and verify_flow_status IN
<foreach collection="params.complianceFlowStatusList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
) temp
<include refid="BaseQuerySql"/>
<if test="params.orderByField != null and params.orderByField != ''">
order by temp.${params.orderByField}
<if test="params.orderBy == 1">
asc
</if>
<if test="params.orderBy == 2">
desc
</if>
</if>
<if test="params.orderByField == null or params.orderByField == ''">
order by temp.serial_number desc
</if>
</select>
<sql id="BaseQuerySql">
<where>
<if test="params.serialNumber != null and params.serialNumber !=''">
and temp.serial_number like CONCAT(CONCAT('%',#{params.serialNumber}),'%')
</if>
<if test="params.title != null and params.title !=''">
and temp.title like CONCAT(CONCAT('%',#{params.title}),'%')
</if>
<if test="params.dutyTerritory != null and params.dutyTerritory !=''">
and temp.duty_territory like CONCAT(CONCAT('%',#{params.dutyTerritory}),'%')
<!--and (
temp.duty_territory = #{params.dutyTerritory} or
<foreach collection="params.dutyTerritory.split(',')" index="" item="item" open="(" close=")" separator="or">
temp.duty_territory like CONCAT(CONCAT('%',#{item}),'%')
</foreach>
)-->
</if>
</where>
</sql>
</mapper> </mapper>
@@ -11,6 +11,15 @@
<result column="attestation_start_time" property="attestationStartTime" /> <result column="attestation_start_time" property="attestationStartTime" />
<result column="attestation_end_time" property="attestationEndTime" /> <result column="attestation_end_time" property="attestationEndTime" />
<result column="verify_deadline" property="verifyDeadline" /> <result column="verify_deadline" property="verifyDeadline" />
<result column="zero" property="zero" />
<result column="one" property="one" />
<result column="two" property="two" />
<result column="three" property="three" />
<result column="four" property="four" />
<result column="five" property="five" />
<result column="six" property="six" />
<result column="seven" property="seven" />
<result column="eight" property="eight" />
</resultMap> </resultMap>
@@ -254,4 +254,60 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
void certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList); void certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
void certificationInventoryEOListSortByTaskConfirmEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList); void certificationInventoryEOListSortByTaskConfirmEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params); Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params);
/**
* 获取任务确认统计信息
* @param pciEoList
* @return
*/
List<Map<String, Object>> getTaskToConfirmStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取Pre-Homo统计信息
* @param pciEoList
* @return
*/
List<Map<String, Object>> getPrehomoStatistice(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取认证进度统计信息 全部
* @param pciEoList
* @return
*/
List<Map<String, Object>> getAllCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取认证进度统计信息 整车
* @param pciEoList
* @return
*/
List<Map<String, Object>> getCarCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 获取认证进度统计信息 零部件
* @param pciEoList
* @return
*/
List<Map<String, Object>> getPartCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList);
/**
* 按照认证任务确认状态分组
* @param pciEos
* @return
*/
Map<String, Object> groupByFGRwqrStatus(List<ProjectCertificationInventoryEO> pciEos);
/**
* 按照preHomo确认状态分组
* @param pciEos
* @return
*/
Map<String, Object> groupByPreHomoStatus(List<ProjectCertificationInventoryEO> pciEos);
/**
* 根据认证进度分组
* @param pciEos
* @return
*/
Map<String, Object> groupByCertificationProgress(List<ProjectCertificationInventoryEO> pciEos);
} }
@@ -2,6 +2,7 @@ package com.jero.modules.project.service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException; import com.itextpdf.text.DocumentException;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
@@ -257,4 +258,50 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
Result<?> compulsoryTransfer(JSONObject json); Result<?> compulsoryTransfer(JSONObject json);
Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params); Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params);
/**
* 获取任务确认统计信息
* @param projectLawsInventoryEOList
* @return
*/
List<Map<String, Object>> getTaskToConfirmStatistics(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
/**
* 获取设计符合性统计信息
* @param projectLawsInventoryEOList
* @return
*/
List<Map<String, Object>> getDesignComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
/**
* 获取验证符合性统计信息
* @param projectLawsInventoryEOList
* @return
*/
List<Map<String, Object>> getVerifyComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
List<Map<String,Object>> queryNotComplianList(Map<String, Object> params);
void exportNotComplianList(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params);
/**
* 按照法规任务确认状态分组
* @param pliEos
* @return
*/
Map<String, Object> groupByFGRwqrStatus(List<ProjectLawsInventoryEO> pliEos);
/**
* 按照设计符合性状态分组
* @param pliEos
* @return
*/
Map<String, Object> groupByDesignStatus(List<ProjectLawsInventoryEO> pliEos);
/**
* 按照验证符合性状态分组
* @param pliEos
* @return
*/
Map<String, Object> groupByVerifyStatus(List<ProjectLawsInventoryEO> pliEos);
} }
@@ -159,4 +159,12 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
* @return * @return
*/ */
JSONArray getProjectProgressInfo(); JSONArray getProjectProgressInfo();
/**
* 导出项目进度统计(状态导出)
* @param response
* @param request
* @param params
*/
void exportProjectProgressStatisticsXls(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params);
} }
@@ -0,0 +1,85 @@
package com.jero.modules.project.service;
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import java.util.List;
import java.util.Map;
/**
* 项目库统计service
*/
public interface IProjectLibraryStatisticsService {
/**
* 获取法规清单-任务确认统计信息-根据责任领域分组
* @param datas
* @return
*/
Map<String, Object> getFGTaskToConfirmStatisticsGroupByTerritory(List<ProjectLawsInventoryEO> datas, Map<String, Object> params);
/**
* 获取设计符合性确认流程统计信息-根据责任领域分组
* @param datas
* @param params
* @return
*/
Map<String, Object> getDesignComplianceStatisticeGroupByTerritory(List<ProjectLawsInventoryEO> datas, Map<String, Object> params);
/**
* 获取验证符合性确认流程统计信息-根据责任领域分组
* @param datas
* @param params
* @return
*/
Map<String, Object> getVerifyComplianceStatisticeGroupByTerritory(List<ProjectLawsInventoryEO> datas, Map<String, Object> params);
/**
* 获取认证清单-任务确认统计信息-根据责任领域分组
* @param datas
* @param params
* @return
*/
Map<String, Object> getRZTaskToConfirmStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params);
/**
* 获取认证清单-Pre-Homo统计信息-根据责任领域分组
* @param datas
* @param params
* @return
*/
Map<String, Object> getPrehomoStatisticeGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params);
/**
* 获取认证清单-全部-认证进度统计信息-根据责任领域分组
* @param datas
* @param params
* @return
*/
Map<String, Object> getAllCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params);
/**
* 获取认证清单-整车-认证进度统计信息-根据责任领域分组
* @param datas
* @param params
* @return
*/
Map<String, Object> getCarCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params);
/**
* 获取认证清单-零部件-认证进度统计信息-根据责任领域分组
* @param datas
* @param params
* @return
*/
Map<String, Object> getPartCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params);
/**
* 获取认证参数收集-统计信息
* @param datas
* @param params
* @return
*/
Map<String, Object> getParameterCollectingStatisticsGroupByTerritory(List<ParamsCollectManifestEO> datas, Map<String, Object> params);
}
@@ -4,6 +4,7 @@ import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.vo.TimeNodeVO; import com.jero.modules.project.vo.TimeNodeVO;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -31,4 +32,12 @@ public interface IProjectStatusBoardService {
* @param req * @param req
*/ */
List<Map<String,Object>> scheduleInfoList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req); List<Map<String,Object>> scheduleInfoList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req);
/**
* 导出excel文件
* @param response
* @param request
* @param projectLibraryBase
*/
void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectLibraryBase projectLibraryBase);
} }
@@ -84,10 +84,7 @@ import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.*; import java.io.*;
import java.text.Collator; import java.text.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -112,6 +109,9 @@ import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServic
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) @Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<ProjectCertificationInventoryEOMapper, ProjectCertificationInventoryEO> implements IProjectCertificationInventoryEOService { public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<ProjectCertificationInventoryEOMapper, ProjectCertificationInventoryEO> implements IProjectCertificationInventoryEOService {
private static DecimalFormat df = new DecimalFormat("#.00");
private static String percentSign = "%";
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired @Autowired
@@ -795,6 +795,21 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
pciEo.setFlowStatus(flowStatus); pciEo.setFlowStatus(flowStatus);
}); });
this.updateBatchById(pciEoList); this.updateBatchById(pciEoList);
// 如果是责任人操作补充提交按钮给责任人生成对应待办中心的待办任务
if(StringUtils.equals(flowStatus,CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())){
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
pciEoList.forEach(pciEo -> {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(pciEo.getDutyPerson());
processInfoDetailEO.setEndTime(pciEo.getEndTime());
processInfoDetailEO.setProjectLawsInventoryId(pciEo.getId());
processInfoDetailEOList.add(processInfoDetailEO);
});
// 给责任人分配待办中心的任务 (待提交)
this.addProcessInfoDetailEO(processInfoDetailEOList,pciEoList.get(0).getProjectLibraryId(),CertificationFlowNodeEnum.ZRRTJRW.getKey());
}
} }
} }
return new Result<>().success("批量更新状态成功!"); return new Result<>().success("批量更新状态成功!");
@@ -2525,6 +2540,316 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}); });
} }
@Override
public List<Map<String, Object>> getTaskToConfirmStatistics(List<ProjectCertificationInventoryEO> pciEoList) {
List<Map<String,Object>> result = new ArrayList<>();
int notStartedCount = 0;
int toConfirmCount = 0;
int acceptedCount = 0;
int rejectedCount = 0;
if(CollectionUtils.isNotEmpty(pciEoList)){
// 未发起
notStartedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).count();
// 待确认
toConfirmCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).count();
// 接受
acceptedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())
);
return flag;
}).count();
// 拒绝
rejectedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
);
return flag;
}).count();
}
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
notStartedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue());
notStartedMap.put("taskAffirmStatusCount",notStartedCount);
toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("taskAffirmStatusCount",toConfirmCount);
acceptedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.ACCEPTED.getValue());
acceptedMap.put("taskAffirmStatusCount",acceptedCount);
rejectedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.REJECTED.getValue());
rejectedMap.put("taskAffirmStatusCount",rejectedCount);
result.add(notStartedMap);
result.add(toConfirmMap);
result.add(acceptedMap);
result.add(rejectedMap);
return result;
}
@Override
public List<Map<String, Object>> getPrehomoStatistice(List<ProjectCertificationInventoryEO> pciEoList) {
List<Map<String,Object>> result = new ArrayList<>();
int notStartedCount = 0;
int toConfirmCount = 0;
int acceptedCount = 0;
int rejectedCount = 0;
if(CollectionUtils.isNotEmpty(pciEoList)){
// 未发起
notStartedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
);
return flag;
}).count();
// 待确认
toConfirmCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
);
return flag;
}).count();
// 审查通过
acceptedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
);
return flag;
}).count();
// 审查退回
rejectedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())
);
return flag;
}).count();
}
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
notStartedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue());
notStartedMap.put("taskAffirmStatusCount",notStartedCount);
toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("taskAffirmStatusCount",toConfirmCount);
acceptedMap.put("taskAffirmStatus",CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue());
acceptedMap.put("taskAffirmStatusCount",acceptedCount);
rejectedMap.put("taskAffirmStatus",CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue());
rejectedMap.put("taskAffirmStatusCount",rejectedCount);
result.add(notStartedMap);
result.add(toConfirmMap);
result.add(acceptedMap);
result.add(rejectedMap);
return result;
}
@Override
public List<Map<String, Object>> getAllCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList) {
List<Map<String,Object>> result = new ArrayList<>();
int notStartedCount = 0;
int inProgressCount = 0;
int testPassedCount = 0;
int testFailedCount = 0;
if(CollectionUtils.isNotEmpty(pciEoList)){
// 未开始
notStartedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.NOT_START.getValue())
);
return flag;
}).count();
// 进行中
inProgressCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue())
|| StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())
);
return flag;
}).count();
// 实验通过
testPassedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
|| StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())
|| StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())
);
return flag;
}).count();
// 实验失败
testFailedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue())
);
return flag;
}).count();
}
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> inProgressMap = new HashMap<>();
Map<String,Object> testPassedMap = new HashMap<>();
Map<String,Object> testFailedMap = new HashMap<>();
notStartedMap.put("certificationProgress",CertificationProgressEnum.NOT_START.getValue());
notStartedMap.put("certificationProgressCount",notStartedCount);
inProgressMap.put("certificationProgress",CertificationProgressEnum.IN_PROGRESS.getValue());
inProgressMap.put("certificationProgressCount",inProgressCount);
testPassedMap.put("certificationProgress",CertificationProgressEnum.TEST_PASSED.getValue());
testPassedMap.put("certificationProgressCount",testPassedCount);
testFailedMap.put("certificationProgress",CertificationProgressEnum.TEST_FAILED.getValue());
testFailedMap.put("certificationProgressCount",testFailedCount);
result.add(notStartedMap);
result.add(inProgressMap);
result.add(testPassedMap);
result.add(testFailedMap);
return result;
}
@Override
public List<Map<String, Object>> getCarCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList) {
List<Map<String,Object>> result = new ArrayList<>();
int notStartedCount = 0;
int inProgressCount = 0;
int testPassedCount = 0;
int testFailedCount = 0;
if(CollectionUtils.isNotEmpty(pciEoList)){
// 未开始
notStartedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.NOT_START.getValue())
);
return flag;
}).count();
// 进行中
inProgressCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue())
);
return flag;
}).count();
// 实验通过
testPassedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
);
return flag;
}).count();
// 实验失败
testFailedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue())
);
return flag;
}).count();
}
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> inProgressMap = new HashMap<>();
Map<String,Object> testPassedMap = new HashMap<>();
Map<String,Object> testFailedMap = new HashMap<>();
notStartedMap.put("certificationProgress",CertificationProgressEnum.NOT_START.getValue());
notStartedMap.put("certificationProgressCount",notStartedCount);
inProgressMap.put("certificationProgress",CertificationProgressEnum.IN_PROGRESS.getValue());
inProgressMap.put("certificationProgressCount",inProgressCount);
testPassedMap.put("certificationProgress",CertificationProgressEnum.TEST_PASSED.getValue());
testPassedMap.put("certificationProgressCount",testPassedCount);
testFailedMap.put("certificationProgress",CertificationProgressEnum.TEST_FAILED.getValue());
testFailedMap.put("certificationProgressCount",testFailedCount);
result.add(notStartedMap);
result.add(inProgressMap);
result.add(testPassedMap);
result.add(testFailedMap);
return result;
}
@Override
public List<Map<String, Object>> getPartCertificationProgressStatistics(List<ProjectCertificationInventoryEO> pciEoList) {
List<Map<String,Object>> result = new ArrayList<>();
int notSubmitCount = 0;
int reportSubmitCount = 0;
int storedCount = 0;
if(CollectionUtils.isNotEmpty(pciEoList)){
// 部件报告未提交
notSubmitCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())
);
return flag;
}).count();
// 部件报告已提交
reportSubmitCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())
);
return flag;
}).count();
// 部件报告已入库
storedCount = (int) pciEoList.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())
);
return flag;
}).count();
}
Map<String,Object> notSubmitMap = new HashMap<>();
Map<String,Object> reportSubmitMap = new HashMap<>();
Map<String,Object> storedMap = new HashMap<>();
notSubmitMap.put("certificationProgress",CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue());
notSubmitMap.put("certificationProgressCount",notSubmitCount);
reportSubmitMap.put("certificationProgress",CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue());
reportSubmitMap.put("certificationProgressCount",reportSubmitCount);
storedMap.put("certificationProgress",CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue());
storedMap.put("certificationProgressCount",storedCount);
result.add(notSubmitMap);
result.add(reportSubmitMap);
result.add(storedMap);
return result;
}
@Override @Override
public Result<?> saveBatch(JSONObject json) { public Result<?> saveBatch(JSONObject json) {
Date now = new Date(); Date now = new Date();
@@ -5278,6 +5603,258 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return Result.OK("添加配置成功!"); return Result.OK("添加配置成功!");
} }
@Override
public Map<String, Object> groupByFGRwqrStatus(List<ProjectCertificationInventoryEO> pciEos) {
Map<String, Object> result = new HashMap<>();
Map<String,Object> projectScheduleExportMap = new HashMap<>();
double toBeReleasedCount = 0;
double toBeVerifiedCount = 0;
double toBeConfirmedCount = 0;
double acceptCount = 0;
double refuseCount = 0;
double count = 0;
// 计算百分比
double percentage = 0;
String percentageStr = "0";
if(CollectionUtils.isNotEmpty(pciEos)){
List<ProjectCertificationInventoryEO> toBeReleased = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> toBeVerified = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> toBeConfirmed = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> accept = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> refuse = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
);
return flag;
}).collect(Collectors.toList());
toBeReleasedCount = toBeReleased.size();
toBeVerifiedCount = toBeVerified.size();
toBeConfirmedCount = toBeConfirmed.size();
acceptCount = accept.size();
refuseCount = refuse.size();
count = toBeReleasedCount + toBeVerifiedCount + toBeConfirmedCount + acceptCount + refuseCount;
// 计算百分比
percentage = acceptCount / count * 100;
percentageStr = percentage != 0 ? df.format(percentage) : "0";
}
projectScheduleExportMap.put("toBeReleased",toBeReleasedCount);
projectScheduleExportMap.put("toBeVerified",toBeVerifiedCount);
projectScheduleExportMap.put("toBeConfirmed",toBeConfirmedCount);
projectScheduleExportMap.put("accept",acceptCount);
projectScheduleExportMap.put("refuse",refuseCount);
projectScheduleExportMap.put("percentage",percentageStr + percentSign);
result.put("projectScheduleExportMap",projectScheduleExportMap);
return result;
}
@Override
public Map<String, Object> groupByPreHomoStatus(List<ProjectCertificationInventoryEO> pciEos) {
Map<String, Object> result = new HashMap<>();
Map<String,Object> projectScheduleExportMap = new HashMap<>();
double notStartCount = 0; // 未发起
double toBeSubmittedCount = 0; // 待提交
double toBeReviewedCount = 0; // 待审查
double acceptCount = 0; // 审查通过
double refuseCount = 0; // 审查退回
double taskTerminationCount = 0; // 任务终止
double count = 0;
// 计算百分比
double percentage = 0;
String percentageStr = "0";
if(CollectionUtils.isNotEmpty(pciEos)){
List<ProjectCertificationInventoryEO> notStart = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> toBeSubmitted = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> toBeReviewed = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> accept = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectCertificationInventoryEO> refuse = pciEos.stream().filter(pciEo -> {
boolean flag = (
StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())
);
return flag;
}).collect(Collectors.toList());
notStartCount = notStart.size();
toBeSubmittedCount = toBeSubmitted.size();
toBeReviewedCount = toBeReviewed.size();
acceptCount = accept.size();
refuseCount = refuse.size();
count = notStartCount + toBeSubmittedCount + toBeReviewedCount + acceptCount + refuseCount;
// 计算百分比
percentage = acceptCount / count * 100;
percentageStr = percentage != 0 ? df.format(percentage) : "0";
}
projectScheduleExportMap.put("notStartCount",notStartCount);
projectScheduleExportMap.put("toBeSubmittedCount",toBeSubmittedCount);
projectScheduleExportMap.put("toBeReviewedCount",toBeReviewedCount);
projectScheduleExportMap.put("accept",acceptCount);
projectScheduleExportMap.put("refuse",refuseCount);
projectScheduleExportMap.put("percentage",percentageStr + percentSign);
result.put("projectScheduleExportMap",projectScheduleExportMap);
return result;
}
@Override
public Map<String, Object> groupByCertificationProgress(List<ProjectCertificationInventoryEO> pciEos) {
Map<String, Object> result = new HashMap<>();
Map<String,Object> projectScheduleExportMap = new HashMap<>();
double notStartCount = 0; // 待开始
double inProgressCount = 0; // 进行中
double testPassedCount = 0; // 实验通过
double testFailedCount = 0; // 实验失败
double notSubmitCount = 0; // 部件报告未上传
double reportSubmitCount = 0; // 部件报告已上传
double storedCount = 0; // 部件报告已入库
double count = 0;
// 计算百分比
double percentage = 0;
String percentageStr = "0";
if(CollectionUtils.isNotEmpty(pciEos)){
// 未开始
List<ProjectCertificationInventoryEO> notStartPciEoList = pciEos.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.NOT_START.getValue())
);
return flag;
}).collect(Collectors.toList());
notStartCount = (double) notStartPciEoList.size();
// 进行中
List<ProjectCertificationInventoryEO> inProgressPciEoList = pciEos.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue())
);
return flag;
}).collect(Collectors.toList());
inProgressCount = (double) inProgressPciEoList.size();
// 实验通过
List<ProjectCertificationInventoryEO> testPassedPciEoList = pciEos.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
);
return flag;
}).collect(Collectors.toList());
testPassedCount = (double) testPassedPciEoList.size();
// 实验失败
List<ProjectCertificationInventoryEO> testFailedPciEoList = pciEos.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue())
);
return flag;
}).collect(Collectors.toList());
testFailedCount = (double) testFailedPciEoList.size();
// 部件报告未提交
List<ProjectCertificationInventoryEO> notSubmitPciEoList = pciEos.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
notSubmitCount = (double) notSubmitPciEoList.size();
// 部件报告已提交
List<ProjectCertificationInventoryEO> reportSubmitPciEoList = pciEos.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
reportSubmitCount = (double) reportSubmitPciEoList.size();
// 部件报告已入库
List<ProjectCertificationInventoryEO> storedPciEoList = pciEos.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())
);
return flag;
}).collect(Collectors.toList());
storedCount = (double) storedPciEoList.size();
count = notStartCount + inProgressCount + testPassedCount + testFailedCount + testFailedCount + notSubmitCount + reportSubmitCount + storedCount;
// 计算百分比
percentage = testPassedCount / count * 100;
percentageStr = percentage != 0 ? df.format(percentage) : "0";
}
projectScheduleExportMap.put("notStartCount",notStartCount);
projectScheduleExportMap.put("inProgressCount",inProgressCount);
projectScheduleExportMap.put("testPassedCount",testPassedCount);
projectScheduleExportMap.put("testFailedCount",testFailedCount);
projectScheduleExportMap.put("notSubmitCount",notSubmitCount);
projectScheduleExportMap.put("reportSubmitCount",reportSubmitCount);
projectScheduleExportMap.put("storedCount",storedCount);
projectScheduleExportMap.put("count",count);
projectScheduleExportMap.put("percentage",percentageStr + percentSign);
result.put("projectScheduleExportMap",projectScheduleExportMap);
return result;
}
@Override @Override
public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) { public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) {
Map<String, List<Map<String, Object>>> result = new HashMap<>(); Map<String, List<Map<String, Object>>> result = new HashMap<>();
@@ -8,6 +8,8 @@ import com.aliyuncs.utils.IOUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itextpdf.text.Font; import com.itextpdf.text.Font;
import com.itextpdf.text.*; import com.itextpdf.text.*;
@@ -76,6 +78,7 @@ import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.enums.VerifyComplianceFlowNodeKeyEnum; import com.jero.modules.todoCenter.enums.VerifyComplianceFlowNodeKeyEnum;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService; import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService; import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
import com.jero.modules.wkflow.entity.ProcessHistoryEO; import com.jero.modules.wkflow.entity.ProcessHistoryEO;
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum; import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum; import com.jero.modules.wkflow.enums.FlowTypeEnum;
@@ -122,10 +125,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.Collator; import java.text.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List; import java.util.List;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -145,6 +145,8 @@ import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServic
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) @Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsInventoryEOMapper, ProjectLawsInventoryEO> implements IProjectLawsInventoryEOService { public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsInventoryEOMapper, ProjectLawsInventoryEO> implements IProjectLawsInventoryEOService {
private static DecimalFormat df = new DecimalFormat("#.00");
private static String percentSign = "%";
@Autowired @Autowired
private ProjectLibraryBaseMapper projectLibraryBaseMapper; private ProjectLibraryBaseMapper projectLibraryBaseMapper;
@@ -12413,6 +12415,395 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
return Result.OK("强制转办成功!"); return Result.OK("强制转办成功!");
} }
@Override
public List<Map<String, Object>> getTaskToConfirmStatistics(List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
List<Map<String,Object>> result = new ArrayList<>();
int notStartedCount = 0;
int toConfirmCount = 0;
int acceptedCount = 0;
int rejectedCount = 0;
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
// 未发起
int designNotStartedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).count();
int verifyNotStartedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).count();
notStartedCount = designNotStartedCount + verifyNotStartedCount;
// 待确认
int designToConfirmCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).count();
int verifyToConfirmCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).count();
toConfirmCount = designToConfirmCount + verifyToConfirmCount;
// 接受
int designAcceptedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).count();
int verifyAcceptedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).count();
acceptedCount = designAcceptedCount + verifyAcceptedCount;
// 拒绝
int designRejectedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
);
return flag;
}).count();
int verifyRejectedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
);
return flag;
}).count();
rejectedCount = designRejectedCount + verifyRejectedCount;
}
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
notStartedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue());
notStartedMap.put("taskAffirmStatusCount",notStartedCount);
toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("taskAffirmStatusCount",toConfirmCount);
acceptedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.ACCEPTED.getValue());
acceptedMap.put("taskAffirmStatusCount",acceptedCount);
rejectedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.REJECTED.getValue());
rejectedMap.put("taskAffirmStatusCount",rejectedCount);
result.add(notStartedMap);
result.add(toConfirmMap);
result.add(acceptedMap);
result.add(rejectedMap);
return result;
}
@Override
public List<Map<String, Object>> getDesignComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
List<Map<String,Object>> result = new ArrayList<>();
int notStartedCount = 0;
int toConfirmCount = 0;
int complianceCount = 0;
int nonComplianceCount = 0;
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
// 未发起
notStartedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).count();
// 待确认
toConfirmCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
);
return flag;
}).count();
// 符合
complianceCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
);
return flag;
}).count();
// 不符合
nonComplianceCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
);
return flag;
}).count();
}
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
notStartedMap.put("designFlowTaskStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue());
notStartedMap.put("designFlowTaskStatusCount",notStartedCount);
toConfirmMap.put("designFlowTaskStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("designFlowTaskStatusCount",toConfirmCount);
acceptedMap.put("designFlowTaskStatus",ComplianceFlowStatusEnum.CONFORMITY.getValue());
acceptedMap.put("designFlowTaskStatusCount",complianceCount);
rejectedMap.put("designFlowTaskStatus",ComplianceFlowStatusEnum.INCONFORMITY.getValue());
rejectedMap.put("designFlowTaskStatusCount",nonComplianceCount);
result.add(notStartedMap);
result.add(toConfirmMap);
result.add(acceptedMap);
result.add(rejectedMap);
return result;
}
@Override
public List<Map<String, Object>> getVerifyComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList) {
List<Map<String,Object>> result = new ArrayList<>();
int notStartedCount = 0;
int toConfirmCount = 0;
int complianceCount = 0;
int nonComplianceCount = 0;
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
// 未发起
notStartedCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).count();
// 待确认
toConfirmCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
);
return flag;
}).count();
// 符合
complianceCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
);
return flag;
}).count();
// 不符合
nonComplianceCount = (int) projectLawsInventoryEOList.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
);
return flag;
}).count();
}
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
notStartedMap.put("verifyFlowTaskStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue());
notStartedMap.put("verifyFlowTaskStatusCount",notStartedCount);
toConfirmMap.put("verifyFlowTaskStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("verifyFlowTaskStatusCount",toConfirmCount);
acceptedMap.put("verifyFlowTaskStatus",ComplianceFlowStatusEnum.CONFORMITY.getValue());
acceptedMap.put("verifyFlowTaskStatusCount",complianceCount);
rejectedMap.put("verifyFlowTaskStatus",ComplianceFlowStatusEnum.INCONFORMITY.getValue());
rejectedMap.put("verifyFlowTaskStatusCount",nonComplianceCount);
result.add(notStartedMap);
result.add(toConfirmMap);
result.add(acceptedMap);
result.add(rejectedMap);
return result;
}
@Override
public List<Map<String,Object>> queryNotComplianList(Map<String, Object> params) {
String cut = (String) params.get("cut");
List<String> complianceFlowStatusList = new ArrayList<>();
complianceFlowStatusList.add(ComplianceFlowStatusEnum.INCONFORMITY.getValue());
complianceFlowStatusList.add(ComplianceFlowStatusEnum.TO_TRACK.getValue());
params.put("complianceFlowStatusList",complianceFlowStatusList);
List<Map<String,Object>> result = this.baseMapper.queryNotComplianList(params);
if(CollectionUtils.isNotEmpty(result)){
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
List<String> userIdList = new ArrayList<>();
List<String> regulationOwnerIdList = result.stream().filter(
data -> StringUtils.isNotEmpty((String) data.get("regulationOwnerId"))
).map(e -> (String) e.get("regulationOwnerId")).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(regulationOwnerIdList)){
userIdList.addAll(regulationOwnerIdList);
}
List<String> dutyIdList = result.stream().filter(
data -> StringUtils.isNotEmpty((String) data.get("dutyId"))
).map(e -> (String) e.get("dutyId")).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(dutyIdList)){
userIdList.addAll(dutyIdList);
}
List<SysUser> userList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(userIdList)){
userList = this.sysUserService.querySysUserListByIdList(userIdList);
}
for (Map<String, Object> dataMap : result) {
String dutyTerritory = (String) dataMap.get("dutyTerritory");
if(StringUtils.isNotEmpty(dutyTerritory)){
if(StringUtils.isNotEmpty(dutyTerritory)){
String dutyTerritory_dictText = this.disposeShowDictItemValue(sysDictItems, dutyTerritory,cut,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
dataMap.put("dutyTerritory_dictText",dutyTerritory_dictText);
}
}
String flowStatus = (String) dataMap.get("flowStatus");
if(StringUtils.isNotEmpty(flowStatus)){
dataMap.put("flowStatusName",ComplianceFlowStatusEnum.getTextByValue(flowStatus,cut));
}
if(CollectionUtils.isNotEmpty(userList)){
String regulationOwnerId = (String) dataMap.get("regulationOwnerId");
if(StringUtils.isNotEmpty(regulationOwnerId)){
String regulationOwnerIdName = this.sysUserService.getUsernameByUserId(userList,regulationOwnerId);
dataMap.put("regulationOwnerIdName",regulationOwnerIdName);
}
String dutyId = (String) dataMap.get("dutyId");
if(StringUtils.isNotEmpty(dutyId)){
String dutyIdName = this.sysUserService.getUsernameByUserId(userList,dutyId);
dataMap.put("dutyIdName",dutyIdName);
}
}
String flowType = (String) dataMap.get("flowType");
if(StringUtils.isNotEmpty(flowType)){
dataMap.put("flowTypeName",FlowTypeEnum.getTextByValue(flowType,cut));
}
// 返回符合性流程的流程实例id
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getProjectLawsInventoryId,(String)dataMap.get("id"));
processInfoDetailEOQueryWrapper.lambda().eq(ProcessInfoDetailEO::getFlowType,flowType);
processInfoDetailEOQueryWrapper.orderByDesc("create_time");
List<ProcessInfoDetailEO> processInfoDetailEOS = this.processInfoDetailEOService.list(processInfoDetailEOQueryWrapper);
if(CollectionUtils.isNotEmpty(processInfoDetailEOS)){
dataMap.put("actiProcInstId",processInfoDetailEOS.get(0).getActiProcInstId());
}
}
}
return result;
}
@Override
public void exportNotComplianList(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
String cut = (String) params.get("cut");
String header = "";
String sheetName = "未符合项";
if (StringUtils.equals(cut,CutEnum.CN.getValue())) {
header = "编号,标题,流程类型,责任领域,问题类型,发起人,责任人";
} else if (StringUtils.equals(cut,CutEnum.EN.getValue())) {
header = "Number,Title,Process Type,Responsible Field,Issue Type,Creator,Assignee";
sheetName = "Non-compliant";
}
OutputStream os = null;
Workbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet(sheetName);
List<Map<String, Object>> dataList = this.queryNotComplianList(params);
CellStyle cellStyle = workbook.createCellStyle();
cellStyle.setAlignment(HorizontalAlignment.CENTER);
Row rowHeader = sheet.createRow(0);//开始创建标题行
if (com.jero.modules.system.util.StringUtils.isNotBlank(header)) {
String[] headerArr = header.split(",");
for (int i = 0; i < headerArr.length; i++) {
sheet.setColumnWidth(i, 5000); // 设置列宽度为5000
Cell cellHeader = rowHeader.createCell(i);
cellHeader.setCellStyle(cellStyle);
cellHeader.setCellValue(headerArr[i]);
}
}
if(CollectionUtils.isNotEmpty(dataList)){
for (int i = 0; i < dataList.size(); i++) {
Row row = sheet.createRow(i + 1);
row.createCell(0).setCellValue((String) dataList.get(i).get("serialNumber"));
row.createCell(1).setCellValue((String) dataList.get(i).get("title"));
row.createCell(2).setCellValue((String) dataList.get(i).get("flowTypeName"));
row.createCell(3).setCellValue((String) dataList.get(i).get("dutyTerritory_dictText"));
row.createCell(4).setCellValue((String) dataList.get(i).get("flowStatusName"));
row.createCell(5).setCellValue((String) dataList.get(i).get("regulationOwnerIdName"));
row.createCell(6).setCellValue((String) dataList.get(i).get("dutyIdName"));
}
}
try {
os = response.getOutputStream();
workbook.write(os);
os.flush();
} catch (IOException e) {
e.printStackTrace();
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("导出失败");
}else{
throw new JeroBootException("Export failure");
}
} finally {
IOUtils.closeQuietly(os);
}
}
/** /**
* 设计符合性相关待办任务强制转办 * 设计符合性相关待办任务强制转办
* *
@@ -12624,6 +13015,356 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
} }
@Override
public Map<String, Object> groupByFGRwqrStatus(List<ProjectLawsInventoryEO> pliEos) {
Map<String,Object> result = new HashMap<>();
Map<String,Object> projectScheduleExportMap = new HashMap<>();
Map<String,Object> toBeReleasedMap = new HashMap<>();
Map<String,Object> toBeVerifiedMap = new HashMap<>();
Map<String,Object> toBeConfirmedMap = new HashMap<>();
Map<String,Object> acceptMap = new HashMap<>();
Map<String,Object> refuseMap = new HashMap<>();
double toBeReleasedCount = 0;
double toBeVerifiedCount = 0;
double toBeConfirmedCount = 0;
double acceptCount = 0;
double refuseCount = 0;
double count = 0;
// 计算百分比
double percentage = 0;
String percentageStr = "0";
if(CollectionUtils.isNotEmpty(pliEos)){
List<ProjectLawsInventoryEO> designToBeReleased = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyToBeReleased = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
);
return flag;
}).collect(Collectors.toList());
toBeReleasedMap.put("designToBeReleased",designToBeReleased);
toBeReleasedMap.put("verifyToBeReleased",verifyToBeReleased);
List<ProjectLawsInventoryEO> designToBeVerified = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyToBeVerified = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).collect(Collectors.toList());
toBeVerifiedMap.put("designToBeVerified",designToBeVerified);
toBeVerifiedMap.put("verifyToBeVerified",verifyToBeVerified);
List<ProjectLawsInventoryEO> designToBeConfirmed = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyToBeConfirmed = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
toBeConfirmedMap.put("designToBeConfirmed",designToBeConfirmed);
toBeConfirmedMap.put("verifyToBeConfirmed",verifyToBeConfirmed);
List<ProjectLawsInventoryEO> designAccept = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyAccept = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).collect(Collectors.toList());
acceptMap.put("designAccept",designAccept);
acceptMap.put("verifyAccept",verifyAccept);
List<ProjectLawsInventoryEO> designRefuse = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyRefuse = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
);
return flag;
}).collect(Collectors.toList());
refuseMap.put("designRefuse",designRefuse);
refuseMap.put("verifyRefuse",verifyRefuse);
toBeReleasedCount = designToBeReleased.size() + verifyToBeReleased.size();
toBeVerifiedCount = designToBeVerified.size() + verifyToBeVerified.size();
toBeConfirmedCount = designToBeConfirmed.size() + verifyToBeConfirmed.size();
acceptCount = designAccept.size() + verifyAccept.size();
refuseCount = designRefuse.size() + verifyRefuse.size();
count = toBeReleasedCount + toBeVerifiedCount + toBeConfirmedCount + acceptCount + refuseCount;
// 计算百分比
percentage = acceptCount / count * 100;
percentageStr = percentage != 0 ? df.format(percentage) : "0";
}
result.put(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue(),toBeReleasedMap);
result.put(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue(),toBeVerifiedMap);
result.put(ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue(),toBeConfirmedMap);
result.put(ComplianceFlowStatusEnum.CONFORMITY.getValue(),acceptMap);
result.put(ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue(),refuseMap);
projectScheduleExportMap.put("toBeReleased",toBeReleasedCount);
projectScheduleExportMap.put("toBeVerified",toBeVerifiedCount);
projectScheduleExportMap.put("toBeConfirmed",toBeConfirmedCount);
projectScheduleExportMap.put("accept",acceptCount);
projectScheduleExportMap.put("refuse",refuseCount);
projectScheduleExportMap.put("percentage",percentageStr + percentSign);
result.put("projectScheduleExportMap",projectScheduleExportMap);
return result;
}
@Override
public Map<String, Object> groupByDesignStatus(List<ProjectLawsInventoryEO> pliEos) {
Map<String,Object> result = new HashMap<>();
Map<String,Object> projectScheduleExportMap = new HashMap<>();
double notStartCount = 0; // 未发起
double toBeSubmittedCount = 0; // 待提交
double toBeReviewedCount = 0; // 待审查
double complianceCount = 0; // 符合
double nonComplianceCount = 0; // 不符合
double toBeTrackedCount = 0; // 待追踪
double notInvolvedCount = 0; // 不涉及
double taskTerminationCount = 0; // 任务终止
double count = 0;
// 计算百分比
double percentage = 0;
String percentageStr = "0";
if(CollectionUtils.isNotEmpty(pliEos)){
List<ProjectLawsInventoryEO> designNotStart = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
|| StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> designToBeSubmitted = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> designToBeReviewed = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> designCompliance = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> designNonCompliance = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> designToBeTracked = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> designNotInvolved = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> taskTermination = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getDesignFlowStatus(),ComplianceFlowStatusEnum.TERMINATION_OF_TASK.getValue())
);
return flag;
}).collect(Collectors.toList());
notStartCount = designNotStart.size();
toBeSubmittedCount = designToBeSubmitted.size();
toBeReviewedCount = designToBeReviewed.size();
complianceCount = designCompliance.size();
nonComplianceCount = designNonCompliance.size();
toBeTrackedCount = designToBeTracked.size();
notInvolvedCount = designNotInvolved.size();
taskTerminationCount = taskTermination.size();
count = notStartCount + toBeSubmittedCount + toBeReviewedCount + complianceCount + nonComplianceCount + toBeTrackedCount + notInvolvedCount + taskTerminationCount;
// 计算百分比
percentage = complianceCount / count * 100;
percentageStr = percentage != 0 ? df.format(percentage) : "0";
}
projectScheduleExportMap.put("notStart",notStartCount);
projectScheduleExportMap.put("toBeSubmitted",toBeSubmittedCount);
projectScheduleExportMap.put("toBeReviewed",toBeReviewedCount);
projectScheduleExportMap.put("compliance",complianceCount);
projectScheduleExportMap.put("nonCompliance",nonComplianceCount);
projectScheduleExportMap.put("toBeTracked",toBeTrackedCount);
projectScheduleExportMap.put("notInvolved",notInvolvedCount);
projectScheduleExportMap.put("taskTermination",taskTerminationCount);
projectScheduleExportMap.put("count",count);
projectScheduleExportMap.put("percentage",percentageStr + percentSign);
result.put("projectScheduleExportMap",projectScheduleExportMap);
return result;
}
@Override
public Map<String, Object> groupByVerifyStatus(List<ProjectLawsInventoryEO> pliEos) {
Map<String,Object> result = new HashMap<>();
Map<String,Object> projectScheduleExportMap = new HashMap<>();
double notStartCount = 0; // 未发起
double toBeSubmittedCount = 0; // 待提交
double toBeReviewedCount = 0; // 待审查
double complianceCount = 0; // 符合
double nonComplianceCount = 0; // 不符合
double toBeTrackedCount = 0; // 待追踪
double notInvolvedCount = 0; // 不涉及
double taskTerminationCount = 0; // 任务终止
double count = 0;
// 计算百分比
double percentage = 0;
String percentageStr = "0";
if(CollectionUtils.isNotEmpty(pliEos)){
List<ProjectLawsInventoryEO> verifyNotStart = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
|| StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyToBeSubmitted = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyToBeReviewed = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyCompliance = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyNonCompliance = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyToBeTracked = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> verifyNotInvolved = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> taskTermination = pliEos.stream().filter(pliEo -> {
boolean flag = (
StringUtils.equals(pliEo.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TERMINATION_OF_TASK.getValue())
);
return flag;
}).collect(Collectors.toList());
notStartCount = verifyNotStart.size();
toBeSubmittedCount = verifyToBeSubmitted.size();
toBeReviewedCount = verifyToBeReviewed.size();
complianceCount = verifyCompliance.size();
nonComplianceCount = verifyNonCompliance.size();
toBeTrackedCount = verifyToBeTracked.size();
notInvolvedCount = verifyNotInvolved.size();
taskTerminationCount = taskTermination.size();
count = notStartCount + toBeSubmittedCount + toBeReviewedCount + complianceCount + nonComplianceCount + toBeTrackedCount + notInvolvedCount + taskTerminationCount;
// 计算百分比
percentage = complianceCount / count * 100;
percentageStr = percentage != 0 ? df.format(percentage) : "0";
}
projectScheduleExportMap.put("notStart",notStartCount);
projectScheduleExportMap.put("toBeSubmitted",toBeSubmittedCount);
projectScheduleExportMap.put("toBeReviewed",toBeReviewedCount);
projectScheduleExportMap.put("compliance",complianceCount);
projectScheduleExportMap.put("nonCompliance",nonComplianceCount);
projectScheduleExportMap.put("toBeTracked",toBeTrackedCount);
projectScheduleExportMap.put("notInvolved",notInvolvedCount);
projectScheduleExportMap.put("taskTermination",taskTerminationCount);
projectScheduleExportMap.put("count",count);
projectScheduleExportMap.put("percentage",percentageStr + percentSign);
result.put("projectScheduleExportMap",projectScheduleExportMap);
return result;
}
}
@Override @Override
public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) { public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) {
Map<String, List<Map<String, Object>>> result = new HashMap<>(); Map<String, List<Map<String, Object>>> result = new HashMap<>();
@@ -0,0 +1,754 @@
package com.jero.modules.project.service.impl;
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
import com.jero.modules.cert.collect.enums.CollectManifestStateEnum;
import com.jero.modules.cert.collect.enums.CollectManifestStatisticsStateEnum;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.enums.CertificationInventoryFlowStatusEnum;
import com.jero.modules.project.enums.CertificationProgressEnum;
import com.jero.modules.project.enums.ComplianceFlowStatusEnum;
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.service.IProjectLibraryStatisticsService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStatisticsService {
private static DecimalFormat df = new DecimalFormat("#.00");
private static String percentSign = "%";
@Autowired
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
@Autowired
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
@Override
public Map<String, Object> getFGTaskToConfirmStatisticsGroupByTerritory(List<ProjectLawsInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
// 未发起
List<ProjectLawsInventoryEO> notStartedDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> notStartedVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartedComplianceFlowCount = (double) notStartedDesignPliEoList.size() + notStartedVerifyPliEoList.size();
double notStartedPercentage = (notStartedComplianceFlowCount / (datas.size() * 2)) * 100;
String notStartedPercentageStr = notStartedPercentage != 0 ? df.format(notStartedPercentage) : "0";
notStartedMap.put("amount",notStartedComplianceFlowCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 待确认
List<ProjectLawsInventoryEO> toConfirmDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> toConfirmVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
double toConfirmComplianceFlowCount = (double) toConfirmDesignPliEoList.size() + toConfirmVerifyPliEoList.size();
double toConfirmPercentage = (toConfirmComplianceFlowCount / (datas.size() * 2)) * 100;
String toConfirmPercentageStr = toConfirmPercentage != 0 ? df.format(toConfirmPercentage) : "0";
toConfirmMap.put("amount",toConfirmComplianceFlowCount);
toConfirmMap.put("percentage",toConfirmPercentageStr + percentSign);
// 接受
List<ProjectLawsInventoryEO> acceptedDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> acceptedVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.UNINVOLVED.getValue())
);
return flag;
}).collect(Collectors.toList());
double acceptedComplianceFlowCount = (double) acceptedDesignPliEoList.size() + acceptedVerifyPliEoList.size();
double acceptedPercentage = (acceptedComplianceFlowCount / (datas.size() * 2)) * 100;
String acceptedPercentageStr = acceptedPercentage != 0 ? df.format(acceptedPercentage) : "0";
acceptedMap.put("amount",acceptedComplianceFlowCount);
acceptedMap.put("percentage",acceptedPercentageStr + percentSign);
// 拒绝
List<ProjectLawsInventoryEO> rejectedDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
);
return flag;
}).collect(Collectors.toList());
List<ProjectLawsInventoryEO> rejectedVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
);
return flag;
}).collect(Collectors.toList());
double rejectedComplianceFlowCount = (double) rejectedDesignPliEoList.size() + rejectedVerifyPliEoList.size();
double rejectedPercentage = (rejectedComplianceFlowCount / (datas.size() * 2)) * 100;
String rejectedPercentageStr = rejectedPercentage != 0 ? df.format(rejectedPercentage) : "0";
rejectedMap.put("amount",rejectedComplianceFlowCount);
rejectedMap.put("percentage",rejectedPercentageStr + percentSign);
result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap);
result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
result.put(TaskAffirmStatusEnum.ACCEPTED.getValue(),acceptedMap);
result.put(TaskAffirmStatusEnum.REJECTED.getValue(),rejectedMap);
}
return result;
}
@Override
public Map<String, Object> getDesignComplianceStatisticeGroupByTerritory(List<ProjectLawsInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> complianceMap = new HashMap<>();
Map<String,Object> nonComplianceMap = new HashMap<>();
// 未发起
List<ProjectLawsInventoryEO> notStartedDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartedComplianceFlowCount = (double) notStartedDesignPliEoList.size();
double notStartedPercentage = (notStartedComplianceFlowCount / (datas.size())) * 100;
String notStartedPercentageStr = notStartedPercentage != 0 ? df.format(notStartedPercentage) : "0";
notStartedMap.put("amount",notStartedComplianceFlowCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 待确认
List<ProjectLawsInventoryEO> toConfirmDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
);
return flag;
}).collect(Collectors.toList());
double toConfirmComplianceFlowCount = (double) toConfirmDesignPliEoList.size();
double toConfirmPercentage = (toConfirmComplianceFlowCount / (datas.size())) * 100;
String toConfirmPercentageStr = toConfirmPercentage != 0 ? df.format(toConfirmPercentage) : "0";
toConfirmMap.put("amount",toConfirmComplianceFlowCount);
toConfirmMap.put("percentage",toConfirmPercentageStr + percentSign);
// 符合
List<ProjectLawsInventoryEO> complianceDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
double complianceFlowCount = (double) complianceDesignPliEoList.size();
double compliancePercentage = (complianceFlowCount / (datas.size())) * 100;
String compliancePercentageStr = compliancePercentage != 0 ? df.format(compliancePercentage) : "0";
complianceMap.put("amount",complianceFlowCount);
complianceMap.put("percentage",compliancePercentageStr + percentSign);
// 不符合
List<ProjectLawsInventoryEO> nonComplianceDesignPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getDesignFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
double nonComplianceComplianceFlowCount = (double) nonComplianceDesignPliEoList.size();
double nonCompliancePercentage = (nonComplianceComplianceFlowCount / (datas.size())) * 100;
String nonCompliancePercentageStr = nonCompliancePercentage != 0 ? df.format(nonCompliancePercentage) : "0";
nonComplianceMap.put("amount",nonComplianceComplianceFlowCount);
nonComplianceMap.put("percentage",nonCompliancePercentageStr + percentSign);
result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap);
result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
result.put(ComplianceFlowStatusEnum.CONFORMITY.getValue(),complianceMap);
result.put(ComplianceFlowStatusEnum.INCONFORMITY.getValue(),nonComplianceMap);
}
return result;
}
@Override
public Map<String, Object> getVerifyComplianceStatisticeGroupByTerritory(List<ProjectLawsInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> complianceMap = new HashMap<>();
Map<String,Object> nonComplianceMap = new HashMap<>();
// 未发起
List<ProjectLawsInventoryEO> notStartedVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.DUTY_PERSON_REJECTED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartedComplianceFlowCount = (double) notStartedVerifyPliEoList.size();
double notStartedPercentage = (notStartedComplianceFlowCount / (datas.size())) * 100;
String notStartedPercentageStr = notStartedPercentage != 0 ? df.format(notStartedPercentage) : "0";
notStartedMap.put("amount",notStartedComplianceFlowCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 待确认
List<ProjectLawsInventoryEO> toConfirmVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.TO_TRACK.getValue())
);
return flag;
}).collect(Collectors.toList());
double toConfirmComplianceFlowCount = (double) toConfirmVerifyPliEoList.size();
double toConfirmPercentage = (toConfirmComplianceFlowCount / (datas.size())) * 100;
String toConfirmPercentageStr = toConfirmPercentage != 0 ? df.format(toConfirmPercentage) : "0";
toConfirmMap.put("amount",toConfirmComplianceFlowCount);
toConfirmMap.put("percentage",toConfirmPercentageStr + percentSign);
// 符合
List<ProjectLawsInventoryEO> complianceVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.CONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
double complianceFlowCount = (double) complianceVerifyPliEoList.size();
double compliancePercentage = (complianceFlowCount / (datas.size())) * 100;
String compliancePercentageStr = compliancePercentage != 0 ? df.format(compliancePercentage) : "0";
complianceMap.put("amount",complianceFlowCount);
complianceMap.put("percentage",compliancePercentageStr + percentSign);
// 不符合
List<ProjectLawsInventoryEO> nonComplianceVerifyPliEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getVerifyFlowStatus(),ComplianceFlowStatusEnum.INCONFORMITY.getValue())
);
return flag;
}).collect(Collectors.toList());
double nonComplianceComplianceFlowCount = (double) nonComplianceVerifyPliEoList.size();
double nonCompliancePercentage = (nonComplianceComplianceFlowCount / (datas.size())) * 100;
String nonCompliancePercentageStr = nonCompliancePercentage != 0 ? df.format(nonCompliancePercentage) : "0";
nonComplianceMap.put("amount",nonComplianceComplianceFlowCount);
nonComplianceMap.put("percentage",nonCompliancePercentageStr + percentSign);
result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap);
result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
result.put(ComplianceFlowStatusEnum.CONFORMITY.getValue(),complianceMap);
result.put(ComplianceFlowStatusEnum.INCONFORMITY.getValue(),nonComplianceMap);
}
return result;
}
@Override
public Map<String, Object> getRZTaskToConfirmStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
// 未发起
List<ProjectCertificationInventoryEO> notStartedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(), CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartedCount = (double) notStartedPciEoList.size();
double notStartedPercentage = (notStartedCount / (datas.size())) * 100;
String notStartedPercentageStr = notStartedPercentage != 0 ? df.format(notStartedPercentage) : "0";
notStartedMap.put("amount",notStartedCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 待确认
List<ProjectCertificationInventoryEO> toConfirmPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
);
return flag;
}).collect(Collectors.toList());
double toConfirmCount = (double) toConfirmPciEoList.size();
double toConfirmPercentage = (toConfirmCount / (datas.size())) * 100;
String toConfirmPercentageStr = toConfirmPercentage != 0 ? df.format(toConfirmPercentage) : "0";
toConfirmMap.put("amount",toConfirmCount);
toConfirmMap.put("percentage",toConfirmPercentageStr + percentSign);
// 接受
List<ProjectCertificationInventoryEO> acceptedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())
);
return flag;
}).collect(Collectors.toList());
double acceptedCount = (double) acceptedPciEoList.size();
double acceptedPercentage = (acceptedCount / (datas.size())) * 100;
String acceptedPercentageStr = acceptedPercentage != 0 ? df.format(acceptedPercentage) : "0";
acceptedMap.put("amount",acceptedCount);
acceptedMap.put("percentage",acceptedPercentageStr + percentSign);
// 拒绝
List<ProjectCertificationInventoryEO> rejectedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
);
return flag;
}).collect(Collectors.toList());
double rejectedCount = (double) rejectedPciEoList.size();
double rejectedPercentage = (rejectedCount / (datas.size())) * 100;
String rejectedPercentageStr = rejectedPercentage != 0 ? df.format(rejectedPercentage) : "0";
rejectedMap.put("amount",rejectedCount);
rejectedMap.put("percentage",rejectedPercentageStr + percentSign);
result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap);
result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
result.put(TaskAffirmStatusEnum.ACCEPTED.getValue(),acceptedMap);
result.put(TaskAffirmStatusEnum.REJECTED.getValue(),rejectedMap);
}
return result;
}
@Override
public Map<String, Object> getPrehomoStatisticeGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
DecimalFormat df = new DecimalFormat("#.00");
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> toConfirmMap = new HashMap<>();
Map<String,Object> acceptedMap = new HashMap<>();
Map<String,Object> rejectedMap = new HashMap<>();
// 未发起
List<ProjectCertificationInventoryEO> notStartedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.REFUSAL_OF_RESPONSIBLE_PERSON.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartedCount = (double) notStartedPciEoList.size();
double notStartedPercentage = (notStartedCount / (datas.size())) * 100;
String notStartedPercentageStr = notStartedPercentage != 0 ? df.format(notStartedPercentage) : "0";
notStartedMap.put("amount",notStartedCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 待确认
List<ProjectCertificationInventoryEO> toConfirmPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
);
return flag;
}).collect(Collectors.toList());
double toConfirmCount = (double) toConfirmPciEoList.size();
double toConfirmPercentage = (toConfirmCount / (datas.size())) * 100;
String toConfirmPercentageStr = toConfirmPercentage != 0 ? df.format(toConfirmPercentage) : "0";
toConfirmMap.put("amount",toConfirmCount);
toConfirmMap.put("percentage",toConfirmPercentageStr + percentSign);
// 审查通过
List<ProjectCertificationInventoryEO> acceptedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
);
return flag;
}).collect(Collectors.toList());
double acceptedCount = (double) acceptedPciEoList.size();
double acceptedPercentage = (acceptedCount / (datas.size())) * 100;
String acceptedPercentageStr = acceptedPercentage != 0 ? df.format(acceptedPercentage) : "0";
acceptedMap.put("amount",acceptedCount);
acceptedMap.put("percentage",acceptedPercentageStr + percentSign);
// 审查退回
List<ProjectCertificationInventoryEO> rejectedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())
);
return flag;
}).collect(Collectors.toList());
double rejectedCount = (double) rejectedPciEoList.size();
double rejectedPercentage = (rejectedCount / (datas.size())) * 100;
String rejectedPercentageStr = rejectedPercentage != 0 ? df.format(rejectedPercentage) : "0";
rejectedMap.put("amount",rejectedCount);
rejectedMap.put("percentage",rejectedPercentageStr + percentSign);
result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap);
result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
result.put(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue(),acceptedMap);
result.put(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue(),rejectedMap);
}
return result;
}
@Override
public Map<String, Object> getAllCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> inProgressMap = new HashMap<>();
Map<String,Object> testPassedMap = new HashMap<>();
Map<String,Object> testFailedMap = new HashMap<>();
// 未开始
List<ProjectCertificationInventoryEO> notStartedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(), CertificationProgressEnum.NOT_START.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartedCount = (double) notStartedPciEoList.size();
double notStartedPercentage = (notStartedCount / (datas.size())) * 100;
String notStartedPercentageStr = notStartedPercentage != 0 ? df.format(notStartedPercentage) : "0";
notStartedMap.put("amount",notStartedCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 进行中
List<ProjectCertificationInventoryEO> inProgressPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue())
|| StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
double inProgressCount = (double) inProgressPciEoList.size();
double inProgressPercentage = (inProgressCount / (datas.size())) * 100;
String inProgressPercentageStr = inProgressPercentage != 0 ? df.format(inProgressPercentage) : "0";
inProgressMap.put("amount",inProgressCount);
inProgressMap.put("percentage",inProgressPercentageStr + percentSign);
// 实验通过
List<ProjectCertificationInventoryEO> testPassedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
|| StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())
|| StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testPassedCount = (double) testPassedPciEoList.size();
double testPassedPercentage = (testPassedCount / (datas.size())) * 100;
String testPassedPercentageStr = testPassedPercentage != 0 ? df.format(testPassedPercentage) : "0";
testPassedMap.put("amount",testPassedCount);
testPassedMap.put("percentage",testPassedPercentageStr + percentSign);
// 实验失败
List<ProjectCertificationInventoryEO> testFailedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testFailedCount = (double) testFailedPciEoList.size();
double testFailedPercentage = (testFailedCount / (datas.size())) * 100;
String testFailedPercentageStr = testFailedPercentage != 0 ? df.format(testFailedPercentage) : "0";
testFailedMap.put("amount",testFailedCount);
testFailedMap.put("percentage",testFailedPercentageStr + percentSign);
result.put(CertificationProgressEnum.NOT_START.getValue(),notStartedMap);
result.put(CertificationProgressEnum.IN_PROGRESS.getValue(),inProgressMap);
result.put(CertificationProgressEnum.TEST_PASSED.getValue(),testPassedMap);
result.put(CertificationProgressEnum.TEST_FAILED.getValue(),testFailedMap);
}
return result;
}
@Override
public Map<String, Object> getCarCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartedMap = new HashMap<>();
Map<String,Object> inProgressMap = new HashMap<>();
Map<String,Object> testPassedMap = new HashMap<>();
Map<String,Object> testFailedMap = new HashMap<>();
// 未开始
List<ProjectCertificationInventoryEO> notStartedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.NOT_START.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartedCount = (double) notStartedPciEoList.size();
double notStartedPercentage = (notStartedCount / (datas.size())) * 100;
String notStartedPercentageStr = notStartedPercentage != 0 ? df.format(notStartedPercentage) : "0";
notStartedMap.put("amount",notStartedCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 进行中
List<ProjectCertificationInventoryEO> inProgressPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue())
);
return flag;
}).collect(Collectors.toList());
double inProgressCount = (double) inProgressPciEoList.size();
double inProgressPercentage = (inProgressCount / (datas.size())) * 100;
String inProgressPercentageStr = inProgressPercentage != 0 ? df.format(inProgressPercentage) : "0";
inProgressMap.put("amount",inProgressCount);
inProgressMap.put("percentage",inProgressPercentageStr + percentSign);
// 实验通过
List<ProjectCertificationInventoryEO> testPassedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testPassedCount = (double) testPassedPciEoList.size();
double testPassedPercentage = (testPassedCount / (datas.size())) * 100;
String testPassedPercentageStr = testPassedPercentage != 0 ? df.format(testPassedPercentage) : "0";
testPassedMap.put("amount",testPassedCount);
testPassedMap.put("percentage",testPassedPercentageStr + percentSign);
// 实验失败
List<ProjectCertificationInventoryEO> testFailedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testFailedCount = (double) testFailedPciEoList.size();
double testFailedPercentage = (testFailedCount / (datas.size())) * 100;
String testFailedPercentageStr = testFailedPercentage != 0 ? df.format(testFailedPercentage) : "0";
testFailedMap.put("amount",testFailedCount);
testFailedMap.put("percentage",testFailedPercentageStr + percentSign);
result.put(CertificationProgressEnum.NOT_START.getValue(),notStartedMap);
result.put(CertificationProgressEnum.IN_PROGRESS.getValue(),inProgressMap);
result.put(CertificationProgressEnum.TEST_PASSED.getValue(),testPassedMap);
result.put(CertificationProgressEnum.TEST_FAILED.getValue(),testFailedMap);
}
return result;
}
@Override
public Map<String, Object> getPartCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notSubmitMap = new HashMap<>();
Map<String,Object> reportSubmitMap = new HashMap<>();
Map<String,Object> storedMap = new HashMap<>();
Map<String,Object> notStartMap = new HashMap<>();
Map<String,Object> inProgressMap = new HashMap<>();
Map<String,Object> testPassedMap = new HashMap<>();
Map<String,Object> testFailedMap = new HashMap<>();
// 部件报告未提交
List<ProjectCertificationInventoryEO> notSubmitPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
double notSubmitCount = (double) notSubmitPciEoList.size();
double notSubmitPercentage = (notSubmitCount / (datas.size())) * 100;
String notSubmitPercentageStr = notSubmitPercentage != 0 ? df.format(notSubmitPercentage) : "0";
notSubmitMap.put("amount",notSubmitCount);
notSubmitMap.put("percentage",notSubmitPercentageStr + percentSign);
// 部件报告已提交
List<ProjectCertificationInventoryEO> reportSubmitPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
double reportSubmitCount = (double) reportSubmitPciEoList.size();
double reportSubmitPercentage = (reportSubmitCount / (datas.size())) * 100;
String reportSubmitPercentageStr = reportSubmitPercentage != 0 ? df.format(reportSubmitPercentage) : "0";
reportSubmitMap.put("amount",reportSubmitCount);
reportSubmitMap.put("percentage",reportSubmitPercentageStr + percentSign);
// 部件报告已入库
List<ProjectCertificationInventoryEO> storedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())
);
return flag;
}).collect(Collectors.toList());
double storedCount = (double) storedPciEoList.size();
double storedPercentage = (storedCount / (datas.size())) * 100;
String storedPercentageStr = storedPercentage != 0 ? df.format(storedPercentage) : "0";
storedMap.put("amount",storedCount);
storedMap.put("percentage",storedPercentageStr + percentSign);
// 未开始
List<ProjectCertificationInventoryEO> notStartPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.NOT_START.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartCount = (double) notStartPciEoList.size();
double notStartPercentage = (notStartCount / (datas.size())) * 100;
String notStartPercentageStr = notStartPercentage != 0 ? df.format(notStartPercentage) : "0";
notStartMap.put("amount",notStartCount);
notStartMap.put("percentage",notStartPercentageStr + percentSign);
// 进行中
List<ProjectCertificationInventoryEO> inProgressPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue())
);
return flag;
}).collect(Collectors.toList());
double inProgressCount = (double) inProgressPciEoList.size();
double inProgressPercentage = (inProgressCount / (datas.size())) * 100;
String inProgressPercentageStr = inProgressPercentage != 0 ? df.format(inProgressPercentage) : "0";
inProgressMap.put("amount",inProgressCount);
inProgressMap.put("percentage",inProgressPercentageStr + percentSign);
// 实验通过
List<ProjectCertificationInventoryEO> testPassedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testPassedCount = (double) testPassedPciEoList.size();
double testPassedPercentage = (testPassedCount / (datas.size())) * 100;
String testPassedPercentageStr = testPassedPercentage != 0 ? df.format(testPassedPercentage) : "0";
testPassedMap.put("amount",testPassedCount);
testPassedMap.put("percentage",testPassedPercentageStr + percentSign);
// 实验失败
List<ProjectCertificationInventoryEO> testFailedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testFailedCount = (double) testFailedPciEoList.size();
double testFailedPercentage = (testFailedCount / (datas.size())) * 100;
String testFailedPercentageStr = testFailedPercentage != 0 ? df.format(testFailedPercentage) : "0";
testFailedMap.put("amount",testFailedCount);
testFailedMap.put("percentage",testFailedPercentageStr + percentSign);
result.put(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue(),notSubmitMap);
result.put(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue(),reportSubmitMap);
result.put(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue(),storedMap);
result.put(CertificationProgressEnum.NOT_START.getValue(),notStartMap);
result.put(CertificationProgressEnum.IN_PROGRESS.getValue(),inProgressMap);
result.put(CertificationProgressEnum.TEST_PASSED.getValue(),testPassedMap);
result.put(CertificationProgressEnum.TEST_FAILED.getValue(),testFailedMap);
}
return result;
}
@Override
public Map<String, Object> getParameterCollectingStatisticsGroupByTerritory(List<ParamsCollectManifestEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartMap = new HashMap<>();
Map<String,Object> collectingMap = new HashMap<>();
Map<String,Object> submitMap = new HashMap<>();
Map<String,Object> syncReporMap = new HashMap<>();
List<ParamsCollectManifestEO> notStartPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.WAIT_COLLECT.getValue())
|| StringUtils.equals(data.getState(), CollectManifestStateEnum.SDT_BACK.getValue())
|| StringUtils.equals(data.getState(), CollectManifestStateEnum.CHANGE.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartCount = (double) notStartPcmEoList.size();
notStartMap.put("amount",notStartCount);
List<ParamsCollectManifestEO> collectingPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.WAIT_FILL.getValue())
|| StringUtils.equals(data.getState(),CollectManifestStateEnum.WAIT_SDT.getValue())
|| StringUtils.equals(data.getState(),CollectManifestStateEnum.DRE_BACK.getValue())
|| StringUtils.equals(data.getState(),CollectManifestStateEnum.CERT_BACK.getValue())
);
return flag;
}).collect(Collectors.toList());
double collectingCount = (double) collectingPcmEoList.size();
collectingMap.put("amount",collectingCount);
List<ParamsCollectManifestEO> submitPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.SUBMIT.getValue())
);
return flag;
}).collect(Collectors.toList());
double submitCount = (double) submitPcmEoList.size();
submitMap.put("amount",submitCount);
List<ParamsCollectManifestEO> syncReporPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.SYNC_REPORT.getValue())
);
return flag;
}).collect(Collectors.toList());
double syncReporCount = (double) syncReporPcmEoList.size();
syncReporMap.put("amount",syncReporCount);
result.put(CollectManifestStatisticsStateEnum.NOT_START.getValue(),notStartMap);
result.put(CollectManifestStatisticsStateEnum.COLLECTING.getValue(),collectingMap);
result.put(CollectManifestStatisticsStateEnum.SUBMIT.getValue(),submitMap);
result.put(CollectManifestStatisticsStateEnum.SYNC_REPORT.getValue(),syncReporMap);
}
return result;
}
}
@@ -1,33 +1,52 @@
package com.jero.modules.project.service.impl; package com.jero.modules.project.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.utils.IOUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.DictModel;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.ConditionAssessmentEO; import com.jero.common.util.DateUtils;
import com.jero.modules.project.entity.ProjectLawsInventoryEO; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
import com.jero.modules.project.entity.ProjectLibraryBase; import com.jero.modules.cert.collect.entity.ParamsManifestEO;
import com.jero.modules.project.entity.ProjectTaskInventoryEO; import com.jero.modules.cert.collect.enums.CollectManifestStatisticsStateEnum;
import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService;
import com.jero.modules.cert.collect.service.IParamsManifestEOService;
import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.*; import com.jero.modules.project.enums.*;
import com.jero.modules.project.mapper.ProjectUserPermissionMapper; import com.jero.modules.project.mapper.ProjectUserPermissionMapper;
import com.jero.modules.project.service.IConditionAssessmentEOService; import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
import com.jero.modules.project.service.IProjectLibraryStatisticsService;
import com.jero.modules.project.service.IProjectStatusBoardService; import com.jero.modules.project.service.IProjectStatusBoardService;
import com.jero.modules.project.vo.TimeNodeVO; import com.jero.modules.project.vo.TimeNodeVO;
import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.enums.DicCodeEnum;
import com.jero.modules.system.mapper.SysRoleMapper; import com.jero.modules.system.mapper.SysRoleMapper;
import com.jero.modules.system.service.IProjectUserBrandService; import com.jero.modules.system.service.IProjectUserBrandService;
import com.jero.modules.system.service.ISysUserService; import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -39,6 +58,8 @@ import java.util.stream.Collectors;
*/ */
@Service @Service
public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService { public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService {
private static DecimalFormat df = new DecimalFormat("#.00");
private static String percentSign = "%";
@Autowired @Autowired
private ProjectTaskPlanningServiceImpl projectTaskPlanningService; private ProjectTaskPlanningServiceImpl projectTaskPlanningService;
@Autowired @Autowired
@@ -59,6 +80,14 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
private IProjectUserBrandService projectUserBrandService; private IProjectUserBrandService projectUserBrandService;
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@Autowired
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
@Autowired
private IParamsManifestEOService paramsManifestEOService;
@Autowired
private IParamsCollectManifestEOService paramsCollectManifestEOService;
@Autowired
private IProjectLibraryStatisticsService projectLibraryStatisticsService;
/** /**
@@ -508,4 +537,601 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
} }
@Override
public void exportXls(HttpServletResponse response, HttpServletRequest request,ProjectLibraryBase projectLibraryBase) {
String fileName = "";
String cut = projectLibraryBase.getCut();
OutputStream ops = null;
HSSFWorkbook workbook = new HSSFWorkbook();
List<ProjectLibraryBase> plbEoList = this.projectLibraryBaseService.getList(projectLibraryBase);
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
for (ProjectLibraryBase libraryBase : plbEoList) {
targetMarket(projectLibraryBase, dictItemList, libraryBase);
}
List<ProjectLawsInventoryEO> pliEoList = this.projectLawsInventoryEOService.list();
List<ProjectCertificationInventoryEO> pciEoList = this.projectCertificationInventoryEOService.list();
List<ProjectTaskPlanning> ptpEoList = this.projectTaskPlanningService.list();
List<ParamsManifestEO> pmEoList = this.paramsManifestEOService.list();
List<ParamsCollectManifestEO> pcmEoList = this.paramsCollectManifestEOService.getList(null);
this.exportCrossProjectProgress(workbook,projectLibraryBase,plbEoList,pliEoList,pciEoList,pmEoList,pcmEoList,ptpEoList);
this.exportOverviewCrossProjectProgress(workbook,projectLibraryBase,plbEoList,pliEoList,pciEoList,pmEoList,pcmEoList,ptpEoList);
try {
response.setHeader("Content-Disposition",
"attachment; filename=" + fileName);
response.setContentType("application/force-download");
ops = response.getOutputStream();
workbook.write(ops);
ops.flush();
}catch (IOException ex){
ex.printStackTrace();
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException("下载文件失败");
}else{
throw new JeroBootException("Failed to download file");
}
}finally {
IOUtils.closeQuietly(ops);
}
}
/**
* 导出跨项目进度
* @param workbook
* @param projectLibraryBase
* @param plbEoList
* @param pliEoList
* @param pciEoList
* @param pmEoList
* @param pcmEoList
* @param ptpEoList
*/
private void exportCrossProjectProgress(HSSFWorkbook workbook,
ProjectLibraryBase projectLibraryBase,
List<ProjectLibraryBase> plbEoList,
List<ProjectLawsInventoryEO> pliEoList,
List<ProjectCertificationInventoryEO> pciEoList,
List<ParamsManifestEO> pmEoList,
List<ParamsCollectManifestEO> pcmEoList,
List<ProjectTaskPlanning> ptpEoList) {
String cut = projectLibraryBase.getCut();
String sheetName = "项目进度";
String firstTitle = "项目," +
"法规任务确认," +
"设计符合性确认," +
"验证符合性确认," +
"认证任务确认," +
"Pre-Homo确认," +
"认证进度," +
"参数收集";
String secondTitle = "待发布,待校核,待确认,接受,拒绝,完成度,责任确认日期," +
"未发起,待提交,待审查,符合,不符合,待追踪,不涉及,任务终止,完成度,设计核查日期," +
"未发起,待提交,待审查,符合,不符合,待追踪,不涉及,任务终止,完成度,验证核查日期," +
"待发布,待校核,待确认,接受,拒绝,完成度,责任确认日期," +
"未发起,待提交,待审查,审查通过,审查退回,完成度,认证开始日期," +
"待开始,进行中,实验通过,实验失败,部件报告未提交,部件报告已提交,部件报告已入库,完成度,认证提交时间," +
"未开始,收集中,已提交,已同步至上报库,完成度,认证提交时间";
if(com.jero.modules.system.util.StringUtils.equals(cut,CutEnum.EN.getValue())){
sheetName = "Project Progress";
firstTitle = "Project," +
"Confirmation of regulatory tasks," +
"Confirmation of design compliance," +
"Verification of compliance confirmation," +
"Certification task confirmation," +
"Pre Homo confirmation," +
"Certification progress," +
"Parameter collection";
secondTitle = "To be released,To be verified,To be confirmed,Accept,Refuse,Completion degree,Responsibility confirmation date," +
"Not initiated,To be submitted,Pending review,Conform to,Non Conformance,To be tracked,Not involved,Task Termination,Completion degree,Design verification date," +
"Not initiated,To be submitted,Pending review,Conform to,Non Conformance,To be tracked,Not involved,Task Termination,Completion degree,Verification verification date," +
"To be released,To be verified,To be confirmed,Accept,Refuse,Completion degree,Responsibility confirmation date," +
"Not initiated,To be submitted,Pending review,Review passed,Review return,Completion degree,Certification start date," +
"To begin,In progress,Experiment passed,Experimental failure,Component report not submitted,Component report submitted,Component report has been stored,Completion degree,Certification submission time," +
"Not started,Collecting,Submitted,Synchronized to the upper report library,Completion degree,Certification submission time";
}
HSSFSheet sheet = workbook.createSheet(sheetName);
CellRangeAddress region1 = new CellRangeAddress(0, 1, 0, 0);
sheet.addMergedRegion(region1);
CellRangeAddress region6 = new CellRangeAddress(0, 0, 1, 7);
sheet.addMergedRegion(region6);
CellRangeAddress region7 = new CellRangeAddress(0, 0, 8, 17);
sheet.addMergedRegion(region7);
CellRangeAddress region8 = new CellRangeAddress(0, 0, 18, 27);
sheet.addMergedRegion(region8);
CellRangeAddress region9 = new CellRangeAddress(0, 0, 28, 34);
sheet.addMergedRegion(region9);
CellRangeAddress region10 = new CellRangeAddress(0, 0, 35, 41);
sheet.addMergedRegion(region10);
CellRangeAddress region11 = new CellRangeAddress(0, 0, 42, 50);
sheet.addMergedRegion(region11);
CellRangeAddress region12 = new CellRangeAddress(0, 0, 51, 56);
sheet.addMergedRegion(region12);
String[] firstTitleArr = firstTitle.split(",");
String[] secondTitleArr = secondTitle.split(",");
Row firstRow = sheet.createRow(0);
Row secondRow = sheet.createRow(1);
CellStyle cellStyleTitle = workbook.createCellStyle();
cellStyleTitle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
cellStyleTitle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
for (int i = 0; i <= 56; i++){
sheet.setColumnWidth(i, 4000);
Cell firstRowCell = firstRow.createCell(i);
firstRowCell.setCellStyle(cellStyleTitle);
if(i == 0){
firstRowCell.setCellValue(firstTitleArr[0]);
}else if(i == 1){
firstRowCell.setCellValue(firstTitleArr[1]);
}else if(i == 8){
firstRowCell.setCellValue(firstTitleArr[2]);
}else if(i == 18){
firstRowCell.setCellValue(firstTitleArr[3]);
}else if(i == 28){
firstRowCell.setCellValue(firstTitleArr[4]);
}else if(i == 35){
firstRowCell.setCellValue(firstTitleArr[5]);
}else if(i == 42){
firstRowCell.setCellValue(firstTitleArr[6]);
}else if(i == 51){
firstRowCell.setCellValue(firstTitleArr[7]);
}
if(i >= 1){
Cell secondRowCell = secondRow.createCell(i);
secondRowCell.setCellValue(secondTitleArr[i-1]);
}
}
this.exportCrossProjectProgressSetData(plbEoList, sheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList);
}
/**
* 导出跨项目进度-设置数据
* @param plbEoList
* @param sheet
* @param pliEoList
* @param pciEoList
* @param pmEoList
* @param pcmEoList
* @param projectLibraryBase
* @param ptpEoList
*/
private void exportCrossProjectProgressSetData(List<ProjectLibraryBase> plbEoList,
HSSFSheet sheet,
List<ProjectLawsInventoryEO> pliEoList,
List<ProjectCertificationInventoryEO> pciEoList,
List<ParamsManifestEO> pmEoList,
List<ParamsCollectManifestEO> pcmEoList,
ProjectLibraryBase projectLibraryBase,
List<ProjectTaskPlanning> ptpEoList) {
int dataIndex = 2;
for (ProjectLibraryBase plbEo : plbEoList) {
Row dataRow = sheet.createRow(dataIndex);
dataRow.createCell(0).setCellValue(plbEo.getShowName());
List<ProjectTaskPlanning> ptpEoListTemp = ptpEoList.stream().filter(ptpEo -> StringUtils.equals(ptpEo.getProjectId(), plbEo.getId())).collect(Collectors.toList());
String legalTaskConfirmationStr = "";
String designDeadlineStr = "";
String verifyDeadlineStr = "";
String attestationStartTimeStr = "";
String certificationSubmissionStr = "";
if(CollectionUtils.isNotEmpty(ptpEoListTemp)){
Date legalTaskConfirmation = ptpEoListTemp.get(0).getLegalTaskConfirmation();
if (ObjectUtils.isNotEmpty(legalTaskConfirmation)) {
legalTaskConfirmationStr = DateUtils.formatDate(legalTaskConfirmation);
}
Date designDeadline = ptpEoListTemp.get(0).getDesignDeadline();
if (ObjectUtils.isNotEmpty(designDeadline)) {
designDeadlineStr = DateUtils.formatDate(designDeadline);
}
Date verifyDeadline = ptpEoListTemp.get(0).getVerifyDeadline();
if (ObjectUtils.isNotEmpty(verifyDeadline)) {
verifyDeadlineStr = DateUtils.formatDate(verifyDeadline);
}
Date attestationStartTime = ptpEoListTemp.get(0).getAttestationStartTime();
if (ObjectUtils.isNotEmpty(attestationStartTime)) {
attestationStartTimeStr = DateUtils.formatDate(attestationStartTime);
}
Date certificationSubmission = ptpEoListTemp.get(0).getCertificationSubmission();
if (ObjectUtils.isNotEmpty(certificationSubmission)) {
certificationSubmissionStr = DateUtils.formatDate(certificationSubmission);
}
}
List<ProjectLawsInventoryEO> pliEos = pliEoList.stream().filter(pliEo -> StringUtils.equals(pliEo.getProjectLibraryId(), plbEo.getId())).collect(Collectors.toList());
Map<String,Object> fgRwqrMap = this.projectLawsInventoryEOService.groupByFGRwqrStatus(pliEos);
Map<String,Object> fgRwqrProjectScheduleExportMap = (Map<String, Object>) fgRwqrMap.get("projectScheduleExportMap");
double fgrqqrToBeReleased = (double) fgRwqrProjectScheduleExportMap.get("toBeReleased");
double fgrqqrToBeVerified = (double) fgRwqrProjectScheduleExportMap.get("toBeVerified");
double fgrqqrToBeConfirmed = (double) fgRwqrProjectScheduleExportMap.get("toBeConfirmed");
double fgrqqrAccept = (double) fgRwqrProjectScheduleExportMap.get("accept");
double fgrqqrRefuse = (double) fgRwqrProjectScheduleExportMap.get("refuse");
String fgrqqrPercentage = (String) fgRwqrProjectScheduleExportMap.get("percentage");
dataRow.createCell(1).setCellValue(fgrqqrToBeReleased);
dataRow.createCell(2).setCellValue(fgrqqrToBeVerified);
dataRow.createCell(3).setCellValue(fgrqqrToBeConfirmed);
dataRow.createCell(4).setCellValue(fgrqqrAccept);
dataRow.createCell(5).setCellValue(fgrqqrRefuse);
dataRow.createCell(6).setCellValue(fgrqqrPercentage);
dataRow.createCell(7).setCellValue(legalTaskConfirmationStr);
Map<String,Object> designMap = this.projectLawsInventoryEOService.groupByDesignStatus(pliEos);
Map<String,Object> designMapProjectScheduleExportMap = (Map<String, Object>) designMap.get("projectScheduleExportMap");
double designNotStart = (double) designMapProjectScheduleExportMap.get("notStart");
double designToBeSubmitted = (double) designMapProjectScheduleExportMap.get("toBeSubmitted");
double designToBeReviewed = (double) designMapProjectScheduleExportMap.get("toBeReviewed");
double designCompliance = (double) designMapProjectScheduleExportMap.get("compliance");
double designNonCompliance = (double) designMapProjectScheduleExportMap.get("nonCompliance");
double designToBeTracked = (double) designMapProjectScheduleExportMap.get("toBeTracked");
double designNotInvolved = (double) designMapProjectScheduleExportMap.get("notInvolved");
double designTaskTermination = (double) designMapProjectScheduleExportMap.get("taskTermination");
// double designCount = (double) designMapProjectScheduleExportMap.get("count");
String designPercentage = (String) designMapProjectScheduleExportMap.get("percentage");
dataRow.createCell(8).setCellValue(designNotStart);
dataRow.createCell(9).setCellValue(designToBeSubmitted);
dataRow.createCell(10).setCellValue(designToBeReviewed);
dataRow.createCell(11).setCellValue(designCompliance);
dataRow.createCell(12).setCellValue(designNonCompliance);
dataRow.createCell(13).setCellValue(designToBeTracked);
dataRow.createCell(14).setCellValue(designNotInvolved);
dataRow.createCell(15).setCellValue(designTaskTermination);
dataRow.createCell(16).setCellValue(designPercentage);
dataRow.createCell(17).setCellValue(designDeadlineStr);
Map<String,Object> verifyMap = this.projectLawsInventoryEOService.groupByVerifyStatus(pliEos);
Map<String,Object> verifyMapProjectScheduleExportMap = (Map<String, Object>) verifyMap.get("projectScheduleExportMap");
double verifyNotStart = (double) verifyMapProjectScheduleExportMap.get("notStart");
double verifyToBeSubmitted = (double) verifyMapProjectScheduleExportMap.get("toBeSubmitted");
double verifyToBeReviewed = (double) verifyMapProjectScheduleExportMap.get("toBeReviewed");
double verifyCompliance = (double) verifyMapProjectScheduleExportMap.get("compliance");
double verifyNonCompliance = (double) verifyMapProjectScheduleExportMap.get("nonCompliance");
double verifyToBeTracked = (double) verifyMapProjectScheduleExportMap.get("toBeTracked");
double verifyNotInvolved = (double) verifyMapProjectScheduleExportMap.get("notInvolved");
double verifyTaskTermination = (double) verifyMapProjectScheduleExportMap.get("taskTermination");
double verifyCount = (double) verifyMapProjectScheduleExportMap.get("count");
String verifyPercentage = (String) verifyMapProjectScheduleExportMap.get("percentage");
dataRow.createCell(18).setCellValue(verifyNotStart);
dataRow.createCell(19).setCellValue(verifyToBeSubmitted);
dataRow.createCell(20).setCellValue(verifyToBeReviewed);
dataRow.createCell(21).setCellValue(verifyCompliance);
dataRow.createCell(22).setCellValue(verifyNonCompliance);
dataRow.createCell(23).setCellValue(verifyToBeTracked);
dataRow.createCell(24).setCellValue(verifyNotInvolved);
dataRow.createCell(25).setCellValue(verifyTaskTermination);
dataRow.createCell(26).setCellValue(verifyPercentage);
dataRow.createCell(27).setCellValue(verifyDeadlineStr);
List<ProjectCertificationInventoryEO> pciEos = pciEoList.stream().filter(pciEo -> StringUtils.equals(pciEo.getProjectLibraryId(), plbEo.getId())).collect(Collectors.toList());
Map<String,Object> rzRwqrMap = this.projectCertificationInventoryEOService.groupByFGRwqrStatus(pciEos);
Map<String,Object> rzRwqrProjectScheduleExportMap = (Map<String, Object>) rzRwqrMap.get("projectScheduleExportMap");
double rzRqqrToBeReleased = (double) rzRwqrProjectScheduleExportMap.get("toBeReleased");
double rzRqqrToBeVerified = (double) rzRwqrProjectScheduleExportMap.get("toBeVerified");
double rzRqqrToBeConfirmed = (double) rzRwqrProjectScheduleExportMap.get("toBeConfirmed");
double rzRqqrAccept = (double) rzRwqrProjectScheduleExportMap.get("accept");
double rzRqqrRefuse = (double) rzRwqrProjectScheduleExportMap.get("refuse");
String rzRqqrPercentage = (String) rzRwqrProjectScheduleExportMap.get("percentage");
dataRow.createCell(28).setCellValue(rzRqqrToBeReleased);
dataRow.createCell(29).setCellValue(rzRqqrToBeVerified);
dataRow.createCell(30).setCellValue(rzRqqrToBeConfirmed);
dataRow.createCell(31).setCellValue(rzRqqrAccept);
dataRow.createCell(32).setCellValue(rzRqqrRefuse);
dataRow.createCell(33).setCellValue(rzRqqrPercentage);
dataRow.createCell(34).setCellValue(legalTaskConfirmationStr);
Map<String,Object> preHomoMap = this.projectCertificationInventoryEOService.groupByPreHomoStatus(pciEos);
Map<String,Object> preHomoProjectScheduleExportMap = (Map<String, Object>) preHomoMap.get("projectScheduleExportMap");
double preHomoNotStartCount = (double) preHomoProjectScheduleExportMap.get("notStartCount");
double preHomoToBeSubmittedCount = (double) preHomoProjectScheduleExportMap.get("toBeSubmittedCount");
double preHomoToBeReviewedCount = (double) preHomoProjectScheduleExportMap.get("toBeReviewedCount");
double preHomoAccept = (double) preHomoProjectScheduleExportMap.get("accept");
double preHomoRefuse = (double) preHomoProjectScheduleExportMap.get("refuse");
String preHomoPercentage = (String) preHomoProjectScheduleExportMap.get("percentage");
dataRow.createCell(35).setCellValue(preHomoNotStartCount);
dataRow.createCell(36).setCellValue(preHomoToBeSubmittedCount);
dataRow.createCell(37).setCellValue(preHomoToBeReviewedCount);
dataRow.createCell(38).setCellValue(preHomoAccept);
dataRow.createCell(39).setCellValue(preHomoRefuse);
dataRow.createCell(40).setCellValue(preHomoPercentage);
dataRow.createCell(41).setCellValue(attestationStartTimeStr);
Map<String,Object> certificationProgressMap = this.projectCertificationInventoryEOService.groupByCertificationProgress(pciEos);
Map<String,Object> certificationProgressMapProjectScheduleExportMap = (Map<String, Object>) certificationProgressMap.get("projectScheduleExportMap");
double certificationProgressNotStartCount = (double) certificationProgressMapProjectScheduleExportMap.get("notStartCount");
double certificationProgressInProgressCount = (double) certificationProgressMapProjectScheduleExportMap.get("inProgressCount");
double certificationProgressTestPassedCount = (double) certificationProgressMapProjectScheduleExportMap.get("testPassedCount");
double certificationProgressTestFailedCount = (double) certificationProgressMapProjectScheduleExportMap.get("testFailedCount");
double certificationProgressNotSubmitCount = (double) certificationProgressMapProjectScheduleExportMap.get("notSubmitCount");
double certificationProgressReportSubmitCount = (double) certificationProgressMapProjectScheduleExportMap.get("reportSubmitCount");
double certificationProgressStoredCount = (double) certificationProgressMapProjectScheduleExportMap.get("storedCount");
// String certificationProgressCount = (String) certificationProgressMapProjectScheduleExportMap.get("count");
String certificationProgressPercentage = (String) certificationProgressMapProjectScheduleExportMap.get("percentage");
dataRow.createCell(42).setCellValue(certificationProgressNotStartCount);
dataRow.createCell(43).setCellValue(certificationProgressInProgressCount);
dataRow.createCell(44).setCellValue(certificationProgressTestPassedCount);
dataRow.createCell(45).setCellValue(certificationProgressTestFailedCount);
dataRow.createCell(46).setCellValue(certificationProgressNotSubmitCount);
dataRow.createCell(47).setCellValue(certificationProgressReportSubmitCount);
dataRow.createCell(48).setCellValue(certificationProgressStoredCount);
dataRow.createCell(49).setCellValue(certificationProgressPercentage);
dataRow.createCell(50).setCellValue(certificationSubmissionStr);
List<ParamsManifestEO> pmEos = pmEoList.stream().filter(pmEo -> {
return StringUtils.equals(pmEo.getProjectId(), plbEo.getId());
}).collect(Collectors.toList());
double notStartAmount = 0;
double collectingAmount = 0;
double submitAmount = 0;
double syncReporAmount = 0;
String parameterCollectingPercentageStr = "0";
if(CollectionUtils.isNotEmpty(pmEos)){
List<String> pmEoIdList = pmEos.stream().map(ParamsManifestEO::getId).distinct().collect(Collectors.toList());
List<ParamsCollectManifestEO> pcmEos = pcmEoList.stream().filter(pcmEo -> {
boolean flag = false;
for (String pmEoId : pmEoIdList) {
if (StringUtils.equals(pmEoId, pcmEo.getParamsManifestId())) {
flag = true;
break;
}
}
return flag;
}).collect(Collectors.toList());
Map<String, Object> parameterCollectingMap = this.projectLibraryStatisticsService.getParameterCollectingStatisticsGroupByTerritory(pcmEos,null);
Map<String, Object> notStartMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.NOT_START.getValue());
notStartAmount = (double) notStartMap.get("amount");
Map<String, Object> collectingMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.COLLECTING.getValue());
collectingAmount = (double) collectingMap.get("amount");
Map<String, Object> submitMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.SUBMIT.getValue());
submitAmount = (double) submitMap.get("amount");
Map<String, Object> syncReporMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.SYNC_REPORT.getValue());
syncReporAmount = (double) syncReporMap.get("amount");
double parameterCollectingCount = notStartAmount + collectingAmount + submitAmount + syncReporAmount;
double parameterCollectingPercentage = (syncReporAmount / parameterCollectingCount) * 100;
parameterCollectingPercentageStr = (parameterCollectingPercentage != 0 && (syncReporAmount !=0 )) ? df.format(parameterCollectingPercentage) : "0";
}
dataRow.createCell(51).setCellValue(notStartAmount);
dataRow.createCell(52).setCellValue(collectingAmount);
dataRow.createCell(53).setCellValue(submitAmount);
dataRow.createCell(54).setCellValue(syncReporAmount);
dataRow.createCell(55).setCellValue(parameterCollectingPercentageStr + percentSign);
dataRow.createCell(56).setCellValue(certificationSubmissionStr);
dataIndex ++;
}
}
/**
* 导出跨项目进度概览
* @param workbook
* @param projectLibraryBase
* @param plbEoList
* @param pliEoList
* @param pciEoList
* @param pmEoList
* @param pcmEoList
* @param ptpEoList
*/
private void exportOverviewCrossProjectProgress(HSSFWorkbook workbook,
ProjectLibraryBase projectLibraryBase,
List<ProjectLibraryBase> plbEoList,
List<ProjectLawsInventoryEO> pliEoList,
List<ProjectCertificationInventoryEO> pciEoList,
List<ParamsManifestEO> pmEoList,
List<ParamsCollectManifestEO> pcmEoList,
List<ProjectTaskPlanning> ptpEoList) {
String cut = projectLibraryBase.getCut();
String sheetName = "项目进度概览";
String firstTitle = "项目,R&H Studio,法规符合性管理,认证活动管理";
String secondTitle = ",,法规任务确认,设计符合性,验证符合性,认证任务确认,Pre-Homo确认,认证参数收集,认证进度";
if(com.jero.modules.system.util.StringUtils.equals(cut,CutEnum.EN.getValue())){
sheetName = "Overview of project progress";
firstTitle = "Project,R&H Studio,Regulatory compliance management,Certification Activity Management";
secondTitle = ",,Confirmation of regulatory tasks," +
"Design compliance," +
"Verify compliance," +
"Certification task confirmation," +
"Pre Homo confirmation," +
"Authentication parameter collection," +
"Certification progress";
}
HSSFSheet sheet = workbook.createSheet(sheetName);
CellRangeAddress region1 = new CellRangeAddress(0, 1, 0, 0);
sheet.addMergedRegion(region1);
CellRangeAddress region2 = new CellRangeAddress(0, 1, 1, 1);
sheet.addMergedRegion(region2);
CellRangeAddress region3 = new CellRangeAddress(0, 0, 2, 4);
sheet.addMergedRegion(region3);
CellRangeAddress region4 = new CellRangeAddress(0, 0, 5, 8);
sheet.addMergedRegion(region4);
String[] firstTitleArr = firstTitle.split(",");
String[] secondTitleArr = secondTitle.split(",");
Row firstRow = sheet.createRow(0);
Row secondRow = sheet.createRow(1);
CellStyle cellStyleTitle = workbook.createCellStyle();
cellStyleTitle.setAlignment(HorizontalAlignment.CENTER);
cellStyleTitle.setVerticalAlignment(VerticalAlignment.CENTER);
for (int i = 0; i <= 8; i++){
sheet.setColumnWidth(i, 4000);
Cell firstRowCell = firstRow.createCell(i);
firstRowCell.setCellStyle(cellStyleTitle);
if(i == 0){
firstRowCell.setCellValue(firstTitleArr[0]);
}else if(i == 1){
firstRowCell.setCellValue(firstTitleArr[1]);
}else if(i == 2){
firstRowCell.setCellValue(firstTitleArr[2]);
}else if(i == 5){
firstRowCell.setCellValue(firstTitleArr[3]);
}
if(i >= 2){
Cell secondRowCell = secondRow.createCell(i);
secondRowCell.setCellStyle(cellStyleTitle);
secondRowCell.setCellValue(secondTitleArr[i]);
}
}
this.exportOverviewCrossProjectProgressSetData(plbEoList, sheet,pliEoList,pciEoList,pmEoList,pcmEoList,projectLibraryBase,ptpEoList,cellStyleTitle);
}
/**
* 导出跨项目进度概览-设置数据
* @param plbEoList
* @param sheet
* @param pliEoList
* @param pciEoList
* @param pmEoList
* @param pcmEoList
* @param projectLibraryBase
* @param ptpEoList
* @param cellStyleTitle
*/
private void exportOverviewCrossProjectProgressSetData(List<ProjectLibraryBase> plbEoList,
HSSFSheet sheet,
List<ProjectLawsInventoryEO> pliEoList,
List<ProjectCertificationInventoryEO> pciEoList,
List<ParamsManifestEO> pmEoList,
List<ParamsCollectManifestEO> pcmEoList,
ProjectLibraryBase projectLibraryBase,
List<ProjectTaskPlanning> ptpEoList,
CellStyle cellStyleTitle) {
int dataIndex = 2;
for (ProjectLibraryBase plbEo : plbEoList) {
List<ProjectTaskPlanning> ptpEoListTemp = ptpEoList.stream().filter(ptpEo -> StringUtils.equals(ptpEo.getProjectId(), plbEo.getId())).collect(Collectors.toList());
String legalTaskConfirmationStr = "";
String designDeadlineStr = "";
String verifyDeadlineStr = "";
String attestationStartTimeStr = "";
String certificationSubmissionStr = "";
if(CollectionUtils.isNotEmpty(ptpEoListTemp)){
Date legalTaskConfirmation = ptpEoListTemp.get(0).getLegalTaskConfirmation();
if (ObjectUtils.isNotEmpty(legalTaskConfirmation)) {
legalTaskConfirmationStr = DateUtils.formatDate(legalTaskConfirmation);
}
Date designDeadline = ptpEoListTemp.get(0).getDesignDeadline();
if (ObjectUtils.isNotEmpty(designDeadline)) {
designDeadlineStr = DateUtils.formatDate(designDeadline);
}
Date verifyDeadline = ptpEoListTemp.get(0).getVerifyDeadline();
if (ObjectUtils.isNotEmpty(verifyDeadline)) {
verifyDeadlineStr = DateUtils.formatDate(verifyDeadline);
}
Date attestationStartTime = ptpEoListTemp.get(0).getAttestationStartTime();
if (ObjectUtils.isNotEmpty(attestationStartTime)) {
attestationStartTimeStr = DateUtils.formatDate(attestationStartTime);
}
Date certificationSubmission = ptpEoListTemp.get(0).getCertificationSubmission();
if (ObjectUtils.isNotEmpty(certificationSubmission)) {
certificationSubmissionStr = DateUtils.formatDate(certificationSubmission);
}
}
List<ProjectLawsInventoryEO> pliEos = pliEoList.stream().filter(pliEo -> StringUtils.equals(pliEo.getProjectLibraryId(), plbEo.getId())).collect(Collectors.toList());
Map<String,Object> fgRwqrMap = this.projectLawsInventoryEOService.groupByFGRwqrStatus(pliEos);
Map<String,Object> fgRwqrProjectScheduleExportMap = (Map<String, Object>) fgRwqrMap.get("projectScheduleExportMap");
String fgrqqrPercentage = (String) fgRwqrProjectScheduleExportMap.get("percentage");
Map<String,Object> designMap = this.projectLawsInventoryEOService.groupByDesignStatus(pliEos);
Map<String,Object> designMapProjectScheduleExportMap = (Map<String, Object>) designMap.get("projectScheduleExportMap");
String designPercentage = (String) designMapProjectScheduleExportMap.get("percentage");
Map<String,Object> verifyMap = this.projectLawsInventoryEOService.groupByVerifyStatus(pliEos);
Map<String,Object> verifyMapProjectScheduleExportMap = (Map<String, Object>) verifyMap.get("projectScheduleExportMap");
String verifyPercentage = (String) verifyMapProjectScheduleExportMap.get("percentage");
List<ProjectCertificationInventoryEO> pciEos = pciEoList.stream().filter(pciEo -> StringUtils.equals(pciEo.getProjectLibraryId(), plbEo.getId())).collect(Collectors.toList());
Map<String,Object> rzRwqrMap = this.projectCertificationInventoryEOService.groupByFGRwqrStatus(pciEos);
Map<String,Object> rzRwqrProjectScheduleExportMap = (Map<String, Object>) rzRwqrMap.get("projectScheduleExportMap");
String rzRqqrPercentage = (String) rzRwqrProjectScheduleExportMap.get("percentage");
Map<String,Object> preHomoMap = this.projectCertificationInventoryEOService.groupByPreHomoStatus(pciEos);
Map<String,Object> preHomoProjectScheduleExportMap = (Map<String, Object>) preHomoMap.get("projectScheduleExportMap");
String preHomoPercentage = (String) preHomoProjectScheduleExportMap.get("percentage");
List<ParamsManifestEO> pmEos = pmEoList.stream().filter(pmEo -> {
return StringUtils.equals(pmEo.getProjectId(), plbEo.getId());
}).collect(Collectors.toList());
String parameterCollectingPercentageStr = "0" + percentSign;
if(CollectionUtils.isNotEmpty(pmEos)){
List<String> pmEoIdList = pmEos.stream().map(ParamsManifestEO::getId).distinct().collect(Collectors.toList());
List<ParamsCollectManifestEO> pcmEos = pcmEoList.stream().filter(pcmEo -> {
boolean flag = false;
for (String pmEoId : pmEoIdList) {
if (StringUtils.equals(pmEoId, pcmEo.getParamsManifestId())) {
flag = true;
break;
}
}
return flag;
}).collect(Collectors.toList());
Map<String, Object> parameterCollectingMap = this.projectLibraryStatisticsService.getParameterCollectingStatisticsGroupByTerritory(pcmEos,null);
Map<String, Object> notStartMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.NOT_START.getValue());
double notStartAmount = (double) notStartMap.get("amount");
Map<String, Object> collectingMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.COLLECTING.getValue());
double collectingAmount = (double) collectingMap.get("amount");
Map<String, Object> submitMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.SUBMIT.getValue());
double submitAmount = (double) submitMap.get("amount");
Map<String, Object> syncReporMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.SYNC_REPORT.getValue());
double syncReporAmount = (double) syncReporMap.get("amount");
double parameterCollectingCount = notStartAmount + collectingAmount + submitAmount + syncReporAmount;
double parameterCollectingPercentage = (syncReporAmount / parameterCollectingCount) * 100;
parameterCollectingPercentageStr = (parameterCollectingPercentage != 0 && (syncReporAmount !=0 )) ? df.format(parameterCollectingPercentage) + percentSign : "0" + percentSign;
}
Map<String,Object> certificationProgressMap = this.projectCertificationInventoryEOService.groupByCertificationProgress(pciEos);
Map<String,Object> certificationProgressMapProjectScheduleExportMap = (Map<String, Object>) certificationProgressMap.get("projectScheduleExportMap");
String certificationProgressPercentage = (String) certificationProgressMapProjectScheduleExportMap.get("percentage");
CellRangeAddress regionCell1 = new CellRangeAddress(dataIndex, dataIndex + 1, 0, 0);
sheet.addMergedRegion(regionCell1);
CellRangeAddress regionCell2 = new CellRangeAddress(dataIndex, dataIndex + 1, 1, 1);
sheet.addMergedRegion(regionCell2);
Row dataRow = sheet.createRow(dataIndex);
Row dataRow2 = sheet.createRow(dataIndex + 1);
for (int i = 0; i < 9; i++) {
sheet.setColumnWidth(i, 4000);
Cell dataRowCell = dataRow.createCell(i);
dataRowCell.setCellStyle(cellStyleTitle);
Cell dataRow2Cell = dataRow2.createCell(i);
dataRow2Cell.setCellStyle(cellStyleTitle);
if(i == 0){
dataRowCell.setCellValue(plbEo.getShowName());
}else if(i==1){
dataRowCell.setCellValue(plbEo.getStudioEngineerName());
}else if(i==2){
dataRowCell.setCellValue(legalTaskConfirmationStr);
dataRow2Cell.setCellValue(fgrqqrPercentage);
}else if(i==3){
dataRowCell.setCellValue(designDeadlineStr);
dataRow2Cell.setCellValue(designPercentage);
}else if(i==4){
dataRowCell.setCellValue(verifyDeadlineStr);
dataRow2Cell.setCellValue(verifyPercentage);
}else if(i==5){
dataRowCell.setCellValue(legalTaskConfirmationStr);
dataRow2Cell.setCellValue(rzRqqrPercentage);
}else if(i==6){
dataRowCell.setCellValue(attestationStartTimeStr);
dataRow2Cell.setCellValue(preHomoPercentage);
}else if(i==7){
dataRowCell.setCellValue(attestationStartTimeStr);
dataRow2Cell.setCellValue(parameterCollectingPercentageStr);
}else if(i==8){
dataRowCell.setCellValue(certificationSubmissionStr);
dataRow2Cell.setCellValue(certificationProgressPercentage);
}
}
dataIndex += 2;
}
}
} }
@@ -135,6 +135,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
listConfirmationVO.setStatus(PlanStatusEnum.ON_GOING.getValue()); listConfirmationVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
listConfirmationVO.setProjectId(projectTaskPlanning.getProjectId()); listConfirmationVO.setProjectId(projectTaskPlanning.getProjectId());
listConfirmationVO.setG(false);
timeNodeVOS.add(listConfirmationVO); timeNodeVOS.add(listConfirmationVO);
} }
@@ -157,6 +158,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
legalTaskConfirmationVO.setStatus(PlanStatusEnum.ON_GOING.getValue()); legalTaskConfirmationVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
legalTaskConfirmationVO.setProjectId(projectTaskPlanning.getProjectId()); legalTaskConfirmationVO.setProjectId(projectTaskPlanning.getProjectId());
legalTaskConfirmationVO.setG(false);
timeNodeVOS.add(legalTaskConfirmationVO); timeNodeVOS.add(legalTaskConfirmationVO);
} }
@@ -179,6 +181,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
designDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue()); designDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
designDeadlineVO.setProjectId(projectTaskPlanning.getProjectId()); designDeadlineVO.setProjectId(projectTaskPlanning.getProjectId());
designDeadlineVO.setG(false);
timeNodeVOS.add(designDeadlineVO); timeNodeVOS.add(designDeadlineVO);
} }
@@ -201,6 +204,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
prehomoDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue()); prehomoDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
prehomoDeadlineVO.setProjectId(projectTaskPlanning.getProjectId()); prehomoDeadlineVO.setProjectId(projectTaskPlanning.getProjectId());
prehomoDeadlineVO.setG(false);
timeNodeVOS.add(prehomoDeadlineVO); timeNodeVOS.add(prehomoDeadlineVO);
} }
@@ -223,6 +227,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
attestationStartTimeVO.setStatus(PlanStatusEnum.ON_GOING.getValue()); attestationStartTimeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
attestationStartTimeVO.setProjectId(projectTaskPlanning.getProjectId()); attestationStartTimeVO.setProjectId(projectTaskPlanning.getProjectId());
attestationStartTimeVO.setG(false);
timeNodeVOS.add(attestationStartTimeVO); timeNodeVOS.add(attestationStartTimeVO);
} }
@@ -245,6 +250,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
attestationEndTimeVO.setStatus(PlanStatusEnum.ON_GOING.getValue()); attestationEndTimeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
attestationEndTimeVO.setProjectId(projectTaskPlanning.getProjectId()); attestationEndTimeVO.setProjectId(projectTaskPlanning.getProjectId());
attestationEndTimeVO.setG(false);
timeNodeVOS.add(attestationEndTimeVO); timeNodeVOS.add(attestationEndTimeVO);
} }
@@ -267,6 +273,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
verifyDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue()); verifyDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
verifyDeadlineVO.setProjectId(projectTaskPlanning.getProjectId()); verifyDeadlineVO.setProjectId(projectTaskPlanning.getProjectId());
verifyDeadlineVO.setG(false);
timeNodeVOS.add(verifyDeadlineVO); timeNodeVOS.add(verifyDeadlineVO);
} }
//认证提交 //认证提交
@@ -288,9 +295,164 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
certificationSubmissionVo.setStatus(PlanStatusEnum.ON_GOING.getValue()); certificationSubmissionVo.setStatus(PlanStatusEnum.ON_GOING.getValue());
} }
certificationSubmissionVo.setProjectId(projectTaskPlanning.getProjectId()); certificationSubmissionVo.setProjectId(projectTaskPlanning.getProjectId());
certificationSubmissionVo.setG(false);
timeNodeVOS.add(certificationSubmissionVo); timeNodeVOS.add(certificationSubmissionVo);
} }
// G0 - G7
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getZero())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_ZERO.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_ZERO.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getZero());
if(projectTaskPlanning.getZero().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getZero().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getOne())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_ONE.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_ONE.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getOne());
if(projectTaskPlanning.getOne().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getOne().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getTwo())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_TWO.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_TWO.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getTwo());
if(projectTaskPlanning.getTwo().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getTwo().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getThree())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_THREE.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_THREE.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getThree());
if(projectTaskPlanning.getThree().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getThree().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getFour())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_FOUR.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_FOUR.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getFour());
if(projectTaskPlanning.getFour().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getFour().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getFive())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_FIVE.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_FIVE.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getFive());
if(projectTaskPlanning.getFive().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getFive().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getSix())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_SIX.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_SIX.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getSix());
if(projectTaskPlanning.getSix().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getSix().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getSeven())){
TimeNodeVO timeNodeVO = new TimeNodeVO();
if(CutEnum.CN.getValue().equals(cut)){
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_SEVEN.getName());
}else{
timeNodeVO.setName(ProjectTaskPlanningNameEnum.G_SEVEN.getValue());
}
timeNodeVO.setTime(projectTaskPlanning.getSeven());
if(projectTaskPlanning.getSeven().after(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.LESS_THAN_TIME.getValue());
}else if(projectTaskPlanning.getSeven().before(trueNow)){
timeNodeVO.setStatus(PlanStatusEnum.OUT_OF_DATE.getValue());
}else{
timeNodeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
timeNodeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVO.setG(true);
timeNodeVOS.add(timeNodeVO);
}
// 排序 // 排序
// Collections.sort(timeNodeVOS, listConfirmationVO); // Collections.sort(timeNodeVOS, listConfirmationVO);
timeNodeVOS = timeNodeVOS.stream() timeNodeVOS = timeNodeVOS.stream()
@@ -11,6 +11,7 @@ public class TimeNodeVO implements Comparator<TimeNodeVO> {
private Date time; private Date time;
private String status; private String status;
private String projectId; private String projectId;
private boolean isG; // 是否是G0 - G8
@Override @Override
public int compare(TimeNodeVO o1, TimeNodeVO o2) { public int compare(TimeNodeVO o1, TimeNodeVO o2) {
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

+25
View File
@@ -1802,4 +1802,29 @@ module.exports = {
designaconformancedeliverabletype:'Design a conformance deliverable type', designaconformancedeliverabletype:'Design a conformance deliverable type',
reasonForReturnOfCompliance:'Reason for compliance return', reasonForReturnOfCompliance:'Reason for compliance return',
have:'Yes', have:'Yes',
supplementarySubmission:'Supplementary Submission',
confirmSupplementarySubmission:'Confirm Supplementary Submission ?',
onlyProcessStatusOfApprovedCanBeSelected:'Only data with a process status of approved can be selected',
andTheOperatorCurrentData:' And the operator is the responsible person for the current data',
upgradeInstructions:'Upgrade Instructions',
upgradeOrNot:'Upgrade or not',
operationRecords:'Operation Records',
versionUpdatedRecord:'Version Updated Record',
regulatoryComplianceManagement:'Regulatory Compliance Management',
certificationActivityManagement:'Certification Activity Management',
parameterCollectionProgressManagement:'Parameter Collection Progress Management',
certificationTaskConfirmation:'Certification Task Confirmation',
selectTime:'Select Time',
designCompliance:'Design Compliance',
verifyCompliance:'Verify Compliance',
stateExport:'State Export',
completeVehicle:'Complete Vehicle',
components:'Components',
componentReportNotSubmitted:'Component report not submitted',
componentReportSubmitted:'Component report submitted',
componentReportHasBeenStored:'Component report has been stored',
parameterCollectionProgress:'Parameter Collection Progress',
proportion:'Proportion',
projectProgressStatistics:'Project Progress Statistics',
GRPSystemProjectProgressStatistics:'GRP system project progress statistics',
} }
+25
View File
@@ -1903,4 +1903,29 @@ module.exports = {
verifytheconformancedeliverabletype:'验证符合性交付物类型', verifytheconformancedeliverabletype:'验证符合性交付物类型',
designaconformancedeliverabletype:'设计符合性交付物类型', designaconformancedeliverabletype:'设计符合性交付物类型',
reasonForReturnOfCompliance: '符合性退回原因', reasonForReturnOfCompliance: '符合性退回原因',
supplementarySubmission:'补充提交',
confirmSupplementarySubmission:'确认补充提交?',
onlyProcessStatusOfApprovedCanBeSelected:'只能选择流程状态为审查通过的数据',
andTheOperatorCurrentData:',并且登录人为当前数据的责任人',
upgradeInstructions:'升版说明',
upgradeOrNot:'是否升版',
operationRecords:'操作记录',
versionUpdatedRecord:'版本更新记录',
regulatoryComplianceManagement:'法规符合性管理',
certificationActivityManagement:'认证活动管理',
parameterCollectionProgressManagement:'参数收集进度管理',
certificationTaskConfirmation:'认证任务确认',
selectTime:'选择时间',
designCompliance:'设计符合性',
verifyCompliance:'验证符合性',
stateExport:'状态导出',
completeVehicle:'整车',
components:'零部件',
componentReportNotSubmitted:'部件报告未提交',
componentReportSubmitted:'部件报告已提交',
componentReportHasBeenStored:'部件报告已入库',
parameterCollectionProgress:'参数收集进度',
proportion:'占比',
projectProgressStatistics:'项目进度统计',
GRPSystemProjectProgressStatistics:'GRP系统项目进度统计',
} }
+90 -58
View File
@@ -12,15 +12,21 @@
{{$t('cancel')}} {{$t('cancel')}}
</a-button> </a-button>
</template> </template>
<a-table <a-tabs v-model="active" @change="activeChange" v-if="isVersion">
class="table" <a-tab-pane :key="$t('operationRecords')" :tab="$t('operationRecords')">
:components="drag(columns,'columns')" </a-tab-pane>
:columns="columns" <a-tab-pane :key="$t('versionUpdatedRecord')" :tab="$t('versionUpdatedRecord')"></a-tab-pane>
:pagination="false" </a-tabs>
:scroll="{x:'100%',y: 420}" <div v-if="active == this.$t('operationRecords')">
:data-source="dataSource" <a-table
:loading="loading" class="table"
> :components="drag(columns,'columns')"
:columns="columns"
:pagination="false"
:scroll="{x:'100%',y: 420}"
:data-source="dataSource"
:loading="loading"
>
<span slot="content" slot-scope="text,record"> <span slot="content" slot-scope="text,record">
<a-tooltip placement="topLeft" overlayClassName="tooltipColor"> <a-tooltip placement="topLeft" overlayClassName="tooltipColor">
<template slot="title"> <template slot="title">
@@ -29,64 +35,88 @@
<span v-html="text"></span> <span v-html="text"></span>
</a-tooltip> </a-tooltip>
</span> </span>
</a-table> </a-table>
<div class="page" v-if="dataSource.length > 0"> <div class="page" v-if="dataSource.length > 0">
<a-pagination <a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')" :show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="pageSize " :page-size.sync="pageSize "
:total="total" :total="total"
:current="pageNo" :current="pageNo"
@change="onChange" @change="onChange"
@showSizeChange="SizeChange" @showSizeChange="SizeChange"
/> />
</div>
</div> </div>
<versionUpdatedRecordList :url="url"
ref="versionUpdatedRecordRef"
v-else-if="active == this.$t('versionUpdatedRecord')"/>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { getAction, postAction, } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import versionUpdatedRecordList from './versionUpdatedRecordList'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header' import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default { export default {
name: 'index', name: 'index',
props:['url'], props: ['url','isVersion'],
mixins:[ResizeHeader, ResizeColumnProvide], mixins: [ResizeHeader, ResizeColumnProvide],
data(){ components: {
return{ versionUpdatedRecordList
visible:false, },
confirmLoading:false, data() {
dataSource:[], return {
loading:false, visible: false,
pageNo: 1, confirmLoading: false,
pageSize: 10, dataSource: [],
queryId:{}, loading: false,
total: 0, pageNo: 1,
columns: [ pageSize: 10,
{ queryId: {},
title: this.$t('OperationDetails'), total: 0,
dataIndex: 'logContent', versionData:{},
align: 'left', active: this.$t('operationRecords'),
ellipsis: true, columns: [
scopedSlots: { customRender: 'content' }, {
width: 664 title: this.$t('OperationDetails'),
}, dataIndex: 'logContent',
{ align: 'left',
title: this.$t('OperationTime'), ellipsis: true,
dataIndex: 'createTime', scopedSlots: { customRender: 'content' },
align: 'left', width: 664
ellipsis: true, },
width: 180 {
}, title: this.$t('OperationTime'),
] dataIndex: 'createTime',
} align: 'left',
ellipsis: true,
width: 180
}
]
}
}, },
mounted() { mounted() {
}, },
methods:{ methods: {
getList(data){ activeChange(value) {
if (value == this.$t('operationRecords')) {
this.pageNo = 1
this.bussLogList()
} else if (value == this.$t('versionUpdatedRecord')) {
this.$nextTick(()=>{
this.$refs.versionUpdatedRecordRef.getList(this.versionData)
})
}
},
getList(data,versionData) {
this.visible = true this.visible = true
if (versionData){
this.versionData = versionData
}
this.active = this.$t('operationRecords')
this.pageNo = 1 this.pageNo = 1
this.queryId = data this.queryId = data
this.bussLogList() this.bussLogList()
@@ -100,7 +130,7 @@
this.pageSize = pageSize this.pageSize = pageSize
this.bussLogList() this.bussLogList()
}, },
bussLogList(){ bussLogList() {
let query = { let query = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
@@ -116,7 +146,7 @@
this.loading = false this.loading = false
} }
}) })
}, }
} }
} }
</script> </script>
@@ -126,11 +156,13 @@
text-align: right; text-align: right;
margin-top: 20px; margin-top: 20px;
} }
/deep/.tooltipColor .ant-tooltip-inner {
/deep/ .tooltipColor .ant-tooltip-inner {
color: #333; color: #333;
background-color: #fff !important; background-color: #fff !important;
} }
/deep/.tooltipColor .ant-tooltip-arrow::before {
/deep/ .tooltipColor .ant-tooltip-arrow::before {
background-color: #fff; background-color: #fff;
} }
</style> </style>
@@ -0,0 +1,138 @@
<template>
<div>
<a-table
class="table"
:columns="columns"
:components="drag(columns,'columns')"
:pagination="false"
:scroll="{x:'100%',y: 420}"
:data-source="dataSource"
:loading="loading"
>
<span slot="content" slot-scope="text,record">
<a-tooltip placement="topLeft" overlayClassName="tooltipColor">
<template slot="title">
<span v-html="text"></span>
</template>
<span v-html="text"></span>
</a-tooltip>
</span>
</a-table>
<div class="page" v-if="dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize "
:total="total"
:current="pageNo"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'versionUpdatedRecordList',
mixins: [ResizeHeader, ResizeColumnProvide],
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
dataSource: [],
loading: false,
pageNo: 1,
pageSize: 10,
versionData: {},
total: 0,
active: this.$t('operationRecords'),
columns: [
{
title: this.$t('VersionNumber'),
dataIndex: 'versionNum',
align: 'left',
ellipsis: true,
width: 100
},
{
title: this.$t('upgradeInstructions'),
dataIndex: 'upgradeExplanation',
align: 'left',
ellipsis: true,
width: 360
},
{
title: this.$t('Operator'),
dataIndex: 'createBy',
align: 'left',
ellipsis: true,
width: 100
},
{
title: this.$t('OperationTime'),
dataIndex: 'createTime',
align: 'left',
ellipsis: true,
width: 150
}
]
}
},
mounted() {
},
methods: {
getList(data) {
this.pageNo = 1
this.versionData = data
this.bussLogList()
},
onChange(page, pageSize) {
this.pageNo = page
this.bussLogList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.bussLogList()
},
bussLogList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.versionData
}
this.loading = true
getAction(this.url.versionList, query).then((res) => {
if (res.success) {
this.dataSource = res.result.records
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
/deep/ .tooltipColor .ant-tooltip-inner {
color: #333;
background-color: #fff !important;
}
/deep/ .tooltipColor .ant-tooltip-arrow::before {
background-color: #fff;
}
</style>
@@ -323,7 +323,7 @@
</div> </div>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList" @visible='sVisible'/> <addModel :url="url" ref="addModelRef" @addModelList="addModelList" @visible='sVisible'/>
<editModel :url="url" ref="editModelRef" @editModelList="editModelList" @visible='sVisible'/> <editModel :url="url" ref="editModelRef" @editModelList="editModelList" @visible='sVisible'/>
<UpdateLog :url="url" ref="UpdateLogRef" @visible='sVisible'/> <UpdateLog :url="url" :isVersion="true" ref="UpdateLogRef" @visible='sVisible'/>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef" @visible='sVisible'/> <transferList :url="url" @transferListForm="transferListForm" ref="transferListRef" @visible='sVisible'/>
<transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/> <transferListvirtal :url="url" @transferListFormHomo="transferListFormHomo" ref="transferListvirtalRef"/>
<batSetting :url="url" ref="batSettingRef" @batSettingList="batSettingList"/> <batSetting :url="url" ref="batSettingRef" @batSettingList="batSettingList"/>
@@ -434,7 +434,8 @@
exportData: '/dummy/dummyInventoryInfoEO/exportData', exportData: '/dummy/dummyInventoryInfoEO/exportData',
exportTemplate: '/dummy/dummyInventoryInfoEO/exportTemplate', exportTemplate: '/dummy/dummyInventoryInfoEO/exportTemplate',
getSysCategoryTree: '/sys/category/getSysCategoryTree', getSysCategoryTree: '/sys/category/getSysCategoryTree',
logList: '/dummy/dummyLogEO/page' logList: '/dummy/dummyLogEO/page',
versionList:'/log/marketListVersionUpdateLogEO/page',
}, },
loading: false, loading: false,
dataSource: [], dataSource: [],
@@ -1062,7 +1063,8 @@
this.getList() this.getList()
}, },
UpdateLogClick() { UpdateLogClick() {
this.$refs.UpdateLogRef.getList({ dummyInventoryBaseId: this.$route.query.id }) this.$refs.UpdateLogRef.getList({ dummyInventoryBaseId: this.$route.query.id, },
{listId:this.$route.query.id,listType:'Market Regulation List'})
}, },
searchQuery() { searchQuery() {
this.getList() this.getList()
@@ -128,6 +128,20 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24">
<div class="box-title-text-add">
<div class="title-text-add">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('VersionNumber')">{{$t('VersionNumber')}}</span>
</div>
<a-form-model-item class="itemModel" prop="versionNum">
<a-input class="box-input-add"
v-model.trim="formInline.versionNum"
:placeholder="$t('PleaseEnter')+$t('VersionNumber')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text-add"> <div class="box-title-text-add">
<div class="title-text-add"> <div class="title-text-add">
@@ -150,6 +164,7 @@
</div> </div>
</a-drawer> </a-drawer>
<setCreator ref="setCreatorRef" @clearSelected="clearSelected"/> <setCreator ref="setCreatorRef" @clearSelected="clearSelected"/>
<releaseForm ref="releaseFormRef" @releaseFormData="releaseFormData"/>
</a-card> </a-card>
</template> </template>
@@ -160,6 +175,7 @@
import VueDraggableResizable from 'vue-draggable-resizable' import VueDraggableResizable from 'vue-draggable-resizable'
import tableDragResize from '@/mixins/tableDragResize' import tableDragResize from '@/mixins/tableDragResize'
import setCreator from '@/components/setCreator/index' import setCreator from '@/components/setCreator/index'
import releaseForm from '../../virtualAuthenticationList/components/releaseForm'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header' import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
@@ -167,7 +183,8 @@
name: 'index', name: 'index',
components: { components: {
VueDraggableResizable, VueDraggableResizable,
setCreator setCreator,
releaseForm
}, },
mixins: [tableDragResize, ResizeHeader, ResizeColumnProvide], mixins: [tableDragResize, ResizeHeader, ResizeColumnProvide],
data() { data() {
@@ -189,6 +206,18 @@
trigger: 'blur' trigger: 'blur'
} }
], ],
versionNum:[
{
required: true,
message: this.$t('VersionNumber') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('VersionNumber') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
useExplain: [ useExplain: [
{ {
required: true, required: true,
@@ -225,17 +254,24 @@
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'VirtualListName' } scopedSlots: { customRender: 'VirtualListName' }
}, },
{
title: this.$t('VersionNumber'),
align: 'left',
width: '10%',
ellipsis: true,
dataIndex: 'versionNum'
},
{ {
title: this.$t('listStatus'), title: this.$t('listStatus'),
align: 'left', align: 'left',
width: '20%', width: '15%',
ellipsis: true, ellipsis: true,
dataIndex: 'state_dictText' dataIndex: 'state_dictText'
}, },
{ {
title: this.$t('creater'), title: this.$t('creater'),
align: 'left', align: 'left',
width: '20%', width: '15%',
ellipsis: true, ellipsis: true,
dataIndex: 'createBy' dataIndex: 'createBy'
}, },
@@ -362,17 +398,40 @@
} }
item.id = val.id item.id = val.id
let _this = this let _this = this
this.$confirm({ if (item.state == 1){
content: content, this.$refs.releaseFormRef.getData(val.id)
onOk() { }else{
postAction(_this.url.urlWithdraw, item).then((res) => { this.$confirm({
if (res.success) { content: content,
_this.$message.success(_this.$t('OperationSuccessful')) onOk() {
_this.getList() postAction(_this.url.urlWithdraw, item).then((res) => {
} else { if (res.success) {
_this.$message.warning(res.message) _this.$message.success(_this.$t('OperationSuccessful'))
} _this.getList()
}) } else {
_this.$message.warning(res.message)
}
})
}
})
}
},
releaseFormData(id, val) {
let _this = this
let item = {
state: 1,
id: id,
...val
}
postAction(_this.url.urlWithdraw, item).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.$refs.releaseFormRef.confirmLoading = false
_this.$refs.releaseFormRef.visible = false
} else {
_this.$message.warning(res.message)
_this.$refs.releaseFormRef.confirmLoading = false
} }
}) })
}, },
@@ -103,13 +103,13 @@
<a-icon type="profile"/> <a-icon type="profile"/>
{{$t('TaskParameterCollection')}} {{$t('TaskParameterCollection')}}
</div> </div>
<div class="Virtual-detail-left-text" <!-- <div class="Virtual-detail-left-text"-->
:title="$t('projectStatus')" <!-- :title="$t('projectStatus')"-->
v-has="'projectLawsInventory:ProjectStatus'" <!-- v-has="'projectLawsInventory:ProjectStatus'"-->
@click="textClick(5,$t('projectStatus'))"> <!-- @click="textClick(5,$t('projectStatus'))">-->
<a-icon type="cluster"/> <!-- <a-icon type="cluster"/>-->
{{$t('projectStatus')}} <!-- {{$t('projectStatus')}}-->
</div> <!-- </div>-->
<a-icon @click="textIconClick" type="menu-fold" class="text-icon"/> <a-icon @click="textIconClick" type="menu-fold" class="text-icon"/>
</div> </div>
<div v-if="!isDisplay" class="Virtual-detail-left-One"> <div v-if="!isDisplay" class="Virtual-detail-left-One">
@@ -143,30 +143,31 @@
@click="textClick(4,$t('TaskParameterCollection'))"> @click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="profile"/> <a-icon type="profile"/>
</div> </div>
<div class="Virtual-detail-left-text" <!-- <div class="Virtual-detail-left-text"-->
:title="$t('projectStatus')" <!-- :title="$t('projectStatus')"-->
v-has="'projectLawsInventory:ProjectStatus'" <!-- v-has="'projectLawsInventory:ProjectStatus'"-->
@click="textClick(5,$t('projectStatus'))"> <!-- @click="textClick(5,$t('projectStatus'))">-->
<a-icon type="cluster"/> <!-- <a-icon type="cluster"/>-->
</div> <!-- </div>-->
<a-icon @click="textIconClick" type="menu-unfold" class="text-icon-one"/> <a-icon @click="textIconClick" type="menu-unfold" class="text-icon-one"/>
</div> </div>
<div class="Virtual-detail-right" <div class="Virtual-detail-right"
:style="{'width':isDisplay?'calc(100% - 240px)':'calc(100% - 66px)'}"> :style="{'width':isDisplay?'calc(100% - 240px)':'calc(100% - 66px)'}">
<ProjectDetailsName v-if="textTitle === $t('projectDetails')"/> <ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/>
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')" <listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"
ref="listOfRegulationsRef" ref="listOfRegulationsRef"
@getRoleSwitch="getRoleSwitch" @getRoleSwitch="getRoleSwitch"
@getRoleSwitchingList="getRoleSwitchingList" @getRoleSwitchingList="getRoleSwitchingList"
:areaOfResponsibilityList="areaOfResponsibilityList"/> :areaOfResponsibilityList="areaOfResponsibilityList"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility" <!-- <TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"-->
v-else-if="textTitle === $t('taskList')"/> <!-- v-else-if="textTitle === $t('taskList')"/>-->
<TaskParameterCollection v-else-if="textTitle === $t('TaskParameterCollection')"/> <TaskParameterCollection v-else-if="textTitle === $t('TaskParameterCollection')"/>
<nonConformance v-else-if="textTitle === $t('nonConformance')"/> <nonConformance v-else-if="textTitle === $t('nonConformance')"/>
<projectStatus @TaskListChange="TaskListChange" <!-- <projectStatus @TaskListChange="TaskListChange"-->
v-else-if="textTitle === $t('projectStatus')"/> <!-- v-else-if="textTitle === $t('projectStatus')"/>-->
<certificationList ref="certificationListRef" <certificationList ref="certificationListRef"
:isDisplayNum="isDisplayNum" :isDisplayNum="isDisplayNum"
:areaOfResponsibility="areaOfResponsibility"
@getRoleSwitch="getRoleSwitch" @getRoleSwitch="getRoleSwitch"
@getRoleSwitchingList="getRoleSwitchingList" @getRoleSwitchingList="getRoleSwitchingList"
v-else-if="textTitle === $t('certificationList')"/> v-else-if="textTitle === $t('certificationList')"/>
@@ -417,7 +418,7 @@
this.textTitle = this.$t('listOfRegulations') this.textTitle = this.$t('listOfRegulations')
} else { } else {
this.areaOfResponsibility = item this.areaOfResponsibility = item
this.textTitle = this.$t('taskList') this.textTitle = this.$t('certificationList')
} }
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color') let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) { if (textColor && textColor.length > 0) {
@@ -28,23 +28,8 @@
<span class="text-field-right" :title="queryForm.projectStatus_dictText" <span class="text-field-right" :title="queryForm.projectStatus_dictText"
>{{queryForm.projectStatus_dictText}}</span> >{{queryForm.projectStatus_dictText}}</span>
</div> </div>
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" :title="$t('targetMarket')">{{$t('targetMarket')}}</span>-->
<!-- <span class="text-field-right" :title="queryForm.targetMarket_dictText"-->
<!-- >{{queryForm.targetMarket_dictText}}</span>-->
<!-- </div>-->
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" :title="$t('projectVersion')">{{$t('projectVersion')}}</span>-->
<!-- <span class="text-field-right" :title="queryForm.projectVersion"-->
<!-- >{{queryForm.projectVersion}}</span>-->
<!-- </div>-->
</div> </div>
<div class="content-text"> <div class="content-text">
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>-->
<!-- <span class="text-field-right" :title="queryForm.projectStatus_dictText"-->
<!-- >{{queryForm.projectStatus_dictText}}</span>-->
<!-- </div>-->
<div class="text-field"> <div class="text-field">
<span class="text-field-left" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span> <span class="text-field-left" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>
<span class="text-field-right" :title="queryForm.studioEngineerName" <span class="text-field-right" :title="queryForm.studioEngineerName"
@@ -57,14 +42,19 @@
</div> </div>
<div class="text-field"> <div class="text-field">
<span class="text-field-left" style="float: left;margin-top: 3px" :title="$t('ListOfRelevantPersonnel')">{{$t('ListOfRelevantPersonnel')}}</span> <span class="text-field-left" style="float: left;margin-top: 3px" :title="$t('ListOfRelevantPersonnel')">{{$t('ListOfRelevantPersonnel')}}</span>
<span class="text-field-right" <span class="text-field-right text-field-right-color"
> >
<a-button type="primary" v-has="'projectRelatedPersonnel:page'" <span v-has="'projectRelatedPersonnel:page'"
:title="$t('ListOfRelevantPersonnel')" @click="ListOfRelevantPersonnelClick">
class="button-text" <a-icon type="eye"/>
@click="ListOfRelevantPersonnelClick"> {{$t('ListOfRelevantPersonnel')}}
{{$t('ListOfRelevantPersonnel')}} </span>
</a-button> <!-- <a-button type="primary" v-has="'projectRelatedPersonnel:page'"-->
<!-- :title="$t('ListOfRelevantPersonnel')"-->
<!-- class="button-text"-->
<!-- >-->
<!-- {{$t('ListOfRelevantPersonnel')}}-->
<!-- </a-button>-->
</span> </span>
</div> </div>
</div> </div>
@@ -84,18 +74,6 @@
<span class="text-field-right" :title="queryForm.softwareVersion" <span class="text-field-right" :title="queryForm.softwareVersion"
>{{queryForm.softwareVersion}}</span> >{{queryForm.softwareVersion}}</span>
</div> </div>
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" :title="$t('IPDInformation')">{{$t('IPDInformation')}}</span>-->
<!-- <span class="text-field-right text-field-right-color"-->
<!-- :title="queryForm.ipdInfo"-->
<!-- @click="urlClick(queryForm.ipdInfo)"-->
<!-- >{{queryForm.ipdInfo}}</span>-->
<!-- </div>-->
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" :title="$t('brand')">{{$t('brand')}}</span>-->
<!-- <span class="text-field-right" :title="queryForm.brandText"-->
<!-- >{{queryForm.brandText}}</span>-->
<!-- </div>-->
</div> </div>
<div class="content-text"> <div class="content-text">
<div class="text-field"> <div class="text-field">
@@ -112,13 +90,13 @@
@click="urlClick(queryForm.attestationPlan)" @click="urlClick(queryForm.attestationPlan)"
>{{queryForm.attestationPlan}}</span> >{{queryForm.attestationPlan}}</span>
</div> </div>
<div class="text-field"> <div class="text-field">
<span class="text-field-left" :title="$t('configurationInformation')">{{$t('configurationInformation')}}</span> <span class="text-field-left" :title="$t('configurationInformation')">{{$t('configurationInformation')}}</span>
<span class="text-field-right text-field-right-color" <span class="text-field-right text-field-right-color"
:title="queryForm.ipdInfo" :title="queryForm.ipdInfo"
@click="urlClick(queryForm.ipdInfo)" @click="urlClick(queryForm.ipdInfo)"
>{{queryForm.ipdInfo}}</span> >{{queryForm.ipdInfo}}</span>
</div> </div>
</div> </div>
<div class="content-text"> <div class="content-text">
<div class="text-field-content"> <div class="text-field-content">
@@ -127,34 +105,7 @@
>{{queryForm.explanation}}</span> >{{queryForm.explanation}}</span>
</div> </div>
</div> </div>
<!-- <div class="content-text">--> <div class="box-text" style="margin-top: 10px;margin-bottom: 10px">
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" :title="$t('StudioEngineer')">{{$t('StudioEngineer')}}</span>-->
<!-- <span class="text-field-right" :title="queryForm.studioEngineerName"-->
<!-- >{{queryForm.studioEngineerName}}</span>-->
<!-- </div>-->
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>-->
<!-- <span class="text-field-right" :title="queryForm.certificationEngineerName"-->
<!-- >{{queryForm.certificationEngineerName}}</span>-->
<!-- </div>-->
<!-- <div class="text-field">-->
<!-- <span class="text-field-left" style="float: left;margin-top: 3px" :title="$t('ListOfRelevantPersonnel')">{{$t('ListOfRelevantPersonnel')}}</span>-->
<!-- <span class="text-field-right"-->
<!-- >-->
<!-- <a-button type="primary" v-has="'projectRelatedPersonnel:page'"-->
<!-- :title="$t('ListOfRelevantPersonnel')"-->
<!-- class="button-text"-->
<!-- @click="ListOfRelevantPersonnelClick">-->
<!-- {{$t('ListOfRelevantPersonnel')}}-->
<!-- </a-button>-->
<!-- </span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="content-text">-->
<!-- </div>-->
<div class="box-text">
<div class="header-text"> <div class="header-text">
{{$t('complianceCertificationProgram')}} {{$t('complianceCertificationProgram')}}
</div> </div>
@@ -167,35 +118,40 @@
</div> </div>
</div> </div>
<div class="process-content"> <div class="process-content">
<complianceCertificationForm ref="complianceCertificationRef"/>
<div style="display: flex;justify-content: space-between"> <!-- <div style="display: flex;justify-content: space-between">-->
<div class="process-content-content" v-for="(item,index) in regulatoryCertificationTaskPlanList" :key="index"> <!-- <div class="process-content-content" v-for="(item,index) in regulatoryCertificationTaskPlanList" :key="index">-->
<img v-if="item.status == 1" src="../../../assets/wancheng.png" class="process-content-left" alt=""> <!-- <img v-if="item.status == 1" src="../../../assets/wancheng.png" class="process-content-left" alt="">-->
<img v-else-if="item.status == 2" src="../../../assets/shijian.png" class="process-content-left" alt=""> <!-- <img v-else-if="item.status == 2" src="../../../assets/shijian.png" class="process-content-left" alt="">-->
<img v-else-if="item.status == 3" src="../../../assets/xian.png" class="process-content-left" alt=""> <!-- <img v-else-if="item.status == 3" src="../../../assets/xian.png" class="process-content-left" alt="">-->
<div class="process-content-right"> <!-- <div class="process-content-right">-->
<div class="process-content-right-top" :title="item.name">{{item.name}}</div> <!-- <div class="process-content-right-top" :title="item.name">{{item.name}}</div>-->
<div class="process-content-right-button">{{item.time?item.time.slice(0,11): item.time}}</div> <!-- <div class="process-content-right-button">{{item.time?item.time.slice(0,11): item.time}}</div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="process-content-right-xian"></div> <!-- <div class="process-content-right-xian"></div>-->
</div> </div>
<!-- <a-tabs style="margin-top: 20px" v-model="activeKey" class="ant-tabs">--> <div class="box-text" style="margin-top: 10px">
<!-- <a-tab-pane :key="$t('CurrentStatusOfTheProject')" :tab="$t('CurrentStatusOfTheProject')">--> <div class="header-text">
<!-- <currentStatusOfTheProjectEcharts @currentStatus="currentStatus"--> {{$t('projectStatus')}}
<!-- v-if="activeKey == $t('CurrentStatusOfTheProject')"/>--> </div>
<!-- </a-tab-pane>--> <div class="header-tight">
<!-- <a-tab-pane :key="$t('DeliverableStatus')" :tab="$t('DeliverableStatus')">--> <a-button class="box-button"
<!-- <deliverableStatusEchart @currentStatus="currentStatus" v-if="activeKey == $t('DeliverableStatus')"/>--> style="line-height: 32px"
<!-- </a-tab-pane>--> @click="stateExportClick">{{$t('stateExport')}}
<!-- <a-tab-pane :key="$t('CertificationProgress')" :tab="$t('CertificationProgress')">--> </a-button>
<!-- <certificationProgressEchart @currentStatus="currentStatus" v-if="activeKey == $t('CertificationProgress')"/>--> <a-button class="box-button"
<!-- </a-tab-pane>--> v-if="activeKey == $t('regulatoryComplianceManagement') || activeKey == $t('certificationActivityManagement')"
<!-- <a-tab-pane :key="$t('Parametercollection')" :tab="$t('Parametercollection')">--> style="line-height: 32px"
<!-- <ParameterCollectionEchart @currentStatus="currentStatus" v-if="activeKey == $t('Parametercollection')"/>--> @click="versionStatisticsClick">{{$t('versionStatistics')}}
<!-- </a-tab-pane>--> </a-button>
<!-- </a-tabs>--> </div>
</div>
<projectStatus ref="projectStatusRef"
@currentStatus="currentStatus"
@projectStatusForm="projectStatusForm"/>
<versionStatistics ref="versionStatisticsRef" @versionStatisticsForm="versionStatisticsForm"/>
<listOfRelevantPersonnel ref="listOfRelevantPersonnelRef"/> <listOfRelevantPersonnel ref="listOfRelevantPersonnelRef"/>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/> <addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<settingList :url="url" ref="settingListRef" @settingListForm="settingListForm"/> <settingList :url="url" ref="settingListRef" @settingListForm="settingListForm"/>
@@ -207,30 +163,28 @@
import listOfRelevantPersonnel from './listOfRelevantPersonnel' import listOfRelevantPersonnel from './listOfRelevantPersonnel'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import addModel from './addModel' import addModel from './addModel'
import versionStatistics from './versionStatistics'
import complianceCertificationForm from './complianceCertificationForm'
import settingList from './settingList' import settingList from './settingList'
import currentStatusOfTheProjectEcharts from './currentStatusOfTheProjectEcharts' import projectStatus from './projectStatus'
import deliverableStatusEchart from './deliverableStatusEchart'
import ParameterCollectionEchart from './ParameterCollectionEchart'
import certificationProgressEchart from './certificationProgressEchart'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'ProjectDetails', name: 'ProjectDetails',
components: { components: {
listOfRelevantPersonnel, listOfRelevantPersonnel,
ParameterCollectionEchart,
addModel, addModel,
settingList, settingList,
currentStatusOfTheProjectEcharts, projectStatus,
deliverableStatusEchart, versionStatistics,
certificationProgressEchart complianceCertificationForm
}, },
data() { data() {
return { return {
queryForm: {}, queryForm: {},
cut:'', cut: '',
administrators:false, administrators: false,
activeKey: this.$t('CurrentStatusOfTheProject'), activeKey: this.$t('regulatoryComplianceManagement'),
url: { url: {
queryById: 'project/projectLibraryBase/queryById', queryById: 'project/projectLibraryBase/queryById',
add: 'project/projectLibraryBase/add', add: 'project/projectLibraryBase/add',
@@ -240,13 +194,15 @@
editSettingUrl: 'project/projectTaskPlanning/edit', editSettingUrl: 'project/projectTaskPlanning/edit',
settingQueryForm: '/project/projectTaskPlanning/list' settingQueryForm: '/project/projectTaskPlanning/list'
}, },
selectedRowKeys: [],
idList: [],
regulatoryCertificationTaskPlanList: [] regulatoryCertificationTaskPlanList: []
} }
}, },
mounted() { mounted() {
this.getForm() this.getForm()
this.getSetting()
this.administrators = false this.administrators = false
this.activeKey = this.$t('regulatoryComplianceManagement')
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) { if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => { this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') { if (res.roleCode == 'admin') {
@@ -262,9 +218,9 @@
if (res.success) { if (res.success) {
this.cut = res.cut this.cut = res.cut
this.queryForm = res.result[0] || {} this.queryForm = res.result[0] || {}
if(this.cut == 'en'){ if (this.cut == 'en') {
this.queryForm.brandText = this.queryForm.brandTextEn this.queryForm.brandText = this.queryForm.brandTextEn
}else{ } else {
this.queryForm.brandText = this.queryForm.brandText this.queryForm.brandText = this.queryForm.brandText
} }
} else { } else {
@@ -272,20 +228,11 @@
} }
}) })
}, },
// currentStatus(item) { currentStatus(item) {
// this.$emit('TaskListChange', item) this.$emit('TaskListChange', item)
// },
getSetting() {
getAction(this.url.queryByProjectId, { projectId: this.$route.query.id }).then((res) => {
if (res.success) {
this.regulatoryCertificationTaskPlanList = res.result || []
} else {
this.regulatoryCertificationTaskPlanList = []
}
})
}, },
settingListForm() { settingListForm() {
this.getSetting() this.$refs.complianceCertificationRef.getSetting()
}, },
ListOfRelevantPersonnelClick() { ListOfRelevantPersonnelClick() {
this.$refs.listOfRelevantPersonnelRef.getData() this.$refs.listOfRelevantPersonnelRef.getData()
@@ -296,7 +243,6 @@
} }
}, },
edit() { edit() {
console.log(this.queryForm)
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(this.queryForm))) this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(this.queryForm)))
}, },
addModelList() { addModelList() {
@@ -304,6 +250,24 @@
}, },
settingClick() { settingClick() {
this.$refs.settingListRef.edit() this.$refs.settingListRef.edit()
},
stateExportClick() {
let query = {
projectLibraryId: this.$route.query.id
}
downloadFile('/project/projectLibraryBase/exportProjectProgressStatisticsXls',
this.queryForm.projectName+'-'+this.queryForm.projectVersion+'-'+this.$t('projectProgressStatistics') + '.xls', query)
},
versionStatisticsClick() {
this.$refs.versionStatisticsRef.addModel(JSON.parse(JSON.stringify(this.selectedRowKeys)))
},
versionStatisticsForm(value) {
this.$refs.projectStatusRef.versionStatisticsForm(value)
this.selectedRowKeys = JSON.parse(JSON.stringify(value))
},
projectStatusForm(activeKey) {
this.activeKey = activeKey
} }
} }
} }
@@ -319,7 +283,7 @@
.header-text { .header-text {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: bold;
color: #000F16; color: #000F16;
} }
@@ -359,7 +323,7 @@
.text-field-content { .text-field-content {
width: 100%; width: 100%;
margin-bottom: 34px; /*margin-bottom: 34px;*/
.text-field-left { .text-field-left {
width: 124px; width: 124px;
@@ -463,11 +427,19 @@
.box-text { .box-text {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 80px; height: 72px;
line-height: 80px; line-height: 80px;
} }
.header-tight {
line-height: 90px;
}
.button-text { .button-text {
padding: 0 13px; padding: 0 13px;
} }
.box-button {
margin-left: 12px;
}
</style> </style>
@@ -0,0 +1,432 @@
<template>
<div>
<div class="box-content">
<div class="box-content-left">
<div id="main-left"></div>
</div>
<div class="box-content-right">
<div id="main-right"></div>
</div>
</div>
<div class="box-content">
<div class="box-content-bottom">
<div class="box-content-text">
<div class="box-content-text-text" @click="boxContentClick(0)">
{{$t('whole')}}
</div>
<div class="box-content-text-text" @click="boxContentClick(1)">
{{$t('completeVehicle')}}
</div>
<div class="box-content-text-text" @click="boxContentClick(2)">
{{$t('components')}}
</div>
</div>
<div id="main-bottom"></div>
</div>
</div>
<responsibilityList @responsibility="responsibility" ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
export default {
name: 'certificationActivity',
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
data() {
return {
url: {
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
},
certificationProgressMap:{},
num:'0',
}
},
mounted() {
this.num = '0'
let boxContentTextColor = document.getElementsByClassName('box-content-text-color')
if (boxContentTextColor && boxContentTextColor.length > 0) {
boxContentTextColor[0].classList.remove('box-content-text-color')
}
let boxContentTextText = document.getElementsByClassName('box-content-text-text')
if (boxContentTextText && boxContentTextText.length > 0) {
boxContentTextText[0].classList.add('box-content-text-color')
}
this.mainBottomEcharts()
this.getData()
},
methods: {
getData() {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let rzTaskToConfirmMapList = res.result.rzTaskToConfirmMap ? res.result.rzTaskToConfirmMap.rzTaskToConfirmMapList : []
let prehomoMapList = res.result.prehomoMap ? res.result.prehomoMap.prehomoMapList : []
this.certificationProgressMap = res.result.certificationProgressMap
let allMapList = res.result.certificationProgressMap ? res.result.certificationProgressMap.allMapList : []
this.dataEcharts(rzTaskToConfirmMapList)
this.mainRightEcharts(prehomoMapList)
this.mainBottomEcharts(allMapList)
}
}
})
},
dataEcharts(dataSource) {
let data = []
let color = []
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.taskAffirmStatus == 'Not started') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('notLaunch'),
color: '#00B3BE',
status:res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
color: '#FDA71C',
status:res.taskAffirmStatus
})
color.push('#FDA71C')
} else if (res.taskAffirmStatus == 'Accepted') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('accept'),
color: '#26BC4B',
status:res.taskAffirmStatus
})
color.push('#26BC4B')
} else if (res.taskAffirmStatus == 'Rejected') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('refuse'),
color: '#E83030',
status:res.taskAffirmStatus
})
color.push('#E83030')
}
})
}
this.getEcharts('main-left', this.$t('certificationTaskConfirmation'), color, data)
},
mainRightEcharts(dataSource){
let data = []
let color = []
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.taskAffirmStatus == 'Not started') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('notLaunch'),
color: '#00B3BE',
status:res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
color: '#FDA71C',
status:res.taskAffirmStatus
})
color.push('#FDA71C')
} else if (res.taskAffirmStatus == 'Review and pass') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('reviewAndPass'),
color: '#26BC4B',
status:res.taskAffirmStatus
})
color.push('#26BC4B')
} else if (res.taskAffirmStatus == 'Review and return') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('reviewAndReturn'),
color: '#E83030',
status:res.taskAffirmStatus
})
color.push('#E83030')
}
})
}
this.getEcharts('main-right', this.$t('preHomoFlow'), color, data)
},
mainBottomEcharts(dataSource){
let data = []
let color = []
if (dataSource && dataSource.length > 0) {
dataSource.forEach(res => {
if (res.certificationProgress == 'Not start') {
data.push({
value: res.certificationProgressCount,
name: this.$t('Notatthe'),
color: '#00B3BE',
status:res.certificationProgress
})
color.push('#00B3BE')
} else if (res.certificationProgress == 'In progress') {
data.push({
value: res.certificationProgressCount,
name: this.$t('inProgress'),
color: '#FDA71C',
status:res.certificationProgress
})
color.push('#FDA71C')
} else if (res.certificationProgress == 'Test passed') {
data.push({
value: res.certificationProgressCount,
name: this.$t('experimentPassed'),
color: '#26BC4B',
status:res.certificationProgress
})
color.push('#26BC4B')
} else if (res.certificationProgress == 'Test failed') {
data.push({
value: res.certificationProgressCount,
name: this.$t('experimentFailed'),
color: '#E83030',
status:res.certificationProgress
})
color.push('#E83030')
}else if (res.certificationProgress == 'Component report not submitted') {
data.push({
value: res.certificationProgressCount,
name: this.$t('componentReportNotSubmitted'),
color: '#FDA71C',
status:res.certificationProgress
})
color.push('#FDA71C')
}else if (res.certificationProgress == 'Component report submitted') {
data.push({
value: res.certificationProgressCount,
name: this.$t('componentReportSubmitted'),
color: '#6FD682',
status:res.certificationProgress
})
color.push('#6FD682')
}else if (res.certificationProgress == 'Component report has been stored') {
data.push({
value: res.certificationProgressCount,
name: this.$t('componentReportHasBeenStored'),
color: '#26BC4B',
status:res.certificationProgress
})
color.push('#26BC4B')
}
})
}
this.getEcharts('main-bottom', this.$t('CertificationProgress'), color, data)
},
getEcharts(chart, title, color, data) {
var myChart = echarts.init(document.getElementById(chart))
myChart.setOption({
title: {
text: title
},
tooltip: {
trigger: 'item',
textStyle : {
fontWeight : 'normal',
fontSize : 14,
color:'#040B29',
fontFamily:'BlueSkyNoto',
},
formatter: function (parms) {
let str = parms.marker+' '+parms.data.name+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+parms.data.value+' ('+parms.percent+'%)'
return str
}
},
legend: {
itemWidth: 12,
itemHeight: 12,
bottom: '0',
left: 'center',
itemGap: 30,
icon: 'circle'
},
series: [
{
name: title,
type: 'pie',
radius: ['40%', '54%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
color: color,
data: data
}
]
})
myChart.off('click') // 重点代码
myChart.on('click', (params) => {
console.log(params)
let query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id
}
if (params.seriesName === this.$t('certificationTaskConfirmation')) {
query.operatorType = 'queryRZTaskToConfirmStatistics'
query.status = params.data.status
} else if (params.seriesName === this.$t('preHomoFlow')) {
query.operatorType = 'queryPrehomoStatistics'
query.status = params.data.status
} else if (params.seriesName === this.$t('CertificationProgress')) {
if (this.num == '0'){
query.operatorType = 'queryCertificationProgressStatisticsAll'
}else if(this.num == '1'){
query.operatorType = 'queryCertificationProgressStatisticsCar'
}else if(this.num == '2'){
query.operatorType = 'queryCertificationProgressStatisticsPart'
}
query.status = params.data.status
}
this.$refs.responsibilityListRef.getData(query)
})
},
responsibility(item) {
this.$emit('currentStatus', item)
},
boxContentClick(num) {
let boxContentTextColor = document.getElementsByClassName('box-content-text-color')
if (boxContentTextColor && boxContentTextColor.length > 0) {
boxContentTextColor[0].classList.remove('box-content-text-color')
}
let boxContentTextText = document.getElementsByClassName('box-content-text-text')
if (boxContentTextText && boxContentTextText.length > 0) {
boxContentTextText[num].classList.add('box-content-text-color')
}
this.num = num
if (num == 0){
this.mainBottomEcharts( this.certificationProgressMap.allMapList || [])
}else if(num == 1){
this.mainBottomEcharts( this.certificationProgressMap.carMapList || [])
}else if(num == 2){
this.mainBottomEcharts( this.certificationProgressMap.partMapList || [])
}
}
}
}
</script>
<style scoped lang="less">
.box-content {
width: 100%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
/*margin-bottom: 20px;*/
.box-content-left {
width: calc(50% - 10px);
height: 346px;
border: 2px #eff1f3 solid;
border-radius: 6px;
margin-top: 4px;
#main-left {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
.box-content-right {
width: calc(50% - 10px);
height: 346px;
border: 2px #eff1f3 solid;
border-radius: 6px;
margin-top: 4px;
#main-right {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
.box-content-bottom {
width: 100%;
height: 346px;
border: 2px #eff1f3 solid;
position: relative;
border-radius: 6px;
margin-top: 20px;
.box-content-text {
height: 30px;
background: #F5F6F7;
border-radius: 4px;
position: absolute;
right: 24px;
top: 20px;
display: flex;
z-index: 100;
justify-content: space-between;
padding: 0 2px 0 2px;
.box-content-text-text {
display: inline-block;
font-size: 12px;
color: #6F7385;
line-height: 30px;
margin-right: 10px;
cursor: pointer;
margin-left: 10px;
}
.box-content-text-color {
box-shadow: 0px 1px 2px rgba(0, 0, 60, 0.01), 0px 2px 4px rgba(0, 22, 60, 0.02), 0px 4px 6px rgba(0, 22, 60, 0.0229458);
border-radius: 4px;
padding: 4px 6px;
background: #FFFFFF;
border: 1px solid #E6E7EC;
color: #01A0AC;
line-height: normal;
margin-right: 0;
margin-left: 0;
}
}
#main-bottom {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
}
</style>
@@ -236,6 +236,14 @@
{{ $t('reviewAndReturn') }} {{ $t('reviewAndReturn') }}
</div> </div>
<!-- 补充提交-->
<div @click="supplementarySubmissionClick()"
v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="rollback"/>
{{ $t('supplementarySubmission') }}
</div>
<!-- 任务接受--> <!-- 任务接受-->
<div @click="missionAcceptedClick('zrrjsrw',$t('confirmToAcceptTheTask'))" <div @click="missionAcceptedClick('zrrjsrw',$t('confirmToAcceptTheTask'))"
v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
@@ -561,9 +569,9 @@
'In progress': 'TrackedColor', 'In progress': 'TrackedColor',
'NA': 'notInvolvedColor', 'NA': 'notInvolvedColor',
'Not start': 'submittedColor', 'Not start': 'submittedColor',
'25181c5a4c044001b4beca539c77a5c8': 'accordColor', 'Component report submitted': 'componentColor',
'0a384b5475554ae8886b950730a3bff7': 'accordColor', 'Component report has been stored': 'accordColor',
'7cba3c71fd24421eade54c685e3b4444': 'TrackedColor' 'Component report not submitted': 'TrackedColor'
}, },
fieldList: [ fieldList: [
{ {
@@ -608,7 +616,7 @@
type: 'date', type: 'date',
value: 'endTime', value: 'endTime',
text: this.$t('closingDate') text: this.$t('closingDate')
}, }
], ],
disabled: false, disabled: false,
queryParamQuery: {}, queryParamQuery: {},
@@ -827,6 +835,10 @@
this.long = localStorage.getItem('language') || 'zh-cn' this.long = localStorage.getItem('language') || 'zh-cn'
this.loading = true this.loading = true
this.userInfoQuery = this.userInfo() this.userInfoQuery = this.userInfo()
if (this.areaOfResponsibility && this.areaOfResponsibility.dutyTerritory) {
this.queryParam.dutyTerritory = this.areaOfResponsibility.dutyTerritory
this.queryParam = { ...this.queryParam }
}
this.getProcessStatus() this.getProcessStatus()
this.getDeliverableTree() this.getDeliverableTree()
this.querydreId() this.querydreId()
@@ -2164,6 +2176,62 @@
} }
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
},
supplementarySubmissionClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let ids = []
let notConditions = []
let _this = this
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'Review and pass') {
if (this.roleSwitchingCode == 20 && this.selectedRowKeysList[i].dutyPersonName == this.userInfo().username) {
ids.push(this.selectedRowKeysList[i].id)
} else if (this.roleSwitchingCode == 21) {
ids.push(this.selectedRowKeysList[i].id)
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
}
let data = ''
if (notConditions && notConditions.length > 0) {
if (this.roleSwitchingCode == 20) {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessStatusOfApprovedCanBeSelected') + this.$t('andTheOperatorCurrentData')
} else {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyProcessStatusOfApprovedCanBeSelected')
}
}
if (ids && ids.length > 0) {
this.$confirm({
content: _this.$t('confirmSupplementarySubmission'),
onOk() {
let query = {
ids: ids.join(','),
'flowStatus': 'Results to be submitted'
}
postAction('/project/projectCertificationInventoryEO/updateStatusBatch', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.selectedRowKeys = []
_this.selectedRowKeysList = []
if (notConditions && notConditions.length > 0) {
_this.failedMessage(data)
}
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.failedMessage(data)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
} }
} }
} }
@@ -2493,7 +2561,10 @@
background: #dbf6e2; background: #dbf6e2;
color: #26BD4B; color: #26BD4B;
} }
.componentColor{
background: #EDFCEF;
color: #6FD682;
}
.nonConformityColor { .nonConformityColor {
background: #f3dddd; background: #f3dddd;
color: #E83030; color: #E83030;
@@ -1,248 +0,0 @@
<template>
<div class="box-content">
<div class="box-content-left">
<div id="main-left"></div>
</div>
<div class="box-content-right">
<div id="main-right">
<a-table
ref="table"
:components="drag(columns,'columns')"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
:data-source="dataSource"
:columns="columns"
>
<template slot="footer" slot-scope="currentPageData">
{{$t('totalTable')}}:{{certificationProgressTotal}}
</template>
</a-table>
</div>
</div>
<responsibilityList @responsibility="responsibility" ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'certificationProgress',
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
mixins:[ResizeHeader, ResizeColumnProvide],
data() {
return {
loading: false,
dataSource: [],
certificationProgressTotal: 0,
url: {
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
},
columns: [
{
title: this.$t('notInvolved'),
align: 'left',
dataIndex: 'notInvolved',
width: 102
},
{
title: this.$t('toBeStarted'),
align: 'left',
dataIndex: 'toBeStarted',
width: 102
},
{
title: this.$t('inProgress'),
align: 'left',
dataIndex: 'inProgress',
width: 102
},
{
title: this.$t('experimentFailed'),
align: 'left',
dataIndex: 'experimentFailed',
width: 122
},
{
title: this.$t('experimentPassed'),
align: 'left',
dataIndex: 'experimentPassed',
width: 122
}
]
}
},
mounted() {
this.mainLeftEcharts()
this.getData()
},
methods: {
responsibility(item) {
this.$emit('currentStatus', item)
},
getData() {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let certificationProgressMap = res.result.certificationProgressMap ? res.result.certificationProgressMap.certificationProgressMapList : []
this.certificationProgressTotal = res.result.certificationProgressMap ? res.result.certificationProgressMap.certificationProgressTotal : 0
this.dataEcharts(certificationProgressMap)
}
}
})
},
dataEcharts(val) {
let data = []
let color = []
this.dataSource = []
if (val && val.length > 0) {
this.dataSource = [{}]
val.forEach(res => {
if (res.certificationProgress == 'NA') {
data.push({
value: res.certificationProgressCount,
name: this.$t('notInvolved'),
status: res.certificationProgress
})
color.push('#707486')
this.dataSource[0].notInvolved = res.certificationProgressCount
} else if (res.certificationProgress == 'Not start') {
data.push({
value: res.certificationProgressCount,
name: this.$t('toBeStarted'),
status: res.certificationProgress
})
color.push('#00B3BE')
this.dataSource[0].toBeStarted = res.certificationProgressCount
} else if (res.certificationProgress == 'In progress') {
data.push({
value: res.certificationProgressCount,
name: this.$t('inProgress'),
status: res.certificationProgress
})
color.push('#FDA71C')
this.dataSource[0].inProgress = res.certificationProgressCount
} else if (res.certificationProgress == 'Test failed') {
data.push({
value: res.certificationProgressCount,
name: this.$t('experimentFailed'),
status: res.certificationProgress
})
color.push('#E83030')
this.dataSource[0].experimentFailed = res.certificationProgressCount
} else if (res.certificationProgress == 'Test passed') {
data.push({
value: res.certificationProgressCount,
name: this.$t('experimentPassed'),
status: res.certificationProgress
})
color.push('#26BD4B')
this.dataSource[0].experimentPassed = res.certificationProgressCount
}
})
}
this.mainLeftEcharts(data, color)
},
getEcharts(chart, title, color, data) {
var myChart = echarts.init(document.getElementById(chart))
myChart.setOption({
title: {
text: title
},
tooltip: {
trigger: 'item'
},
legend: {
itemWidth: 12,
itemHeight: 12,
bottom: '0',
left: 'center',
itemGap: 30,
icon: 'circle'
},
series: [
{
name: title,
type: 'pie',
radius: ['40%', '54%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
color: color,
data: data
}
]
})
myChart.on('click', (params) => {
let query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id,
operatorType: 'queryCertificationProgressStatistics',
certificationProgress: params.data.status
}
this.$refs.responsibilityListRef.getData(query)
})
},
mainLeftEcharts(data, color) {
this.getEcharts('main-left', this.$t('CertificationProgress'), color, data)
}
}
}
</script>
<style scoped lang="less">
.box-content {
width: 100%;
display: flex;
justify-content: space-between;
.box-content-left {
width: calc(50% - 12px);
height: 398px;
border: 2px #eff1f3 solid;
#main-left {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
}
.box-content-right {
width: calc(50% - 12px);
height: 398px;
border: 2px #eff1f3 solid;
#main-right {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
}
}
</style>
@@ -0,0 +1,298 @@
<template>
<div class="box-top-content-right">
<div class="box-top-content-right-bottom">
<div class="process-content" v-if="timeData && timeData.length > 0">
<div class="process-content-right-xian"></div>
<div class="process-content-right-xian-color"></div>
<div class="process-content-right-xian-one"></div>
<div class="process-content-content" :style="val.left"
v-for="(val,indexOne) in timeData" :key="indexOne" v-if="val.g">
<div class="process-content-right-top" :title="val.name">{{ val.name }}</div>
<!-- <div class="process-content-right-button" v-if="indexOne % 2 == 1" :title="val.name">{{ val.name }}-->
<!-- </div>-->
<a-tooltip placement="topLeft" overlayClassName="tooltipColor">
<template slot="title">
<span>{{ val.time.slice(0, 11) }}</span>
</template>
<img v-if="val.status == 1" src="../../../assets/heiTop.png" class="process-content-left"
alt="">
<img v-else-if="val.status == 2" src="../../../assets/kongTop.png"
class="process-content-left"
alt="">
<img v-else-if="val.status == 3" src="../../../assets/shiTop.png" class="process-content-left"
alt="">
</a-tooltip>
<!-- <div class="process-content-right-button">{{val.time.slice(0,11)}}</div>-->
</div>
<div class="process-content-contentOne" :style="val.left"
v-for="(val,indexTwo) in timeData" v-if="!val.g">
<!-- <div class="process-content-right-top" v-if="indexOne % 2 == 0" :title="val.name">{{ val.name }}</div>-->
<div class="process-content-right-button" :title="val.name">{{ val.name }}
</div>
<a-tooltip placement="topLeft" overlayClassName="tooltipColor">
<template slot="title">
<span>{{ val.time.slice(0, 11) }}</span>
</template>
<img v-if="val.status == 1" src="../../../assets/huiBottom.png" class="process-content-left"
alt="">
<img v-else-if="val.status == 2" src="../../../assets/kongBottom.png"
class="process-content-left"
alt="">
<img v-else-if="val.status == 3" src="../../../assets/shiBottom.png" class="process-content-left"
alt="">
</a-tooltip>
</div>
</div>
</div>
</div>
</template>
<script>
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
export default {
name: 'complianceCertificationForm',
data() {
return {
regulatoryCertificationTaskPlanList: [],
timeData: [],
url: {
queryByProjectId: 'project/projectTaskPlanning/queryByProjectId'
}
}
},
mounted() {
this.getSetting()
},
methods: {
//传入 YYYY-MM , YYYY-MM (2020-09) (2020-12) 返回 YYYY-MM 数组
getYearAndMonth(start, end) {
let result = [];
let starts = start.split('-');
let ends = end.split('-');
let staYear = parseInt(starts[0]);
let staMon = parseInt(starts[1]);
let endYear = parseInt(ends[0]);
let endMon = parseInt(ends[1]);
while (staYear <= endYear) {
if (staYear === endYear) {
while (staMon < endMon) {
staMon++;
var str = staYear + '-'+(staMon >= 10 ? staMon : '0' + staMon);
result.push(str);
}
staYear++;
} else {
staMon++;
if (staMon > 12) {
staMon = 1;
staYear++;
}
let str = staYear + '-'+(staMon >= 10 ? staMon : '0' + staMon);
result.push(str);
}
}
return result;
},
getSetting() {
getAction(this.url.queryByProjectId, { projectId: this.$route.query.id }).then((res) => {
if (res.success) {
this.timeData = res.result || []
let startTime = ''
let endTime = ''
if (this.timeData.length > 0) {
startTime = this.timeData[0].time.slice(0, 7)
endTime = this.timeData[this.timeData.length - 1].time.slice(0, 7)
let monDiff = this.getYearAndMonth(startTime, endTime)
monDiff.unshift(startTime)
setTimeout(() => {
let dataList = document.getElementsByClassName('box-top-content-right-bottom')
let clientWidth = dataList[0].clientWidth
clientWidth = clientWidth / monDiff.length
for (let i = 0; i < monDiff.length; i++) {
for (let j = 0; j < this.timeData.length; j++) {
let num = (Math.floor(clientWidth / 30 * 10000)/10000) * parseInt(this.timeData[j].time.slice(8, 10))
if (this.timeData[j].time.slice(0, 7) == monDiff[i]) {
this.timeData[j].left = 'left:' + ((clientWidth * i + num) - 10) + 'px'
}
}
}
console.log(this.timeData)
this.timeData = [...this.timeData]
}, 500)
}
} else {
this.regulatoryCertificationTaskPlanList = []
}
})
}
}
}
</script>
<style scoped lang="less">
.box-top-content-right {
width: 100%;
padding: 0 24px;
box-sizing: border-box;
}
.box-top-content-right-bottom {
position: relative;
/*padding-top: 50px;*/
}
.process-content {
position: relative;
height: 110px;
/*overflow:hidden;*/
.process-content-content {
background: transparent;
z-index: 98;
/*padding: 0 6px;*/
position: absolute;
left: 40px;
text-align: center;
width: 16px;
height: 16px;
border-radius: 50%;
margin-top: 37px;
.process-content-left {
width: 16px;
height: 16px;
/*margin-top: 5px;*/
}
.process-content-right-top {
font-size: 12px;
color: #040B29;
width: 83px;
background: #fff;
display: inline-block;
position: absolute;
top: -15px;
left: 50%;
transform: translate(-50%, -50%);
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
.process-content-right-button {
width: 83px;
font-size: 12px;
font-weight: 400;
color: #6F7385;
position: absolute;
left: 50%;
top: 36px;
transform: translate(-50%, -50%);
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
}
.process-content-contentOne {
background: transparent;
z-index: 98;
/*padding: 0 6px;*/
position: absolute;
left: 40px;
text-align: center;
width: 16px;
height: 16px;
border-radius: 50%;
margin-top: 63px;
.process-content-left {
width: 12px;
height: 12px;
/*margin-top: 5px;*/
}
.process-content-right-top {
font-size: 12px;
color: #040B29;
width: 83px;
background: #fff;
display: inline-block;
overflow: hidden;
position: absolute;
top: -12px;
left: 50%;
transform: translate(-50%, -50%);
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
.process-content-right-button {
width: 83px;
font-size: 12px;
font-weight: 400;
color: #6F7385;
position: absolute;
left: 50%;
top: 36px;
transform: translate(-50%, -50%);
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
}
.process-content-right-xian {
height: 1px;
width: 100%;
background: #00B3BE;
position: absolute;
top: 48px;
}
.process-content-right-xian-color {
height: 28px;
width: 100%;
position: absolute;
top: 48px;
background: linear-gradient(90deg, rgba(0, 179, 190, 0.12) 0%, rgba(4, 11, 41, 0.02) 100%);
transform: matrix(-1, 0, 0, 1, 0, 0);
}
.process-content-right-xian-one {
height: 1px;
width: 100%;
background: #00B3BE;
position: absolute;
top: 74px;
}
}
</style>
@@ -1,249 +0,0 @@
<template>
<div class="box-content">
<div class="headerText"
:title="this.$t('redSchedule') + this.$t('yellowSchedule')+this.$t('greenRequirements')+this.$t('blueUndeterminedState')">
{{this.$t('redSchedule')}};
{{this.$t('yellowSchedule')}};
{{this.$t('greenRequirements')}};
{{this.$t('blueUndeterminedState')}};
</div>
<div class="box-content-left">
<div id="main-left"></div>
</div>
<div class="box-content-right">
<div id="main-right">
<a-table
ref="table"
:components="drag(columns,'columns')"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
:data-source="dataSource"
:columns="columns"
>
<template slot="footer" slot-scope="currentPageData">
{{$t('totalTable')}}:{{currentProjectStatusTotal}}
</template>
</a-table>
</div>
</div>
<responsibilityList @responsibility="responsibility" ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'CurrentStatusOfTheProjectEcharts',
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
mixins:[ResizeHeader, ResizeColumnProvide],
data() {
return {
loading: false,
dataSource: [],
currentProjectStatusTotal: 0,
url: {
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
},
columns: [
{
title: this.$t('red'),
align: 'left',
dataIndex: 'redCount',
width: 139
},
{
title: this.$t('yellow'),
align: 'left',
dataIndex: 'yellowCount',
width: 139
},
{
title: this.$t('green'),
align: 'left',
dataIndex: 'greenCount',
width: 139
},
{
title: this.$t('blue'),
align: 'left',
dataIndex: 'blueCount',
width: 139
}
]
}
},
mounted() {
this.getData()
},
methods: {
getData() {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let dataSource = res.result.currentProjectStatusMap ? res.result.currentProjectStatusMap.currentProjectStatusMapList : []
this.mainLeftEcharts(dataSource)
this.currentProjectStatusTotal = res.result.currentProjectStatusMap ? res.result.currentProjectStatusMap.currentProjectStatusTotal : 0
}
}
})
},
getEcharts(chart, title, color, data) {
var myChart = echarts.init(document.getElementById(chart))
myChart.setOption({
title: {
text: title
},
tooltip: {
trigger: 'item'
},
legend: {
itemWidth: 12,
itemHeight: 12,
bottom: '0',
left: 'center',
itemGap: 30,
icon: 'circle'
},
series: [
{
name: title,
type: 'pie',
radius: ['40%', '54%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
color: color,
data: data
}
]
})
myChart.on('click', (params) => {
let query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id,
operatorType: 'queryCurrentProjectStatusStatistics',
conditionAssessment: params.data.color
}
this.$refs.responsibilityListRef.getData(query)
})
},
mainLeftEcharts(dataSource) {
let data = []
let color = []
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.color == '4') {
data.push({
value: res.conditionAssessmentCount,
name: this.$t('blue'),
color: res.color
})
color.push('#00B3BE')
this.dataSource[0].blueCount = res.conditionAssessmentCount
} else if (res.color == '1') {
data.push({
value: res.conditionAssessmentCount,
name: this.$t('red'),
color: res.color
})
color.push('#E83030')
this.dataSource[0].redCount = res.conditionAssessmentCount
} else if (res.color == '2') {
data.push({
value: res.conditionAssessmentCount,
name: this.$t('yellow'),
color: res.color
})
color.push('#FDA71C')
this.dataSource[0].yellowCount = res.conditionAssessmentCount
} else if (res.color == '3') {
data.push({
value: res.conditionAssessmentCount,
name: this.$t('green'),
color: res.color
})
this.dataSource[0].greenCount = res.conditionAssessmentCount
color.push('#26BD4B')
}
})
}
this.getEcharts('main-left', this.$t('CurrentStatusOfTheProject'), color, data)
},
responsibility(item) {
this.$emit('currentStatus', item)
}
}
}
</script>
<style scoped lang="less">
.box-content {
width: 100%;
display: flex;
justify-content: space-between;
.box-content-left {
width: calc(50% - 12px);
margin-top: 30px;
height: 398px;
border: 2px #eff1f3 solid;
#main-left {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
}
.box-content-right {
width: calc(50% - 12px);
margin-top: 30px;
height: 398px;
border: 2px #eff1f3 solid;
#main-right {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
}
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
position: absolute;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
@@ -1,325 +0,0 @@
<template>
<div>
<div class="box-content">
<div class="box-content-left">
<div id="main-left"></div>
</div>
<div class="box-content-right">
<div id="main-right"></div>
</div>
</div>
<div class="box-content">
<div class="box-content-left">
<div id="main-left-content"></div>
</div>
<div class="box-content-right">
<div id="main-right-content"></div>
</div>
</div>
<div class="box-content">
<div class="box-content-left">
<div id="main-bottom"></div>
</div>
</div>
<responsibilityList @responsibility="responsibility" ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
export default {
name: 'DeliverableStatusEchart',
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
data() {
return {
url: {
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
}
}
},
mounted() {
this.mainLeftContentEcharts()
this.mainRightEcharts()
this.mainRightContentEcharts()
this.mainBottomEcharts()
this.getData()
},
methods: {
getData() {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let listingToConfirmMap = res.result.listingToConfirmMap ? res.result.listingToConfirmMap.listingToConfirmMapList : []
let taskToConfirmMap = res.result.taskToConfirmMap ? res.result.taskToConfirmMap.taskToConfirmMapList : []
let designComplianceMap = res.result.designComplianceMap ? res.result.designComplianceMap.designComplianceMapList : []
let prehomoMap = res.result.prehomoMap ? res.result.prehomoMap.prehomoMapList : []
let verifyComplianceMap = res.result.verifyComplianceMap ? res.result.verifyComplianceMap.verifyComplianceMapList : []
this.dataEcharts(listingToConfirmMap, 1)
this.dataEcharts(taskToConfirmMap, 2)
this.dataEchartsOne(designComplianceMap, 1)
this.dataEchartsOne(prehomoMap, 2)
this.dataEchartsOne(verifyComplianceMap, 3)
}
}
})
},
dataEcharts(val, num) {
let data = []
let color = []
if (val && val.length > 0) {
val.forEach((res) => {
if (res.inventoryAffirmStatus == 'Not started' || res.taskAffirmStatus == 'Not started') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('notLaunch'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#707486')
} else if (res.inventoryAffirmStatus == 'List to confirm' || res.taskAffirmStatus == 'List to confirm') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('toBeConfirmed'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.inventoryAffirmStatus == 'Accepted' || res.taskAffirmStatus == 'Accepted') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('accept'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#26BD4B')
} else if (res.inventoryAffirmStatus == 'Rejected' || res.taskAffirmStatus == 'Rejected') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('refuse'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#E83030')
}
})
}
if (num == 1) {
this.mainLeftEcharts(data, color)
} else {
this.mainRightEcharts(data, color)
}
},
dataEchartsOne(val, num) {
let data = []
let color = []
if (val && val.length > 0) {
val.forEach((res) => {
if (res.designFlowTaskStatus == 'No rating' || res.prehomoFlowTaskStatus == 'No rating' || res.verifyFlowTaskStatus == 'No rating') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('toBeConfirmed'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#00B3BE')
} else if (res.designFlowTaskStatus == 'Compliance' || res.prehomoFlowTaskStatus == 'Compliance' || res.verifyFlowTaskStatus == 'Compliance') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('accord'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#26BD4B')
} else if (res.designFlowTaskStatus == 'Non-Compliance' || res.prehomoFlowTaskStatus == 'Non-Compliance' || res.verifyFlowTaskStatus == 'Non-Compliance') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('nonConformity'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#E83030')
} else if (res.designFlowTaskStatus == 'To be tracked' || res.prehomoFlowTaskStatus == 'To be tracked' || res.verifyFlowTaskStatus == 'To be tracked') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('Tracked'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#FDA71C')
} else if (res.designFlowTaskStatus == 'NA' || res.prehomoFlowTaskStatus == 'NA' || res.verifyFlowTaskStatus == 'NA') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('notInvolved'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#707486')
} else if (res.designFlowTaskStatus == 'Termination of task' || res.prehomoFlowTaskStatus == 'Termination of task' || res.verifyFlowTaskStatus == 'Termination of task') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('taskTermination'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#E83030')
}
}
)
}
if (num == 1) {
this.mainLeftContentEcharts(data, color)
} else if (num == 2) {
this.mainRightContentEcharts(data, color)
} else if (num == 3) {
this.mainBottomEcharts(data, color)
}
},
getEcharts(chart, title, color, data, num) {
var myChart = echarts.init(document.getElementById(chart))
myChart.setOption({
title: {
text: title
},
tooltip: {
trigger: 'item'
},
legend: {
itemWidth: 12,
itemHeight: 12,
bottom: '0',
left: 'center',
itemGap: 30,
icon: 'circle'
},
series: [
{
name: title,
type: 'pie',
radius: ['40%', '54%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
color: color,
data: data
}
]
})
myChart.on('click', (params) => {
let query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id
}
if (num === 1) {
query.operatorType = 'queryListingToConfirmStatistics'
query.inventoryAffirmStatus = params.data.status
} else if (num === 2) {
query.operatorType = 'queryTaskToConfirmStatistics'
query.taskAffirmStatus = params.data.status
} else if (num === 3) {
query.operatorType = 'queryDesignStatistics'
query.designFlowTaskStatus = params.data.status
} else if (num === 4) {
query.operatorType = 'queryPrehomoStatistics'
query.prehomoFlowTaskStatus = params.data.status
} else if (num === 5) {
query.operatorType = 'queryVerifyStatistics'
query.verifyFlowTaskStatus = params.data.status
}
this.$refs.responsibilityListRef.getData(query)
})
}
,
mainLeftEcharts(data, color) {
this.getEcharts('main-left', this.$t('listConfirmationProgress'), color, data, 1)
}
,
mainRightEcharts(data, color) {
this.getEcharts('main-right', this.$t('taskConfirmationProgress'), color, data, 2)
}
,
mainLeftContentEcharts(data, color) {
this.getEcharts('main-left-content', this.$t('designComplianceConfirmationProgress'), color, data, 3)
}
,
mainRightContentEcharts(data, color) {
this.getEcharts('main-right-content', this.$t('preHomeConfirmProgress'), color, data, 4)
}
,
mainBottomEcharts(data, color) {
this.getEcharts('main-bottom', this.$t('verificationComplianceConfirmationProgress'), color, data, 5)
},
responsibility(item) {
this.$emit('currentStatus', item)
}
}
}
</script>
<style scoped lang="less">
.box-content {
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
.box-content-left {
width: calc(50% - 12px);
height: 398px;
border: 2px #eff1f3 solid;
#main-left {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
#main-left-content {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
#main-bottom {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
}
.box-content-right {
width: calc(50% - 12px);
height: 398px;
border: 2px #eff1f3 solid;
#main-right {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
#main-right-content {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
}
}
</style>
@@ -8,8 +8,8 @@
<div class="title-text" :title="$t('standard')"> <div class="title-text" :title="$t('standard')">
<span>{{$t('standard')}}</span> <span>{{$t('standard')}}</span>
</div> </div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')" <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></j-input> v-model="queryParam.serialNumber"></a-input>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
@@ -17,8 +17,8 @@
<div class="title-text" :title="$t('title')"> <div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span> <span>{{$t('title')}}</span>
</div> </div>
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')" <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></j-input> v-model="queryParam.title"></a-input>
</div> </div>
</a-col> </a-col>
<a-col :md="6" :sm="8"> <a-col :md="6" :sm="8">
@@ -61,8 +61,8 @@
:data-source="dataSource" :data-source="dataSource"
:columns="columns" :columns="columns"
> >
<span slot="ProcessType" slot-scope="text,result"> <span slot="problemType" slot-scope="text,result">
<a @click="standardClick(result)" class="textName" :title="text"> <a @click="problemTypeClick(result)" class="textName" :title="text">
{{text}} {{text}}
</a> </a>
</span> </span>
@@ -73,29 +73,34 @@
</span> </span>
</a-table> </a-table>
</div> </div>
<div class="page" v-if="dataSource.length > 0"> <!-- <div class="page" v-if="dataSource.length > 0">-->
<a-pagination <!-- <a-pagination-->
:show-total="total => $t('total')+` ${total} `+$t('strip')" <!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
show-quick-jumper <!-- show-quick-jumper-->
show-size-changer <!-- show-size-changer-->
:page-size.sync="pageSize" <!-- :page-size.sync="pageSize"-->
:total="total" <!-- :total="total"-->
:current="pageNo" <!-- :current="pageNo"-->
@change="pageOnChange" <!-- @change="pageOnChange"-->
@showSizeChange="SizeChange" <!-- @showSizeChange="SizeChange"-->
/> <!-- />-->
</div> <!-- </div>-->
<designCompliance ref="designComplianceRef"/>
</a-card> </a-card>
</template> </template>
<script> <script>
import { getAction, postAction, downloadFile, deleteAction,downloadFilePost } from '@/api/manage' import { getAction, postAction, downloadFile, deleteAction,downloadFilePost } from '@/api/manage'
import designCompliance from '../../toDoCenter/projectRegulationTasks/components/designCompliance'
import store from '@/store/' import store from '@/store/'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header' import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default { export default {
name: 'nonConformance', name: 'nonConformance',
mixins:[ResizeHeader, ResizeColumnProvide], mixins:[ResizeHeader, ResizeColumnProvide],
components:{
designCompliance
},
data() { data() {
return { return {
queryParam: {}, queryParam: {},
@@ -124,8 +129,7 @@
{ {
title: this.$t('ProcessType'), title: this.$t('ProcessType'),
align: 'left', align: 'left',
dataIndex: 'flowType', dataIndex: 'flowTypeName',
scopedSlots: { customRender: 'ProcessType' },
ellipsis: true, ellipsis: true,
sorter:true, sorter:true,
width: 150 width: 150
@@ -133,7 +137,7 @@
{ {
title: this.$t('areaOfResponsibility'), title: this.$t('areaOfResponsibility'),
align: 'left', align: 'left',
dataIndex: 'dutyTerritory', dataIndex: 'dutyTerritory_dictText',
ellipsis: true, ellipsis: true,
sorter:true, sorter:true,
width: 100 width: 100
@@ -141,15 +145,16 @@
{ {
title: this.$t('problemType'), title: this.$t('problemType'),
align: 'left', align: 'left',
dataIndex: 'problemType', dataIndex: 'flowStatusName',
ellipsis: true, ellipsis: true,
sorter:true, sorter:true,
width: 150 width: 150,
scopedSlots: { customRender: 'problemType' },
}, },
{ {
title: this.$t('Sponsor'), title: this.$t('Sponsor'),
align: 'left', align: 'left',
dataIndex: 'initiator', dataIndex: 'regulationOwnerIdName',
ellipsis: true, ellipsis: true,
sorter:true, sorter:true,
width: 100 width: 100
@@ -157,7 +162,7 @@
{ {
title: this.$t('personLiable'), title: this.$t('personLiable'),
align: 'left', align: 'left',
dataIndex: 'duty', dataIndex: 'dutyIdName',
ellipsis: true, ellipsis: true,
sorter:true, sorter:true,
width: 100 width: 100
@@ -167,8 +172,8 @@
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
url: { url: {
page: '/project/ncrTrackController/queryPageInfo', page: '/project/projectLawsInventoryEO/queryNotComplianList',
exportData: '/project/ncrTrackController/exportDataInfo' exportData: '/project/projectLawsInventoryEO/exportNotComplianList'
} }
} }
}, },
@@ -231,19 +236,34 @@
let query = { let query = {
...this.queryParam, ...this.queryParam,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
ncrTrackVOList: this.content // ncrTrackVOList: this.content
} }
downloadFilePost(this.url.exportData, this.$t('NonConformance') + '.xls', query, this.Deselect) downloadFile(this.url.exportData, this.$t('NonConformance') + '.xls', query, this.Deselect)
}, },
tableOnChange(pagination, filters, sorter) { tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2' this.orderBy = sorter.order == 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey this.orderByField = sorter.columnKey
if (sorter.columnKey == 'serialNumber'){
this.orderByField = 'serial_number'
}else if(sorter.columnKey == 'flowTypeName'){
this.orderByField = 'flow_type'
}else if(sorter.columnKey == 'dutyTerritory_dictText'){
this.orderByField = 'duty_territory'
}else if(sorter.columnKey == 'flowStatusName'){
this.orderByField = 'flow_status'
}else if(sorter.columnKey == 'regulationOwnerIdName'){
this.orderByField = 'regulation_owner_id'
}else if(sorter.columnKey == 'dutyIdName'){
this.orderByField = 'duty_id'
}else{
this.orderByField = sorter.columnKey
}
this.getList() this.getList()
}, },
getList() { getList() {
let query = { let query = {
pageNo: this.pageNo, // pageNo: this.pageNo,
pageSize: this.pageSize, // pageSize: this.pageSize,
projectLibraryId: this.$route.query.id, projectLibraryId: this.$route.query.id,
orderBy: this.orderBy, orderBy: this.orderBy,
orderByField: this.orderByField, orderByField: this.orderByField,
@@ -252,8 +272,8 @@
this.loading = true this.loading = true
getAction(this.url.page, query).then((res) => { getAction(this.url.page, query).then((res) => {
if (res.success) { if (res.success) {
this.dataSource = res.result.records || [] this.dataSource = res.result || []
this.total = res.result.total // this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
this.dataSource = [] this.dataSource = []
@@ -270,55 +290,64 @@
}) })
window.open(newUrl.href, '_blank') window.open(newUrl.href, '_blank')
}, },
standardClick(val) { problemTypeClick(row, name){
let num = val.prcType let query = {}
let query = { let TaskKey = ''
taskIds: val.taskId, if (row.flowType == '2') {
projectTaskInventoryId: val.projectLawsInventoryId, if (row.flowStatus == 'Task to be confirmed' || row.flowStatus == 'Duty Person Rejected') {
projectLibraryId: val.projectLibraryId, TaskKey = 'zrrqr'
projectName: val.projectName, } else if (row.flowStatus == 'Results to be submitted') {
id: val.projectLibraryId, TaskKey = 'zrrtjjfw'
serialNumber: val.serialNumber, } else if (row.flowStatus == 'Results to be reviewed' ||
actiProcInstId: val.prcId, row.flowStatus == 'Compliance' ||
primaryKeyId: val.projectTaskInventoryDetailId, row.flowStatus == 'Non-Compliance' ||
TaskKey: val.taskDefinitionKey, row.flowStatus == 'To be tracked' ||
isDisplay: val.status == 'NotDone' ? true : false row.flowStatus == 'NA') {
TaskKey = 'fggcssh'
}
query = {
actiProcInstId: row.actiProcInstId,
projectTaskInventoryId: row.id,
projectLibraryId: this.$route.query.id,
TaskKey: TaskKey,
isDisplay: false,
flowType: row.flowType,
Sponsor: 'regulationOwnerName',
personLiable: 'designDutyIdName',
typeOfDeliverables: 'designDeliverableTypeName',
deliverableTemplate: 'designDeliverableTemplate',
DueDate: 'designDueDate',
remarks: 'designRemark',
}
} else if(row.flowType == '4'){
if (row.flowStatus == 'Task to be confirmed' || row.flowStatus == 'Duty Person Rejected') {
TaskKey = 'zrrqr'
} else if (row.flowStatus == 'Results to be submitted') {
TaskKey = 'zrrtjjfw'
} else if (row.flowStatus == 'Results to be reviewed' ||
row.flowStatus == 'Compliance' ||
row.flowStatus == 'Non-Compliance' ||
row.flowStatus == 'To be tracked' ||
row.flowStatus == 'NA') {
TaskKey = 'fggcssh'
}
query = {
actiProcInstId: row.actiProcInstId,
projectTaskInventoryId: row.id,
projectLibraryId: this.$route.query.id,
TaskKey: TaskKey,
flowType: row.flowType,
isDisplay: false,
Sponsor: 'regulationOwnerName',
personLiable: 'verifyDutyIdName',
typeOfDeliverables: 'verifyDeliverableTypeName',
deliverableTemplate: 'verifyDeliverableTemplate',
DueDate: 'verifyDueDate',
remarks: 'verifyRemark',
}
} }
switch (num) { this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), row.flowTypeName)
case '2': },
query.flowType = 2
query.Sponsor = 'designInitiatorName'
query.personLiable = 'designDutyName'
query.typeOfDeliverables = 'designDeliverableTypeName'
query.deliverableTemplate = 'designDeliverableTemplate'
query.DueDate = 'designDueDate'
query.remarks = 'designRemark'
break
case '3':
query.flowType = 3
query.Sponsor = 'prehomoInitiatorName'
query.personLiable = 'prehomoDutyName'
query.typeOfDeliverables = 'prehomoDeliverableTypeName'
query.deliverableTemplate = 'prehomoDeliverableTemplate'
query.DueDate = 'prehomoDueDate'
query.remarks = 'prehomoRemark'
break
case '4':
query.flowType = 4
query.Sponsor = 'verifyInitiatorName'
query.personLiable = 'verifyDutyName'
query.typeOfDeliverables = 'verifyDeliverableTypeName'
query.deliverableTemplate = 'verifyDeliverableTemplate'
query.DueDate = 'verifyDueDate'
query.remarks = 'verifyRemark'
break
}
let newUrl = this.$router.resolve({
path: '/taskListProcess',
query: query
})
window.open(newUrl.href, '_blank')
}
} }
} }
</script> </script>
@@ -4,19 +4,29 @@
<a-form layout="inline"> <a-form layout="inline">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="10"> <a-col :md="6" :sm="10">
<a-form-item :label="$t('Collectlist')"> <div class="box-title-text">
<a-select v-model="queryParam.ctype" @change="getonChange" style='width: 183px' :getPopupContainer="triggerNode => triggerNode.parentNode" :popper-append-to-body="false"> <div class="title-text" :title="$t('Collectlist')">
<a-select-option v-for="d in options" :key="d.value" :value="d.value" > <span>{{ $t('Collectlist') }}</span>
</div>
<a-select v-model="queryParam.ctype"
class="box-input"
@change="getonChange"
:getPopupContainer="triggerNode => triggerNode.parentNode" :popper-append-to-body="false">
<a-select-option v-for="d in options" :key="d.value" :value="d.value">
<span style="display: inline-block;width: 80%" :title=" d.label"> <span style="display: inline-block;width: 80%" :title=" d.label">
{{ d.label }} {{ d.label }}
</span> </span>
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </div>
</a-col> </a-col>
<a-col :md="6" :sm="14"> <a-col :md="6" :sm="10">
<a-form-model-item :label="$t('Statisticalmodels')" prop="value" style='width: 388px' class="process-form-item"> <div class="box-title-text">
<a-radio-group v-model="queryParam.value" @change="onChange" style='width: 253px'> <div class="title-text" :title="$t('Statisticalmodels')">
<span>{{ $t('Statisticalmodels') }}</span>
</div>
<a-radio-group class="box-input"
v-model="queryParam.value" @change="onChange">
<a-radio :value="1"> <a-radio :value="1">
{{$t('Thepercentage')}} {{$t('Thepercentage')}}
</a-radio> </a-radio>
@@ -24,9 +34,8 @@
{{$t('Quantity')}} {{$t('Quantity')}}
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</a-form-model-item> </div>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
@@ -44,7 +53,7 @@
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList' import responsibilityList from './responsibilityList'
import "echarts/lib/component/dataZoom" import 'echarts/lib/component/dataZoom'
export default { export default {
name: 'DeliverableStatusEchart', name: 'DeliverableStatusEchart',
@@ -59,28 +68,28 @@
}, },
data() { data() {
return { return {
queryParam:{ queryParam: {
value:1, value: 1,
ctype:'' ctype: ''
}, },
options:[], options: [],
collecting:[], collecting: [],
notStart:[], notStart: [],
submit:[], submit: [],
syncReport:[], syncReport: [],
collectingdata:[], collectingdata: [],
notStartdata:[], notStartdata: [],
submitdata:[], submitdata: [],
syncReportdata:[], syncReportdata: [],
dutyTerritory:[], dutyTerritory: [],
collectingpercentage:[], collectingpercentage: [],
collectingquantity:[], collectingquantity: [],
notStartpercentage:[], notStartpercentage: [],
notStartquantity:[], notStartquantity: [],
submitpercentage:[], submitpercentage: [],
submitquantity:[], submitquantity: [],
syncReportpercentage:[], syncReportpercentage: [],
syncReportquantity:[], syncReportquantity: [],
url: { url: {
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestData' getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestData'
} }
@@ -97,18 +106,18 @@
if (res.success) { if (res.success) {
if (res.result) { if (res.result) {
this.collecting = res.result.collecting ? res.result.collecting : [] this.collecting = res.result.collecting ? res.result.collecting : []
this.notStart = res.result.notStart ? res.result.notStart: [] this.notStart = res.result.notStart ? res.result.notStart : []
this.submit = res.result.submit ? res.result.submit : [] this.submit = res.result.submit ? res.result.submit : []
this.syncReport = res.result.syncReport ? res.result.syncReport : [] this.syncReport = res.result.syncReport ? res.result.syncReport : []
this.dutyTerritory = res.result.dutyTerritory ? res.result.dutyTerritory : [] this.dutyTerritory = res.result.dutyTerritory ? res.result.dutyTerritory : []
this.getEcharts() this.getEcharts()
} }
} }
}) })
}, },
getoptions(){ getoptions() {
let id = '' let id = ''
if (this.idList && this.idList.length > 0) { if (this.idList && this.idList.length > 0) {
id = this.idList.join(',') id = this.idList.join(',')
@@ -116,7 +125,7 @@
id = this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id id = this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id
// id = this.$route.query.id // id = this.$route.query.id
} }
getAction('project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestLabel', {id:id}).then((res) => { getAction('project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestLabel', { id: id }).then((res) => {
if (res.success) { if (res.success) {
this.options = res.result this.options = res.result
this.queryParam.ctype = this.options[0].value this.queryParam.ctype = this.options[0].value
@@ -125,7 +134,7 @@
} }
}) })
}, },
getonChange(value){ getonChange(value) {
this.collectingpercentage = [] this.collectingpercentage = []
this.collectingquantity = [] this.collectingquantity = []
this.notStartpercentage = [] this.notStartpercentage = []
@@ -136,7 +145,7 @@
this.syncReportquantity = [] this.syncReportquantity = []
this.getData(value) this.getData(value)
}, },
onChange(value){ onChange(value) {
this.collectingpercentage = [] this.collectingpercentage = []
this.collectingquantity = [] this.collectingquantity = []
this.notStartpercentage = [] this.notStartpercentage = []
@@ -149,53 +158,53 @@
}, },
getEcharts(chart, title, color, data, num) { getEcharts(chart, title, color, data, num) {
this.collecting.forEach((item,index) => { this.collecting.forEach((item, index) => {
this.collectingpercentage.push(item.percentage) this.collectingpercentage.push(item.percentage)
this.collectingquantity.push(item.quantity) this.collectingquantity.push(item.quantity)
}) })
this.notStart.forEach((item,index) => { this.notStart.forEach((item, index) => {
this.notStartpercentage.push(item.percentage) this.notStartpercentage.push(item.percentage)
this.notStartquantity.push(item.quantity) this.notStartquantity.push(item.quantity)
}) })
this.submit.forEach((item,index) => { this.submit.forEach((item, index) => {
this.submitpercentage.push(item.percentage) this.submitpercentage.push(item.percentage)
this.submitquantity.push(item.quantity) this.submitquantity.push(item.quantity)
}) })
this.syncReport.forEach((item,index) => { this.syncReport.forEach((item, index) => {
this.syncReportpercentage.push(item.percentage) this.syncReportpercentage.push(item.percentage)
this.syncReportquantity.push(item.quantity) this.syncReportquantity.push(item.quantity)
}) })
if(this.queryParam.value == 1){ if (this.queryParam.value == 1) {
this.collectingdata = this.collectingpercentage this.collectingdata = this.collectingpercentage
this.notStartdata = this.notStartpercentage this.notStartdata = this.notStartpercentage
this.submitdata = this.submitpercentage this.submitdata = this.submitpercentage
this.syncReportdata = this.syncReportpercentage this.syncReportdata = this.syncReportpercentage
}else if(this.queryParam.value == 2){ } else if (this.queryParam.value == 2) {
this.collectingdata = this.collectingquantity this.collectingdata = this.collectingquantity
this.notStartdata = this.notStartquantity this.notStartdata = this.notStartquantity
this.submitdata = this.submitquantity this.submitdata = this.submitquantity
this.syncReportdata = this.syncReportquantity this.syncReportdata = this.syncReportquantity
} }
var chartDom = document.getElementById('main-left'); var chartDom = document.getElementById('main-left')
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom)
var option; var option
var option1; var option1
let xAxisData = []; let xAxisData = []
// let data1 = []; // let data1 = [];
// let data2 = []; // let data2 = [];
// let data3 = []; // let data3 = [];
// let data4 = []; // let data4 = [];
xAxisData = this.dutyTerritory xAxisData = this.dutyTerritory
// data1.push(+(Math.random() * 2).toFixed(2)); // data1.push(+(Math.random() * 2).toFixed(2));
// data2.push(+(Math.random() * 100).toFixed(2)); // data2.push(+(Math.random() * 100).toFixed(2));
// data3.push(+(Math.random() + 0.3).toFixed(2)); // data3.push(+(Math.random() + 0.3).toFixed(2));
// data4.push(+Math.random().toFixed(2)); // data4.push(+Math.random().toFixed(2));
let yAxis=[]; let yAxis = []
let tooltip= {}; let tooltip = {}
let _this = this let _this = this
if(this.queryParam.value === 1){ if (this.queryParam.value === 1) {
yAxis = [ yAxis = [
{ {
type: 'value', type: 'value',
@@ -203,20 +212,26 @@
show: true, show: true,
interval: 'auto', interval: 'auto',
formatter: '{value} %' formatter: '{value} %'
}, }
}, }
] ]
}else{ } else {
yAxis=[ yAxis = [
{ {
type: 'value', type: 'value'
}, }
]; ]
} }
option = { option = {
title: {
text: this.$t('parameterCollectionProgress'),
},
legend: { legend: {
data: [this.$t('Notatthe'), this.$t('Inthecollection'), this.$t('Submitted'), this.$t('SynchronizedLibrary')], data: [this.$t('Notatthe'), this.$t('Inthecollection'), this.$t('Submitted'), this.$t('SynchronizedLibrary')],
left: '10%' icon: 'circle',
bottom:'0',
itemWidth: 12,
itemHeight: 12,
}, },
toolbox: { toolbox: {
// feature: { // feature: {
@@ -227,21 +242,21 @@
// } // }
}, },
tooltip: { tooltip: {
trigger:'axis', trigger: 'axis',
// axisPointer: { // 坐标轴指示器坐标轴触发有效 // axisPointer: { // 坐标轴指示器坐标轴触发有效
// type: 'line'// 默认为直线可选为'line' | 'shadow' // type: 'line'// 默认为直线可选为'line' | 'shadow'
// }, // },
formatter: function (params) { formatter: function(params) {
var html = params[0].name + "<br>"; var html = params[0].name + '<br>'
for (var i = 0; i < params.length; i++) { for (var i = 0; i < params.length; i++) {
html += params[i].marker + params[i].seriesName + ":" + params[i].value; html += params[i].marker + params[i].seriesName + ':' + params[i].value
if (_this.queryParam.value == 1) { if (_this.queryParam.value == 1) {
html += "%" + "<br>"; html += '%' + '<br>'
}else{ } else {
html +="<br>"; html += '<br>'
} }
} }
return html; return html
} }
}, },
@@ -250,19 +265,20 @@
// name: 'X Axis', // name: 'X Axis',
axisLabel: { axisLabel: {
interval: 0, interval: 0,
rotate:25, rotate: 25
// formatter: function(value) { // formatter: function(value) {
// return value.split("").join("\n"); // return value.split("").join("\n");
// } // }
}, }
// axisLine: { onZero: true }, // axisLine: { onZero: true },
// splitLine: { show: false }, // splitLine: { show: false },
// splitArea: { show: false } // splitArea: { show: false }
}, },
yAxis: yAxis, yAxis: yAxis,
grid: { grid: {
left: '10%', bottom: '20%',
bottom: '20%' left:50,
right:10,
}, },
series: [ series: [
{ {
@@ -272,7 +288,7 @@
barWidth: 40, barWidth: 40,
barGap: '-100%', barGap: '-100%',
itemStyle: { itemStyle: {
color: "#707486", color: '#00B3BE'
}, },
data: this.notStartdata data: this.notStartdata
}, },
@@ -283,7 +299,7 @@
barWidth: 40, barWidth: 40,
barGap: '-100%', barGap: '-100%',
itemStyle: { itemStyle: {
color: "#00B3BE", color: '#FDA71C'
}, },
data: this.collectingdata data: this.collectingdata
}, },
@@ -294,7 +310,7 @@
barWidth: 40, barWidth: 40,
barGap: '-100%', barGap: '-100%',
itemStyle: { itemStyle: {
color: "#26BD4B", color: '#26BD4B'
}, },
data: this.submitdata data: this.submitdata
}, },
@@ -305,31 +321,29 @@
barWidth: 40, barWidth: 40,
barGap: '-100%', barGap: '-100%',
itemStyle: { itemStyle: {
color: "#E83030", color: '#2F8DF3'
}, },
data: this.syncReportdata data: this.syncReportdata
} }
], ],
dataZoom:[ dataZoom: [
{ {
type: 'slider',//给x轴设置滚动条 type: 'slider',//给x轴设置滚动条
show: true, //flase直接隐藏图形 show: true, //flase直接隐藏图形
xAxisIndex: [0], xAxisIndex: [0],
bottom: 0, bottom: 46,
height: 20, height: 20,
showDetail: false, showDetail: false,
startValue: 0,//滚动条的起始位置 startValue: 0,//滚动条的起始位置
endValue: 9 //滚动条的截止位置按比例分割你的柱状图x轴长度 endValue: 9 //滚动条的截止位置按比例分割你的柱状图x轴长度
} }
]
], }
}; option && myChart.setOption(option, true)
option && myChart.setOption(option, true);
}, },
mainLeftEcharts(data, color) { mainLeftEcharts(data, color) {
this.getEcharts('main-left', this.$t('Parametercollection'), color, data, 1) this.getEcharts('main-left', this.$t('Parametercollection'), color, data, 1)
}, },
responsibility(item) { responsibility(item) {
this.$emit('currentStatus', item) this.$emit('currentStatus', item)
@@ -347,13 +361,14 @@
.box-content-left { .box-content-left {
width: calc(100% - 12px); width: calc(100% - 12px);
height: 600px; height: 626px;
border: 2px #eff1f3 solid; border: 2px #eff1f3 solid;
border-radius: 6px;
#main-left { #main-left {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 24px; padding: 24px 20px;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -371,6 +386,7 @@
box-sizing: border-box; box-sizing: border-box;
} }
} }
.box-input { .box-input {
display: inline-block; display: inline-block;
width: calc(70% - 100px); width: calc(70% - 100px);
@@ -398,4 +414,32 @@
} }
} }
} }
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 16px;
}
.title-text {
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: calc(100% - 126px);
height: 38px;
margin-top: 2px;
line-height: 38px;
}
</style> </style>
@@ -1,64 +1,63 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<div class="table-operator" style="margin-bottom: 10px"> <!-- <div class="table-operator" style="margin-bottom: 10px">-->
<div @click="versionStatisticsClick" <!-- <div @click="versionStatisticsClick"-->
v-if="!this.$route.query.parentId && $t('Parametercollection')!= activeKey" <!-- v-if="!this.$route.query.parentId && $t('Parametercollection')!= activeKey"-->
class="operator-text"> <!-- class="operator-text">-->
<a-icon type="plus"/> <!-- <a-icon type="plus"/>-->
{{$t('versionStatistics')}} <!-- {{$t('versionStatistics')}}-->
</div> <!-- </div>-->
<div v-else <!-- <div v-else-->
class="operator-text"> <!-- class="operator-text">-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<a-tabs v-model="activeKey" class="ant-tabs"> <a-tabs type="card" v-model="activeKey" @change="activeKeyChange" class="ant-tabs">
<a-tab-pane :key="$t('CurrentStatusOfTheProject')" :tab="$t('CurrentStatusOfTheProject')"> <a-tab-pane :key="$t('regulatoryComplianceManagement')" :tab="$t('regulatoryComplianceManagement')">
<currentStatusOfTheProjectEcharts @currentStatus="currentStatus" <regulatoryCompliance @currentStatus="currentStatus"
:idList="idList" :idList="idList"
v-if="activeKey == $t('CurrentStatusOfTheProject')"/> v-if="activeKey == $t('regulatoryComplianceManagement')"/>
</a-tab-pane> </a-tab-pane>
<a-tab-pane :key="$t('DeliverableStatus')" :tab="$t('DeliverableStatus')"> <a-tab-pane :key="$t('certificationActivityManagement')" :tab="$t('certificationActivityManagement')">
<deliverableStatusEchart @currentStatus="currentStatus" :idList="idList" <certificationActivity @currentStatus="currentStatus" :idList="idList"
v-if="activeKey == $t('DeliverableStatus')"/> v-if="activeKey == $t('certificationActivityManagement')"/>
</a-tab-pane> </a-tab-pane>
<a-tab-pane :key="$t('CertificationProgress')" :tab="$t('CertificationProgress')"> <a-tab-pane :key="$t('parameterCollectionProgressManagement')" :tab="$t('parameterCollectionProgressManagement')">
<certificationProgressEchart @currentStatus="currentStatus" :idList="idList" <parameterCollectionProgress @currentStatus="currentStatus" :idList="[]"
v-if="activeKey == $t('CertificationProgress')"/> v-if="activeKey == $t('parameterCollectionProgressManagement')"/>
</a-tab-pane> </a-tab-pane>
<a-tab-pane :key="$t('Parametercollection')" :tab="$t('Parametercollection')"> <a-tab-pane :key="$t('nonConformance')" :tab="$t('nonConformance')">
<ParameterCollectionEchart @currentStatus="currentStatus" :idList="[]" <nonConformance @currentStatus="currentStatus" v-if="activeKey == $t('nonConformance')"/>
v-if="activeKey == $t('Parametercollection')"/>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<versionStatistics ref="versionStatisticsRef" @versionStatisticsForm="versionStatisticsForm"/>
</a-card> </a-card>
</template> </template>
<script> <script>
import currentStatusOfTheProjectEcharts from './currentStatusOfTheProjectEcharts' import regulatoryCompliance from './regulatoryCompliance'
import deliverableStatusEchart from './deliverableStatusEchart' import certificationActivity from './certificationActivity'
import ParameterCollectionEchart from './ParameterCollectionEchart' import parameterCollectionProgress from './parameterCollectionProgress'
import certificationProgressEchart from './certificationProgressEchart' import nonConformance from './nonConformance'
import versionStatistics from './versionStatistics'
import { getAction, postAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
export default { export default {
name: 'projectStatus', name: 'projectStatus',
components: { components: {
ParameterCollectionEchart, parameterCollectionProgress,
currentStatusOfTheProjectEcharts, regulatoryCompliance,
deliverableStatusEchart, certificationActivity,
certificationProgressEchart, nonConformance
versionStatistics
}, },
data() { data() {
return { return {
activeKey: this.$t('CurrentStatusOfTheProject'), activeKey: this.$t('regulatoryComplianceManagement'),
selectedRowKeys: [], selectedRowKeys: [],
idList: [] idList: []
} }
}, },
methods: { methods: {
activeKeyChange(){
this.$emit('projectStatusForm',this.activeKey)
},
currentStatus(item) { currentStatus(item) {
this.$emit('TaskListChange', item) this.$emit('TaskListChange', item)
}, },
@@ -85,4 +84,7 @@
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
::v-deep .ant-card-body{
padding: 0 0 24px 0 ;
}
</style> </style>
@@ -0,0 +1,370 @@
<template>
<div class="box-content">
<div class="box-content-top">
<div id="main-top"></div>
</div>
<div class="box-content-left">
<div id="main-left"></div>
</div>
<div class="box-content-right">
<div id="main-right">
</div>
</div>
<responsibilityList @responsibility="responsibility" ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'regulatoryCompliance',
components: {
responsibilityList
},
props: {
idList: {
type: Array,
default: []
}
},
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
return {
loading: false,
url: {
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
},
columns: [
{
title: this.$t('red'),
align: 'left',
dataIndex: 'redCount',
width: 139
},
{
title: this.$t('yellow'),
align: 'left',
dataIndex: 'yellowCount',
width: 139
},
{
title: this.$t('green'),
align: 'left',
dataIndex: 'greenCount',
width: 139
},
{
title: this.$t('blue'),
align: 'left',
dataIndex: 'blueCount',
width: 139
}
]
}
},
mounted() {
this.getData()
},
methods: {
getData() {
let id = ''
if (this.idList && this.idList.length > 0) {
id = this.idList.join(',')
} else {
id = this.$route.query.id
}
getAction(this.url.getProjectDetailsStatistics, { id: id }).then((res) => {
if (res.success) {
if (res.result) {
let mainTopDataSource = res.result.taskToConfirmMap ? res.result.taskToConfirmMap.taskToConfirmMapList : []
let mainLeftDataSource = res.result.designComplianceMap ? res.result.designComplianceMap.designComplianceMapList : []
let mainRightDataSource = res.result.verifyComplianceMap ? res.result.verifyComplianceMap.verifyComplianceMapList : []
this.mainTopEcharts(mainTopDataSource)
this.mainLeftEcharts(mainLeftDataSource)
this.mainRightEcharts(mainRightDataSource)
}
}
})
},
getEcharts(chart, title, color, data) {
var myChart = echarts.init(document.getElementById(chart))
myChart.setOption({
title: {
text: title
},
tooltip: {
trigger: 'item',
textStyle : {
fontWeight : 'normal',
fontSize : 14,
color:'#040B29',
fontFamily:'BlueSkyNoto',
},
formatter: function (parms) {
let str = parms.marker+' '+parms.data.name+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+parms.data.value+' ('+parms.percent+'%)'
return str
}
},
legend: {
itemWidth: 12,
itemHeight: 12,
bottom: '0',
left: 'center',
itemGap: 30,
icon: 'circle'
},
series: [
{
name: title,
type: 'pie',
radius: ['40%', '54%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
color: color,
data: data
}
]
})
myChart.on('click', (params) => {
let query = {}
if (params.seriesName == this.$t('regulatoryTaskConfirmation')){
query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id,
operatorType: 'queryFGTaskToConfirmStatistics',
status:params.data.status
}
}else if(params.seriesName == this.$t('designCompliance')){
query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id,
operatorType: 'queryDesignStatistics',
status:params.data.status
}
}else if(params.seriesName == this.$t('verifyCompliance')){
query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id,
operatorType: 'queryVerifyStatistics',
status:params.data.status
}
}
this.$refs.responsibilityListRef.getData(query)
})
},
mainTopEcharts(dataSource) {
let data = []
let color = []
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.taskAffirmStatus == 'Not started') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('notLaunch'),
color: '#00B3BE',
status: res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
color: '#FDA71C',
status: res.taskAffirmStatus
})
color.push('#FDA71C')
} else if (res.taskAffirmStatus == 'Accepted') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('accept'),
color: '#26BC4B',
status: res.taskAffirmStatus
})
color.push('#26BC4B')
} else if (res.taskAffirmStatus == 'Rejected') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('refuse'),
color: '#E83030',
status: res.taskAffirmStatus
})
color.push('#E83030')
}
})
}
this.getEcharts('main-top', this.$t('regulatoryTaskConfirmation'), color, data)
},
mainLeftEcharts(dataSource){
let data = []
let color = []
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.designFlowTaskStatus == 'Not started') {
data.push({
value: res.designFlowTaskStatusCount,
name: this.$t('notLaunch'),
color: '#00B3BE',
status:res.designFlowTaskStatus
})
color.push('#00B3BE')
} else if (res.designFlowTaskStatus == 'List to confirm') {
data.push({
value: res.designFlowTaskStatusCount,
name: this.$t('listToConfirm'),
color: '#FDA71C',
status:res.designFlowTaskStatus
})
color.push('#FDA71C')
} else if (res.designFlowTaskStatus == 'Compliance') {
data.push({
value: res.designFlowTaskStatusCount,
name: this.$t('compliance'),
color: '#26BC4B',
status:res.designFlowTaskStatus
})
color.push('#26BC4B')
} else if (res.designFlowTaskStatus == 'Non-Compliance') {
data.push({
value: res.designFlowTaskStatusCount,
name: this.$t('nonCompliance'),
color: '#707486',
status:res.designFlowTaskStatus
})
color.push('#707486')
}
})
}
this.getEcharts('main-left', this.$t('designCompliance'), color, data)
},
mainRightEcharts(dataSource){
let data = []
let color = []
if (dataSource && dataSource.length > 0) {
this.dataSource = [{}]
dataSource.forEach(res => {
if (res.verifyFlowTaskStatus == 'Not started') {
data.push({
value: res.verifyFlowTaskStatusCount,
name: this.$t('notLaunch'),
color: '#00B3BE',
status:res.verifyFlowTaskStatus
})
color.push('#00B3BE')
} else if (res.verifyFlowTaskStatus == 'List to confirm') {
data.push({
value: res.verifyFlowTaskStatusCount,
name: this.$t('listToConfirm'),
color: '#FDA71C',
status:res.verifyFlowTaskStatus
})
color.push('#FDA71C')
} else if (res.verifyFlowTaskStatus == 'Compliance') {
data.push({
value: res.verifyFlowTaskStatusCount,
name: this.$t('compliance'),
color: '#26BC4B',
status:res.verifyFlowTaskStatus
})
color.push('#26BC4B')
} else if (res.verifyFlowTaskStatus == 'Non-Compliance') {
data.push({
value: res.verifyFlowTaskStatusCount,
name: this.$t('nonCompliance'),
color: '#707486',
status:res.verifyFlowTaskStatus
})
color.push('#707486')
}
})
}
this.getEcharts('main-right', this.$t('verifyCompliance'), color, data)
},
responsibility(item) {
console.log(item)
this.$emit('currentStatus', item)
}
}
}
</script>
<style scoped lang="less">
.box-content {
width: 100%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.box-content-top {
width: 100%;
margin-top: 4px;
height: 346px;
border: 2px #eff1f3 solid;
border-radius: 6px;
#main-top {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
.box-content-left {
width: calc(50% - 10px);
margin-top: 20px;
height: 346px;
border: 2px #eff1f3 solid;
border-radius: 6px;
#main-left {
width: 100%;
height: 100%;
padding: 20px 24px;
box-sizing: border-box;
}
}
.box-content-right {
width: calc(50% - 10px);
margin-top: 20px;
height: 346px;
border-radius: 6px;
border: 2px #eff1f3 solid;
#main-right {
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
}
}
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
position: absolute;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
@@ -1,37 +1,38 @@
<template> <template>
<a-modal <a-modal
:title="title" :title="title"
:width="800" :width="800"
:visible="visible" :visible="visible"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
:maskClosable="false" :maskClosable="false"
@cancel="visible = false" @cancel="visible = false"
>
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<div style="text-align: right;margin-bottom: 10px">
<div @click="handleExport" class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
</div>
<a-table
ref="table"
:components="drag(columns,'columns')"
:loading="loading"
:pagination="false"
:scroll="{x: true,y:400}"
:data-source="dataSource"
:columns="columns"
> >
<a slot="areaOfResponsibility" slot-scope="text,result" @click="areaOfResponsibilityClick(result)"> <template slot="footer">
{{text}} <a-button key="back" @click="visible = false">
</a> {{$t('cancel')}}
</a-table> </a-button>
</a-modal> </template>
<div style="text-align: right;margin-bottom: 10px">
<div @click="handleExport" class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
</div>
<a-table
ref="table"
:components="drag(columns,'columns')"
:loading="loading"
:pagination="false"
:scroll="{x: true,y:400}"
:data-source="dataSource"
:columns="columns"
>
<!-- @click="areaOfResponsibilityClick(result)"-->
<span slot="areaOfResponsibility" slot-scope="text,result">
{{text}}
</span>
</a-table>
</a-modal>
</template> </template>
<script> <script>
@@ -41,7 +42,7 @@
export default { export default {
name: 'responsibilityList', name: 'responsibilityList',
mixins:[ResizeHeader, ResizeColumnProvide], mixins: [ResizeHeader, ResizeColumnProvide],
data() { data() {
return { return {
visible: false, visible: false,
@@ -59,7 +60,7 @@
title: this.$t('areaOfResponsibility'), title: this.$t('areaOfResponsibility'),
dataIndex: 'dutyTerritoryName', dataIndex: 'dutyTerritoryName',
align: 'left', align: 'left',
width: 100, width: 150,
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'areaOfResponsibility' } scopedSlots: { customRender: 'areaOfResponsibility' }
}, },
@@ -68,7 +69,14 @@
dataIndex: 'amount', dataIndex: 'amount',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 300 width: 150
},
{
title: this.$t('proportion'),
dataIndex: 'percentage',
align: 'left',
ellipsis: true,
width: 150
} }
] ]
} }
@@ -100,12 +108,14 @@
handleCancel() { handleCancel() {
this.visible = false this.visible = false
}, },
areaOfResponsibilityClick(item) { // areaOfResponsibilityClick(item) {
if (this.queryParam.operatorType == 'queryListingToConfirmStatistics' || this.queryParam.operatorType == 'queryTaskToConfirmStatistics'){ // if (this.queryParam.operatorType == 'queryFGTaskToConfirmStatistics' ||
item.isListing = '1' // this.queryParam.operatorType == 'queryDesignStatistics' ||
} // this.queryParam.operatorType == 'queryVerifyStatistics') {
// this.$emit('responsibility', item) // item.isListing = '1'
} // }
// this.$emit('responsibility', item)
// }
} }
} }
</script> </script>
@@ -1,172 +1,322 @@
<template> <template>
<a-modal <a-drawer
:title="$t('setting')" :title="$t('setting')"
:width="1100"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false" :maskClosable="false"
@ok="handleOk" :width="1000"
@cancel="handleCancel" placement="right"
> :closable="true"
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> @close="handleCancel"
<a-row :gutter="24"> :visible="visible"
<a-col :span="12"> style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div class="box-title-text"> <a-spin :spinning="confirmLoading">
<div class="title-text"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<!-- <span class="Required">*</span>--> <a-row :gutter="24">
<span class="title-text-text" :title="$t('listPublishing')"> <a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('listPublishing')">
{{$t('listPublishing')}}</span> {{$t('listPublishing')}}</span>
</div>
<a-form-model-item class="itemModel" prop="listConfirmation">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('listPublishing')+$t('time')"
@change="dateChange({db_field_name:'listConfirmation'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.listConfirmation"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="listConfirmation"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:placeholder="$t('PleaseSelect')+$t('listPublishing')+$t('time')" <div class="box-title-text">
@change="dateChange({db_field_name:'listConfirmation'})" <div class="title-text">
format="YYYY-MM-DD" <!-- <span class="Required">*</span>-->
:getCalendarContainer="(trigger) => trigger.parentNode" <span class="title-text-text" :title="$t('responsibilityConfirmation')">
v-model="formInline.listConfirmation"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('responsibilityConfirmation')">
{{$t('responsibilityConfirmation')}}</span> {{$t('responsibilityConfirmation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="legalTaskConfirmation">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('responsibilityConfirmation')+$t('time')"
@change="dateChange({db_field_name:'legalTaskConfirmation'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.legalTaskConfirmation"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="legalTaskConfirmation"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:placeholder="$t('PleaseSelect')+$t('responsibilityConfirmation')+$t('time')" <div class="box-title-text">
@change="dateChange({db_field_name:'legalTaskConfirmation'})" <div class="title-text">
format="YYYY-MM-DD" <!-- <span class="Required">*</span>-->
:getCalendarContainer="(trigger) => trigger.parentNode" <span class="title-text-text" :title="$t('designVerification')">
v-model="formInline.legalTaskConfirmation"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('designVerification')">
{{$t('designVerification')}}</span> {{$t('designVerification')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDeadline">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('designVerification')+$t('time')"
@change="dateChange({db_field_name:'designDeadline'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.designDeadline"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="designDeadline"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:placeholder="$t('PleaseSelect')+$t('designVerification')+$t('time')" <div class="box-title-text">
@change="dateChange({db_field_name:'designDeadline'})" <div class="title-text">
format="YYYY-MM-DD" <!-- <span class="Required">*</span>-->
:getCalendarContainer="(trigger) => trigger.parentNode" <span class="title-text-text" :title="$t('getStarted')">
v-model="formInline.designDeadline"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('getStarted')">
{{$t('getStarted')}}</span> {{$t('getStarted')}}</span>
</div>
<a-form-model-item class="itemModel" prop="prehomoDeadline">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('getStarted')+$t('time')"
@change="dateChange({db_field_name:'prehomoDeadline'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.prehomoDeadline"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="prehomoDeadline"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:placeholder="$t('PleaseSelect')+$t('getStarted')+$t('time')" <div class="box-title-text">
@change="dateChange({db_field_name:'prehomoDeadline'})" <div class="title-text">
format="YYYY-MM-DD" <!-- <span class="Required">*</span>-->
:getCalendarContainer="(trigger) => trigger.parentNode" <span class="title-text-text" :title="$t('certificationStartOne')">
v-model="formInline.prehomoDeadline"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('certificationStartOne')">
{{$t('certificationStartOne')}}</span> {{$t('certificationStartOne')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationStartTime">
<a-date-picker class="box-input"
:disabledDate='this.disabledRegistrationStartDate'
:placeholder="$t('PleaseSelect')+$t('certificationStartOne')+$t('time')"
@change="dateChange({db_field_name:'attestationStartTime'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.attestationStartTime"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="attestationStartTime"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:disabledDate='this.disabledRegistrationStartDate' <div class="box-title-text">
:placeholder="$t('PleaseSelect')+$t('certificationStartOne')+$t('time')" <div class="title-text">
@change="dateChange({db_field_name:'attestationStartTime'})" <!-- <span class="Required">*</span>-->
format="YYYY-MM-DD" <span class="title-text-text" :title="$t('certificationSubmission')">
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.attestationStartTime"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('certificationSubmission')">
{{$t('certificationSubmission')}}</span> {{$t('certificationSubmission')}}</span>
</div>
<a-form-model-item class="itemModel" prop="certificationSubmission">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('certificationSubmission')+$t('time')"
@change="dateChange({db_field_name:'certificationSubmission'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.certificationSubmission"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="certificationSubmission"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:placeholder="$t('PleaseSelect')+$t('certificationSubmission')+$t('time')" <div class="box-title-text">
@change="dateChange({db_field_name:'certificationSubmission'})" <div class="title-text">
format="YYYY-MM-DD" <!-- <span class="Required">*</span>-->
:getCalendarContainer="(trigger) => trigger.parentNode" <span class="title-text-text" :title="$t('certificationEnd')">
v-model="formInline.certificationSubmission"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('certificationEnd')">
{{$t('certificationEnd')}}</span> {{$t('certificationEnd')}}</span>
</div>
<a-form-model-item class="itemModel" prop="attestationEndTime">
<a-date-picker class="box-input"
:disabledDate='this.disabledRegistrationEndDate'
:placeholder="$t('PleaseSelect')+$t('certificationEnd')+$t('time')"
@change="dateChange({db_field_name:'attestationEndTime'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.attestationEndTime"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="attestationEndTime"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:disabledDate='this.disabledRegistrationEndDate' <div class="box-title-text">
:placeholder="$t('PleaseSelect')+$t('certificationEnd')+$t('time')" <div class="title-text">
@change="dateChange({db_field_name:'attestationEndTime'})" <!-- <span class="Required">*</span>-->
format="YYYY-MM-DD" <span class="title-text-text" :title="$t('verificationAndVerification')">
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.attestationEndTime"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('verificationAndVerification')">
{{$t('verificationAndVerification')}}</span> {{$t('verificationAndVerification')}}</span>
</div>
<a-form-model-item class="itemModel" prop="verifyDeadline">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('verificationAndVerification')+$t('time')"
@change="dateChange({db_field_name:'verifyDeadline'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.verifyDeadline"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="verifyDeadline"> </a-col>
<a-date-picker class="box-input" <a-col :span="12">
:placeholder="$t('PleaseSelect')+$t('verificationAndVerification')+$t('time')" <div class="box-title-text">
@change="dateChange({db_field_name:'verifyDeadline'})" <div class="title-text">
format="YYYY-MM-DD" <span class="title-text-text" title="G0">
:getCalendarContainer="(trigger) => trigger.parentNode" G0</span>
v-model="formInline.verifyDeadline" </div>
:disabled="false" <a-form-model-item class="itemModel" prop="zero">
style="width: 100%"/> <a-date-picker class="box-input"
</a-form-model-item> :placeholder="$t('PleaseSelect')+'G0'"
</div> @change="dateChange({db_field_name:'zero'})"
</a-col> format="YYYY-MM-DD"
</a-row> :getCalendarContainer="(trigger) => trigger.parentNode"
</a-form-model> v-model="formInline.zero"
</a-modal> :disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="G1">
G1</span>
</div>
<a-form-model-item class="itemModel" prop="one">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+'G1'"
@change="dateChange({db_field_name:'one'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.one"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="G2">
G2</span>
</div>
<a-form-model-item class="itemModel" prop="two">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+'G2'"
@change="dateChange({db_field_name:'two'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.two"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="G3">
G3</span>
</div>
<a-form-model-item class="itemModel" prop="three">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+'G3'"
@change="dateChange({db_field_name:'three'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.three"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="G4">
G4</span>
</div>
<a-form-model-item class="itemModel" prop="four">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+'G4'"
@change="dateChange({db_field_name:'four'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.four"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="G5">
G5</span>
</div>
<a-form-model-item class="itemModel" prop="five">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+'G5'"
@change="dateChange({db_field_name:'five'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.five"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="G6">
G6</span>
</div>
<a-form-model-item class="itemModel" prop="six">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+'G6'"
@change="dateChange({db_field_name:'six'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.six"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" title="G7">
G7</span>
</div>
<a-form-model-item class="itemModel" prop="seven">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+'G7'"
@change="dateChange({db_field_name:'seven'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.seven"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleOk" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
</template> </template>
<script> <script>
@@ -366,7 +516,7 @@
} }
.title-text { .title-text {
width: 144px; width: 106px;
text-align: right; text-align: right;
display: inline-block; display: inline-block;
font-weight: 500; font-weight: 500;
@@ -403,4 +553,17 @@
color: red; color: red;
margin-right: 3px; margin-right: 3px;
} }
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
z-index: 100;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style> </style>
@@ -34,7 +34,7 @@
:components="drag(columns,'columns')" :components="drag(columns,'columns')"
:columns="columns" :columns="columns"
:rowKey="(record)=>JSON.stringify(record)" :rowKey="(record)=>JSON.stringify(record)"
:scroll="{x: '100%',y:500}" :scroll="{x: '100%',y:'calc(100vh - 280px)'}"
:data-source="dataList" :data-source="dataList"
:pagination="false" :pagination="false"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,201 @@
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('upgradeOrNot')">{{$t('upgradeOrNot')}}</span>
</div>
<a-form-model-item class="itemModel" prop="upgradeOrNot">
<a-radio-group v-model="formInline.upgradeOrNot" @change="onChange">
<a-radio :value="1">
</a-radio>
<a-radio :value="0">
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24" v-if="isTrue">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('VersionNumber')">{{$t('VersionNumber')}}</span>
</div>
<a-form-model-item class="itemModel" prop="versionNum">
<a-input class="box-input"
v-model.trim="formInline.versionNum"
:placeholder="$t('PleaseEnter')+$t('VersionNumber')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24" v-if="isTrue">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('upgradeInstructions')">{{$t('upgradeInstructions')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'upgradeExplanation'">
<a-textarea
style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('upgradeInstructions')"
v-model.trim="formInline.upgradeExplanation" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'releaseForm',
data() {
return {
formInline: {},
selectionRowsId: '',
isTrue: false,
rules: {
upgradeOrNot: [
{
required: true,
message: this.$t('upgradeOrNot') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
versionNum: [
{
required: true,
message: this.$t('VersionNumber') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('VersionNumber') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
upgradeExplanation: [
{
required: true,
message: this.$t('upgradeInstructions') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: this.$t('upgradeInstructions') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
},
title: '',
visible: false,
confirmLoading: false,
ids: '',
disabled: false
}
},
mounted() {
},
methods: {
getData(val) {
this.visible = true
this.isTrue = false
this.title = this.$t('release')
this.selectionRowsId = val
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
onChange(val) {
if (val.target.value == 1) {
this.isTrue = true
} else {
this.isTrue = false
this.formInline.versionNum = ''
this.formInline.upgradeExplanation = ''
}
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.confirmLoading = true
this.$emit('releaseFormData', this.selectionRowsId, this.formInline)
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 150px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
/deep/ .remarkbox .ant-form-item-control {
width: 128%;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>
@@ -42,7 +42,7 @@
{{$t('BatchDelete')}} {{$t('BatchDelete')}}
</div> </div>
</div> </div>
<!-- :components="drag(columns,'columns')"--> <!-- :components="drag(columns,'columns')"-->
<a-table <a-table
ref="table" ref="table"
size="middle" size="middle"
@@ -123,6 +123,20 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="24">
<div class="box-title-text-add">
<div class="title-text-add">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('VersionNumber')">{{$t('VersionNumber')}}</span>
</div>
<a-form-model-item class="itemModel" prop="versionNum">
<a-input class="box-input-add"
v-model.trim="formInline.versionNum"
:placeholder="$t('PleaseEnter')+$t('VersionNumber')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text-add"> <div class="box-title-text-add">
<div class="title-text-add"> <div class="title-text-add">
@@ -144,11 +158,13 @@
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
<releaseForm ref="releaseFormRef" @releaseFormData="releaseFormData"/>
</a-card> </a-card>
</template> </template>
<script> <script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import releaseForm from './components/releaseForm'
import VueDraggableResizable from 'vue-draggable-resizable' import VueDraggableResizable from 'vue-draggable-resizable'
import tableDragResize from '@/mixins/tableDragResize' import tableDragResize from '@/mixins/tableDragResize'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@@ -157,7 +173,8 @@
export default { export default {
name: 'index', name: 'index',
components: { components: {
VueDraggableResizable VueDraggableResizable,
releaseForm
}, },
mixins: [tableDragResize, ResizeHeader, ResizeColumnProvide], mixins: [tableDragResize, ResizeHeader, ResizeColumnProvide],
data() { data() {
@@ -176,6 +193,18 @@
trigger: 'blur' trigger: 'blur'
} }
], ],
versionNum: [
{
required: true,
message: this.$t('VersionNumber') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('VersionNumber') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
useExplain: [ useExplain: [
{ {
required: true, required: true,
@@ -219,17 +248,24 @@
ellipsis: true, ellipsis: true,
scopedSlots: { customRender: 'CertificationListName' } scopedSlots: { customRender: 'CertificationListName' }
}, },
{
title: this.$t('VersionNumber'),
align: 'left',
width: '10%',
ellipsis: true,
dataIndex: 'versionNum'
},
{ {
title: this.$t('listStatus'), title: this.$t('listStatus'),
align: 'left', align: 'left',
width: '20%', width: '15%',
ellipsis: true, ellipsis: true,
dataIndex: 'state_dictText' dataIndex: 'state_dictText'
}, },
{ {
title: this.$t('creater'), title: this.$t('creater'),
align: 'left', align: 'left',
width: '20%', width: '15%',
ellipsis: true, ellipsis: true,
dataIndex: 'createBy' dataIndex: 'createBy'
}, },
@@ -291,7 +327,7 @@
idList.push(selectedRowKeys[i].id) idList.push(selectedRowKeys[i].id)
} }
} }
if (isTrue){ if (isTrue) {
this.$confirm({ this.$confirm({
content: _this.$t('ConfirmBatchDeletion'), content: _this.$t('ConfirmBatchDeletion'),
onOk() { onOk() {
@@ -306,8 +342,8 @@
}) })
} }
}) })
}else{ } else {
this.$message.warning(this.$t('onlyDataWithListStatusDraftCanBeDeleted')) this.$message.warning(this.$t('onlyDataWithListStatusDraftCanBeDeleted'))
} }
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
@@ -335,17 +371,40 @@
} }
item.id = val.id item.id = val.id
let _this = this let _this = this
this.$confirm({ if (item.state == 1) {
content: content, this.$refs.releaseFormRef.getData(val.id)
onOk() { } else {
postAction(_this.url.urlWithdraw, item).then((res) => { this.$confirm({
if (res.success) { content: content,
_this.$message.success(_this.$t('OperationSuccessful')) onOk() {
_this.getList() postAction(_this.url.urlWithdraw, item).then((res) => {
} else { if (res.success) {
_this.$message.warning(res.message) _this.$message.success(_this.$t('OperationSuccessful'))
} _this.getList()
}) } else {
_this.$message.warning(res.message)
}
})
}
})
}
},
releaseFormData(id, val) {
let _this = this
let item = {
state: 1,
id: id,
...val
}
postAction(_this.url.urlWithdraw, item).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.$refs.releaseFormRef.confirmLoading = false
_this.$refs.releaseFormRef.visible = false
} else {
_this.$message.warning(res.message)
_this.$refs.releaseFormRef.confirmLoading = false
} }
}) })
}, },
@@ -244,7 +244,7 @@
</a-card> </a-card>
</div> </div>
</div> </div>
<UpdateLog :url="url" ref="UpdateLogRef"/> <UpdateLog :url="url" :isVersion="true" ref="UpdateLogRef"/>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/> <transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/> <addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model> <edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
@@ -299,7 +299,8 @@
editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑 editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑
setBatch: '/authDummy/authDummyInventoryInfoEO/setBatch',//批量设置 setBatch: '/authDummy/authDummyInventoryInfoEO/setBatch',//批量设置
importZipUrl: '/authDummy/authDummyInventoryInfoEO/importData',//导入 importZipUrl: '/authDummy/authDummyInventoryInfoEO/importData',//导入
number: '/project/projectLawsInventoryEO/list' number: '/project/projectLawsInventoryEO/list',
versionList:'/log/marketListVersionUpdateLogEO/page',
}, },
queryParam: {}, queryParam: {},
orderByField: '', orderByField: '',
@@ -416,7 +417,8 @@
this.toggleSearchStatus = !this.toggleSearchStatus this.toggleSearchStatus = !this.toggleSearchStatus
}, },
UpdateLogClick() { UpdateLogClick() {
this.$refs.UpdateLogRef.getList({ authDummyInventoryBaseId: this.$route.query.id }) this.$refs.UpdateLogRef.getList({ authDummyInventoryBaseId: this.$route.query.id },
{listId:this.$route.query.id,listType:'Market Certification List'})
}, },
//搜索 //搜索
searchQuery() { searchQuery() {