|
@@ -29,6 +29,9 @@ import java.lang.reflect.Method;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
|
|
|
+import static com.zjugis.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
+import static com.zjugis.module.business.enums.ErrorCodeConstants.APPLICATION_INFO_NOT_EXISTS;
|
|
|
+
|
|
|
/**
|
|
|
* 工资信息表 服务实现类
|
|
|
*
|
|
@@ -193,6 +196,26 @@ public class SalaryInfoServiceImpl implements ISalaryInfoService {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String deleteSalaryDetailById(String id) {
|
|
|
+ validateExists(id);
|
|
|
+ int delete = infoMapper.deleteById(id);
|
|
|
+ if (delete == 1) {
|
|
|
+ return "删除成功";
|
|
|
+ }
|
|
|
+ return "删除失败";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据ID判断数据是否存在
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ */
|
|
|
+ private void validateExists(String id) {
|
|
|
+ if (infoMapper.selectById(id) == null) {
|
|
|
+ throw exception(APPLICATION_INFO_NOT_EXISTS);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 根据人员类型及当前时间生成一条工资导入数据记录,并返回主键ID
|