fuliqi
2025-02-20 c733d08b2ddcbda4bd688bde38713887ebe91244
Merge remote-tracking branch 'origin/master'
10个文件已修改
93 ■■■■ 已修改文件
business/src/main/java/com/ycl/domain/entity/ProjectInfo.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/excel/ProjectTempImport.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/resources/mapper/ProjectInfoMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/src/main/java/com/ycl/common/core/domain/entity/SysDictData.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
start/src/main/java/com/ycl/web/controller/system/SysDictDataController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
system/src/main/resources/mapper/system/SysDictDataMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
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)
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;
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;
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;
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);
        // 判断前置任务是不是和当前任务为同一个executeId
        // 判断当前任务是否被挂起中
        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);
        }
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,
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)
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);
    }
}
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>