Merge branch 'feature/V2-editDataCollection-11-03' into release/2.1.2.2211.01
This commit is contained in:
commit
b7597ee826
|
|
@ -203,4 +203,20 @@ public class AddUpDeductionBiz extends BaseBean {
|
|||
}
|
||||
|
||||
|
||||
public void batchDeleteByIDS(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
AddUpDeductionMapper mapper = sqlSession.getMapper(AddUpDeductionMapper.class);
|
||||
List<List<Long>> partition = Lists.partition(ids, 100);
|
||||
partition.forEach(mapper::deleteData);
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,4 +204,25 @@ public class AddUpSituationBiz extends BaseBean {
|
|||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量删除数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:39
|
||||
*/
|
||||
public void batchDeleteByIDS(List<Long> deleteIds) {
|
||||
if (CollectionUtils.isEmpty(deleteIds)) {
|
||||
return;
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
|
||||
List<List<Long>> partition = Lists.partition(deleteIds, 100);
|
||||
partition.forEach(mapper::deleteData);
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,4 +61,5 @@ public class AttendQuoteDataBiz {
|
|||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,4 +65,17 @@ public class AttendQuoteDataValueBiz {
|
|||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateDataValue(AttendQuoteDataValuePO po) {
|
||||
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
AttendQuoteDataValueMapper mapper = sqlSession.getMapper(AttendQuoteDataValueMapper.class);
|
||||
mapper.updateDataValueByFiledIdAndEmployeeId(po);
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,4 +183,24 @@ public class OtherDeductionBiz extends BaseBean {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 批量删除
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 16:07
|
||||
*/
|
||||
public void batchDeleteByIDS(List<Long> deleteIds) {
|
||||
if (CollectionUtils.isEmpty(deleteIds)) {
|
||||
return;
|
||||
}
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
OtherDeductionMapper mapper = sqlSession.getMapper(OtherDeductionMapper.class);
|
||||
List<List<Long>> partition = Lists.partition(deleteIds, 100);
|
||||
partition.forEach(mapper::deleteData);
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ public class AddUpDeductionRecordStrDTOEncrypt {
|
|||
.username(item.getUsername())
|
||||
.declareMonth(item.getDeclareMonth())
|
||||
.taxAgentName(item.getTaxAgentName())
|
||||
.taxAgentId(item.getTaxAgentId())
|
||||
.departmentName(item.getDepartmentName())
|
||||
.mobile(item.getMobile())
|
||||
.jobNum(item.getJobNum())
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import lombok.NoArgsConstructor;
|
|||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据采集-累计情况表
|
||||
|
|
@ -40,6 +41,7 @@ public class AddUpSituation {
|
|||
* 税款所属期
|
||||
*/
|
||||
private Date taxYearMonth;
|
||||
private List<Date> taxYearMonthRange;
|
||||
|
||||
/**
|
||||
* 年份
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/26 16:38
|
||||
* @description 累计专项附加扣-除删除参数
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddUpDeductionRecordDeleteParam {
|
||||
|
||||
// 删除id
|
||||
private List<Long> ids;
|
||||
|
||||
// 申报月份
|
||||
private String declareMonth;
|
||||
|
||||
// 个税扣缴义务人
|
||||
private String taxAgentId;
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/25 16:26
|
||||
* @description 数据采集-累计专项附加扣除编辑参数
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddUpDeductionRecordParam {
|
||||
|
||||
// 主键id
|
||||
private Long id;
|
||||
|
||||
// 员工id
|
||||
private Long employeeId;
|
||||
|
||||
private String username;
|
||||
|
||||
// 申报月份
|
||||
private String declareMonth;
|
||||
|
||||
// 个税扣缴义务人
|
||||
private String taxAgentName;
|
||||
|
||||
// 个税扣缴义务人id
|
||||
private Long taxAgentId;
|
||||
|
||||
|
||||
// 部门
|
||||
private String departmentName;
|
||||
|
||||
// 手机号
|
||||
private String mobile;
|
||||
|
||||
// 工号
|
||||
private String jobNum;
|
||||
|
||||
// 累计子女教育
|
||||
private String addUpChildEducation;
|
||||
|
||||
// 累计继续教育
|
||||
private String addUpContinuingEducation;
|
||||
|
||||
// 累计住房贷款利息
|
||||
private String addUpHousingLoanInterest;
|
||||
|
||||
// 累计住房租金
|
||||
private String addUpHousingRent;
|
||||
|
||||
// 累计赡养老人
|
||||
private String addUpSupportElderly;
|
||||
|
||||
// 累计大病医疗
|
||||
private String addUpIllnessMedical;
|
||||
|
||||
// 累计婴幼儿照护
|
||||
private String addUpInfantCare;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 15:43
|
||||
* @description 往期累计情况删除参数
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddUpSituationDeleteParam {
|
||||
// 删除id
|
||||
private List<Long> ids;
|
||||
|
||||
// 申报月份
|
||||
private String taxYearMonth;
|
||||
|
||||
// 个税扣缴义务人
|
||||
private String taxAgentId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 21:14
|
||||
* @description 往期累计情况编辑参数
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AddUpSituationParam {
|
||||
|
||||
//主键id
|
||||
private Long id;
|
||||
|
||||
//员工id
|
||||
private Long employeeId;
|
||||
|
||||
//申报年月
|
||||
private String taxYearMonth;
|
||||
|
||||
//姓名
|
||||
private String username;
|
||||
|
||||
//个税扣缴义务人
|
||||
private String taxAgentName;
|
||||
|
||||
//个税扣缴义务人id
|
||||
private Long taxAgentId;
|
||||
|
||||
//部门
|
||||
private String departmentName;
|
||||
|
||||
//手机号
|
||||
private String mobile;
|
||||
|
||||
//工号
|
||||
private String jobNum;
|
||||
|
||||
|
||||
//累计收入额
|
||||
private String addUpIncome;
|
||||
|
||||
//累计减除费用
|
||||
private String addUpSubtraction;
|
||||
|
||||
//累计社保个人合计
|
||||
private String addUpSocialSecurityTotal;
|
||||
|
||||
//累计公积金个人合计
|
||||
private String addUpAccumulationFundTotal;
|
||||
|
||||
//累计子女教育
|
||||
private String addUpChildEducation;
|
||||
|
||||
//累计继续教育
|
||||
private String addUpContinuingEducation;
|
||||
|
||||
//累计住房贷款利息
|
||||
private String addUpHousingLoanInterest;
|
||||
|
||||
//累计住房租金
|
||||
private String addUpHousingRent;
|
||||
|
||||
//累计赡养老人
|
||||
private String addUpSupportElderly;
|
||||
|
||||
//累计大病医疗
|
||||
private String addUpIllnessMedical;
|
||||
|
||||
//累计企业(职业)年金及其他福利
|
||||
private String addUpEnterpriseAndOther;
|
||||
|
||||
//累计其他扣除
|
||||
private String addUpOtherDeduction;
|
||||
|
||||
//累计免税收入
|
||||
private String addUpTaxExemptIncome;
|
||||
|
||||
//累计准予扣除的捐赠额
|
||||
private String addUpAllowedDonation;
|
||||
|
||||
//累计减免税额
|
||||
private String addUpTaxSavings;
|
||||
|
||||
//累计已预扣预缴税额
|
||||
private String addUpAdvanceTax;
|
||||
|
||||
//累计婴幼儿照护
|
||||
private String addUpInfantCare;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/28 14:33
|
||||
* @description 考勤引用编辑参数
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class AttendQuoteDataEditParam {
|
||||
|
||||
//主键id"
|
||||
private Long id;
|
||||
|
||||
//考勤数据
|
||||
private Map<String,String> attendQuoteData;
|
||||
|
||||
|
||||
// //关键字(姓名/部门名称/手机号/工号)")
|
||||
// private String keyword;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/26 9:50
|
||||
* @description 数据采集-其他免税扣除 编辑参数
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OtherDeductionParam {
|
||||
|
||||
// 主键id
|
||||
private Long id;
|
||||
|
||||
// 申报月份
|
||||
private String declareMonth;
|
||||
|
||||
// 员工id
|
||||
private Long employeeId;
|
||||
|
||||
private String username;
|
||||
|
||||
// 个税扣缴义务人
|
||||
private String taxAgentName;
|
||||
|
||||
// 个税扣缴义务人id
|
||||
private Long taxAgentId;
|
||||
|
||||
// 部门
|
||||
private String departmentName;
|
||||
|
||||
// 手机号
|
||||
private String mobile;
|
||||
|
||||
private String idNo;
|
||||
|
||||
// 工号
|
||||
private String jobNum;
|
||||
|
||||
// 商业健康保险
|
||||
private String businessHealthyInsurance;
|
||||
|
||||
// 税延养老保险
|
||||
private String taxDelayEndowmentInsurance;
|
||||
|
||||
// 其他
|
||||
private String otherDeduction;
|
||||
|
||||
// 准予扣除的捐赠额
|
||||
private String deductionAllowedDonation;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -62,4 +62,13 @@ public interface AddUpDeductionMapper {
|
|||
void updateData(@Param("collection") List<AddUpDeduction> updateList);
|
||||
|
||||
List<AddUpDeductionRecordDTO> recordList(@Param("param") AddUpDeductionQueryParam param);
|
||||
|
||||
|
||||
/**
|
||||
* @description 批量删除
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 9:54
|
||||
*/
|
||||
void deleteData(@Param("collection")List<Long> longs);
|
||||
}
|
||||
|
|
@ -42,6 +42,17 @@
|
|||
, t.add_up_infant_care
|
||||
</sql>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<update id="deleteData">
|
||||
UPDATE hrsa_add_up_deduction
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.engine.salary.entity.datacollection.AddUpSituation;
|
|||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -62,4 +61,9 @@ public interface AddUpSituationMapper {
|
|||
void deleteByTaxYearMonthAndTaxAgentIds(@Param("param") AddUpSituation params);
|
||||
|
||||
void deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
void deleteData(List<Long> longs);
|
||||
}
|
||||
|
|
@ -64,6 +64,17 @@
|
|||
, t.add_up_infant_care
|
||||
</sql>
|
||||
|
||||
<!--批量删除-->
|
||||
<update id="deleteData">
|
||||
UPDATE hrsa_add_up_situation
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
|
|
@ -719,6 +730,9 @@
|
|||
#{employeeId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.taxYearMonthRange != null and param.taxYearMonthRange.size() > 1">
|
||||
AND ( tax_year_month BETWEEN #{param.taxYearMonthRange[0]} AND #{param.taxYearMonthRange[1]})
|
||||
</if>
|
||||
<if test="param.taxAgentIds != null and param.taxAgentIds.size()>0">
|
||||
AND tax_agent_id IN
|
||||
<foreach collection="param.taxAgentIds" open="(" item="taxAgentId" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@
|
|||
</update>
|
||||
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete" parameterType="com.engine.salary.entity.datacollection.po.AttendQuoteDataPO">
|
||||
UPDATE hrsa_attend_quote_data
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.engine.salary.mapper.datacollection;
|
||||
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuoteDataValuePO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -49,7 +48,8 @@ public interface AttendQuoteDataValueMapper {
|
|||
* @return 返回影响行数
|
||||
*/
|
||||
int updateIgnoreNull(AttendQuoteDataValuePO AttendQuoteDataValuePO);
|
||||
|
||||
|
||||
int updateDataValueByFiledIdAndEmployeeId(AttendQuoteDataValuePO attendQuoteDataValuePO);
|
||||
/**
|
||||
* 删除记录
|
||||
*
|
||||
|
|
|
|||
|
|
@ -263,6 +263,17 @@
|
|||
</update>
|
||||
|
||||
|
||||
<update id="updateDataValueByFiledIdAndEmployeeId" parameterType="com.engine.salary.entity.datacollection.po.AttendQuoteDataValuePO">
|
||||
UPDATE hrsa_attend_quote_data_value
|
||||
<set>
|
||||
<if test="dataValue != null">
|
||||
data_value=#{dataValue},
|
||||
</if>
|
||||
</set>
|
||||
WHERE employee_id = #{employeeId} AND delete_type = 0 AND attend_quote_field_id = #{attendQuoteFieldId}
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键删除记录 -->
|
||||
<delete id="delete" parameterType="com.engine.salary.entity.datacollection.po.AttendQuoteDataValuePO">
|
||||
UPDATE hrsa_attend_quote_data_value
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
|
|||
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -45,4 +44,9 @@ public interface OtherDeductionMapper {
|
|||
*/
|
||||
void updateData(@Param("collection") List<OtherDeductionPO> pos);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param longs
|
||||
*/
|
||||
void deleteData(List<Long> longs);
|
||||
}
|
||||
|
|
@ -36,6 +36,17 @@
|
|||
, t.tenant_key
|
||||
</sql>
|
||||
|
||||
<!--批量删除-->
|
||||
<update id="deleteData">
|
||||
UPDATE hrsa_other_deduction
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
|||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordParam;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
|
@ -105,4 +107,44 @@ public interface AddUpDeductionService {
|
|||
* @return
|
||||
*/
|
||||
List<SalaryAcctEmployeePO> getAccountedEmployeeData(String yearMonth);
|
||||
|
||||
/**
|
||||
* @description 编辑累计专项附加扣除
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/25 14:09
|
||||
*/
|
||||
void editAddUpDeduction(AddUpDeductionRecordParam addUpDeduction);
|
||||
|
||||
/**
|
||||
* @description 累计专项附加扣除
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/26 14:24
|
||||
*/
|
||||
void createAddUpDeduction(AddUpDeductionRecordParam addUpDeductionRecordParam);
|
||||
|
||||
/**
|
||||
* @description 删除所选
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/26 16:34
|
||||
*/
|
||||
void deleteSelectAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* @description 一键清空
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/26 16:35
|
||||
*/
|
||||
void deleteAllAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* @description 获取累计专项附加扣除详情
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 11:33
|
||||
*/
|
||||
AddUpDeductionRecordDTO getAddUpDeduction(AddUpDeductionQueryParam id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ package com.engine.salary.service;
|
|||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
|
|
@ -74,4 +73,43 @@ public interface AddUpSituationService {
|
|||
|
||||
void batchSave(List<AddUpSituation> list);
|
||||
|
||||
/**
|
||||
* @description 编辑数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:03
|
||||
*/
|
||||
void editAddUpSituation(AddUpSituationParam addUpSituationParam);
|
||||
|
||||
/**
|
||||
* @description 新建数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:03
|
||||
*/
|
||||
void createAddUpSituation(AddUpSituationParam addUpSituationParam);
|
||||
|
||||
/**
|
||||
* @description 删除所选数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:35
|
||||
*/
|
||||
void deleteSelectAddUpSituation(AddUpSituationDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* @description 一键清空所有数据
|
||||
* @return null
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:35
|
||||
*/
|
||||
void deleteAllAddUpSituation(AddUpSituationDeleteParam addUpSituationDeleteParam);
|
||||
|
||||
/**
|
||||
* @description 获取往期累计情况
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 14:00
|
||||
*/
|
||||
AddUpSituationRecordDTO getAddUpSituation(AddUpSituationParam addUpSituationParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ package com.engine.salary.service;
|
|||
|
||||
import com.engine.salary.entity.datacollection.dto.AttendQuoteDataBaseDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.AttendQuoteDataDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataExportTemplateParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataSyncParam;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
|
|
@ -84,4 +81,15 @@ public interface AttendQuoteDataService {
|
|||
*/
|
||||
Map<String, Object> importAttendQuoteData(AttendQuoteDataImportParam param);
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
* @param attendQuoteDataEditParam
|
||||
*/
|
||||
void editData(AttendQuoteDataEditParam attendQuoteDataEditParam);
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
* @param attendQuoteDataEditParam
|
||||
*/
|
||||
Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.engine.salary.service;
|
|||
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -87,5 +89,28 @@ public interface OtherDeductionService {
|
|||
*/
|
||||
List<OtherDeductionPO> getOtherDeductionList(YearMonth declareMonth, List<Long> employeeIds, Long taxAgentId);
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*/
|
||||
void editData(OtherDeductionParam otherDeductionParam);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*/
|
||||
void createData(OtherDeductionParam otherDeductionParam);
|
||||
|
||||
/**
|
||||
* 删除所选数据
|
||||
*/
|
||||
void deleteSelectData(AddUpDeductionRecordDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* 一键清空数据
|
||||
*/
|
||||
void deleteAllData(AddUpDeductionRecordDeleteParam deleteParam);
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
OtherDeductionRecordDTO getOtherDeduction(OtherDeductionParam otherDeductionParam);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
|||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordParam;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.taxagent.bo.TaxAgentBO;
|
||||
|
|
@ -35,6 +37,7 @@ import com.engine.salary.sys.entity.vo.OrderRuleVO;
|
|||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelComment;
|
||||
|
|
@ -350,8 +353,6 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
errorSum += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//累计子女教育
|
||||
String addUpChildEducation = dto.getAddUpChildEducation();
|
||||
addUpDeduction.setAddUpChildEducation(Util.null2String(addUpChildEducation));
|
||||
|
|
@ -367,11 +368,8 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
//累计赡养老人
|
||||
String addUpSupportElderly = dto.getAddUpSupportElderly();
|
||||
addUpDeduction.setAddUpSupportElderly(Util.null2String(addUpSupportElderly));
|
||||
|
||||
addUpDeduction.setAddUpIllnessMedical(Util.null2String(dto.getAddUpIllnessMedical()));
|
||||
addUpDeduction.setAddUpInfantCare(Util.null2String(dto.getAddUpInfantCare()));
|
||||
|
||||
|
||||
if (errorSum == 0) {
|
||||
successCount += 1;
|
||||
// 合格数据
|
||||
|
|
@ -381,10 +379,8 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
// 添加错误数据
|
||||
}
|
||||
}
|
||||
|
||||
//入库
|
||||
addUpDeductionBiz.handleImportData(eligibleData);
|
||||
|
||||
apidatas.put("successCount", successCount);
|
||||
apidatas.put("errorCount", errorCount);
|
||||
apidatas.put("errorData", errorData);
|
||||
|
|
@ -396,6 +392,244 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void editAddUpDeduction(AddUpDeductionRecordParam addUpDeduction) {
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
String declareMonthStr = addUpDeduction.getDeclareMonth();
|
||||
|
||||
Long currentEmployeeId = (long) user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
AddUpDeduction byId = addUpDeductionBiz.getById(addUpDeduction.getId());
|
||||
if(byId == null){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
Long taxAgentId = byId.getTaxAgentId();
|
||||
boolean canEdit = taxAgentList.stream().anyMatch(t -> t.getTaxAgentId() == taxAgentId);
|
||||
if(!canEdit){
|
||||
//没有编辑权限
|
||||
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
||||
}
|
||||
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
|
||||
// 判断是否有核算过
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(addUpDeduction.getEmployeeId()) && f.getTaxAgentId().equals(addUpDeduction.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("该年月这条数据已经核算过,不可进行编辑!");
|
||||
}
|
||||
}
|
||||
ArrayList<AddUpDeduction> updateList = new ArrayList<>();
|
||||
AddUpDeduction build = AddUpDeduction.builder().id(addUpDeduction.getId()).addUpChildEducation(addUpDeduction.getAddUpChildEducation()).addUpContinuingEducation(addUpDeduction.getAddUpContinuingEducation()).addUpHousingLoanInterest(addUpDeduction.getAddUpHousingLoanInterest()).addUpHousingRent(addUpDeduction.getAddUpHousingRent()).addUpSupportElderly(addUpDeduction.getAddUpSupportElderly()).addUpIllnessMedical(addUpDeduction.getAddUpIllnessMedical()).addUpInfantCare(addUpDeduction.getAddUpInfantCare()).build();
|
||||
updateList.add(build);
|
||||
addUpDeductionBiz.batchUpdate(updateList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createAddUpDeduction(AddUpDeductionRecordParam addUpDeductionRecordParam) {
|
||||
long currentEmployeeId = user.getUID();
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
|
||||
//税款所属期
|
||||
String declareMonthStr = addUpDeductionRecordParam.getDeclareMonth();
|
||||
if(declareMonthStr == ""){
|
||||
throw new SalaryRunTimeException("税款所属期不能为空!");
|
||||
}
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
//个税扣缴义务人
|
||||
String taxAgentId = Util.null2String(addUpDeductionRecordParam.getTaxAgentId());
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
|
||||
// 查询已有数据
|
||||
Date declareMonth = SalaryDateUtil.localDateToDate(LocalDate.parse(declareMonthStr + "-01", SalaryDateUtil.DATE_FORMATTER));
|
||||
List<AddUpDeduction> list = getAddUpDeductionMapper().listSome(AddUpDeduction.builder().declareMonth(declareMonth).build());
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
List<AddUpDeduction> insertData = new ArrayList<>();
|
||||
List<TaxAgentManageRangeEmployeeDTO.TaxAgentEmployee> taxAgentEmployees = Lists.newArrayList();
|
||||
Date now = new Date();
|
||||
//待插入数据库对象
|
||||
AddUpDeduction addUpDeduction = AddUpDeduction.builder()
|
||||
.tenantKey(DEFAULT_TENANT_KEY)
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
.creator((long) user.getUID())
|
||||
.declareMonth(declareMonth).build();
|
||||
boolean employeeSameId = employees.stream().anyMatch(e -> e.getEmployeeId() == addUpDeductionRecordParam.getEmployeeId());
|
||||
if (!employeeSameId) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
addUpDeduction.setEmployeeId(addUpDeductionRecordParam.getEmployeeId());
|
||||
|
||||
String taxAgentName = addUpDeductionRecordParam.getTaxAgentName();
|
||||
if (StringUtils.isBlank(taxAgentName)) {
|
||||
//个税扣缴义务人不能为空
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不能为空");
|
||||
} else {
|
||||
Optional<TaxAgentManageRangeEmployeeDTO> optionalTemp = taxAgentList.stream().filter(m -> m.getTaxAgentName().equals(taxAgentName)).findFirst();
|
||||
if (optionalTemp.isPresent()) {
|
||||
addUpDeduction.setTaxAgentId(optionalTemp.get().getTaxAgentId());
|
||||
taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
||||
} else {
|
||||
//个税扣缴义务人不存在或不在权限范围内
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内");
|
||||
}
|
||||
}
|
||||
|
||||
//fixme 分权判断
|
||||
// if (openDevolution) {
|
||||
// Optional<TaxAgentManageRangeEmployeeDTO.TaxAgentEmployee> optionalTaxAgentEmp = taxAgentEmployees.stream().filter(f -> f.getEmployeeId().equals(addUpDeduction.getEmployeeId())).findFirst();
|
||||
// if (!optionalTaxAgentEmp.isPresent()) {
|
||||
// Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
// errorMessageMap.put("message", rowIndex + "该条数据不在个税扣缴义务人人员范围内,不可导入");
|
||||
// errorData.add(errorMessageMap);
|
||||
// errorSum += 1;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 判断是否有核算过
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(addUpDeduction.getEmployeeId()) && f.getTaxAgentId().equals(addUpDeduction.getTaxAgentId())).findFirst();
|
||||
boolean isExist = list.stream().anyMatch(f -> f.getEmployeeId().equals(addUpDeduction.getEmployeeId()) && f.getTaxAgentId().equals(addUpDeduction.getTaxAgentId()));
|
||||
if (optionalAcctEmp.isPresent() && isExist) {
|
||||
throw new SalaryRunTimeException("该年月这条数据已经核算过,不可导入");
|
||||
}
|
||||
}
|
||||
|
||||
//累计子女教育
|
||||
String addUpChildEducation = addUpDeductionRecordParam.getAddUpChildEducation();
|
||||
addUpDeduction.setAddUpChildEducation(Util.null2String(addUpChildEducation));
|
||||
//累计继续教育
|
||||
String addUpContinuingEducation = addUpDeductionRecordParam.getAddUpContinuingEducation();
|
||||
addUpDeduction.setAddUpContinuingEducation(Util.null2String(addUpContinuingEducation));
|
||||
//累计住房贷款利息
|
||||
String addUpHousingLoanInterest = addUpDeductionRecordParam.getAddUpHousingLoanInterest();
|
||||
addUpDeduction.setAddUpHousingLoanInterest(Util.null2String(addUpHousingLoanInterest));
|
||||
//累计住房租金
|
||||
String addUpHousingRent = addUpDeductionRecordParam.getAddUpHousingRent();
|
||||
addUpDeduction.setAddUpHousingRent(Util.null2String(addUpHousingRent));
|
||||
//累计赡养老人
|
||||
String addUpSupportElderly = addUpDeductionRecordParam.getAddUpSupportElderly();
|
||||
addUpDeduction.setAddUpSupportElderly(Util.null2String(addUpSupportElderly));
|
||||
|
||||
addUpDeduction.setAddUpIllnessMedical(Util.null2String(addUpDeductionRecordParam.getAddUpIllnessMedical()));
|
||||
addUpDeduction.setAddUpInfantCare(Util.null2String(addUpDeductionRecordParam.getAddUpInfantCare()));
|
||||
insertData.add(addUpDeduction);
|
||||
//入库
|
||||
addUpDeductionBiz.handleImportData(insertData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSelectAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
long currentEmployeeId = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
String declareMonthStr = deleteParam.getDeclareMonth();
|
||||
List<Long> deleteIds = deleteParam.getIds();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
|
||||
// 判断是否有核算过
|
||||
List<Long> deleteList = new ArrayList<>();
|
||||
for(int i=0; i<deleteIds.size(); i++){
|
||||
Long id = deleteIds.get(i);
|
||||
AddUpDeduction byId = addUpDeductionBiz.getById(id);
|
||||
if(byId == null){
|
||||
throw new SalaryRunTimeException("数据不存在或已被删除!");
|
||||
}
|
||||
// 判断是否在个税扣缴义务人范围内
|
||||
Optional<TaxAgentManageRangeEmployeeDTO> first = taxAgentList.stream().filter(m -> m.getTaxAgentId() == byId.getTaxAgentId()).findFirst();
|
||||
if(!first.isPresent()){
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内");
|
||||
}
|
||||
// 判断用户是否存在
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(byId.getEmployeeId()) && f.getTaxAgentId().equals(byId.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("所选数据在该年月中已完成核算并归档,不可进行删除!");
|
||||
}
|
||||
}
|
||||
deleteList.add(byId.getId());
|
||||
}
|
||||
addUpDeductionBiz.batchDeleteByIDS(deleteList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
String declareMonthStr = deleteParam.getDeclareMonth();
|
||||
long currentEmployeeId = user.getUID();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
List<Long> taxAgentIds = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentId).collect(Collectors.toList());
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
ArrayList<Date> declareMonthDate = new ArrayList<>();
|
||||
try {
|
||||
declareMonthDate.add(sdf.parse(declareMonthStr+"-01"));
|
||||
}catch (Exception e){
|
||||
throw new SalaryRunTimeException("日期异常");
|
||||
}
|
||||
AddUpDeductionQueryParam queryParam = null;
|
||||
if(deleteParam.getTaxAgentId() != null && (!deleteParam.getTaxAgentId().equals(""))){
|
||||
// 设置了个税扣缴义务人
|
||||
Long taxAgentId = SalaryEntityUtil.string2Long(deleteParam.getTaxAgentId());
|
||||
boolean canDelete = taxAgentIds.stream().anyMatch(t -> t == taxAgentId);
|
||||
if(!canDelete){
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内!");
|
||||
}
|
||||
ArrayList<Long> tai = new ArrayList<>();
|
||||
tai.add(taxAgentId);
|
||||
queryParam = AddUpDeductionQueryParam.builder().declareMonthDate(declareMonthDate).taxAgentIds(tai).build();
|
||||
}else {
|
||||
queryParam = AddUpDeductionQueryParam.builder().declareMonthDate(declareMonthDate).taxAgentIds(taxAgentIds).build();
|
||||
}
|
||||
// 获取所有想要删除的数据
|
||||
List<AddUpDeductionDTO> list = addUpDeductionBiz.list(queryParam);
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAccountedEmployeeData(declareMonthStr);
|
||||
for(AddUpDeductionDTO item : list){
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(item.getEmployeeId()) && f.getTaxAgentId().equals(item.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("员工:"+item.getUsername()+",在该年月中已完成核算并归档,不能进行一键清空!");
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Long> deleteIds = list.stream().map(AddUpDeductionDTO::getId).collect(Collectors.toList());
|
||||
addUpDeductionBiz.batchDeleteByIDS(deleteIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddUpDeductionRecordDTO getAddUpDeduction(AddUpDeductionQueryParam param) {
|
||||
long uid = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(uid);
|
||||
List<String> taxAgentNames = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(param.getId());
|
||||
AddUpDeductionQueryParam build = AddUpDeductionQueryParam.builder().ids(ids).build();
|
||||
List<AddUpDeductionRecordDTO> addUpDeductionRecordDTOS = new AddUpDeductionBiz().recordList(build);
|
||||
if(addUpDeductionRecordDTOS==null || addUpDeductionRecordDTOS.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
String taxAgentName = addUpDeductionRecordDTOS.get(0).getTaxAgentName();
|
||||
if(!taxAgentNames.contains(taxAgentName)){
|
||||
throw new SalaryRunTimeException("您无权查看该数据!");
|
||||
}
|
||||
return addUpDeductionRecordDTOS.get(0);
|
||||
}
|
||||
|
||||
|
||||
private void checkImportParam(AddUpDeductionImportParam importParam) {
|
||||
|
||||
|
||||
|
|
@ -777,7 +1011,8 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
salaryAcctRecords.forEach(e -> {
|
||||
boolean isAccounted = e.getStatus() > SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue();
|
||||
if (isAccounted) {
|
||||
list.addAll(getSalaryAcctEmployeeService(user).listBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecords.get(0).getId())));
|
||||
// list.addAll(getSalaryAcctEmployeeService(user).listBySalaryAcctRecordIds(Collections.singleton(salaryAcctRecords.get(0).getId())));
|
||||
list.addAll(getSalaryAcctEmployeeService(user).listBySalaryAcctRecordIds(Collections.singleton(e.getId())));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ import com.engine.salary.entity.datacollection.AddUpSituation;
|
|||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
|
|
@ -828,6 +827,295 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 编辑数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 21:32
|
||||
*/
|
||||
@Override
|
||||
public void editAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
Long currentEmployeeId = (long) user.getUID();
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
//税款所属期
|
||||
String taxYearMonthStr = addUpSituationParam.getTaxYearMonth();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
AddUpSituation byId = biz.getById(addUpSituationParam.getId());
|
||||
if(byId == null){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
Long taxAgentId = byId.getTaxAgentId();
|
||||
boolean canEdit = taxAgentList.stream().anyMatch(t -> t.getTaxAgentId() == taxAgentId);
|
||||
if(!canEdit){
|
||||
//没有编辑权限
|
||||
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
||||
}
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);
|
||||
|
||||
// 判断是否有核算过
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(addUpSituationParam.getEmployeeId()) && f.getTaxAgentId().equals(addUpSituationParam.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("该年月这条数据已经核算过,不可进行编辑!");
|
||||
}
|
||||
}
|
||||
ArrayList<AddUpSituation> updateList = new ArrayList<>();
|
||||
AddUpSituation build = AddUpSituation.builder().id(addUpSituationParam.getId()).addUpIncome(addUpSituationParam.getAddUpIncome()).addUpSubtraction(addUpSituationParam.getAddUpSubtraction())
|
||||
.addUpSocialSecurityTotal(addUpSituationParam.getAddUpSocialSecurityTotal()).addUpAccumulationFundTotal(addUpSituationParam.getAddUpAccumulationFundTotal())
|
||||
.addUpChildEducation(addUpSituationParam.getAddUpChildEducation()).addUpContinuingEducation(addUpSituationParam.getAddUpContinuingEducation())
|
||||
.addUpHousingLoanInterest(addUpSituationParam.getAddUpHousingLoanInterest()).addUpHousingRent(addUpSituationParam.getAddUpHousingRent())
|
||||
.addUpSupportElderly(addUpSituationParam.getAddUpSupportElderly()).addUpIllnessMedical(addUpSituationParam.getAddUpIllnessMedical())
|
||||
.addUpEnterpriseAndOther(addUpSituationParam.getAddUpEnterpriseAndOther()).addUpOtherDeduction(addUpSituationParam.getAddUpOtherDeduction())
|
||||
.addUpTaxExemptIncome(addUpSituationParam.getAddUpTaxExemptIncome()).addUpAllowedDonation(addUpSituationParam.getAddUpAllowedDonation())
|
||||
.addUpTaxSavings(addUpSituationParam.getAddUpTaxSavings()).addUpAdvanceTax(addUpSituationParam.getAddUpAdvanceTax())
|
||||
.addUpInfantCare(addUpSituationParam.getAddUpInfantCare()).build();
|
||||
updateList.add(build);
|
||||
biz.batchUpdate(updateList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 新建数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:04
|
||||
*/
|
||||
@Override
|
||||
public void createAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
//SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
//String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
Long currentEmployeeId = (long) user.getUID();
|
||||
//税款所属期
|
||||
String taxYearMonthStr = Util.null2String(addUpSituationParam.getTaxYearMonth());
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// 获取租户下所有的人员
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(taxYearMonthStr);
|
||||
//税款所属期
|
||||
Date taxYearMonth = SalaryDateUtil.localDateToDate(LocalDate.parse(taxYearMonthStr + "-01", SalaryDateUtil.DATE_FORMATTER));
|
||||
// 查询已有数据
|
||||
List<AddUpSituation> list = getAddUpSituationMapper().listSome(AddUpSituation.builder().taxYearMonth(taxYearMonth).build());
|
||||
Date now = new Date();
|
||||
//合规数据
|
||||
List<AddUpSituation> insertList = new ArrayList<>();
|
||||
|
||||
List<TaxAgentManageRangeEmployeeDTO.TaxAgentEmployee> taxAgentEmployees = Lists.newArrayList();
|
||||
|
||||
//待插入数据库对象
|
||||
AddUpSituation po = AddUpSituation.builder().tenantKey(DEFAULT_TENANT_KEY)
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
.creator((long) user.getUID())
|
||||
.year(Integer.valueOf(taxYearMonthStr.split("-")[0]))
|
||||
.taxYearMonth(taxYearMonth)
|
||||
.build();
|
||||
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
boolean employeeSameId = employees.stream().anyMatch(e -> e.getEmployeeId() == addUpSituationParam.getEmployeeId());
|
||||
if(!employeeSameId){
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
po.setEmployeeId(addUpSituationParam.getEmployeeId());
|
||||
String taxAgentName = addUpSituationParam.getTaxAgentName();
|
||||
if (StringUtils.isBlank(taxAgentName)) {
|
||||
//个税扣缴义务人不能为空
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不能为空");
|
||||
} else {
|
||||
Optional<TaxAgentManageRangeEmployeeDTO> optionalTemp = taxAgentList.stream().filter(m -> m.getTaxAgentName().equals(taxAgentName)).findFirst();
|
||||
if (optionalTemp.isPresent()) {
|
||||
po.setTaxAgentId(optionalTemp.get().getTaxAgentId());
|
||||
taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
||||
} else {
|
||||
//个税扣缴义务人不存在
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内");
|
||||
}
|
||||
}
|
||||
|
||||
// fixme 分权判断,若员工离职后,不在扣缴义务人范围内,会有异常
|
||||
// if (openDevolution) {
|
||||
// Optional<TaxAgentManageRangeEmployeeDTO.TaxAgentEmployee> optionalTaxAgentEmp = taxAgentEmployees.stream().filter(f -> f.getEmployeeId().equals(po.getEmployeeId())).findFirst();
|
||||
// if (!optionalTaxAgentEmp.isPresent()) {
|
||||
// Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
// errorMessageMap.put("message", rowIndex + "该条数据不在个税扣缴义务人人员范围内,不可导入");
|
||||
// errorData.add(errorMessageMap);
|
||||
// errorSum += 1;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 判断是否有核算过
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(po.getEmployeeId()) && f.getTaxAgentId().equals(po.getTaxAgentId())).findFirst();
|
||||
boolean isExist = list.stream().anyMatch(f -> f.getEmployeeId().equals(po.getEmployeeId()) && f.getTaxAgentId().equals(po.getTaxAgentId()));
|
||||
if (optionalAcctEmp.isPresent() && isExist) {
|
||||
throw new SalaryRunTimeException("该年月这条数据已经核算过,不可导入");
|
||||
}
|
||||
}
|
||||
|
||||
//累计收入额
|
||||
String addUpIncome = addUpSituationParam.getAddUpIncome();
|
||||
po.setAddUpIncome(Util.null2String(addUpIncome));
|
||||
//累计减除费用
|
||||
String addUpSubtraction = addUpSituationParam.getAddUpSubtraction();
|
||||
po.setAddUpSubtraction(addUpSubtraction);
|
||||
//累计社保个人合计
|
||||
String addUpSocialSecurityTotal = addUpSituationParam.getAddUpSocialSecurityTotal();
|
||||
po.setAddUpSocialSecurityTotal(addUpSocialSecurityTotal);
|
||||
//累计公积金个人合计
|
||||
String addUpAccumulationFundTotal = addUpSituationParam.getAddUpAccumulationFundTotal();
|
||||
po.setAddUpAccumulationFundTotal(addUpAccumulationFundTotal);
|
||||
//累计子女教育
|
||||
String addUpChildEducation = addUpSituationParam.getAddUpChildEducation();
|
||||
po.setAddUpChildEducation(Util.null2String(addUpChildEducation));
|
||||
//累计继续教育
|
||||
String addUpContinuingEducation = addUpSituationParam.getAddUpContinuingEducation();
|
||||
po.setAddUpContinuingEducation(Util.null2String(addUpContinuingEducation));
|
||||
//累计住房贷款利息
|
||||
String addUpHousingLoanInterest = addUpSituationParam.getAddUpHousingLoanInterest();
|
||||
po.setAddUpHousingLoanInterest(Util.null2String(addUpHousingLoanInterest));
|
||||
//累计住房租金
|
||||
String addUpHousingRent = addUpSituationParam.getAddUpHousingRent();
|
||||
po.setAddUpHousingRent(Util.null2String(addUpHousingRent));
|
||||
//累计赡养老人
|
||||
String addUpSupportElderly = addUpSituationParam.getAddUpSupportElderly();
|
||||
po.setAddUpSupportElderly(Util.null2String(addUpSupportElderly));
|
||||
//累计企业(职业)年金及其他福利
|
||||
String addUpEnterpriseAndOther = addUpSituationParam.getAddUpEnterpriseAndOther();
|
||||
po.setAddUpEnterpriseAndOther(addUpEnterpriseAndOther);
|
||||
//累计其他扣除
|
||||
String addUpOtherDeduction = addUpSituationParam.getAddUpOtherDeduction();
|
||||
po.setAddUpOtherDeduction(addUpOtherDeduction);
|
||||
//累计免税收入
|
||||
String addUpTaxExemptIncome = addUpSituationParam.getAddUpTaxExemptIncome();
|
||||
po.setAddUpTaxExemptIncome(addUpTaxExemptIncome);
|
||||
//累计准予扣除的捐赠额
|
||||
String addUpAllowedDonation = addUpSituationParam.getAddUpAllowedDonation();
|
||||
po.setAddUpAllowedDonation(addUpAllowedDonation);
|
||||
//累计已预扣预缴税额
|
||||
String addUpAdvanceTax = addUpSituationParam.getAddUpAdvanceTax();
|
||||
po.setAddUpAdvanceTax(addUpAdvanceTax);
|
||||
po.setAddUpIllnessMedical(addUpSituationParam.getAddUpIllnessMedical());
|
||||
po.setAddUpTaxSavings(addUpSituationParam.getAddUpTaxSavings());
|
||||
po.setAddUpInfantCare(addUpSituationParam.getAddUpInfantCare());
|
||||
insertList.add(po);
|
||||
|
||||
//入库
|
||||
biz.handleImportData(insertList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSelectAddUpSituation(AddUpSituationDeleteParam deleteParam) {
|
||||
long currentEmployeeId = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
String declareMonthStr = deleteParam.getTaxYearMonth();
|
||||
List<Long> deleteIds = deleteParam.getIds();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr);
|
||||
// 判断是否有核算过
|
||||
List<Long> deleteList = new ArrayList<>();
|
||||
for(int i=0; i<deleteIds.size(); i++){
|
||||
Long id = deleteIds.get(i);
|
||||
AddUpSituation byId = biz.getById(id);
|
||||
if(byId == null){
|
||||
throw new SalaryRunTimeException("数据不存在或已被删除!");
|
||||
}
|
||||
// 判断是否在个税扣缴义务人范围内
|
||||
Optional<TaxAgentManageRangeEmployeeDTO> first = taxAgentList.stream().filter(m -> m.getTaxAgentId() == byId.getTaxAgentId()).findFirst();
|
||||
if(!first.isPresent()){
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内");
|
||||
}
|
||||
// 判断用户是否存在
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(byId.getEmployeeId()) && f.getTaxAgentId().equals(byId.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("所选数据在该年月中已经核算过并归档,不可进行删除!");
|
||||
}
|
||||
}
|
||||
deleteList.add(byId.getId());
|
||||
}
|
||||
biz.batchDeleteByIDS(deleteList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllAddUpSituation(AddUpSituationDeleteParam deleteParam) {
|
||||
String declareMonthStr = deleteParam.getTaxYearMonth();
|
||||
long currentEmployeeId = user.getUID();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
List<Long> taxAgentIds = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentId).collect(Collectors.toList());
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
Date declareMonthDate = new Date();
|
||||
try {
|
||||
declareMonthDate = (sdf.parse(declareMonthStr+"-01"));
|
||||
}catch (Exception e){
|
||||
throw new SalaryRunTimeException("日期异常");
|
||||
}
|
||||
AddUpSituation queryParam = null;
|
||||
|
||||
if(deleteParam.getTaxAgentId() != null && (!deleteParam.getTaxAgentId().equals(""))){
|
||||
// 设置了个税扣缴义务人
|
||||
Long taxAgentId = SalaryEntityUtil.string2Long(deleteParam.getTaxAgentId());
|
||||
boolean canDelete = taxAgentIds.stream().anyMatch(t -> t == taxAgentId);
|
||||
if(!canDelete){
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内!");
|
||||
}
|
||||
ArrayList<Long> tai = new ArrayList<>();
|
||||
tai.add(taxAgentId);
|
||||
queryParam = AddUpSituation.builder().taxYearMonth(declareMonthDate).taxAgentIds(tai).build();
|
||||
}else {
|
||||
queryParam = AddUpSituation.builder().taxYearMonth(declareMonthDate).taxAgentIds(taxAgentIds).build();
|
||||
}
|
||||
|
||||
// 获取所有想要删除的数据
|
||||
List<AddUpSituation> list = biz.listSome(queryParam);
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> employees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr);
|
||||
for(AddUpSituation item : list){
|
||||
if (CollectionUtils.isNotEmpty(employees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = employees.stream().filter(f -> f.getEmployeeId().equals(item.getEmployeeId()) && f.getTaxAgentId().equals(item.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("有员工在该年月中已经完成核算并归档,不能进行一键清空!");
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Long> deleteIds = list.stream().map(AddUpSituation::getId).collect(Collectors.toList());
|
||||
biz.batchDeleteByIDS(deleteIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddUpSituationRecordDTO getAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
long uid = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(uid);
|
||||
List<String> taxAgentNames = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(addUpSituationParam.getId());
|
||||
AddUpSituationQueryParam build = AddUpSituationQueryParam.builder().ids(ids).build();
|
||||
List<AddUpSituationRecordDTO> list = biz.recordList(build);
|
||||
if(list == null || list.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
String taxAgentName = list.get(0).getTaxAgentName();
|
||||
if(!taxAgentNames.contains(taxAgentName)){
|
||||
throw new SalaryRunTimeException("您无权查看该数据!");
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchSave(List<AddUpSituation> list) {
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ package com.engine.salary.service.impl;
|
|||
import com.alibaba.druid.support.json.JSONUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
|
|
@ -31,12 +34,16 @@ import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
|||
import com.engine.salary.remote.attend.entity.Attend4Salary;
|
||||
import com.engine.salary.remote.attend.service.RemoteAttend4SalaryService;
|
||||
import com.engine.salary.remote.attend.service.impl.RemoteAttend4SalaryServiceImpl;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.AttendQuoteDataService;
|
||||
import com.engine.salary.service.AttendQuoteFieldSettingService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.SalarySobService;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.entity.vo.OrderRuleVO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
|
|
@ -777,6 +784,80 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 编辑数据
|
||||
* @return null
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/28 14:40
|
||||
*/
|
||||
@Override
|
||||
public void editData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
Map<String, String> attendQuoteData = attendQuoteDataEditParam.getAttendQuoteData();
|
||||
AttendQuoteDataBiz dataBiz = new AttendQuoteDataBiz();
|
||||
AttendQuoteDataValueBiz attendQuoteDataValueBiz = new AttendQuoteDataValueBiz();
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(attendQuoteDataEditParam.getId());
|
||||
AttendQuoteDataQueryParam build = AttendQuoteDataQueryParam.builder().ids(ids).build();
|
||||
List<AttendQuoteDataBaseDTO> list = dataBiz.list(build);
|
||||
if(list == null || list.size() == 0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
Map<String, String> attendQuoteFieldData = new HashMap<>();
|
||||
for(Map.Entry<String, String> entrySet:attendQuoteData.entrySet()){
|
||||
String[] s = entrySet.getKey().split("_");
|
||||
attendQuoteFieldData.put(s[0],entrySet.getValue());
|
||||
}
|
||||
for(Map.Entry<String, String> entrySet : attendQuoteFieldData.entrySet()){
|
||||
AttendQuoteDataValuePO updatePO = AttendQuoteDataValuePO.builder().employeeId(list.get(0).getEmployeeId()).attendQuoteFieldId(SalaryEntityUtil.string2Long(entrySet.getKey())).dataValue(entrySet.getValue()).build();
|
||||
attendQuoteDataValueBiz.updateDataValue(updatePO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 14:12
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(attendQuoteDataEditParam.getId());
|
||||
AttendQuoteDataQueryParam build = AttendQuoteDataQueryParam.builder().ids(ids).build();
|
||||
List<AttendQuoteDataBaseDTO> list = dataBiz.list(build);
|
||||
if(list==null || list.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
// 所有考勤字段
|
||||
List<AttendQuoteFieldPO> attendQuoteFields = getAllAttendQuoteFields();
|
||||
// 获取最终结果
|
||||
List<Map<String, Object>> listMaps = getListMaps(list);
|
||||
List<WeaTableColumn> columns = new ArrayList<>();
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "username"));
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(86185, "部门"), "departmentName"));
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile"));
|
||||
columns.add(new WeaTableColumn("150", SalaryI18nUtil.getI18nLabel(86317, "工号"), "jobNum"));
|
||||
|
||||
// 动态列
|
||||
if (CollectionUtils.isNotEmpty(listMaps)) {
|
||||
Map<String, Object> map = listMaps.stream().max(Comparator.comparingInt(m -> m.keySet().size())).get();
|
||||
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
|
||||
if (map.containsKey(attendQuoteField.getId() + "_attendQuoteData")) {
|
||||
columns.add(new WeaTableColumn("150", attendQuoteField.getFieldName(), attendQuoteField.getId() + "_attendQuoteData"));
|
||||
}
|
||||
}
|
||||
}
|
||||
WeaTable weaTable = new WeaTable();
|
||||
weaTable.setColumns(columns);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(weaTable.makeDataResult());
|
||||
result.success();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
datas.put("data",listMaps.get(0));
|
||||
datas.put("dataKey", result.getResultMap());
|
||||
return datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取金额数字值
|
||||
*
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ import com.engine.salary.encrypt.datacollection.OtherDeductionRecordDTOEncrypt;
|
|||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
|
||||
|
|
@ -20,12 +19,16 @@ import com.engine.salary.enums.UserStatusEnum;
|
|||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.datacollection.OtherDeductionMapper;
|
||||
import com.engine.salary.mapper.sys.SalarySysConfMapper;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.AddUpDeductionService;
|
||||
import com.engine.salary.service.OtherDeductionService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.sys.entity.vo.OrderRuleVO;
|
||||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelComment;
|
||||
|
|
@ -551,6 +554,237 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
return OtherDeductionBiz.listSome(OtherDeductionPO.builder().declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).taxAgentId(taxAgentId).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editData(OtherDeductionParam otherDeductionParam) {
|
||||
String declareMonthStr = otherDeductionParam.getDeclareMonth();
|
||||
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
|
||||
|
||||
Long currentEmployeeId = (long) user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
OtherDeductionPO byId = OtherDeductionBiz.getById(otherDeductionParam.getId());
|
||||
if(byId == null){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
Long taxAgentId = byId.getTaxAgentId();
|
||||
boolean canEdit = taxAgentList.stream().anyMatch(t -> t.getTaxAgentId() == taxAgentId);
|
||||
if(!canEdit){
|
||||
//没有编辑权限
|
||||
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
||||
}
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr);
|
||||
// 判断是否有核算过
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(otherDeductionParam.getEmployeeId()) && f.getTaxAgentId().equals(otherDeductionParam.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("该年月这条数据已经核算过,不可进行编辑!");
|
||||
}
|
||||
}
|
||||
ArrayList<OtherDeductionPO> updateList = new ArrayList<>();
|
||||
OtherDeductionPO build = OtherDeductionPO.builder().id(otherDeductionParam.getId()).businessHealthyInsurance(otherDeductionParam.getBusinessHealthyInsurance()).taxDelayEndowmentInsurance(otherDeductionParam.getTaxDelayEndowmentInsurance()).otherDeduction(otherDeductionParam.getOtherDeduction()).deductionAllowedDonation(otherDeductionParam.getDeductionAllowedDonation()).build();
|
||||
updateList.add(build);
|
||||
OtherDeductionBiz.batchUpdate(updateList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createData(OtherDeductionParam otherDeductionParam) {
|
||||
long currentEmployeeId = user.getUID();
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
//查询对于人员信息导入筛选的全局配置
|
||||
SalarySysConfPO salarySysConfPO = getSalarySysConfMapper().getOneByCode("matchEmployeeMode");
|
||||
String confValue = (salarySysConfPO != null && salarySysConfPO.getConfValue() != null && !"".equals(salarySysConfPO.getConfValue())) ? salarySysConfPO.getConfValue() : "0";
|
||||
|
||||
//税款所属期
|
||||
String declareMonthStr = Util.null2String(otherDeductionParam.getDeclareMonth());
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
//税款所属期
|
||||
Date declareMonth = SalaryDateUtil.stringToDate(declareMonthStr + "-01");
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr);
|
||||
// 查询已有数据
|
||||
List<OtherDeductionPO> list = getOtherDeductionMapper().listSome(OtherDeductionPO.builder().declareMonth(declareMonth).build());
|
||||
//合规数据
|
||||
List<OtherDeductionPO> insertData = new ArrayList<>();
|
||||
List<TaxAgentManageRangeEmployeeDTO.TaxAgentEmployee> taxAgentEmployees = Lists.newArrayList();
|
||||
Date now = new Date();
|
||||
//待插入数据库对象
|
||||
OtherDeductionPO po = OtherDeductionPO.builder()
|
||||
.tenantKey(DEFAULT_TENANT_KEY)
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
.creator((long) user.getUID())
|
||||
.declareMonth(declareMonth).build();
|
||||
|
||||
//筛选导入人员信息可以在人力资源池中匹配到的人员信息
|
||||
boolean employeeSameId = employees.stream().anyMatch(e -> e.getEmployeeId() == otherDeductionParam.getEmployeeId());
|
||||
if(!employeeSameId){
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
po.setEmployeeId(otherDeductionParam.getEmployeeId());
|
||||
String taxAgentName = otherDeductionParam.getTaxAgentName();
|
||||
if (StringUtils.isBlank(taxAgentName)) {
|
||||
//个税扣缴义务人不能为空
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不能为空");
|
||||
} else {
|
||||
Optional<TaxAgentManageRangeEmployeeDTO> optionalTemp = taxAgentList.stream().filter(m -> m.getTaxAgentName().equals(taxAgentName)).findFirst();
|
||||
if (optionalTemp.isPresent()) {
|
||||
po.setTaxAgentId(optionalTemp.get().getTaxAgentId());
|
||||
taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
||||
} else {
|
||||
//个税扣缴义务人不存在或不在权限范围内
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内");
|
||||
}
|
||||
}
|
||||
|
||||
//商业健康保险
|
||||
String businessHealthyInsurance = otherDeductionParam.getBusinessHealthyInsurance();
|
||||
po.setBusinessHealthyInsurance(businessHealthyInsurance);
|
||||
//税延养老保险
|
||||
String taxDelayEndowmentInsurance = otherDeductionParam.getTaxDelayEndowmentInsurance();
|
||||
po.setTaxDelayEndowmentInsurance(taxDelayEndowmentInsurance);
|
||||
//其他
|
||||
String otherDeduction = otherDeductionParam.getOtherDeduction();
|
||||
po.setOtherDeduction(otherDeduction);
|
||||
//准予扣除的捐赠额
|
||||
String deductionAllowedDonation = otherDeductionParam.getDeductionAllowedDonation();
|
||||
po.setDeductionAllowedDonation(deductionAllowedDonation);
|
||||
|
||||
//fixme 分权判断
|
||||
// if (openDevolution) {
|
||||
// OtherDeductionPO finalPoE = po;
|
||||
// Optional<TaxAgentManageRangeEmployeeDTO.TaxAgentEmployee> optionalTaxAgentEmp = taxAgentEmployees.stream().filter(f -> f.getEmployeeId().equals(finalPoE.getEmployeeId())).findFirst();
|
||||
// if (!optionalTaxAgentEmp.isPresent()) {
|
||||
// Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
// errorMessageMap.put("message", rowIndex + "该条数据不在个税扣缴义务人人员范围内,不可导入");
|
||||
// errorData.add(errorMessageMap);
|
||||
// errorSum += 1;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 判断是否有核算过
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
OtherDeductionPO finalPo = po;
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(finalPo.getEmployeeId()) && f.getTaxAgentId().equals(finalPo.getTaxAgentId())).findFirst();
|
||||
boolean isExist = list.stream().anyMatch(f -> f.getEmployeeId().equals(finalPo.getEmployeeId()) && f.getTaxAgentId().equals(finalPo.getTaxAgentId()));
|
||||
if (optionalAcctEmp.isPresent() && isExist) {
|
||||
throw new SalaryRunTimeException("该年月这条数据已经核算过,不可导入");
|
||||
}
|
||||
}
|
||||
insertData.add(po);
|
||||
//入库
|
||||
OtherDeductionBiz.handleImportData(insertData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSelectData(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
long currentEmployeeId = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
OtherDeductionBiz otherDeductionBiz = new OtherDeductionBiz();
|
||||
String declareMonthStr = deleteParam.getDeclareMonth();
|
||||
List<Long> deleteIds = deleteParam.getIds();
|
||||
// 已经核算过的不可操作
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr);
|
||||
// 判断是否有核算过
|
||||
List<Long> deleteList = new ArrayList<>();
|
||||
for(int i=0; i<deleteIds.size(); i++){
|
||||
Long id = deleteIds.get(i);
|
||||
OtherDeductionPO byId = otherDeductionBiz.getById(id);
|
||||
if(byId == null){
|
||||
throw new SalaryRunTimeException("数据不存在或已被删除!");
|
||||
}
|
||||
// 判断是否在个税扣缴义务人范围内
|
||||
Optional<TaxAgentManageRangeEmployeeDTO> first = taxAgentList.stream().filter(m -> m.getTaxAgentId() == byId.getTaxAgentId()).findFirst();
|
||||
if(!first.isPresent()){
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内");
|
||||
}
|
||||
// 判断用户是否存在
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(byId.getEmployeeId()) && f.getTaxAgentId().equals(byId.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("所选数据在该年月中已经核算过并归档,不可进行删除!");
|
||||
}
|
||||
}
|
||||
deleteList.add(byId.getId());
|
||||
}
|
||||
otherDeductionBiz.batchDeleteByIDS(deleteList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllData(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
String declareMonthStr = deleteParam.getDeclareMonth();
|
||||
long currentEmployeeId = user.getUID();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
List<Long> taxAgentIds = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentId).collect(Collectors.toList());
|
||||
OtherDeductionBiz otherDeductionBiz = new OtherDeductionBiz();
|
||||
Date declareMonthDate =null;
|
||||
try {
|
||||
declareMonthDate = sdf.parse(declareMonthStr+"-01");
|
||||
}catch (Exception e){
|
||||
throw new SalaryRunTimeException("日期异常");
|
||||
}
|
||||
|
||||
OtherDeductionPO queryParam = null;
|
||||
if(deleteParam.getTaxAgentId() != null && (!deleteParam.getTaxAgentId().equals(""))){
|
||||
// 设置了个税扣缴义务人
|
||||
Long taxAgentId = SalaryEntityUtil.string2Long(deleteParam.getTaxAgentId());
|
||||
boolean canDelete = taxAgentIds.stream().anyMatch(t -> t == taxAgentId);
|
||||
if(!canDelete){
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在或不在权限范围内!");
|
||||
}
|
||||
ArrayList<Long> tai = new ArrayList<>();
|
||||
tai.add(taxAgentId);
|
||||
queryParam = OtherDeductionPO.builder().declareMonth(declareMonthDate).taxAgentIds(tai).build();
|
||||
}else {
|
||||
queryParam = OtherDeductionPO.builder().declareMonth(declareMonthDate).taxAgentIds(taxAgentIds).build();
|
||||
}
|
||||
// 获取所有想要删除的数据
|
||||
List<OtherDeductionPO> list = otherDeductionBiz.listSome(queryParam);
|
||||
// 获取已经核算的数据
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getAddUpDeductionService(user).getAccountedEmployeeData(declareMonthStr);
|
||||
for(OtherDeductionPO item : list){
|
||||
if (CollectionUtils.isNotEmpty(salaryAcctEmployees)) {
|
||||
Optional<SalaryAcctEmployeePO> optionalAcctEmp = salaryAcctEmployees.stream().filter(f -> f.getEmployeeId().equals(item.getEmployeeId()) && f.getTaxAgentId().equals(item.getTaxAgentId())).findFirst();
|
||||
if (optionalAcctEmp.isPresent()) {
|
||||
throw new SalaryRunTimeException("有员工在该年月中已经完成核算并归档,不能进行一键清空!");
|
||||
}
|
||||
}
|
||||
}
|
||||
List<Long> deleteIds = list.stream().map(OtherDeductionPO::getId).collect(Collectors.toList());
|
||||
otherDeductionBiz.batchDeleteByIDS(deleteIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtherDeductionRecordDTO getOtherDeduction(OtherDeductionParam otherDeductionParam) {
|
||||
long uid = user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(uid);
|
||||
List<String> taxAgentNames = taxAgentList.stream().map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(otherDeductionParam.getId());
|
||||
OtherDeductionQueryParam build = OtherDeductionQueryParam.builder().ids(ids).build();
|
||||
List<OtherDeductionRecordDTO> list = getOtherDeductionMapper().recordList(build);
|
||||
OtherDeductionRecordDTOEncrypt.decryptOtherDeductionRecordDTOList(list);
|
||||
|
||||
if(list==null || list.size()==0){
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
String taxAgentName = list.get(0).getTaxAgentName();
|
||||
if(!taxAgentNames.contains(taxAgentName)){
|
||||
throw new SalaryRunTimeException("您无权查看该数据!");
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook downloadTemplate(OtherDeductionQueryParam param) {
|
||||
// 1.工作簿名称
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public class SalaryDateUtil {
|
|||
public static final FastDateFormat DATE_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd");
|
||||
public static final FastDateFormat DATETIME_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
public static final DateTimeFormatter YEAR_FORMATTER = DateTimeFormatter.ofPattern("yyyy");
|
||||
public static final DateTimeFormatter MONTH_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||
public static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
|||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordParam;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.wrapper.AddUpDeductionWrapper;
|
||||
|
|
@ -257,6 +259,78 @@ public class AddUpDeductionController {
|
|||
return new ResponseResult<AddUpDeductionImportParam, Map<String, Object>>(user).run(getAddUpDeductionWrapper(user)::importAddUpDeduction, importParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 新建累计专项附加扣除
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/26 14:23
|
||||
*/
|
||||
@POST
|
||||
@Path("/createAddUpDeduction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String createAddUpDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionRecordParam addUpDeduction) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionRecordParam, Map<String, Object>>(user).run(getAddUpDeductionWrapper(user)::createAddUpDeduction, addUpDeduction);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取累计专项附加扣除信息
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 11:23
|
||||
*/
|
||||
@POST
|
||||
@Path("/getAddUpDeduction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getAddUpDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionQueryParam, AddUpDeductionRecordDTO>(user).run(getAddUpDeductionWrapper(user)::getAddUpDeduction, param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 编辑累计专项附加扣除
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/25 14:08
|
||||
*/
|
||||
@POST
|
||||
@Path("/editAddUpDeduction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String editAddUpDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionRecordParam addUpDeduction) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionRecordParam, Map<String, Object>>(user).run(getAddUpDeductionWrapper(user)::editAddUpDeduction, addUpDeduction);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 累计专项附加扣除-删除所选
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 14:08
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteSelectAddUpDeduction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteSelectAddUpDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionRecordDeleteParam, Map<String, Object>>(user).run(getAddUpDeductionWrapper(user)::deleteSelectAddUpDeduction, deleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 累计专项附加扣除-一键清空
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 14:08
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteAllAddUpDeduction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteAllAddUpDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionRecordDeleteParam, Map<String, Object>>(user).run(getAddUpDeductionWrapper(user)::deleteAllAddUpDeduction, deleteParam);
|
||||
}
|
||||
|
||||
|
||||
@POST
|
||||
@Path("/getDetailList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ import com.engine.common.util.ParamUtil;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -271,6 +270,76 @@ public class AddUpSituationController {
|
|||
return new ResponseResult<AddUpSituationImportParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::importAddUpSituation, importParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 编辑数据
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 21:10
|
||||
*/
|
||||
@POST
|
||||
@Path("/editAddUpSituation")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String editAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationParam addUpSituation) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpSituationParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::editAddUpSituation, addUpSituation);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取往期累计情况
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 13:59
|
||||
*/
|
||||
@POST
|
||||
@Path("/getAddUpSituation")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationParam addUpSituation) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpSituationParam,AddUpSituationRecordDTO>(user).run(getAddUpSituationWrapper(user)::getAddUpSituation, addUpSituation);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 新建数据
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 21:10
|
||||
*/
|
||||
@POST
|
||||
@Path("/createAddUpSituation")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String createAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationParam addUpSituation) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpSituationParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::createAddUpSituation, addUpSituation);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 删除所选数据
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 21:10
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteSelectAddUpSituation")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteSelectAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationDeleteParam addUpSituationDeleteParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpSituationDeleteParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::deleteSelectAddUpSituation, addUpSituationDeleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 一键清空
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 21:10
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteAllAddUpSituation")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteAllAddUpSituation(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationDeleteParam addUpSituationDeleteParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpSituationDeleteParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::deleteAllAddUpSituation, addUpSituationDeleteParam);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/preview")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
|
|
|||
|
|
@ -208,6 +208,29 @@ public class AttendQuoteController {
|
|||
return new ResponseResult<AttendQuoteDataQueryParam, Map<String, Object>>(user).run(getAttendQuoteDataWrapper(user)::view, queryParam);
|
||||
}
|
||||
|
||||
|
||||
@POST
|
||||
@Path("/getData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getData(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AttendQuoteDataEditParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AttendQuoteDataEditParam, Map<String, Object>>(user).run(getAttendQuoteDataWrapper(user)::getData, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑考勤数据
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/editData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String editData(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AttendQuoteDataEditParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AttendQuoteDataEditParam, Map<String, Object>>(user).run(getAttendQuoteDataWrapper(user)::editData, queryParam);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/selectSalarySobList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
|
@ -330,6 +353,7 @@ public class AttendQuoteController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改考勤字段
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ package com.engine.salary.web;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
|
|
@ -32,7 +34,10 @@ import java.net.URLEncoder;
|
|||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -271,5 +276,75 @@ public class OtherDeductionController {
|
|||
return new ResponseResult<OtherDeductionImportParam, Map<String, Object>>(user).run(getOtherDeductionWrapper(user)::importData, importParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 编辑其他免税扣除
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/26 9:41
|
||||
*/
|
||||
@POST
|
||||
@Path("/editData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String editOtherDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody OtherDeductionParam otherDeductionParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<OtherDeductionParam, Map<String, Object>>(user).run(getOtherDeductionWrapper(user)::editData, otherDeductionParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取其他免税扣除数据
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 13:42
|
||||
*/
|
||||
@POST
|
||||
@Path("/getData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getOtherDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody OtherDeductionParam otherDeductionParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<OtherDeductionParam, OtherDeductionRecordDTO>(user).run(getOtherDeductionWrapper(user)::getOtherDeduction, otherDeductionParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 新建其他免税扣除
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 14:41
|
||||
*/
|
||||
@POST
|
||||
@Path("/createData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String createOtherDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody OtherDeductionParam otherDeductionParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<OtherDeductionParam, Map<String, Object>>(user).run(getOtherDeductionWrapper(user)::createData, otherDeductionParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 删除所选其他免税扣除
|
||||
* @return String
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 14:41
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteSelectData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteSelectOtherDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionRecordDeleteParam otherDeductionDeleteParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionRecordDeleteParam, Map<String, Object>>(user).run(getOtherDeductionWrapper(user)::deleteSelectData, otherDeductionDeleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 一键清空其他免税扣除
|
||||
* @return null
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 15:15
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteAllData")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String deleteAllOtherDeduction(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpDeductionRecordDeleteParam otherDeductionDeleteParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionRecordDeleteParam, Map<String, Object>>(user).run(getOtherDeductionWrapper(user)::deleteAllData, otherDeductionDeleteParam);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
|||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.AddUpDeductionService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
|
|
@ -140,4 +142,24 @@ public class AddUpDeductionWrapper extends Service {
|
|||
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
||||
return getAddUpDeductionService(user).getSearchCondition(params);
|
||||
}
|
||||
|
||||
public void editAddUpDeduction(AddUpDeductionRecordParam addUpDeduction) {
|
||||
getAddUpDeductionService(user).editAddUpDeduction(addUpDeduction);
|
||||
}
|
||||
|
||||
public void createAddUpDeduction(AddUpDeductionRecordParam addUpDeductionRecordParam) {
|
||||
getAddUpDeductionService(user).createAddUpDeduction(addUpDeductionRecordParam);
|
||||
}
|
||||
|
||||
public void deleteSelectAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
getAddUpDeductionService(user).deleteSelectAddUpDeduction(deleteParam);
|
||||
}
|
||||
|
||||
public void deleteAllAddUpDeduction(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
getAddUpDeductionService(user).deleteAllAddUpDeduction(deleteParam);
|
||||
}
|
||||
|
||||
public AddUpDeductionRecordDTO getAddUpDeduction(AddUpDeductionQueryParam param) {
|
||||
return getAddUpDeductionService(user).getAddUpDeduction(param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.AddUpSituationService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
|
|
@ -128,4 +127,53 @@ public class AddUpSituationWrapper extends Service {
|
|||
return getAddUpSituationService(user).importAddUpSituation(importParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 编辑数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 21:30
|
||||
*/
|
||||
public void editAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
getAddUpSituationService(user).editAddUpSituation(addUpSituationParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 新建数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:00
|
||||
*/
|
||||
public void createAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
getAddUpSituationService(user).createAddUpSituation(addUpSituationParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 删除所选数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:34
|
||||
*/
|
||||
public void deleteSelectAddUpSituation(AddUpSituationDeleteParam deleteParam) {
|
||||
getAddUpSituationService(user).deleteSelectAddUpSituation(deleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 一键清空数据
|
||||
* @return void
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/27 22:34
|
||||
*/
|
||||
public void deleteAllAddUpSituation(AddUpSituationDeleteParam addUpSituationDeleteParam) {
|
||||
getAddUpSituationService(user).deleteAllAddUpSituation(addUpSituationDeleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取往期累计情况
|
||||
* @return null
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 14:00
|
||||
*/
|
||||
public AddUpSituationRecordDTO getAddUpSituation(AddUpSituationParam addUpSituationParam) {
|
||||
return getAddUpSituationService(user).getAddUpSituation(addUpSituationParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@ import com.cloudstore.eccom.result.WeaResultMsg;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.datacollection.dto.AttendQuoteDataBaseDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataExportTemplateParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteDataSyncParam;
|
||||
import com.engine.salary.entity.datacollection.param.*;
|
||||
import com.engine.salary.entity.datacollection.po.AttendQuoteFieldPO;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.AttendQuoteDataService;
|
||||
|
|
@ -148,4 +145,15 @@ public class AttendQuoteDataWrapper extends Service {
|
|||
public Map<String, Object> importAttendQuoteData(AttendQuoteDataImportParam param) {
|
||||
return getAttendQuoteDataService(user).importAttendQuoteData(param);
|
||||
}
|
||||
|
||||
public void editData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
getAttendQuoteDataService(user).editData(attendQuoteDataEditParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
public Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
return getAttendQuoteDataService(user).getData(attendQuoteDataEditParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
|
||||
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionRecordDeleteParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionImportParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionParam;
|
||||
import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -204,4 +206,40 @@ public class OtherDeductionWrapper extends Service {
|
|||
public Map<String, Object> importData(OtherDeductionImportParam importParam){
|
||||
return getOtherDeductionService(user).importData(importParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*/
|
||||
public void editData(OtherDeductionParam otherDeductionParam) {
|
||||
getOtherDeductionService(user).editData(otherDeductionParam);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*/
|
||||
public void createData(OtherDeductionParam otherDeductionParam) {
|
||||
getOtherDeductionService(user).createData(otherDeductionParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除所选数据
|
||||
*/
|
||||
public void deleteSelectData(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
getOtherDeductionService(user).deleteSelectData(deleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 一键清空所有数据
|
||||
*/
|
||||
public void deleteAllData(AddUpDeductionRecordDeleteParam deleteParam) {
|
||||
getOtherDeductionService(user).deleteAllData(deleteParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
public OtherDeductionRecordDTO getOtherDeduction(OtherDeductionParam otherDeductionParam) {
|
||||
return getOtherDeductionService(user).getOtherDeduction(otherDeductionParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue