注释优化
This commit is contained in:
parent
4a258aa45b
commit
d4c8a66fcf
|
|
@ -20,101 +20,101 @@ import java.util.List;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
////"工资单模板保存参数")
|
||||
//"工资单模板保存参数
|
||||
public class SalaryTemplateSaveParam {
|
||||
|
||||
// 主键")
|
||||
// 主键
|
||||
private Long id;
|
||||
|
||||
// 模板名称")
|
||||
// 模板名称
|
||||
private String name;
|
||||
|
||||
// 薪资账套表的主键id")
|
||||
// 薪资账套表的主键id
|
||||
private Long salarySobId;
|
||||
|
||||
// 备注")
|
||||
// 备注
|
||||
private String description;
|
||||
|
||||
// 邮箱开启状态。false:关、true:开")
|
||||
// 邮箱开启状态。false:关、true:开
|
||||
private Boolean emailStatus;
|
||||
|
||||
// 发送地址")
|
||||
// 发送地址
|
||||
private Long sendEmail;
|
||||
|
||||
// 消息中心开启状态。false:关、true:开")
|
||||
// 消息中心开启状态。false:关、true:开
|
||||
private Boolean msgStatus;
|
||||
|
||||
// 主题")
|
||||
// 主题
|
||||
private String theme;
|
||||
|
||||
// 背景图")
|
||||
// 背景图
|
||||
private String background;
|
||||
|
||||
// 文本内容")
|
||||
// 文本内容
|
||||
private String textContent;
|
||||
|
||||
// 文本内容位置。1:薪资项目前、2:薪资项目后")
|
||||
// 文本内容位置。1:薪资项目前、2:薪资项目后
|
||||
private Integer textContentPosition;
|
||||
|
||||
// 薪资项为空时不显示开启状态。false:关、true:开")
|
||||
// 薪资项为空时不显示开启状态。false:关、true:开
|
||||
private Boolean salaryItemNullStatus;
|
||||
|
||||
// 薪资项为0时不显示开启状态。false:关、true:开")
|
||||
// 薪资项为0时不显示开启状态。false:关、true:开
|
||||
private Boolean salaryItemZeroStatus;
|
||||
|
||||
// 薪资项目设置")
|
||||
// 薪资项目设置
|
||||
private List<SalaryTemplateSalaryItemSetListDTO> salaryItemSetting;
|
||||
|
||||
|
||||
// 补发工资单模板名称")
|
||||
// 补发工资单模板名称
|
||||
private String replenishName;
|
||||
|
||||
// 补发工资单名单生成规则")
|
||||
// 补发工资单名单生成规则
|
||||
private String replenishRule;
|
||||
|
||||
// 补发薪资项目设置")
|
||||
// 补发薪资项目设置
|
||||
private List<SalaryTemplateSalaryItemSetListDTO> replenishSalaryItemSetting;
|
||||
|
||||
public static void checkParam(SalaryTemplateSaveParam saveParam) {
|
||||
if (saveParam.getSalarySobId() == null) {
|
||||
throw new SalaryRunTimeException("薪资账套表的主键id必传");
|
||||
throw new SalaryRunTimeException("薪资账套表的主键id必传;");
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(saveParam.getName())) {
|
||||
throw new SalaryRunTimeException("工资单模板名称必填");
|
||||
throw new SalaryRunTimeException("工资单模板名称必填;");
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(saveParam.getTheme())) {
|
||||
throw new SalaryRunTimeException("工资单主题必填");
|
||||
throw new SalaryRunTimeException("工资单主题必填;");
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(saveParam.getReplenishName())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 139737, "补发工资单模板名称必填"));
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(139737, "补发工资单模板名称必填"));
|
||||
}
|
||||
|
||||
if (saveParam.getName().equals(saveParam.getReplenishName())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 140557, "工资单模板名称和补发工资单模板名称不可相同"));
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(140557, "工资单模板名称和补发工资单模板名称不可相同"));
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(saveParam.getReplenishRule())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 139738, "补发工资单名单生成规则必填"));
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(139738, "补发工资单名单生成规则必填"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (saveParam.getEmailStatus() && saveParam.getSendEmail() == null) {
|
||||
throw new SalaryRunTimeException("开启邮箱后,发送地址必选");
|
||||
throw new SalaryRunTimeException("开启邮箱后,发送地址必选;");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(saveParam.getTextContent()) && saveParam.getTextContentPosition() == null) {
|
||||
throw new SalaryRunTimeException("文本内容不为空时,文本内容位置必选");
|
||||
throw new SalaryRunTimeException("文本内容不为空时,文本内容位置必选;");
|
||||
}
|
||||
|
||||
if (saveParam.getTextContentPosition() !=null && saveParam.getTextContentPosition().equals(SalaryTemplateTextContentPositionEnum.BEFORE.getValue()) && saveParam.getTextContentPosition().equals(SalaryTemplateTextContentPositionEnum.AFTER.getValue())) {
|
||||
throw new SalaryRunTimeException("文本内容位置参数不对");
|
||||
if (saveParam.getTextContentPosition() != null && saveParam.getTextContentPosition().equals(SalaryTemplateTextContentPositionEnum.BEFORE.getValue()) && saveParam.getTextContentPosition().equals(SalaryTemplateTextContentPositionEnum.AFTER.getValue())) {
|
||||
throw new SalaryRunTimeException("文本内容位置参数不对;");
|
||||
}
|
||||
|
||||
if (CollectionUtils.isEmpty(saveParam.getReplenishSalaryItemSetting())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel( 140509, "补发工资单模板的薪资项目设置不能为空"));
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(140509, "补发工资单模板的薪资项目设置不能为空"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue