工资单不显示空项功能

This commit is contained in:
钱涛 2022-09-21 19:08:44 +08:00
parent 0003057021
commit f779b1bb11
3 changed files with 225 additions and 177 deletions

View File

@ -16,6 +16,7 @@
<result column="text_content" property="textContent"/>
<result column="text_content_position" property="textContentPosition"/>
<result column="salary_item_null_status" property="salaryItemNullStatus"/>
<result column="salary_item_zero_status" property="salaryItemZeroStatus"/>
<result column="salary_item_setting" property="salaryItemSetting"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
@ -25,7 +26,9 @@
<!-- 表字段 -->
<sql id="baseColumns">
t.id
t
.
id
, t.name
, t.salary_sob_id
, t.use_type
@ -38,6 +41,7 @@
, t.text_content
, t.text_content_position
, t.salary_item_null_status
, t.salary_item_zero_status
, t.salary_item_setting
, t.create_time
, t.update_time
@ -45,34 +49,36 @@
, t.delete_type
</sql>
<select id="getById" resultType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
SELECT
id,
name,
salary_sob_id,
use_type,
description,
email_status,
send_email_id,
msg_status,
theme,
background,
text_content,
text_content_position,
salary_item_null_status,
salary_item_zero_status,
salary_item_setting,
create_time,
update_time,
creator,
delete_type,
tenant_key
SELECT id,
name,
salary_sob_id,
use_type,
description,
email_status,
send_email_id,
msg_status,
theme,
background,
text_content,
text_content_position,
salary_item_null_status,
salary_item_zero_status,
salary_item_setting,
create_time,
update_time,
creator,
delete_type,
tenant_key
FROM hrsa_salary_template
WHERE delete_type = 0
AND id = #{id}
AND id = #{id}
</select>
<sql id="salaryTemplateColumn">
t1.id,
t1
.
id
,
t1.name,
t2.name AS salary_sob,
t1.use_type,
@ -95,38 +101,38 @@
AND t1.salary_sob_id = #{param.salarySobId}
</if>
</sql>
<sql id="paramSql" databaseId="oracle">
<if test="param.ids != null and param.ids.size()>0">
AND t1.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.name != null and param.name != ''">
AND t1.name like '%'||#{param.name}||'%'
</if>
<if test="param.salarySobId != null">
AND t1.salary_sob_id = #{param.salarySobId}
</if>
</sql>
<sql id="paramSql" databaseId="sqlserver">
<if test="param.ids != null and param.ids.size()>0">
AND t1.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.name != null and param.name != ''">
AND t1.name like '%'+#{param.name}+'%'
</if>
<if test="param.salarySobId != null">
AND t1.salary_sob_id = #{param.salarySobId}
</if>
</sql>
<sql id="paramSql" databaseId="oracle">
<if test="param.ids != null and param.ids.size()>0">
AND t1.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.name != null and param.name != ''">
AND t1.name like '%'||#{param.name}||'%'
</if>
<if test="param.salarySobId != null">
AND t1.salary_sob_id = #{param.salarySobId}
</if>
</sql>
<sql id="paramSql" databaseId="sqlserver">
<if test="param.ids != null and param.ids.size()>0">
AND t1.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.name != null and param.name != ''">
AND t1.name like '%'+#{param.name}+'%'
</if>
<if test="param.salarySobId != null">
AND t1.salary_sob_id = #{param.salarySobId}
</if>
</sql>
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO">
SELECT
@ -135,82 +141,82 @@
hrsa_salary_template t1
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
WHERE
t1.delete_type = 0
AND t2.delete_type = 0
<include refid="paramSql"/>
t1.delete_type = 0
AND t2.delete_type = 0
<include refid="paramSql"/>
ORDER BY t1.salary_sob_id,t1.id DESC
</select>
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO" databaseId="oracle">
SELECT
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO" databaseId="oracle">
SELECT
t1.id,
t1.name,
t2.name AS salary_sob,
t1.use_type,
t1.description
FROM
hrsa_salary_template t1
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
WHERE
t1.delete_type = 0
AND t2.delete_type = 0
FROM
hrsa_salary_template t1
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
WHERE
t1.delete_type = 0
AND t2.delete_type = 0
<if test="param.ids != null and param.ids.size()>0">
AND t1.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.name != null and param.name != ''">
AND t1.name like '%'||#{param.name}||'%'
AND t1.name like '%'||#{param.name}||'%'
</if>
<if test="param.salarySobId != null">
AND t1.salary_sob_id = #{param.salarySobId}
</if>
ORDER BY t1.salary_sob_id,t1.id DESC
</select>
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO" databaseId="sqlserver">
SELECT
ORDER BY t1.salary_sob_id,t1.id DESC
</select>
<select id="list" resultType="com.engine.salary.entity.salaryBill.dto.SalaryTemplateListDTO" databaseId="sqlserver">
SELECT
t1.id,
t1.name,
t2.name AS salary_sob,
t1.use_type,
t1.description
FROM
hrsa_salary_template t1
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
WHERE
t1.delete_type = 0
AND t2.delete_type = 0
FROM
hrsa_salary_template t1
LEFT JOIN hrsa_salary_sob t2 ON t1.salary_sob_id = t2.id
WHERE
t1.delete_type = 0
AND t2.delete_type = 0
<if test="param.ids != null and param.ids.size()>0">
AND t1.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.name != null and param.name != ''">
AND t1.name like '%'+#{param.name}+'%'
AND t1.name like '%'+#{param.name}+'%'
</if>
<if test="param.salarySobId != null">
AND t1.salary_sob_id = #{param.salarySobId}
</if>
ORDER BY t1.salary_sob_id,t1.id DESC
</select>
ORDER BY t1.salary_sob_id,t1.id DESC
</select>
<update id="deleteByIds">
UPDATE hrsa_salary_template
SET delete_type = 1
WHERE delete_type = 0
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
@ -219,9 +225,10 @@
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
<select id="listSome" resultMap="BaseResultMap"
parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO">
SELECT
<include refid="baseColumns" />
<include refid="baseColumns"/>
FROM hrsa_salary_template t
WHERE delete_type = 0
<if test="id != null and id != ''">
@ -285,7 +292,7 @@
ORDER BY id DESC
</select>
<select id="listDefaultTemplates" resultMap="BaseResultMap" >
<select id="listDefaultTemplates" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM
@ -491,9 +498,10 @@
</trim>
</insert>
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO" databaseId="oracle"
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalaryTemplatePO"
databaseId="oracle"
>
<selectKey keyProperty="id" resultType="long" order="AFTER">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select hrsa_salary_template_id.currval from dual
</selectKey>
INSERT INTO hrsa_salary_template
@ -637,5 +645,4 @@
</update>
</mapper>

View File

@ -38,6 +38,7 @@ import com.engine.salary.mapper.salarybill.SalarySendMapper;
import com.engine.salary.service.*;
import com.engine.salary.util.JsonUtil;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.excel.ExcelUtil;
import com.engine.salary.util.page.PageInfo;
@ -55,6 +56,7 @@ import weaver.hrm.User;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -93,7 +95,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
return SqlProxyHandle.getProxy(SalaryAcctEmployeeMapper.class);
}
//
//
private SalaryAcctResultMapper getSalaryAcctResultMapper() {
return SqlProxyHandle.getProxy(SalaryAcctResultMapper.class);
}
@ -196,33 +198,33 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
SalaryAcctRecordPO salaryAcctRecord = acctRecords.get(0);
List<SalarySendInfoPO> salarySendInfos = salaryAcctEmployees.stream().map(m ->
SalarySendInfoPO.builder()
.id(IdGenerator.generate())
.salarySendId(salarySendId)
.employeeId(m.getEmployeeId())
.salaryMonth(m.getSalaryMonth())
.taxAgentId(m.getTaxAgentId())
.salaryAcctRecordId(m.getSalaryAcctRecordId())
.sendStatus(SalarySendStatusEnum.UNSEND.getValue())
.salaryTemplate("")
.creator((long) user.getUID())
.createTime(new Date())
.updateTime(new Date())
.build()
SalarySendInfoPO.builder()
.id(IdGenerator.generate())
.salarySendId(salarySendId)
.employeeId(m.getEmployeeId())
.salaryMonth(m.getSalaryMonth())
.taxAgentId(m.getTaxAgentId())
.salaryAcctRecordId(m.getSalaryAcctRecordId())
.sendStatus(SalarySendStatusEnum.UNSEND.getValue())
.salaryTemplate("")
.creator((long) user.getUID())
.createTime(new Date())
.updateTime(new Date())
.build()
).collect(Collectors.toList());
SalarySendPO salarySend = SalarySendPO.builder()
.id(salarySendId)
.salaryMonth(salaryAcctRecord.getSalaryMonth())
.salaryAccountingId(salaryAccountingId)
.salarySobId(salaryAcctRecord.getSalarySobId())
.sendNum(0)
.sendTotal(salarySendInfos.size())
.lastSendTime(new Date())
.creator((long) user.getUID())
.createTime(new Date())
.updateTime(new Date())
.build();
.id(salarySendId)
.salaryMonth(salaryAcctRecord.getSalaryMonth())
.salaryAccountingId(salaryAccountingId)
.salarySobId(salaryAcctRecord.getSalarySobId())
.sendNum(0)
.sendTotal(salarySendInfos.size())
.lastSendTime(new Date())
.creator((long) user.getUID())
.createTime(new Date())
.updateTime(new Date())
.build();
// 插入工资单发放记录
mapper.insert(salarySend);
// 插入工资单人员记录
@ -301,12 +303,12 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
}
return SalarySendBaseInfoDTO.builder()
.salaryMonth(salarySobCycleDTO == null ? null : salarySobCycleDTO.getSalaryMonth())
.template(template)
.salarySobCycle(salarySobCycleDTO)
.sendNum(salarySend.getSendNum())
.sendTotal(salarySend.getSendTotal())
.build();
.salaryMonth(salarySobCycleDTO == null ? null : salarySobCycleDTO.getSalaryMonth())
.template(template)
.salarySobCycle(salarySobCycleDTO)
.sendNum(salarySend.getSendNum())
.sendTotal(salarySend.getSendTotal())
.build();
}
@Override
@ -377,19 +379,46 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
SalaryTemplateSalaryItemSetListDTO employeeInformation = optionalEmployeeInformation.orElse(null);
List<SalaryTemplateSalaryItemSetListDTO> itemSetListDTOS = listDTOS.stream().filter(e -> !SalaryTemplateSalaryItemSetGroupConstant.EMPLOYEE_INFO_GROUP_ID.equals(e.getGroupId())).collect(Collectors.toList());
itemSetListDTOS.stream().forEach(item -> {
item.getItems().stream()
.forEach(e -> {
if (CollectionUtils.isEmpty(salaryAcctResultS)) {
e.setSalaryItemValue("");
} else {
Object o = salaryAcctResultS.stream()
.filter(f -> f.get("salaryItemId") != null && String.valueOf(f.get("salaryItemId")).equals(e.getSalaryItemId())).findFirst()
.orElse(new HashMap<>())
.get("resultValue");
e.setSalaryItemValue(o == null ? "" : (String) o);
}
});
item.getItems()
.forEach(e -> {
if (CollectionUtils.isEmpty(salaryAcctResultS)) {
e.setSalaryItemValue("");
} else {
Object o = salaryAcctResultS.stream()
.filter(f -> f.get("salaryItemId") != null && String.valueOf(f.get("salaryItemId")).equals(e.getSalaryItemId())).findFirst()
.orElse(new HashMap<>())
.get("resultValue");
e.setSalaryItemValue(o == null ? "" : (String) o);
}
});
});
/**
* 过滤空
*/
if (Objects.equals(1, salaryTemplate.getSalaryItemNullStatus())) {
for (SalaryTemplateSalaryItemSetListDTO itemSetListDTO : itemSetListDTOS) {
List<SalaryTemplateSalaryItemListDTO> items = itemSetListDTO.getItems();
List<SalaryTemplateSalaryItemListDTO> collect = items.stream().filter(item -> StringUtils.isNotBlank(item.getSalaryItemValue())).collect(Collectors.toList());
itemSetListDTO.setItems(collect);
}
}
/**
* 过滤0
*/
if (Objects.equals(1, salaryTemplate.getSalaryItemZeroStatus())) {
for (SalaryTemplateSalaryItemSetListDTO itemSetListDTO : itemSetListDTOS) {
List<SalaryTemplateSalaryItemListDTO> items = itemSetListDTO.getItems();
List<SalaryTemplateSalaryItemListDTO> collect = items.stream()
.filter(item -> SalaryEntityUtil.string2BigDecimal(item.getSalaryItemValue()) == null
|| BigDecimal.ZERO.compareTo(SalaryEntityUtil.string2BigDecimal(item.getSalaryItemValue())) == 0)
.collect(Collectors.toList());
itemSetListDTO.setItems(collect);
}
}
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(salarySendInfo.getTaxAgentId());
DataCollectionEmployee simpleEmployee = getSalaryEmployeeService(user).getEmployeeById(salarySendInfo.getEmployeeId());
buildEmployeeInfo(employeeInformation, simpleEmployee, taxAgentPO.getName(), SalaryAcctResultBO.buildEmployeeFieldName());
@ -428,6 +457,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
/**
* 获取工资单标题
*
* @param theme
* @param salaryMonth
* @param currentEmployeeId
@ -445,32 +475,34 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
/**
* 根据模板内容转为工资单模板对象
* 注意不要通过反序列化可能会因为历史原因修改字段名称而无法序列化
*
* @param salaryTemplateContent
* @return
*/
private SalaryTemplatePO buildSalaryTemplateContent(String salaryTemplateContent) {
Map<String, Object> map = JsonUtil.parseMap(salaryTemplateContent, Object.class);
return SalaryTemplatePO.builder()
.id(Long.valueOf(map.getOrDefault("id","0").toString()))
.name(map.getOrDefault("name","").toString())
.salarySobId(Long.valueOf(map.getOrDefault("salarySobId","0").toString()))
.useType(Integer.valueOf(map.getOrDefault("useType","0").toString()))
.description(map.getOrDefault("description","").toString())
.emailStatus(Integer.valueOf(map.getOrDefault("emailStatus","0").toString()))
.sendEmailId(Long.valueOf(map.getOrDefault("sendEmailId","0").toString()))
.msgStatus(Integer.valueOf(map.getOrDefault("msgStatus","0").toString()))
.theme(map.getOrDefault("theme","").toString())
.background(map.getOrDefault("background","").toString())
.textContent(map.getOrDefault("textContent","").toString())
.textContentPosition(Integer.valueOf(map.getOrDefault("textContentPosition","0").toString()))
.salaryItemNullStatus(Integer.valueOf(map.getOrDefault("salaryItemNullStatus","0").toString()))
.salaryItemZeroStatus(Integer.valueOf(map.getOrDefault("salaryItemZeroStatus","0").toString()))
.salaryItemSetting(map.getOrDefault("salaryItemSetting","").toString())
.id(Long.valueOf(map.getOrDefault("id", "0").toString()))
.name(map.getOrDefault("name", "").toString())
.salarySobId(Long.valueOf(map.getOrDefault("salarySobId", "0").toString()))
.useType(Integer.valueOf(map.getOrDefault("useType", "0").toString()))
.description(map.getOrDefault("description", "").toString())
.emailStatus(Integer.valueOf(map.getOrDefault("emailStatus", "0").toString()))
.sendEmailId(Long.valueOf(map.getOrDefault("sendEmailId", "0").toString()))
.msgStatus(Integer.valueOf(map.getOrDefault("msgStatus", "0").toString()))
.theme(map.getOrDefault("theme", "").toString())
.background(map.getOrDefault("background", "").toString())
.textContent(map.getOrDefault("textContent", "").toString())
.textContentPosition(Integer.valueOf(map.getOrDefault("textContentPosition", "0").toString()))
.salaryItemNullStatus(Integer.valueOf(map.getOrDefault("salaryItemNullStatus", "0").toString()))
.salaryItemZeroStatus(Integer.valueOf(map.getOrDefault("salaryItemZeroStatus", "0").toString()))
.salaryItemSetting(map.getOrDefault("salaryItemSetting", "").toString())
.build();
}
/**
* 构建工资单中的人员信息
*
* @param employeeInformation
* @param simpleEmployee
* @param taxAgentName
@ -484,7 +516,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
//获取员工信息的字段名和中文描述的map关系
SalaryFormulaEmployeeDTO salaryFormulaEmployeeDTO = SalaryFormulaEmployeeDTO.builder().employeeId(simpleEmployee.getEmployeeId())
.birthday(simpleEmployee.getBirthday())
.departmentName(simpleEmployee.getDepartmentName() )
.departmentName(simpleEmployee.getDepartmentName())
.email(StringUtils.isEmpty(simpleEmployee.getEmail()) ? "" : simpleEmployee.getEmail())
.jobcall(simpleEmployee.getJobcall())
.companystartdate(simpleEmployee.getCompanystartdate())
@ -553,7 +585,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
map.put("email", e.getEmail());
salaryItems.forEach(i -> {
Optional<SalaryAcctResultPO> optional = salaryAccountingResults.stream()
.filter(r -> r.getEmployeeId().equals(e.getEmployeeId()) && r.getSalaryItemId().equals(Long.valueOf(i.getSalaryItemId()))).findFirst();
.filter(r -> r.getEmployeeId().equals(e.getEmployeeId()) && r.getSalaryItemId().equals(Long.valueOf(i.getSalaryItemId()))).findFirst();
map.put(i.getSalaryItemId() + SalaryItemConstant.DYNAMIC_SUFFIX, optional.isPresent() ? optional.get().getResultValue() : "");
});
@ -577,7 +609,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
}
if (StringUtils.isNotEmpty(salaryTemplate.getSalaryItemSetting())) {
List<SalaryTemplateSalaryItemSetListDTO> salaryTemplateShowSetData = JsonUtil.parseList(salaryTemplate.getSalaryItemSetting(),
SalaryTemplateSalaryItemSetListDTO.class);
SalaryTemplateSalaryItemSetListDTO.class);
salaryTemplateShowSetData.stream().filter(f -> !f.getGroupId().equals(SalaryTemplateSalaryItemSetGroupConstant.EMPLOYEE_INFO_GROUP_ID)).forEach(e -> {
salaryItems.addAll(e.getItems());
});
@ -624,12 +656,12 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
List<SalarySendInfoPO> list = salarySendInfoMapper.listSome(po);
//需要发送工资的人
List<SalarySendInfoPO> sendList = list.stream().filter(e -> e.getSendStatus().equals(SalarySendStatusEnum.ALREADYSEND.getValue())).collect(Collectors.toList());
List<SalarySendInfoPO> sendList = list.stream().filter(e -> e.getSendStatus().equals(SalarySendStatusEnum.ALREADYSEND.getValue())).collect(Collectors.toList());
int sendNum = sendList.size();
int sendTotal = list.size();
SalarySendPO salarySendNew = new SalarySendPO();
try {
BeanUtils.copyProperties(salarySendNew,salarySend);
BeanUtils.copyProperties(salarySendNew, salarySend);
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
@ -675,7 +707,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
List<SalarySendInfoPO> needSendList = Lists.newArrayList();
enableSendList.forEach(map -> {
sendList.forEach(item -> {
if (item.getId() == Long.valueOf(map.get("id").toString()).longValue()){
if (item.getId() == Long.valueOf(map.get("id").toString()).longValue()) {
needSendList.add(item);
}
});
@ -693,7 +725,8 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
/**
* 发送消息
* @param sendFlag true 发送 false 撤回
*
* @param sendFlag true 发送 false 撤回
* @param list
* @param param
* @param salarySend
@ -704,7 +737,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
new Thread() {
public void run() {
List<Long> collect = new ArrayList<>();
if(CollectionUtils.isNotEmpty(param.getIds())) {
if (CollectionUtils.isNotEmpty(param.getIds())) {
collect = new ArrayList<>(param.getIds());
} else {
collect = list.stream().map(item -> item.getId()).collect(Collectors.toList());
@ -713,10 +746,10 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
collect.forEach(item -> {
SalarySendInfoPO po = SalarySendInfoPO.builder().id(item).build();
List<SalarySendInfoPO> salarySendInfoPOS = salarySendInfoMapper.listSome(po);
if(CollectionUtils.isNotEmpty(salarySendInfoPOS)) {
if (CollectionUtils.isNotEmpty(salarySendInfoPOS)) {
Long employeeId = salarySendInfoPOS.get(0).getEmployeeId();
if(sendFlag) {
sendPayRollEMMessage(item, employeeId ,month);
if (sendFlag) {
sendPayRollEMMessage(item, employeeId, month);
} else {
withdrawPayrollEMMessage(item, employeeId);
}
@ -735,8 +768,8 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
userIdList.add(employeeId.toString());
String title = month + " 工资单"; // 标题
String context = "点击查看详情"; // 内容
String linkUrl = weaver.general.GCONST.getContextPath()+"/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=" + id; // PC端链接
String linkMobileUrl = weaver.general.GCONST.getContextPath()+"/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?type=phone&id=" + id; // 移动端链接
String linkUrl = weaver.general.GCONST.getContextPath() + "/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=" + id; // PC端链接
String linkMobileUrl = weaver.general.GCONST.getContextPath() + "/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?type=phone&id=" + id; // 移动端链接
try {
MessageBean messageBean = Util_Message.createMessage(messageType, userIdList, title, context, linkUrl, linkMobileUrl);
messageBean.setCreater(user.getUID());// 创建人id
@ -750,6 +783,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
/**
* 撤回EM消息
*
* @param id
*/
private void withdrawPayrollEMMessage(Long id, Long employeeId) {
@ -781,8 +815,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
}
// /**
// * 发送消息
// *
@ -947,9 +979,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
}
@Override
public XSSFWorkbook exportInfoList(SalarySendInfoQueryParam queryParam) {
// 1.工作簿名称
@ -960,7 +989,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
header.add(SalaryI18nUtil.getI18nLabel(86185, "部门"));
header.add(SalaryI18nUtil.getI18nLabel(86186, "手机号"));
header.add(SalaryI18nUtil.getI18nLabel(86317, "工号"));
header.add(SalaryI18nUtil.getI18nLabel( 86317, "发送状态"));
header.add(SalaryI18nUtil.getI18nLabel(86317, "发送状态"));
List<List<Object>> rows = new ArrayList<>();
// 2.表头

View File

@ -233,4 +233,16 @@ public class SalaryEntityUtil {
return null;
}
/**
* String转BigDecimal
* @param obj
* @return
*/
public static BigDecimal string2BigDecimal(String obj) {
if (NumberUtils.isCreatable(obj)) {
return new BigDecimal(obj);
}
return null;
}
}