Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
@@ -836,3 +836,36 @@ ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||
MODIFY COLUMN `buss_document_library_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id' AFTER `target_market`,
|
||||
MODIFY COLUMN `stand_number` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准编号' AFTER `buss_document_library_id`,
|
||||
MODIFY COLUMN `stand_title` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准标题' AFTER `stand_number`;
|
||||
|
||||
-- 问题知识库 字段类型修改 2022-08-09
|
||||
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||
MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容(正文)' AFTER `stand_title`;
|
||||
|
||||
-- 国家与国旗关系表 2022-08-09
|
||||
CREATE TABLE `laws_weilai`.`country_national_flag` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`country_name_cn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国家名称中文',
|
||||
`country_name_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国家名称英文',
|
||||
`national_flag_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国旗文件id',
|
||||
`national_flag_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国旗url',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '国家与国旗中间表' ROW_FORMAT = Dynamic;
|
||||
-- 初始化数据 2022-08-10
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('1', NULL, NULL, NULL, NULL, NULL, '欧盟', 'EU', NULL, '/jero-boot/nationalFlag/EU.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('10', NULL, NULL, NULL, NULL, NULL, '美国', 'US', NULL, '/jero-boot/nationalFlag/US.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('11', NULL, NULL, NULL, NULL, NULL, '澳大利亚', 'Australia', NULL, '/jero-boot/nationalFlag/Australia.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('12', NULL, NULL, NULL, NULL, NULL, '新西兰', 'New Zealand', NULL, '/jero-boot/nationalFlag/NewZealand.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('13', NULL, NULL, NULL, NULL, NULL, '英国', 'UK', NULL, '/jero-boot/nationalFlag/UK.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('2', NULL, NULL, NULL, NULL, NULL, '中国', 'China', NULL, '/jero-boot/nationalFlag/China.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('3', NULL, NULL, NULL, NULL, NULL, '中国香港', 'Hong Kong China', NULL, '/jero-boot/nationalFlag/China.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('4', NULL, NULL, NULL, NULL, NULL, '韩国', 'South Korea', NULL, '/jero-boot/nationalFlag/SouthKorea.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('5', NULL, NULL, NULL, NULL, NULL, '日本', 'Japan', NULL, '/jero-boot/nationalFlag/Japan.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('6', NULL, NULL, NULL, NULL, NULL, '新加坡', 'Singapore', NULL, '/jero-boot/nationalFlag/Singapore.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('7', NULL, NULL, NULL, NULL, NULL, '马来西亚', 'Malaysia', NULL, '/jero-boot/nationalFlag/Malaysia.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('8', NULL, NULL, NULL, NULL, NULL, '海湾地区', 'GCC', NULL, '海湾地区.jpg');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('9', NULL, NULL, NULL, NULL, NULL, '阿联酋', 'UAE', NULL, '/jero-boot/nationalFlag/UAE.png');
|
||||
|
||||
@@ -726,16 +726,6 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
// 替换模板中的占位符
|
||||
try {
|
||||
//下载关联文件内容
|
||||
List<OSSFile> allRelevFileList = (List<OSSFile>) allParamsInfoList.get(2).get("fileListAll");
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
|
||||
// 拿取模板
|
||||
String repFileName = fileName.replaceAll("/","_");
|
||||
@@ -743,6 +733,35 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
if (CosBootUtil.doesObjectExist(templateUrl)) {
|
||||
InputStream wordTemplate = CosBootUtil.download(templateUrl);
|
||||
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(wordTemplate);
|
||||
|
||||
//下载关联文件内容
|
||||
List<Map<String, Object>> fileListAll = (List<Map<String, Object>>) allParamsInfoList.get(2).get("fileListAll");
|
||||
|
||||
if (fileListAll != null && !fileListAll.isEmpty()) {
|
||||
Map<String,String> paramsAfterFilter = WordUtil.filterParams(wordMLPackage, params);
|
||||
if (CollectionUtil.isNotEmpty(paramsAfterFilter)) {
|
||||
List<String> nioNumberList = paramsAfterFilter.keySet().stream().collect(Collectors.toList());
|
||||
List<OSSFile> allRelevFileList = new ArrayList<>();
|
||||
for (Map<String, Object> fileMap : fileListAll) {
|
||||
for (Map.Entry map : fileMap.entrySet()) {
|
||||
String key = (String) map.getKey();
|
||||
List<OSSFile> fileList = (List<OSSFile>) map.getValue();
|
||||
if (nioNumberList.contains(key)) {
|
||||
allRelevFileList.addAll(fileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(allRelevFileList)) {
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
|
||||
downLoadFileList(allRelevFileList, fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 替换占位符内容
|
||||
WordUtil.replacePictureBatch(wordMLPackage, imgListAll);
|
||||
WordUtil.replaceVariable(wordMLPackage, params);
|
||||
@@ -837,29 +856,47 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
// 替换模板中的占位符
|
||||
try {
|
||||
|
||||
//下载关联文件内容
|
||||
List<OSSFile> allRelevFileList = (List<OSSFile>) allParamsInfoList.get(2).get("fileListAll");
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
downLoadFileList(allRelevFileList,fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
|
||||
// 拿取模板
|
||||
String repFileName = fileName.replaceAll("/","_");
|
||||
wordOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||
if (CosBootUtil.doesObjectExist(templateUrl)) {
|
||||
InputStream wordTemplate = CosBootUtil.download(templateUrl);
|
||||
InputStream exceltemplateForDocx4j = CosBootUtil.download(templateUrl);
|
||||
// com.qcloud.cos.utils.IOUtils.copy(wordTemplate, wordOS);
|
||||
InputStream excelTemplateForPoi = CosBootUtil.download(templateUrl);
|
||||
|
||||
SpreadsheetMLPackage pkg = SpreadsheetMLPackage.load(exceltemplateForDocx4j);
|
||||
|
||||
//下载关联文件内容
|
||||
List<Map<String, Object>> fileListAll = (List<Map<String, Object>>) allParamsInfoList.get(2).get("fileListAll");
|
||||
|
||||
if (fileListAll != null && !fileListAll.isEmpty()) {
|
||||
Map<String,String> paramsAfterFilter = ExcelUtil.filterParams(pkg, params);
|
||||
if (CollectionUtil.isNotEmpty(paramsAfterFilter)) {
|
||||
List<String> nioNumberList = paramsAfterFilter.keySet().stream().collect(Collectors.toList());
|
||||
List<OSSFile> allRelevFileList = new ArrayList<>();
|
||||
for (Map<String, Object> fileMap : fileListAll) {
|
||||
for (Map.Entry map : fileMap.entrySet()) {
|
||||
String key = (String) map.getKey();
|
||||
List<OSSFile> fileList = (List<OSSFile>) map.getValue();
|
||||
if (nioNumberList.contains(key)) {
|
||||
allRelevFileList.addAll(fileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(allRelevFileList)) {
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
|
||||
downLoadFileList(allRelevFileList, fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 替换占位符内容
|
||||
// docx4j方式
|
||||
InputStream excelTemplate = CosBootUtil.download(templateUrl);
|
||||
SpreadsheetMLPackage pkg = SpreadsheetMLPackage.load(wordTemplate);
|
||||
Workbook workbook = WorkbookFactory.create(excelTemplate);
|
||||
Workbook workbook = WorkbookFactory.create(excelTemplateForPoi);
|
||||
ExcelUtil.replacePictureBatchPOI(workbook, pkg, imgListAll, params);
|
||||
ExcelUtil.variableReplace(pkg, params);
|
||||
pkg.save(wordOS);
|
||||
@@ -1092,7 +1129,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
List<Map<String, Object>> imgListAll = new ArrayList<>(); // 存放图片信息
|
||||
List<OSSFile> fileListAll = new ArrayList<>(); // 存放文件
|
||||
List<Map<String, Object>> fileListAll = new ArrayList<>(); // 存放文件
|
||||
String fileTypeStr = ".png,.PNG,.jfif,.JFIF,.pjpeg,.PJPEG,.jpeg,.JPEG,.pjp,.PJP,.jpg,.JPG";
|
||||
// 查询配置列数据
|
||||
for (Map<String, Object> record1 : dataList) {
|
||||
@@ -1125,13 +1162,16 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
fileNameList.add(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
|
||||
Map<String, Object> fileMap = new HashMap<>();
|
||||
fileMap.put(nioNumber, ossFileList);
|
||||
fileListAll.add(fileMap);
|
||||
} else {
|
||||
imgFileList.addAll(ossFileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fileListAll.addAll(fileList);
|
||||
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if ((ControlTypeEnum.FILE.getValue().equals(controlType)
|
||||
|
||||
@@ -246,6 +246,39 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
return updateById(paramsInfoEO);
|
||||
}
|
||||
|
||||
public void verifyForAddOrEdit (String paramsNumber, String paramsName, String cut) {
|
||||
|
||||
// 编号,参数名称校验
|
||||
if (StringUtils.isNotBlank(paramsNumber)) {
|
||||
String numberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
if (!paramsNumber.matches(numberRegex)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("编号只能输入字母,数字,横杠(-),小数点(.),左斜杠,空格");
|
||||
} else {
|
||||
throw new JeroBootException("Number enter only letters, numbers, dash (-),dot (.),left slash,spaces");
|
||||
}
|
||||
}
|
||||
if (paramsNumber.length() > Long.parseLong("15")) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("编号不能超过15个字符");
|
||||
} else {
|
||||
throw new JeroBootException("Number can not exceed 15 chars");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(paramsName)) {
|
||||
if (paramsName.length() > Long.parseLong("100")) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
throw new JeroBootException("参数名称不能超过100个字符");
|
||||
} else {
|
||||
throw new JeroBootException("Params Name can not exceed 100 chars");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
|
||||
@@ -201,7 +201,7 @@ public class SyncDataServiceImpl implements ISyncDataService{
|
||||
pageSum += 1;
|
||||
}
|
||||
//循环查询统一认证系统所有账户信息(从第二页开始)
|
||||
for(int page = 1; page < 2; page++){
|
||||
for(int page = 1; page < pageSum; page++){
|
||||
path = "/people/v1/employee/all-info";
|
||||
queryStr = "app_id=" + appId + "&hash_type=sha256&limit=100&offset=" + (page*100);
|
||||
response = getResultDataOfGet(path, queryStr);
|
||||
|
||||
@@ -293,7 +293,11 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//文档动态信息添加
|
||||
if(StringUtils.isNotBlank(sbTemp)){
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
String msgContent = "The " + StringUtils.join(serialNumberListTemp,",") + " has been deleted from the document library.";
|
||||
String msgEndStr = " has been deleted from the document library.";
|
||||
if (serialNumberListTemp.size() > 1) {
|
||||
msgEndStr = " have been deleted from the document library.";
|
||||
}
|
||||
String msgContent = "The standard " + StringUtils.join(serialNumberListTemp,",") + msgEndStr;
|
||||
homeDocumentDynamicEO.setMsgContent(msgContent);
|
||||
homeDocumentDynamicEO.setMsgContentInfo(msgContent);
|
||||
homeDocumentDynamicEOService.save(homeDocumentDynamicEO);
|
||||
@@ -2143,8 +2147,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//文档动态, 文档库中新增了标准XXXX homeDocumentDynamicEOService
|
||||
//The standard GB 7258-2017 Technical specifications has been added to the document library.
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
homeDocumentDynamicEO.setMsgContent("The " + category + " " + serialNumber + " " + titleEn + " has been added to the document library.");
|
||||
homeDocumentDynamicEO.setMsgContentInfo("The " + href + " has been added to the document library.");
|
||||
homeDocumentDynamicEO.setMsgContent("The standard " + category + " " + serialNumber + " " + titleEn + " has been added to the document library.");
|
||||
homeDocumentDynamicEO.setMsgContentInfo("The standard " + href + " has been added to the document library.");
|
||||
homeDocumentDynamicEOService.save(homeDocumentDynamicEO);
|
||||
|
||||
|
||||
@@ -2596,11 +2600,11 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
StringBuilder msgContentSb = new StringBuilder();
|
||||
StringBuilder msgContentInfoSb = new StringBuilder();
|
||||
//适用车型
|
||||
StringBuilder msgContentSbCarType = new StringBuilder("Vehicle Type of the " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbCarType = new StringBuilder("Vehicle Type of the " + category + " " + href);
|
||||
StringBuilder msgContentSbCarType = new StringBuilder("Vehicle Type of the standard " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbCarType = new StringBuilder("Vehicle Type of the standard " + category + " " + href);
|
||||
//状态
|
||||
StringBuilder msgContentSbStatus = new StringBuilder("The Status of the " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbStatus = new StringBuilder("The Status of the " + category + " " + href);
|
||||
StringBuilder msgContentSbStatus = new StringBuilder("The Status of the standard " + category + " " + serialNumber + " " + titleEn);
|
||||
StringBuilder msgContentInfoSbStatus = new StringBuilder("The Status of the standard " + category + " " + href);
|
||||
|
||||
|
||||
List<String> fileIdLIstTemp = new ArrayList<>();
|
||||
@@ -2634,8 +2638,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
//
|
||||
if(StringUtils.isBlank(value)){
|
||||
msgContentSbStatus.append(" has been modified to be null ,");
|
||||
msgContentInfoSbStatus.append(" has been modified to be null ,");
|
||||
msgContentSbStatus.append(" has been modified to be null,");
|
||||
msgContentInfoSbStatus.append(" has been modified to be null,");
|
||||
msgContentSb.append(msgContentSbStatus);
|
||||
msgContentInfoSb.append(msgContentInfoSbStatus);
|
||||
}else{
|
||||
@@ -2670,8 +2674,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
value = substring;
|
||||
}
|
||||
if(StringUtils.isBlank(value)){
|
||||
msgContentSbCarType.append(" has been modified to be null ,");
|
||||
msgContentInfoSbCarType.append(" has been modified to be null ,");
|
||||
msgContentSbCarType.append(" has been modified to be null,");
|
||||
msgContentInfoSbCarType.append(" has been modified to be null,");
|
||||
msgContentSb.append(msgContentSbCarType);
|
||||
msgContentInfoSb.append(msgContentInfoSbCarType);
|
||||
}else{
|
||||
@@ -2691,8 +2695,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
msgContentInfoSb.append(contentInfoFile);
|
||||
}
|
||||
if(count > 0){
|
||||
String msgContent = msgContentSb.substring(0, msgContentSb.length() - 1);
|
||||
String msgContentInfo = msgContentInfoSb.substring(0, msgContentInfoSb.length() - 1);
|
||||
String msgContent = msgContentSb.substring(0, msgContentSb.length() - 1) + ".";
|
||||
String msgContentInfo = msgContentInfoSb.substring(0, msgContentInfoSb.length() - 1) + ".";
|
||||
HomeDocumentDynamicEO homeDocumentDynamicEO = new HomeDocumentDynamicEO();
|
||||
homeDocumentDynamicEO.setMsgContent(msgContent);
|
||||
homeDocumentDynamicEO.setMsgContentInfo(msgContentInfo);
|
||||
|
||||
@@ -59,6 +59,7 @@ public class CountryCardManageReleaseDetailEOController extends JeroController<C
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseDetailEO, req.getParameterMap());
|
||||
Page<CountryCardManageReleaseDetailEO> page = new Page<CountryCardManageReleaseDetailEO>(pageNo, pageSize);
|
||||
IPage<CountryCardManageReleaseDetailEO> pageList = countryCardManageReleaseDetailEOService.page(page, queryWrapper);
|
||||
this.countryCardManageReleaseDetailEOService.disposeData(pageList.getRecords(),countryCardManageReleaseDetailEO.getCut());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@@ -70,9 +71,10 @@ public class CountryCardManageReleaseDetailEOController extends JeroController<C
|
||||
@AutoLog(value = "问题知识库-country_card-管理发布明细表-列表查询")
|
||||
@ApiOperation(value="问题知识库-country_card-管理发布明细表-列表查询", notes="问题知识库-country_card-管理发布明细表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<CountryCardManageReleaseDetailEO>> queryList() {
|
||||
List<CountryCardManageReleaseDetailEO> list = countryCardManageReleaseDetailEOService.queryList();
|
||||
return Result.OK(list);
|
||||
public Result<List<CountryCardManageReleaseDetailEO>> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO,HttpServletRequest req) {
|
||||
List<CountryCardManageReleaseDetailEO> result = countryCardManageReleaseDetailEOService.queryList(countryCardManageReleaseDetailEO,req);
|
||||
this.countryCardManageReleaseDetailEOService.disposeData(result,countryCardManageReleaseDetailEO.getCut());
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
|
||||
Page<CountryCardManageReleaseEO> page = new Page<CountryCardManageReleaseEO>(pageNo, pageSize);
|
||||
IPage<CountryCardManageReleaseEO> pageList = countryCardManageReleaseEOService.page(page, queryWrapper);
|
||||
this.countryCardManageReleaseEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
return Result.OK(cut,pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,8 +194,21 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
|
||||
@AutoLog(value = "问题知识库-country_card-管理发布-获取适用市场下拉选")
|
||||
@ApiOperation(value="问题知识库-country_card-管理发布-获取适用市场下拉选", notes="问题知识库-country_card-管理发布-获取适用市场下拉选")
|
||||
@GetMapping(value = "/getApplyMarketList")
|
||||
public Result<List<DictModel>> getApplyMarketList() {
|
||||
Result<List<DictModel>> result = this.countryCardManageReleaseEOService.getApplyMarketList();
|
||||
public Result<List<DictModel>> getApplyMarketList(@RequestParam(name = "queryFlag",required=false) String queryFlag) {
|
||||
Result<List<DictModel>> result = this.countryCardManageReleaseEOService.getApplyMarketList(queryFlag);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据多个适用地区查询数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-country_card-管理发布表-根据多个适用地区查询数据")
|
||||
@ApiOperation(value="问题知识库-country_card-管理发布表-根据多个适用地区查询数据", notes="问题知识库-country_card-管理发布表-根据多个适用地区查询数据")
|
||||
@PostMapping(value = "/queryCountryCardManageReleaseByApplyMarkets")
|
||||
public Result<List<CountryCardManageReleaseEO>> queryCountryCardManageReleaseByApplyMarkets(@RequestBody JSONObject params) {
|
||||
List<CountryCardManageReleaseEO> list = countryCardManageReleaseEOService.queryCountryCardManageReleaseByApplyMarkets(params);
|
||||
return Result.OK(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.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.problemKnowledgeBase.entity.CountryNationalFlagEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryNationalFlagEOService;
|
||||
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: 国家与国旗中间表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="国家与国旗中间表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/countryNationalFlagEO")
|
||||
@Slf4j
|
||||
public class CountryNationalFlagEOController extends JeroController<CountryNationalFlagEO, ICountryNationalFlagEOService> {
|
||||
@Autowired
|
||||
private ICountryNationalFlagEOService countryNationalFlagEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param countryNationalFlagEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "国家与国旗中间表-分页列表查询")
|
||||
@ApiOperation(value="国家与国旗中间表-分页列表查询", notes="国家与国旗中间表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(CountryNationalFlagEO countryNationalFlagEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CountryNationalFlagEO> queryWrapper = QueryGenerator.initQueryWrapper(countryNationalFlagEO, req.getParameterMap());
|
||||
Page<CountryNationalFlagEO> page = new Page<CountryNationalFlagEO>(pageNo, pageSize);
|
||||
IPage<CountryNationalFlagEO> pageList = countryNationalFlagEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "国家与国旗中间表-列表查询")
|
||||
@ApiOperation(value="国家与国旗中间表-列表查询", notes="国家与国旗中间表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<CountryNationalFlagEO>> queryList() {
|
||||
List<CountryNationalFlagEO> list = countryNationalFlagEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param countryNationalFlagEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "国家与国旗中间表-添加")
|
||||
@ApiOperation(value="国家与国旗中间表-添加", notes="国家与国旗中间表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody CountryNationalFlagEO countryNationalFlagEO) {
|
||||
countryNationalFlagEOService.add(countryNationalFlagEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param countryNationalFlagEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "国家与国旗中间表-编辑")
|
||||
@ApiOperation(value="国家与国旗中间表-编辑", notes="国家与国旗中间表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody CountryNationalFlagEO countryNationalFlagEO) {
|
||||
countryNationalFlagEOService.editById(countryNationalFlagEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "国家与国旗中间表-通过id删除")
|
||||
@ApiOperation(value="国家与国旗中间表-通过id删除", notes="国家与国旗中间表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
countryNationalFlagEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "国家与国旗中间表-批量删除")
|
||||
@ApiOperation(value="国家与国旗中间表-批量删除", notes="国家与国旗中间表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.countryNationalFlagEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "国家与国旗中间表-通过id查询")
|
||||
@ApiOperation(value="国家与国旗中间表-通过id查询", notes="国家与国旗中间表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CountryNationalFlagEO countryNationalFlagEO = countryNationalFlagEOService.queryById(id);
|
||||
if(countryNationalFlagEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(countryNationalFlagEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param countryNationalFlagEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, CountryNationalFlagEO countryNationalFlagEO) {
|
||||
return super.exportXls(request, countryNationalFlagEO, CountryNationalFlagEO.class, "国家与国旗中间表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CountryNationalFlagEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +1,20 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
@@ -70,6 +69,10 @@ public class CountryCardManageReleaseDetailEO implements Serializable {
|
||||
@Excel(name = "模板表id", width = 15)
|
||||
@ApiModelProperty(value = "模板表id")
|
||||
private java.lang.String countryCardTempId;
|
||||
/**标签名称**/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
private java.lang.String lableName;
|
||||
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@@ -81,4 +84,15 @@ public class CountryCardManageReleaseDetailEO implements Serializable {
|
||||
@ApiModelProperty(value = "内容")
|
||||
private java.lang.String content;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
/**标签类型**/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "标签类型")
|
||||
private String lableType;
|
||||
|
||||
/**Country Card模板维护-字典项实体*/
|
||||
@TableField(exist = false)
|
||||
private List<CountryCardTempItemEO> countryCardTempItemEOList;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ public class CountryCardManageReleaseEO implements Serializable {
|
||||
/**适用市场*/
|
||||
@Excel(name = "适用市场", width = 15)
|
||||
@ApiModelProperty(value = "适用市场")
|
||||
@Dict(dicCode = "region")
|
||||
private java.lang.String applyMarket;
|
||||
|
||||
/**发布状态*/
|
||||
@@ -82,4 +83,8 @@ public class CountryCardManageReleaseEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private List<CountryCardManageReleaseDetailEO> countryCardManageReleaseDetailEOList;
|
||||
|
||||
/**国旗**/
|
||||
@TableField(exist = false)
|
||||
private java.lang.String countryNationalFlag;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
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 com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 国家与国旗中间表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("country_national_flag")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="country_national_flag对象", description="国家与国旗中间表")
|
||||
public class CountryNationalFlagEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**国家名称*/
|
||||
@Excel(name = "国家名称中文", width = 15)
|
||||
@ApiModelProperty(value = "国家名称中文")
|
||||
private java.lang.String countryNameCn;
|
||||
|
||||
/**国家名称*/
|
||||
@Excel(name = "国家名称英文", width = 15)
|
||||
@ApiModelProperty(value = "国家名称英文")
|
||||
private java.lang.String countryNameEn;
|
||||
|
||||
/**国旗文件id*/
|
||||
@Excel(name = "国旗文件id", width = 15)
|
||||
@ApiModelProperty(value = "国旗文件id")
|
||||
private java.lang.String nationalFlagId;
|
||||
|
||||
/**国旗文件url*/
|
||||
@Excel(name = "国旗文件url", width = 15)
|
||||
@ApiModelProperty(value = "国旗文件url")
|
||||
private java.lang.String nationalFlagUrl;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -18,8 +16,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
@@ -100,9 +96,9 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
|
||||
/**内容(正文)*/
|
||||
@Excel(name = "内容(正文)", width = 15)
|
||||
private transient java.lang.String contentString;
|
||||
private java.lang.String content;
|
||||
|
||||
private byte[] content;
|
||||
/*private byte[] content;
|
||||
|
||||
public byte[] getContent(){
|
||||
if(contentString==null){
|
||||
@@ -126,7 +122,7 @@ public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}*/
|
||||
/**附件*/
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryNationalFlagEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 国家与国旗中间表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CountryNationalFlagEOMapper extends BaseMapper<CountryNationalFlagEO> {
|
||||
|
||||
}
|
||||
@@ -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.problemKnowledgeBase.mapper.CountryNationalFlagEOMapper">
|
||||
<resultMap id="CountryNationalFlagEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.CountryNationalFlagEO">
|
||||
<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="country_name_cn" property="countryNameCn" />
|
||||
<result column="country_name_en" property="countryNameEn" />
|
||||
<result column="national_flag_id" property="nationalFlagId" />
|
||||
<result column="national_flag_url" property="nationalFlagUrl" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -2,6 +2,8 @@ package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -57,5 +59,12 @@ public interface ICountryCardManageReleaseDetailEOService extends IService<Count
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<CountryCardManageReleaseDetailEO> queryList();
|
||||
List<CountryCardManageReleaseDetailEO> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<CountryCardManageReleaseDetailEO> datas, String cut);
|
||||
}
|
||||
|
||||
@@ -79,5 +79,7 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
|
||||
* 获取适用市场
|
||||
* @return
|
||||
*/
|
||||
Result<List<DictModel>> getApplyMarketList();
|
||||
Result<List<DictModel>> getApplyMarketList(String queryFlag);
|
||||
|
||||
List<CountryCardManageReleaseEO> queryCountryCardManageReleaseByApplyMarkets(JSONObject params);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryNationalFlagEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 国家与国旗中间表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICountryNationalFlagEOService extends IService<CountryNationalFlagEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param countryNationalFlagEO
|
||||
* @return
|
||||
*/
|
||||
void add(CountryNationalFlagEO countryNationalFlagEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param countryNationalFlagEO
|
||||
* @return
|
||||
*/
|
||||
void editById(CountryNationalFlagEO countryNationalFlagEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
CountryNationalFlagEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<CountryNationalFlagEO> queryList();
|
||||
}
|
||||
@@ -1,15 +1,29 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.LableTypeEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseDetailEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||
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.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-country_card-管理发布明细表
|
||||
* @Author: jero-boot
|
||||
@@ -20,6 +34,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<CountryCardManageReleaseDetailEOMapper, CountryCardManageReleaseDetailEO> implements ICountryCardManageReleaseDetailEOService {
|
||||
|
||||
@Autowired
|
||||
private ICountryCardTempEOService countryCardTempEOService;
|
||||
@Autowired
|
||||
private ICountryCardTempItemEOService countryCardTempItemEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -86,7 +105,52 @@ public class CountryCardManageReleaseDetailEOServiceImpl extends ServiceImpl<Cou
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CountryCardManageReleaseDetailEO> queryList() {
|
||||
return list();
|
||||
public List<CountryCardManageReleaseDetailEO> queryList(CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO, HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardManageReleaseDetailEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
List<CountryCardManageReleaseDetailEO> result = this.list(queryWrapper);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<CountryCardManageReleaseDetailEO> datas, String cut) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
//获取模板
|
||||
List<CountryCardTempEO> countryCardTempEOList = this.countryCardTempEOService.list();
|
||||
|
||||
List<String> countroCardTempIdList = countryCardTempEOList.stream().map(CountryCardTempEO::getId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<CountryCardTempItemEO> tempItemEOQueryWrapper = new QueryWrapper<>();
|
||||
tempItemEOQueryWrapper.lambda().in(CountryCardTempItemEO::getCountryCardTempId,countroCardTempIdList);
|
||||
List<CountryCardTempItemEO> countryCardTempItemEOList = this.countryCardTempItemEOService.list(tempItemEOQueryWrapper);
|
||||
|
||||
datas.forEach(data -> {
|
||||
List<CountryCardTempEO> countryCardTemp = countryCardTempEOList.stream().filter(countryCardTempEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(data.getCountryCardTempId(), countryCardTempEO.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(countryCardTemp)){
|
||||
data.setLableName(countryCardTemp.get(0).getLableName());
|
||||
data.setLableType(countryCardTemp.get(0).getLableType());
|
||||
}
|
||||
|
||||
//如果该条数据的标签类型是下拉选项
|
||||
if(CollectionUtils.isNotEmpty(countryCardTempItemEOList) && StringUtils.equals(data.getLableType(), LableTypeEnum.PULL_SINGLE.getValue())){
|
||||
//把这条模板的下拉选项设置进去
|
||||
List<CountryCardTempItemEO> collect = countryCardTempItemEOList.stream().filter(countryCardTempItemEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(data.getCountryCardTempId(), countryCardTempItemEO.getCountryCardTempId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
data.setCountryCardTempItemEOList(collect);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,12 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryNationalFlagEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryNationalFlagEOService;
|
||||
import com.jero.modules.system.enums.DicCodeEnum;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -41,6 +43,8 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
private ICountryCardManageReleaseDetailEOService countryCardManageReleaseDetailEOService;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private ICountryNationalFlagEOService countryNationalFlagEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -132,6 +136,12 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> releaseDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
releaseDetailEOQueryWrapper.lambda().in(CountryCardManageReleaseDetailEO::getCountryCardManageReleaseId,CountryCardManageReleaseEOId);
|
||||
List<CountryCardManageReleaseDetailEO> releaseDetailEOList = this.countryCardManageReleaseDetailEOService.list(releaseDetailEOQueryWrapper);
|
||||
this.countryCardManageReleaseDetailEOService.disposeData(releaseDetailEOList,cut);
|
||||
|
||||
List<DictModel> dictModelList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||
|
||||
//获取国旗
|
||||
List<CountryNationalFlagEO> countryNationalFlagList = countryNationalFlagEOService.list();
|
||||
|
||||
datas.forEach(data -> {
|
||||
if (StringUtils.isNotEmpty(data.getReleaseStatus())) {
|
||||
@@ -148,6 +158,27 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
}).collect(Collectors.toList());
|
||||
data.setCountryCardManageReleaseDetailEOList(collect);
|
||||
}
|
||||
|
||||
List<DictModel> regionList = dictModelList.stream().filter(region -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(region.getValue(), data.getApplyMarket())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(regionList)){
|
||||
DictModel dictModel = regionList.get(0);
|
||||
|
||||
String collect = countryNationalFlagList.stream().filter(nationalFlag -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(nationalFlag.getCountryNameCn(),dictModel.getText())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(CountryNationalFlagEO::getNationalFlagUrl).collect(Collectors.joining(","));
|
||||
data.setCountryNationalFlag(collect);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -168,7 +199,7 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<DictModel>> getApplyMarketList() {
|
||||
public Result<List<DictModel>> getApplyMarketList(String queryFlag) {
|
||||
List<DictModel> result = new ArrayList<>();
|
||||
|
||||
//获取所有的适用地区
|
||||
@@ -176,24 +207,60 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
|
||||
//获取已经创建了country Card的适用地区,该接口只返回,在country Card里面没有的适用地区。
|
||||
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.list();
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = dictModelList;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = true;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
|
||||
flag = false;
|
||||
break;
|
||||
|
||||
//如果查询标识是空,则是在countryCard管理发布页面新增数据时使用:管理发布页新增查询的是,所有未创建countryCard的适用市场。
|
||||
//如果查询标识不是空,则是在CountryCard的首页使用:首页查询的是 所有已创建了countryCard的适用市场。
|
||||
if (StringUtils.isEmpty(queryFlag)) {
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = dictModelList;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = true;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = null;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = false;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())
|
||||
&&StringUtils.equals(countryCardManageReleaseEO.getReleaseStatus(),ReleaseStatusEnum.HAVE_RELEASED.getValue())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CountryCardManageReleaseEO> queryCountryCardManageReleaseByApplyMarkets(JSONObject params) {
|
||||
String applyMarkets = params.getString("applyMarkets");
|
||||
String cut = params.getString("cut");
|
||||
List<String> applyMarketList = Arrays.asList(applyMarkets.split(","));
|
||||
QueryWrapper<CountryCardManageReleaseEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(CountryCardManageReleaseEO::getApplyMarket,applyMarketList);
|
||||
List<CountryCardManageReleaseEO> result = this.list(queryWrapper);
|
||||
this.disposeData(result,cut);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,14 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.LableTypeEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -13,6 +17,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -35,6 +40,10 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
|
||||
@Autowired
|
||||
private ICountryCardTempItemEOService countryCardTempItemEOService;
|
||||
@Autowired
|
||||
private ICountryCardManageReleaseEOService countryCardManageReleaseEOService;
|
||||
@Autowired
|
||||
private ICountryCardManageReleaseDetailEOService countryCardManageReleaseDetailEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -53,7 +62,19 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
/*if(StringUtils.equals(countryCardTempEO.getLableType(), LableTypeEnum.PULL_SINGLE.getValue())){
|
||||
this.countryCardTempItemEOService.batchInsert(countryCardTempEO.getCountryCardTempItemEOList(),countryCardTempEO.getId(),countryCardTempEO.getCut());
|
||||
}*/
|
||||
}
|
||||
//模板新增的时候,获取现在系统中已经有的country Card数据,country Card管理发布明细表插入数据
|
||||
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.countryCardManageReleaseEOService.list();
|
||||
if(CollectionUtils.isNotEmpty(countryCardManageReleaseEOList)){
|
||||
List<CountryCardManageReleaseDetailEO> releaseDetailEOList = new ArrayList<>();
|
||||
countryCardManageReleaseEOList.forEach(manageReleaseEO -> {
|
||||
CountryCardManageReleaseDetailEO countryCardManageReleaseDetailEO = new CountryCardManageReleaseDetailEO();
|
||||
countryCardManageReleaseDetailEO.setCountryCardTempId(countryCardTempEO.getId());
|
||||
countryCardManageReleaseDetailEO.setCountryCardManageReleaseId(manageReleaseEO.getId());
|
||||
releaseDetailEOList.add(countryCardManageReleaseDetailEO);
|
||||
});
|
||||
this.countryCardManageReleaseDetailEOService.saveBatch(releaseDetailEOList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
@@ -82,6 +103,9 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> manageReleaseDetailDeleteWrapper = new QueryWrapper<>();
|
||||
manageReleaseDetailDeleteWrapper.lambda().eq(CountryCardManageReleaseDetailEO::getCountryCardTempId,id);
|
||||
this.countryCardManageReleaseDetailEOService.remove(manageReleaseDetailDeleteWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,6 +121,10 @@ public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOM
|
||||
QueryWrapper<CountryCardTempItemEO> itemDeleteWrapper = new QueryWrapper<>();
|
||||
itemDeleteWrapper.lambda().in(CountryCardTempItemEO::getCountryCardTempId,ids);
|
||||
this.countryCardTempItemEOService.remove(itemDeleteWrapper);
|
||||
|
||||
QueryWrapper<CountryCardManageReleaseDetailEO> manageReleaseDetailDeleteWrapper = new QueryWrapper<>();
|
||||
manageReleaseDetailDeleteWrapper.lambda().in(CountryCardManageReleaseDetailEO::getCountryCardTempId,ids);
|
||||
this.countryCardManageReleaseDetailEOService.remove(manageReleaseDetailDeleteWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryNationalFlagEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryNationalFlagEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryNationalFlagEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 国家与国旗中间表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class CountryNationalFlagEOServiceImpl extends ServiceImpl<CountryNationalFlagEOMapper, CountryNationalFlagEO> implements ICountryNationalFlagEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param countryNationalFlagEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(CountryNationalFlagEO countryNationalFlagEO) {
|
||||
Date now = new Date();
|
||||
countryNationalFlagEO.setCreateTime(now);
|
||||
countryNationalFlagEO.setUpdateTime(now);
|
||||
save(countryNationalFlagEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param countryNationalFlagEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(CountryNationalFlagEO countryNationalFlagEO) {
|
||||
Date now = new Date();
|
||||
countryNationalFlagEO.setUpdateTime(now);
|
||||
saveOrUpdate(countryNationalFlagEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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 CountryNationalFlagEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CountryNationalFlagEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,8 @@ import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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 java.util.stream.Stream;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
@@ -164,6 +160,11 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
permissionUser.setProblemKnowledgeBaseId(problemKnowledgeBaseEO.getId());
|
||||
});
|
||||
|
||||
//根据用户id去重。
|
||||
permissionUserList = permissionUserList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
|
||||
new TreeSet<>(Comparator.comparing(o -> o.getUserId()))),
|
||||
ArrayList::new));
|
||||
|
||||
//3.把允许的用户添加进权限表。
|
||||
this.problemKnowledgeBaseUserEOService.saveOrUpdateBatch(permissionUserList);
|
||||
}
|
||||
|
||||
@@ -377,8 +377,8 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
||||
|
||||
@AutoLog(value = "变更")
|
||||
@ApiOperation(value="变更", notes="变更")
|
||||
@GetMapping(value = "/change")
|
||||
public Result<?> change(@RequestParam Map<String,Object> params) {
|
||||
@PostMapping(value = "/change")
|
||||
public Result<?> change(@RequestBody JSONObject params) {
|
||||
return this.projectLawsInventoryEOService.change(params);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@ public enum JumpLinkEnum {
|
||||
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
||||
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
||||
COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""),
|
||||
|
||||
PROBLEM_KNOWLEDGE_BASE_DETAIL("问题知识库,详情页","","/problemKnowledgeBaseView",""),
|
||||
PROBLEM_KNOWLEDGE_BASE("问题知识库,列表页","","/problemknowledgeBase",""),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -105,9 +105,10 @@ public class InventoryAffirmJob implements Job {
|
||||
//如果清单确认结束日期是当前日期
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
||||
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
}
|
||||
projectLawsInventoryEO.setSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
@@ -118,9 +119,10 @@ public class InventoryAffirmJob implements Job {
|
||||
//如果清单确认结束时间是当前系统时间后三天
|
||||
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
||||
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
}
|
||||
projectLawsInventoryEO.setSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
@@ -136,17 +138,17 @@ public class InventoryAffirmJob implements Job {
|
||||
|
||||
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务确认剩余处理时间还有3天,请及时查看处理";*/
|
||||
// XXX .
|
||||
String msgContentEN = "The remaining processing time for the regulation list confirmation for "
|
||||
String msgContentEN = "The remaining processing time for the regulation task confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and handle it in time.";
|
||||
+ " are 3 days. Please check and address it in a timely manner.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation list confirmation task to complete";
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -170,22 +172,22 @@ public class InventoryAffirmJob implements Job {
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
|
||||
String msgContentEN = "The regulation list confirmation for "
|
||||
String msgContentEN = "The regulation task confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " will expire today. Please check and address it in a timely manner.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation list confirmation task to complete";
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -208,7 +210,7 @@ public class InventoryAffirmJob implements Job {
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.TASK_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
|
||||
void dataDispose(List<ProjectLawsInventoryEO> list, LoginUser currentUser, int isProjectRole, String cut);
|
||||
|
||||
Result<?> change(Map<String, Object> parmas);
|
||||
Result<?> change(JSONObject parmas);
|
||||
|
||||
/**
|
||||
* 下载pdf报告
|
||||
|
||||
@@ -1290,6 +1290,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
|
||||
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
|
||||
|
||||
// studio信息
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
@@ -1345,7 +1350,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//消息内容
|
||||
String msgContentEN = currentUser.getUsername() + " initiated the regulation list confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ". The due date is:" +inventoryAffirmDueDate+ " .Please check and address it in a timely manner.";
|
||||
+ ". The due date is " + inventoryAffirmDueDate+ ". Please check and address it in a timely manner.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation list confirmation task to complete";
|
||||
|
||||
@@ -1354,7 +1359,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
feishuMsgVo.setDueDate(inventoryAffirmDueDate);
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -1466,10 +1471,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}*/
|
||||
}
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
//只要有一个人拒绝,就改为拒绝。
|
||||
if(StringUtils.equals(operatorResult, OperatorResultEnum.REJECTED.getValue())){
|
||||
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
|
||||
@@ -1493,7 +1494,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -1534,7 +1535,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -1584,7 +1585,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
feishuMsgVo.setTaskType("Regulation List Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
feishuMsgVo.setInitiator(studioUserInfo.getUsername());
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -2088,6 +2089,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
|
||||
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
|
||||
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = this.baseMapper.selectOne(
|
||||
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, id)
|
||||
);
|
||||
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
@@ -2112,11 +2116,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
String taskType = "";
|
||||
String initiator = "";
|
||||
String initiatorLark = "";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " initiated the regulation task confirmation of " + projectNameInfoEO.getProjectName()
|
||||
+ ".The due date is:" +taskAffirmDueDate+ " Please check and address it in a timely manner.";
|
||||
+ ". The due date is " + taskAffirmDueDate + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
@@ -2126,11 +2132,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
|
||||
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
|
||||
userIdList.add(dreUserId);
|
||||
msgContentEN = sysUser.getUsername() + " has assigned the regulation task confirmation of " + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ ".to you. the due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
|
||||
+ " to you. The due date is " +taskAffirmDueDate+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
@@ -2138,11 +2145,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ".The due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
|
||||
+ ". The due date is " +taskAffirmDueDate+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
@@ -2150,11 +2159,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
|
||||
userIdList.add(engineeringInterfacePerson);
|
||||
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ".The due date is " +taskAffirmDueDate+ " Please check and handle it in time.";
|
||||
+ ". The due date is " +taskAffirmDueDate+ ". Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
@@ -2162,7 +2173,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_REJECTED_MSG.getValue())){
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2174,7 +2187,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ACCEPTED_MSG.getValue())){
|
||||
userIdList.add(projectLibraryBase.getStudioEngineer());
|
||||
msgContentEN = sysUser.getUsername() + " has accepted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
@@ -2186,12 +2201,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
|
||||
taskType = "Regulation Task Confirmation";
|
||||
|
||||
initiator = studioUserInfo.getUsername();
|
||||
initiatorLark = studioUserInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_START_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
msgContentEN = "You recieved the design compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is XXXX. Please check and address it in a timely manner.";
|
||||
+ ". The due date is " + sdf.format(projectLawsInventoryEO.getDesignDueDate()) + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
|
||||
@@ -2199,12 +2216,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getDesignInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_START_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
msgContentEN = "You recieved the Pre-Homo task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is XXXX. Please check and address it in a timely manner.";
|
||||
+ ". The due date is " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate()) + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
|
||||
@@ -2212,12 +2234,18 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getPrehomoInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_START_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
msgContentEN = "You recieved the validation compliance task of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
|
||||
+ ". The due date is XXXX. Please check and address it in a timely manner.";
|
||||
+ ". The due date is " + sdf.format(projectLawsInventoryEO.getVerifyDueDate()) + ". Please check and address it in a timely manner.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
|
||||
@@ -2225,7 +2253,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String designInitiatorId = jsonObject.getString("designInitiatorId"); //设计符合性发起人id
|
||||
userIdList.add(designInitiatorId);
|
||||
@@ -2238,7 +2271,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getDesignInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String prehomoInitiatorId = jsonObject.getString("prehomoInitiatorId"); //pre-Home发起人id
|
||||
userIdList.add(prehomoInitiatorId);
|
||||
@@ -2251,7 +2289,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getPrehomoInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())){
|
||||
String verifyInitiatorId = jsonObject.getString("verifyInitiatorId"); //验证符合性发起人id
|
||||
userIdList.add(verifyInitiatorId);
|
||||
@@ -2264,7 +2307,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
|
||||
userIdList.add(designDutyId);
|
||||
@@ -2277,7 +2325,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Design Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getDesignInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
@@ -2290,7 +2343,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Pre-Homo Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getPrehomoInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
@@ -2303,7 +2361,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
taskType = "Validation Compliance Confirmation";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
|
||||
);
|
||||
initiatorLark = initiatorLarkInfo.getUsername();
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
@@ -2311,15 +2374,48 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
feishuMsgVo.setTaskType(taskType);
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(sysUser.getUsername());
|
||||
feishuMsgVo.setInitiator(initiatorLark);
|
||||
feishuMsgVo.setDueDate(taskAffirmDueDate);
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
|
||||
String hrefFeishu = "";
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
|
||||
String href = "";
|
||||
if(StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_REJECTED_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_ACCEPTED_MSG.getValue()))
|
||||
{
|
||||
hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
|
||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.DESIGN_START_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_START_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.VERIFY_START_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())
|
||||
||StringUtils.equals(msgType,MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue()))
|
||||
{
|
||||
hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ projectLibraryBase.getTargetMarket();
|
||||
href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
}
|
||||
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
@@ -4087,8 +4183,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result<?> change(Map<String, Object> parmas) {
|
||||
String ids = parmas.get("ids").toString();
|
||||
public Result<?> change(JSONObject parmas) {
|
||||
String ids = parmas.getString("ids");
|
||||
if(StringUtils.isNotEmpty(ids)){
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
String projectLawsInventoryIds = ids;
|
||||
@@ -4102,6 +4198,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
updateWrapper.in(ProjectLawsInventoryEO::getId,idList);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerSubmitStatus,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerSubmitStatus,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getSendMsgFlag,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getSendMsgCurrentFlag,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getDesignDueDate,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoDueDate,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getVerifyDueDate,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getInventoryAffirmDueDate,null);
|
||||
updateWrapper.set(ProjectLawsInventoryEO::getTaskAffirmDueDate,null);
|
||||
super.update(projectLawsInventoryEO, updateWrapper);
|
||||
|
||||
QueryWrapper<ProjectTaskInventoryEO> taskInventoryQueryWrapper = new QueryWrapper<>();
|
||||
@@ -4178,7 +4281,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
deleteConditionAssessmentWrapper.lambda().in(ConditionAssessmentEO::getProjectLawsInventoryId,idList);
|
||||
this.conditionAssessmentEOService.remove(deleteConditionAssessmentWrapper);
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("projectLawsInventoryIds",projectLawsInventoryIds);
|
||||
params.put("pIds",pIds);
|
||||
//根据流程实例id 、 法规清单id 删除相关流程。
|
||||
|
||||
@@ -155,13 +155,13 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has replied to your engineering deliverable information. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
String initiatorId = "";
|
||||
|
||||
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
|
||||
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
@@ -173,6 +173,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
initiatorId = projectLawsInventoryEO.getDesignInitiatorId();
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
@@ -184,6 +185,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||
initiatorId = projectLawsInventoryEO.getPrehomoInitiatorId();
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
@@ -195,6 +197,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||
initiatorId = projectLawsInventoryEO.getVerifyInitiatorId();
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}
|
||||
@@ -218,6 +221,14 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
String initiator = "";
|
||||
if(StringUtils.isNotEmpty(initiatorId)){
|
||||
QueryWrapper<SysUser> queryOneWrapper = new QueryWrapper<>();
|
||||
queryOneWrapper.lambda().eq(SysUser::getId,initiatorId);
|
||||
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
|
||||
initiator = sysUser.getUsername();
|
||||
}
|
||||
feishuMsgVo.setInitiator(initiator);
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
@@ -351,13 +362,30 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
String initiatorId = "";
|
||||
if (StringUtils.equals(projectTaskInventoryFeedbackEO.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())) {
|
||||
initiatorId = projectLawsInventoryEO.getDesignInitiatorId();
|
||||
}else if(StringUtils.equals(projectTaskInventoryFeedbackEO.getFlowType(), FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
initiatorId = projectLawsInventoryEO.getPrehomoInitiatorId();
|
||||
}else if(StringUtils.equals(projectTaskInventoryFeedbackEO.getFlowType(), FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
initiatorId = projectLawsInventoryEO.getVerifyInitiatorId();
|
||||
}
|
||||
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has submitted the engineering deliverable information. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
feishuMsgVo.setInitiator(currentUser.getUsername());
|
||||
|
||||
String initiator = "";
|
||||
if (StringUtils.isNotEmpty(initiatorId)) {
|
||||
QueryWrapper<SysUser> queryOneWrapper = new QueryWrapper<>();
|
||||
queryOneWrapper.lambda().eq(SysUser::getId,initiatorId);
|
||||
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
|
||||
initiator = sysUser.getUsername();
|
||||
}
|
||||
feishuMsgVo.setInitiator(initiator);
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.project.util;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
@@ -40,6 +41,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
public class ExcelUtil {
|
||||
@@ -70,6 +72,33 @@ public class ExcelUtil {
|
||||
System.out.println("mmmmmmm");
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤出需要导出的
|
||||
* @param pkg
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static Map<String, String> filterParams(SpreadsheetMLPackage pkg, Map<String, String> params) throws Exception {
|
||||
JaxbSmlPart smlPart = (JaxbSmlPart)pkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet中的文本
|
||||
String wmlTemplateString = getWmlTemplateString(smlPart);
|
||||
List<String> placeholderList = new ArrayList<>();
|
||||
getAllPlaceholderElementFromObject(wmlTemplateString, 0, placeholderList); // 获取文档中所有占位符
|
||||
|
||||
Map<String, String> paramsAfterFilter = new HashMap<>();
|
||||
List<String> textValueList = placeholderList.stream().distinct().collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(textValueList)) {
|
||||
for (Map.Entry<String, String> map : params.entrySet()) {
|
||||
String value = "${" + map.getKey() + "}";
|
||||
if (textValueList.contains(value)) {
|
||||
paramsAfterFilter.put(map.getKey(), map.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return paramsAfterFilter;
|
||||
}
|
||||
|
||||
public static void setRowHeight(WorksheetPart worksheetPart, int rIndex, double height, int cIndex, String text) {
|
||||
SheetData sheetData = worksheetPart.getJaxbElement().getSheetData();
|
||||
|
||||
@@ -370,8 +399,8 @@ public class ExcelUtil {
|
||||
|
||||
// This seems to be about 5% faster than the Scanner approach
|
||||
wmlTemplateString = IOUtils.toString(is, "UTF-8");
|
||||
List<String> placeholderList = new ArrayList<>();
|
||||
getAllPlaceholderElementFromObject(wmlTemplateString, 0, placeholderList);
|
||||
// List<String> placeholderList = new ArrayList<>();
|
||||
// getAllPlaceholderElementFromObject(wmlTemplateString, 0, placeholderList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
@@ -381,18 +410,18 @@ public class ExcelUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static List<String> getAllPlaceholderElementFromObject(String wmlTemplateString, int offset, List<String> placeholderList) {
|
||||
private static void getAllPlaceholderElementFromObject(String wmlTemplateString, int offset, List<String> placeholderList) {
|
||||
|
||||
int startKey = wmlTemplateString.indexOf("${", offset);
|
||||
if (startKey == -1)
|
||||
return null;
|
||||
return;
|
||||
else {
|
||||
int keyEnd = wmlTemplateString.indexOf('}', startKey);
|
||||
String placeHolder = wmlTemplateString.substring(startKey, keyEnd + 1);
|
||||
if (isPlaceholder(placeHolder)) {
|
||||
placeholderList.add(placeHolder);
|
||||
}
|
||||
return getAllPlaceholderElementFromObject(wmlTemplateString, keyEnd + 1, placeholderList);
|
||||
getAllPlaceholderElementFromObject(wmlTemplateString, keyEnd + 1, placeholderList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.project.util;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import org.docx4j.Docx4J;
|
||||
import org.docx4j.TraversalUtil;
|
||||
import org.docx4j.XmlUtils;
|
||||
@@ -28,6 +29,7 @@ import java.io.OutputStream;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class WordUtil {
|
||||
private static final Logger log = LoggerFactory.getLogger(WordUtil.class);
|
||||
@@ -230,6 +232,34 @@ public class WordUtil {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤出需要导出的
|
||||
* @param wordMLPackage
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static Map<String, String> filterParams(WordprocessingMLPackage wordMLPackage, Map<String, String> params) throws Exception {
|
||||
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
|
||||
Docx4jUtils.cleanDocumentPart(mainDocumentPart);
|
||||
Document wmlDoc = (Document)mainDocumentPart.getJaxbElement();
|
||||
Body body = wmlDoc.getBody();
|
||||
List<Text> textList = getAllPlaceholderElementFromObject(body); // 获取文档中所有占位符
|
||||
|
||||
Map<String, String> paramsAfterFilter = new HashMap<>();
|
||||
List<String> textValueList = textList.stream().map(Text::getValue).distinct().collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(textValueList)) {
|
||||
for (Map.Entry<String, String> map : params.entrySet()) {
|
||||
String value = "${" + map.getKey() + "}";
|
||||
if (textValueList.contains(value)) {
|
||||
paramsAfterFilter.put(map.getKey(), map.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return paramsAfterFilter;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发现docx文档包含占位符的文本节点
|
||||
* 未解决问题:两个连着的相同占位符会识别成一个。如 原文:${key1}${key1}
|
||||
|
||||
@@ -546,10 +546,12 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}else{
|
||||
content = "Content";
|
||||
}
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//单独设置每页右侧的时间
|
||||
WordUtil.exportWordMonth(document, lawsMonthlyReportWriteEOS.get(0).getMonth(), null, ParagraphAlignment.RIGHT, 0, 12, false, true, "微软雅黑");
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18, false, false, "Blue Sky Noto Regular");
|
||||
WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Blue Sky Noto Regular");
|
||||
//生成页脚
|
||||
WordUtil.exportHeardAndFootMain(document,moth);
|
||||
int oneCount = 1;
|
||||
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
|
||||
@@ -563,7 +565,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Blue Sky Noto Regular");
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -585,7 +587,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Blue Sky Noto Regular");
|
||||
twoCount++;
|
||||
}
|
||||
|
||||
@@ -598,7 +600,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
reportTitle = lawsMonthlyReportWriteEO.getTitleEn();
|
||||
}
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 10, false, false, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 12, false, false, "Blue Sky Noto Regular");
|
||||
reportCount++;
|
||||
}
|
||||
}
|
||||
@@ -616,16 +618,11 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
|
||||
//树形数据字典
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
String content = "";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
content = "主要内容";
|
||||
}else{
|
||||
content = "Content";
|
||||
}
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
//单独设置每页右侧的时间
|
||||
WordUtil.exportWordMonth(document, lawsMonthlyReportWriteEOS.get(0).getMonth(), null, ParagraphAlignment.RIGHT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
// WordUtil.exportWord(document, content, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
String moth = lawsMonthlyReportWriteEOS.get(0).getMonth().replaceAll("-", "年") + "月";
|
||||
//生成页眉页脚
|
||||
WordUtil.exportHeardAndFoot(document,moth);
|
||||
//生成标题
|
||||
WordUtil.exportWord(document, titleCN, null, ParagraphAlignment.CENTER, 0, 18, false, true, "Blue Sky Noto Regular");
|
||||
int oneCount = 1;
|
||||
|
||||
for (LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO : reportTitleOneList) {
|
||||
@@ -639,7 +636,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
oneTitle = lawsMonthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(oneTitle)){
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, oneNumber+" "+oneTitle, null, ParagraphAlignment.LEFT, 0, 14, false, true, "Blue Sky Noto Regular");
|
||||
oneCount++;
|
||||
}
|
||||
|
||||
@@ -661,7 +658,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
twoTitle = monthlyReportTitleTemplateEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(twoTitle)){
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, twoNumber+" "+twoTitle, null, ParagraphAlignment.LEFT, 2, 12, false, true, "Blue Sky Noto Regular");
|
||||
twoCount++;
|
||||
}
|
||||
//二级目录下放--->新征求意见清单模板, 新发布标准清单模板
|
||||
@@ -686,7 +683,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
reportTitle = lawsMonthlyReportWriteEO.getTitleEn();
|
||||
}
|
||||
if(StringUtils.isNotBlank(reportTitle)){
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 10, false, false, "Microsoft YaHei UI");
|
||||
WordUtil.exportWord(document, reportCount+". "+reportTitle, null, ParagraphAlignment.LEFT, 6, 11, false, false, "Blue Sky Noto Regular");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,20 +8,35 @@ import com.jero.modules.report.entity.NewStandardTemplateEO;
|
||||
import com.jero.modules.report.enums.DictCodeReportEnum;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.util.Units;
|
||||
import org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy;
|
||||
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFFooter;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFHeader;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFPicture;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFPictureData;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
||||
import org.apache.xmlbeans.impl.xb.xmlschema.SpaceAttribute;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFldChar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageMar;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFldCharType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -103,6 +118,158 @@ public class WordUtil {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// @SneakyThrows
|
||||
// public static void exportHeardAndFoot(XWPFDocument document){
|
||||
//// XWPFDocument document = new XWPFDocument();
|
||||
//
|
||||
// // create header-footer
|
||||
// XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
// if (headerFooterPolicy == null) headerFooterPolicy = document.createHeaderFooterPolicy();
|
||||
//
|
||||
// // create header start
|
||||
// XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
//
|
||||
// XWPFParagraph paragraph = header.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
//
|
||||
// XWPFRun run = paragraph.createRun();
|
||||
// run.setText("Header");
|
||||
//
|
||||
// // create footer start
|
||||
// XWPFFooter footer = headerFooterPolicy.createFooter(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
//
|
||||
// paragraph = footer.createParagraph();
|
||||
// paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
//
|
||||
// run = paragraph.createRun();
|
||||
// run.setText("Footer");
|
||||
//
|
||||
// CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
// if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
// CTPageMar pageMar = sectPr.getPgMar();
|
||||
// if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
// pageMar.setLeft(BigInteger.valueOf(2000)); //720 TWentieths of an Inch Point (Twips) = 720/20 = 36 pt = 36/72 = 0.5"
|
||||
// pageMar.setRight(BigInteger.valueOf(720));
|
||||
// pageMar.setTop(BigInteger.valueOf(1440)); //1440 Twips = 1440/20 = 72 pt = 72/72 = 1"
|
||||
// pageMar.setBottom(BigInteger.valueOf(1440));
|
||||
//
|
||||
// pageMar.setHeader(BigInteger.valueOf(2000)); //45.4 pt * 20 = 908 = 45.4 pt header from top
|
||||
// pageMar.setFooter(BigInteger.valueOf(568)); //28.4 pt * 20 = 568 = 28.4 pt footer from bottom
|
||||
//
|
||||
// }
|
||||
@SneakyThrows
|
||||
public static void exportHeardAndFoot(XWPFDocument document,String month){
|
||||
XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
if (headerFooterPolicy == null) headerFooterPolicy = document.createHeaderFooterPolicy();
|
||||
XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
|
||||
// String logoFilePath = "/jero-boot/home/weilai.png";
|
||||
String logoFilePath = WordUtil.class.getClassLoader().getResource("static/home/weilai.png").getPath();
|
||||
//页眉第一个段落展示logo-----------------------------------------------------------------------------------
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(logoFilePath)) {
|
||||
XWPFParagraph logo = header.createParagraph();
|
||||
logo.setAlignment(ParagraphAlignment.LEFT);
|
||||
XWPFRun run = logo.createRun();
|
||||
|
||||
String imgFile = logoFilePath;
|
||||
InputStream is = new FileInputStream(imgFile);
|
||||
XWPFPicture picture = run.addPicture(is, XWPFDocument.PICTURE_TYPE_PNG, imgFile, Units.toEMU(95), Units.toEMU(35));
|
||||
String blipID = "";
|
||||
for(XWPFPictureData picturedata : header.getAllPackagePictures()) { //这段必须有,不然打开的logo图片不显示
|
||||
blipID = header.getRelationId(picturedata);
|
||||
}
|
||||
picture.getCTPicture().getBlipFill().getBlip().setEmbed(blipID);
|
||||
run.addTab();
|
||||
is.close();
|
||||
}
|
||||
//页眉第二个段落展示日期------------------------------------------------------------
|
||||
XWPFParagraph paragraph = header.createParagraph();//创建新的段落
|
||||
paragraph.setAlignment(ParagraphAlignment.RIGHT);//段落文本的对齐方式
|
||||
XWPFRun run = paragraph.createRun();
|
||||
run.setText(month);
|
||||
|
||||
//页脚(三个段落分别展示3个内容)-----------------------------------------------------
|
||||
XWPFFooter footer = headerFooterPolicy.createFooter(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
|
||||
paragraph = footer.createParagraph();
|
||||
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
run = paragraph.createRun();
|
||||
run.setText("NIO Internal");
|
||||
|
||||
paragraph = footer.createParagraph();
|
||||
paragraph.setAlignment(ParagraphAlignment.LEFT);
|
||||
run = paragraph.createRun();
|
||||
run.setText("NIO.com");
|
||||
|
||||
//生成页码---------------------------------------------------------------------
|
||||
paragraph = footer.createParagraph();
|
||||
paragraph.setAlignment(ParagraphAlignment.RIGHT);
|
||||
run = paragraph.createRun();
|
||||
CTFldChar fldChar = run.getCTR().addNewFldChar();
|
||||
fldChar.setFldCharType(STFldCharType.Enum.forString("begin"));
|
||||
|
||||
run = paragraph.createRun();
|
||||
CTText ctText = run.getCTR().addNewInstrText();
|
||||
ctText.setStringValue("PAGE \\* MERGEFORMAT");
|
||||
ctText.setSpace(SpaceAttribute.Space.Enum.forString("preserve"));
|
||||
|
||||
fldChar = run.getCTR().addNewFldChar();
|
||||
fldChar.setFldCharType(STFldCharType.Enum.forString("end"));
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(1000)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1000));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
pageMar.setHeader(BigInteger.valueOf(500)); //页眉上边框到顶部的距离
|
||||
pageMar.setFooter(BigInteger.valueOf(800)); //页脚下边框到底部的距离
|
||||
}
|
||||
|
||||
/**
|
||||
* 主页面(只有页脚)
|
||||
* @param document
|
||||
* @param month
|
||||
*/
|
||||
@SneakyThrows
|
||||
public static void exportHeardAndFootMain(XWPFDocument document,String month){
|
||||
XWPFHeaderFooterPolicy headerFooterPolicy = document.getHeaderFooterPolicy();
|
||||
if (headerFooterPolicy == null) headerFooterPolicy = document.createHeaderFooterPolicy();
|
||||
// XWPFHeader header = headerFooterPolicy.createHeader(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
// XWPFParagraph paragraph = header.createParagraph();//创建新的段落
|
||||
// XWPFRun run = paragraph.createRun();
|
||||
|
||||
XWPFFooter footer = headerFooterPolicy.createFooter(XWPFHeaderFooterPolicy.DEFAULT);
|
||||
XWPFParagraph paragraph = footer.createParagraph();
|
||||
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
XWPFRun run = paragraph.createRun();
|
||||
run.setText("NIO Internal");
|
||||
run.setFontSize(18);
|
||||
run.setFontFamily("Blue Sky Standard Regular");
|
||||
// run.setFontFamily("Blue Sky Noto Regular");
|
||||
run.setBold(true);
|
||||
|
||||
|
||||
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
CTPageMar pageMar = sectPr.getPgMar();
|
||||
if (pageMar == null) pageMar = sectPr.addNewPgMar();
|
||||
pageMar.setLeft(BigInteger.valueOf(1000)); //左边距
|
||||
pageMar.setRight(BigInteger.valueOf(1000));//右边距
|
||||
pageMar.setTop(BigInteger.valueOf(1440)); //页眉高度
|
||||
pageMar.setBottom(BigInteger.valueOf(1440));//页脚高度
|
||||
|
||||
pageMar.setHeader(BigInteger.valueOf(500)); //页眉上边框到顶部的距离
|
||||
pageMar.setFooter(BigInteger.valueOf(1200)); //页脚下边框到底部的距离
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工具示例
|
||||
*
|
||||
@@ -126,27 +293,6 @@ public class WordUtil {
|
||||
Boolean isBold,
|
||||
String fontFamily) {
|
||||
|
||||
// CTSectPr sectPr = document.getDocument().getBody().addNewSectPr();
|
||||
// XWPFHeaderFooterPolicy policy = new XWPFHeaderFooterPolicy(document, sectPr);
|
||||
//
|
||||
// //添加页眉
|
||||
// CTP ctpHeader = CTP.Factory.newInstance();
|
||||
// CTR ctrHeader = ctpHeader.addNewR();
|
||||
// CTText ctHeader = ctrHeader.addNewT();
|
||||
// String headerText = "Java POI create MS word file.";
|
||||
// ctHeader.setStringValue(headerText);
|
||||
// XWPFParagraph headerParagraph = new XWPFParagraph(ctpHeader, document);
|
||||
// //设置为右对齐
|
||||
// headerParagraph.setAlignment(ParagraphAlignment.RIGHT);
|
||||
// XWPFParagraph[] parsHeader = new XWPFParagraph[1];
|
||||
// parsHeader[0] = headerParagraph;
|
||||
// try {
|
||||
// policy.createHeader(XWPFHeaderFooterPolicy.DEFAULT, parsHeader);
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
|
||||
//添加标题
|
||||
XWPFParagraph titleParagraph = document.createParagraph();
|
||||
//设置段落左对齐
|
||||
@@ -519,6 +665,7 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
||||
|
||||
tableRow.setHeight(500);
|
||||
CTTblWidth ctTblWidth0 = tableRow.getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
|
||||
@@ -54,8 +54,10 @@ public class workFlowController {
|
||||
jsonObject.put("loginUserId", currentUser.getId());
|
||||
jsonObject.put("loginUserName", currentUser.getUsername());
|
||||
if(StringUtils.equals(type,FlowTypeEnum.RWQRLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.RWQRLC.getProcessDefinitionKey()); //流程定义id
|
||||
return this.activiti_define_start(jsonObject);
|
||||
/*jsonObject.put("id", FlowTypeEnum.RWQRLC.getProcessDefinitionKey()); //流程定义id
|
||||
return this.activiti_define_start(jsonObject);*/
|
||||
jsonObject.put("processDefinitionKey", FlowTypeEnum.RWQRLC.getProcessDefinitionKey());
|
||||
return this.startTaskToConfirmProcess(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.SJFHXSHLC.getProcessDefinitionKey());
|
||||
initConditionAssessmentEO(jsonObject);
|
||||
@@ -203,4 +205,20 @@ public class workFlowController {
|
||||
public Result startLawsTechnologyEvaluationProcess(@RequestBody JSONObject jsonObject){
|
||||
return workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动流程-任务确认流程
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
public Result startTaskToConfirmProcess(@RequestBody JSONObject jsonObject){
|
||||
return workFlowFeignClient.startTaskToConfirmProcess(jsonObject);
|
||||
}
|
||||
|
||||
@AutoLog(value = "根据taskId删除流程")
|
||||
@ApiOperation(value="根据taskId删除流程", notes="根据taskId删除流程")
|
||||
@GetMapping("/deleteProcessInstanceByTaskId")
|
||||
public Result<String> deleteProcessInstanceByTaskId(@RequestParam("taskId")String taskId){
|
||||
return workFlowFeignClient.deleteProcessInstance(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ public interface WorkFlowFeignClient {
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByProjectLawsInventoryIds",method = RequestMethod.GET)
|
||||
Result<String> deleteProcessInstanceByProjectLawsInventoryIds(@RequestParam Map<String,Object> params);
|
||||
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByProjectLawsInventoryIds",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||
Result<String> deleteProcessInstanceByProjectLawsInventoryIds(String params);
|
||||
|
||||
/**
|
||||
* 流程实例明细列表
|
||||
@@ -146,6 +146,22 @@ public interface WorkFlowFeignClient {
|
||||
@RequestMapping(value = "/bat-wkflow/startLawsTechnologyEvaluationProcess",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||
Result<String> startLawsTechnologyEvaluationProcess(String jsonObject);
|
||||
|
||||
/**
|
||||
* 启动流程-任务确认流程
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/startTaskToConfirmProcess",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||
Result<String> startTaskToConfirmProcess(String jsonObject);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/task/completeLawsTechnologyEvaluationTaskByPids",method = RequestMethod.GET)
|
||||
Result<String> completeLawsTechnologyEvaluationTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds);
|
||||
|
||||
/**
|
||||
* 根据待办id删除流程
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByTaskId",method = RequestMethod.GET)
|
||||
Result<String> deleteProcessInstanceByTaskId(@RequestParam("taskId") String taskId);
|
||||
}
|
||||
|
||||
@@ -101,8 +101,8 @@ public class WorkFlowFeignClientImpl{
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Result<String> deleteProcessInstanceByProjectLawsInventoryIds(@RequestParam Map<String,Object> params){
|
||||
return workFlowFeignClient.deleteProcessInstanceByProjectLawsInventoryIds(params);
|
||||
public Result<String> deleteProcessInstanceByProjectLawsInventoryIds(@RequestBody JSONObject params){
|
||||
return workFlowFeignClient.deleteProcessInstanceByProjectLawsInventoryIds(params.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,4 +167,23 @@ public class WorkFlowFeignClientImpl{
|
||||
Result<String> stringWrapper = workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject.toString());
|
||||
return Result.OK(stringWrapper.getResult());
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动流程-任务确认流程
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
public Result startTaskToConfirmProcess(@RequestBody net.sf.json.JSONObject jsonObject){
|
||||
Result<String> stringWrapper = workFlowFeignClient.startTaskToConfirmProcess(jsonObject.toString());
|
||||
return Result.OK(stringWrapper.getResult());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据待办id删除流程
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> deleteProcessInstanceByTaskId(@RequestParam("taskId")String taskId){
|
||||
return workFlowFeignClient.deleteProcessInstance(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ spring:
|
||||
mvc:
|
||||
static-path-pattern: /**
|
||||
resource:
|
||||
static-locations: classpath:/static/,classpath:/public/,classpath:/home/
|
||||
static-locations: classpath:/static/,classpath:/public/,classpath:/home,/classpath:/nationalFlag/
|
||||
autoconfigure:
|
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||
datasource:
|
||||
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 305 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 127 KiB |