first commit

This commit is contained in:
2026-09-08 20:09:15 +08:00
commit c7e76e98ab
1647 changed files with 210480 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api</artifactId>
<version>3.6.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ruoyi-api-staffService</artifactId>
<description>
ruoyi-api-staffService职工服务模块接口
</description>
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-security</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api-system</artifactId>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,34 @@
package com.ruoyi.staffService.api;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.staffService.api.domain.birthdayWishes.BirthdayParamsConfig;
import com.ruoyi.staffService.api.domain.birthdayWishes.BirthdaySendRecord;
import com.ruoyi.staffService.api.factory.RemoteBirthdayWishesFallbackFactory;
import com.ruoyi.staffService.api.factory.RemoteWelfareFallbackFactory;
import com.ruoyi.system.api.domain.SysUserRole;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;
/**
* @ClassName RemoteBirthdayWisherService
* @Author JyuHsin
* @Date 2025/4/9 16:46
* @Version 1.0
* @Description TODO
*/
@FeignClient(contextId = "remoteBirthdayWishesService", value = ServiceNameConstants.STAFF_SERVICE, fallbackFactory = RemoteBirthdayWishesFallbackFactory.class)
public interface RemoteBirthdayWishesService {
@RequestMapping("/birthdayWishes/sendRecord/insertSendRecord")
R<Boolean> insertSendRecord(@RequestBody List<BirthdaySendRecord> records, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
@RequestMapping("/birthdayWishes/paramsConfig/findOne")
R<BirthdayParamsConfig> findOne();
}
@@ -0,0 +1,37 @@
package com.ruoyi.staffService.api;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.staffService.api.domain.welfare.WelfareList;
import com.ruoyi.staffService.api.domain.welfare.WelfareProject;
import com.ruoyi.staffService.api.factory.RemoteWelfareFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @version 1.0
* @Author zzr
* @nameRemoteWelfareService
* @Date 2024/8/30 16:10
* @注释
*/
@FeignClient(contextId = "remoteWelfareService", value = ServiceNameConstants.STAFF_SERVICE, fallbackFactory = RemoteWelfareFallbackFactory.class)
public interface RemoteWelfareService {
/**
* 查询当前进行中的福利项目
*
* @return
*/
@GetMapping("/welfare/common/listAfootWelfare")
R<List<WelfareProject>> listAfootWelfare(@RequestParam(required = false, value = "userId") Long userId);
//新增福利名单List insertWelfareList
@GetMapping("/welfare/common/insertWelfareList")
R<Boolean> insertWelfareList(@RequestBody List<WelfareList> welfareList);
}
@@ -0,0 +1,81 @@
package com.ruoyi.staffService.api.constant.condolence;
/**
* 慰问审核状态
*
* @author jug
* @date 2023/02/01
*/
public class CondolenceAuditState {
/**
* 未提交
*/
public static final Integer NOT_SUBMIT = 5;
/**
* 待工会小组审核
*/
public static final Integer UNION_GROUP_READY = 10;
/**
* 工会小组审核退回修改
*/
public static final Integer UNION_GROUP_BACK_MODIFY = 15;
/**
* 工会小组审核拒绝
*/
public static final Integer UNION_GROUP_REJECTED = 20;
/**
* 待分工会审核
*/
public static final Integer BRANCH_UNION_READY = 25;
/**
* 分工会审核退回修改
*/
public static final Integer BRANCH_UNION_BACK_MODIFY = 30;
/**
* 分工会审核拒绝
*/
public static final Integer BRANCH_UNION_REJECTED = 35;
/**
* 待校工会会计审核
*/
public static final Integer SCHOOL_UNION_ACCOUNTING_READY = 40;
/**
* 校工会会计审核退回修改
*/
public static final Integer SCHOOL_UNION_ACCOUNTING_BACK_MODIFY = 45;
/**
* 校工会会计审核拒绝
*/
public static final Integer SCHOOL_UNION_ACCOUNTING_REJECTED = 50;
/**
* 待校工会审核
*/
public static final Integer SCHOOL_UNION_READY = 55;
/**
* 校工会审核退回修改
*/
public static final Integer SCHOOL_UNION_BACK_MODIFY = 60;
/**
* 校工会审核拒绝
*/
public static final Integer SCHOOL_UNION_REJECTED = 65;
/**
* 校工会审核通过
*/
public static final Integer SCHOOL_UNION_PASS = 70;
}
@@ -0,0 +1,28 @@
package com.ruoyi.staffService.api.constant.condolence;
/**
* 慰问审核类型
*
* @author jug
* @date 2023/02/02
*/
public class CondolenceAuditType {
/**
* 工会小组
*/
public final static int UNION_GROUP = 1;
/**
* 分工会
*/
public final static int BRANCH_UNION = 2;
/**
* 校工会会计
*/
public final static int SCHOOL_UNION_ACCOUNTING = 3;
/**
* 校工会
*/
public final static int SCHOOL_UNION = 4;
}
@@ -0,0 +1,46 @@
package com.ruoyi.staffService.api.constant.condolence;
import com.ruoyi.common.core.domain.PageForm;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class CondolencePageForm extends PageForm {
/**
* 年度
*/
private Integer year;
/**
* 慰问类型
*/
private Integer type;
/**
* 分工会
*/
private String unionId;
/**
* 工会小组
*/
private String unionGroupId;
/**
* 二级单位
*/
private String unitId;
/**
* 三级单位
*/
private String threeUnitId;
/**
* 审核状态
*/
private Boolean isAudit;
}
@@ -0,0 +1,64 @@
package com.ruoyi.staffService.api.constant.difficulty;
/**
* @Author JyuHsin
* @Date 2023/2/10
* @Description
*/
public class DifficultyAuditState {
/**
* 未提交
*/
public static final Integer NOT_SUBMIT = 200;
/**
* 待工会小组审核
*/
public static final Integer UNION_GROUP_READY = 210;
/**
* 工会小组审核退回修改
*/
public static final Integer UNION_GROUP_BACK_MODIFY = 220;
/**
* 工会小组审核拒绝
*/
public static final Integer UNION_GROUP_REJECTED = 230;
/**
* 待分工会审核
*/
public static final Integer UNION_READY = 240;
/**
* 分工会审核退回修改
*/
public static final Integer UNION_BACK_MODIFY = 250;
/**
* 分工会审核拒绝
*/
public static final Integer UNION_REJECTED = 260;
/**
* 待校工会审核
*/
public static final Integer SCHOOL_READY = 270;
/**
* 校工会审核退回修改
*/
public static final Integer SCHOOL_BACK_MODIFY = 280;
/**
* 校工会审核拒绝
*/
public static final Integer SCHOOL_REJECTED = 290;
/**
* 校工会审核通过
*/
public static final Integer SCHOOL_PASS = 300;
}
@@ -0,0 +1,15 @@
package com.ruoyi.staffService.api.constant.welfare;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
@Data
public class CourierNumberExcelMode {
@Excel(name = "工号")
private String loginName;
@Excel(name = "快递单号")
private String courierNumber;
}
@@ -0,0 +1,19 @@
package com.ruoyi.staffService.api.constant.welfare;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class Gift {
/**
* 礼品名称
*/
private String name;
/**
* 是否默认
*/
private Boolean isDefault;
}
@@ -0,0 +1,247 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.HashMap;
import java.util.Map;
/**
* desc:
* project: activity
* Created by yfliqiang@jd.com
* 2016-12-07 09:56
*/
public class RsaCoder extends RsaUtil {
/**
*
*/
public static final String KEY_ALGORITHM = "RSA";
/**
*
*/
public static final String KEY_ALGORITHM_DETAIL = "RSA/ECB/PKCS1Padding";
/**
*
*/
public static final String SIGNATURE_ALGORITHM = "MD5withRSA";
/**
*
*/
public static final String PUBLIC_KEY = "RSAPublicKey";
/**
*
*/
public static final String PRIVATE_KEY = "RSAPrivateKey";
/**
*
*/
public static final int MAX_DECRYPT_BLOCK = 128;
/**
*
*/
public static final int MAX_ENCRYPT_BLOCK = 117;
/**
*
*/
public RsaCoder() {
}
/**
* @param data
* @param privateKey
* @return
* @throws Exception
*/
public static String sign(byte[] data, String privateKey) throws Exception {
byte[] keyBytes = decryptBASE64(privateKey);
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey priKey = keyFactory.generatePrivate(pkcs8KeySpec);
Signature signature = Signature.getInstance("MD5withRSA");
signature.initSign(priKey);
signature.update(data);
return encryptBASE64(signature.sign());
}
/**
* @param data
* @param publicKey
* @param sign
* @return
* @throws Exception
*/
public static boolean verify(byte[] data, String publicKey, String sign) throws Exception {
byte[] keyBytes = decryptBASE64(publicKey);
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey pubKey = keyFactory.generatePublic(keySpec);
Signature signature = Signature.getInstance("MD5withRSA");
signature.initVerify(pubKey);
signature.update(data);
return signature.verify(decryptBASE64(sign));
}
// public static byte[] decryptByPrivateKey(byte[] data, String key) throws Exception {
// byte[] keyBytes = decryptBASE64(key);
// PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
// KeyFactory keyFactory = KeyFactory.getInstance("RSA");
// PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
// Cipher cipher = Cipher.getInstance(KEY_ALGORITHM_DETAIL);
// cipher.init(Cipher.DECRYPT_MODE, privateKey);
// return cipher.doFinal(data);
// }
/**
* @param key
* @param key
* @return String
* @Title: RSADecode
* @Description: 将字符串解密
*/
public static byte[] decryptByPrivateKey(byte[] b, String key) throws Exception {
byte[] keyBytes = decryptBASE64(key);
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
return doFinalSplit(b, privateKey, Cipher.DECRYPT_MODE);
}
/**
* @param data
* @param key
* @return
* @throws Exception
*/
public static byte[] decryptByPublicKey(byte[] data, String key) throws Exception {
byte[] keyBytes = decryptBASE64(key);
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
return doFinalSplit(data, publicKey, Cipher.DECRYPT_MODE);
}
/**
* @param data
* @param key
* @return
* @throws Exception
*/
public static byte[] encryptByPublicKey(byte[] data, String key) throws Exception {
byte[] keyBytes = decryptBASE64(key);
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
return doFinalSplit(data, publicKey, Cipher.ENCRYPT_MODE);
}
/**
* @param data
* @param key
* @return
* @throws Exception
*/
public static byte[] encryptByPrivateKey(byte[] data, String key) throws Exception {
byte[] keyBytes = decryptBASE64(key);
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
return doFinalSplit(data, privateKey, Cipher.ENCRYPT_MODE);
}
/**
* @param b
* @param key
* @param mode
* @return
* @throws NoSuchAlgorithmException
* @throws NoSuchPaddingException
* @throws InvalidKeyException
* @throws IllegalBlockSizeException
* @throws BadPaddingException
* @throws IOException
*/
private static byte[] doFinalSplit(byte[] b, Key key, int mode) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, IOException {
int inputLen = b.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
Cipher cipher = Cipher.getInstance(KEY_ALGORITHM_DETAIL);
cipher.init(mode, key);
Integer lenth;
if (Cipher.ENCRYPT_MODE == mode) {
lenth = MAX_ENCRYPT_BLOCK;
} else if (Cipher.DECRYPT_MODE == mode) {
lenth = MAX_DECRYPT_BLOCK;
} else {
throw new RuntimeException("error Cipher mode");
}
// 对数据分段解密
while (inputLen - offSet > 0) {
if (inputLen - offSet > lenth) {
cache = cipher.doFinal(b, offSet, lenth);
} else {
cache = cipher.doFinal(b, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * lenth;
}
byte[] decryptedData = out.toByteArray();
out.close();
return decryptedData;
}
/**
* @param keyMap
* @return
* @throws Exception
*/
public static String getPrivateKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key) keyMap.get("RSAPrivateKey");
return encryptBASE64(key.getEncoded());
}
/**
* @param keyMap
* @return
* @throws Exception
*/
public static String getPublicKey(Map<String, Object> keyMap) throws Exception {
Key key = (Key) keyMap.get("RSAPublicKey");
return encryptBASE64(key.getEncoded());
}
/**
* @return
* @throws Exception
*/
public static Map<String, Object> initKey() throws Exception {
KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA");
keyPairGen.initialize(1024);
KeyPair keyPair = keyPairGen.generateKeyPair();
RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
HashMap keyMap = new HashMap(2);
keyMap.put("RSAPublicKey", publicKey);
keyMap.put("RSAPrivateKey", privateKey);
return keyMap;
}
}
@@ -0,0 +1,23 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
import cn.hutool.core.codec.Base64;
/**
* desc:
* project: activity
* Created by yfliqiang@jd.com
* 2016-12-07 09:54
*/
public class RsaUtil {
public RsaUtil() {
}
public static byte[] decryptBASE64(String key) throws Exception {
return Base64.decode(key);
}
public static String encryptBASE64(byte[] key) throws Exception {
return Base64.encode(key);
}
}
@@ -0,0 +1,55 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* desc:
* project: activity
* Created by yfliqiang@jd.com
* 2016-12-07 09:58
*/
public class ShaUtil {
public static String encrypt(String strSrc, String encName) {
MessageDigest md = null;
String strDes = null;
byte[] bt = new byte[0];
try {
bt = strSrc.getBytes("UTF-8");
} catch (UnsupportedEncodingException var6) {
return null;
}
try {
if (encName == null || encName.equals("")) {
encName = "SHA-256";
}
md = MessageDigest.getInstance(encName);
md.update(bt);
strDes = bytes2Hex(md.digest());
return strDes;
} catch (NoSuchAlgorithmException var7) {
return null;
}
}
public static String bytes2Hex(byte[] bts) {
String des = "";
String tmp = null;
for (int i = 0; i < bts.length; ++i) {
tmp = Integer.toHexString(bts[i] & 255);
if (tmp.length() == 1) {
des = des + "0";
}
des = des + tmp;
}
return des;
}
}
@@ -0,0 +1,99 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
import java.lang.reflect.Field;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
/**
* desc:
* project: activity
* Created by yfliqiang@jd.com
* 2016-12-07 10:18
*/
public class SignatureUtil {
public static String genSrcData(TreeMap<String, Object> paramMap, List<String> unSignKeyList) {
StringBuilder sb = new StringBuilder();
Iterator result = unSignKeyList.iterator();
while (result.hasNext()) {
String iterator = (String) result.next();
paramMap.remove(iterator);
}
Iterator iterator1 = paramMap.entrySet().iterator();
while (iterator1.hasNext()) {
Map.Entry result1 = (Map.Entry) iterator1.next();
if (result1.getValue() != null && ((String) result1.getValue()).trim().length() > 0) {
sb.append(result1.getKey() + "=" + result1.getValue() + "&");
}
}
String result2 = sb.toString();
if (result2.endsWith("&")) {
result2 = result2.substring(0, result2.length() - 1);
}
return result2;
}
public static String signString(Object object, List<String> unSignKeyList) throws IllegalArgumentException, IllegalAccessException {
TreeMap map = objectToMap(object);
return genSrcData(map, unSignKeyList);
}
public static TreeMap<String, Object> objectToMap(Object object) throws IllegalArgumentException, IllegalAccessException {
TreeMap map = new TreeMap();
for (Class cls = object.getClass(); cls != Object.class; cls = cls.getSuperclass()) {
Field[] fields = cls.getDeclaredFields();
Field[] var7 = fields;
int var6 = fields.length;
for (int var5 = 0; var5 < var6; ++var5) {
Field f = var7[var5];
f.setAccessible(true);
map.put(f.getName(), f.get(object));
}
}
return map;
}
/**
* 验证签名是否正确
*
* @param s1
* @param signData
* @param rsaSignPubKey
* @return
*/
public static boolean verifySign(String s1, String signData, String rsaSignPubKey) {
boolean flag;
if (signData != null && signData.length() != 0) {
if (rsaSignPubKey != null && rsaSignPubKey.length() != 0) {
try {
String s2 = ShaUtil.encrypt(s1, "SHA-256");
byte[] signByte = RsaCoder.decryptBASE64(signData);
byte[] decryptArr = RsaCoder.decryptByPublicKey(signByte, rsaSignPubKey);
String decryptStr = new String(decryptArr);
if (s2.equals(decryptStr)) {
flag = true;
return flag;
} else {
throw new RuntimeException("Signature verification failed.");
}
} catch (Exception e) {
throw new RuntimeException("verify signature failed.", e);
}
} else {
throw new IllegalArgumentException("Argument \'rsaSignPubKey\' is null or empty");
}
} else {
throw new IllegalArgumentException("Argument \'signData\' is null or empty");
}
}
}
@@ -0,0 +1,36 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
import org.apache.commons.lang3.StringUtils;
import java.util.Map;
public class SortUtil {
/**
* 参数列表按照字典排序,并拼接为URL 键值对字符串
*
* @param map
* @return
*/
public static String sortParams(Map<String, Object> map) {
// 将参数按照参数名的 ASCII 码顺序从小到大排序(字典序),使用 URL 键值对
// 的方式拼接成字符串 S1,(如:k1=value1&k2=value2&k3=value3…)
StringBuilder s1 = new StringBuilder();
for (Map.Entry<String, Object> entry : map.entrySet()) {
if (StringUtils.isNotBlank(String.valueOf(entry.getValue()))) {
s1.append(entry.getKey()).append("=").append(entry.getValue())
.append("&");
}
}
String params = s1.toString();
// 去掉末尾&号
if (params.endsWith("&")) {
String subStr = params.substring(0, params.length() - 1);
params = subStr;
}
//logger.info("sortParams end.params={}", params);
return params;
}
}
@@ -0,0 +1,42 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
import lombok.Data;
/**
* 免登录URL参数列表
*
* @author jug
* @date 2023/06/14
*/
@Data
public class WelfareJDAutoLoginParam {
/**
* 用户唯一标识,接口调用方必须保证唯一性,加密传输
*/
private String uid;
/**
* 活动访问key,加密传输
*/
private String accessKey;
/**
* unix时间戳,加密传输
*/
private String timestamp;
/**
* 登录成功的重定向地址,必须是采购平台PC端的地址,加密传输
*/
private String returnUrl;
/**
* 扩展字段,需要特殊开发的逻辑;目前为了满足京东福利的erp扩展节点下穿需求,加密传输
*/
private String extend;
/**
* 接口版本,目前固定传V1.0
*/
private String version;
/**
* 加密签名
*/
private String sign;
}
@@ -0,0 +1,91 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
import cn.hutool.core.util.StrUtil;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
public class WelfareJDAutoLoginParamUtil {
/**
* 参数加密
*
* @param srcStr 要加密的原始字符串
* @param rsaEncryptPubKey 加密RSA公钥
* @return
*/
public static String encryptParam(String srcStr, String rsaEncryptPubKey) {
try {
byte[] s1Byte = RsaCoder.encryptByPublicKey(srcStr.getBytes(), rsaEncryptPubKey);
String s1 = RsaCoder.encryptBASE64(s1Byte);
return s1;
} catch (Exception e) {
System.out.println("参数加密失败,srcStr=" + srcStr);
e.printStackTrace();
return null;
}
}
/**
* 参数解密
*
* @param encryptedStr 已加密的字符串
* @param rsaSignPrivKey 加密RSA私钥
* @return
*/
public static String decryptParam(String encryptedStr, String rsaSignPrivKey) {
try {
byte[] s1EncryptedByte = RsaCoder.decryptBASE64(encryptedStr);
byte[] s1Byte = RsaCoder.decryptByPrivateKey(s1EncryptedByte, rsaSignPrivKey);
return new String(s1Byte);
} catch (Exception e) {
System.out.println("参数解密失败,encryptedStr=" + encryptedStr);
e.printStackTrace();
return null;
}
}
public static WelfareJDAutoLoginParam getAutoLoginParam(String rsaSignPrivateKey, String rsaEncryptPublicKey, String accessKey, String returnUrl, String userId, String extend, String version) throws Exception {
WelfareJDAutoLoginParam autoLoginParam = new WelfareJDAutoLoginParam();
autoLoginParam.setAccessKey(accessKey);
autoLoginParam.setExtend(extend);
autoLoginParam.setReturnUrl(returnUrl);
autoLoginParam.setUid(userId);
autoLoginParam.setTimestamp(System.currentTimeMillis() / 1000 + "");
//sign验证
List<String> unsignedKeyList = new ArrayList<>();
unsignedKeyList.add("version");
unsignedKeyList.add("sign");
// 获取验签sign
// 1.将参数按照ASCII码从小到大的顺序排列并使用&符号拼接-s1
String s1 = SignatureUtil.signString(autoLoginParam, unsignedKeyList);
// 2.将s1使用"SHA-256"加密方式进行加密获取字符串-s2
String s2 = ShaUtil.encrypt(s1, "SHA-256");
// 3.将s2再使用验签私钥进行加密成为s3
byte[] s2Rsa = RsaCoder.encryptByPrivateKey(s2.getBytes("UTF-8"), rsaSignPrivateKey);
// 4.将s3进行base64进行编码
String sign = RsaCoder.encryptBASE64(s2Rsa);
//
autoLoginParam.setAccessKey(encryptParam(autoLoginParam.getAccessKey(), rsaEncryptPublicKey));
if (StrUtil.isNotBlank(autoLoginParam.getExtend())) {
autoLoginParam.setExtend(encryptParam(autoLoginParam.getExtend(), rsaEncryptPublicKey));
}
autoLoginParam.setTimestamp(encryptParam(autoLoginParam.getTimestamp(), rsaEncryptPublicKey));
if (StrUtil.isNotBlank(autoLoginParam.getReturnUrl())) {
autoLoginParam.setReturnUrl(encryptParam(URLEncoder.encode(autoLoginParam.getReturnUrl(), StandardCharsets.UTF_8), rsaEncryptPublicKey));
}
autoLoginParam.setUid(encryptParam(autoLoginParam.getUid(), rsaEncryptPublicKey));
// 版本号和签名不再加密
autoLoginParam.setVersion(version);
autoLoginParam.setSign(sign);
return autoLoginParam;
}
}
@@ -0,0 +1,36 @@
package com.ruoyi.staffService.api.constant.welfare.JD;
public class WelfareJDConstant {
/**
* 活动访问key
*/
public static final String accessKey = "njv8C4NbiDlvLhUUAxlYddRyPrv3fkc_jTVMqSrGJjU=";
/**
* RSA 签名 keyPair-私钥
*/
public static final String rsaSignPrivateKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKOqPX2RgS2IFA/IyYt8mK/lQbeQ\n" +
"c+hwJYltvWPDQvXx0DAOSvmtu2a4N/5oo9Bz8eaKPNwOwqdm6UCMWSDGeEFibYMmEeTMe1IoKPbD\n" +
"UX3zH15kRPrqZnUjAqw3THc4fqIDd6MDlvn1GG18Ac3P+gHAZcSRuenbx5wJRn4GZzdlAgMBAAEC\n" +
"gYB+2E2KCYCNsl6iESMraWjJQqyZQWqj5m8hQR08ubQm+8A3zowLULvik7pKAf2cbJA59j/O6d2x\n" +
"cpArB9t4DHpcKTN9wjg5Ia3WB6V0kbiTz+bQcZxfj9JHFrDKKECWFTsN1q7qBH9oewLL+ryh1lRZ\n" +
"/Wr3WDfD6yFK1Gpywq64bQJBAPBWb77n8OFe2IXykPYUR9ZBWY0bE87mXPMaRJ/cw8tY18GNm49t\n" +
"kgzMtOGA2COZvvft4atmsrQG04+MLO9Le2sCQQCuVKuuDrl/37qMGCA+LmF9fLf+EutQnQZgLqOD\n" +
"PflSqVCz2JjXqRngAOQtX4k92LEM/4+fLc/8Vj3LZ9r5xxxvAkEAobHFpK7vhPEGw7eah7TFUATP\n" +
"dvvMq9qYloYJvXQN1nWDUxkum6SgKjRfTYgd4nXB4ZQNy/9gI3akR2OLp8Mk2QJBAJCNOMXdA8ea\n" +
"dg6QOrwUrVXmQpJ0kZaIfa7nPUIn80KtjnNyGFpKp1/snUdaPmx/71890ZNF433y7M5q0VHn3hUC\n" +
"QCjNYB9+dyMfxUVcvfXlUA/BJqbyEgTjhU2Lo61BZY9YwJEg06r0fGpDxrsNpdxh3Ap0dBWm3QpL\n" +
"Ap6rCyUCDq0=";
/**
* RSA 参数加密keyPair-公钥
*/
public static final String rsaEncryptPublicKey = """
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJ65/Wdpcc4DQCKR0cdzy0Lh3JzoAIoCjT56qz
Iz8nt2JJFMAcstQ9dSAQbt/+C5e1UTw0ElpGspankk+l7QXWtgn2bhB9rdLZ8fDrPP5VSMO3Q+pS
q9lH1OM5du0BW0HMxTYQkFiRnQShixHtXkAzjQ8s6d0PvQcSLy4+isn+sQIDAQAB
""";
}
@@ -0,0 +1,22 @@
package com.ruoyi.staffService.api.constant.welfare;
/**
* 福利会员申请状态
*/
public interface WelfareMemberApplyState {
/**
* 待校工会审核
*/
int SCHOOL_UNION = 1000;
/**
* 校工会审核不通过
*/
int SCHOOL_UNION_FAIL = 1050;
/**
* 正式会员
*/
int NORMAL_MEMBER = 1100;
}
@@ -0,0 +1,35 @@
package com.ruoyi.staffService.api.constant.welfare;
/**
* 会员变更申请状态
*
* @author: 1V
* @date: 2021/1/25
* @since 1.0
*/
public interface WelfareMemberChangeApplyState {
/**
* 待院级工会审核
*/
int UNION = 400;
/**
* 院级工会审核不通过
*/
int UNION_FAIL = 405;
/**
* 待校工会审核
*/
int SCHOOL_UNION = 410;
/**
* 校工会审核不通过
*/
int SCHOOL_UNION_FAIL = 415;
/**
* 变更成功
*/
int SUCCESS = 420;
}
@@ -0,0 +1,36 @@
package com.ruoyi.staffService.api.constant.welfare;
import com.ruoyi.common.core.domain.PageForm;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 福利名单
*
* @author jug
* @date 2023/02/09
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class WelfareMemberListPageForm extends PageForm {
private Integer year;
private String projectId;
private String unionId;
private String unitId;
private String threeUnitId;
private String unionGroupId;
private String welfareUnit;
private String sex;
private String personType;
private String userState;
}
@@ -0,0 +1,20 @@
package com.ruoyi.staffService.api.constant.welfare;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 福利会员状态
*/
@Getter
@AllArgsConstructor
public enum WelfareMemberMode {
NONE(0, "非会员"),
NORMAL(1, "正式会员"),
POTENTIAL(2, "潜在会员");
private int code;
private String description;
}
@@ -0,0 +1,36 @@
package com.ruoyi.staffService.api.constant.welfare;
import com.ruoyi.common.core.domain.PageForm;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class WelfareMemberPageForm extends PageForm {
String unionId;
/**
* 福利单位的组成单位 全都是二级单位
*/
String unitId;
/**
* 福利单位 可能是单位、分工会
*/
String welfareUnit;
String unionGroupId;
String threeUnitId;
String campus;
String personType;
String userState;
String sex;
/**
* 更新日期
*/
String[] changeDateRange;
}
@@ -0,0 +1,22 @@
package com.ruoyi.staffService.api.constant.welfare;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 福利通知推送形式
*
* @author jug
* @date 2023/02/08
* @since 1.0
*/
@Getter
@AllArgsConstructor
public enum WelfareNoticePushMode {
ENTERPRISE_WECHAT("1", "企业微信");
// , APPLET(2, "小程序");
private String code;
private String description;
}
@@ -0,0 +1,23 @@
package com.ruoyi.staffService.api.constant.welfare;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 福利发放形式
*
* @author jug
* @date 2023/02/08
*/
@Getter
@AllArgsConstructor
public enum WelfareProvideMode {
WELFARE_UNIT("1", "分工会/福利单位"),
PERSON_CHOICE("2", "意向选择"),
PERSONAL("3", "邮寄到家"),
JD("3", "京东发放");
private final String code;
private final String description;
}
@@ -0,0 +1,27 @@
package com.ruoyi.staffService.api.constant.welfare;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 福利套餐账号密码导入模型。
*
* <p>工号和姓名用于校验导入人员,账号和密码写入所选套餐对应的福利选择记录。</p>
*/
@Data
@Accessors(chain = true)
public class WelfareSelectionAccountImport {
@Excel(name = "工号", width = 20)
private String loginName;
@Excel(name = "姓名", width = 20)
private String userName;
@Excel(name = "账号", width = 25)
private String account;
@Excel(name = "密码", width = 25)
private String password;
}
@@ -0,0 +1,22 @@
package com.ruoyi.staffService.api.constant.welfare;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 福利签收形式
*
* @author jug
* @date 2023/02/08
*/
@Getter
@AllArgsConstructor
public enum WelfareSignMode {
PAPER("1", "纸质签字"),
QRCODE_SIGNATURE("2", "电子签字"),
QRCODE("3", "二维码");
private String code;
private String description;
}
@@ -0,0 +1,46 @@
package com.ruoyi.staffService.api.constant.welfare;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.SpringUtils;
import com.ruoyi.staffService.api.domain.welfare.WelfareUnit;
import com.ruoyi.system.api.RemoteConfigService;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.List;
@Getter
@AllArgsConstructor
public enum WelfareUnitMode {
UNIT("welfareUnitId"),
UNION("unionId");
private String field;
/**
* 获取当前系统参数设置的mode
*
* @return mode
*/
public static WelfareUnitMode getMode() {
RemoteConfigService remoteConfigService = SpringUtils.getBean(RemoteConfigService.class);
R<String> welfareUnitModeR = remoteConfigService.selectConfigByKey("WelfareUnitMode");
if (welfareUnitModeR.getCode() == R.SUCCESS) {
return WelfareUnitMode.valueOf(welfareUnitModeR.getMsg());
}
return WelfareUnitMode.UNION;
}
/**
* 获取福利单位
*
* @return
*/
public static List<WelfareUnit> getWelfareUnits() {
return null;
}
}
@@ -0,0 +1,64 @@
package com.ruoyi.staffService.api.domain.Inclusive;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
@EqualsAndHashCode(callSuper = true)
@Table
@Data
@Comment("普惠平台")
public class InclusivePlatform extends BaseEntity {
@Name
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@ColDefine(type = ColType.VARCHAR, width = 50)
@Comment("标题")
private String title;
@Column
@ColDefine(type = ColType.VARCHAR, width = 100)
@Comment("摘要")
private String subTitle;
@Column
@ColDefine(type = ColType.VARCHAR, width = 255)
@Comment("图片")
private String icon;
@Column
@ColDefine(customType = "long")
@Comment("阅读数")
private Long readCount;
@Column
@ColDefine(customType = "long")
@Comment("点赞数")
private Long likeCount;
@Column
@ColDefine(customType = "longtext")
@Comment("内容")
private String content;
@Column
@ColDefine(type = ColType.VARCHAR, width = 255)
@Comment("微信公众号链接地址")
private String wxLink;
@Column
@ColDefine(type = ColType.BOOLEAN)
@Comment("是否保存")
private Boolean save;
@Column
@ColDefine(type = ColType.INT)
@Comment("性别限制(1.全部开放,2.男性,3.女性)")
private Integer sexLimit;
}
@@ -0,0 +1,49 @@
package com.ruoyi.staffService.api.domain.birthdayWishes;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import java.io.Serial;
import java.io.Serializable;
/**
* @ClassName ParamsConfig
* @Author JyuHsin
* @Date 2025/4/9 10:32
* @Version 1.0
* @Description TODO
*/
@Data
@Table("birthday_params_config")
public class BirthdayParamsConfig implements Serializable{
@Serial
private static final long serialVersionUID = 1L;
@Column
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@Column
@Comment("配置名称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String configName;
@Column
@Comment("发送时间")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String sendTime;
@Column
@Comment("发送内容")
@ColDefine(type = ColType.TEXT)
private String sendContent;
@Column
@Comment("任务状态")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String status;
}
@@ -0,0 +1,74 @@
package com.ruoyi.staffService.api.domain.birthdayWishes;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import java.io.Serial;
import java.io.Serializable;
/**
* @ClassName BirthdaySendRecord
* @Author JyuHsin
* @Date 2025/4/9 10:45
* @Version 1.0
* @Description TODO
*/
@Data
@Table("birthday_send_record")
public class BirthdaySendRecord implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Column
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@Column
@Comment("收件人ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String receiveUserId;
@Column
@Comment("收件人工号")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String receiveLoginName;
@Column
@Comment("收件人姓名")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String receiveUserName;
@Column
@Comment("收件人单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String receiveUnitId;
@Column
@Comment("收件人单位")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String receiveUnitName;
@Column
@Comment("收件人工会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String receiveUnionId;
@Column
@Comment("收件人工会")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String receiveUnionName;
@Column
@Comment("发送时间")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String sendTime;
@Column
@Comment("发送内容")
@ColDefine(type = ColType.TEXT)
private String sendContent;
}
@@ -0,0 +1,147 @@
package com.ruoyi.staffService.api.domain.common;
import com.ruoyi.common.security.utils.SecurityUtils;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
/**
* @ClassName Audit
* @Description TODO
* @Author zhaoxinyu
* @Date 2022/12/15 11:27
* @Version 1.0
*/
@Table("audit")
@Data
@Accessors(chain = true)
public class Audit {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("审核人")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(els = {@EL("$me.uid()")})
private Long auditor;
@Column
@Comment("是否通过")
@ColDefine(type = ColType.BOOLEAN)
private Boolean auditPass;
@Column
@Comment("审核时间")
@Prev(els = {@EL("$me.nowDate()")})
private Date auditTime;
@Column
@Comment("审核意见")
@ColDefine(type = ColType.VARCHAR, width = 500)
private String auditOpinion;
@Column
@Comment("签字")
@ColDefine(customType = "longtext")
private String auditSign;
@Column
@Comment("审核人姓名")
@ColDefine(type = ColType.VARCHAR, width = 50)
@PrevInsert(els = {@EL("$me.userName()")})
private String userName;
@Column
@Comment("审核人工号")
@ColDefine(type = ColType.VARCHAR, width = 50)
@PrevInsert(els = {@EL("$me.loginName()")})
private String loginName;
public Long uid() {
return SecurityUtils.getUserId();
}
public Date nowDate() {
return new Date();
}
public String userName() {
return SecurityUtils.getNickName();
}
public String loginName() {
return SecurityUtils.getUsername();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Long getAuditor() {
return auditor;
}
public void setAuditor(Long auditor) {
this.auditor = auditor;
}
public Boolean getAuditPass() {
return auditPass;
}
public void setAuditPass(Boolean auditPass) {
this.auditPass = auditPass;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
public String getAuditOpinion() {
return auditOpinion;
}
public void setAuditOpinion(String auditOpinion) {
this.auditOpinion = auditOpinion;
}
public String getAuditSign() {
return auditSign;
}
public void setAuditSign(String auditSign) {
this.auditSign = auditSign;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
}
@@ -0,0 +1,47 @@
package com.ruoyi.staffService.api.domain.common;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
/**
* @ClassName AuditState
* @Description TODO
* @Author zhaoxinyu
* @Date 2022/12/15 11:43
* @Version 1.0
*/
@Table("audit_state")
@Data
public class AuditState {
@Column
@Id(
auto = false
)
@Comment("ID")
@ColDefine(
type = ColType.INT,
width = 8
)
private Integer stateId;
@Column
@Comment("状态名")
@ColDefine(
type = ColType.VARCHAR,
width = 50
)
private String stateName;
@Column
@Comment("强调色")
@ColDefine(
type = ColType.VARCHAR,
width = 20
)
private String stateColor;
@Column
@Comment("隶属(***模块)")
@ColDefine(
type = ColType.VARCHAR,
width = 50
)
private String module;
}
@@ -0,0 +1,48 @@
package com.ruoyi.staffService.api.domain.common;
import com.ruoyi.common.core.enums.ConditionalOperational;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* 匹配条件
*
* @author: 1V
* @date: 2021/3/1
* @since 1.0
*/
@Data
@Accessors(chain = true)
@Table("match_condition")
public class MatchCondition {
@Name
@Column
@Comment("ID")
@PrevInsert(uu32 = true)
@ColDefine(type = ColType.VARCHAR, width = 32)
private String id;
@Column
@Comment("结构id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String structureId;
@Column
@Comment("字段")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String field;
@Column
@Comment("操作")
@ColDefine(type = ColType.VARCHAR, width = 50)
private ConditionalOperational operational;
@Column
@Comment("")
@ColDefine(type = ColType.VARCHAR, width = 255)
private String value;
}
@@ -0,0 +1,56 @@
package com.ruoyi.staffService.api.domain.common;
import com.ruoyi.common.core.enums.MatchMethod;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.Cnd;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.dao.util.cri.Exps;
import org.nutz.dao.util.cri.SqlExpression;
import java.io.Serializable;
import java.util.List;
/**
* 条件构造
*
* @author: 1V
* @date: 2021/3/1
* @since 1.0
*/
@Data
@Accessors(chain = true)
@Table("match_condition_structure")
public class MatchConditionStructure implements Serializable {
@Name
@Column
@Comment("ID")
@PrevInsert(uu32 = true)
@ColDefine(type = ColType.VARCHAR, width = 32)
private String id;
@Column
@Comment("匹配方法")
@ColDefine(type = ColType.VARCHAR, width = 10)
private MatchMethod method;
@Many(field = "structureId")
private List<MatchCondition> conditions;
public void join(Cnd cnd) {
if (conditions == null) {
return;
}
for (MatchCondition condition : conditions) {
SqlExpression sqlExpression = Exps.create(condition.getField(), condition.getOperational().getValue(), condition.getValue());
if (method.equals(MatchMethod.AND)) {
cnd.and(sqlExpression);
} else if (method.equals(MatchMethod.OR)) {
cnd.or(sqlExpression);
}
}
}
}
@@ -0,0 +1,270 @@
package com.ruoyi.staffService.api.domain.condolence;
import com.ruoyi.common.core.domain.SysFile;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
import java.util.List;
/**
* 慰问
*
* @author jug
* @date 2023/02/01
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("condolence")
public class Condolence extends BaseEntity {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("申请方式(1本人申请 2分工会代申请)")
@ColDefine(type = ColType.INT)
private Integer applyWay;
@Column
@Comment("经办人Id")
@ColDefine(customType = "bigint")
private Long agentId;
@Column
@Comment("经办人姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String agentUserName;
@Column
@Comment("经办人工号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String agentLoginName;
@Column
@Comment("经办人签字")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String agentSignId;
@Column
@Comment("经办人签字")
@ColDefine(customType = "longtext")
private String agentSign;
@Column
@Comment("申请时间")
@ColDefine(type = ColType.DATETIME)
private Date applyTime;
@Column
@Comment("被慰问人Id")
@ColDefine(customType = "bigint")
private Long comfortedPersonId;
@Column
@Comment("被慰问人姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonUserName;
@Column
@Comment("被慰问人工号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonLoginName;
@Column
@Comment("被慰问人分工会id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String comfortedPersonUnionId;
@Column
@Comment("被慰问人分工会")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonUnionName;
@Column
@Comment("被慰问人单位id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String comfortedPersonUnitId;
@Column
@Comment("被慰问人单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonUnitName;
@Column
@Comment("被慰问人三级单位id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String comfortedPersonThreeUnitId;
@Column
@Comment("被慰问人三级单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonThreeUnitName;
@Column
@Comment("被慰问人工会小组id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String comfortedPersonUnionGroupId;
@Column
@Comment("被慰问人工会小组")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonUnionGroupName;
@Column
@Comment("被慰问人性别")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String comfortedPersonSex;
@Column
@Comment("被慰问人年龄")
@ColDefine(type = ColType.INT)
private Integer comfortedPersonAge;
@Column
@Comment("被慰问人职称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonJobTitle;
@Column
@Comment("被慰问人职务")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonPosition;
@Column
@Comment("被慰问人职级")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonRankLevel;
@Column
@Comment("被慰问人技术等级")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonTechnologyLevel;
@Column
@Comment("家庭住址")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String comfortedPersonHomeAddress;
@Column
@Comment("家庭月总收入")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String comfortedPersonMonthlyIncome;
@Column
@Comment("配偶是否我校双职工")
@ColDefine(type = ColType.BOOLEAN)
private Boolean spouseTwoEmployees;
@Column
@Comment("配偶id")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String spouseUserId;
@Column
@Comment("配偶姓名")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String spouseUsername;
@Column
@Comment("配偶工号")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String spouseLoginName;
@Column
@Comment("配偶分工会")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String spouseUnionName;
@Column
@Comment("配偶单位")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String spouseUnitName;
@Column
@Comment("孩子姓名")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String childName;
@Column
@Comment("孩子性别")
@ColDefine(type = ColType.VARCHAR,width = 10)
private String childSex;
@Column
@Comment("孩子出生日期")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String childBirth;
@Column
@Comment("孩子户籍所在地")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String childRegisteredResidence;
@Column
@Comment("生育情况")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String fertilitySituation;
@Column
@Comment("慰问类型")
@ColDefine(type = ColType.INT)
private Integer type;
@Column
@Comment("申请理由")
@ColDefine(type = ColType.VARCHAR, width = 500)
private String applyReason;
@Column
@Comment("附件")
@ColDefine(type = ColType.MYSQL_JSON)
private List<SysFile> files;
@Column
@Comment("状态id")
@ColDefine(type = ColType.INT, width = 8)
private Integer stateId;
@Column
@Comment("工会小组审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionGroupAuditId;
@Column
@Comment("分工会审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String branchUnionAuditId;
@Column
@Comment("校工会会计审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String schoolUnionAccountingAuditId;
@Column
@Comment("校工会审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String schoolUnionAuditId;
@One(field = "unionGroupAuditId")
private CondolenceAudit unionGroupAudit;
@One(field = "branchUnionAuditId")
private CondolenceAudit branchUnionAudit;
@One(field = "schoolUnionAccountingAuditId")
private CondolenceAudit schoolUnionAccountingAudit;
@One(field = "schoolUnionAuditId")
private CondolenceAudit schoolUnionAudit;
@One(field = "type")
private CondolenceType condolenceType;
}
@@ -0,0 +1,33 @@
package com.ruoyi.staffService.api.domain.condolence;
import com.ruoyi.staffService.api.domain.common.Audit;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
@EqualsAndHashCode(callSuper = true)
@Table("condolence_audit")
@Data
public class CondolenceAudit extends Audit {
/**
* @see com.ruoyi.staffService.api.constant.condolence.CondolenceAuditType
*/
@Column
@Comment("类型")
@ColDefine(type = ColType.INT)
private Integer auditType;
/**
* 见字典表
*/
@Column
@Comment("审核结果")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String auditResult;
@Column
@Comment("慰问id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String condolenceId;
}
@@ -0,0 +1,44 @@
package com.ruoyi.staffService.api.domain.condolence;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
/**
* 慰问类型
*
* @author jug
* @date 2023/02/01
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Table("condolence_type")
public class CondolenceType extends BaseEntity {
@Id
@Comment("ID")
@ColDefine(type = ColType.INT)
private Integer id;
@Column
@Comment("编码")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String typeCode;
@Column
@Comment("名称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String typeName;
@Column
@Comment("费用")
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
private Double money;
@Column
@Comment("慰问方式")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String way;
}
@@ -0,0 +1,166 @@
package com.ruoyi.staffService.api.domain.difficulty;
import com.ruoyi.common.core.domain.SysFile;
import lombok.Data;
import org.nutz.dao.DB;
import org.nutz.dao.entity.annotation.*;
import java.io.Serializable;
import java.util.List;
/**
* @Author JyuHsin
* @Date 2023/2/10
* @Description
*/
@Data
@Table("zgfw_knbf")
public class Difficulty implements Serializable {
private static final long serialVersionUID = 1L;
@Column
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@Column
@Comment("申请时间")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String applyTime;
@Column
@Comment("申请模式")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String applyMode;
@Column
@Comment("申请人id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private Long applyUserId;
@Column
@Comment("受补助人id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String helpUserId;
@Column
@Comment("身份证")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String idCard;
@Column
@Comment("民族")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String nation;
@Column
@Comment("政治面貌")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String political;
@Column
@Comment("生日")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String birthday;
@Column
@Comment("性别")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String sex;
@Column
@Comment("职称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String jobTitle;
@Column
@Comment("职务")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String position;
@Column
@Comment("参加工作时间")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String joinWorkTime;
@Column
@Comment("联系方式")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String mobile;
@Column
@Comment("所在医院")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String hospital;
@Column
@Comment("住院时间")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String hospitalizedTime;
@Column
@Comment("申请理由")
@ColDefine(type = ColType.VARCHAR, width = 500)
private String applyReason;
@Column
@Comment("补助类型")
@ColDefine(type = ColType.VARCHAR, width = 4)
private String helpType;
@Column
@Comment("困难类型")
@ColDefine(type = ColType.VARCHAR, width = 4)
private String difficultType;
@Column
@Comment("附件")
@ColDefine(type = ColType.MYSQL_JSON)
private List<SysFile> files;
@Column
@Comment("申请人签字 对应id")
@ColDefine(customType = "longtext")
private String applySign;
@Column
@Comment("工会小组审核 id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionGroupAuditId;
@Column
@Comment("分工会审核 id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionAuditId;
@Column
@Comment("校工会审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String schoolAuditId;
@Column
@Comment("级别")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String level;
@Column
@Comment("补助金额")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String helpMoney;
@Column
@Comment("状态")
@ColDefine(type = ColType.INT, width = 4)
private Integer state;
@Column
@Comment("单据号")
@Prev({
@SQL(db = DB.MYSQL, value = "SELECT CONCAT(YEAR(NOW()),LPAD(RIGHT((SELECT IFNULL(MAX(documentNo),0) from zgfw_knbf WHERE LEFT(documentNo,4) = YEAR(NOW())),5)+1, 5, 0) )"),
})
private Integer documentNo;
}
@@ -0,0 +1,90 @@
package com.ruoyi.staffService.api.domain.manuscript;
import com.ruoyi.common.core.domain.SysFile;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import java.io.Serializable;
import java.util.List;
/**
* @author zhf
* @date 2021/12/14 10:42
* @description 新闻投稿
*/
@Data
@Table
public class Manuscript extends BaseEntity implements Serializable {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@Column
@Comment("上传人")
@ColDefine(type = ColType.VARCHAR, width = 32)
private Long userId;
@Column
@Comment("稿件名称")
@ColDefine(type = ColType.VARCHAR, width = 200)
private String manuscriptName;
@Column
@Comment("稿件类型编号")
@ColDefine(type = ColType.VARCHAR, width = 200)
private String manuscriptCode;
@Column
@Comment("活动类型(1-协会协会、2-分工会,3校工会)")
@ColDefine(type = ColType.INT, width = 10)
private Integer type;
@Column
@Comment("备注")
@ColDefine(type = ColType.TEXT)
private String remark;
@Column
@Comment("创建人所属工会")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@Column
@Comment("创建人所属协会")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String clubId;
@Column
@Comment("状态")
@ColDefine(type = ColType.INT, width = 5)
private int stateId;
@Column
@Comment("创建时间")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String applyTime;
@Column
@Comment("附件")
@ColDefine(type = ColType.MYSQL_JSON)
private List<SysFile> files;
@Column
@Comment("分工会审核记录id")
@ColDefine(type = ColType.MYSQL_JSON)
private List<String> union_audit;
@Column
@Comment("校工会审核记录id")
@ColDefine(type = ColType.MYSQL_JSON)
private List<String> school_union_audit;
}
@@ -0,0 +1,31 @@
package com.ruoyi.staffService.api.domain.manuscript;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
/**
* @author zhf
* @date 2021/12/14 10:57
* @description
*/
@Data
@Table
public class ManuscriptType {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@Prev(els = {@EL("uuid()")})
private String id;
@Column
@Comment("稿件类型名称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String manuscriptTypeName;
@Column
@Comment("稿件类型编号")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String manuscriptTypeCode;
}
@@ -0,0 +1,20 @@
package com.ruoyi.staffService.api.domain.welfare;
import lombok.Data;
import java.util.List;
/**
* @ClassName MobileWelfareForm
* @Description TODO
* @Author zhf
* @Date 2023/3/6 17:02
*/
@Data
public class MobileWelfareForm {
List<WelfareProjectSubject> answers;
String projectId;
String receiveAddress;
String userSign;
}
@@ -0,0 +1,113 @@
package com.ruoyi.staffService.api.domain.welfare;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* 福利名单
*/
@Table("welfare_list")
//@TableIndexes({
// @Index(name = "INDEX_WELFARE_LIST_USER_ID", fields = {"userId"}, unique = false),
// @Index(name = "INDEX_WELFARE_LIST_WELFARE_UNIT_ID", fields = {"welfareUnitId"}, unique = false),
//})
@Data
@Accessors(chain = true)
public class WelfareList {
@Name
@Column
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("福利项目ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String projectId;
@Column
@Comment("用户ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("工号")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String loginName;
@Column
@Comment("姓名")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String userName;
@Column
@Comment("性别")
@ColDefine(type = ColType.VARCHAR, width = 2)
private String sex;
@Column
@Comment("人员类型")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String personType;
@Column
@Comment("在职状态")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String userState;
@Column
@Comment("手机号")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String mobile;
@Column
@Comment("分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@Column
@Comment("分工会")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unitId;
@Column
@Comment("单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unitName;
@Column
@Comment("三级单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String threeUnitId;
@Column
@Comment("三级单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String threeUnitName;
@Column
@Comment("工会小组ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionGroupId;
@Column
@Comment("工会小组")
@ColDefine(type = ColType.VARCHAR, width = 200)
private String unionGroupName;
@Column
@Comment("积分余额")
@ColDefine(type = ColType.INT)
private Integer pointsBalance;
}
@@ -0,0 +1,72 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* @author zxy
* @Description 福利会员地址信息
* @createTime 2022年01月14日 09:49:00
*/
@Table("welfare_member_address")
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class WelfareMemberAddress extends BaseEntity {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("用户ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("收货人姓名")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String userName;
@Column
@Comment("收货人手机号")
@ColDefine(type = ColType.VARCHAR, width = 11)
private String tel;
@Column
@Comment("省份")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String province;
@Column
@Comment("城市")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String city;
@Column
@Comment("区县")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String county;
@Column
@Comment("详细地址")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String addressDetail;
@Column
@Comment("地区编码")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String areaCode;
@Column
@Comment("是否为默认地址")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isDefault;
}
@@ -0,0 +1,55 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.ruoyi.staffService.api.domain.common.Audit;
import com.ruoyi.staffService.api.domain.common.AuditState;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
/**
* 福利会员申请记录
*
* @author: 1V
* @date: 2021/2/28
* @since 1.0
*/
@Data
@Accessors(chain = true)
@Table("welfare_member_apply_record")
public class WelfareMemberApplyRecord {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("用户id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("状态id")
@ColDefine(type = ColType.INT, width = 8)
private Integer stateId;
@Column
@Comment("申请时间")
private Date applyTime;
@Column
@Comment("校工会审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
public String schoolAuditId;
@One(field = "schoolAuditId")
public Audit schoolAudit;
@One(field = "stateId")
private AuditState auditState;
}
@@ -0,0 +1,139 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.ruoyi.common.core.web.domain.BaseEntity;
import com.ruoyi.staffService.api.domain.common.Audit;
import com.ruoyi.staffService.api.domain.common.AuditState;
import com.ruoyi.system.api.domain.SysDept;
import com.ruoyi.system.api.domain.SysUnion;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Table("welfare_member_change_record")
public class WelfareMemberChangeRecord extends BaseEntity {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("变更类型")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String type;
@Column
@Comment("用户id")
@ColDefine(customType = "bigint")
private Long userId;
@Column
@Comment("原单位id")
@ColDefine(customType = "bigint")
private Long originUnitId;
@Column
@Comment("原工会id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String originUnionId;
@Column
@Comment("原三级单位id")
@ColDefine(customType = "bigint")
private Long originThreeUnitId;
@Column
@Comment("现单位id")
@ColDefine(customType = "bigint")
private Long currentUnitId;
@Column
@Comment("现三级单位id")
@ColDefine(customType = "bigint")
private Long currentThreeUnitId;
@Column
@Comment("现工会id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String currentUnionId;
@Column
@Comment("备注")
@ColDefine(type = ColType.VARCHAR, width = 500)
private String notes;
@Column
@Comment("申请时间")
@ColDefine(type = ColType.DATETIME)
private Date applyTime;
@Column
@Comment("申请来源")
@ColDefine(type = ColType.INT, width = 8)
private Integer applyOrigin;
@Column
@Comment("状态id")
@ColDefine(type = ColType.INT, width = 8)
private Integer stateId;
@Column
@Comment("分工会审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionAuditId;
@Column
@Comment("校工会审核记录id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String schoolAuditId;
@Column
@Comment("是否更新福利会员")
@ColDefine(type = ColType.BOOLEAN)
private Boolean updateWelfareMember;
@Column
@Comment("任务id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String taskId;
@One(field = "unionAuditId")
private Audit unionAudit;
@One(field = "schoolAuditId")
private Audit schoolAudit;
@One(field = "stateId")
private AuditState auditState;
private SysDept originThreeUnit;
// @One(field = "originUnitId")
private SysDept originUnit;
// @One(field = "originUnionId")
private SysUnion originUnion;
private SysDept currentThreeUnit;
// @One(field = "currentUnitId")
private SysDept currentUnit;
// @One(field = "currentUnionId")
private SysUnion currentUnion;
private String loginName;
private String userName;
}
@@ -0,0 +1,59 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
/**
* 福利成员检查任务
*
* @author jug
* @date 2023/02/12
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Table("welfare_member_check_task")
public class WelfareMemberCheckTask extends BaseEntity {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("任务名称")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String taskName;
@Column
@Comment("年度")
@ColDefine(type = ColType.INT)
private Integer year;
@Column
@Comment("说明")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String description;
@Column
@Comment("开始时间")
@ColDefine(type = ColType.DATETIME)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime;
@Column
@Comment("结束时间")
@ColDefine(type = ColType.DATETIME)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime;
}
@@ -0,0 +1,59 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* 福利检查联盟成员任务
*
* @author jug
* @date 2023/02/12
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Table("welfare_member_check_union_task")
public class WelfareMemberCheckUnionTask extends BaseEntity {
@Column
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("任务ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String taskId;
@Column
@Comment("工会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@Column
@Comment("工会名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("工会编码")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionCode;
@Column
@Comment("工会小组ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionGroupId;
@Column
@Comment("是否核对完成")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isFinish;
}
@@ -0,0 +1,57 @@
package com.ruoyi.staffService.api.domain.welfare;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* 福利会员商超卡
*
* @author jug
* @date 2023/05/29
*/
@Table("welfare_member_supermarket")
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class WelfareMemberSupermarket extends BaseEntity {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("用户ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("福利项目id")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String welfareId;
@Column
@Comment("卡号")
@ColDefine(type = ColType.VARCHAR, width = 50)
@Excel(name = "卡号", width = 20)
private String cardNo;
@Column
@Comment("卡密码")
@ColDefine(type = ColType.VARCHAR, width = 50)
@Excel(name = "密码", width = 20)
private String cardPassWord;
@Column
@Comment("是否领取")
@ColDefine(type = ColType.BOOLEAN)
private Boolean receive;
}
@@ -0,0 +1,175 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.ruoyi.common.core.web.domain.BaseEntity;
import com.ruoyi.staffService.api.constant.welfare.Gift;
import com.ruoyi.staffService.api.domain.common.MatchConditionStructure;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Table("welfare_project")
public class WelfareProject extends BaseEntity {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("年度")
@ColDefine(type = ColType.INT, width = 4)
@PrevInsert(els = {@EL("$me.nowYear()")})
private Integer year;
@Column
@Comment("项目名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String name;
@Column
@Comment("节日")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String festival;
@Column
@Comment("发放开始时间")
@ColDefine(type = ColType.DATETIME)
private Date provideTimeStart;
@Column
@Comment("发放结束时间")
@ColDefine(type = ColType.DATETIME)
private Date provideTimeEnd;
@Column
@Comment("选择开始时间")
@ColDefine(type = ColType.DATETIME)
private Date choiceTimeStart;
@Column
@Comment("选择结束时间")
@ColDefine(type = ColType.DATETIME)
private Date choiceTimeEnd;
@Column
@Comment("逾期选择时间")
@ColDefine(type = ColType.DATETIME)
private Date overdueChoiceTimeEnd;
@Column
@Comment("发放地址")
@ColDefine(type = ColType.VARCHAR, width = 200)
private String provideAddress;
@Column
@Comment("发放地址坐标")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String provideCoordinate;
/**
* @see com.ruoyi.staffService.api.constant.welfare.WelfareProvideMode
*/
@Column
@Comment("发放形式")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String provideMode;
/**
* @see com.ruoyi.staffService.api.constant.welfare.WelfareSignMode
*/
@Column
@Comment("签收形式")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String signMode;
/**
* @see com.ruoyi.staffService.api.constant.welfare.WelfareNoticePushMode
*/
@Column
@Comment("通知推送形式")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String noticePushMode;
// @Column
// @Comment("是否生日福利")
// @ColDefine(type = ColType.BOOLEAN)
// private Boolean birthdayWelfare;
@Column
@Comment("是否弹性福利")
@ColDefine(type = ColType.BOOLEAN)
private Boolean flexible;
@Column
@Comment("是否多选")
@ColDefine(type = ColType.BOOLEAN)
private Boolean multiSelect;
@Column
@Comment("最多选几个")
@ColDefine(type = ColType.INT)
private Integer multiSelectNum;
@Column
@Comment("是否支持单个多选")
@ColDefine(type = ColType.BOOLEAN)
private Boolean singleOptionSupportMultipleSelection;
@Column
@Comment("主福利礼品")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String gift;
@Column
@Comment("弹性礼品")
@ColDefine(type = ColType.MYSQL_JSON)
private List<Gift> flexibleGifts;
@Column
@Comment("条件")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String conditionStructureId;
@One(field = "conditionStructureId")
private MatchConditionStructure conditionStructure;
@Many(field = "projectId")
private List<WelfareProjectSubject> welfareProjectSubjects;
@Column
@Comment("题目ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String subjectId;
@Column
@Comment("封面")
@ColDefine(type = ColType.VARCHAR, width = 200)
private String cover;
@Column
@Comment("介绍")
@ColDefine(customType = "longtext")
private String description;
@Column
@Comment("介绍")
@ColDefine(customType = "longtext")
private String salveDescription;
private String userSign;
@Column
@Comment("发放积分")
@ColDefine(type = ColType.INT)
private Integer grantPoints;
}
@@ -0,0 +1,50 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.List;
/**
* 福利项目题目
*
* @author jug
* @date 2023/02/08
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Table("welfare_project_subject")
public class WelfareProjectSubject extends BaseEntity {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("所属福利")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String projectId;
@Column
@Comment("题目名称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String subjectName;
@Column
@Comment("题目类型")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String subjectType;
@Many(field = "subjectId")
private List<WelfareProjectSubjectOption> options;
private List<String> selection;
}
@@ -0,0 +1,97 @@
package com.ruoyi.staffService.api.domain.welfare;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* 福利项目题目选项
*
* @author jug
* @date 2023/02/08
*/
@Data
@Accessors(chain = true)
@Table("welfare_project_subject_option")
public class WelfareProjectSubjectOption {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("所属题目")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String subjectId;
@Column
@Comment("选项名称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String optionName;
@Column
@Comment("福利选项类型,保存系统字典 welfare_option_type 的字典值")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String optionType;
@Column
@Comment("选项排序")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String optionSort;
@Column
@Comment("没选系统自动选")
@ColDefine(type = ColType.BOOLEAN)
private Boolean systemAutoSelect;
@Column
@Comment("是否默认选项")
@ColDefine(type = ColType.BOOLEAN)
private Boolean defaultOption;
@Column
@Comment("图片地址")
@ColDefine(type = ColType.VARCHAR, width = 255)
private String imgUrl;
@Column
@Comment("二维码图片地址")
@ColDefine(type = ColType.VARCHAR, width = 255)
private String qrCodeUrl;
@Column
@Comment("说明描述")
@ColDefine(customType = "longtext")
private String description;
@Column
@Comment("是否指定配送时间")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isDeliveryTime;
@Column
@Comment("是否邮寄")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isPost;
@Column
@Comment("可选省份")
@ColDefine(type = ColType.VARCHAR,width = 20)
private String selectProvince;
@Column
@Comment("可选市")
@ColDefine(type = ColType.VARCHAR,width = 20)
private String selectMunicipality;
@Column
@Comment("积分")
@ColDefine(type = ColType.INT)
private Integer price;
}
@@ -0,0 +1,53 @@
package com.ruoyi.staffService.api.domain.welfare;
import lombok.Data;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* 福利单位
*
* @author jug
* @date 2023/02/08
*/
@Data
@Accessors(chain = true)
@Table("welfare_unit")
public class WelfareUnit {
@Name
@Column
@Comment("福利单位id")
@ColDefine(type = ColType.VARCHAR, width = 100)
@PrevInsert(uu32 = true)
private String welfareUnitId;
@Column
@Comment("福利单位名称")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String welfareUnitName;
@Column
@Comment("福利单位编码")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String welfareUnitCode;
@Column
@Comment("负责人信息")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String leaderPhone;
@Column
@Comment("地址")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String welfareUnitAddress;
/**
* @see com.ruoyi.staffService.api.constant.welfare.WelfareUnitMode
*/
@Column
@Comment("福利单位模式")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String welfareUnitMode;
}
@@ -0,0 +1,107 @@
package com.ruoyi.staffService.api.domain.welfare;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.Date;
/**
* 福利用户选择
*
* @author jug
* @date 2023/02/08
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Table("welfare_project_user_selection")
public class WelfareUserSelection extends BaseEntity {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("所属福利")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String welfareId;
@Column
@Comment("所属题目")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String subjectId;
@Column
@Comment("选择项")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String selectOptionId;
@Column
@Comment("选择用户")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String selectUserId;
@Column
@Comment("选择时间")
@ColDefine(type = ColType.DATETIME)
private Date selectTime;
@Column
@Comment("收货地址")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String receiveAddress;
@Column
@Comment("用户签字")
@ColDefine(customType = "longtext")
private String userSign;
@Column
@Comment("快递单号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String courierNumber;
@Column
@Comment("是否签收")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isReceive;
@Column
@Comment("选择数量")
@ColDefine(type = ColType.INT)
private Integer selectNum;
@Column
@Comment("手机号码")
@ColDefine(type = ColType.VARCHAR, width = 11)
private String mobile;
@Column
@Comment("备用手机号码")
@ColDefine(type = ColType.VARCHAR, width = 11)
private String backUpMobile;
@Column
@Comment("派送时间")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String deliveryTime;
@Column
@Comment("套餐账号")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String account;
@Column
@Comment("套餐密码")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String password;
}
@@ -0,0 +1,43 @@
package com.ruoyi.staffService.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.staffService.api.RemoteBirthdayWishesService;
import com.ruoyi.staffService.api.domain.birthdayWishes.BirthdayParamsConfig;
import com.ruoyi.staffService.api.domain.birthdayWishes.BirthdaySendRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @ClassName RemoteBirthdayWishesFallbackFactory
* @Author JyuHsin
* @Date 2025/4/9 16:47
* @Version 1.0
* @Description TODO
*/
@Component
public class RemoteBirthdayWishesFallbackFactory implements FallbackFactory<RemoteBirthdayWishesService> {
private static final Logger log = LoggerFactory.getLogger(RemoteBirthdayWishesFallbackFactory.class);
@Override
public RemoteBirthdayWishesService create(Throwable throwable) {
log.error("生日祝福调用失败:{}", throwable.getMessage());
return new RemoteBirthdayWishesService() {
@Override
public R<Boolean> insertSendRecord(List<BirthdaySendRecord> records, String source) {
log.error(throwable.getMessage());
return R.fail("生日祝福调用失败:" + throwable.getMessage());
}
@Override
public R<BirthdayParamsConfig> findOne() {
log.error(throwable.getMessage());
return R.fail("生日祝福调用失败:" + throwable.getMessage());
}
};
}
}
@@ -0,0 +1,42 @@
package com.ruoyi.staffService.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.staffService.api.RemoteWelfareService;
import com.ruoyi.staffService.api.domain.welfare.WelfareList;
import com.ruoyi.staffService.api.domain.welfare.WelfareProject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @version 1.0
* @Author zzr
* @nameRemoteWelfareFallbackFactory
* @Date 2024/8/30 16:11
* @注释
*/
@Component
public class RemoteWelfareFallbackFactory implements FallbackFactory<RemoteWelfareService> {
private static final Logger log = LoggerFactory.getLogger(RemoteWelfareFallbackFactory.class);
@Override
public RemoteWelfareService create(Throwable throwable) {
log.error("职工服务调用失败:{}", throwable.getMessage());
return new RemoteWelfareService() {
@Override
public R<List<WelfareProject>> listAfootWelfare(Long userId) {
log.error(throwable.getMessage());
return R.fail("获取福利项目关联失败:" + throwable.getMessage());
}
@Override
public R<Boolean> insertWelfareList(List<WelfareList> welfareList) {
log.error(throwable.getMessage());
return R.fail("新增福利名单关联失败:" + throwable.getMessage());
}
};
}
}
@@ -0,0 +1 @@
com.ruoyi.staffService.api.factory.RemoteBirthdayWishesFallbackFactory