Merge branch 'release/2.9.6.2310.01' into release/个税版本
This commit is contained in:
commit
5d3e2928c9
|
|
@ -0,0 +1,2 @@
|
|||
appid_id=123456
|
||||
ip=127.0.0.1:8080
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
一、删除指定扣缴义务人下的档案
|
||||
操作前做好数据备份
|
||||
|
||||
一、删除指定扣缴义务人下的档案
|
||||
删除扣缴义务人下的档案(注意删除后,再添加进扣缴义务人,不会自动生成档案)
|
||||
|
||||
1、查询hrsa_tax_agent表对应扣缴义务人id
|
||||
|
|
@ -19,8 +19,3 @@ update hrsa_salary_archive set delete_type=3 where tax_agent_id=扣缴义务人
|
|||
|
||||
二、删除停薪员工档案
|
||||
update hrsa_salary_archive set delete_type=3 where run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
|
||||
|
||||
|
||||
|
||||
|
||||
.\wkhtmltopdf.exe http://127.0.0.1:8080/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=1694053661638&recipient=92&type=phone C:\baidu.pdf
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316);
|
||||
/
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316);
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316)
|
||||
/
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316);
|
||||
/
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316)
|
||||
GO
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
update hrsa_formula set EXTEND_PARAM= '{"sqlReturnKey":"","openDecrypt":"0","datasource":{"datasourceId":""}}'
|
||||
where id in (1674894163247,1674896933031,1674897014605,1675043440772,1680746056549,1681201555316);
|
||||
/
|
||||
|
||||
|
|
@ -98,8 +98,10 @@ public class ExpressFormulaBO {
|
|||
// 公式变量的值
|
||||
String formulaVarValue = formulaVarValueMap.getOrDefault(formulaVar.getFieldId(), StringUtils.EMPTY);
|
||||
// 如果公式的返回值类型为number,公式中的变量的值如果为空,公式运行的时候会报错,所以需要替换成0
|
||||
if (StringUtils.isEmpty(formulaVarValue) && "number".equals(expressFormula.getReturnType())) {
|
||||
if (StringUtils.isEmpty(formulaVarValue) && "number".equals(formulaVar.getFieldType())) {
|
||||
formulaVarValue = BigDecimal.ZERO.toPlainString();
|
||||
} else if (StringUtils.isEmpty(formulaVarValue) && "string".equals(formulaVar.getFieldType())) {
|
||||
formulaVarValue = "";
|
||||
}
|
||||
formulaVar.setContent(formulaVarValue);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.engine.salary.enums.salaryarchive;
|
||||
|
||||
/**
|
||||
* 薪资档案调薪记录列表类型
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public enum SalaryArchiveAdjustRecordTypeEnum {
|
||||
|
||||
MYADJUSTRECORD("myAdjustRecordList"),
|
||||
ADJUSTRECORD("adjustRecordList"),
|
||||
ADJUSTRECORDFORDELETE("adjustRecordForDeleteList");
|
||||
|
||||
private String pageUid;
|
||||
|
||||
SalaryArchiveAdjustRecordTypeEnum(String pageUid) {
|
||||
this.pageUid = pageUid;
|
||||
}
|
||||
|
||||
public String getPageUid() {
|
||||
return pageUid;
|
||||
}
|
||||
}
|
||||
|
|
@ -632,6 +632,7 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
|||
});
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
List<List<Object>> rows = new ArrayList<>();
|
||||
rows.add(headerList);
|
||||
for (SalaryItemAdjustRecordListDTO dto : list) {
|
||||
List<Object> row = new ArrayList<>();
|
||||
row.add(dto.getUsername());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,239 @@
|
|||
package com.engine.salary.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.rsa.security.RSA;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class SalaryTokenUtil {
|
||||
|
||||
/**
|
||||
* 通过注册返回的OA系统公钥和秘钥获取token
|
||||
*
|
||||
* @param address OA地址
|
||||
* @return
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws KeyManagementException
|
||||
*/
|
||||
// public static Map<String, Object> testGetoken(String address) throws NoSuchAlgorithmException, KeyManagementException {
|
||||
// Map<String, String> heads = new HashMap<>();
|
||||
// Map<String, Object> datas = testRegist(address); // 注册接口返回的secrit私钥和spk公钥可以在第一次调用后,第三方系统保存起来,之后调用可以不用再调用这个注册接口
|
||||
// //ECOLOGY返回的系统公钥
|
||||
// String spk = (String) (datas.get("spk"));
|
||||
// RSA rsa = new RSA();
|
||||
// //对秘钥进行加密传输,防止篡改数据
|
||||
// String secret = rsa.encrypt(null, (String) (datas.get("secrit")), null, "utf-8", spk, false);
|
||||
// //封装参数到请求头
|
||||
// heads.put("appid", APPID);
|
||||
// heads.put("secret", secret);
|
||||
// //调用ECOLOGY系统接口进行注册
|
||||
// String data = post(address + "/api/ec/dev/auth/applytoken", null, heads);
|
||||
// System.out.println("=====testGetoken=====" + data);
|
||||
// return JSONObject.parseObject(data, new TypeReference<Map<String, Object>>() {
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
* 注册第三方系统到OA系统,第一次用APPID获取到公钥spk和私钥secret,第三方系统可以保存,下次不用在请求注册接口
|
||||
*
|
||||
* @param address OA地址
|
||||
* @return
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws KeyManagementException
|
||||
*/
|
||||
// public static Map<String, Object> testRegist(String address) throws NoSuchAlgorithmException, KeyManagementException {
|
||||
// Map<String, String> heads = new HashMap<>();
|
||||
// //获取当前异构系统RSA加密的公钥
|
||||
// String cpk = new RSA().getRSA_PUB();
|
||||
// //封装参数到请求头
|
||||
// heads.put("appid", APPID);
|
||||
// heads.put("cpk", cpk);
|
||||
// //调用ECOLOGY系统接口进行注册
|
||||
// String data = post(address + "/api/ec/dev/auth/regist", null, heads);
|
||||
// System.out.println("=====testRegist=====" + data);
|
||||
// return JSONObject.parseObject(data, new TypeReference<Map<String, Object>>() {
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
* 第一次获取Token,需要先注册
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> GetToken(Long uid) {
|
||||
Map<String, String> heads = new HashMap<>();
|
||||
BaseBean baseBean = new BaseBean();
|
||||
RecordSet rs = new RecordSet();
|
||||
Map<String, String> resultMap = new HashMap<>();
|
||||
|
||||
// 获取appid的id
|
||||
String appidId = baseBean.getPropValue("hrmSalaryBillToken", "appid_id");
|
||||
String ip = baseBean.getPropValue("hrmSalaryBillToken", "ip");
|
||||
rs.execute("select APPID from ECOLOGY_BIZ_EC where id =" + appidId);
|
||||
// 获取appid
|
||||
String appid ="";
|
||||
if (rs.next() && StringUtils.isNotEmpty(rs.getString("APPID"))) {
|
||||
appid = rs.getString("APPID");
|
||||
} else {
|
||||
return resultMap;
|
||||
}
|
||||
String sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SECRET'";
|
||||
rs.execute(sql);
|
||||
String secret = "";
|
||||
if (rs.next() && StringUtils.isNotEmpty(rs.getString("conf_value"))) {
|
||||
// 从数据库中拿secret
|
||||
secret = rs.getString("conf_value");
|
||||
} else {
|
||||
// 注册获取secret
|
||||
// 获取当前异构系统RSA加密的公钥
|
||||
String cpk = new RSA().getRSA_PUB();
|
||||
//封装参数到请求头
|
||||
heads.put("appid", appid);
|
||||
heads.put("cpk", cpk);
|
||||
// 调用ECOLOGY系统接口进行注册
|
||||
String data = post("http://" + ip + "/api/ec/dev/auth/regist", null, heads);
|
||||
Map<String, Object> datas = JSONObject.parseObject(data, new TypeReference<Map<String, Object>>() {});
|
||||
// ECOLOGY返回的系统公钥
|
||||
String spk = (String) (datas.get("spk"));
|
||||
RSA rsa = new RSA();
|
||||
// 对秘钥进行加密传输,防止篡改数据
|
||||
secret = rsa.encrypt(null, (String) (datas.get("secrit")), null, "utf-8", spk, false);
|
||||
// secret存库
|
||||
String date = SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now());
|
||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
||||
IdGenerator.generate(), "SALARY_TOKEN_SECRET", secret, "token", "basic",0,0,date,date);
|
||||
rs.execute(sql);
|
||||
// 保存spk
|
||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
||||
IdGenerator.generate(), "SALARY_TOKEN_SPK", spk, "spk", "basic",0,0,date,date);
|
||||
rs.execute(sql);
|
||||
}
|
||||
//封装参数到请求头
|
||||
heads.put("appid", appid);
|
||||
heads.put("secret", secret);
|
||||
//调用ECOLOGY系统接口进行注册
|
||||
String data2 = post("http://" + ip + "/api/ec/dev/auth/applytoken", null, heads);
|
||||
// 通过第一步注册许可时返回spk公钥对userid进行加密生成的密文
|
||||
sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SPK'";
|
||||
rs.execute(sql);
|
||||
if (rs.next()){
|
||||
String spk = rs.getString("conf_value");
|
||||
// 对uid进行加密
|
||||
RSA rsa = new RSA();
|
||||
String encryptUid = rsa.encrypt(null, uid.toString(), null, "utf-8", spk, false);
|
||||
String token = (String)JSONObject.parseObject(data2, new TypeReference<Map<String, Object>>() {}).get("token");
|
||||
resultMap.put("userid", encryptUid);
|
||||
resultMap.put("token", token);
|
||||
resultMap.put("appid",appid);
|
||||
return resultMap;
|
||||
} else {
|
||||
throw new SalaryRunTimeException("spk不存在");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 此方法仅供参考,第三方系统可采用自己的方式调用http接口
|
||||
*
|
||||
* @param path 请求路径
|
||||
* @param data 请求参数
|
||||
* @return
|
||||
*/
|
||||
public static String post(String path, Map<String, String> params, Map<String, String> data) {
|
||||
try {
|
||||
String str = "";
|
||||
// if (params != null) {
|
||||
// StringBuilder stringBuilder = new StringBuilder("?");
|
||||
// for (Map.Entry<String, String> entry : params.entrySet()) {
|
||||
// stringBuilder.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
|
||||
// }
|
||||
// if (stringBuilder.length() > 1)
|
||||
// path += stringBuilder.substring(0, stringBuilder.length() - 1);
|
||||
// }
|
||||
URL url = new URL(path);
|
||||
//打开和url之间的连接
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
// PrintWriter out = null;
|
||||
// 请求参数 编码为 utf-8
|
||||
//请求方式
|
||||
conn.setRequestMethod("POST");
|
||||
//设置通用的请求属性
|
||||
conn.setRequestProperty("accept", "*/*");
|
||||
conn.setRequestProperty("connection", "Keep-Alive");
|
||||
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");
|
||||
if (data != null) {
|
||||
for (Map.Entry<String, String> entry : data.entrySet()) {
|
||||
conn.setRequestProperty(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
//设置是否向httpUrlConnection输出,设置是否从httpUrlConnection读入,此外发送post请求必须设置这两个
|
||||
//最常用的Http请求无非是get和post,get请求可以获取静态页面,也可以把参数放在URL字串后面,传递给servlet,
|
||||
//post与get的 不同之处在于post的参数不是放在URL字串里面,而是放在http请求的正文内。
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
OutputStreamWriter out = new OutputStreamWriter(conn.getOutputStream(), "utf-8");
|
||||
if (params != null) {
|
||||
out.write(mapToStr(params));
|
||||
}
|
||||
//缓冲数据
|
||||
out.flush();
|
||||
out.close();
|
||||
//获取URLConnection对象对应的输入流
|
||||
InputStream is = conn.getInputStream();
|
||||
//构造一个字符流缓存
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(is, "utf-8"));
|
||||
String result = "";
|
||||
while ((str = br.readLine()) != null) {
|
||||
result = str;
|
||||
}
|
||||
//关闭流
|
||||
is.close();
|
||||
//断开连接,最好写上,disconnect是在底层tcp socket链接空闲时才切断。如果正在被其他线程使用就不切断。
|
||||
//固定多线程的话,如果不disconnect,链接会增多,直到收发不出信息。写上disconnect后正常一些。
|
||||
conn.disconnect();
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将Map转换成字符串参数,用于POST GET 请求
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public static String mapToStr(Map<String, String> map) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (map != null) {
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
stringBuilder.append(entry.getKey());
|
||||
if (entry.getValue() != null) {
|
||||
stringBuilder.append("=").append(entry.getValue());
|
||||
}
|
||||
stringBuilder.append("&");
|
||||
}
|
||||
}
|
||||
if (stringBuilder.length() > 0) {
|
||||
return stringBuilder.substring(0, stringBuilder.length() - 1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,10 +10,7 @@ import org.springframework.beans.BeanUtils;
|
|||
|
||||
import java.awt.Color;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
|
@ -115,7 +112,7 @@ public class ExcelUtilPlus {
|
|||
//遍历设置列宽
|
||||
List<Object> header = rowList.get(0);
|
||||
for (int i = 0; i < header.size(); i++) {
|
||||
sheet.setColumnWidth(i,Math.max(12, header.get(i).toString().length()*4)*256);
|
||||
sheet.setColumnWidth(i, Math.max(12, header.get(i).toString().length() * 4) * 256);
|
||||
}
|
||||
|
||||
for (int rowIndex = 0; rowIndex < rowList.size(); rowIndex++) {
|
||||
|
|
@ -199,7 +196,7 @@ public class ExcelUtilPlus {
|
|||
//遍历设置列宽
|
||||
List<Object> header = rowList.get(0);
|
||||
for (int i = 0; i < header.size(); i++) {
|
||||
sheet.setColumnWidth(i,Math.max(12, header.get(i).toString().length()*4)*256);
|
||||
sheet.setColumnWidth(i, Math.max(12, header.get(i).toString().length() * 4) * 256);
|
||||
}
|
||||
|
||||
for (int rowIndex = 0; rowIndex < rowList.size(); rowIndex++) {
|
||||
|
|
@ -304,7 +301,7 @@ public class ExcelUtilPlus {
|
|||
//遍历设置列宽
|
||||
List<Object> header = rowList.get(0);
|
||||
for (int i = 0; i < header.size(); i++) {
|
||||
sheet.setColumnWidth(i,Math.max(12, header.get(i).toString().length()*4)*256);
|
||||
sheet.setColumnWidth(i, Math.max(12, header.get(i).toString().length() * 4) * 256);
|
||||
}
|
||||
|
||||
for (int rowIndex = 0; rowIndex < rowList.size(); rowIndex++) {
|
||||
|
|
@ -380,7 +377,6 @@ public class ExcelUtilPlus {
|
|||
childTitleCellStyle.setBorderBottom(BorderStyle.THIN);
|
||||
|
||||
|
||||
|
||||
// 设置主体样式
|
||||
XSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
XSSFFont font = workbook.createFont();
|
||||
|
|
@ -436,7 +432,7 @@ public class ExcelUtilPlus {
|
|||
rowOneCell.setCellValue(columnGroupItem.getText().toString());
|
||||
rowOneCell.setCellStyle(titleCellStyle);
|
||||
//设置列宽
|
||||
sheet.setColumnWidth(startIndex,Math.max(12, columnGroupItem.getText().length()*4)*256);
|
||||
sheet.setColumnWidth(startIndex, Math.max(12, columnGroupItem.getText().length() * 4) * 256);
|
||||
startIndex++;
|
||||
patternList.add(columnGroupItem.getPattern());
|
||||
} else {
|
||||
|
|
@ -458,7 +454,7 @@ public class ExcelUtilPlus {
|
|||
subHeader.setCellValue(childrenItem.getText().toString());
|
||||
subHeader.setCellStyle(titleCellStyle);
|
||||
//设置列宽
|
||||
sheet.setColumnWidth(startIndex + j,Math.max(12, childrenItem.getText().length()*4)*256);
|
||||
sheet.setColumnWidth(startIndex + j, Math.max(12, childrenItem.getText().length() * 4) * 256);
|
||||
patternList.add(childrenItem.getPattern());
|
||||
}
|
||||
|
||||
|
|
@ -471,10 +467,10 @@ public class ExcelUtilPlus {
|
|||
HashMap<Integer, XSSFCellStyle> numberCellStyleMap = new HashMap<Integer, XSSFCellStyle>();
|
||||
HashMap<Integer, XSSFCellStyle> numberRedCellStyleMap = new HashMap<Integer, XSSFCellStyle>();
|
||||
XSSFDataFormat df = workbook.createDataFormat();
|
||||
patternList.stream().distinct().forEach(p -> {
|
||||
patternList.stream().distinct().filter(a -> a != null).forEach(p -> {
|
||||
String start = "0.";
|
||||
if (p==0) {
|
||||
start ="0";
|
||||
if (p == 0) {
|
||||
start = "0";
|
||||
}
|
||||
XSSFCellStyle numberRedCellStyle = workbook.createCellStyle();
|
||||
BeanUtils.copyProperties(redCellStyle, numberRedCellStyle);
|
||||
|
|
@ -570,7 +566,6 @@ public class ExcelUtilPlus {
|
|||
childTitleCellStyle.setBorderBottom(BorderStyle.THIN);
|
||||
|
||||
|
||||
|
||||
// 设置主体样式
|
||||
XSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
XSSFFont font = workbook.createFont();
|
||||
|
|
@ -623,7 +618,7 @@ public class ExcelUtilPlus {
|
|||
rowOneCell.setCellValue(columnGroupItem.getText().toString());
|
||||
rowOneCell.setCellStyle(titleCellStyle);
|
||||
//设置列宽
|
||||
sheet.setColumnWidth(startIndex,Math.max(12, columnGroupItem.getText().length()*4)*256);
|
||||
sheet.setColumnWidth(startIndex, Math.max(12, columnGroupItem.getText().length() * 4) * 256);
|
||||
startIndex++;
|
||||
} else {
|
||||
List<WeaTableColumnGroup> childrenList = columnGroupItem.getChildren();
|
||||
|
|
@ -644,7 +639,7 @@ public class ExcelUtilPlus {
|
|||
subHeader.setCellValue(childrenItem.getText().toString());
|
||||
subHeader.setCellStyle(titleCellStyle);
|
||||
//设置列宽
|
||||
sheet.setColumnWidth(startIndex + j,Math.max(12, childrenItem.getText().length()*4)*256);
|
||||
sheet.setColumnWidth(startIndex + j, Math.max(12, childrenItem.getText().length() * 4) * 256);
|
||||
}
|
||||
|
||||
startIndex += childrenList.size();
|
||||
|
|
|
|||
|
|
@ -67,6 +67,6 @@ public class SIReportController {
|
|||
String pageSize = Optional.ofNullable(request.getParameter("pageSize")).orElse("10");
|
||||
salaryItemAdjustRecordQueryParam.setCurrent(Integer.valueOf(current));
|
||||
salaryItemAdjustRecordQueryParam.setPageSize(Integer.valueOf(pageSize));
|
||||
return new ResponseResult<SalaryItemAdjustRecordQueryParam, PageInfo<SalaryItemAdjustRecordListDTO>>(user).run(getSalaryArchiveItemWrapper(user)::adjustRecordList, salaryItemAdjustRecordQueryParam);
|
||||
return new ResponseResult<SalaryItemAdjustRecordQueryParam, PageInfo<SalaryItemAdjustRecordListDTO>>(user).run(getSalaryArchiveItemWrapper(user)::myAdjustRecordList, salaryItemAdjustRecordQueryParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -571,6 +571,20 @@ public class SalaryBillController {
|
|||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的工资单列表
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getToken")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getToken(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam(value = "uid") Long uid) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, Map<String, String>>(user).run(getSalarySendWrapper(user)::getToken, uid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的工资单列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -14,10 +14,12 @@ import com.engine.salary.entity.salaryarchive.po.SalaryArchiveItemPO;
|
|||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
|
||||
import com.engine.salary.enums.salaryarchive.SalaryArchiveItemAdjustReasonEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.impl.*;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.wrapper.proxy.SalaryArchiveItemWrapperProxy;
|
||||
|
|
@ -223,6 +225,40 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
List<SalaryItemPO> salaryItemList = getSalaryArchiveItemService(user).getCanAdjustSalaryItems();
|
||||
List<Long> salaryItemIds = salaryItemList.stream().map(SalaryItemPO::getId).collect(Collectors.toList());
|
||||
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL);
|
||||
Map<Long, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
|
||||
List<SalaryItemAdjustRecordListDTO> listAll = getSalaryArchiveItemService(user).salaryItemAdjustRecordList(SalaryItemAdjustRecordQueryParam.builder().build(), salaryItemIds);
|
||||
PageInfo<SalaryItemAdjustRecordListDTO> list = getSalaryArchiveItemService(user).salaryItemAdjustRecordListPage(queryParam, salaryItemIds);
|
||||
List<SalaryItemAdjustRecordListDTO> listResult = list.getList();
|
||||
//获取上次更改的记录
|
||||
listResult.forEach(m -> {
|
||||
if (!CollectionUtils.isEmpty(listAll)) {
|
||||
listAll.removeIf(a -> a.getId().equals(m.getId()));
|
||||
}
|
||||
Optional<SalaryItemAdjustRecordListDTO> optional = listAll.stream().filter(f -> f.getSalaryArchiveId().equals(m.getSalaryArchiveId()) && f.getSalaryItemId().equals(m.getSalaryItemId())).findFirst();
|
||||
m.setAdjustBefore(optional.isPresent() ? optional.get().getAdjustAfter() : "");
|
||||
DataCollectionEmployee employee = employeeMap.getOrDefault(m.getEmployeeId(), new DataCollectionEmployee());
|
||||
m.setUsername(employee.getUsername());
|
||||
m.setDepartmentName(employee.getDepartmentName());
|
||||
m.setEmployeeStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(employee.getStatus())));
|
||||
m.setAdjustReason(SalaryArchiveItemAdjustReasonEnum.getDefaultLabelByValue(m.getAdjustReason()));
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 我的调薪记录
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
public PageInfo<SalaryItemAdjustRecordListDTO> myAdjustRecordList(SalaryItemAdjustRecordQueryParam queryParam) {
|
||||
// 获取所有可被引用的薪资项目
|
||||
List<SalaryItemPO> salaryItemList = getSalaryArchiveItemService(user).getCanAdjustSalaryItems();
|
||||
List<Long> salaryItemIds = salaryItemList.stream().map(SalaryItemPO::getId).collect(Collectors.toList());
|
||||
|
||||
DataCollectionEmployee employee = getSalaryEmployeeService(user).getEmployeeById(queryParam.getEmployeeId());
|
||||
|
||||
List<SalaryItemAdjustRecordListDTO> listAll = getSalaryArchiveItemService(user).salaryItemAdjustRecordList(SalaryItemAdjustRecordQueryParam.builder().build(), salaryItemIds);
|
||||
|
|
@ -245,6 +281,7 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 单个档案的薪资项目调整记录列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.SalaryTokenUtil;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.engine.salary.wrapper.proxy.SalarySendWrapperProxy;
|
||||
|
|
@ -701,4 +702,8 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
public String exportPdf(SalaryExportPdfParam param) {
|
||||
return getSalaryBillService(user).exportPdf(param);
|
||||
}
|
||||
|
||||
public Map<String, String> getToken(Long uid) {
|
||||
return SalaryTokenUtil.GetToken( uid);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue