奖惩
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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());
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user