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
57d9fcefe2
@ -366,9 +366,33 @@ public class ResultRecordController extends AbstractController {
|
|||||||
|
|
||||||
@PostMapping("/saveDetail")
|
@PostMapping("/saveDetail")
|
||||||
@ApiOperation("保存绩效详情-吴林")
|
@ApiOperation("保存绩效详情-吴林")
|
||||||
public R saveDetail(@RequestParam @ApiParam("绩效id") ResultRecordDetailDto dto) {
|
public R saveDetail(@RequestBody @ApiParam ResultRecordDetailDto dto) {
|
||||||
|
ResultRecord resultRecord = new ResultRecord();
|
||||||
|
BeanUtils.copyProperties(dto, resultRecord);
|
||||||
|
List<ResultDetail> inserts = new ArrayList<>();
|
||||||
|
List<ResultDetail> updates = new ArrayList<>();
|
||||||
|
for (ResultRecortModelDto model:dto.getRecortModelDtos()
|
||||||
|
) {
|
||||||
|
int index = 0;
|
||||||
|
for (ResultDetailDto detailDto:model.getDetailDtos()
|
||||||
|
) {//排序
|
||||||
|
ResultDetail resultDetail = new ResultDetail();
|
||||||
|
BeanUtils.copyProperties(detailDto, resultDetail);
|
||||||
|
resultDetail.setPriority(index);
|
||||||
|
index++;
|
||||||
|
if(resultDetail.getId() != null){
|
||||||
|
updates.add(resultDetail);
|
||||||
|
}else{
|
||||||
|
inserts.add(resultDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(inserts.size() > 0){
|
||||||
|
resultDetailService.saveBatch(inserts);
|
||||||
|
}
|
||||||
|
if(updates.size() > 0){
|
||||||
|
resultDetailService.updateBatchById(updates);
|
||||||
|
}
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ public interface EvaluationGroupMapper extends BaseMapper<EvaluationGroup> {
|
|||||||
int deleteEvaluationGroupById(@Param("id")Long id);
|
int deleteEvaluationGroupById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
List<EvaluationGroup> seleteEvaluationGroupByReq(@Param("page") IPage page, @Param("req") EvaluationGroupReq req);
|
List<EvaluationGroup> seleteEvaluationGroupByReq(@Param("page") IPage page, @Param("req") EvaluationGroupReq req, @Param("list") List<Long> gIds);
|
||||||
|
|
||||||
List<EvaluationGroup> selectEvaluationGroupByIds(@Param("ids") List<Long> ids);
|
List<EvaluationGroup> selectEvaluationGroupByIds(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ApiModel(value = "业绩详情Dto")
|
@ApiModel(value = "绩效详情Dto")
|
||||||
public class ResultRecordDetailDto {
|
public class ResultRecordDetailDto {
|
||||||
//
|
//
|
||||||
@ApiModelProperty(value = "", name = "id")
|
@ApiModelProperty(value = "", name = "id")
|
||||||
|
|||||||
@ -39,6 +39,9 @@ public class EvaluationGroupReq implements java.io.Serializable {
|
|||||||
@ApiModelProperty(value = "", name = "name")
|
@ApiModelProperty(value = "", name = "name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "startId", name = "发起id,任务id")
|
||||||
|
private Long startId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -13,8 +13,10 @@ import com.lz.modules.app.service.StaffOccupationService;
|
|||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.flow.dao.EvaluationGroupMapper;
|
import com.lz.modules.flow.dao.EvaluationGroupMapper;
|
||||||
import com.lz.modules.flow.entity.EvaluationGroup;
|
import com.lz.modules.flow.entity.EvaluationGroup;
|
||||||
|
import com.lz.modules.flow.entity.FlowStart;
|
||||||
import com.lz.modules.flow.req.EvaluationGroupReq;
|
import com.lz.modules.flow.req.EvaluationGroupReq;
|
||||||
import com.lz.modules.flow.service.EvaluationGroupService;
|
import com.lz.modules.flow.service.EvaluationGroupService;
|
||||||
|
import com.lz.modules.flow.service.FlowStartService;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -50,6 +52,9 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
@Autowired
|
@Autowired
|
||||||
private DepartmentsService departmentsService;
|
private DepartmentsService departmentsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FlowStartService flowStartService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -88,8 +93,24 @@ public class EvaluationGroupServiceImpl extends ServiceImpl<EvaluationGroupMappe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req){
|
public PageUtils selectEvaluationGroupByReq(EvaluationGroupReq req){
|
||||||
|
List<Long> gIds = null;
|
||||||
|
if(req.getStartId() != null){
|
||||||
|
FlowStart flowStart = flowStartService.selectFlowStartById(req.getStartId());
|
||||||
|
if(flowStart == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
gIds = Arrays.stream(flowStart.getGroupIds().split(","))
|
||||||
|
.map(new Function<String, Long>() {
|
||||||
|
@Override
|
||||||
|
public Long apply(String s) {
|
||||||
|
return Long.parseLong(s);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
List<Long> finalGIds = gIds;
|
||||||
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize())
|
PageUtils pageUtils = PageUtils.startPage(req.getCurrPage(), req.getPageSize())
|
||||||
.doSelect(page -> evaluationGroupMapper.seleteEvaluationGroupByReq(page, req));
|
.doSelect(page -> evaluationGroupMapper.seleteEvaluationGroupByReq(page, req, finalGIds));
|
||||||
//下面实时统计考核人数
|
//下面实时统计考核人数
|
||||||
List<EvaluationGroup> groups = pageUtils.getList();
|
List<EvaluationGroup> groups = pageUtils.getList();
|
||||||
for (EvaluationGroup group:groups
|
for (EvaluationGroup group:groups
|
||||||
|
|||||||
@ -96,9 +96,18 @@
|
|||||||
|
|
||||||
<select id="seleteEvaluationGroupByReq" resultType="EvaluationGroup" >
|
<select id="seleteEvaluationGroupByReq" resultType="EvaluationGroup" >
|
||||||
select * from lz_evaluation_group where is_delete = 0 and copy_id = 0
|
select * from lz_evaluation_group where is_delete = 0 and copy_id = 0
|
||||||
|
|
||||||
<if test="req.startTime != null"><![CDATA[and gmt_create > #{req.startTime}]]></if>
|
<if test="req.startTime != null"><![CDATA[and gmt_create > #{req.startTime}]]></if>
|
||||||
<if test="req.endTime != null"><![CDATA[and gmt_create < #{req.endTime}]]></if>
|
<if test="req.endTime != null"><![CDATA[and gmt_create < #{req.endTime}]]></if>
|
||||||
<if test="req.name != null and req.name != ''">and name like concat('%', #{req.name} '%') </if>
|
<if test="req.name != null and req.name != ''">and name like concat('%', #{req.name} '%') </if>
|
||||||
|
<if test="list != null">
|
||||||
|
and id in (
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
group by id
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEvaluationGroupByIds" resultType="EvaluationGroup" >
|
<select id="selectEvaluationGroupByIds" resultType="EvaluationGroup" >
|
||||||
|
|||||||
@ -467,7 +467,11 @@
|
|||||||
<foreach collection="ids" item="id" separator=",">
|
<foreach collection="ids" item="id" separator=",">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
) and occupation.staff_status=0
|
) and occupation.staff_status=0 order by field(staff.id,
|
||||||
|
<foreach collection="ids" item="id" separator=",">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDepatAllStaffInfos" resultType="com.lz.modules.app.dto.StaffDto">
|
<select id="getDepatAllStaffInfos" resultType="com.lz.modules.app.dto.StaffDto">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user