全量迁移
This commit is contained in:
parent
484639a690
commit
080a69c929
|
|
@ -0,0 +1,14 @@
|
|||
package com.engine.salary.entity.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SalaryBillConfig {
|
||||
private Long id;
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.engine.salary.entity.config;
|
||||
|
||||
import com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig;
|
||||
import com.engine.salary.entity.salaryitem.config.SalaryItemConfig;
|
||||
import com.engine.salary.entity.taxagent.config.TaxAgentConfig;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamImplicit;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("SalaryConfig")
|
||||
public class SalaryConfig {
|
||||
// //版本
|
||||
// @XStreamAlias("version")
|
||||
// @XStreamAsAttribute
|
||||
// private String version;
|
||||
//
|
||||
// //基本信息
|
||||
//// @XStreamImplicit
|
||||
// private List<String> modules;
|
||||
|
||||
//社保方案
|
||||
|
||||
//薪资项目
|
||||
@XStreamImplicit
|
||||
private List<SalaryItemConfig> salaryItemConfigs;
|
||||
|
||||
//字段管理
|
||||
@XStreamImplicit
|
||||
private List<ArchiveFieldConfig> archiveFieldConfig;
|
||||
|
||||
//扣缴义务人
|
||||
@XStreamImplicit
|
||||
private List<TaxAgentConfig> taxAgentConfigs;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
package com.engine.salary.entity.salaryarchive.config;
|
||||
|
||||
import com.engine.salary.enums.SalaryRoundingModeEnum;
|
||||
import com.engine.salary.enums.SalarySystemTypeEnum;
|
||||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("ArchiveFieldConfig")
|
||||
public class ArchiveFieldConfig {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@XStreamAlias("id")
|
||||
@XStreamAsAttribute
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@XStreamAlias("name")
|
||||
@XStreamAsAttribute
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@XStreamAlias("code")
|
||||
@XStreamAsAttribute
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 是否是系统项目
|
||||
*
|
||||
* @see SalarySystemTypeEnum
|
||||
*/
|
||||
@XStreamAlias("systemType")
|
||||
@XStreamAsAttribute
|
||||
private Integer systemType;
|
||||
|
||||
/**
|
||||
* 系统薪资项目的id(是从哪个系统薪资项目复制过来的)
|
||||
*/
|
||||
@XStreamAlias("sysSalaryItemId")
|
||||
@XStreamAsAttribute
|
||||
private Long sysSalaryItemId;
|
||||
|
||||
/**
|
||||
* 默认使用。0:默认不适用、1:默认使用
|
||||
*/
|
||||
@XStreamAlias("useDefault")
|
||||
@XStreamAsAttribute
|
||||
private Integer useDefault;
|
||||
|
||||
/**
|
||||
* 薪资档案引用。0:薪资档案未引用、1:薪资档案引用
|
||||
*/
|
||||
@XStreamAlias("useInEmployeeSalary")
|
||||
@XStreamAsAttribute
|
||||
private Integer useInEmployeeSalary;
|
||||
|
||||
/**
|
||||
* 核算时隐藏
|
||||
*/
|
||||
@XStreamAlias("hideDefault")
|
||||
@XStreamAsAttribute
|
||||
private Integer hideDefault;
|
||||
|
||||
/**
|
||||
* 进位规则
|
||||
*
|
||||
* @see SalaryRoundingModeEnum
|
||||
*/
|
||||
@XStreamAlias("roundingMode")
|
||||
@XStreamAsAttribute
|
||||
private Integer roundingMode;
|
||||
|
||||
/**
|
||||
* 保留的小数位数
|
||||
*/
|
||||
@XStreamAlias("pattern")
|
||||
@XStreamAsAttribute
|
||||
private Integer pattern;
|
||||
|
||||
/**
|
||||
* 取值方式
|
||||
*
|
||||
* @see SalaryValueTypeEnum
|
||||
*/
|
||||
@XStreamAlias("valueType")
|
||||
@XStreamAsAttribute
|
||||
private Integer valueType;
|
||||
|
||||
/**
|
||||
* 字段类型
|
||||
*
|
||||
* @see SalaryDataTypeEnum
|
||||
*/
|
||||
@XStreamAlias("dataType")
|
||||
@XStreamAsAttribute
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 公式
|
||||
*/
|
||||
@XStreamAlias("formulaId")
|
||||
@XStreamAsAttribute
|
||||
private Long formulaId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@XStreamAlias("description")
|
||||
@XStreamAsAttribute
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 是否可以编辑。0:不可编辑、1:可编辑
|
||||
*/
|
||||
@XStreamAlias("canEdit")
|
||||
@XStreamAsAttribute
|
||||
private Integer canEdit;
|
||||
|
||||
/**
|
||||
* 可见性
|
||||
*/
|
||||
@XStreamAlias("sharedType")
|
||||
@XStreamAsAttribute
|
||||
private Integer sharedType;
|
||||
|
||||
/**
|
||||
* 可见范围
|
||||
*/
|
||||
@XStreamAlias("taxAgentIds")
|
||||
@XStreamAsAttribute
|
||||
private String taxAgentIds;
|
||||
|
||||
/**
|
||||
* 0不可删除,1可删除
|
||||
*/
|
||||
@XStreamAlias("canDelete")
|
||||
@XStreamAsAttribute
|
||||
private Integer canDelete;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@XStreamAlias("sortedIndex")
|
||||
@XStreamAsAttribute
|
||||
private Integer sortedIndex;
|
||||
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
@XStreamAlias("width")
|
||||
@XStreamAsAttribute
|
||||
private Integer width;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
@XStreamAlias("defaultValue")
|
||||
@XStreamAsAttribute
|
||||
private String defaultValue;
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
package com.engine.salary.entity.salaryitem.config;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||
import com.thoughtworks.xstream.annotations.XStreamImplicit;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -12,55 +15,78 @@ import java.util.List;
|
|||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("FormulaConfig")
|
||||
public class FormulaConfig {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@XStreamAlias("id")
|
||||
@XStreamAsAttribute
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@XStreamAlias("name")
|
||||
@XStreamAsAttribute
|
||||
private String name;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@XStreamAlias("description")
|
||||
@XStreamAsAttribute
|
||||
private String description;
|
||||
/**
|
||||
* 模块
|
||||
*/
|
||||
@XStreamAlias("module")
|
||||
@XStreamAsAttribute
|
||||
private String module;
|
||||
/**
|
||||
* 用途
|
||||
*/
|
||||
@XStreamAlias("useFor")
|
||||
@XStreamAsAttribute
|
||||
private String useFor;
|
||||
/**
|
||||
* 引用类型
|
||||
*/
|
||||
@XStreamAlias("referenceType")
|
||||
@XStreamAsAttribute
|
||||
private String referenceType;
|
||||
/**
|
||||
* 返回类型
|
||||
*/
|
||||
@XStreamAlias("returnType")
|
||||
@XStreamAsAttribute
|
||||
private String returnType;
|
||||
/**
|
||||
* 校验类型
|
||||
*/
|
||||
@XStreamAlias("validateType")
|
||||
@XStreamAsAttribute
|
||||
private String validateType;
|
||||
/**
|
||||
* 扩展参数
|
||||
*/
|
||||
@XStreamAlias("extendParam")
|
||||
@XStreamAsAttribute
|
||||
private String extendParam;
|
||||
/**
|
||||
* 公式内容
|
||||
*/
|
||||
@XStreamAlias("formula")
|
||||
@XStreamAsAttribute
|
||||
private String formula;
|
||||
|
||||
/**
|
||||
* 公式实际运行脚本
|
||||
*/
|
||||
@XStreamAlias("formulaRunScript")
|
||||
@XStreamAsAttribute
|
||||
private String formulaRunScript;
|
||||
|
||||
|
||||
private List<FormulaVarConfig> vars;
|
||||
@XStreamImplicit
|
||||
private List<FormulaVarConfig> varConfigs;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.engine.salary.entity.salaryitem.config;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -10,40 +12,63 @@ import lombok.experimental.Accessors;
|
|||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("FormulaVarConfig")
|
||||
public class FormulaVarConfig {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@XStreamAlias("id")
|
||||
@XStreamAsAttribute
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@XStreamAlias("name")
|
||||
@XStreamAsAttribute
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 公式id
|
||||
*/
|
||||
@XStreamAlias("formulaId")
|
||||
@XStreamAsAttribute
|
||||
private Long formulaId;
|
||||
|
||||
/**
|
||||
* 字段id
|
||||
*/
|
||||
@XStreamAlias("fieldId")
|
||||
@XStreamAsAttribute
|
||||
private String fieldId;
|
||||
|
||||
/**
|
||||
* 字段名称
|
||||
*/
|
||||
@XStreamAlias("fieldName")
|
||||
@XStreamAsAttribute
|
||||
private String fieldName;
|
||||
|
||||
/**
|
||||
* 字段类型,number,string
|
||||
*/
|
||||
@XStreamAlias("fieldType")
|
||||
@XStreamAsAttribute
|
||||
private String fieldType;
|
||||
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
@XStreamAlias("source")
|
||||
@XStreamAsAttribute
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@XStreamAlias("orderIndex")
|
||||
@XStreamAsAttribute
|
||||
private Integer orderIndex;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import com.engine.salary.enums.SalaryRoundingModeEnum;
|
|||
import com.engine.salary.enums.SalarySystemTypeEnum;
|
||||
import com.engine.salary.enums.SalaryValueTypeEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -14,20 +16,27 @@ import lombok.experimental.Accessors;
|
|||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("SalaryItemConfig")
|
||||
public class SalaryItemConfig {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@XStreamAlias("id")
|
||||
@XStreamAsAttribute
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@XStreamAlias("name")
|
||||
@XStreamAsAttribute
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@XStreamAlias("code")
|
||||
@XStreamAsAttribute
|
||||
private String code;
|
||||
|
||||
/**
|
||||
|
|
@ -35,26 +44,36 @@ public class SalaryItemConfig {
|
|||
*
|
||||
* @see SalarySystemTypeEnum
|
||||
*/
|
||||
@XStreamAlias("systemType")
|
||||
@XStreamAsAttribute
|
||||
private Integer systemType;
|
||||
|
||||
/**
|
||||
* 系统薪资项目的id(是从哪个系统薪资项目复制过来的)
|
||||
*/
|
||||
@XStreamAlias("sysSalaryItemId")
|
||||
@XStreamAsAttribute
|
||||
private Long sysSalaryItemId;
|
||||
|
||||
/**
|
||||
* 默认使用。0:默认不适用、1:默认使用
|
||||
*/
|
||||
@XStreamAlias("useDefault")
|
||||
@XStreamAsAttribute
|
||||
private Integer useDefault;
|
||||
|
||||
/**
|
||||
* 薪资档案引用。0:薪资档案未引用、1:薪资档案引用
|
||||
*/
|
||||
@XStreamAlias("useInEmployeeSalary")
|
||||
@XStreamAsAttribute
|
||||
private Integer useInEmployeeSalary;
|
||||
|
||||
/**
|
||||
* 核算时隐藏
|
||||
*/
|
||||
@XStreamAlias("hideDefault")
|
||||
@XStreamAsAttribute
|
||||
private Integer hideDefault;
|
||||
|
||||
/**
|
||||
|
|
@ -62,11 +81,15 @@ public class SalaryItemConfig {
|
|||
*
|
||||
* @see SalaryRoundingModeEnum
|
||||
*/
|
||||
@XStreamAlias("roundingMode")
|
||||
@XStreamAsAttribute
|
||||
private Integer roundingMode;
|
||||
|
||||
/**
|
||||
* 保留的小数位数
|
||||
*/
|
||||
@XStreamAlias("pattern")
|
||||
@XStreamAsAttribute
|
||||
private Integer pattern;
|
||||
|
||||
/**
|
||||
|
|
@ -74,6 +97,8 @@ public class SalaryItemConfig {
|
|||
*
|
||||
* @see SalaryValueTypeEnum
|
||||
*/
|
||||
@XStreamAlias("valueType")
|
||||
@XStreamAsAttribute
|
||||
private Integer valueType;
|
||||
|
||||
/**
|
||||
|
|
@ -81,54 +106,74 @@ public class SalaryItemConfig {
|
|||
*
|
||||
* @see SalaryDataTypeEnum
|
||||
*/
|
||||
@XStreamAlias("dataType")
|
||||
@XStreamAsAttribute
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 公式
|
||||
*/
|
||||
@XStreamAlias("formulaId")
|
||||
@XStreamAsAttribute
|
||||
private Long formulaId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@XStreamAlias("description")
|
||||
@XStreamAsAttribute
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 是否可以编辑。0:不可编辑、1:可编辑
|
||||
*/
|
||||
@XStreamAlias("canEdit")
|
||||
@XStreamAsAttribute
|
||||
private Integer canEdit;
|
||||
|
||||
/**
|
||||
* 可见性
|
||||
*/
|
||||
@XStreamAlias("sharedType")
|
||||
@XStreamAsAttribute
|
||||
private Integer sharedType;
|
||||
|
||||
/**
|
||||
* 可见范围
|
||||
*/
|
||||
@XStreamAlias("taxAgentIds")
|
||||
@XStreamAsAttribute
|
||||
private String taxAgentIds;
|
||||
|
||||
/**
|
||||
* 0不可删除,1可删除
|
||||
*/
|
||||
@XStreamAlias("canDelete")
|
||||
@XStreamAsAttribute
|
||||
private Integer canDelete;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@XStreamAlias("sortedIndex")
|
||||
@XStreamAsAttribute
|
||||
private Integer sortedIndex;
|
||||
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
@XStreamAlias("width")
|
||||
@XStreamAsAttribute
|
||||
private Integer width;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
@XStreamAlias("defaultValue")
|
||||
@XStreamAsAttribute
|
||||
private String defaultValue;
|
||||
|
||||
|
||||
private FormulaConfig formula;
|
||||
@XStreamAlias("FormulaConfig")
|
||||
private FormulaConfig formulaConfig;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ public class SalaryItemExportParam {
|
|||
|
||||
private List<Long> ids;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,104 @@
|
|||
package com.engine.salary.entity.salarysob.config;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("SalarySobConfig")
|
||||
public class SalarySobConfig {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@XStreamAlias("id")
|
||||
@XStreamAsAttribute
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@XStreamAlias("name")
|
||||
@XStreamAsAttribute
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
@XStreamAlias("taxAgentId")
|
||||
@XStreamAsAttribute
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 应税项目。1:正常工资薪金所得
|
||||
*/
|
||||
@XStreamAlias("incomeCategory")
|
||||
@XStreamAsAttribute
|
||||
private Integer incomeCategory;
|
||||
|
||||
/**
|
||||
* 薪资周期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
@XStreamAlias("salaryCycleType")
|
||||
@XStreamAsAttribute
|
||||
private Integer salaryCycleType;
|
||||
|
||||
/**
|
||||
* 薪资周期的起始日期
|
||||
*/
|
||||
@XStreamAlias("salaryCycleFromDay")
|
||||
@XStreamAsAttribute
|
||||
private Integer salaryCycleFromDay;
|
||||
|
||||
/**
|
||||
* 税款所属期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
@XStreamAlias("taxCycleType")
|
||||
@XStreamAsAttribute
|
||||
private Integer taxCycleType;
|
||||
|
||||
/**
|
||||
* 考勤周期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
@XStreamAlias("attendCycleType")
|
||||
@XStreamAsAttribute
|
||||
private Integer attendCycleType;
|
||||
|
||||
/**
|
||||
* 考勤周期的起始日期
|
||||
*/
|
||||
@XStreamAlias("attendCycleFromDay")
|
||||
@XStreamAsAttribute
|
||||
private Integer attendCycleFromDay;
|
||||
|
||||
/**
|
||||
* 社保福利所属期。1:上上月、2:上月、3:本月、4:下月
|
||||
*/
|
||||
@XStreamAlias("socialSecurityCycleType")
|
||||
@XStreamAsAttribute
|
||||
private Integer socialSecurityCycleType;
|
||||
|
||||
/**
|
||||
* 是否禁用。0:正常使用、1:禁用
|
||||
*/
|
||||
@XStreamAlias("disable")
|
||||
@XStreamAsAttribute
|
||||
private Integer disable;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@XStreamAlias("description")
|
||||
@XStreamAsAttribute
|
||||
private String description;
|
||||
|
||||
|
||||
// private List<SalaryBillConfig> salaryBillConfigs;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.engine.salary.entity.taxagent.config;
|
||||
|
||||
import com.engine.salary.entity.salarysob.config.SalarySobConfig;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
||||
import com.thoughtworks.xstream.annotations.XStreamImplicit;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@XStreamAlias("TaxAgentConfig")
|
||||
public class TaxAgentConfig {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@XStreamAlias("id")
|
||||
@XStreamAsAttribute
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@XStreamAlias("name")
|
||||
@XStreamAsAttribute
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@XStreamAlias("description")
|
||||
@XStreamAsAttribute
|
||||
private String description;
|
||||
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@XStreamAlias("sortedIndex")
|
||||
@XStreamAsAttribute
|
||||
private Integer sortedIndex;
|
||||
|
||||
//薪资账套
|
||||
@XStreamImplicit
|
||||
private List<SalarySobConfig> salarySobConfigs;
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
package com.engine.salary.mapper.archive;
|
||||
|
||||
import com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
||||
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveItemQueryParam;
|
||||
import com.engine.salary.entity.salaryarchive.param.SalaryItemAdjustRecordQueryParam;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface SalaryArchiveItemMapper {
|
||||
|
|
@ -97,4 +98,6 @@ public interface SalaryArchiveItemMapper {
|
|||
void batchDeleteHistoryData(SalaryArchiveItemPO build);
|
||||
|
||||
int batchUpdate(@Param("collection") List<SalaryArchiveItemPO> pos);
|
||||
|
||||
List<ArchiveFieldConfig> getAllConfig(@Param("ids") Collection<Long> ids);
|
||||
}
|
||||
|
|
@ -1137,4 +1137,77 @@
|
|||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="configResultMap" type="com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig">
|
||||
<result column="item_id" property="id"/>
|
||||
<result column="item_name" property="name"/>
|
||||
<result column="item_code" property="code"/>
|
||||
<result column="item_system_type" property="systemType"/>
|
||||
<result column="item_sys_salary_item_id" property="sysSalaryItemId"/>
|
||||
<result column="item_use_default" property="useDefault"/>
|
||||
<result column="item_use_in_employee_salary" property="useInEmployeeSalary"/>
|
||||
<result column="item_rounding_mode" property="roundingMode"/>
|
||||
<result column="item_pattern" property="pattern"/>
|
||||
<result column="item_value_type" property="valueType"/>
|
||||
<result column="item_formula_id" property="formulaId"/>
|
||||
<result column="item_description" property="description"/>
|
||||
<result column="item_can_edit" property="canEdit"/>
|
||||
<result column="item_data_type" property="dataType"/>
|
||||
<result column="item_shared_type" property="sharedType"/>
|
||||
<result column="item_tax_agent_ids" property="taxAgentIds"/>
|
||||
<result column="item_sorted_index" property="sortedIndex"/>
|
||||
<result column="item_hide_default" property="hideDefault"/>
|
||||
<result column="item_width" property="width"/>
|
||||
<result column="item_default_value" property="defaultValue"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="itemColumns">
|
||||
item.id as item_id
|
||||
,item.name as item_name
|
||||
, item.code as item_code
|
||||
, item.system_type as item_system_type
|
||||
, item.sys_salary_item_id as item_sys_salary_item_id
|
||||
, item.use_default as item_use_default
|
||||
, item.use_in_employee_salary as item_use_in_employee_salary
|
||||
, item.rounding_mode as item_rounding_mode
|
||||
, item.pattern as item_pattern
|
||||
, item.value_type as item_value_type
|
||||
, item.formula_id as item_formula_id
|
||||
, item.description as item_description
|
||||
, item.can_edit as item_can_edit
|
||||
, item.can_delete as item_can_delete
|
||||
, item.data_type as item_data_type
|
||||
, item.shared_type as item_shared_type
|
||||
, item.tax_agent_ids as item_tax_agent_ids
|
||||
, item.sorted_index as item_sorted_index
|
||||
, item.hide_default as item_hide_default
|
||||
, item.width as item_width
|
||||
, item.default_value as item_default_value
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="getAllConfig" resultMap="configResultMap">
|
||||
select
|
||||
<include refid="itemColumns"/>
|
||||
from hrsa_salary_item item
|
||||
where item.delete_type=0 and item.use_in_employee_salary = 1
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND item.id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -72,6 +72,8 @@ public interface SalaryItemMapper {
|
|||
|
||||
List<SalaryItemConfig> getConfig(@Param("ids") Collection<Long> ids);
|
||||
|
||||
List<SalaryItemConfig> getAllConfig(@Param("ids") Collection<Long> ids);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -610,7 +610,7 @@
|
|||
<result column="item_hide_default" property="hideDefault"/>
|
||||
<result column="item_width" property="width"/>
|
||||
<result column="item_default_value" property="defaultValue"/>
|
||||
<association property="formula" javaType="com.engine.salary.entity.salaryitem.config.FormulaConfig">
|
||||
<association property="formulaConfig" javaType="com.engine.salary.entity.salaryitem.config.FormulaConfig">
|
||||
<result column="formula_id" property="id"/>
|
||||
<result column="formula_name" property="name"/>
|
||||
<result column="formula_description" property="description"/>
|
||||
|
|
@ -622,7 +622,7 @@
|
|||
<result column="formula_extend_param" property="extendParam"/>
|
||||
<result column="formula_formula" property="formula"/>
|
||||
<result column="formula_formulaRunScript" property="formulaRunScript"/>
|
||||
<collection property="vars" ofType="com.engine.salary.entity.salaryitem.config.FormulaVarConfig">
|
||||
<collection property="varConfigs" ofType="com.engine.salary.entity.salaryitem.config.FormulaVarConfig">
|
||||
<result column="var_id" property="id"/>
|
||||
<result column="var_name" property="name"/>
|
||||
<result column="var_formula_id" property="formulaId"/>
|
||||
|
|
@ -722,7 +722,31 @@
|
|||
where item.delete_type=0 and item.use_in_employee_salary = 0
|
||||
and system_type = 0
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND id IN
|
||||
AND item.id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getAllConfig" resultMap="configResultMap">
|
||||
select
|
||||
<include refid="itemColumns"/>
|
||||
from hrsa_salary_item item
|
||||
left join
|
||||
(
|
||||
select
|
||||
<include refid="formulaColumns"/>
|
||||
<include refid="varColumns"/>
|
||||
from hrsa_formula formula
|
||||
left join hrsa_formula_var var on var.formula_id = formula.id
|
||||
where formula.delete_type=0 and var.delete_type=0
|
||||
) f
|
||||
on item.formula_id = f.formula_id
|
||||
where item.delete_type=0 and item.use_in_employee_salary = 0
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND item.id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.mapper.salarysob;
|
||||
|
||||
import com.engine.salary.entity.salarysob.config.SalarySobConfig;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -53,4 +54,6 @@ public interface SalarySobMapper {
|
|||
List<SalarySobPO> listByParam(@Param("param") SalarySobPO SalarySobPO);
|
||||
|
||||
List<SalarySobPO> listByName(SalarySobPO build);
|
||||
|
||||
List<SalarySobConfig> getConfig(Long taxAgentId);
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@
|
|||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salarysob.po.SalarySobPO" databaseId="oracle">
|
||||
|
||||
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||
select hrsa_salary_sob_id.currval from dual
|
||||
</selectKey>
|
||||
|
||||
|
|
@ -446,7 +446,7 @@
|
|||
<update id="deleteByIds">
|
||||
UPDATE hrsa_salary_sob
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
|
|
@ -454,7 +454,6 @@
|
|||
</update>
|
||||
|
||||
|
||||
|
||||
<select id="listByParam" resultType="com.engine.salary.entity.salarysob.po.SalarySobPO">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
|
|
@ -509,6 +508,28 @@
|
|||
and name = #{name}
|
||||
</select>
|
||||
|
||||
<resultMap id="configResultMap" type="com.engine.salary.entity.salarysob.config.SalarySobConfig">
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="income_category" property="incomeCategory"/>
|
||||
<result column="salary_cycle_type" property="salaryCycleType"/>
|
||||
<result column="salary_cycle_from_day" property="salaryCycleFromDay"/>
|
||||
<result column="tax_cycle_type" property="taxCycleType"/>
|
||||
<result column="attend_cycle_type" property="attendCycleType"/>
|
||||
<result column="attend_cycle_from_day" property="attendCycleFromDay"/>
|
||||
<result column="social_security_cycle_type" property="socialSecurityCycleType"/>
|
||||
<result column="disable" property="disable"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getConfig" resultMap="configResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from hrsa_salary_sob t
|
||||
where t.delete_type=0
|
||||
and tax_agent_id=#{taxAgentId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.mapper.taxagent;
|
||||
|
||||
import com.engine.salary.entity.taxagent.config.TaxAgentConfig;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentEmployeePO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
|
|
@ -69,4 +70,6 @@ public interface TaxAgentMapper {
|
|||
|
||||
List<TaxAgentEmployeePO> listEmployee();
|
||||
|
||||
List<TaxAgentConfig> getAllConfig();
|
||||
|
||||
}
|
||||
|
|
@ -263,5 +263,19 @@
|
|||
where e.status not in (7)
|
||||
</select>
|
||||
|
||||
<resultMap id="configResultMap" type="com.engine.salary.entity.taxagent.config.TaxAgentConfig">
|
||||
<result column="description" property="description"/>
|
||||
<result column="id" property="id"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="sorted_index" property="sortedIndex"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getAllConfig" resultMap="configResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from hrsa_tax_agent t
|
||||
where t.delete_type=0
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
||||
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveItemSaveParam;
|
||||
import com.engine.salary.entity.salaryarchive.param.SalaryItemAdjustBeforeParam;
|
||||
|
|
@ -156,4 +157,5 @@ public interface SalaryArchiveItemService {
|
|||
* @date 2022/11/14 13:38
|
||||
*/
|
||||
String editSingleSalaryItem(SalaryArchiveItemSaveParam salaryArchiveItemSaveParam);
|
||||
List<ArchiveFieldConfig> getAllConfig();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@ public interface SalaryItemService {
|
|||
|
||||
List<SalaryItemConfig> getConfig(SalaryItemExportParam param);
|
||||
|
||||
List<SalaryItemConfig> getAllConfig(SalaryItemExportParam param);
|
||||
|
||||
Map<String, Object> preview(SalaryItemImportParam param);
|
||||
|
||||
ImportExcelResponse importSalaryItem(SalaryItemImportParam param);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.salarysob.config.SalarySobConfig;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobBasicSaveParam;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobDisableParam;
|
||||
|
|
@ -154,4 +155,6 @@ public interface SalarySobService {
|
|||
* @return
|
||||
*/
|
||||
List<SalarySobPO> listByTaxAgentIds(Collection<Long> taxAgentIds);
|
||||
|
||||
List<SalarySobConfig> getConfig(Long taxAgentId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.taxagent.config.TaxAgentConfig;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeTaxAgentDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentListDTO;
|
||||
|
|
@ -258,4 +259,5 @@ public interface TaxAgentService {
|
|||
* @return
|
||||
*/
|
||||
Collection<Long> listEmployeeIdsInTaxAgent(Long taxAgentId);
|
||||
List<TaxAgentConfig> getAllConfig();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.biz.SalaryItemBiz;
|
|||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryItemAdjustRecordListDTO;
|
||||
import com.engine.salary.entity.salaryarchive.param.*;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
||||
|
|
@ -20,6 +21,7 @@ import com.engine.salary.enums.salaryarchive.SalaryArchiveFieldTypeEnum;
|
|||
import com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum;
|
||||
import com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.archive.SalaryArchiveItemMapper;
|
||||
import com.engine.salary.service.SalaryArchiveItemService;
|
||||
import com.engine.salary.service.SalaryArchiveService;
|
||||
import com.engine.salary.service.SalaryEmployeeService;
|
||||
|
|
@ -27,6 +29,7 @@ import com.engine.salary.service.TaxAgentService;
|
|||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.SalaryLoggerUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
|
|
@ -55,6 +58,11 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
private SalaryItemBiz salaryItemMapper = new SalaryItemBiz();
|
||||
private SalaryArchiveItemBiz salaryArchiveItemMapper = new SalaryArchiveItemBiz();
|
||||
|
||||
private SalaryArchiveItemMapper getSalaryArchiveItemMapper() {
|
||||
return MapperProxyFactory.getProxy(SalaryArchiveItemMapper.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SalaryArchiveItemPO getById(Long salaryArchiveItemId) {
|
||||
return salaryArchiveItemMapper.getById(salaryArchiveItemId);
|
||||
|
|
@ -267,6 +275,11 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ArchiveFieldConfig> getAllConfig() {
|
||||
return getSalaryArchiveItemMapper().getAllConfig(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null
|
||||
* @description 构建薪资档案中调薪的更新PO
|
||||
|
|
|
|||
|
|
@ -540,6 +540,11 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
return getSalaryItemMapper().getConfig(param.getIds());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalaryItemConfig> getAllConfig(SalaryItemExportParam param) {
|
||||
return getSalaryItemMapper().getAllConfig(param.getIds());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> preview(SalaryItemImportParam param) {
|
||||
InputStream fileInputStream = null;
|
||||
|
|
@ -717,8 +722,8 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
row.add(SalaryRoundingModeEnum.parseByValue(e.getRoundingMode()).getDefaultLabel());
|
||||
row.add(e.getPattern());
|
||||
row.add(SalaryValueTypeEnum.parseByValue(e.getValueType()).getDefaultLabel());
|
||||
row.add(e.getFormula() == null ? "" : e.getFormula().getFormula());
|
||||
row.add(e.getFormula() == null ? "" : JsonUtil.parseMap(Util.null2String(e.getFormula().getExtendParam()), String.class).getOrDefault("sqlReturnKey", ""));
|
||||
row.add(e.getFormulaConfig() == null ? "" : e.getFormulaConfig().getFormula());
|
||||
row.add(e.getFormulaConfig() == null ? "" : JsonUtil.parseMap(Util.null2String(e.getFormulaConfig().getExtendParam()), String.class).getOrDefault("sqlReturnKey", ""));
|
||||
row.add(e.getSortedIndex());
|
||||
row.add(e.getWidth());
|
||||
row.add(e.getDefaultValue());
|
||||
|
|
@ -750,8 +755,8 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
|||
row.add(SalaryRoundingModeEnum.parseByValue(e.getRoundingMode()).getDefaultLabel());
|
||||
row.add(e.getPattern());
|
||||
row.add(SalaryValueTypeEnum.parseByValue(e.getValueType()).getDefaultLabel());
|
||||
row.add(e.getFormula() == null ? "" : e.getFormula().getFormula());
|
||||
row.add(e.getFormula() == null ? "" : JsonUtil.parseMap(Util.null2String(e.getFormula().getExtendParam()), String.class).getOrDefault("sqlReturnKey", ""));
|
||||
row.add(e.getFormulaConfig() == null ? "" : e.getFormulaConfig().getFormula());
|
||||
row.add(e.getFormulaConfig() == null ? "" : JsonUtil.parseMap(Util.null2String(e.getFormulaConfig().getExtendParam()), String.class).getOrDefault("sqlReturnKey", ""));
|
||||
row.add(e.getSortedIndex());
|
||||
row.add(e.getWidth());
|
||||
row.add(e.getDefaultValue());
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.engine.salary.entity.salaryitem.bo.SysSalaryItemBO;
|
|||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.salaryitem.po.SysSalaryItemPO;
|
||||
import com.engine.salary.entity.salarysob.bo.*;
|
||||
import com.engine.salary.entity.salarysob.config.SalarySobConfig;
|
||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||
import com.engine.salary.entity.salarysob.param.*;
|
||||
import com.engine.salary.entity.salarysob.po.*;
|
||||
|
|
@ -784,6 +785,11 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
return getSalarySobMapper().listSome(SalarySobPO.builder().taxAgentIds(taxAgentIds).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalarySobConfig> getConfig(Long taxAgentId) {
|
||||
return getSalarySobMapper().getConfig(taxAgentId);
|
||||
}
|
||||
|
||||
|
||||
public List<SalarySobPO> filterByAdmin(List<SalarySobPO> salarySobPOS) {
|
||||
long employeeId = user.getUID();
|
||||
|
|
|
|||
|
|
@ -13,11 +13,13 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
|||
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||
import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO;
|
||||
import com.engine.salary.entity.salarysob.config.SalarySobConfig;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO;
|
||||
import com.engine.salary.entity.taxagent.bo.TaxAgentBO;
|
||||
import com.engine.salary.entity.taxagent.config.TaxAgentConfig;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeTaxAgentDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentListDTO;
|
||||
|
|
@ -89,6 +91,11 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
}
|
||||
|
||||
|
||||
private SalarySobService getSalarySobService(User user) {
|
||||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
|
||||
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -797,5 +804,15 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
|||
return SalaryEntityUtil.properties(taxAgentEmpPOS, TaxAgentEmpPO::getEmployeeId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaxAgentConfig> getAllConfig() {
|
||||
List<TaxAgentConfig> allConfig = getTaxAgentMapper().getAllConfig();
|
||||
allConfig.forEach(config->{
|
||||
List<SalarySobConfig> sobConfigs = getSalarySobService(user).getConfig(config.getId());
|
||||
config.setSalarySobConfigs(sobConfigs);
|
||||
});
|
||||
return allConfig;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ public class SalarySystemConfigController {
|
|||
|
||||
/**
|
||||
* 薪资核算人员匹配规则
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
|
|
@ -214,6 +215,7 @@ public class SalarySystemConfigController {
|
|||
|
||||
/**
|
||||
* 工资单反馈
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
|
|
@ -229,6 +231,7 @@ public class SalarySystemConfigController {
|
|||
|
||||
/**
|
||||
* 撤回个税申报
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
|
|
@ -244,6 +247,7 @@ public class SalarySystemConfigController {
|
|||
|
||||
/**
|
||||
* 删除档案
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
|
|
@ -318,4 +322,40 @@ public class SalarySystemConfigController {
|
|||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, Map<String, Object>>(user).run(getSalarySystemConfigWrapper(user)::getEncryptProgress, progressId);
|
||||
}
|
||||
|
||||
// @POST
|
||||
// @Path("/downloadConfig")
|
||||
// @Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
// public Response downloadConfig(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
// try {
|
||||
// User user = HrmUserVarify.getUser(request, response);
|
||||
// XSSFWorkbook workbook = getAddUpDeductionWrapper(user).downloadTemplate(queryParam);
|
||||
// String fileName = "累计专项附加扣除导入模板" + LocalDate.now();
|
||||
// try {
|
||||
// fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||
// } catch (UnsupportedEncodingException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// StreamingOutput output = outputStream -> {
|
||||
// workbook.write(outputStream);
|
||||
// outputStream.flush();
|
||||
// };
|
||||
// response.setContentType("application/octet-stream");
|
||||
// return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||
// } catch (Exception e) {
|
||||
// log.error("累计专项附加扣除导入模板异常", e);
|
||||
// throw e;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
@POST
|
||||
@Path("/downloadConfig")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String downloadConfig(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, Object>(user).run(getSalarySystemConfigWrapper(user)::downloadConfig);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,17 @@ package com.engine.salary.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.config.SalaryConfig;
|
||||
import com.engine.salary.entity.salaryarchive.config.ArchiveFieldConfig;
|
||||
import com.engine.salary.entity.salaryitem.config.SalaryItemConfig;
|
||||
import com.engine.salary.entity.salaryitem.param.SalaryItemExportParam;
|
||||
import com.engine.salary.entity.taxagent.config.TaxAgentConfig;
|
||||
import com.engine.salary.service.SalaryArchiveItemService;
|
||||
import com.engine.salary.service.SalaryItemService;
|
||||
import com.engine.salary.service.TaxAgentService;
|
||||
import com.engine.salary.service.impl.SalaryArchiveItemServiceImpl;
|
||||
import com.engine.salary.service.impl.SalaryItemServiceImpl;
|
||||
import com.engine.salary.service.impl.TaxAgentServiceImpl;
|
||||
import com.engine.salary.sys.entity.param.AppSettingSaveParam;
|
||||
import com.engine.salary.sys.entity.param.MatchEmployeeModeSaveParam;
|
||||
import com.engine.salary.sys.entity.param.OrderRuleParam;
|
||||
|
|
@ -17,6 +28,7 @@ import com.engine.salary.util.page.PageInfo;
|
|||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.engine.salary.util.valid.RuntimeTypeEnum;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -39,6 +51,18 @@ public class SalarySystemConfigWrapper extends Service {
|
|||
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryItemService getSalaryItemService(User user) {
|
||||
return ServiceUtil.getService(SalaryItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryArchiveItemService getSalaryArchiveItemService(User user) {
|
||||
return ServiceUtil.getService(SalaryArchiveItemServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private TaxAgentService getTaxAgentService(User user) {
|
||||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> info() {
|
||||
BaseBean baseBean = new BaseBean();
|
||||
String log = baseBean.getPropValue("hrmSalary", "log");
|
||||
|
|
@ -136,12 +160,12 @@ public class SalarySystemConfigWrapper extends Service {
|
|||
|
||||
public AppSettingVO appSetting() {
|
||||
|
||||
return getSalarySysConfService(user).appSetting();
|
||||
return getSalarySysConfService(user).appSetting();
|
||||
|
||||
}
|
||||
|
||||
public Map<String, Object> saveEncryptSetting(AppSettingSaveParam param) {
|
||||
return getSalarySysConfService(user).saveEncryptSetting(param);
|
||||
return getSalarySysConfService(user).saveEncryptSetting(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> getEncryptProgress(String progressId) {
|
||||
|
|
@ -167,4 +191,25 @@ public class SalarySystemConfigWrapper extends Service {
|
|||
public void saveSalarySendFeedback(SalarySysConfPO param) {
|
||||
getSalarySysConfService(user).saveSalarySendFeedback(param);
|
||||
}
|
||||
|
||||
public Object downloadConfig() {
|
||||
XStream xStream = new XStream();
|
||||
//由于使用的注解,将自动检测注解开启
|
||||
xStream.autodetectAnnotations(true);
|
||||
|
||||
SalaryConfig salaryConfig = new SalaryConfig();
|
||||
List<SalaryItemConfig> salaryItemConfigs = getSalaryItemService(user).getAllConfig(SalaryItemExportParam.builder().build());
|
||||
salaryConfig.setSalaryItemConfigs(salaryItemConfigs);
|
||||
|
||||
List<ArchiveFieldConfig> archiveFieldConfigs = getSalaryArchiveItemService(user).getAllConfig();
|
||||
salaryConfig.setArchiveFieldConfig(archiveFieldConfigs);
|
||||
|
||||
List<TaxAgentConfig> taxAgentConfigs = getTaxAgentService(user).getAllConfig();
|
||||
salaryConfig.setTaxAgentConfigs(taxAgentConfigs);
|
||||
|
||||
String s = xStream.toXML(salaryConfig);
|
||||
System.out.println(s);
|
||||
return s;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue