艾志--薪资档案-往期累计档案页面调整
This commit is contained in:
parent
5720db4517
commit
b63e4250be
|
|
@ -71,16 +71,16 @@ public class AddUpSituation {
|
|||
private String addUpSubtraction;
|
||||
|
||||
/**
|
||||
* 累计社保个人合计
|
||||
* 累计社保个人合计---> 累计专项扣除
|
||||
*/
|
||||
@SalaryFormulaVar(defaultLabel = "累计社保个人合计", labelId = 86710, dataType = "number")
|
||||
@SalaryFormulaVar(defaultLabel = "累计专项扣除", labelId = 86710, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpSocialSecurityTotal;
|
||||
|
||||
/**
|
||||
* 累计公积金个人合计
|
||||
*/
|
||||
@SalaryFormulaVar(defaultLabel = "累计公积金个人合计", labelId = 86709, dataType = "number")
|
||||
// @SalaryFormulaVar(defaultLabel = "累计公积金个人合计", labelId = 86709, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpAccumulationFundTotal;
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计其他免税扣除
|
||||
*/
|
||||
@SalaryFormulaVar(defaultLabel = "累计其他免税扣除", labelId = 93902, dataType = "number")
|
||||
@SalaryFormulaVar(defaultLabel = "累计其他扣除", labelId = 93902, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpOtherDeduction;
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计准予扣除的捐赠额
|
||||
*/
|
||||
@SalaryFormulaVar(defaultLabel = "累计准予扣除的捐赠额", labelId = 86703, dataType = "number")
|
||||
@SalaryFormulaVar(defaultLabel = "累计准予扣除的捐赠", labelId = 86703, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpAllowedDonation;
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ public class AddUpSituation {
|
|||
/**
|
||||
* 累计已预扣预缴税额
|
||||
*/
|
||||
@SalaryFormulaVar(defaultLabel = "累计已预扣预缴税额", labelId = 86702, dataType = "number")
|
||||
@SalaryFormulaVar(defaultLabel = "已缴税额", labelId = 86702, dataType = "number")
|
||||
@Encrypt
|
||||
private String addUpAdvanceTax;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,15 +90,15 @@ public class AddUpSituationDTO {
|
|||
private String addUpSubtraction;
|
||||
|
||||
//累计社保个人合计
|
||||
@TableTitle(title = "累计社保个人合计", dataIndex = "addUpSocialSecurityTotal", key = "addUpSocialSecurityTotal")
|
||||
@TableTitle(title = "累计专项扣除", dataIndex = "addUpSocialSecurityTotal", key = "addUpSocialSecurityTotal")
|
||||
@ExcelProperty(index = 9)
|
||||
@Encrypt
|
||||
private String addUpSocialSecurityTotal;
|
||||
|
||||
//累计公积金个人合计
|
||||
@TableTitle(title = "累计公积金个人合计", dataIndex = "addUpAccumulationFundTotal", key = "addUpAccumulationFundTotal")
|
||||
@ExcelProperty(index = 10)
|
||||
@Encrypt
|
||||
// @TableTitle(title = "累计公积金个人合计", dataIndex = "addUpAccumulationFundTotal", key = "addUpAccumulationFundTotal")
|
||||
// @ExcelProperty(index = 10)
|
||||
// @Encrypt
|
||||
private String addUpAccumulationFundTotal;
|
||||
|
||||
//累计子女教育
|
||||
|
|
@ -133,37 +133,37 @@ public class AddUpSituationDTO {
|
|||
|
||||
//累计企业(职业)年金及其他福利
|
||||
@TableTitle(title = "累计企业(职业)年金及其他福利", dataIndex = "addUpEnterpriseAndOther", key = "addUpEnterpriseAndOther")
|
||||
@ExcelProperty(index = 11)
|
||||
@ExcelProperty(index = 10)
|
||||
@Encrypt
|
||||
private String addUpEnterpriseAndOther;
|
||||
|
||||
//累计其他扣除
|
||||
@TableTitle(title = "累计其他免税扣除", dataIndex = "addUpOtherDeduction", key = "addUpOtherDeduction")
|
||||
@ExcelProperty(index = 12)
|
||||
@TableTitle(title = "累计其他扣除", dataIndex = "addUpOtherDeduction", key = "addUpOtherDeduction")
|
||||
@ExcelProperty(index = 11)
|
||||
@Encrypt
|
||||
private String addUpOtherDeduction;
|
||||
|
||||
//累计免税收入
|
||||
@TableTitle(title = "累计免税收入", dataIndex = "addUpTaxExemptIncome", key = "addUpTaxExemptIncome")
|
||||
@ExcelProperty(index = 13)
|
||||
@ExcelProperty(index = 12)
|
||||
@Encrypt
|
||||
private String addUpTaxExemptIncome;
|
||||
|
||||
//累计准予扣除的捐赠额
|
||||
@TableTitle(title = "累计准予扣除的捐赠额", dataIndex = "addUpAllowedDonation", key = "addUpAllowedDonation")
|
||||
@ExcelProperty(index = 14)
|
||||
@TableTitle(title = "累计准予扣除的捐赠", dataIndex = "addUpAllowedDonation", key = "addUpAllowedDonation")
|
||||
@ExcelProperty(index = 13)
|
||||
@Encrypt
|
||||
private String addUpAllowedDonation;
|
||||
|
||||
//累计减免税额
|
||||
@TableTitle(title = "累计减免税额", dataIndex = "addUpTaxSavings", key = "addUpTaxSavings")
|
||||
@ExcelProperty(index = 15)
|
||||
@ExcelProperty(index = 14)
|
||||
@Encrypt
|
||||
private String addUpTaxSavings;
|
||||
|
||||
//累计已预扣预缴税额
|
||||
@TableTitle(title = "累计已预扣预缴税额", dataIndex = "addUpAdvanceTax", key = "addUpAdvanceTax")
|
||||
@ExcelProperty(index = 16)
|
||||
@TableTitle(title = "已缴税额", dataIndex = "addUpAdvanceTax", key = "addUpAdvanceTax")
|
||||
@ExcelProperty(index = 15)
|
||||
@Encrypt
|
||||
private String addUpAdvanceTax;
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ public class AddUpSituationDTO {
|
|||
/**
|
||||
* 实际累计已预扣预缴税额
|
||||
*/
|
||||
@ExcelProperty(index = 17)
|
||||
@ExcelProperty(index = 16)
|
||||
@TableTitle(title = "实际累计已预扣预缴税额", dataIndex = "actualAddUpAdvanceTax", key = "actualAddUpAdvanceTax")
|
||||
@Encrypt
|
||||
private String actualAddUpAdvanceTax;
|
||||
|
|
@ -188,7 +188,7 @@ public class AddUpSituationDTO {
|
|||
/**
|
||||
* 个税调差
|
||||
*/
|
||||
@ExcelProperty(index = 18)
|
||||
@ExcelProperty(index = 17)
|
||||
@TableTitle(title = "个税调差", dataIndex = "taxAdjustment", key = "taxAdjustment")
|
||||
@Encrypt
|
||||
private String taxAdjustment;
|
||||
|
|
@ -196,7 +196,7 @@ public class AddUpSituationDTO {
|
|||
/**
|
||||
* 累计应纳税所得额
|
||||
*/
|
||||
@ExcelProperty(index = 19)
|
||||
@ExcelProperty(index = 18)
|
||||
@TableTitle(title = "累计应纳税所得额", dataIndex = "addUpTaxableIncome", key = "addUpTaxableIncome")
|
||||
@Encrypt
|
||||
private String addUpTaxableIncome;
|
||||
|
|
|
|||
|
|
@ -120,4 +120,6 @@ public interface AddUpSituationService {
|
|||
* @return
|
||||
*/
|
||||
Map<String, Object> onlineRequest(AddUpDeductionMonthTaxAgentParam param);
|
||||
|
||||
String azChangeAddUpSituationItemName();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import com.engine.salary.entity.datacollection.response.GetCompanyIncomesRespons
|
|||
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO;
|
||||
import com.engine.salary.entity.salaryformula.po.FormulaPO;
|
||||
import com.engine.salary.entity.salaryformula.po.FormulaVar;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO;
|
||||
|
|
@ -115,6 +117,10 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
return MapperProxyFactory.getProxy(EmployeeDeclareMapper.class);
|
||||
}
|
||||
|
||||
private SalaryFormulaService getSalaryFormulaService(User user) {
|
||||
return ServiceUtil.getService(SalaryFormulaServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSearchCondition() {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
|
|
@ -298,8 +304,8 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
long employeeId = user.getUID();
|
||||
// excel标题
|
||||
final List<String> title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计收入额", "累计减除费用",
|
||||
"累计社保个人合计", "累计公积金个人合计", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额",
|
||||
"累计已预扣预缴税额", "实际累计已预扣预缴税额", "个税调差", "累计应纳税所得额");
|
||||
"累计专项扣除", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠", "累计减免税额",
|
||||
"已缴税额", "实际累计已预扣预缴税额", "个税调差", "累计应纳税所得额");
|
||||
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
|
|
@ -328,7 +334,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
cellList.add(Util.null2String(dto.getAddUpIncome()));
|
||||
cellList.add(Util.null2String(dto.getAddUpSubtraction()));
|
||||
cellList.add(Util.null2String(dto.getAddUpSocialSecurityTotal()));
|
||||
cellList.add(Util.null2String(dto.getAddUpAccumulationFundTotal()));
|
||||
// cellList.add(Util.null2String(dto.getAddUpAccumulationFundTotal()));
|
||||
cellList.add(Util.null2String(dto.getAddUpEnterpriseAndOther()));
|
||||
cellList.add(Util.null2String(dto.getAddUpOtherDeduction()));
|
||||
cellList.add(Util.null2String(dto.getAddUpTaxExemptIncome()));
|
||||
|
|
@ -359,8 +365,8 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
long employeeId = user.getUID();
|
||||
//excel标题
|
||||
List<String> title = Arrays.asList("姓名", "税款所属期", "个税扣缴义务人", "部门", "手机号", "工号", "累计收入额", "累计减除费用",
|
||||
"累计社保个人合计", "累计公积金个人合计", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额",
|
||||
"累计已预扣预缴税额", "实际累计已预扣预缴税额", "个税调差", "累计应纳税所得额");
|
||||
"累计专项扣除", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠", "累计减免税额",
|
||||
"已缴税额", "实际累计已预扣预缴税额", "个税调差", "累计应纳税所得额");
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
|
||||
//查询详细信息
|
||||
|
|
@ -458,14 +464,14 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
SalaryI18nUtil.getI18nLabel(86319, "入职日期"),
|
||||
SalaryI18nUtil.getI18nLabel(86712, "累计收入额"),
|
||||
SalaryI18nUtil.getI18nLabel(86711, "累计减除费用"),
|
||||
SalaryI18nUtil.getI18nLabel(86710, "累计社保个人合计"),
|
||||
SalaryI18nUtil.getI18nLabel(86709, "累计公积金个人合计"),
|
||||
SalaryI18nUtil.getI18nLabel(86710, "累计专项扣除"),
|
||||
// SalaryI18nUtil.getI18nLabel(86709, "累计公积金个人合计"),
|
||||
SalaryI18nUtil.getI18nLabel(90567, "累计企业(职业)年金及其他福利"),
|
||||
SalaryI18nUtil.getI18nLabel(93902, "累计其他免税扣除"),
|
||||
SalaryI18nUtil.getI18nLabel(93902, "累计其他扣除"),
|
||||
SalaryI18nUtil.getI18nLabel(86704, "累计免税收入"),
|
||||
SalaryI18nUtil.getI18nLabel(86703, "累计准予扣除的捐赠额"),
|
||||
SalaryI18nUtil.getI18nLabel(86703, "累计准予扣除的捐赠"),
|
||||
SalaryI18nUtil.getI18nLabel(105478, "累计减免税额"),
|
||||
SalaryI18nUtil.getI18nLabel(86702, "累计已预扣预缴税额"),
|
||||
SalaryI18nUtil.getI18nLabel(86702, "已缴税额"),
|
||||
SalaryI18nUtil.getI18nLabel(86702, "实际累计已预扣预缴税额"),
|
||||
SalaryI18nUtil.getI18nLabel(86702, "个税调差"),
|
||||
SalaryI18nUtil.getI18nLabel(86702, "累计应纳税所得额")
|
||||
|
|
@ -524,7 +530,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
excelComments.add(new ExcelComment(16, 0, 21, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
||||
excelComments.add(new ExcelComment(17, 0, 22, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
||||
excelComments.add(new ExcelComment(18, 0, 23, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
||||
excelComments.add(new ExcelComment(19, 0, 24, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
||||
// excelComments.add(new ExcelComment(19, 0, 24, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
||||
|
||||
return ExcelUtil.genWorkbookV2(rows, sheetName, excelComments);
|
||||
}
|
||||
|
|
@ -559,7 +565,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
InputStream fileInputStream = null;
|
||||
try {
|
||||
fileInputStream = ImageFileManager.getInputStreamById(Integer.valueOf(imageId));
|
||||
List<AddUpSituationDTO> excelDates = ExcelParseHelper.parse2Map(fileInputStream, AddUpSituationDTO.class, 0, 1, 20, "template.xlsx");
|
||||
List<AddUpSituationDTO> excelDates = ExcelParseHelper.parse2Map(fileInputStream, AddUpSituationDTO.class, 0, 1, 19, "template.xlsx");
|
||||
apidatas.put("preview", excelDates);
|
||||
} finally {
|
||||
IOUtils.closeQuietly(fileInputStream);
|
||||
|
|
@ -613,7 +619,7 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
try {
|
||||
fileInputStream = ImageFileManager.getInputStreamById(Integer.parseInt(imageId));
|
||||
|
||||
List<AddUpSituationDTO> excelDates = ExcelParseHelper.parse2Map(fileInputStream, AddUpSituationDTO.class, 0, 1, 20, "template.xlsx");
|
||||
List<AddUpSituationDTO> excelDates = ExcelParseHelper.parse2Map(fileInputStream, AddUpSituationDTO.class, 0, 1, 19, "template.xlsx");
|
||||
|
||||
int total = excelDates.size();
|
||||
int index = 0;
|
||||
|
|
@ -1338,4 +1344,83 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
private List<EmployeeDeclarePO> getEmployeeDeclarePOList(Collection<Long> taxAgentIds, Date declareMonth) {
|
||||
return getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder().declareStatus(DeclareStatusEnum.DECLARE_SUCCESS.getValue()).taxCycle(declareMonth).taxAgentIds(taxAgentIds).build());
|
||||
}
|
||||
|
||||
/**
|
||||
* ①累计社保个人合计、累计公积金个人合计 2列合并为 累计专项扣除
|
||||
* ②累计其他免税扣除 改为 累计其他扣除
|
||||
* ③累计准予扣除的捐赠额 改为 累计准予扣除的捐赠
|
||||
* ④计已预扣预缴税额 改为 已缴税额
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String azChangeAddUpSituationItemName() {
|
||||
// ①累计社保个人合计、累计公积金个人合计 2列合并为 累计专项扣除
|
||||
String oldName = "累计社保个人合计";
|
||||
String newName = "累计专项扣除";
|
||||
String fieldNamePrefix = "{往期累计情况.%s}";
|
||||
String code = "addUpSituation_addUpSocialSecurityTotal";
|
||||
changeItemName(oldName, newName, fieldNamePrefix, code);
|
||||
|
||||
// ②累计其他免税扣除 改为 累计其他扣除
|
||||
oldName = "累计其他免税扣除";
|
||||
newName = "累计其他扣除";
|
||||
fieldNamePrefix = "{往期累计情况.%s}";
|
||||
code = "addUpSituation_addUpOtherDeduction";
|
||||
changeItemName(oldName, newName, fieldNamePrefix, code);
|
||||
|
||||
|
||||
// ③累计准予扣除的捐赠额 改为 累计准予扣除的捐赠
|
||||
oldName = "累计准予扣除的捐赠额";
|
||||
newName = "累计准予扣除的捐赠";
|
||||
fieldNamePrefix = "{往期累计情况.%s}";
|
||||
code = "addUpSituation_addUpAllowedDonation";
|
||||
changeItemName(oldName, newName, fieldNamePrefix, code);
|
||||
|
||||
|
||||
// ④累计已预扣预缴税额 改为 已缴税额
|
||||
oldName = "累计已预扣预缴税额";
|
||||
newName = "已缴税额";
|
||||
fieldNamePrefix = "{往期累计情况.%s}";
|
||||
code = "addUpSituation_addUpAdvanceTax";
|
||||
changeItemName(oldName, newName, fieldNamePrefix, code);
|
||||
|
||||
|
||||
return "true";
|
||||
}
|
||||
|
||||
private void changeItemName(String oldName, String newName, String fieldNamePrefix, String code) {
|
||||
// // 改名后更新公式
|
||||
// String oldName = "累计社保个人合计";
|
||||
// String newName = "累计专项扣除";
|
||||
//
|
||||
// // 薪资项目
|
||||
// String fieldNamePrefix = "{往期累计情况.%s}";
|
||||
//
|
||||
// // 往期累计.累计社保个人合计
|
||||
// String code = "addUpSituation_addUpSocialSecurityTotal";
|
||||
Date now = new Date();
|
||||
List<FormulaVar> formulaVars = getSalaryFormulaService(user).listByCode(code);
|
||||
formulaVars.forEach(v -> {
|
||||
FormulaVar formulaVar = FormulaVar.builder()
|
||||
.id(v.getId())
|
||||
.name(newName)
|
||||
.fieldName(String.format(fieldNamePrefix, newName))
|
||||
.updateTime(now)
|
||||
.build();
|
||||
getSalaryFormulaService(user).updateVar(formulaVar);
|
||||
});
|
||||
|
||||
List<Long> formulaIds = SalaryEntityUtil.properties(formulaVars, FormulaVar::getFormulaId, Collectors.toList());
|
||||
List<FormulaPO> formulaPOS = getSalaryFormulaService(user).listByIds(formulaIds);
|
||||
formulaPOS.forEach(f -> {
|
||||
String formula = f.getFormula();
|
||||
formula = formula.replace(String.format(fieldNamePrefix, oldName), String.format(fieldNamePrefix, newName));
|
||||
FormulaPO formulaPO = FormulaPO.builder()
|
||||
.id(f.getId())
|
||||
.formula(formula)
|
||||
.updateTime(now)
|
||||
.build();
|
||||
getSalaryFormulaService(user).update(formulaPO);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,4 +367,17 @@ public class AddUpSituationController {
|
|||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<AddUpDeductionMonthTaxAgentParam, Map<String, Object>>(user).run(getAddUpSituationWrapper(user)::onlineRequest, param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 艾志修改往期累计项目名称
|
||||
|
||||
*/
|
||||
@GET
|
||||
@Path("/azChangeAddUpSituationItemName")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String azChangeAddUpItemName(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Void, String>(user).run(getAddUpSituationWrapper(user)::azChangeAddUpSituationItemName);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,4 +170,15 @@ public class AddUpSituationWrapper extends Service {
|
|||
public Map<String, Object> onlineRequest(AddUpDeductionMonthTaxAgentParam param) {
|
||||
return getAddUpSituationService(user).onlineRequest(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* ①累计社保个人合计、累计公积金个人合计 2列合并为 累计专项扣除
|
||||
* ①累计其他免税扣除 改为 累计其他扣除
|
||||
* ②累计准予扣除的捐赠额 改为 累计准予扣除的捐赠
|
||||
* ③累计已预扣预缴税额 改为 已缴税额
|
||||
* @return
|
||||
*/
|
||||
public String azChangeAddUpSituationItemName() {
|
||||
return getAddUpSituationService(user).azChangeAddUpSituationItemName();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue