This commit is contained in:
杜建超 2020-11-03 17:24:02 +08:00
parent a7a6d7480e
commit 00f5dbdace
4 changed files with 29 additions and 1 deletions

View File

@ -75,4 +75,6 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
List<FlowRecord> selectFlowRecordByResultRecordId(@Param("resultRecordId") Long resultRecordId);
FlowRecord selectFlowRecordByRecordIdMinIdStatus(@Param("resultRecordId") Long resultRecordId, @Param("id") Long id, @Param("status") int status);
int batchUpdateExecution(@Param("recordIds")List<Long> recordIds,@Param("processId") Long processId);
}

View File

@ -13,6 +13,7 @@ import com.lz.modules.app.entity.StaffEntity;
import com.lz.modules.app.service.StaffService;
import com.lz.modules.flow.dao.EvaluationGroupMapper;
import com.lz.modules.flow.dao.EvaluationStartStaffMapper;
import com.lz.modules.flow.dao.FlowRecordMapper;
import com.lz.modules.flow.dao.FlowStartMapper;
import com.lz.modules.flow.entity.EvaluationGroup;
import com.lz.modules.flow.entity.EvaluationStartStaff;
@ -80,6 +81,10 @@ public class AssessManagerServiceImpl implements AssessManagerService {
private AssessService assessService;
@Autowired
private EvaluationGroupMapper evaluationGroupMapper;
@Autowired
private FlowRecordMapper flowRecordMapper;
public static final Long processId = 1L;
@ -271,7 +276,14 @@ public class AssessManagerServiceImpl implements AssessManagerService {
}
});
//更新flowRecord记录
List<Object> objects = resultRecordService.listObjs(new QueryWrapper<ResultRecord>()
.eq("is_delete", 0)
.eq("start_id", req.getStartId())
.eq("evaluation_id", evaluation).select("id"));
List<Long> collect = objects.stream().map(o -> Long.valueOf(String.valueOf(o))).collect(toList());
flowRecordMapper.batchUpdateExecution(collect,processId);
}

View File

@ -67,6 +67,8 @@ public class ChartResultServiceImpl implements ChartResultService {
@Autowired
private AssessService assessService;
private static final Long processId = 1L;
@Override
public List<ChartStatisticalRes> chartReport(Long startId,Long staffId) {
@ -246,7 +248,7 @@ public class ChartResultServiceImpl implements ChartResultService {
for(ChartStatistical statistical:process){
map.put(statistical.getDesc(),statistical.getNum());
}
List<FlowChart> charts = flowChartService.selectFlowChartByFlowManagerId(1L);
List<FlowChart> charts = flowChartService.selectFlowChartByFlowManagerId(processId);
for(FlowChart chart:charts){
ChartStatistical statistical = new ChartStatistical();

View File

@ -261,6 +261,18 @@
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and id > #{id} and status = #{status} order by id asc limit 1
</select>
<update id="batchUpdateExecution">
UPDATE lz_flow_record
SET status = 4
,gmt_modified = now()
where is_delete = 0 and status !=4 and flow_process = 2 and process_id = #{processId}
<if test="recordIds !=null and recordIds.size()!=0">
<foreach collection="recordIds" item="record_id" separator=",">
#{record_id}
</foreach>
)
</if>
</update>
</mapper>