Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0
This commit is contained in:
commit
184b530481
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.lz.modules.flow.entity.ResultTagetLib;
|
||||
import com.lz.modules.flow.model.ResultTagetLibDto;
|
||||
import com.lz.modules.flow.req.ResultTagetLibItemReq;
|
||||
import com.lz.modules.flow.req.ResultTagetLibSearchReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -45,4 +46,6 @@ public interface ResultTagetLibMapper extends BaseMapper<ResultTagetLib> {
|
||||
int insertResultTagetLibs(@Param("list") List<ResultTagetLib> inserts);
|
||||
|
||||
int updateResultTagetLibByIds(@Param("list") List<ResultTagetLib> inserts);
|
||||
|
||||
List<ResultTagetLibItemReq> selectResultTagetLibByModelReqId(Long id);
|
||||
}
|
||||
@ -132,7 +132,7 @@ public class FlowStartController {
|
||||
if(evaluationStartStaffs.size() > 0){
|
||||
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
||||
//下面初始化lz_flow流程表 lz_flow_approval_role流程审批表
|
||||
List<Flow> flows = new ArrayList<>();
|
||||
//List<Flow> flows = new ArrayList<>();
|
||||
List<FlowApprovalRole> flowApprovalRoles = new ArrayList<>();
|
||||
for (FlowChartDetailRecord flowChartDetailRecord:flowChartDetailRecords
|
||||
) {
|
||||
@ -174,6 +174,9 @@ public class FlowStartController {
|
||||
}
|
||||
//插入记录
|
||||
}
|
||||
if(flowApprovalRoles.size() > 0){
|
||||
|
||||
}
|
||||
|
||||
for (EvaluationStartStaff startStaff:evaluationStartStaffs
|
||||
) {
|
||||
|
||||
@ -36,24 +36,30 @@ public class ResultModelController {
|
||||
|
||||
@GetMapping("/getByGroupId")
|
||||
@ApiOperation(value="根据考核组id获取模板列表")
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultModelDto.class)})
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultModelDetailReq.class)})
|
||||
public R getByGroupId(@RequestParam @ApiParam("考核组ID") Long id) {
|
||||
|
||||
//List<ResultModel> resultModels = resultModelService.selectResultModelByGroupId(id);
|
||||
|
||||
return R.ok().put("data",getResultModelDto(id));
|
||||
}
|
||||
|
||||
private List<ResultModelDto> getResultModelDto(Long id){
|
||||
ResultModelDetailReq resultModelDetailReq = new ResultModelDetailReq();
|
||||
List<ResultModelItemReq> modelItems = new ArrayList<>();
|
||||
List<ResultModelDto> resultModelDtos = resultModelService.selectResultDtoByGroupId(id);
|
||||
for (ResultModelDto dto:resultModelDtos
|
||||
) {
|
||||
List<ResultTagetLibDto> libDtos = resultTagetLibService.selectResultTagetLibByModelId(dto.getId());
|
||||
dto.setTagetLibs(libDtos);
|
||||
resultModelDetailReq.setCalculateId(dto.getCalculateId());
|
||||
resultModelDetailReq.setEvaluationGroupId(dto.getEvaluationGroupId());
|
||||
resultModelDetailReq.setGradeStatus(dto.getGradeStatus());
|
||||
ResultModelItemReq itemReq = new ResultModelItemReq();
|
||||
BeanUtils.copyProperties(dto, itemReq);
|
||||
List<ResultTagetLibItemReq> req = resultTagetLibService.selectResultTagetLibByModelReqId(dto.getId());
|
||||
itemReq.setTagetLibItems(req);
|
||||
modelItems.add(itemReq);
|
||||
}
|
||||
return resultModelDtos;
|
||||
resultModelDetailReq.setModelItems(modelItems);
|
||||
return R.ok().put("data",resultModelDetailReq);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/getById")
|
||||
public R getById(@RequestBody ResultModel resultModel) {
|
||||
resultModel = resultModelService.selectResultModelById(resultModel.getId());
|
||||
|
||||
@ -5,6 +5,7 @@ import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.modules.flow.entity.ResultTagetLib;
|
||||
import com.lz.modules.flow.model.ResultTagetLibDto;
|
||||
import com.lz.modules.flow.req.ResultTagetLibItemReq;
|
||||
import com.lz.modules.flow.req.ResultTagetLibSearchReq;
|
||||
|
||||
import java.util.List;
|
||||
@ -45,4 +46,6 @@ public interface ResultTagetLibService extends IService<ResultTagetLib> {
|
||||
int insertResultTagetLibs(List<ResultTagetLib> inserts);
|
||||
|
||||
int updateResultTagetLibByIds(List<ResultTagetLib> inserts);
|
||||
|
||||
List<ResultTagetLibItemReq> selectResultTagetLibByModelReqId(Long id);
|
||||
}
|
||||
@ -7,6 +7,7 @@ import com.lz.modules.flow.dao.ResultTagetLibMapper;
|
||||
import com.lz.modules.flow.entity.ResultModel;
|
||||
import com.lz.modules.flow.entity.ResultTagetLib;
|
||||
import com.lz.modules.flow.model.ResultTagetLibDto;
|
||||
import com.lz.modules.flow.req.ResultTagetLibItemReq;
|
||||
import com.lz.modules.flow.req.ResultTagetLibSearchReq;
|
||||
import com.lz.modules.flow.service.ResultModelService;
|
||||
import com.lz.modules.performance.service.ResultTagetLibService;
|
||||
@ -119,6 +120,11 @@ public class ResultTagetLibServiceImpl extends ServiceImpl<ResultTagetLibMapper,
|
||||
return resultTagetLibMapper.updateResultTagetLibByIds(inserts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResultTagetLibItemReq> selectResultTagetLibByModelReqId(Long id){
|
||||
return resultTagetLibMapper.selectResultTagetLibByModelReqId(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -88,22 +88,23 @@
|
||||
update lz_evaluation_start_staff set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
<insert id="insertEvaluationStartStaffs" parameterType="EvaluationStartStaff" useGeneratedKeys="true" keyProperty="id" >
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
|
||||
insert into lz_evaluation_start_staff(
|
||||
<if test="item.evaluationId != null">evaluation_id, </if>
|
||||
<if test="item.startId != null">start_id, </if>
|
||||
<if test="item.staffId != null">staff_id, </if>
|
||||
<if test="item.type != null">type, </if>
|
||||
evaluation_id,
|
||||
start_id,
|
||||
staff_id,
|
||||
type,
|
||||
is_delete
|
||||
)values(
|
||||
<if test="item.evaluationId != null">#{ item.evaluationId}, </if>
|
||||
<if test="item.startId != null">#{ item.startId}, </if>
|
||||
<if test="item.staffId != null">#{ item.staffId}, </if>
|
||||
<if test="item.type != null">#{ item.type}, </if>
|
||||
)values
|
||||
<foreach collection="list" item="item" separator=",">(
|
||||
#{ item.evaluationId},
|
||||
#{ item.startId},
|
||||
#{ item.staffId},
|
||||
#{ item.type},
|
||||
0
|
||||
)
|
||||
</foreach>
|
||||
|
||||
;
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -118,33 +118,34 @@
|
||||
</select>
|
||||
|
||||
<insert id="insertFlowChartDetailRecords" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
insert into lz_flow_chart_detail_record(
|
||||
<if test="chartId != null">chart_id, </if>
|
||||
<if test="evaluationGroupId != null">evaluation_group_id, </if>
|
||||
<if test="status != null">status, </if>
|
||||
<if test="optIds != null">opt_ids, </if>
|
||||
<if test="optType != null">opt_type, </if>
|
||||
<if test="roleIds != null">role_ids, </if>
|
||||
<if test="stepType != null">step_type, </if>
|
||||
<if test="stepIndex != null">step_index, </if>
|
||||
<if test="weight != null">weight, </if>
|
||||
is_delete
|
||||
)values(
|
||||
|
||||
<if test="chartId != null">#{ item.chartId}, </if>
|
||||
<if test="evaluationGroupId != null">#{ item.evaluationGroupId}, </if>
|
||||
<if test="status != null">#{ item.status}, </if>
|
||||
<if test="optIds != null">#{ item.optIds}, </if>
|
||||
<if test="optType != null">#{ item.optType}, </if>
|
||||
<if test="roleIds != null">#{ item.roleIds}, </if>
|
||||
<if test="stepType != null">#{ item.stepType}, </if>
|
||||
<if test="stepIndex != null">#{ item.stepIndex}, </if>
|
||||
<if test="weight != null">#{ item.weight}, </if>
|
||||
insert into lz_flow_chart_detail_record(
|
||||
chart_id,
|
||||
evaluation_group_id,
|
||||
status,
|
||||
opt_ids,
|
||||
opt_type,
|
||||
role_ids,
|
||||
step_type,
|
||||
step_index,
|
||||
weight,
|
||||
is_delete
|
||||
)values
|
||||
<foreach collection="list" item="item" separator=",">(
|
||||
|
||||
#{ item.chartId},
|
||||
#{ item.evaluationGroupId},
|
||||
#{ item.status},
|
||||
#{ item.optIds},
|
||||
#{ item.optType},
|
||||
#{ item.roleIds},
|
||||
#{ item.stepType},
|
||||
#{ item.stepIndex},
|
||||
#{ item.weight},
|
||||
0
|
||||
)
|
||||
</foreach>
|
||||
|
||||
;
|
||||
</insert>
|
||||
|
||||
<update id="updateCoverFlowChartDetailRecordByIds" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
|
||||
@ -105,6 +105,7 @@
|
||||
</update>
|
||||
|
||||
<insert id="insertResultTagetLibs" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
|
||||
insert into lz_result_taget_lib(
|
||||
name,
|
||||
model_id,
|
||||
@ -122,7 +123,7 @@
|
||||
0
|
||||
)
|
||||
</foreach>
|
||||
|
||||
;
|
||||
</insert>
|
||||
|
||||
<update id="updateResultTagetLibByIds" parameterType="FlowChartDetailRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
@ -142,5 +143,9 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="selectResultTagetLibByModelReqId" resultType="com.lz.modules.flow.req.ResultTagetLibItemReq" >
|
||||
select id, is_delete, name, weight, key_result from lz_result_taget_lib where model_id=#{id} and is_delete = 0 order by order_by desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user