Commit c601fd7f authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.7.3-wxgz' into MVP-1.7.3-shuiyou

parents c7523699 1f4989cc
......@@ -241,6 +241,7 @@ public class YifuTokenEndpoint {
if (null != userInfo && null != userInfo.getOpenid()) {
SysUser user = new SysUser();
user.setWxOpenid(userInfo.getOpenid());
user.setWxNickName(userInfo.getNickname());
R<UserInfo> result = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
, "/user/inner/getSysUserByWxOpenId", user, UserInfo.class, SecurityConstants.FROM_IN);
OAuth2AccessToken oAuth2AccessToken = null;
......
......@@ -154,6 +154,10 @@ public interface CacheConstants {
String PAYMENT_DISPATCH_BATCH_ADD_IMPORT = "payment_dispatch_batch_add_import";
String MOBILE_CHANGE_LIMIT = "mobile_change_limit";
String QUESTION_FEEDBACK_LIMIT = "question_feedback_limit";
String PAYMENT_SEARCH_REPEAT = "payment_search_repeat";
String PAYMENT_EXPORT_REPEAT = "payment_export_repeat";
......
......@@ -98,6 +98,10 @@ public class R<T> implements Serializable {
public static <T> R<T> other(int code, String msg) {
return restResult(null, code, msg);
}
public static <T> R<T> other(int code, String msg,T data) {
return restResult(data, code, msg);
}
public static <T> R<T> other(T data, String msg, int code) {
return restResult(data, code, msg);
}
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
* @author fxj
* @date 2024-12-18 15:39:56
*/
@Data
@TableName("t_mobile_change_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "")
public class TMobileChangeInfo extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 申请人姓名
*/
@ExcelAttribute(name = "申请人姓名", isNotEmpty = true, errorInfo = "申请人姓名不能为空", maxLength = 59)
@NotBlank(message = "申请人姓名不能为空")
@Length(max = 59, message = "申请人姓名不能超过59个字符")
@ExcelProperty("申请人姓名")
@Schema(description = "申请人姓名")
private String applyName;
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号不能为空", maxLength = 20)
@NotBlank(message = "身份证号不能为空")
@Length(max = 20, message = "身份证号不能超过20个字符")
@ExcelProperty("身份证号")
@Schema(description = "身份证号")
private String empIdcard;
/**
* 原号码
*/
@ExcelAttribute(name = "原号码", maxLength = 15)
@Length(max = 15, message = "原号码不能超过15个字符")
@ExcelProperty("原号码")
@Schema(description = "原号码")
private String mobileOld;
/**
* 新号码
*/
@ExcelAttribute(name = "新号码", maxLength = 15)
@Length(max = 15, message = "新号码不能超过15个字符")
@ExcelProperty("新号码")
@Schema(description = "新号码")
private String mobileNew;
/**
* 处理状态:待处理、处理中、已处理、手动更新
*/
@ExcelAttribute(name = "处理状态:待处理、处理中、已处理、手动更新", maxLength = 10)
@Length(max = 10, message = "处理状态:待处理、处理中、已处理、手动更新不能超过10个字符")
@ExcelProperty("处理状态:待处理、处理中、已处理、手动更新")
@Schema(description = "处理状态:待处理、处理中、已处理、手动更新")
private String handleStatus;
/**
* 处理人
*/
@ExcelAttribute(name = "处理人", maxLength = 20)
@Length(max = 20, message = "处理人不能超过20个字符")
@ExcelProperty("处理人")
@Schema(description = "处理人")
private String handleOperator;
/**
* 处理完成时间
*/
@ExcelAttribute(name = "处理完成时间", isDate = true)
@ExcelProperty("处理完成时间")
@Schema(description = "处理完成时间")
private Date handleFinishTime;
/**
* 处理说明
*/
@ExcelAttribute(name = "处理说明", maxLength = 200)
@Length(max = 200, message = "处理说明不能超过200个字符")
@ExcelProperty("处理说明")
@Schema(description = "处理说明")
private String handleRemark;
/**
* 验证码
*/
@TableField(exist = false)
private String sendCode;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
* @author fxj
* @date 2024-12-18 15:39:57
*/
@Data
@TableName("t_question_feedback_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "")
public class TQuestionFeedbackInfo extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 反馈人姓名
*/
@ExcelAttribute(name = "反馈人姓名", isNotEmpty = true, errorInfo = "反馈人姓名不能为空", maxLength = 20)
@NotBlank(message = "反馈人姓名不能为空")
@Length(max = 20, message = "反馈人姓名不能超过20个字符")
@ExcelProperty("反馈人姓名")
@Schema(description = "反馈人姓名")
private String name;
/**
* 手机号码
*/
@ExcelAttribute(name = "手机号码",isPhone = true, isNotEmpty = true, errorInfo = "手机号码不能为空", maxLength = 20)
@NotBlank(message = "手机号码不能为空")
@Length(max = 20, message = "手机号码不能超过20个字符")
@ExcelProperty("手机号码")
@Schema(description = "手机号码")
private String mobile;
/**
* 你遇到的问题
*/
@ExcelAttribute(name = "你遇到的问题", maxLength = 200)
@Length(max = 200, message = "你遇到的问题不能超过200个字符")
@ExcelProperty("你遇到的问题")
@Schema(description = "你遇到的问题")
private String question;
/**
* 处理状态:0待处理、1处理中、2已处理、3手动更新
*/
@ExcelAttribute(name = "处理状态:待处理、处理中、已处理、手动更新", maxLength = 10)
@Length(max = 10, message = "处理状态:待处理、处理中、已处理、手动更新不能超过10个字符")
@ExcelProperty("处理状态:待处理、处理中、已处理、手动更新")
@Schema(description = "处理状态:待处理、处理中、已处理、手动更新")
private String handleStatus;
/**
* 处理人
*/
@ExcelAttribute(name = "处理人", maxLength = 20)
@Length(max = 20, message = "处理人不能超过20个字符")
@ExcelProperty("处理人")
@Schema(description = "处理人")
private String handleOperator;
/**
* 处理完成时间
*/
@ExcelAttribute(name = "处理完成时间", isDate = true)
@ExcelProperty("处理完成时间")
@Schema(description = "处理完成时间")
private Date handleFinishTime;
/**
* 处理说明
*/
@ExcelAttribute(name = "处理说明", maxLength = 200)
@Length(max = 200, message = "处理说明不能超过200个字符")
@ExcelProperty("处理说明")
@Schema(description = "处理说明")
private String handleRemark;
/**
* @Author fxj
* @Description 问题反馈附件ID
* @Date 16:49 2024/12/18
* @Param
* @return
**/
@TableField(exist = false)
private String attaIds;
}
......@@ -105,7 +105,7 @@ public class TSalaryAtta extends BaseEntity {
/**
* 类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件
* ;9财务回执附件;10换人换卡;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000)
* 14:薪资详情导出组装的附件
* 14:薪资详情导出组装的附件 15:工资查询问题反馈附件
*/
@ExcelAttribute(name = "类型")
@HeadFontStyle(fontHeightInPoints = 11)
......
......@@ -212,4 +212,8 @@ public class TSalaryEmployee extends BaseEntity {
@TableField(exist = false)
private String salaryGiveTime;
// 工资查询用户保存专用
@TableField(exist = false)
private String nickName;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMobileChangeInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @author fxj
* @date 2024-12-18 15:39:56
*/
@Data
public class TMobileChangeInfoSearchVo extends TMobileChangeInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* @author fxj
* @date 2024-12-18 15:39:56
*/
@Data
public class TMobileChangeInfoVo extends RowIndex implements Serializable {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "id 不能为空")
@Length(max = 32, message = "id 不能超过32 个字符")
@ExcelAttribute(name = "id", isNotEmpty = true, errorInfo = "id 不能为空", maxLength = 32)
@Schema(description = "id")
@ExcelProperty("id")
private String id;
/**
* 申请人姓名
*/
@NotBlank(message = "申请人姓名 不能为空")
@Length(max = 59, message = "申请人姓名 不能超过59 个字符")
@ExcelAttribute(name = "申请人姓名", isNotEmpty = true, errorInfo = "申请人姓名 不能为空", maxLength = 59)
@Schema(description = "申请人姓名")
@ExcelProperty("申请人姓名")
private String applyName;
/**
* 身份证号
*/
@NotBlank(message = "身份证号 不能为空")
@Length(max = 20, message = "身份证号 不能超过20 个字符")
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号 不能为空", maxLength = 20)
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 原号码
*/
@Length(max = 15, message = "原号码 不能超过15 个字符")
@ExcelAttribute(name = "原号码", maxLength = 15)
@Schema(description = "原号码")
@ExcelProperty("原号码")
private String mobileOld;
/**
* 新号码
*/
@Length(max = 15, message = "新号码 不能超过15 个字符")
@ExcelAttribute(name = "新号码", maxLength = 15)
@Schema(description = "新号码")
@ExcelProperty("新号码")
private String mobileNew;
/**
* 处理状态:待处理、处理中、已处理、手动更新
*/
@Length(max = 10, message = "处理状态:待处理、处理中、已处理、手动更新 不能超过10 个字符")
@ExcelAttribute(name = "处理状态:待处理、处理中、已处理、手动更新", maxLength = 10)
@Schema(description = "处理状态:待处理、处理中、已处理、手动更新")
@ExcelProperty("处理状态:待处理、处理中、已处理、手动更新")
private String handleStatus;
/**
* 处理人
*/
@Length(max = 20, message = "处理人 不能超过20 个字符")
@ExcelAttribute(name = "处理人", maxLength = 20)
@Schema(description = "处理人")
@ExcelProperty("处理人")
private String handleOperator;
/**
* 处理完成时间
*/
@ExcelAttribute(name = "处理完成时间", isDate = true)
@Schema(description = "处理完成时间")
@ExcelProperty("处理完成时间")
private Date handleFinishTime;
/**
* 处理说明
*/
@Length(max = 200, message = "处理说明 不能超过200 个字符")
@ExcelAttribute(name = "处理说明", maxLength = 200)
@Schema(description = "处理说明")
@ExcelProperty("处理说明")
private String handleRemark;
/**
* 创建人id
*/
@Length(max = 64, message = "创建人id 不能超过64 个字符")
@ExcelAttribute(name = "创建人id", maxLength = 64)
@Schema(description = "创建人id")
@ExcelProperty("创建人id")
private String createBy;
/**
* 创建人姓名
*/
@Length(max = 64, message = "创建人姓名 不能超过64 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 64)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private Date createTime;
/**
* 更新人id
*/
@Length(max = 32, message = "更新人id 不能超过32 个字符")
@ExcelAttribute(name = "更新人id", maxLength = 32)
@Schema(description = "更新人id")
@ExcelProperty("更新人id")
private String updateBy;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private Date updateTime;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TQuestionFeedbackInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @author fxj
* @date 2024-12-18 15:39:57
*/
@Data
public class TQuestionFeedbackInfoSearchVo extends TQuestionFeedbackInfo {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* @author fxj
* @date 2024-12-18 15:39:57
*/
@Data
public class TQuestionFeedbackInfoVo extends RowIndex implements Serializable {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@NotBlank(message = "id 不能为空")
@Length(max = 32, message = "id 不能超过32 个字符")
@ExcelAttribute(name = "id", isNotEmpty = true, errorInfo = "id 不能为空", maxLength = 32)
@Schema(description = "id")
@ExcelProperty("id")
private String id;
/**
* 反馈人姓名
*/
@NotBlank(message = "反馈人姓名 不能为空")
@Length(max = 20, message = "反馈人姓名 不能超过20 个字符")
@ExcelAttribute(name = "反馈人姓名", isNotEmpty = true, errorInfo = "反馈人姓名 不能为空", maxLength = 20)
@Schema(description = "反馈人姓名")
@ExcelProperty("反馈人姓名")
private String name;
/**
* 手机号码
*/
@NotBlank(message = "手机号码 不能为空")
@Length(max = 20, message = "手机号码 不能超过20 个字符")
@ExcelAttribute(name = "手机号码", isNotEmpty = true, errorInfo = "手机号码 不能为空", maxLength = 20)
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String mobile;
/**
* 你遇到的问题
*/
@Length(max = 200, message = "你遇到的问题 不能超过200 个字符")
@ExcelAttribute(name = "你遇到的问题", maxLength = 200)
@Schema(description = "你遇到的问题")
@ExcelProperty("你遇到的问题")
private String question;
/**
* 处理状态:待处理、处理中、已处理、手动更新
*/
@Length(max = 10, message = "处理状态:待处理、处理中、已处理、手动更新 不能超过10 个字符")
@ExcelAttribute(name = "处理状态:待处理、处理中、已处理、手动更新", maxLength = 10)
@Schema(description = "处理状态:待处理、处理中、已处理、手动更新")
@ExcelProperty("处理状态:待处理、处理中、已处理、手动更新")
private String handleStatus;
/**
* 处理人
*/
@Length(max = 20, message = "处理人 不能超过20 个字符")
@ExcelAttribute(name = "处理人", maxLength = 20)
@Schema(description = "处理人")
@ExcelProperty("处理人")
private String handleOperator;
/**
* 处理完成时间
*/
@ExcelAttribute(name = "处理完成时间", isDate = true)
@Schema(description = "处理完成时间")
@ExcelProperty("处理完成时间")
private Date handleFinishTime;
/**
* 处理说明
*/
@Length(max = 200, message = "处理说明 不能超过200 个字符")
@ExcelAttribute(name = "处理说明", maxLength = 200)
@Schema(description = "处理说明")
@ExcelProperty("处理说明")
private String handleRemark;
/**
* 创建人id
*/
@Length(max = 64, message = "创建人id 不能超过64 个字符")
@ExcelAttribute(name = "创建人id", maxLength = 64)
@Schema(description = "创建人id")
@ExcelProperty("创建人id")
private String createBy;
/**
* 创建人姓名
*/
@Length(max = 64, message = "创建人姓名 不能超过64 个字符")
@ExcelAttribute(name = "创建人姓名", maxLength = 64)
@Schema(description = "创建人姓名")
@ExcelProperty("创建人姓名")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private Date createTime;
/**
* 更新人id
*/
@Length(max = 32, message = "更新人id 不能超过32 个字符")
@ExcelAttribute(name = "更新人id", maxLength = 32)
@Schema(description = "更新人id")
@ExcelProperty("更新人id")
private String updateBy;
/**
* 更新时间
*/
@ExcelAttribute(name = "更新时间", isDate = true)
@Schema(description = "更新时间")
@ExcelProperty("更新时间")
private Date updateTime;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Description 薪酬人员表--工资查询专用
* @Date 9:30 2024/12/18
* @Param
* @return
**/
@Data
@Schema(description = "薪酬人员表")
public class TSalaryEmployeeWxVo implements Serializable {
// 薪资人员信息
private TSalaryEmployee salaryEmployee;
// 微信昵称
private String wxNickName;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMobileChangeInfo;
import com.yifu.cloud.plus.v1.yifu.salary.service.TMobileChangeInfoService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMobileChangeInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* @author fxj
* @date 2024-12-18 15:39:56
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tmobilechangeinfo")
@Tag(name = "管理")
public class TMobileChangeInfoController {
private final TMobileChangeInfoService tMobileChangeInfoService;
private final RedisUtil redisUtil;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tMobileChangeInfo
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TMobileChangeInfo>> getTMobileChangeInfoPage(Page<TMobileChangeInfo> page, TMobileChangeInfoSearchVo tMobileChangeInfo) {
return new R<>(tMobileChangeInfoService.getTMobileChangeInfoPage(page, tMobileChangeInfo));
}
/**
* 不分页查询
*
* @param tMobileChangeInfo
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage")
//@PreAuthorize("@pms.hasPermission('demo_tmobilechangeinfo_get')" )
public R<List<TMobileChangeInfo>> getTMobileChangeInfoNoPage(@RequestBody TMobileChangeInfoSearchVo tMobileChangeInfo) {
return R.ok(tMobileChangeInfoService.noPageDiy(tMobileChangeInfo));
}
/**
* 通过id查询
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_tmobilechangeinfo_get')")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tmobilechangeinfo_get')")
public R<TMobileChangeInfo> getById(@PathVariable("id") String id) {
return R.ok(tMobileChangeInfoService.getById(id));
}
/**
* 新增
*
* @param tMobileChangeInfo
* @return R
*/
@Operation(summary = "新增", description = "新增")
@SysLog("新增")
@PostMapping("/add")
public R<Boolean> save(@RequestBody TMobileChangeInfo tMobileChangeInfo) {
// 获取redis分布式事务锁
String key = CacheConstants.MOBILE_CHANGE_LIMIT + CommonConstants.DOWN_LINE_STRING + "mobileChangeFlag";
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
//主动释放锁
tMobileChangeInfo.setHandleStatus(CommonConstants.ZERO_STRING);
if (null != redisUtil.get(CommonConstants.C_PREFIX.concat(tMobileChangeInfo.getMobileNew()))) {
String code = (String) redisUtil.get(CommonConstants.C_PREFIX.concat(tMobileChangeInfo.getMobileNew()));
if (!code.equals(tMobileChangeInfo.getSendCode())) {
return R.failed("验证码错误,请核实");
}
} else {
return R.failed("未找到手机号对应的验证码或验证码已超时,请重新获取");
}
return R.ok(tMobileChangeInfoService.save(tMobileChangeInfo));
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
/**
* 修改
*
* @param tMobileChangeInfo
* @return R
*/
@Operation(summary = "修改", description = "修改:hasPermission('demo_tmobilechangeinfo_edit')")
@SysLog("修改")
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_tmobilechangeinfo_edit')")
public R<Boolean> updateById(@RequestBody TMobileChangeInfo tMobileChangeInfo) {
return R.ok(tMobileChangeInfoService.updateById(tMobileChangeInfo));
}
/**
* 通过id删除
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除", description = "通过id删除:hasPermission('demo_tmobilechangeinfo_del')")
@SysLog("通过id删除")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tmobilechangeinfo_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tMobileChangeInfoService.removeById(id));
}
/**
* 批量导入
*
* @author fxj
* @date 2024-12-18 15:39:56
**/
@SneakyThrows
@Operation(description = "批量新增 hasPermission('demo_tmobilechangeinfo-batch-import')")
@SysLog("批量新增")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('demo_tmobilechangeinfo-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tMobileChangeInfoService.importDiy(file.getInputStream());
}
/**
* 批量导出
*
* @author fxj
* @date 2024-12-18 15:39:56
**/
@Operation(description = "导出 hasPermission('demo_tmobilechangeinfo-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('demo_tmobilechangeinfo-export')")
public void export(HttpServletResponse response, @RequestBody TMobileChangeInfoSearchVo searchVo) {
tMobileChangeInfoService.listExport(response, searchVo);
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TQuestionFeedbackInfo;
import com.yifu.cloud.plus.v1.yifu.salary.service.TQuestionFeedbackInfoService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TQuestionFeedbackInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* @author fxj
* @date 2024-12-18 15:39:57
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tquestionfeedbackinfo")
@Tag(name = "管理")
public class TQuestionFeedbackInfoController {
private final TQuestionFeedbackInfoService tQuestionFeedbackInfoService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tQuestionFeedbackInfo
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TQuestionFeedbackInfo>> getTQuestionFeedbackInfoPage(Page<TQuestionFeedbackInfo> page, TQuestionFeedbackInfoSearchVo tQuestionFeedbackInfo) {
return new R<>(tQuestionFeedbackInfoService.getTQuestionFeedbackInfoPage(page, tQuestionFeedbackInfo));
}
/**
* 不分页查询
*
* @param tQuestionFeedbackInfo
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage")
//@PreAuthorize("@pms.hasPermission('demo_tquestionfeedbackinfo_get')" )
public R<List<TQuestionFeedbackInfo>> getTQuestionFeedbackInfoNoPage(@RequestBody TQuestionFeedbackInfoSearchVo tQuestionFeedbackInfo) {
return R.ok(tQuestionFeedbackInfoService.noPageDiy(tQuestionFeedbackInfo));
}
/**
* 通过id查询
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_tquestionfeedbackinfo_get')")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tquestionfeedbackinfo_get')")
public R<TQuestionFeedbackInfo> getById(@PathVariable("id") String id) {
return R.ok(tQuestionFeedbackInfoService.getById(id));
}
/**
* 新增
*
* @param tQuestionFeedbackInfo
* @return R
*/
@Operation(summary = "新增", description = "新增")
@SysLog("新增")
@PostMapping("/add")
public R<Boolean> save(@RequestBody TQuestionFeedbackInfo tQuestionFeedbackInfo) {
String key = CacheConstants.QUESTION_FEEDBACK_LIMIT + CommonConstants.DOWN_LINE_STRING + "questionFeedBackFlag";
String requestId;
try {
requestId = RedisDistributedLock.getLock(key,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) {
if (Common.isNotNull(tQuestionFeedbackInfo.getQuestion()) && tQuestionFeedbackInfo.getQuestion().length() > 200){
return R.failed("你遇到的问题请控制在200字以内!");
}
return tQuestionFeedbackInfoService.saveAsso(tQuestionFeedbackInfo);
} else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
}
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}
/**
* 修改
*
* @param tQuestionFeedbackInfo
* @return R
*/
@Operation(summary = "修改", description = "修改:hasPermission('demo_tquestionfeedbackinfo_edit')")
@SysLog("修改")
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_tquestionfeedbackinfo_edit')")
public R<Boolean> updateById(@RequestBody TQuestionFeedbackInfo tQuestionFeedbackInfo) {
return R.ok(tQuestionFeedbackInfoService.updateById(tQuestionFeedbackInfo));
}
/**
* 通过id删除
*
* @param id id
* @return R
*/
@Operation(summary = "通过id删除", description = "通过id删除:hasPermission('demo_tquestionfeedbackinfo_del')")
@SysLog("通过id删除")
@DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tquestionfeedbackinfo_del')")
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tQuestionFeedbackInfoService.removeById(id));
}
/**
* 批量导入
*
* @author fxj
* @date 2024-12-18 15:39:57
**/
@SneakyThrows
@Operation(description = "批量新增 hasPermission('demo_tquestionfeedbackinfo-batch-import')")
@SysLog("批量新增")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('demo_tquestionfeedbackinfo-batch-import')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file) {
return tQuestionFeedbackInfoService.importDiy(file.getInputStream());
}
/**
* 批量导出
*
* @author fxj
* @date 2024-12-18 15:39:57
**/
@Operation(description = "导出 hasPermission('demo_tquestionfeedbackinfo-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('demo_tquestionfeedbackinfo-export')")
public void export(HttpServletResponse response, @RequestBody TQuestionFeedbackInfoSearchVo searchVo) {
tQuestionFeedbackInfoService.listExport(response, searchVo);
}
}
......@@ -15,6 +15,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.*;
import com.yifu.cloud.plus.v1.yifu.salary.service.*;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountForWxVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeWxVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalarySetVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -64,7 +65,11 @@ public class TSalaryAccountPhoneController {
**/
@Operation(description = "获取工资报账信息")
@GetMapping("/getSalaryAccount")
public R<AccountForWxVo> getSalaryAccount(@RequestParam String idNumber, String year) {
public R<AccountForWxVo> getSalaryAccount(@RequestParam String idNumber, String year,String openId) {
//校验openId,openId 不对直接返回
if (!checkOpenId(openId)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
AccountForWxVo result = new AccountForWxVo();
//处理身份证防止小写干扰
idNumber = idNumber.toUpperCase();
......@@ -121,7 +126,11 @@ public class TSalaryAccountPhoneController {
**/
@Operation(description = "获取工资明细信息")
@GetMapping("/getSalaryAccountForm")
public R<TSalarySetVo> getSalaryAccountForm(@RequestParam String id, Integer type) {
public R<TSalarySetVo> getSalaryAccountForm(@RequestParam String id, Integer type,String openId) {
//校验openId,openId 不对直接返回
if (!checkOpenId(openId)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
//类型判断
if (null == type) {
return R.failed("查询类型不能为空");
......@@ -161,7 +170,7 @@ public class TSalaryAccountPhoneController {
*/
@Operation(description = "根据手机号获取员工信息")
@GetMapping("/getInfoByEmpPhone")
public R<TSalaryEmployee> getInfoByEmpPhone(@RequestParam String empPhone) {
public R<TSalaryEmployeeWxVo> getInfoByEmpPhone(@RequestParam String empPhone) {
if (Common.isEmpty(empPhone)) {
return R.failed("手机号不能为空");
}
......@@ -170,7 +179,7 @@ public class TSalaryAccountPhoneController {
.eq(TSalaryEmployee::getEmpPhone, empPhone).last(CommonConstants.LAST_ONE_SQL));
//判断是查到员工信息
if (Common.isNotNull(employee) && Common.isNotNull(employee.getEmpIdcard())) {
return this.getUserCount(employee);
return this.getUserAndEmp(employee);
} else {
return R.failed("未查到信息,请核实手机号!");
}
......@@ -192,6 +201,26 @@ public class TSalaryAccountPhoneController {
}
return R.ok(em);
}
/**
* @Author fxj
* @Description 查询身份证是否已被占用--新
* @Date 9:21 2024/12/18
* @Param
* @return
**/
private R<TSalaryEmployeeWxVo> getUserAndEmp(TSalaryEmployee em) {
TSalaryEmployeeWxVo wxVo = new TSalaryEmployeeWxVo();
wxVo.setSalaryEmployee(em);
SysUser user = new SysUser();
user.setUsername(em.getEmpIdcard());
R<SysUser> userR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
, "/user/inner/getWxNickNameByIdCard", user, SysUser.class, SecurityConstants.FROM_IN);
if (null != userR && Common.isNotNull(userR.getData())) {
wxVo.setWxNickName(userR.getData().getWxNickName());
return R.other(CommonConstants.TWO_INT, "该身份已被绑定,请联系客服热线:0551 - 63535213!!",wxVo);
}
return R.ok(wxVo);
}
/**
* @param phone 手机号
......@@ -221,4 +250,12 @@ public class TSalaryAccountPhoneController {
}
}
private boolean checkOpenId(String openId){
R<Boolean> r = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
, "/user/inner/checkWxUserByOpenId", openId, Boolean.class, SecurityConstants.FROM_IN);
if (Common.isNotNull(r) && Common.isNotNull(r.getData())){
return r.getData().booleanValue();
}
return false;
}
}
......@@ -74,7 +74,7 @@ public class TSalaryAttaController {
* @Date: 2021-12-8 15:36:58
* @return: com.yifu.cloud.v1.common.core.util.R<java.util.List < com.yifu.cloud.v1.hrms.api.entity.TSalaryAtta>>
**/
@Schema(description = "获取list(linkId, linkType链接类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录6:非扣税 7发放失败 8自有员工附件 9财务回执附件 10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000);14本月重复金额")
@Schema(description = "获取list(linkId, linkType链接类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录6:非扣税 7发放失败 8自有员工附件 9财务回执附件 10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000);14本月重复金额;15:工资查询问题反馈附件")
@GetMapping("/getTSalaryAttaListByIdType")
public R<List<TSalaryAtta>> getTSalaryAttaListByIdType(@RequestParam String linkId, @RequestParam Integer linkType) {
return new R<>(tSalaryAttaService.getAttaListHaveSrc(linkId, linkType));
......@@ -89,7 +89,7 @@ public class TSalaryAttaController {
* @throws IOException
*/
@SysLog("薪资附件上传")
@Schema(description = "OSS文件上传接口。linkType类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000);14本月重复金额")
@Schema(description = "OSS文件上传接口。linkType类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4薪资打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9:财务回执附件;10换人换卡附件;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000);14本月重复金额15:工资查询问题反馈附件")
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", dataType = "String", paramType = "form"),
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMobileChangeInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author fxj
* @date 2024-12-18 15:39:56
*/
@Mapper
public interface TMobileChangeInfoMapper extends BaseMapper<TMobileChangeInfo> {
/**
* 简单分页查询
*
* @param tMobileChangeInfo
* @return
*/
IPage<TMobileChangeInfo> getTMobileChangeInfoPage(Page<TMobileChangeInfo> page, @Param("tMobileChangeInfo") TMobileChangeInfo tMobileChangeInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TQuestionFeedbackInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author fxj
* @date 2024-12-18 15:39:57
*/
@Mapper
public interface TQuestionFeedbackInfoMapper extends BaseMapper<TQuestionFeedbackInfo> {
/**
* 简单分页查询
*
* @param tQuestionFeedbackInfo
* @return
*/
IPage<TQuestionFeedbackInfo> getTQuestionFeedbackInfoPage(Page<TQuestionFeedbackInfo> page, @Param("tQuestionFeedbackInfo") TQuestionFeedbackInfo tQuestionFeedbackInfo);
}
......@@ -43,4 +43,6 @@ public interface TSalaryAttaMapper extends BaseMapper<TSalaryAtta> {
IPage<TSalaryAtta> getTAttaPage(Page page, @Param("tAtta") TSalaryAtta tAtta);
List<TSalaryAtta> getTAttaList(@Param("tAtta") TSalaryAtta tAtta);
int updateLinkId(@Param("domainId")String id, @Param("ids")List<String> ids);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMobileChangeInfo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMobileChangeInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* @author fxj
* @date 2024-12-18 15:39:56
*/
public interface TMobileChangeInfoService extends IService<TMobileChangeInfo> {
/**
* 简单分页查询
*
* @param tMobileChangeInfo
* @return
*/
IPage<TMobileChangeInfo> getTMobileChangeInfoPage(Page<TMobileChangeInfo> page, TMobileChangeInfoSearchVo tMobileChangeInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TMobileChangeInfoSearchVo searchVo);
List<TMobileChangeInfo> noPageDiy(TMobileChangeInfoSearchVo searchVo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TQuestionFeedbackInfo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TQuestionFeedbackInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* @author fxj
* @date 2024-12-18 15:39:57
*/
public interface TQuestionFeedbackInfoService extends IService<TQuestionFeedbackInfo> {
/**
* 简单分页查询
*
* @param tQuestionFeedbackInfo
* @return
*/
IPage<TQuestionFeedbackInfo> getTQuestionFeedbackInfoPage(Page<TQuestionFeedbackInfo> page, TQuestionFeedbackInfoSearchVo tQuestionFeedbackInfo);
R<List<ErrorMessage>> importDiy(InputStream inputStream);
void listExport(HttpServletResponse response, TQuestionFeedbackInfoSearchVo searchVo);
List<TQuestionFeedbackInfo> noPageDiy(TQuestionFeedbackInfoSearchVo searchVo);
R<Boolean> saveAsso(TQuestionFeedbackInfo tQuestionFeedbackInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMobileChangeInfo;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TMobileChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TMobileChangeInfoService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMobileChangeInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMobileChangeInfoVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* @author fxj
* @date 2024-12-18 15:39:56
*/
@Log4j2
@Service
public class TMobileChangeInfoServiceImpl extends ServiceImpl<TMobileChangeInfoMapper, TMobileChangeInfo> implements TMobileChangeInfoService {
/**
* 简单分页查询
*
* @param tMobileChangeInfo
* @return
*/
@Override
public IPage<TMobileChangeInfo> getTMobileChangeInfoPage(Page<TMobileChangeInfo> page, TMobileChangeInfoSearchVo tMobileChangeInfo) {
return baseMapper.getTMobileChangeInfoPage(page, tMobileChangeInfo);
}
/**
* 批量导出
*
* @param searchVo
* @return
*/
@Override
public void listExport(HttpServletResponse response, TMobileChangeInfoSearchVo searchVo) {
String fileName = "批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TMobileChangeInfo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TMobileChangeInfo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TMobileChangeInfo> util = new ExcelUtil<>(TMobileChangeInfo.class);
for (TMobileChangeInfo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public List<TMobileChangeInfo> noPageDiy(TMobileChangeInfoSearchVo searchVo) {
LambdaQueryWrapper<TMobileChangeInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TMobileChangeInfo::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
}
private Long noPageCountDiy(TMobileChangeInfoSearchVo searchVo) {
LambdaQueryWrapper<TMobileChangeInfo> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TMobileChangeInfo::getId, idList);
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TMobileChangeInfoSearchVo entity) {
LambdaQueryWrapper<TMobileChangeInfo> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TMobileChangeInfo::getCreateTime, entity.getCreateTimes()[0])
.le(TMobileChangeInfo::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TMobileChangeInfo::getCreateName, entity.getCreateName());
}
return wrapper;
}
@Override
public R<List<ErrorMessage>> importDiy(InputStream inputStream) {
List<ErrorMessage> errorMessageList = new ArrayList<>();
ExcelUtil<TMobileChangeInfoVo> util1 = new ExcelUtil<>(TMobileChangeInfoVo.class);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
try {
EasyExcel.read(inputStream, TMobileChangeInfoVo.class, new ReadListener<TMobileChangeInfoVo>() {
/**
* 单次缓存的数据量
*/
public static final int BATCH_COUNT = CommonConstants.BATCH_COUNT;
/**
*临时存储
*/
private List<TMobileChangeInfoVo> cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
@Override
public void invoke(TMobileChangeInfoVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
ErrorMessage errorMessage = util1.checkEntity(data, data.getRowIndex());
if (Common.isNotNull(errorMessage)) {
errorMessageList.add(errorMessage);
} else {
cachedDataList.add(data);
}
if (cachedDataList.size() >= BATCH_COUNT) {
saveData();
// 存储完成清理 list
cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT);
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
/**
* 加上存储数据库
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTMobileChangeInfo(cachedDataList, errorMessageList);
log.info("存储数据库成功!");
}
}).sheet().doRead();
} catch (Exception e) {
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
return R.ok(errorMessageList);
}
private void importTMobileChangeInfo(List<TMobileChangeInfoVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
ErrorMessage errorMsg;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
TMobileChangeInfoVo excel = excelVOList.get(i);
// 数据合法情况 TODO
// 插入
insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
}
}
/**
* 插入excel bad record
*/
private void insertExcel(TMobileChangeInfoVo excel) {
TMobileChangeInfo insert = new TMobileChangeInfo();
BeanUtil.copyProperties(excel, insert);
this.save(insert);
}
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
......@@ -55,6 +56,7 @@ import java.io.InputStream;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 薪资结算附件表
......@@ -72,6 +74,8 @@ public class TSalaryAttaServiceImpl extends ServiceImpl<TSalaryAttaMapper, TSala
private final TSalaryStandardService tSalaryStandardService;
private final TSalaryAccountService tSalaryAccountService;
private final AtomicInteger atomicInteger = new AtomicInteger(0);
/**
* 薪资结算附件表简单分页查询
*
......@@ -139,6 +143,10 @@ public class TSalaryAttaServiceImpl extends ServiceImpl<TSalaryAttaMapper, TSala
@Override
public R<FileVo> uploadAtta(@RequestBody MultipartFile file, String filePath, String linkId
, Integer linkType, Integer engineerType, String printRemark, String recordId) throws IOException {
//初始化附件上传队列上限值
int maxLimit = 5;
if (atomicInteger.incrementAndGet() <= maxLimit){
try {
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
......@@ -153,7 +161,6 @@ public class TSalaryAttaServiceImpl extends ServiceImpl<TSalaryAttaMapper, TSala
TSalaryAtta salaryAtta;
URL url = null;
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
salaryAtta = this.saveTSalaryAtta(fileName, key, file.getSize(), linkId, linkType, engineerType, printRemark, recordId);
try {
this.save(salaryAtta);
......@@ -168,6 +175,17 @@ public class TSalaryAttaServiceImpl extends ServiceImpl<TSalaryAttaMapper, TSala
} else {
return R.failed("failed:上传至存储空间失败");
}
}catch (Exception e){
log.error("附件上传异常:",e);
}finally {
atomicInteger.decrementAndGet();
}
}else {
atomicInteger.decrementAndGet();
log.error("超出阈值:"+ ResultConstants.FILE_UPLOADING_DATA);
return R.failed(ResultConstants.FILE_UPLOADING_DATA);
}
return null;
}
/**
......
......@@ -44,6 +44,12 @@ security:
- /tsalaryemployee/inner/getEmpTaxMonth
- /tsalaryemployee/inner/getSalaryEmployee
- /tsalaryemployee/inner/savePreNewEmpInfo
- /tmobilechangeinfo/add # 工资条换号申请不需要token
- /tquestionfeedbackinfo/add # 工资条问题反馈不需要token
- /salaryEmployeeSelect/getSalaryAccountForm # 工资条查询通过openId控制
- /salaryEmployeeSelect/getSalaryAccount # 工资条查询明细通过openId控制
- /tsalaryatta/ossUploadFile # 工资条查询附件上传 无token
- /tsalaryatta/ossFileDelete/** # 工资条查询附件上传删除 无token
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.salary.mapper.TMobileChangeInfoMapper">
<resultMap id="tMobileChangeInfoMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TMobileChangeInfo">
<id property="id" column="ID"/>
<result property="applyName" column="APPLY_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="mobileOld" column="MOBILE_OLD"/>
<result property="mobileNew" column="MOBILE_NEW"/>
<result property="handleStatus" column="HANDLE_STATUS"/>
<result property="handleOperator" column="HANDLE_OPERATOR"/>
<result property="handleFinishTime" column="HANDLE_FINISH_TIME"/>
<result property="handleRemark" column="HANDLE_REMARK"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.APPLY_NAME,
a.EMP_IDCARD,
a.MOBILE_OLD,
a.MOBILE_NEW,
a.HANDLE_STATUS,
a.HANDLE_OPERATOR,
a.HANDLE_FINISH_TIME,
a.HANDLE_REMARK,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql id="tMobileChangeInfo_where">
<if test="tMobileChangeInfo != null">
<if test="tMobileChangeInfo.id != null and tMobileChangeInfo.id.trim() != ''">
AND a.ID = #{tMobileChangeInfo.id}
</if>
<if test="tMobileChangeInfo.applyName != null and tMobileChangeInfo.applyName.trim() != ''">
AND a.APPLY_NAME = #{tMobileChangeInfo.applyName}
</if>
<if test="tMobileChangeInfo.empIdcard != null and tMobileChangeInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tMobileChangeInfo.empIdcard}
</if>
<if test="tMobileChangeInfo.mobileOld != null and tMobileChangeInfo.mobileOld.trim() != ''">
AND a.MOBILE_OLD = #{tMobileChangeInfo.mobileOld}
</if>
<if test="tMobileChangeInfo.mobileNew != null and tMobileChangeInfo.mobileNew.trim() != ''">
AND a.MOBILE_NEW = #{tMobileChangeInfo.mobileNew}
</if>
<if test="tMobileChangeInfo.handleStatus != null and tMobileChangeInfo.handleStatus.trim() != ''">
AND a.HANDLE_STATUS = #{tMobileChangeInfo.handleStatus}
</if>
<if test="tMobileChangeInfo.handleOperator != null and tMobileChangeInfo.handleOperator.trim() != ''">
AND a.HANDLE_OPERATOR = #{tMobileChangeInfo.handleOperator}
</if>
<if test="tMobileChangeInfo.handleFinishTime != null">
AND a.HANDLE_FINISH_TIME = #{tMobileChangeInfo.handleFinishTime}
</if>
<if test="tMobileChangeInfo.handleRemark != null and tMobileChangeInfo.handleRemark.trim() != ''">
AND a.HANDLE_REMARK = #{tMobileChangeInfo.handleRemark}
</if>
<if test="tMobileChangeInfo.createBy != null and tMobileChangeInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tMobileChangeInfo.createBy}
</if>
<if test="tMobileChangeInfo.createName != null and tMobileChangeInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tMobileChangeInfo.createName}
</if>
<if test="tMobileChangeInfo.createTime != null">
AND a.CREATE_TIME = #{tMobileChangeInfo.createTime}
</if>
<if test="tMobileChangeInfo.updateBy != null and tMobileChangeInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tMobileChangeInfo.updateBy}
</if>
<if test="tMobileChangeInfo.updateTime != null">
AND a.UPDATE_TIME = #{tMobileChangeInfo.updateTime}
</if>
</if>
</sql>
<!--tMobileChangeInfo简单分页查询-->
<select id="getTMobileChangeInfoPage" resultMap="tMobileChangeInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_mobile_change_info a
<where>
1=1
<include refid="tMobileChangeInfo_where"/>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.salary.mapper.TQuestionFeedbackInfoMapper">
<resultMap id="tQuestionFeedbackInfoMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TQuestionFeedbackInfo">
<id property="id" column="ID"/>
<result property="name" column="NAME"/>
<result property="mobile" column="MOBILE"/>
<result property="question" column="QUESTION"/>
<result property="handleStatus" column="HANDLE_STATUS"/>
<result property="handleOperator" column="HANDLE_OPERATOR"/>
<result property="handleFinishTime" column="HANDLE_FINISH_TIME"/>
<result property="handleRemark" column="HANDLE_REMARK"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.NAME,
a.MOBILE,
a.QUESTION,
a.HANDLE_STATUS,
a.HANDLE_OPERATOR,
a.HANDLE_FINISH_TIME,
a.HANDLE_REMARK,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql id="tQuestionFeedbackInfo_where">
<if test="tQuestionFeedbackInfo != null">
<if test="tQuestionFeedbackInfo.id != null and tQuestionFeedbackInfo.id.trim() != ''">
AND a.ID = #{tQuestionFeedbackInfo.id}
</if>
<if test="tQuestionFeedbackInfo.name != null and tQuestionFeedbackInfo.name.trim() != ''">
AND a.NAME = #{tQuestionFeedbackInfo.name}
</if>
<if test="tQuestionFeedbackInfo.mobile != null and tQuestionFeedbackInfo.mobile.trim() != ''">
AND a.MOBILE = #{tQuestionFeedbackInfo.mobile}
</if>
<if test="tQuestionFeedbackInfo.question != null and tQuestionFeedbackInfo.question.trim() != ''">
AND a.QUESTION = #{tQuestionFeedbackInfo.question}
</if>
<if test="tQuestionFeedbackInfo.handleStatus != null and tQuestionFeedbackInfo.handleStatus.trim() != ''">
AND a.HANDLE_STATUS = #{tQuestionFeedbackInfo.handleStatus}
</if>
<if test="tQuestionFeedbackInfo.handleOperator != null and tQuestionFeedbackInfo.handleOperator.trim() != ''">
AND a.HANDLE_OPERATOR = #{tQuestionFeedbackInfo.handleOperator}
</if>
<if test="tQuestionFeedbackInfo.handleFinishTime != null">
AND a.HANDLE_FINISH_TIME = #{tQuestionFeedbackInfo.handleFinishTime}
</if>
<if test="tQuestionFeedbackInfo.handleRemark != null and tQuestionFeedbackInfo.handleRemark.trim() != ''">
AND a.HANDLE_REMARK = #{tQuestionFeedbackInfo.handleRemark}
</if>
<if test="tQuestionFeedbackInfo.createBy != null and tQuestionFeedbackInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tQuestionFeedbackInfo.createBy}
</if>
<if test="tQuestionFeedbackInfo.createName != null and tQuestionFeedbackInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tQuestionFeedbackInfo.createName}
</if>
<if test="tQuestionFeedbackInfo.createTime != null">
AND a.CREATE_TIME = #{tQuestionFeedbackInfo.createTime}
</if>
<if test="tQuestionFeedbackInfo.updateBy != null and tQuestionFeedbackInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tQuestionFeedbackInfo.updateBy}
</if>
<if test="tQuestionFeedbackInfo.updateTime != null">
AND a.UPDATE_TIME = #{tQuestionFeedbackInfo.updateTime}
</if>
</if>
</sql>
<!--tQuestionFeedbackInfo简单分页查询-->
<select id="getTQuestionFeedbackInfoPage" resultMap="tQuestionFeedbackInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_question_feedback_info a
<where>
1=1
<include refid="tQuestionFeedbackInfo_where"/>
</where>
</select>
</mapper>
......@@ -132,4 +132,18 @@
</where>
order by CREATE_TIME desc
</select>
<update id="updateLinkId">
update t_salary_atta
<trim prefix="set" suffixOverrides=",">
LINK_ID=#{domainId}
</trim>
WHERE
<if test="ids != null and ids.size() > 0">
id in
<foreach collection="ids" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</update>
</mapper>
......@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import org.apache.shardingsphere.transaction.annotation.ShardingTransactionType;
import org.apache.shardingsphere.transaction.core.TransactionType;
......@@ -35,6 +36,7 @@ import java.io.InputStream;
import java.net.URL;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* 派单信息记录表
......@@ -85,6 +87,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
// isAutoFlag:是否社保士兵的自动办理,true :是
R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark, YifuUser user, boolean isAutoHandle);
//代码优化-解决死锁问题:fxj 2024-12-18 事务控制集中到每次循环,而不是所有for循环
boolean extracted(ConcurrentHashMap<String, String> socialMap, ConcurrentHashMap<String, String> fundMap, String typeSub, YifuUser user, int flag, String handleStatus, String handleRemark, String socialType, String remark, boolean isAutoHandle, List<ErrorMessage> errorList, Map<String, TSocialFundInfo> socialFundMap, TDispatchInfo dis);
/**
* @Description: 社保士兵导出
* @Author: hgw
......
......@@ -143,6 +143,11 @@ public class SysUser extends BaseEntity {
*/
private String wxMessage;
/**
* 微信昵称(工资条使用)
*/
private String wxNickName;
/**
* LDAP_DN
*/
......
......@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -477,6 +478,50 @@ public class UserController {
.isNotNull(SysUser::getWxOpenid));
}
/**
* @Description: 获取C端用户是否存在
* @Author: hgw
* @Date: 2022/12/13 14:50
* @return: java.lang.Integer
**/
@Inner
@PostMapping("/inner/getWxNickNameByIdCard")
public SysUser getWxNickNameByIdCard(@RequestBody SysUser user) {
SysUser userInfo = userService.getOne(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getUsername, user.getUsername())
.eq(SysUser::getDelFlag, CommonConstants.ZERO_STRING)
.isNotNull(SysUser::getWxOpenid).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(userInfo)){
userInfo.setPassword(null);
return userInfo;
}
return null;
}
/**
* @Author fxj
* @Description 通过openId验证是否存在用户
* @Date 11:35 2024/12/20
* @Param
* @return
**/
@Inner
@PostMapping("/inner/checkWxUserByOpenId")
public Boolean checkWxUserByOpenId(@RequestBody String openId) {
try{
if (Common.isNotNull(openId)){
int count = (int) userService.count(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getWxOpenid, openId)
.eq(SysUser::getDelFlag, CommonConstants.ZERO_STRING));
if (count > 0){
return true;
}
}
}catch (Exception e){
log.error("通过openId:{}验证微信用户异常:{}",openId,e);
return false;
}
return false;
}
/**
* C端用户信息注册
*
......@@ -499,7 +544,11 @@ public class UserController {
} else {
return R.failed("未找到手机号对应的验证码或验证码已超时,请重新获取");
}
userService.saveCUser(employeeInfo.getEmpIdcard(), employeeInfo.getEmpName(), employeeInfo.getEmpPhone(), openId, headImgUrl);
String nickName = employeeInfo.getNickName();
if (Common.isNotNull(nickName)){
nickName = new String(nickName.getBytes(StandardCharsets.ISO_8859_1),StandardCharsets.UTF_8);
}
userService.saveCUser(employeeInfo.getEmpIdcard(), employeeInfo.getEmpName(), employeeInfo.getEmpPhone(), openId, headImgUrl,nickName);
return R.ok();
}
......
......@@ -159,7 +159,7 @@ public interface SysUserService extends IService<SysUser> {
* @Date: 2022/12/13 11:54
* @return: boolean
**/
boolean saveCUser(String empIdCard, String empName, String empPhone, String openId, String headImgUrl);
boolean saveCUser(String empIdCard, String empName, String empPhone, String openId, String headImgUrl,String nickName);
Page<BusinessUserVo> getBusinessUserVoPage(Page page, BusinessUserVo user);
......
......@@ -671,13 +671,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
* @param empPhone 手机号
* @param openId 微信的openId,工资条使用的
* @param headImgUrl 头像
* @Param nickName 微信昵称
* @Description: 保存C端用户
* @Author: hgw
* @Date: 2022/12/13 11:54
* @return: boolean
**/
@Override
public boolean saveCUser(String empIdCard, String empName, String empPhone, String openId, String headImgUrl) {
public boolean saveCUser(String empIdCard, String empName, String empPhone, String openId, String headImgUrl,String nickName) {
SysUser user = this.getOne(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getUsername, empIdCard)
.eq(SysUser::getDelFlag, CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
//用户信息封装
......@@ -704,6 +705,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
user.setType(CommonConstants.THREE_STRING);
user.setWxOpenid(openId);
user.setWxNickName(nickName);
return this.saveOrUpdate(user);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment