法规技术评估-流程明细处理评估人字段。
This commit is contained in:
+2
@@ -53,10 +53,12 @@ public class LawsTechnologyEvaluationFlowDetailEOController extends JeroControll
|
||||
public Result<?> queryPageList(LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationFlowDetailEO, req.getParameterMap());
|
||||
Page<LawsTechnologyEvaluationFlowDetailEO> page = new Page<LawsTechnologyEvaluationFlowDetailEO>(pageNo, pageSize);
|
||||
IPage<LawsTechnologyEvaluationFlowDetailEO> pageList = lawsTechnologyEvaluationFlowDetailEOService.page(page, queryWrapper);
|
||||
this.lawsTechnologyEvaluationFlowDetailEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -86,4 +87,7 @@ public class LawsTechnologyEvaluationFlowDetailEO implements Serializable {
|
||||
@ApiModelProperty(value = "评估人id")
|
||||
private java.lang.String evaluatorId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String evaluatorName;
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -67,4 +67,11 @@ public interface ILawsTechnologyEvaluationFlowDetailEOService extends IService<L
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<LawsTechnologyEvaluationFlowDetailEO> datas, String cut);
|
||||
}
|
||||
|
||||
+42
@@ -9,13 +9,18 @@ import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluation
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
@@ -27,6 +32,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@Service
|
||||
public class LawsTechnologyEvaluationFlowDetailEOServiceImpl extends ServiceImpl<LawsTechnologyEvaluationFlowDetailEOMapper, LawsTechnologyEvaluationFlowDetailEO> implements ILawsTechnologyEvaluationFlowDetailEOService {
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -126,4 +134,38 @@ public class LawsTechnologyEvaluationFlowDetailEOServiceImpl extends ServiceImpl
|
||||
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<LawsTechnologyEvaluationFlowDetailEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
for (LawsTechnologyEvaluationFlowDetailEO data : datas) {
|
||||
String evaluatorId = data.getEvaluatorId();
|
||||
if(StringUtils.isNotEmpty(evaluatorId)){
|
||||
userIdList.add(evaluatorId);
|
||||
}
|
||||
}
|
||||
List<SysUser> sysUserList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
sysUserList = sysUserService.querySysUserListByIdList(userIdList);
|
||||
}
|
||||
|
||||
for (LawsTechnologyEvaluationFlowDetailEO data : datas) {
|
||||
if(CollectionUtils.isNotEmpty(sysUserList)){
|
||||
String evaluatorId = data.getEvaluatorId();
|
||||
if(StringUtils.isNotEmpty(evaluatorId)){
|
||||
String evaluatorName = sysUserList.stream().filter(sysUser -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(sysUser.getId(), data.getEvaluatorId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(SysUser::getUsername).distinct().collect(Collectors.joining(","));
|
||||
data.setEvaluatorName(evaluatorName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user