合并分支 'dev_third_stage' 到 'master'
Dev third stage 查看合并请求 laws-nio/laws-weilai!79
This commit is contained in:
@@ -334,3 +334,28 @@ INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_ti
|
||||
INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `sys_dict_id`, `has_child`, `en_name`, `description`, `is_tag_dict`, `attribute_type`, `is_read_only`, `del_flag`, `item_value`, `sort_order`) VALUES ('1546745318161055745', '1546745025973256194', '评1+1', NULL, 'admin', '2022-07-12 14:36:36', NULL, NULL, 'A01', '1546744902203539458', NULL, 'P1+1', NULL, 1, NULL, NULL, 0, NULL, 1);
|
||||
|
||||
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1546744902203539458', '评估方式', 'evaluation_method', '评估方式', 0, 'admin', '2022-07-12 14:34:56', NULL, NULL, NULL, NULL, 1, 0, '2', 1);
|
||||
|
||||
-- 参数项清单 修改字段长度 2022-07-12
|
||||
ALTER TABLE `laws_weilai`.`params_info`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`cert_category_params_info`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_info_publish`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`cert_category_params_info_publish`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_collect_manifest_history`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_batch`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`params_report_detail`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`;
|
||||
|
||||
ALTER TABLE `laws_weilai`.`report_cert_category_params_info`
|
||||
MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`;
|
||||
+3
-1
@@ -48,7 +48,9 @@
|
||||
<if test="paramsCollectManifestEO.paramsManifestId !=null and paramsCollectManifestEO.paramsManifestId !=''">
|
||||
AND params_manifest_id = #{paramsCollectManifestEO.paramsManifestId}
|
||||
</if>
|
||||
|
||||
<if test="paramsCollectManifestEO.state !=null and paramsCollectManifestEO.state !=''">
|
||||
AND state = #{paramsCollectManifestEO.state}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
+2
-2
@@ -1211,7 +1211,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
|
||||
// 参数说明
|
||||
String description = dto.getDescription();
|
||||
resultMap = validateMustAndLength(description,"参数说明", "Description", IsMustEnum.NO.getValue(),"200",false,cut);
|
||||
resultMap = validateMustAndLength(description,"参数说明", "Description", IsMustEnum.NO.getValue(),"1000",false,cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
@@ -1405,7 +1405,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
countError += (int)resultMap.get("countError");
|
||||
// 参数说明
|
||||
String description = ccDto.getDescription();
|
||||
resultMap = validateMustAndLength(description, "参数说明", "Description", IsMustEnum.NO.getValue(),"200", false, cut);
|
||||
resultMap = validateMustAndLength(description, "参数说明", "Description", IsMustEnum.NO.getValue(),"1000", false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
|
||||
+3
-2
@@ -13,8 +13,9 @@ import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -27,7 +28,7 @@ import java.util.UUID;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class ParamsInfoPublishEOServiceImpl extends ServiceImpl<ParamsInfoPublishEOMapper, ParamsInfoPublishEO> implements IParamsInfoPublishEOService {
|
||||
|
||||
@Autowired
|
||||
|
||||
+2
@@ -5757,11 +5757,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//下拉选处理数据字典
|
||||
for (Map record : records) {
|
||||
Map<String, Object> record1 = (Map) record;
|
||||
String technology_territory = (String)record1.get("technology_territory");
|
||||
for (Map.Entry<String, Object> entry : record1.entrySet()) {
|
||||
//下拉选处理数据字典
|
||||
dictItem(sysDictItems, entry, cut, fieldList,null);
|
||||
treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||
}
|
||||
record1.put("technology_territory_id",technology_territory);
|
||||
}
|
||||
return infoPage;
|
||||
}
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public class LawsOpinionGatherEO implements Serializable {
|
||||
private String technologyTerritory;
|
||||
@TableField(exist = false)
|
||||
/**技术领域展示字段*/
|
||||
private String technologyTerritoryShow;
|
||||
private String technologyTerritoryName;
|
||||
|
||||
/**收集结果*/
|
||||
@Excel(name = "收集结果", width = 15)
|
||||
|
||||
+9
-5
@@ -156,8 +156,8 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
@Override
|
||||
public void exportXls(HttpServletResponse response, HttpServletRequest request, LawsOpinionAssessmentResultEO lawsOpinionAssessmentResultEO, Map<String,Object> params) {
|
||||
|
||||
Integer pageNo = (Integer) params.get("pageNo");
|
||||
Integer pageSize = (Integer) params.get("pageSize");
|
||||
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
String exportAll = (String)params.get("exportAll");
|
||||
String ids = (String)params.get("ids");
|
||||
String cut = (String)params.get("cut");
|
||||
@@ -191,6 +191,8 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
|
||||
String path = uploadpath + "/tempZip/evaluationResults/" + System.currentTimeMillis();
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + fileName);
|
||||
@@ -227,12 +229,13 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
dataRow.createCell(5).setCellValue(submitTimeStr);
|
||||
}
|
||||
}
|
||||
|
||||
if ("excel".equals(exportType)) {
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
}else {
|
||||
String path = uploadpath + "/tempZip/evaluationResults";
|
||||
|
||||
File fileTemp = new File(path);
|
||||
if (fileTemp.exists()) {
|
||||
fileTemp.delete();
|
||||
@@ -282,6 +285,7 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
}
|
||||
os.flush();
|
||||
fis.close();
|
||||
excelOS.close();
|
||||
}
|
||||
|
||||
}catch (IOException ex){
|
||||
@@ -292,9 +296,9 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl<LawsOp
|
||||
}
|
||||
}finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
File file = new File(uploadpath + "/tempZip/evaluationResults");
|
||||
File file = new File(path);
|
||||
FileUtil.deleteContents(file);
|
||||
File fileTemp = new File(uploadpath + "/tempZip/evaluationResults.zip");
|
||||
File fileTemp = new File(path + ".zip");
|
||||
FileUtil.deleteContents(fileTemp);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
}
|
||||
if(StringUtils.isNotEmpty(lawsOpinionGather.getTechnologyTerritory())){
|
||||
String technologyTerritoryShow = disposeTechnologyTerritory(technologyTerritoryList, lawsOpinionGather.getTechnologyTerritory(), cut);
|
||||
lawsOpinionGather.setTechnologyTerritoryShow(technologyTerritoryShow);
|
||||
lawsOpinionGather.setTechnologyTerritoryName(technologyTerritoryShow);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(lawsOpinionGather.getOpinionArchiveId())){
|
||||
List<OSSFile> opinionArchiveFileList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(lawsOpinionGather.getOpinionArchiveId(), ","));
|
||||
|
||||
+2
@@ -53,10 +53,12 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
public Result<?> queryPageList(LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationEO, req.getParameterMap());
|
||||
Page<LawsTechnologyEvaluationEO> page = new Page<LawsTechnologyEvaluationEO>(pageNo, pageSize);
|
||||
IPage<LawsTechnologyEvaluationEO> pageList = lawsTechnologyEvaluationEOService.page(page, queryWrapper);
|
||||
this.lawsTechnologyEvaluationEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
+7
@@ -6,6 +6,7 @@ import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
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;
|
||||
@@ -82,16 +83,22 @@ public class LawsTechnologyEvaluationEO implements Serializable {
|
||||
@Excel(name = "技术领域", width = 15)
|
||||
@ApiModelProperty(value = "技术领域")
|
||||
private String technologyTerritory;
|
||||
@TableField(exist = false)
|
||||
private String technologyTerritoryName;
|
||||
|
||||
/**评估方式*/
|
||||
@Excel(name = "评估方式", width = 15)
|
||||
@ApiModelProperty(value = "评估方式")
|
||||
private String evaluationMethods;
|
||||
@TableField(exist = false)
|
||||
private String evaluationMethodsName;
|
||||
|
||||
/**流程状态*/
|
||||
@Excel(name = "流程状态", width = 15)
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private String flowStatus;
|
||||
@TableField(exist = false)
|
||||
private String flowStatusName;
|
||||
|
||||
/**发起日期*/
|
||||
@Excel(name = "发起日期", width = 15, format = "yyyy-MM-dd")
|
||||
|
||||
+7
@@ -67,4 +67,11 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param records
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<LawsTechnologyEvaluationEO> records, String cut);
|
||||
}
|
||||
|
||||
+52
-2
@@ -3,20 +3,26 @@ package com.jero.modules.lawsTechnologyEvaluation.service.impl;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
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.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
@@ -28,6 +34,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@Service
|
||||
public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationEOMapper, LawsTechnologyEvaluationEO> implements ILawsTechnologyEvaluationEOService {
|
||||
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -122,4 +131,45 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<LawsTechnologyEvaluationEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
for (LawsTechnologyEvaluationEO data : datas) {
|
||||
if(StringUtils.isNotEmpty(data.getEvaluationMethods())){
|
||||
List<String> evaluationMethodsList = Arrays.asList(data.getEvaluationMethods().split(","));
|
||||
String name = getTreeName(cut, categoryList, evaluationMethodsList);
|
||||
data.setEvaluationMethodsName(name);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(data.getFlowStatus())){
|
||||
data.setFlowStatusName(GatherResultEnum.getTextByValue(data.getFlowStatus(),cut));
|
||||
}
|
||||
if(StringUtils.isNotEmpty(data.getTechnologyTerritory())){
|
||||
List<String> technologyTerritory = Arrays.asList(data.getTechnologyTerritory().split(","));
|
||||
String name = getTreeName(cut, categoryList, technologyTerritory);
|
||||
data.setTechnologyTerritoryName(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
} else {
|
||||
sb.append(collect.get(0).getEnName()+ ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
String technologyTerritoryName = "";
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
return technologyTerritoryName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user