Merge branch 'develop' of https://gitee.com/qlmr/weaver-hrm-salary into develop
This commit is contained in:
commit
0474872ab5
|
|
@ -0,0 +1,8 @@
|
|||
package com.api.salary.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
@Path("/bs/hrmsalary/attendQuote")
|
||||
public class AttendQuoteController extends com.engine.salary.web.AddUpDeductionController{
|
||||
|
||||
}
|
||||
|
|
@ -5,8 +5,10 @@ import com.engine.common.biz.AbstractCommonCommand;
|
|||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpDeductionBiz;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.AddUpDeduction;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -32,6 +34,7 @@ public class AddUpDeductionGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpDeductionBiz biz = new AddUpDeductionBiz();
|
||||
|
||||
AddUpDeductionQueryParam queryParam = (AddUpDeductionQueryParam) params.get("queryParam");
|
||||
|
|
@ -49,10 +52,10 @@ public class AddUpDeductionGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
throw new SalaryRunTimeException(String.format("累计专项附加扣除不存在[id:%s]", id));
|
||||
}
|
||||
|
||||
// List<SimpleEmployee> employeeList = employeeService.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()), tenantKey);
|
||||
// if (CollectionUtils.isEmpty(employeeList)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100340, "员工信息不存在"));
|
||||
// }
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
||||
queryParam.setEmployeeId(po.getEmployeeId());
|
||||
|
||||
|
|
@ -85,8 +88,6 @@ public class AddUpDeductionGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
table.setCheckboxList(new ArrayList<>());
|
||||
table.setCheckboxpopedom(null);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
|
|
@ -12,7 +11,10 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpDeductionListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
|
@ -59,13 +61,6 @@ public class AddUpDeductionListCmd extends AbstractCommonCommand<Map<String, Obj
|
|||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
//设置check是否可用
|
||||
List<WeaTableCheckboxpopedom> checkboxpopedomList = new ArrayList<>();
|
||||
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
||||
checkboxpopedom.setPopedompara("column:enable");
|
||||
checkboxpopedomList.add(checkboxpopedom);
|
||||
table.setCheckboxList(checkboxpopedomList);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
|
|
|||
|
|
@ -4,9 +4,14 @@ import com.cloudstore.eccom.result.WeaResultMsg;
|
|||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpSituationBiz;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -29,6 +34,30 @@ public class AddUpSituationGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
|
||||
AddUpSituationQueryParam queryParam = (AddUpSituationQueryParam) params.get("queryParam");
|
||||
if (queryParam == null) {
|
||||
throw new SalaryRunTimeException("参数异常");
|
||||
}
|
||||
|
||||
Long id = queryParam.getAccumulatedSituationId();
|
||||
if (id == null) {
|
||||
throw new SalaryRunTimeException("累计情况id不能为空");
|
||||
}
|
||||
|
||||
AddUpSituation po = biz.getById(id);
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(String.format("累计情况不存在[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
||||
|
||||
String fields = " t1.id," +
|
||||
" t1.tax_year_month," +
|
||||
" t1.employee_id as employeeId," +
|
||||
|
|
@ -59,7 +88,7 @@ public class AddUpSituationGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
" (SELECT employee_id, MAX(tax_year_month) tax_year_month FROM hrsa_add_up_situation GROUP BY employee_id) t ON" +
|
||||
" t.employee_id = t1.employee_id AND t.tax_year_month = t1.tax_year_month" +
|
||||
" LEFT JOIN hrmresource e ON e.id = t1.employee_id" +
|
||||
" LEFT JOIN hrmdepartment d ON d.id = e.department" +
|
||||
" LEFT JOIN hrmdepartment d ON d.id = e.departmentid" +
|
||||
" LEFT JOIN hrsa_tax_agent t2 ON t1.tax_agent_id = t2.id";
|
||||
|
||||
SalaryWeaTable<AddUpSituationRecordDTO> table = new SalaryWeaTable<AddUpSituationRecordDTO>(user, AddUpSituationRecordDTO.class);
|
||||
|
|
@ -70,9 +99,6 @@ public class AddUpSituationGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
table.setCheckboxList(new ArrayList<>());
|
||||
table.setCheckboxpopedom(null);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
|
|
@ -12,7 +11,10 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpSituationListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
|
@ -60,7 +62,7 @@ public class AddUpSituationListCmd extends AbstractCommonCommand<Map<String, Obj
|
|||
" (SELECT employee_id, MAX(tax_year_month) tax_year_month FROM hrsa_add_up_situation GROUP BY employee_id) t ON" +
|
||||
" t.employee_id = t1.employee_id AND t.tax_year_month = t1.tax_year_month" +
|
||||
" LEFT JOIN hrmresource e ON e.id = t1.employee_id" +
|
||||
" LEFT JOIN hrmdepartment d ON d.id = e.department" +
|
||||
" LEFT JOIN hrmdepartment d ON d.id = e.departmentid" +
|
||||
" LEFT JOIN hrsa_tax_agent t2 ON t1.tax_agent_id = t2.id";
|
||||
|
||||
SalaryWeaTable<AddUpSituationDTO> table = new SalaryWeaTable<AddUpSituationDTO>(user, AddUpSituationDTO.class);
|
||||
|
|
@ -71,13 +73,6 @@ public class AddUpSituationListCmd extends AbstractCommonCommand<Map<String, Obj
|
|||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
//设置check是否可用
|
||||
List<WeaTableCheckboxpopedom> checkboxpopedomList = new ArrayList<>();
|
||||
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
||||
checkboxpopedom.setPopedompara("column:enable");
|
||||
checkboxpopedomList.add(checkboxpopedom);
|
||||
table.setCheckboxList(checkboxpopedomList);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,152 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteQueryParam;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AttendQuoteListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public AttendQuoteListCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
AttendQuoteQueryParam queryParam = (AttendQuoteQueryParam) params.get("queryParam");
|
||||
List<String> declareMonth = queryParam.getSalaryYearMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonth)) {
|
||||
queryParam.setSalaryYearMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
String fields = " t1.id," +
|
||||
" t1.declare_month as declareMonth," +
|
||||
" t1.employee_id as employeeId," +
|
||||
" e.lastname as username," +
|
||||
" d.departmentname AS departmentName," +
|
||||
" e.mobile," +
|
||||
" e.workcode as jobNum," +
|
||||
" e.companystartdate as hiredate," +
|
||||
" t2.name AS taxAgentName," +
|
||||
" t1.add_up_child_education as addUpChildEducation," +
|
||||
" t1.add_up_continuing_education as addUpContinuingEducation," +
|
||||
" t1.add_up_housing_loan_interest as addUpHousingLoanInterest," +
|
||||
" t1.add_up_housing_rent as addUpHousingRent," +
|
||||
" t1.add_up_support_elderly as addUpSupportElderly";
|
||||
|
||||
String fromSql = " FROM" +
|
||||
" hrsa_add_up_deduction t1" +
|
||||
" LEFT JOIN hrsa_tax_agent t2 ON t1.tax_agent_id = t2.id" +
|
||||
" LEFT JOIN hrmresource e ON t1.employee_id = e.id" +
|
||||
" LEFT JOIN hrmdepartment d ON e.departmentid = d.id";
|
||||
|
||||
SalaryWeaTable<AddUpDeductionDTO> table = new SalaryWeaTable<AddUpDeductionDTO>(user, AddUpDeductionDTO.class);
|
||||
table.setBackfields(fields);
|
||||
table.setSqlform(fromSql);
|
||||
table.setSqlwhere(makeSqlWhere());
|
||||
table.setSqlorderby("t1.id DESC");
|
||||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
return result.getResultMap();
|
||||
}
|
||||
|
||||
|
||||
private String makeSqlWhere() {
|
||||
|
||||
AddUpDeductionQueryParam queryParam = (AddUpDeductionQueryParam) params.get("queryParam");
|
||||
//申报月份
|
||||
List<String> declareMonth = queryParam.getDeclareMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonth)) {
|
||||
queryParam.setDeclareMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
String sqlWhere = "t1.delete_type = 0 AND t2.delete_type = 0";
|
||||
Collection<Long> ids = queryParam.getIds();
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
String idsStr = ids.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND t1.id IN (" + idsStr + ")";
|
||||
}
|
||||
Long employeeId = queryParam.getEmployeeId();
|
||||
if (employeeId != null) {
|
||||
sqlWhere += " AND t1.employee_id =" + employeeId;
|
||||
}
|
||||
String keyword = queryParam.getKeyword();
|
||||
if (StringUtils.isNotBlank(keyword)) {
|
||||
sqlWhere += " AND (" +
|
||||
" e.lastname like '%" + keyword + "%'" +
|
||||
" OR d.departmentname like '%" + keyword + "%'" +
|
||||
" OR e.workcode like ''%" + keyword + "%'" +
|
||||
" )";
|
||||
}
|
||||
// 申报月份
|
||||
List<String> declareMonths = queryParam.getDeclareMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonths)) {
|
||||
if (declareMonths.size() == 1) {
|
||||
sqlWhere += " AND t1.declare_month = '" + declareMonths.get(0) + "'";
|
||||
}
|
||||
if (declareMonths.size() == 2) {
|
||||
sqlWhere += " AND (t1.declare_month BETWEEN '" + declareMonths.get(0) + "' AND '" + declareMonths.get(1) + "')";
|
||||
}
|
||||
}
|
||||
//姓名
|
||||
String username = queryParam.getUsername();
|
||||
if (StringUtils.isNotBlank(username)) {
|
||||
sqlWhere += " AND e.lastname like '%" + username + "%'";
|
||||
}
|
||||
//个税扣缴义务人
|
||||
Long taxAgentId = queryParam.getTaxAgentId();
|
||||
if (taxAgentId != null) {
|
||||
sqlWhere += " AND t1.tax_agent_id = " + taxAgentId;
|
||||
}
|
||||
//部门
|
||||
List<Long> departmentIds = queryParam.getDepartmentIds();
|
||||
if (CollectionUtils.isNotEmpty(departmentIds)) {
|
||||
String departmentStrIds = departmentIds.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND d.id IN (" + departmentStrIds + ")";
|
||||
}
|
||||
//工号
|
||||
String jobNum = queryParam.getJobNum();
|
||||
if (StringUtils.isNotBlank(jobNum)) {
|
||||
sqlWhere += " AND e.workcode like '%" + jobNum + "%'";
|
||||
}
|
||||
//入职日期
|
||||
List<Date> hiredate = queryParam.getHiredate();
|
||||
if (CollectionUtils.isNotEmpty(hiredate) && hiredate.size() == 2) {
|
||||
sqlWhere += " AND (e.companystartdate BETWEEN '" + hiredate.get(0) + "' AND '" + hiredate.get(1) + "')";
|
||||
}
|
||||
//手机号
|
||||
String mobile = queryParam.getMobile();
|
||||
if (StringUtils.isNotBlank(mobile)) {
|
||||
sqlWhere += " AND e.mobile like '%" + mobile + "%'";
|
||||
}
|
||||
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ import com.engine.salary.biz.EmployBiz;
|
|||
import com.engine.salary.biz.OtherDeductionBiz;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
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 com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -79,7 +79,7 @@ public class OtherDeductionGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
" LEFT JOIN hrmresource e ON e.id = t1.employee_id" +
|
||||
" LEFT JOIN hrmdepartment d ON d.id = e.departmentid";
|
||||
|
||||
SalaryWeaTable<AddUpDeductionRecordDTO> table = new SalaryWeaTable<AddUpDeductionRecordDTO>(user, AddUpDeductionRecordDTO.class);
|
||||
SalaryWeaTable<OtherDeductionRecordDTO> table = new SalaryWeaTable<OtherDeductionRecordDTO>(user, OtherDeductionRecordDTO.class);
|
||||
table.setBackfields(fields);
|
||||
table.setSqlform(fromSql);
|
||||
table.setSqlwhere(makeSqlWhere(queryParam));
|
||||
|
|
@ -87,8 +87,6 @@ public class OtherDeductionGetDetailListCmd extends AbstractCommonCommand<Map<St
|
|||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
table.setCheckboxList(new ArrayList<>());
|
||||
table.setCheckboxpopedom(null);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
|
|
@ -12,7 +11,10 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class OtherDeductionListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
|
@ -58,13 +60,6 @@ public class OtherDeductionListCmd extends AbstractCommonCommand<Map<String, Obj
|
|||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
//设置check是否可用
|
||||
List<WeaTableCheckboxpopedom> checkboxpopedomList = new ArrayList<>();
|
||||
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
||||
checkboxpopedom.setPopedompara("column:enable");
|
||||
checkboxpopedomList.add(checkboxpopedom);
|
||||
table.setCheckboxList(checkboxpopedomList);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
|
|
|||
|
|
@ -72,9 +72,7 @@ public class TaxDeclarationListCmd extends AbstractCommonCommand<Map<String, Obj
|
|||
table.getColumns().add(new WeaTableColumn("20%", "名称", "createTime", ""));
|
||||
table.getColumns().add(new WeaTableColumn("20%", "名称", "description", ""));
|
||||
|
||||
//设置check是否可用
|
||||
table.setCheckboxList(null);
|
||||
table.setCheckboxpopedom(null);
|
||||
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
apidatas = result.getResultMap();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.engine.salary.annotation.SalaryTable;
|
|||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.util.excel.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -18,7 +19,7 @@ import java.util.Date;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//数据采集-累计专项附加扣除记录
|
||||
@SalaryTable(pageId = "a4f85287-3354-4275-adn9-7d06e54y6rj8")
|
||||
@SalaryTable(pageId = "a4f85287-3354-4275-adn9-7d06e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX)
|
||||
public class AddUpDeductionRecordDTO {
|
||||
|
||||
//主键id
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.engine.salary.annotation.SalaryTableOperate;
|
|||
import com.engine.salary.util.excel.ExcelProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -20,7 +21,7 @@ import java.util.Date;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "a4f85287-e3f9-7841-adn9-7d06e54y6rj8", operates = {
|
||||
@SalaryTable(pageId = "a4f85287-e3f9-7841-adn9-7d06e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX, operates = {
|
||||
@SalaryTableOperate(text = "查看明细")
|
||||
})
|
||||
public class AddUpSituationDTO {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.engine.salary.entity.datacollection.dto;
|
||||
|
||||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.util.excel.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -23,6 +25,7 @@ import java.util.Date;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "a5f85287-3354-4275-adn9-7d06e54y6rj8",tableType = WeaTableTypeEnum.CHECKBOX)
|
||||
public class AddUpSituationRecordDTO {
|
||||
|
||||
@SalaryTableColumn(column = "id", display = false)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
package com.engine.salary.entity.datacollection.dto;
|
||||
|
||||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.SalaryTableOperate;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据采集-考勤引用列表
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "a4f852o1-e3f9-7841-adn9-7d06e54y6rj8", operates = {
|
||||
@SalaryTableOperate(text = "查看", index = "0"),
|
||||
@SalaryTableOperate(text = "删除", index = "1")
|
||||
})
|
||||
public class AttendQuoteListDTO {
|
||||
|
||||
@SalaryTableColumn(column = "id", display = false)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
@SalaryTableColumn(text = "薪资所属月", width = "10%", column = "salaryYearMonth", transmethod = "com.engine.salary.transmethod.TransMethod.timeToMoth")
|
||||
@JsonFormat(pattern = "yyyy-MM")
|
||||
private Date salaryYearMonth;
|
||||
|
||||
@SalaryTableColumn(text = "关联账套", width = "10%", column = "salarySobName")
|
||||
private String salarySobName;
|
||||
|
||||
@SalaryTableColumn(text = "考勤周期", width = "10%", column = "attendCycle")
|
||||
private String attendCycle;
|
||||
|
||||
@SalaryTableColumn(text = "来源", width = "10%", column = "sourceType")
|
||||
private String sourceType;
|
||||
|
||||
@SalaryTableColumn(text = "薪资周期", width = "10%", column = "salaryCycle")
|
||||
private String salaryCycle;
|
||||
|
||||
@SalaryTableColumn(text = "操作人", width = "10%", column = "creator")
|
||||
private String creator;
|
||||
|
||||
@SalaryTableColumn(text = "备注", width = "10%", column = "description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 薪资核算状态。0:未核算、1:已核算
|
||||
*/
|
||||
private Integer salaryAccountingStatus;
|
||||
}
|
||||
|
|
@ -3,12 +3,14 @@ package com.engine.salary.entity.datacollection.dto;
|
|||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.SalaryTableOperate;
|
||||
import com.engine.salary.util.excel.ExcelProperty;
|
||||
import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据采集-其他免税扣除列表
|
||||
|
|
@ -22,7 +24,7 @@ import java.time.LocalDate;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d06e54y6rj8", operates = {
|
||||
@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d06e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX, operates = {
|
||||
@SalaryTableOperate(text = "查看明细")
|
||||
})
|
||||
public class OtherDeductionListDTO {
|
||||
|
|
@ -38,45 +40,56 @@ public class OtherDeductionListDTO {
|
|||
//姓名
|
||||
|
||||
@SalaryTableColumn(text = "姓名", width = "10%", column = "username")
|
||||
@ExcelProperty(index = 0)
|
||||
private String username;
|
||||
|
||||
//个税扣缴义务人
|
||||
@SalaryTableColumn(text = "个税扣缴义务人", width = "10%", column = "taxAgentName")
|
||||
@ExcelProperty(index = 1)
|
||||
private String taxAgentName;
|
||||
|
||||
//部门
|
||||
@SalaryTableColumn(text = "部门", width = "10%", column = "departmentName")
|
||||
@ExcelProperty(index = 2)
|
||||
private String departmentName;
|
||||
|
||||
//手机号
|
||||
@SalaryTableColumn(text = "手机号", width = "10%", column = "mobile")
|
||||
@ExcelProperty(index = 3)
|
||||
private String mobile;
|
||||
|
||||
//工号
|
||||
@SalaryTableColumn(text = "工号", width = "10%", column = "jobNum")
|
||||
@ExcelProperty(index = 4)
|
||||
private String jobNum;
|
||||
|
||||
//证件号码
|
||||
@SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo")
|
||||
@ExcelProperty(index = 5)
|
||||
private String idNo;
|
||||
|
||||
//入职日期
|
||||
@ExcelProperty(index = 6)
|
||||
@SalaryTableColumn(text = "入职日期", width = "10%", column = "hiredate", transmethod = "com.engine.salary.transmethod.TransMethod.timeToDate")
|
||||
private LocalDate hiredate;
|
||||
private Date hiredate;
|
||||
|
||||
//商业健康保险
|
||||
@ExcelProperty(index = 7)
|
||||
@SalaryTableColumn(text = "商业健康保险", width = "10%", column = "businessHealthyInsurance")
|
||||
private String businessHealthyInsurance;
|
||||
|
||||
//税延养老保险
|
||||
@ExcelProperty(index = 8)
|
||||
@SalaryTableColumn(text = "税延养老保险", width = "10%", column = "taxDelayEndowmentInsurance")
|
||||
private String taxDelayEndowmentInsurance;
|
||||
|
||||
//其他
|
||||
@ExcelProperty(index = 9)
|
||||
@SalaryTableColumn(text = "其他", width = "10%", column = "otherDeduction")
|
||||
private String otherDeduction;
|
||||
|
||||
//准予扣除的捐赠额
|
||||
@ExcelProperty(index = 10)
|
||||
@SalaryTableColumn(text = "准予扣除的捐赠额", width = "10%", column = "deductionAllowedDonation")
|
||||
private String deductionAllowedDonation;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.datacollection.dto;
|
|||
|
||||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.weaverboot.tools.enumTools.weaComponent.WeaTableTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -21,7 +22,7 @@ import java.util.Date;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d98e54y6rj8")
|
||||
@SalaryTable(pageId = "a4f85287-e3f9-6612-adn9-7d98e54y6rj8", tableType = WeaTableTypeEnum.CHECKBOX)
|
||||
public class OtherDeductionRecordDTO {
|
||||
|
||||
//主键id
|
||||
|
|
|
|||
|
|
@ -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.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据采集-考勤引用查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendQuoteQueryParam {
|
||||
|
||||
private Collection<Long> ids;
|
||||
|
||||
//薪资所属月
|
||||
private List<String> salaryYearMonth;
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.engine.salary.entity.datacollection.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 考勤引用表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendQuotePO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 税款所属期
|
||||
*/
|
||||
private Date salaryYearMonth;
|
||||
/**
|
||||
* 年份
|
||||
*/
|
||||
private Integer year;
|
||||
/**
|
||||
* 月份
|
||||
*/
|
||||
private Integer month;
|
||||
/**
|
||||
* 薪资账套表的主键id
|
||||
*/
|
||||
private Long salarySobId;
|
||||
/**
|
||||
* 来源。1:引用、2:导入
|
||||
*/
|
||||
private Integer sourceType;
|
||||
/**
|
||||
* 薪资核算状态。0:未核算、1:已核算
|
||||
*/
|
||||
private Integer salaryAccountingStatus;
|
||||
/**
|
||||
* 考勤周期
|
||||
*/
|
||||
private String attendCycle;
|
||||
/**
|
||||
* 薪资周期
|
||||
*/
|
||||
private String salaryCycle;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.engine.salary.entity.salarysob.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 薪资帐套表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalarySobPO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 应税项目。1:正常工资薪金所得
|
||||
*/
|
||||
private Integer incomeCategory;
|
||||
/**
|
||||
* 薪资周期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
private Integer salaryCycleType;
|
||||
/**
|
||||
* 薪资周期的起始日期
|
||||
*/
|
||||
private Integer salaryCycleFromDay;
|
||||
/**
|
||||
* 税款所属期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
private Integer taxCycleType;
|
||||
/**
|
||||
* 考勤周期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
private Integer attendCycleType;
|
||||
/**
|
||||
* 考勤周期的起始日期
|
||||
*/
|
||||
private Integer attendCycleFromDay;
|
||||
/**
|
||||
* 社保福利所属期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
private Integer socialSecurityCycleType;
|
||||
/**
|
||||
* 是否禁用。0:正常使用、1:禁用
|
||||
*/
|
||||
private Integer disable;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
}
|
||||
|
|
@ -4,6 +4,8 @@ alter table hrsa_tax_rate_base modify id bigint auto_increment;
|
|||
alter table hrsa_tax_rate_detail modify id bigint auto_increment;
|
||||
alter table hrsa_add_up_deduction modify id bigint auto_increment;
|
||||
alter table hrsa_add_up_situation modify id bigint auto_increment;
|
||||
alter table hrsa_other_deduction modify id bigint auto_increment;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
from hrmresource e
|
||||
where e.status not in (7)
|
||||
<if test="collection != null and collection.size()>0">
|
||||
AND d.id IN
|
||||
AND e.id IN
|
||||
<foreach collection="collection" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface AttendQuoteService {
|
||||
/**
|
||||
* 数据采集-考勤引用列表
|
||||
*/
|
||||
Map<String, Object> list(Map<String, Object> params);
|
||||
|
||||
// /**
|
||||
// * 删除数据采集-考勤引用
|
||||
// * @param ids
|
||||
// * @param employeeId
|
||||
// * @param tenantKey
|
||||
// * @return
|
||||
// */
|
||||
// WeaResult<String> delete(Collection<Long> ids, Long employeeId, String tenantKey);
|
||||
//
|
||||
// /**
|
||||
// * 获取引用考勤表单
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// WeaForm getSyncForm(Long currentEmployeeId, String currentTenantKey);
|
||||
//
|
||||
// /**
|
||||
// * 获取薪资周期和考勤周期
|
||||
// * @param salaryYearMonth
|
||||
// * @param salarySobId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// Map<String, Object> getSalaryCycleAndAttendCycle(YearMonth salaryYearMonth, Long salarySobId, Long currentEmployeeId, String currentTenantKey);
|
||||
//
|
||||
// /**
|
||||
// * 获取薪资账套下拉列表
|
||||
// * @param currentEmployeeId
|
||||
// * @param currentTenantKey
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> selectSalarySobList(Long currentEmployeeId, String currentTenantKey);
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.cmd.datacollection.AttendQuoteListCmd;
|
||||
import com.engine.salary.service.AttendQuoteService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class AttendQuoteServiceImpl extends Service implements AttendQuoteService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> list(Map<String, Object> params) {
|
||||
return commandExecutor.execute(new AttendQuoteListCmd(params, user));
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,17 @@ public class AddUpSituationController {
|
|||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
map.put("queryParam", queryParam);
|
||||
return ResponseResult.run(getService(user)::list, ParamUtil.request2Map(request));
|
||||
return ResponseResult.run(getService(user)::list, map);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/getDetailList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getDetailList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AddUpSituationQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
map.put("queryParam", queryParam);
|
||||
return ResponseResult.run(getService(user)::getDetailList, map);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -250,4 +260,6 @@ public class AddUpSituationController {
|
|||
return ResponseResult.run(getService(user)::importAddUpSituation, map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
package com.engine.salary.web;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.datacollection.param.AttendQuoteQueryParam;
|
||||
import com.engine.salary.service.AttendQuoteService;
|
||||
import com.engine.salary.service.impl.AttendQuoteServiceImpl;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
public class AttendQuoteController {
|
||||
|
||||
private AttendQuoteService getService(User user) {
|
||||
return (AttendQuoteService) ServiceUtil.getService(AttendQuoteServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 考勤数据列表
|
||||
*/
|
||||
@GET
|
||||
@Path("/list")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AttendQuoteQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
map.put("queryParam", queryParam);
|
||||
return ResponseResult.run(getService(user)::list, map);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue