lazhaoqian 3 лет назад
Родитель
Сommit
954e50e9a0

+ 2 - 6
blade-service/blade-school/src/main/java/org/springblade/school/controller/SalaryItemController.java

@@ -191,12 +191,8 @@ public class SalaryItemController extends BladeController {
 	public void exportSupplierTemplate(SalaryItem salaryItem,HttpServletResponse response) {
 		salaryItem.setTenantId(SecureUtil.getTenantId());
 		salaryItem.setIsDeleted(0);
-		List<SalaryItemExcel> list = new ArrayList<>();
-		List<SalaryItem> schoolTeacherList = salaryItemService.list(new QueryWrapper<SalaryItem>().setEntity(salaryItem));
-		if (CollectionUtils.isNotEmpty(schoolTeacherList)){
-			list = JSON.parseArray(JSON.toJSONString(schoolTeacherList), SalaryItemExcel.class);
-		}
-		ExcelUtil.export(response, "工资表", "工资表", list, SalaryItemExcel.class);
+		List<WageExcel> list = salaryItemService.exportSupplierTemplate(salaryItem);
+		ExcelUtil.export(response, "工资表", "工资表", list, WageExcel.class);
 	}
 	/**
 	 * 导入聘用模板

+ 617 - 0
blade-service/blade-school/src/main/java/org/springblade/school/excel/WageExcel.java

@@ -0,0 +1,617 @@
+package org.springblade.school.excel;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 导出工资明细
+ */
+@Data
+@ColumnWidth(15)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class WageExcel implements Serializable {
+	/**
+	 * 学科
+	 */
+	@ExcelProperty(value = "学科")
+	private String discipline;
+	/**
+	 * 类别
+	 */
+	@ExcelProperty(value = "类别")
+	private String itemType;
+	/**
+	 * 转正时间
+	 */
+	@ExcelProperty(value = "转正时间")
+	private Date positiveTime;
+	/**
+	 * 职务
+	 */
+	@ExcelProperty(value = "职务")
+	private String position;
+	/**
+	 * 姓名
+	 */
+	@ExcelProperty(value = "姓名(必填)")
+	private String cname;
+	/**
+	 * 身份证号
+	 */
+	@ExcelProperty(value = "身份证号(必填)")
+	@ColumnWidth(35)
+	private String idNumber;
+	/**
+	 * 工资拔付标准
+	 */
+	@ExcelProperty(value = "工资拨付标准")
+	private BigDecimal salaryWithdrawalStandard;
+	/**
+	 * 职级类别
+	 */
+	@ExcelProperty(value = "职级类别")
+	private String rankCategory;
+	/**
+	 * 职级拨付标准
+	 */
+	@ExcelProperty(value = "职级拨付标准")
+	private BigDecimal rankWithdrawalStandard;
+	/**
+	 * 履约奖
+	 */
+	@ExcelProperty(value = "履约奖")
+	private BigDecimal performanceAward;
+	/**
+	 * 校龄工资
+	 */
+	@ExcelProperty(value = "校龄工资")
+	private BigDecimal schoolAgeSalary;
+	/**
+	 * 增资
+	 */
+	@ExcelProperty(value = "增资")
+	private BigDecimal capitalIncrease;
+	/**
+	 * 学历工资
+	 */
+	@ExcelProperty(value = "学历工资")
+	private BigDecimal educationSalary;
+	/**
+	 * 职级标准
+	 */
+	@ExcelProperty(value = "职级标准")
+	private String rankStandard;
+	/**
+	 * 职级工资
+	 */
+	@ExcelProperty(value = "职级工资")
+	private BigDecimal rankSalary;
+	/**
+	 * 工资基数
+	 */
+	@ExcelProperty(value = "工资基数")
+	private BigDecimal salaryBase;
+	/**
+	 * 基础工资
+	 */
+	@ExcelProperty(value = "基础工资")
+	private BigDecimal basicsSalary;
+	/**
+	 * 工作量工资标准
+	 */
+	@ExcelProperty(value = "工作量工资标准")
+	private BigDecimal workloadSalaryCritertion;
+	/**
+	 * 月份课时
+	 */
+	@ExcelProperty(value = "月份课时")
+	private BigDecimal monthHour;
+	/**
+	 * 月份课时工资
+	 */
+	@ExcelProperty(value = "月份课时工资")
+	private BigDecimal momthWorkloadSalary;
+	/**
+	 * 自定义
+	 */
+	@ExcelProperty(value = "自定义")
+	private BigDecimal custom;
+	/**
+	 * 自定义1
+	 */
+	@ExcelProperty(value = "自定义1")
+	private BigDecimal customOne;
+	/**
+	 * 自定义2
+	 */
+	@ExcelProperty(value = "自定义2")
+	private BigDecimal customTwo;
+	/**
+	 * 自定义3
+	 */
+	@ExcelProperty(value = "自定义3")
+	private BigDecimal customThree;
+	/**
+	 * 自定义4
+	 */
+	@ExcelProperty(value = "自定义4")
+	private BigDecimal customFour;
+	/**
+	 * 自定义5
+	 */
+	@ExcelProperty(value = "自定义5")
+	private BigDecimal customFive;
+	/**
+	 * 自定义6
+	 */
+	@ExcelProperty(value = "自定义6")
+	private BigDecimal customSix;
+	/**
+	 * 自定义7
+	 */
+	@ExcelProperty(value = "自定义7")
+	private BigDecimal customSeven;
+	/**
+	 * 自定义8
+	 */
+	@ExcelProperty(value = "自定义8")
+	private BigDecimal customEight;
+	/**
+	 * 自定义9
+	 */
+	@ExcelProperty(value = "自定义9")
+	private BigDecimal customNine;
+	/**
+	 * 工作量工资
+	 */
+	@ExcelProperty(value = "工作量工资")
+	private BigDecimal workloadSalary;
+	/**
+	 * 日常考核标准
+	 */
+	@ExcelProperty(value = "日常考核标准")
+	private BigDecimal dailyAssessmentCriteria;
+	/**
+	 * 日常考核工资
+	 */
+	@ExcelProperty(value = "日常考核工资")
+	private BigDecimal dailyAssessmentSalary;
+	/**
+	 * 学期绩效工资
+	 */
+	@ExcelProperty(value = "学期绩效工资")
+	private BigDecimal termPerformanceSalary;
+	/**
+	 * 自定义奖励
+	 */
+	@ExcelProperty(value = "自定义奖励")
+	private BigDecimal customAward;
+	/**
+	 * 自定义奖励1
+	 */
+	@ExcelProperty(value = "自定义奖励1")
+	private BigDecimal customAwardOne;
+	/**
+	 * 自定义奖励2
+	 */
+	@ExcelProperty(value = "自定义奖励2")
+	private BigDecimal customAwardTwo;
+	/**
+	 * 自定义奖励3
+	 */
+	@ExcelProperty(value = "自定义奖励3")
+	private BigDecimal customAwardThree;
+	/**
+	 * 自定义奖励4
+	 */
+	@ExcelProperty(value = "自定义奖励4")
+	private BigDecimal customAwardFour;
+	/**
+	 * 自定义奖励5
+	 */
+	@ExcelProperty(value = "自定义奖励5")
+	private BigDecimal customAwardFive;
+	/**
+	 * 自定义奖励6
+	 */
+	@ExcelProperty(value = "自定义奖励6")
+	private BigDecimal customAwardSix;
+	/**
+	 * 自定义奖励7
+	 */
+	@ExcelProperty(value = "自定义奖励7")
+	private BigDecimal customAwardSeven;
+	/**
+	 * 自定义奖励8
+	 */
+	@ExcelProperty(value = "自定义奖励8")
+	private BigDecimal customAwardEight;
+	/**
+	 * 自定义奖励9
+	 */
+	@ExcelProperty(value = "自定义奖励9")
+	private BigDecimal customAwardNine;
+	/**
+	 * 奖励工资
+	 */
+	@ExcelProperty(value = "奖励工资")
+	private BigDecimal awardSalary;
+	/**
+	 * 领导干部补贴
+	 */
+	@ExcelProperty(value = "领导干部补贴")
+	private BigDecimal leadingCadreSubsidy;
+	/**
+	 * 备课组长
+	 */
+	@ExcelProperty(value = "备课组长")
+	private BigDecimal prepareLessons;
+	/**
+	 * 教研组长
+	 */
+	@ExcelProperty(value = "教研组长")
+	private BigDecimal teachingResearch;
+	/**
+	 * 职务津贴
+	 */
+	@ExcelProperty(value = "职务津贴")
+	private BigDecimal dutyAllowances;
+	/**
+	 * 班主任费
+	 */
+	@ExcelProperty(value = "班主任费")
+	private BigDecimal classTeacherFee;
+	/**
+	 * 班额
+	 */
+	@ExcelProperty(value = "班额")
+	private BigDecimal classes;
+	/**
+	 * 班主任津贴
+	 */
+	@ExcelProperty(value = "班主任津贴")
+	private BigDecimal classTeacherSubsidy;
+	/**
+	 * 微信
+	 */
+	@ExcelProperty(value = "微信")
+	private BigDecimal wx;
+	/**
+	 * 产假工资
+	 */
+	@ExcelProperty(value = "产假工资")
+	private BigDecimal maternityLeaveSalary;
+	/**
+	 * 周末加班
+	 */
+	@ExcelProperty(value = "周末加班")
+	private BigDecimal overtimeAtWeekend;
+	/**
+	 * 年上学期绩效
+	 */
+	@ExcelProperty(value = "年上学期绩效")
+	private BigDecimal yearUpPerformance;
+	/**
+	 * 年下学期绩效
+	 */
+	@ExcelProperty(value = "年下学期绩效")
+	private BigDecimal yearDownPerformance;
+	/**
+	 * 干部补贴预留
+	 */
+	@ExcelProperty(value = "干部补贴预留")
+	private BigDecimal cadreAllowanceReservation;
+	/**
+	 * 假期加班费
+	 */
+	@ExcelProperty(value = "假期加班费")
+	private BigDecimal vacationOvertimePay;
+	/**
+	 * 新岗岗前培训
+	 */
+	@ExcelProperty(value = "新岗岗前培训")
+	private BigDecimal newPostTrain;
+	/**
+	 * 期中期末考试学科优胜奖(预留发放)
+	 */
+	@ExcelProperty(value = "期中期末考试学科优胜奖(预留发放)")
+	private BigDecimal winningPrize;
+	/**
+	 * 级部长(预留发放)
+	 */
+	@ExcelProperty(value = "级部长(预留发放)")
+	private BigDecimal classMinister;
+	/**
+	 * 月副班费(预留发放)
+	 */
+	@ExcelProperty(value = "月副班费(预留发放)")
+	private BigDecimal monthViceClassFee;
+	/**
+	 * 餐车、周五测温、周五安全岗(预留发放)
+	 */
+	@ExcelProperty(value = "餐车、周五测温、周五安全岗(预留发放)")
+	private BigDecimal safetyFees;
+	/**
+	 * 预留补发
+	 */
+	@ExcelProperty(value = "预留补发")
+	private BigDecimal reserveReplacement;
+	/**
+	 * 调整差额
+	 */
+	@ExcelProperty(value = "调整差额")
+	private BigDecimal adjustTheBalance;
+	/**
+	 * 自定义
+	 */
+	@ExcelProperty(value = "自定义")
+	private String customize;
+	/**
+	 * 自定义1
+	 */
+	@ExcelProperty(value = "自定义1")
+	private BigDecimal customizeOne;
+	/**
+	 * 自定义2
+	 */
+	@ExcelProperty(value = "自定义2")
+	private BigDecimal customizeTwo;
+	/**
+	 * 自定义3
+	 */
+	@ExcelProperty(value = "自定义3")
+	private BigDecimal customizeThree;
+	/**
+	 * 自定义4
+	 */
+	@ExcelProperty(value = "自定义4")
+	private BigDecimal customizeFour;
+	/**
+	 * 自定义5
+	 */
+	@ExcelProperty(value = "自定义5")
+	private BigDecimal customizeFive;
+	/**
+	 * 自定义6
+	 */
+	@ExcelProperty(value = "自定义6")
+	private BigDecimal customizeSix;
+	/**
+	 * 自定义7
+	 */
+	@ExcelProperty(value = "自定义7")
+	private BigDecimal customizeSeven;
+	/**
+	 * 自定义8
+	 */
+	@ExcelProperty(value = "自定义8")
+	private BigDecimal customizeEight;
+	/**
+	 * 自定义9
+	 */
+	@ExcelProperty(value = "自定义9")
+	private BigDecimal customizeNine;
+	/**
+	 * 补贴项
+	 */
+	@ExcelProperty(value = "补贴项")
+	private BigDecimal subsidy;
+	/**
+	 * 出勤
+	 */
+	@ExcelProperty(value = "出勤")
+	private BigDecimal attendance;
+	/**
+	 * 督查罚款
+	 */
+	@ExcelProperty(value = "督查罚款")
+	private BigDecimal inspectorFines;
+	/**
+	 * 电话费
+	 */
+	@ExcelProperty(value = "电话费")
+	private BigDecimal telephoneBill;
+	/**
+	 * 学习强国
+	 */
+	@ExcelProperty(value = "学习强国")
+	private BigDecimal learningPower;
+	/**
+	 * 宿舍管理费
+	 */
+	@ExcelProperty(value = "宿舍管理费")
+	private BigDecimal dormitoryManagementFee;
+	/**
+	 * 生育津贴
+	 */
+	@ExcelProperty(value = "生育津贴")
+	private BigDecimal childbirthAllowance;
+	/**
+	 * 五险一金个人
+	 */
+	@ExcelProperty(value = "五险一金个人")
+	private BigDecimal androidIt;
+	/**
+	 * 扣除项
+	 */
+	@ExcelProperty(value = "扣除项")
+	private BigDecimal deductions;
+	/**
+	 * 保险个人
+	 */
+	@ExcelProperty(value = "保险个人")
+	private BigDecimal insurancePersonage;
+	/**
+	 * 保险单位
+	 */
+	@ExcelProperty(value = "保险单位")
+	private BigDecimal insuranceUnit;
+	/**
+	 * 公积金个人
+	 */
+	@ExcelProperty(value = "公积金个人")
+	private BigDecimal reservedFundsPersonage;
+	/**
+	 * 公积金单位
+	 */
+	@ExcelProperty(value = "公积金单位")
+	private BigDecimal reservedFundsUnit;
+	/**
+	 * 应发工资
+	 */
+	@ExcelProperty(value = "应发工资")
+	private BigDecimal salary;
+	/**
+	 * 个税
+	 */
+	@ExcelProperty(value = "个税")
+	private BigDecimal personageTaxes;
+	/**
+	 * 实发工资(减去个人)
+	 */
+	@ExcelProperty(value = "实发工资(减去个人)")
+	private BigDecimal wage;
+	/**
+	 * 工资备注
+	 */
+	@ExcelProperty(value = "工资备注")
+	private String salaryRemark;
+	/**
+	 * 自定义
+	 */
+	@ExcelProperty(value = "自定义")
+	private BigDecimal ribbon;
+	/**
+	 * 自定义1
+	 */
+	@ExcelProperty(value = "自定义1")
+	private BigDecimal ribbonOne;
+	/**
+	 * 自定义2
+	 */
+	@ExcelProperty(value = "自定义2")
+	private BigDecimal ribbonTwo;
+	/**
+	 * 自定义3
+	 */
+	@ExcelProperty(value = "自定义3")
+	private BigDecimal ribbonThree;
+	/**
+	 * 自定义4
+	 */
+	@ExcelProperty(value = "自定义4")
+	private BigDecimal ribbonFour;
+	/**
+	 * 自定义5
+	 */
+	@ExcelProperty(value = "自定义5")
+	private BigDecimal ribbonFive;
+	/**
+	 * 自定义6
+	 */
+	@ExcelProperty(value = "自定义6")
+	private BigDecimal ribbonSix;
+	/**
+	 * 自定义7
+	 */
+	@ExcelProperty(value = "自定义7")
+	private BigDecimal ribbonSeven;
+	/**
+	 * 自定义8
+	 */
+	@ExcelProperty(value = "自定义8")
+	private BigDecimal ribbonEight;
+	/**
+	 * 自定义9
+	 */
+	@ExcelProperty(value = "自定义9")
+	private BigDecimal ribbonNine;
+	/**
+	 * 日照银行代发最终
+	 */
+	@ExcelProperty(value = "日照银行代发最终")
+	private BigDecimal payrollCredit;
+	/**
+	 * 已付
+	 */
+	@ExcelProperty(value = "已付")
+	private BigDecimal paid;
+	/**
+	 * 冲借款
+	 */
+	@ExcelProperty(value = "冲借款")
+	private BigDecimal rushedToBorrow;
+	/**
+	 * 现金付款
+	 */
+	@ExcelProperty(value = "现金付款")
+	private BigDecimal cashPayment;
+	/**
+	 * 暂不付
+	 */
+	@ExcelProperty(value = "暂不付")
+	private BigDecimal pauseNoPay;
+	/**
+	 * 暂不付1
+	 */
+	@ExcelProperty(value = "暂不付1")
+	private BigDecimal pauseNoPayOne;
+	/**
+	 * 暂不付2
+	 */
+	@ExcelProperty(value = "暂不付2")
+	private BigDecimal pauseNoPayTwo;
+	/**
+	 * 暂不付3
+	 */
+	@ExcelProperty(value = "暂不付3")
+	private BigDecimal pauseNoPayThree;
+	/**
+	 * 暂不付4
+	 */
+	@ExcelProperty(value = "暂不付4")
+	private BigDecimal pauseNoPayFour;
+	/**
+	 * 暂不付5
+	 */
+	@ExcelProperty(value = "暂不付5")
+	private BigDecimal pauseNoPayFive;
+	/**
+	 * 暂不付6
+	 */
+	@ExcelProperty(value = "暂不付6")
+	private BigDecimal pauseNoPaySix;
+	/**
+	 * 暂不付7
+	 */
+	@ExcelProperty(value = "暂不付7")
+	private BigDecimal pauseNoPaySeven;
+	/**
+	 * 暂不付8
+	 */
+	@ExcelProperty(value = "暂不付8")
+	private BigDecimal pauseNoPayEight;
+	/**
+	 * 暂不付9
+	 */
+	@ExcelProperty(value = "暂不付9")
+	private BigDecimal pauseNoPayNine;
+	/**
+	 * 暂不付备注
+	 */
+	@ExcelProperty(value = "暂不付备注")
+	private BigDecimal pauseNoPayRemark;
+	/**
+	 * 备注
+	 */
+	@ExcelProperty(value = "备注")
+	private String remarks;
+}

+ 9 - 0
blade-service/blade-school/src/main/java/org/springblade/school/mapper/SalaryItemMapper.java

@@ -18,6 +18,8 @@ package org.springblade.school.mapper;
 
 import org.apache.ibatis.annotations.Param;
 import org.springblade.school.entity.SalaryItem;
+import org.springblade.school.excel.SalaryItemExcel;
+import org.springblade.school.excel.WageExcel;
 import org.springblade.school.vo.SalaryItemVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -48,4 +50,11 @@ public interface SalaryItemMapper extends BaseMapper<SalaryItem> {
 	void updateStatus(@Param("status") int status,
 					  @Param("pid") Long pid);
 
+	/**
+	 * 导出工资明细
+	 * @param salaryItem
+	 * @return
+	 */
+	List<WageExcel> exportSupplierTemplate(@Param("salaryItem") SalaryItem salaryItem);
+
 }

+ 3 - 0
blade-service/blade-school/src/main/java/org/springblade/school/mapper/SalaryItemMapper.xml

@@ -142,5 +142,8 @@
     <update id="updateStatus" parameterType="object">
         update school_salary_item set status = #{status} where pid = #{pid} and is_deleted = 0
     </update>
+    <select id="exportSupplierTemplate" resultType="org.springblade.school.excel.WageExcel">
+        select *,f_salary AS wage from school_salary_item where is_deleted = 0 and pid = #{salaryItem.pid} and tenant_id = #{salaryItem.tenantId}
+    </select>
 
 </mapper>

+ 7 - 0
blade-service/blade-school/src/main/java/org/springblade/school/service/ISalaryItemService.java

@@ -247,6 +247,13 @@ public interface ISalaryItemService extends IService<SalaryItem> {
 	 */
 	List<SalaryItem> exportException(SalaryItem salaryItem);
 
+	/**
+	 * 导出工资明细
+	 * @param salaryItem
+	 * @return
+	 */
+	List<WageExcel> exportSupplierTemplate(SalaryItem salaryItem);
+
 
 
 }

+ 5 - 0
blade-service/blade-school/src/main/java/org/springblade/school/service/impl/SalaryItemServiceImpl.java

@@ -1424,6 +1424,11 @@ public class SalaryItemServiceImpl extends ServiceImpl<SalaryItemMapper, SalaryI
 		return list;
 	}
 
+	@Override
+	public List<WageExcel> exportSupplierTemplate(SalaryItem salaryItem) {
+		return baseMapper.exportSupplierTemplate(salaryItem);
+	}
+
 	/**
 	 *工资计算
 	 *