奖惩
This commit is contained in:
@ -397,6 +397,7 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
vo.setUploadFile("部分上传");
|
vo.setUploadFile("部分上传");
|
||||||
}
|
}
|
||||||
dataList.add(vo);
|
dataList.add(vo);
|
||||||
|
order++;
|
||||||
}
|
}
|
||||||
// 写入当前Sheet的数据
|
// 写入当前Sheet的数据
|
||||||
excelWriter.write(dataList, writeSheet);
|
excelWriter.write(dataList, writeSheet);
|
||||||
@ -441,7 +442,9 @@ public class SubConstructionUserController extends BaseController {
|
|||||||
} else {
|
} else {
|
||||||
vo.setUploadFile("部分上传");
|
vo.setUploadFile("部分上传");
|
||||||
}
|
}
|
||||||
|
vo.setTeamName(null);
|
||||||
dataList.add(vo);
|
dataList.add(vo);
|
||||||
|
order++;
|
||||||
}
|
}
|
||||||
// 写入当前Sheet的数据
|
// 写入当前Sheet的数据
|
||||||
excelWriter.write(dataList, writeSheet);
|
excelWriter.write(dataList, writeSheet);
|
||||||
|
|||||||
@ -87,7 +87,7 @@ public class HseRewardsPunishmentsController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("safety:rewardsPunishments:query")
|
// @SaCheckPermission("safety:rewardsPunishments:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<HseRewardsPunishmentsVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<HseRewardsPunishmentsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
|
|||||||
@ -104,7 +104,7 @@ public class HseRewardsPunishmentsBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 对象信息
|
* 对象信息
|
||||||
*/
|
*/
|
||||||
private List<HseRpObjectBo> persons;
|
private List<HseRpObjectBo> rpObjects;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,7 +134,7 @@ public class HseRewardsPunishmentsServiceImpl extends ServiceImpl<HseRewardsPuni
|
|||||||
bo.setId(add.getId());
|
bo.setId(add.getId());
|
||||||
}
|
}
|
||||||
List<HseRpObject> hseRpObjects = new ArrayList<>();
|
List<HseRpObject> hseRpObjects = new ArrayList<>();
|
||||||
for (HseRpObjectBo item : bo.getPersons()) {
|
for (HseRpObjectBo item : bo.getRpObjects()) {
|
||||||
HseRpObject hseRpObject = new HseRpObject();
|
HseRpObject hseRpObject = new HseRpObject();
|
||||||
hseRpObject.setRpId(add.getId());
|
hseRpObject.setRpId(add.getId());
|
||||||
hseRpObject.setObjectId(item.getObjectId());
|
hseRpObject.setObjectId(item.getObjectId());
|
||||||
@ -158,6 +158,19 @@ public class HseRewardsPunishmentsServiceImpl extends ServiceImpl<HseRewardsPuni
|
|||||||
public Boolean updateByBo(HseRewardsPunishmentsBo bo) {
|
public Boolean updateByBo(HseRewardsPunishmentsBo bo) {
|
||||||
HseRewardsPunishments update = MapstructUtils.convert(bo, HseRewardsPunishments.class);
|
HseRewardsPunishments update = MapstructUtils.convert(bo, HseRewardsPunishments.class);
|
||||||
validEntityBeforeSave(update);
|
validEntityBeforeSave(update);
|
||||||
|
rpObjectService.lambdaUpdate().eq(HseRpObject::getRpId, update.getId()).remove();
|
||||||
|
List<HseRpObject> hseRpObjects = new ArrayList<>();
|
||||||
|
for (HseRpObjectBo item : bo.getRpObjects()) {
|
||||||
|
HseRpObject hseRpObject = new HseRpObject();
|
||||||
|
hseRpObject.setRpId(update.getId());
|
||||||
|
hseRpObject.setObjectId(item.getObjectId());
|
||||||
|
hseRpObject.setObjectName(item.getObjectName());
|
||||||
|
hseRpObject.setAmount(item.getAmount());
|
||||||
|
hseRpObjects.add(hseRpObject);
|
||||||
|
}
|
||||||
|
if (!hseRpObjects.isEmpty()) {
|
||||||
|
rpObjectService.saveBatch(hseRpObjects);
|
||||||
|
}
|
||||||
return baseMapper.updateById(update) > 0;
|
return baseMapper.updateById(update) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user