From c733d08b2ddcbda4bd688bde38713887ebe91244 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 20 二月 2025 14:58:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java | 5 ++ business/src/main/resources/mapper/ProjectInfoMapper.xml | 3 + system/src/main/resources/mapper/system/SysDictDataMapper.xml | 6 ++ business/src/main/java/com/ycl/domain/entity/ProjectInfo.java | 6 ++ start/src/main/java/com/ycl/web/controller/system/SysDictDataController.java | 14 +++++++ business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java | 6 +++ business/src/main/java/com/ycl/domain/excel/ProjectTempImport.java | 3 + business/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java | 29 +++++++++++--- common/src/main/java/com/ycl/common/core/domain/entity/SysDictData.java | 14 ++++++- business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java | 7 ++- 10 files changed, 78 insertions(+), 15 deletions(-) diff --git a/business/src/main/java/com/ycl/domain/entity/ProjectInfo.java b/business/src/main/java/com/ycl/domain/entity/ProjectInfo.java index 0e32af5..2c0f4fa 100644 --- a/business/src/main/java/com/ycl/domain/entity/ProjectInfo.java +++ b/business/src/main/java/com/ycl/domain/entity/ProjectInfo.java @@ -39,9 +39,13 @@ private String constructionNature; @TableField("project_type") - /** 椤圭洰绫诲瀷锛�0鎴垮眿寤虹瓚锛�1鍩庡競鍩虹璁炬柦锛�2浜ら�氳繍杈擄紝3姘村埄锛�4鑳芥簮锛�5闈炵叅鐭垮北锛�6鍏朵粬锛� */ + /** 椤圭洰绫诲瀷 */ private String projectType; + @TableField("project_sub_type") + /** 椤圭洰瀛愮被鍨� */ + private String projectSubType; + @TableField("project_status") /** 椤圭洰鐘舵�� (0鏈紑宸ワ紝1宸插紑宸ワ紝2宸茬宸ワ紝3鏆傚仠) */ private String projectStatus; diff --git a/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java b/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java index 66e65a0..741d6f6 100644 --- a/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java +++ b/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java @@ -48,6 +48,12 @@ private String projectType; /** + * 椤圭洰绫诲瀷 + */ + @ExcelProperty(value = "椤圭洰瀛愮被鍨�",converter = ExcelEnumConvert.class) + private String projectSubType; + + /** * 椤圭洰鐘舵�� */ @ExcelProperty(value = "椤圭洰鐘舵��",converter = ExcelEnumConvert.class) diff --git a/business/src/main/java/com/ycl/domain/excel/ProjectTempImport.java b/business/src/main/java/com/ycl/domain/excel/ProjectTempImport.java index 055eba7..b8b6eb4 100644 --- a/business/src/main/java/com/ycl/domain/excel/ProjectTempImport.java +++ b/business/src/main/java/com/ycl/domain/excel/ProjectTempImport.java @@ -21,6 +21,9 @@ @ExcelProperty(value = "椤圭洰绫诲瀷") private String projectType; + @ExcelProperty(value = "椤圭洰瀛愮被鍨�") + private String projectSubType; + @ExcelProperty(value = "寤鸿鍐呭") private String content; diff --git a/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java b/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java index 7e6b757..35787ca 100644 --- a/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java +++ b/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java @@ -45,9 +45,12 @@ @ApiModelProperty("寤鸿鎬ц川") private String constructionNature; - @ApiModelProperty("椤圭洰绫诲瀷锛�0鎴垮眿寤虹瓚锛�1鍩庡競鍩虹璁炬柦锛�2浜ら�氳繍杈擄紝3姘村埄锛�4鑳芥簮锛�5闈炵叅鐭垮北锛�6鍏朵粬锛�") + @ApiModelProperty("椤圭洰绫诲瀷") private String projectType; + @ApiModelProperty("椤圭洰瀛愮被鍨�") + private String projectSubType; + @ApiModelProperty("椤圭洰鐘舵�� (0鏈紑宸ワ紝1宸插紑宸ワ紝2宸茬宸ワ紝3鏆傚仠)") private String projectStatus; diff --git a/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java b/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java index ed1c2da..52daaaa 100644 --- a/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java +++ b/business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java @@ -43,10 +43,13 @@ @ApiModelProperty("寤鸿鎬ц川") private String constructionNature; - /** 椤圭洰绫诲瀷锛�0鎴垮眿寤虹瓚锛�1鍩庡競鍩虹璁炬柦锛�2浜ら�氳繍杈擄紝3姘村埄锛�4鑳芥簮锛�5闈炵叅鐭垮北锛�6鍏朵粬锛� */ - @ApiModelProperty("椤圭洰绫诲瀷锛�0鎴垮眿寤虹瓚锛�1鍩庡競鍩虹璁炬柦锛�2浜ら�氳繍杈擄紝3姘村埄锛�4鑳芥簮锛�5闈炵叅鐭垮北锛�6鍏朵粬锛�") + /** 椤圭洰绫诲瀷 */ + @ApiModelProperty("椤圭洰绫诲瀷") private String projectType; + @ApiModelProperty("椤圭洰瀛愮被鍨�") + private String projectSubType; + /** 椤圭洰鐘舵�� (0鏈紑宸ワ紝1宸插紑宸ワ紝2宸茬宸ワ紝3鏆傚仠) */ @ApiModelProperty("椤圭洰鐘舵�� (0鏈紑宸ワ紝1宸插紑宸ワ紝2宸茬宸ワ紝3鏆傚仠)") private String projectStatus; diff --git a/business/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java b/business/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java index f4234ee..d638720 100644 --- a/business/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java +++ b/business/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java @@ -1249,21 +1249,30 @@ Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); // 娴佺▼鍙橀噺 Map<String, Object> parameters = new HashMap<>(); + List<FormDetailVO> beforeNodes = new ArrayList<>(); + String processInsId = ""; HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery().includeProcessVariables().finished().taskId(taskId).singleResult(); if (Objects.nonNull(historicTaskInstance)) { parameters = historicTaskInstance.getProcessVariables(); + processInsId = historicTaskInstance.getProcessInstanceId(); + beforeNodes = this.getBeforeNodeForm(parameters, historicTaskInstance.getFormKey(), historicTaskInstance.getName(), historicTaskInstance.getProcessDefinitionId(), historicTaskInstance.getTaskDefinitionKey(), Boolean.FALSE); } else { parameters = taskService.getVariables(taskId); + processInsId = task.getProcessInstanceId(); + beforeNodes = this.getBeforeNodeForm(parameters, task.getFormKey(), task.getName(), task.getProcessDefinitionId(), task.getTaskDefinitionKey(), Boolean.FALSE); } - List<FormDetailVO> beforeNodes = this.getBeforeNodeForm(parameters, task.getFormKey(), task.getName(), task.getProcessDefinitionId(), task.getTaskDefinitionKey(), Boolean.FALSE); // 鍒ゆ柇鍓嶇疆浠诲姟鏄笉鏄拰褰撳墠浠诲姟涓哄悓涓�涓猠xecuteId // 鍒ゆ柇褰撳墠浠诲姟鏄惁琚寕璧蜂腑 + String finalProcessInsId = processInsId; beforeNodes.stream().filter(node -> { - HistoricTaskInstance beforeTask = historyService.createHistoricTaskInstanceQuery().processInstanceId(task.getProcessInstanceId()).finished().taskDefinitionKey(node.getBeforeNodeDefId()).singleResult(); - return Objects.isNull(beforeTask); + if (node.getCurrent()) { + return Boolean.TRUE; + } + HistoricTaskInstance beforeTask = historyService.createHistoricTaskInstanceQuery().processInstanceId(finalProcessInsId).finished().taskDefinitionKey(node.getBeforeNodeDefId()).singleResult(); + return Objects.nonNull(beforeTask); }).forEach(node -> { if (node.getCurrent()) { - if (processLogService.taskIsHangup(taskId, task.getProcessInstanceId())) { + if (processLogService.taskIsHangup(taskId, finalProcessInsId)) { node.setTaskStatus(TaskStatusEnum.HANGUP); } } @@ -1285,16 +1294,22 @@ parameters = hisTask.getProcessVariables(); List<FormDetailVO> beforeNodes = this.getBeforeNodeForm(parameters, hisTask.getFormKey(), hisTask.getName(), hisTask.getProcessDefinitionId(), hisTask.getTaskDefinitionKey(), Boolean.TRUE); List<FormDetailVO> dataList = beforeNodes.stream().filter(node -> { - HistoricTaskInstance beforeTask = historyService.createHistoricTaskInstanceQuery().processInstanceId(task.getProcessInstanceId()).finished().taskDefinitionKey(node.getBeforeNodeDefId()).singleResult(); - return Objects.isNull(beforeTask); + if (node.getCurrent()) { + return Boolean.TRUE; + } + HistoricTaskInstance beforeTask = historyService.createHistoricTaskInstanceQuery().processInstanceId(hisTask.getProcessInstanceId()).finished().taskDefinitionKey(node.getBeforeNodeDefId()).singleResult(); + return Objects.nonNull(beforeTask); }).collect(Collectors.toList()); return AjaxResult.success(dataList); } else { parameters = taskService.getVariables(taskId); List<FormDetailVO> beforeNodes = this.getBeforeNodeForm(parameters, task.getFormKey(), task.getName(), task.getProcessDefinitionId(), task.getTaskDefinitionKey(), Boolean.TRUE); List<FormDetailVO> dataList = beforeNodes.stream().filter(node -> { + if (node.getCurrent()) { + return Boolean.TRUE; + } HistoricTaskInstance beforeTask = historyService.createHistoricTaskInstanceQuery().processInstanceId(task.getProcessInstanceId()).finished().taskDefinitionKey(node.getBeforeNodeDefId()).singleResult(); - return Objects.isNull(beforeTask); + return Objects.nonNull(beforeTask); }).collect(Collectors.toList()); return AjaxResult.success(dataList); } diff --git a/business/src/main/resources/mapper/ProjectInfoMapper.xml b/business/src/main/resources/mapper/ProjectInfoMapper.xml index 606c626..c3779e4 100644 --- a/business/src/main/resources/mapper/ProjectInfoMapper.xml +++ b/business/src/main/resources/mapper/ProjectInfoMapper.xml @@ -18,6 +18,7 @@ TPI.content, TPI.construction_nature, TPI.project_type, + TPI.project_sub_type, TPI.project_status, TPI.fund_type, TPI.invest_type, @@ -193,7 +194,7 @@ <select id="selectProjectDetailByIds" resultType="com.ycl.domain.vo.ProjectVO"> select - TPI.id as id,TPI.project_name,TPI.project_code,TPI.content,TPI.construction_nature,TPI.project_type,TPI.project_status,TPI.fund_type,TPI.invest_type,TPI.project_phase, + TPI.id as id,TPI.project_name,TPI.project_code,TPI.content,TPI.construction_nature,TPI.project_type,TPI.project_sub_type,TPI.project_status,TPI.fund_type,TPI.invest_type,TPI.project_phase, TPI.tag,TPI.competent_department,TPI.area,TPI.management_centralization,TPI.project_approval_type,TPI.importance_type,TPI.year,TPI.year_invest_amount,TPI.create_project_time,TPI.plan_start_time, TPI.plan_complete_time,TPI.win_unit,TPI.win_amount,TPI.win_time,TPI.project_address,TPI.longitude,TPI.latitude, TPI.project_owner_unit,TPI.project_contact_person,TPI.contact,TPI.gmt_create,TPI.gmt_update,TPI.update_by,TPI.create_by, diff --git a/common/src/main/java/com/ycl/common/core/domain/entity/SysDictData.java b/common/src/main/java/com/ycl/common/core/domain/entity/SysDictData.java index 2273964..b3c4045 100644 --- a/common/src/main/java/com/ycl/common/core/domain/entity/SysDictData.java +++ b/common/src/main/java/com/ycl/common/core/domain/entity/SysDictData.java @@ -11,7 +11,7 @@ /** * 瀛楀吀鏁版嵁琛� sys_dict_data - * + * * @author ycl */ public class SysDictData extends BaseEntity @@ -25,6 +25,8 @@ /** 瀛楀吀鎺掑簭 */ @Excel(name = "瀛楀吀鎺掑簭", cellType = ColumnType.NUMERIC) private Long dictSort; + + private Long parentId; /** 瀛楀吀鏍囩 */ @Excel(name = "瀛楀吀鏍囩") @@ -153,7 +155,15 @@ { this.status = status; } - + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/start/src/main/java/com/ycl/web/controller/system/SysDictDataController.java b/start/src/main/java/com/ycl/web/controller/system/SysDictDataController.java index aa2ba0c..97bf97d 100644 --- a/start/src/main/java/com/ycl/web/controller/system/SysDictDataController.java +++ b/start/src/main/java/com/ycl/web/controller/system/SysDictDataController.java @@ -97,6 +97,9 @@ @Log(title = "瀛楀吀鏁版嵁", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@Validated @RequestBody SysDictData dict) { + if (dict.getDictCode().equals(dict.getParentId())) { + return error("淇敼瀛楀吀'" + dict.getDictLabel() + "'澶辫触锛屼笂绾у瓧鍏镐笉鑳介�夋嫨鑷繁"); + } dict.setUpdateBy(getUsername()); return toAjax(dictDataService.updateDictData(dict)); } @@ -111,4 +114,15 @@ dictDataService.deleteDictDataByIds(dictCodes); return success(); } + + + /** + * 鑾峰彇瀛楀吀鍒楄〃锛堜笉鍒嗛〉锛� + */ + @PreAuthorize("@ss.hasPermi('system:dict:list')") + @GetMapping("/dataList") + public AjaxResult dataList(SysDictData dictData) { + List<SysDictData> list = dictDataService.selectDictDataList(dictData); + return success(list); + } } diff --git a/system/src/main/resources/mapper/system/SysDictDataMapper.xml b/system/src/main/resources/mapper/system/SysDictDataMapper.xml index 1bd884a..8cdd912 100644 --- a/system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/system/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -18,10 +18,11 @@ <result property="createTime" column="create_time" /> <result property="updateBy" column="update_by" /> <result property="updateTime" column="update_time" /> + <result property="parentId" column="parent_id" /> </resultMap> <sql id="selectDictDataVo"> - select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark + select dict_code, dict_sort,parent_id, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data </sql> @@ -75,6 +76,7 @@ update sys_dict_data <set> <if test="dictSort != null">dict_sort = #{dictSort},</if> + <if test="parentId != null">parent_id = #{parentId},</if> <if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if> <if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if> <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> @@ -96,6 +98,7 @@ <insert id="insertDictData" parameterType="SysDictData"> insert into sys_dict_data( <if test="dictSort != null">dict_sort,</if> + <if test="parentId != null">parent_id,</if> <if test="dictLabel != null and dictLabel != ''">dict_label,</if> <if test="dictValue != null and dictValue != ''">dict_value,</if> <if test="dictType != null and dictType != ''">dict_type,</if> @@ -108,6 +111,7 @@ create_time )values( <if test="dictSort != null">#{dictSort},</if> + <if test="parentId != null">#{parentId},</if> <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if> <if test="dictValue != null and dictValue != ''">#{dictValue},</if> <if test="dictType != null and dictType != ''">#{dictType},</if> -- Gitblit v1.8.0