This commit is contained in:
zt
2025-12-05 14:16:46 +08:00
parent 955d7e39e6
commit 6032869417
4 changed files with 19 additions and 3 deletions

View File

@ -397,6 +397,7 @@ public class SubConstructionUserController extends BaseController {
vo.setUploadFile("部分上传");
}
dataList.add(vo);
order++;
}
// 写入当前Sheet的数据
excelWriter.write(dataList, writeSheet);
@ -441,7 +442,9 @@ public class SubConstructionUserController extends BaseController {
} else {
vo.setUploadFile("部分上传");
}
vo.setTeamName(null);
dataList.add(vo);
order++;
}
// 写入当前Sheet的数据
excelWriter.write(dataList, writeSheet);

View File

@ -87,7 +87,7 @@ public class HseRewardsPunishmentsController extends BaseController {
*
* @param id 主键
*/
@SaCheckPermission("safety:rewardsPunishments:query")
// @SaCheckPermission("safety:rewardsPunishments:query")
@GetMapping("/{id}")
public R<HseRewardsPunishmentsVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {

View File

@ -104,7 +104,7 @@ public class HseRewardsPunishmentsBo extends BaseEntity {
/**
* 对象信息
*/
private List<HseRpObjectBo> persons;
private List<HseRpObjectBo> rpObjects;
}

View File

@ -134,7 +134,7 @@ public class HseRewardsPunishmentsServiceImpl extends ServiceImpl<HseRewardsPuni
bo.setId(add.getId());
}
List<HseRpObject> hseRpObjects = new ArrayList<>();
for (HseRpObjectBo item : bo.getPersons()) {
for (HseRpObjectBo item : bo.getRpObjects()) {
HseRpObject hseRpObject = new HseRpObject();
hseRpObject.setRpId(add.getId());
hseRpObject.setObjectId(item.getObjectId());
@ -158,6 +158,19 @@ public class HseRewardsPunishmentsServiceImpl extends ServiceImpl<HseRewardsPuni
public Boolean updateByBo(HseRewardsPunishmentsBo bo) {
HseRewardsPunishments update = MapstructUtils.convert(bo, HseRewardsPunishments.class);
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;
}