From 839919c37a00a55bc57b21bcf519a113fcbd37ba Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期六, 22 二月 2025 17:22:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
business/src/main/resources/mapper/ProjectInfoMapper.xml | 13 ++++
flowable/src/main/java/com/ycl/service/impl/ProcessCodingServiceImpl.java | 21 ++++++
flowable/src/main/java/com/ycl/service/ProcessCodingService.java | 3 +
business/src/main/java/com/ycl/service/impl/ProcessConfigInfoServiceImpl.java | 1
flowable/src/main/java/com/ycl/mapper/ProcessCodingMapper.java | 2
start/src/main/resources/application.yml | 1
business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml | 2
business/src/main/java/com/ycl/mapper/ProjectInfoMapper.java | 4 +
flowable/src/main/resources/mapper/ProcessCodingMapper.xml | 3 +
business/src/main/java/com/ycl/service/ProcessConfigInfoService.java | 2
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java | 65 +++++++++++++++++----
business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java | 44 ++++++++++++--
business/src/main/java/com/ycl/task/FlowableTask.java | 13 ++--
flowable/src/main/java/com/ycl/domain/entity/ProcessCoding.java | 5 +
14 files changed, 151 insertions(+), 28 deletions(-)
diff --git a/business/src/main/java/com/ycl/mapper/ProjectInfoMapper.java b/business/src/main/java/com/ycl/mapper/ProjectInfoMapper.java
index f3b4467..8667a1f 100644
--- a/business/src/main/java/com/ycl/mapper/ProjectInfoMapper.java
+++ b/business/src/main/java/com/ycl/mapper/ProjectInfoMapper.java
@@ -1,5 +1,6 @@
package com.ycl.mapper;
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ycl.common.annotation.DataScope;
@@ -34,6 +35,7 @@
* 鍒嗛〉
*/
@DataScope(deptAlias = "d")
+ @InterceptorIgnore(tenantLine = "true")
IPage getPage(@Param("query") ProjectInfoQuery query, IPage page);
@DataScope(deptAlias = "d")
@@ -42,4 +44,6 @@
List<ProjectVO> selectProjectDetailByIds(@Param("dataIdList") List<Long> dataIdList);
ProjectInfo queryById(Integer recordId);
+
+ List<ProjectInfo> checkProjectNameAndIdIsUnique(@Param("id")Long id,@Param("name") String name,@Param("code")String code);
}
diff --git a/business/src/main/java/com/ycl/service/ProcessConfigInfoService.java b/business/src/main/java/com/ycl/service/ProcessConfigInfoService.java
index a1171e5..ef7df88 100644
--- a/business/src/main/java/com/ycl/service/ProcessConfigInfoService.java
+++ b/business/src/main/java/com/ycl/service/ProcessConfigInfoService.java
@@ -1,5 +1,6 @@
package com.ycl.service;
+import com.ycl.domain.entity.ProcessCoding;
import com.ycl.domain.entity.ProcessConfigInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.common.base.Result;
@@ -45,4 +46,5 @@
* @return
*/
Result getPage(ProcessConfigInfoQuery query);
+
}
diff --git a/business/src/main/java/com/ycl/service/impl/ProcessConfigInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProcessConfigInfoServiceImpl.java
index d16c1be..2a3c314 100644
--- a/business/src/main/java/com/ycl/service/impl/ProcessConfigInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProcessConfigInfoServiceImpl.java
@@ -117,4 +117,5 @@
}
return Result.ok().data(page.getRecords()).total(page.getTotal());
}
+
}
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
index 4213e49..47ece3d 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -113,8 +113,11 @@
entity.setCreateBy(userId);
entity.setUpdateBy(userId);
//濡傛灉鏄偍澶囬」鐩�(鏈紑宸ラ」鐩�)涓嶉渶瑕佸鏍�
- if(ProjectConstant.COMMIT.equals(entity.getUsedStatus()) && ProjectStatusEnum.PENDDING.getType().equals(entity.getProjectStatus())){
+ if (ProjectConstant.COMMIT.equals(entity.getUsedStatus()) && ProjectStatusEnum.PENDDING.getType().equals(entity.getProjectStatus())) {
entity.setUsedStatus(ProjectConstant.PASS);
+ }
+ if(!checkProjectNameAndIdIsUnique(entity,null)){
+ return Result.error("椤圭洰鍚嶆垨椤圭洰鐮佸凡瀛樺湪");
}
baseMapper.insert(entity);
addPlan(entity.getId()); //娣诲姞璁″垝琛�
@@ -127,12 +130,39 @@
fileService.saveBatch(fileList);
//娣诲姞椤圭洰涓爣鍗曚綅
- saveUnit(entity.getId(),form.getWinUnitList());
+ saveUnit(entity.getId(), form.getWinUnitList());
//娣诲姞骞村害鎶曡祫璁″垝
- saveYearPlan(entity.getId(),form.getYearPlanList());
+ saveYearPlan(entity.getId(), form.getYearPlanList());
return Result.ok("娣诲姞鎴愬姛").data(entity.getId());
}
+ /**
+ * 鍒ゆ柇椤圭洰鍚嶅拰椤圭洰鐮佹槸鍚﹀敮涓�
+ * @param entity from true 鏉ヨ嚜add() false 鏉ヨ嚜edit()
+ * @return
+ */
+ public boolean checkProjectNameAndIdIsUnique(ProjectInfo entity,Long updateId){
+ QueryWrapper<ProjectInfo> queryWrapper = new QueryWrapper<ProjectInfo>();
+ if (updateId == null) {
+
+ queryWrapper.eq("project_name", entity.getProjectName());
+
+ if (StringUtils.isNotEmpty(entity.getProjectCode())) {
+ queryWrapper.or();
+ queryWrapper.eq("project_code", entity.getProjectCode());
+ }
+
+ List<ProjectInfo> project = projectInfoMapper.selectList(queryWrapper);
+
+ return project == null || project.isEmpty();
+ }else {
+
+ List<ProjectInfo> project = projectInfoMapper.checkProjectNameAndIdIsUnique(updateId,entity.getProjectName(),entity.getProjectCode());
+
+ return project == null || project.isEmpty();
+ }
+
+ }
public void addPlan(Long projectInfoId) {
Plan plan = new Plan();
@@ -154,6 +184,7 @@
@Override
public Result update(ProjectInfoForm form) {
ProjectInfo entity = baseMapper.selectById(form.getId());
+
// 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊
Assert.notNull(entity, "璁板綍涓嶅瓨鍦�");
ProjectInfoForm.getEntityByForm(form, entity);
@@ -162,6 +193,9 @@
//濡傛灉鏄偍澶囬」鐩�(鏈紑宸ラ」鐩�)涓嶉渶瑕佸鏍�
if (ProjectConstant.COMMIT.equals(entity.getUsedStatus()) && ProjectStatusEnum.PENDDING.getType().equals(entity.getProjectStatus())) {
entity.setUsedStatus(ProjectConstant.PASS);
+ }
+ if(!checkProjectNameAndIdIsUnique(entity,form.getId())){
+ return Result.error("椤圭洰鍚嶆垨椤圭洰鐮佸凡瀛樺湪");
}
//鏇存柊椤圭洰淇℃伅
baseMapper.updateById(entity);
@@ -437,7 +471,8 @@
city.add(item);
} else if (ImportanceTypeEnum.SHEHONG_KEY.getType().equals(item.getImportanceType())) {
county.add(item);
- } else if (ImportanceTypeEnum.NORMAL.getType().equals(item.getImportanceType())) {
+ } else // if (ImportanceTypeEnum.NORMAL.getType().equals(item.getImportanceType()))
+ {
normal.add(item);
}
});
@@ -445,22 +480,22 @@
proPhaseCountVO.add(new IndexProPhaseCountVO("鍌ㄥ瑙勫垝闃舵", reserve.size(), reserve.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "鍌�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "鍌�"));
proPhaseCountVO.add(new IndexProPhaseCountVO("椤圭洰鍓嶆湡闃舵", previous.size(), previous.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "鏂�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "鏂�"));
proPhaseCountVO.add(new IndexProPhaseCountVO("瀹炴柦闃舵", implement.size(), implement.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "寤�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "寤�"));
proPhaseCountVO.add(new IndexProPhaseCountVO("绔e伐鎶曠敤闃舵", finish.size(), finish.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "绔�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "绔�"));
indexCountVO.setProPhaseCountVO(proPhaseCountVO);
@@ -468,22 +503,22 @@
impTypeCountVO.add(new IndexImpTypeCountVO("涓�鑸」鐩�", normal.size(), normal.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "鏅�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "鏅�"));
impTypeCountVO.add(new IndexImpTypeCountVO("鍘块噸鐐归」鐩�", county.size(), county.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "鍘�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "鍘�"));
impTypeCountVO.add(new IndexImpTypeCountVO("甯傞噸鐐归」鐩�", city.size(), city.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "甯�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "甯�"));
impTypeCountVO.add(new IndexImpTypeCountVO("鐪侀噸鐐归」鐩�", province.size(), province.stream().
filter(item -> !StringUtils.isEmpty(item.getTotalInvestment()))
.map(item -> new BigDecimal(item.getTotalInvestment()).setScale(2, RoundingMode.HALF_UP))
- .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("100000000"), 2, RoundingMode.HALF_UP).toString(), "鐪�"));
+ .reduce(BigDecimal.ZERO, BigDecimal::add).divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP).toString(), "鐪�"));
indexCountVO.setImpTypeCountVO(impTypeCountVO);
return indexCountVO;
}
@@ -774,12 +809,14 @@
@Transactional(rollbackFor = Exception.class)
public Result editProject(ProjectForm form) {
if (ObjectUtil.isNotNull(form.getProjectInfoForm())) {
+
if (ObjectUtil.isNull(form.getProjectInfoForm().getId())) {
//鏂板
- ((ProjectInfoServiceImpl) AopContext.currentProxy()).add(form.getProjectInfoForm());
+ return ((ProjectInfoServiceImpl) AopContext.currentProxy()).add(form.getProjectInfoForm());
+
} else {
//鏇存柊
- ((ProjectInfoServiceImpl) AopContext.currentProxy()).update(form.getProjectInfoForm());
+ return ((ProjectInfoServiceImpl) AopContext.currentProxy()).update(form.getProjectInfoForm());
}
}
if (ObjectUtil.isNotNull(form.getProjectInvestmentInfoForm())) {
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
index bc3f826..6ce896f 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
@@ -89,6 +89,7 @@
private final ISysDeptService deptService;
private final ProcessLogService processLogService;
private final ISysDictTypeService dictTypeService;
+ private final ProcessConfigInfoService processConfigInfoService;
/**
* 鍒嗛〉鏌ヨ
@@ -406,6 +407,20 @@
if (processLogService.taskIsHangup(task.getId(), task.getProcessInstanceId())) {
taskVO.setTaskStatus(TaskStatusEnum.HANGUP);
}
+
+ // 璁$畻鍔炵悊鏃堕棿
+ ProcessCoding processCoding = processCodingService.getByTaskId(task.getId());
+ if (processCoding != null) {
+ if (StringUtils.isNotBlank(processCoding.getOvertime())) {
+ Long overtime = getTime(processCoding.getOvertime());
+
+ long durationTime = ((new Date()).getTime() - processCoding.getStartTaskTime().getTime()) / 1000;
+
+ taskVO.setRemainingTime((overtime - durationTime) / 3600 + "灏忔椂");
+ } else {
+ taskVO.setRemainingTime("-");
+ }
+ }
this.distinctVo(taskVO);
vos.add(taskVO);
}
@@ -413,6 +428,23 @@
result.total(vos.size());
}
result.put("taskList", vos);
+ }
+
+ private Long getTime(String timeStr) {
+ Long time = null;
+ if (StringUtils.isNotBlank(timeStr)) {
+ String[] timeArr = timeStr.split("-");
+ // 瑙f瀽澶╂暟鍜屽皬鏃舵暟
+ int days = Integer.parseInt(timeArr[0]);
+ int hours = 0;
+ if (timeArr.length > 1) {
+ hours = Integer.parseInt(timeArr[1]);
+ }
+ time = (days * 24L + hours) * 3600L;
+// //鍒�-绉�
+// time= (days * 60L) + hours;
+ }
+ return time;
}
@Override
@@ -606,7 +638,7 @@
jsonData.setAfterHandlerIds(afterHandlerIds);
jsonData.setAfterHandlerType(form.getPeopleType());
// 鍙戝竷杞姙浜嬩欢
- publisher.publishEvent(new TaskLogEvent(this, null,SecurityUtils.getUserId(), form.getProjectId(), form.getProcessInsId(), task.getId(), task.getName(),ProcessLogEventTypeEnum.DELEGATE, jsonData));
+ publisher.publishEvent(new TaskLogEvent(this, null, SecurityUtils.getUserId(), form.getProjectId(), form.getProcessInsId(), task.getId(), task.getName(), ProcessLogEventTypeEnum.DELEGATE, jsonData));
return Result.ok("杞姙鎴愬姛");
}
@@ -617,7 +649,7 @@
Task task = taskService.createTaskQuery().taskId(form.getTaskId()).processInstanceId(form.getProcessInsId()).singleResult();
if (Objects.nonNull(task)) {
// 娣诲姞璺宠繃鏃ュ織
- publisher.publishEvent(new TaskLogEvent(this, null,SecurityUtils.getUserId(), form.getProjectId(), form.getProcessInsId(), form.getTaskId(), task.getName(),ProcessLogEventTypeEnum.JUMP, new JumpData(form.getDesc())));
+ publisher.publishEvent(new TaskLogEvent(this, null, SecurityUtils.getUserId(), form.getProjectId(), form.getProcessInsId(), form.getTaskId(), task.getName(), ProcessLogEventTypeEnum.JUMP, new JumpData(form.getDesc())));
// 鏌ュ嚭璇ヤ换鍔$粦瀹氱殑琛ㄥ崟
Map<String, Object> data = new HashMap<>(1);
@@ -661,7 +693,7 @@
}
dataList.add(jsonData);
//娣诲姞鐫e姙鏃ュ織
- publisher.publishEvent(new TaskLogEvent(this, processLog.getId(), processLog.getUserId(), form.getProjectId(), form.getProcessInsId(), form.getTaskId(), task.getName(),ProcessLogEventTypeEnum.SUPERVISE, dataList));
+ publisher.publishEvent(new TaskLogEvent(this, processLog.getId(), processLog.getUserId(), form.getProjectId(), form.getProcessInsId(), form.getTaskId(), task.getName(), ProcessLogEventTypeEnum.SUPERVISE, dataList));
return Result.ok("鎿嶄綔鎴愬姛");
}
@@ -691,7 +723,7 @@
task.getName(),
ProcessLogEventTypeEnum.HANGUP,
new HangupData(form.getReason())
- ));
+ ));
return Result.ok("鎿嶄綔鎴愬姛");
}
@@ -747,11 +779,11 @@
newV.put(task.getTaskDefinitionKey() + "&" + key, form.getVariables().get(key));
//瀛楀吀閲屾湁灏辨斁鍏ユ祦绋嬪彉閲忎腑
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(dictList) && dictList.contains(key)) {
- processVariables.put(key,form.getVariables().get(key));
+ processVariables.put(key, form.getVariables().get(key));
}
}
}
- if( !processVariables.isEmpty() ) {
+ if (!processVariables.isEmpty()) {
taskService.setVariables(form.getTaskId(), processVariables);
}
diff --git a/business/src/main/java/com/ycl/task/FlowableTask.java b/business/src/main/java/com/ycl/task/FlowableTask.java
index 94a3ef8..37bc466 100644
--- a/business/src/main/java/com/ycl/task/FlowableTask.java
+++ b/business/src/main/java/com/ycl/task/FlowableTask.java
@@ -44,6 +44,7 @@
private ProcessLogService processLogService;
@Autowired
private ProcessLogMapper processLogMapper;
+
/**
* 璧嬬爜浠诲姟
* 涓や釜閫昏緫 鏀归」鐩爜銆佹敼鑺傜偣棰滆壊
@@ -111,17 +112,16 @@
durationTime = subNodeHangupTime(hangupLogMap, task, durationTime);
String status = GREEN; // 榛樿鐘舵�佷负缁胯壊
- if (redTime != null && redTime !=0 && durationTime >= redTime) {
+ if (redTime != null && redTime != 0 && durationTime >= redTime) {
status = RED; // 濡傛灉瓒呰繃绾㈣壊鏃堕棿闃堝�硷紝鍒欑姸鎬佷负绾㈣壊
- } else if (yellowTime != null && yellowTime !=0 && durationTime >= yellowTime) {
+ } else if (yellowTime != null && yellowTime != 0 && durationTime >= yellowTime) {
status = YELLOW; // 鍚﹀垯锛屽鏋滆秴杩囬粍鑹叉椂闂撮槇鍊硷紝鍒欑姸鎬佷负榛勮壊
}
//澶勭悊鍔炵悊鏈熼檺
String overtimeStatus = NORMAL;
- if (overtime != null && overtime !=0 && durationTime >= overtime) {
+ if (overtime != null && overtime != 0 && durationTime >= overtime) {
overtimeStatus = OVERTIME; // 濡傛灉瓒呰繃鍔炵悊鏈熼檺
- }
- else if (overtime != null && overtime != 0 && durationTime >= (overtime - 12 * 60 * 60)) {
+ } else if (overtime != null && overtime != 0 && durationTime >= (overtime - 12 * 60 * 60)) {
overtimeStatus = WILLOVERTIME; // 濡傛灉涓存湡(鍥哄畾瓒呮椂鍓�12灏忔椂涓轰复鏈�)
}
// else if (overtime != null && overtime != 0 && durationDay >= (overtime - 60)) {
@@ -130,9 +130,10 @@
map.get(status).add(task.getProcessInstanceId());
processCoding.setStatus(status);
processCoding.setOvertimeStatus(overtimeStatus);
+ processCoding.setStartTaskTime(task.getCreateTime());
list.add(processCoding);
} catch (Exception e) {
- log.error(e.getMessage(),"璧嬬爜鏃堕棿鏍煎紡鏈夎");
+ log.error(e.getMessage(), "璧嬬爜鏃堕棿鏍煎紡鏈夎");
}
}
//鏇存柊椤圭洰鐮�
diff --git a/business/src/main/resources/mapper/ProjectInfoMapper.xml b/business/src/main/resources/mapper/ProjectInfoMapper.xml
index 7364d0c..5875ad5 100644
--- a/business/src/main/resources/mapper/ProjectInfoMapper.xml
+++ b/business/src/main/resources/mapper/ProjectInfoMapper.xml
@@ -234,4 +234,17 @@
<select id="queryById" resultType="com.ycl.domain.entity.ProjectInfo">
select * from t_project_info where id = #{id} and deleted = 0
</select>
+
+ <resultMap id="pInfo" type="com.ycl.domain.entity.ProjectInfo">
+ <id column="id" property="id"/>
+ </resultMap>
+ <select id="checkProjectNameAndIdIsUnique" resultMap="pInfo">
+ select p.id from t_project_info p where p.project_name =#{name}
+ <if test="code !=null and code !=''">
+ or p.project_code =#{code}
+ </if>
+ having p.id != #{id}
+
+ </select>
+
</mapper>
diff --git a/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml b/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml
index 0490ee3..bac2ea6 100644
--- a/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml
+++ b/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml
@@ -189,7 +189,7 @@
from t_project_plan_examine_record ppe
LEFT JOIN t_project_plan_info ppi on ppe.project_plan_info_id = ppi.id
LEFT JOIN t_project_plan_record ppr on ppe.project_plan_record_id = ppr.id
- INNER JOIN t_project_info pi on ppr.project_info_id = pi.id AND pi.deleted = 0
+ Left JOIN t_project_info pi on ppr.project_info_id = pi.id AND pi.deleted = 0
WHERE ppe.department_user_id = #{userId} or manager_user_id = #{userId}
</select>
diff --git a/flowable/src/main/java/com/ycl/domain/entity/ProcessCoding.java b/flowable/src/main/java/com/ycl/domain/entity/ProcessCoding.java
index 72ab5ee..11ecc79 100644
--- a/flowable/src/main/java/com/ycl/domain/entity/ProcessCoding.java
+++ b/flowable/src/main/java/com/ycl/domain/entity/ProcessCoding.java
@@ -5,6 +5,8 @@
import com.ycl.system.domain.base.AbsEntity;
import lombok.Data;
+import java.util.Date;
+
/**
*
*
@@ -52,4 +54,7 @@
@TableField("overtime_status")
/** 浠诲姟瓒呮椂鐘舵�� */
private String overtimeStatus;
+
+ @TableField("start_task_time")
+ private Date startTaskTime;
}
diff --git a/flowable/src/main/java/com/ycl/mapper/ProcessCodingMapper.java b/flowable/src/main/java/com/ycl/mapper/ProcessCodingMapper.java
index 829157c..f5ccb6d 100644
--- a/flowable/src/main/java/com/ycl/mapper/ProcessCodingMapper.java
+++ b/flowable/src/main/java/com/ycl/mapper/ProcessCodingMapper.java
@@ -36,4 +36,6 @@
* @param list
*/
void updateBatch(@Param("list") List<ProcessCoding> list);
+
+ List<ProcessCoding> findByTaskId(@Param("taskId") String taskId);
}
diff --git a/flowable/src/main/java/com/ycl/service/ProcessCodingService.java b/flowable/src/main/java/com/ycl/service/ProcessCodingService.java
index a270408..ad24d08 100644
--- a/flowable/src/main/java/com/ycl/service/ProcessCodingService.java
+++ b/flowable/src/main/java/com/ycl/service/ProcessCodingService.java
@@ -63,4 +63,7 @@
* @return
*/
Result all();
+
+
+ ProcessCoding getByTaskId(String id);
}
diff --git a/flowable/src/main/java/com/ycl/service/impl/ProcessCodingServiceImpl.java b/flowable/src/main/java/com/ycl/service/impl/ProcessCodingServiceImpl.java
index a40d634..bea89f4 100644
--- a/flowable/src/main/java/com/ycl/service/impl/ProcessCodingServiceImpl.java
+++ b/flowable/src/main/java/com/ycl/service/impl/ProcessCodingServiceImpl.java
@@ -1,6 +1,8 @@
package com.ycl.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.common.base.Result;
import com.ycl.domain.entity.ProcessCoding;
@@ -19,7 +21,7 @@
import java.util.stream.Collectors;
/**
- * 鏈嶅姟瀹炵幇绫�
+ * 鏈嶅姟瀹炵幇绫�
*
* @author flq
* @since 2025-01-02
@@ -32,6 +34,7 @@
/**
* 娣诲姞
+ *
* @param form
* @return
*/
@@ -44,6 +47,7 @@
/**
* 淇敼
+ *
* @param form
* @return
*/
@@ -60,6 +64,7 @@
/**
* 鎵归噺鍒犻櫎
+ *
* @param ids
* @return
*/
@@ -71,6 +76,7 @@
/**
* id鍒犻櫎
+ *
* @param id
* @return
*/
@@ -82,6 +88,7 @@
/**
* 鍒嗛〉鏌ヨ
+ *
* @param query
* @return
*/
@@ -94,6 +101,7 @@
/**
* 鏍规嵁id鏌ユ壘
+ *
* @param id
* @return
*/
@@ -106,6 +114,7 @@
/**
* 鍒楄〃
+ *
* @return
*/
@Override
@@ -116,4 +125,14 @@
.collect(Collectors.toList());
return Result.ok().data(vos);
}
+
+ @Override
+ public ProcessCoding getByTaskId(String taskId) {
+
+ List<ProcessCoding> list = baseMapper.findByTaskId(taskId);
+ if (list.size() > 0) {
+ return list.get(0);
+ }
+ return null;
+ }
}
diff --git a/flowable/src/main/resources/mapper/ProcessCodingMapper.xml b/flowable/src/main/resources/mapper/ProcessCodingMapper.xml
index ad0c884..4febc7a 100644
--- a/flowable/src/main/resources/mapper/ProcessCodingMapper.xml
+++ b/flowable/src/main/resources/mapper/ProcessCodingMapper.xml
@@ -52,6 +52,9 @@
WHERE
TPC.deleted = 0
</select>
+ <select id="findByTaskId" resultType="com.ycl.domain.entity.ProcessCoding">
+ SELECT * from t_process_coding where task_id = #{taskId}
+ </select>
<!-- 鑷畾涔夋壒閲忔洿鏂�,浣跨敤鍓嶅垽鏂璴ist鏄惁涓虹┖ 杞崲涓簊ql
update t_process_coding
diff --git a/start/src/main/resources/application.yml b/start/src/main/resources/application.yml
index 3be20ad..5e1ce3d 100644
--- a/start/src/main/resources/application.yml
+++ b/start/src/main/resources/application.yml
@@ -5,6 +5,7 @@
# 瀹炰綋鎵弿锛屽涓猵ackage鐢ㄩ�楀彿鎴栬�呭垎鍙峰垎闅�
typeAliasesPackage: com.ycl.**.domain
configuration:
+ shrink-whitespaces-in-sql: true #浠嶴QL涓垹闄ゅ浣欑殑绌烘牸瀛楃
default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler # 閫氱敤鏋氫妇澶勭悊鍣�
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 鏃ュ織鎵撳嵃
global-config:
--
Gitblit v1.8.0