Merge branch 'technology/rakor-w3' into technology-init-lhj1119
This commit is contained in:
commit
cf293ab289
|
|
@ -20,10 +20,10 @@ public class WorkingTypeQuery implements Serializable {
|
|||
@ApiModelProperty("名称")
|
||||
@NotBlank(message = "名称不能为空")
|
||||
@Length(max = 10, message = "名称不能超过10个字")
|
||||
private String name;
|
||||
private String workingTypeName;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
@NotBlank(message = "编号不能为空")
|
||||
@Length(max = 10, message = "编号不能超过10个字")
|
||||
private String code;
|
||||
private String workingTypeCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,18 +61,27 @@ public class CostConfigService {
|
|||
manday.setHourlyWages(technologyConfigService.getHourlyWages());
|
||||
manday.setBenefit(technologyConfigService.getBenefit());
|
||||
vo.setManday(manday);
|
||||
List<VirtualWorkingEntity> virtualWorkingEntities = virtualWorkingService.list();
|
||||
if (CollectionUtil.isNotEmpty(virtualWorkingEntities)) {
|
||||
List<VirtualWorkingItemVO> vos = Convert.toList(VirtualWorkingItemVO.class, virtualWorkingEntities);
|
||||
List<WorkingTypeEntity> workingTypeEntities = workingTypeService.list();
|
||||
vos.forEach(cvo -> {
|
||||
WorkingTypeEntity wt = workingTypeEntities.stream().filter(w -> Objects.equals(w.getId(), cvo.getWorkingTypeId())).findFirst().orElse(null);
|
||||
if (Objects.nonNull(wt)) {
|
||||
cvo.setWorkingTypeName(wt.getName());
|
||||
cvo.setWorkingTypeCode(wt.getCode());
|
||||
List<VirtualWorkingItemVO> vos = new ArrayList<>();
|
||||
vo.setVirtualWorking(vos);
|
||||
List<WorkingTypeEntity> workingTypeEntities = workingTypeService.list();
|
||||
if (CollectionUtil.isNotEmpty(workingTypeEntities)) {
|
||||
List<VirtualWorkingEntity> virtualWorkingEntities = virtualWorkingService.list();
|
||||
workingTypeEntities.forEach(wt -> {
|
||||
VirtualWorkingEntity vw = virtualWorkingEntities.stream()
|
||||
.filter(v -> Objects.equals(v.getWorkingTypeId(), wt.getId()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
VirtualWorkingItemVO itemVO;
|
||||
if (Objects.isNull(vw)) {
|
||||
itemVO = new VirtualWorkingItemVO();
|
||||
itemVO.setWorkingTypeId(wt.getId());
|
||||
} else {
|
||||
itemVO = Convert.convert(VirtualWorkingItemVO.class, vw);
|
||||
}
|
||||
itemVO.setWorkingTypeName(wt.getName());
|
||||
itemVO.setWorkingTypeCode(wt.getCode());
|
||||
vos.add(itemVO);
|
||||
});
|
||||
vo.setVirtualWorking(vos);
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ public class WorkingTypeService extends ServiceImpl<WorkingTypeMapper, WorkingTy
|
|||
list.forEach(l -> {
|
||||
if (Objects.isNull(l.getId()) || 0 == l.getId()) {
|
||||
WorkingTypeEntity entity = new WorkingTypeEntity();
|
||||
entity.setName(l.getName());
|
||||
entity.setCode(l.getCode());
|
||||
entity.setName(l.getWorkingTypeName());
|
||||
entity.setCode(l.getWorkingTypeCode());
|
||||
entity.setCreateBy(SessionUtil.getRealName());
|
||||
entity.setCreateTime(LocalDateTime.now());
|
||||
forAdd.add(entity);
|
||||
|
|
|
|||
Loading…
Reference in New Issue