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
@@ -84,4 +84,16 @@ public class AuthDummyInventoryBaseEO implements Serializable {
/**订阅标识*/
@TableField(exist = false)
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.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.authDummy.entity.AuthDummyContentChangeEO;
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.entity.*;
import com.jero.modules.authDummy.mapper.AuthDummyInventoryBaseEOMapper;
import com.jero.modules.authDummy.service.IAuthDummyContentChangeEOService;
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.authDummy.service.*;
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
import com.jero.modules.dummy.entity.DummyContentChangeEO;
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.enums.InventoryStateEnum;
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.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.service.ISysAnnouncementService;
import com.jero.modules.system.service.ISysUserService;
@@ -43,10 +42,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -94,6 +90,11 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
@Resource
private IFeishuService iFeishuService;
@Autowired
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
@Autowired
private IAuthDummyLogService authDummyLogService;
/**
* 保存
*
@@ -142,6 +143,35 @@ public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyIn
@Override
public void deleteByIds(List<String> 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())
.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());
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<>();
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> thirdIdList = new ArrayList<>();
List<String> userIdList = new ArrayList<>();
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());
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=维护虚拟清单";
try {
String contentInfoFeiCn = "您所订阅的"+baseEO.getName()+"虚拟认证清单已更新,更新内容如下:";
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
feishuMsgVo.setUrl(href);
feishuMsgVo.setContentEn(contentLogFeishuTemp);
feishuMsgVo.setContent(contentInfoFeiCn);
iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}),feishuMsgVo,serialNumberAddList,serialNumberDeleteList);
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
// feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
// feishuMsgVo.setUrl(href);
// feishuMsgVo.setContentEn(contentLogFeishuTemp);
// feishuMsgVo.setContent(contentInfoFeiCn);
//
// iFeishuService.sendCardMsgVirtua(thirdIdList.toArray(new String[]{}),feishuMsgVo,serialNumberAddList,serialNumberDeleteList);
// 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();
}
}
@@ -35,4 +35,6 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper<ParamsCollectM
IPage selectpage(@Param("page") IPage page, @Param("sqlJoin") String sqlJoin, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO);
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 * from params_collect_manifest pcm LEFT JOIN params_manifest pm ON pm.id = pcm.params_manifest_id WHERE pm.project_id = #{projectId}
</select>
<select id="getList" resultType="com.jero.modules.cert.collect.entity.ParamsCollectManifestEO">
SELECT id,params_manifest_id,state FROM params_collect_manifest
</select>
</mapper>
@@ -200,4 +200,6 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
// 认证工程师-批量编辑截止时间
Result<?> batchEditDeadline(ParamsCollectManifestVO paramsCollectManifestVO);
List<ParamsCollectManifestEO> getList(Map<String,Object> params);
}
@@ -7256,4 +7256,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
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)) {
//字段类型(判断是输入框还是下拉,等等)
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 '/'
if (value.contains("%")) {
value = value.replace("%", "/%");
@@ -95,4 +95,15 @@ public class DummyInventoryBaseEO implements Serializable {
@TableField(exist = false)
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.jero.common.constant.enums.CutEnum;
import com.jero.common.constant.enums.MessageTypeEnum;
import com.jero.common.constant.enums.YesOrNoEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser;
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.feishu.enums.TemplateInfoEnum2;
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.service.IOSSFileService;
import com.jero.modules.system.entity.SysAnnouncement;
@@ -105,6 +109,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
private DummyLogEOServiceImpl dummyLogEOService;
@Autowired
private DummyInventoryBaseEOMapper dummyInventoryBaseEOMapper;
@Autowired
private IMarketListVersionUpdateLogEOService marketListVersionUpdateLogEOService;
/**
* 保存
@@ -227,6 +233,17 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
QueryWrapper<DummyLogEO> logEOQueryWrapper = new QueryWrapper<>();
logEOQueryWrapper.in("dummy_inventory_base_id",ids);
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())
.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());
dummyInventoryBaseEOMapper.update(null,baseWrapper);
// this.updateById(dummyInventoryBaseEO);
@@ -361,7 +392,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
//先判断是发布还是撤回 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<>();
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);
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);
}
// 导出项目进度统计(状态导出)
@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.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -81,6 +83,11 @@ public class ProjectStatusBoardController {
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.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
@@ -70,8 +71,12 @@ public class ProjectTaskPlanningController extends JeroController<ProjectTaskPla
@ApiOperation(value="法规,认证任务计划 (各阶段确认进度) 表-列表查询", notes="法规,认证任务计划 (各阶段确认进度) 表-列表查询")
@GetMapping(value = "/list")
public Result<ProjectTaskPlanning> queryList(@RequestParam(name="projectId",required=true) String projectId) {
ProjectTaskPlanning result = new ProjectTaskPlanning();
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")
@ApiModelProperty(value = "验证符合性确认-责任确认截止时间")
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)
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_VERIFY_STATISTICS("查询验证符合性统计","queryVerifyStatistics"),
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"),
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
// ATTESTATION_START_TIME("认证试验结束","Homo Completion"),// name:认证开始 value:Certification begins
ATTESTATION_END_TIME("认证批准","Homo KO"),// name:认证结束 value:End of certification
// VERIFY_DEADLINE("验证符合性确认","Validation Compliance Confirmation"),
LIST_CONFIRMATION("清单发布","List Publishing"),
LEGAL_TASK_CONFIRMATION("责任确认","Responsibility Confirmation"),
@@ -19,7 +18,16 @@ public enum ProjectTaskPlanningNameEnum {
ATTESTATION_START_TIME("认证开始","Certification Start"),// name:认证开始 value:Certification begins
VERIFY_DEADLINE("验证核查","Verification And Verification"),
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 value;
@@ -3,6 +3,7 @@ package com.jero.modules.project.mapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -44,4 +45,6 @@ public interface ProjectLawsInventoryEOMapper extends BaseMapper<ProjectLawsInve
* @return
*/
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}
group by duty_territory;
</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>
@@ -11,6 +11,15 @@
<result column="attestation_start_time" property="attestationStartTime" />
<result column="attestation_end_time" property="attestationEndTime" />
<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>
@@ -254,4 +254,60 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
void certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
void certificationInventoryEOListSortByTaskConfirmEndTimeAsc(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
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.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itextpdf.text.DocumentException;
import com.jero.common.api.vo.Result;
@@ -257,4 +258,50 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
Result<?> compulsoryTransfer(JSONObject json);
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
*/
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 javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -31,4 +32,12 @@ public interface IProjectStatusBoardService {
* @param 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 java.io.*;
import java.text.Collator;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.text.*;
import java.util.*;
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)
public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<ProjectCertificationInventoryEOMapper, ProjectCertificationInventoryEO> implements IProjectCertificationInventoryEOService {
private static DecimalFormat df = new DecimalFormat("#.00");
private static String percentSign = "%";
@Autowired
private ISysUserService sysUserService;
@Autowired
@@ -795,6 +795,21 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
pciEo.setFlowStatus(flowStatus);
});
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("批量更新状态成功!");
@@ -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
public Result<?> saveBatch(JSONObject json) {
Date now = new Date();
@@ -5278,6 +5603,258 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
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
public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) {
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.QueryWrapper;
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.itextpdf.text.Font;
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.service.IProcessInfoDetailEOService;
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.enums.DesignComplianceNodeEnum;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
@@ -122,10 +125,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.text.Collator;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.text.*;
import java.util.List;
import java.util.*;
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)
public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsInventoryEOMapper, ProjectLawsInventoryEO> implements IProjectLawsInventoryEOService {
private static DecimalFormat df = new DecimalFormat("#.00");
private static String percentSign = "%";
@Autowired
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
@@ -12413,6 +12415,395 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
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
public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) {
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;
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.QueryWrapper;
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.vo.DictModel;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.ConditionAssessmentEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.common.util.DateUtils;
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
import com.jero.modules.cert.collect.entity.ParamsManifestEO;
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.mapper.ProjectUserPermissionMapper;
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.vo.TimeNodeVO;
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.service.IProjectUserBrandService;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import lombok.SneakyThrows;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
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.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
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.util.*;
import java.util.stream.Collectors;
@@ -39,6 +58,8 @@ import java.util.stream.Collectors;
*/
@Service
public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService {
private static DecimalFormat df = new DecimalFormat("#.00");
private static String percentSign = "%";
@Autowired
private ProjectTaskPlanningServiceImpl projectTaskPlanningService;
@Autowired
@@ -59,6 +80,14 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
private IProjectUserBrandService projectUserBrandService;
@Autowired
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.setProjectId(projectTaskPlanning.getProjectId());
listConfirmationVO.setG(false);
timeNodeVOS.add(listConfirmationVO);
}
@@ -157,6 +158,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
legalTaskConfirmationVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
legalTaskConfirmationVO.setProjectId(projectTaskPlanning.getProjectId());
legalTaskConfirmationVO.setG(false);
timeNodeVOS.add(legalTaskConfirmationVO);
}
@@ -179,6 +181,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
designDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
designDeadlineVO.setProjectId(projectTaskPlanning.getProjectId());
designDeadlineVO.setG(false);
timeNodeVOS.add(designDeadlineVO);
}
@@ -201,6 +204,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
prehomoDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
prehomoDeadlineVO.setProjectId(projectTaskPlanning.getProjectId());
prehomoDeadlineVO.setG(false);
timeNodeVOS.add(prehomoDeadlineVO);
}
@@ -223,6 +227,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
attestationStartTimeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
attestationStartTimeVO.setProjectId(projectTaskPlanning.getProjectId());
attestationStartTimeVO.setG(false);
timeNodeVOS.add(attestationStartTimeVO);
}
@@ -245,6 +250,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
attestationEndTimeVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
attestationEndTimeVO.setProjectId(projectTaskPlanning.getProjectId());
attestationEndTimeVO.setG(false);
timeNodeVOS.add(attestationEndTimeVO);
}
@@ -267,6 +273,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
verifyDeadlineVO.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
verifyDeadlineVO.setProjectId(projectTaskPlanning.getProjectId());
verifyDeadlineVO.setG(false);
timeNodeVOS.add(verifyDeadlineVO);
}
//认证提交
@@ -288,9 +295,164 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
certificationSubmissionVo.setStatus(PlanStatusEnum.ON_GOING.getValue());
}
certificationSubmissionVo.setProjectId(projectTaskPlanning.getProjectId());
certificationSubmissionVo.setG(false);
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);
timeNodeVOS = timeNodeVOS.stream()
@@ -11,6 +11,7 @@ public class TimeNodeVO implements Comparator<TimeNodeVO> {
private Date time;
private String status;
private String projectId;
private boolean isG; // 是否是G0 - G8
@Override
public int compare(TimeNodeVO o1, TimeNodeVO o2) {