Commit d6e864bb authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.4' into MVP1.4

parents a5e0d51f f480da60
......@@ -33,7 +33,8 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -33,7 +33,8 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -33,7 +33,8 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -33,7 +33,8 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -33,7 +33,8 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -33,7 +33,8 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
spec: # 资源规范字段
......
......@@ -33,7 +33,8 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
#dapr.io/http-max-request-size: "8MB" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
......@@ -102,11 +103,13 @@ public class BusinessEmployeeExtendVO implements Serializable {
/**
* B端维护的离职时间
*/
private LocalDateTime businessLeaveDate;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime businessLeaveDate;
/**
* B端维护的入职时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime businessEnjoinDate;
/**
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.MSetttleCustomerUser;
import com.yifu.cloud.plus.v1.yifu.archives.service.MSetttleCustomerUserService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
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.common.security.annotation.Inner;
......@@ -115,4 +116,18 @@ public class MSetttleCustomerUserController {
public Integer getCustomerCount() {
return mSetttleCustomerUserService.getCustomerCount();
}
/**
* @Author fxj
* @Description 远程接口获取用户B端权限关系
* @Date 10:18 2023/1/10
**/
@Inner
@PostMapping("/getSettlePermissionForB")
public TSettleDomainListVo getSettlePermissionForB(@RequestBody String userId) {
TSettleDomainListVo vo = new TSettleDomainListVo();
vo.setDeptIds(mSetttleCustomerUserService.getSettlePermissionForB(userId));
return vo;
}
}
......@@ -30,4 +30,6 @@ public interface MSetttleCustomerUserMapper extends BaseMapper<MSetttleCustomerU
List<MSetttleCustomerUserVo> getCustomerUser(@Param("userIdList")List<Integer> userIdList);
Integer getCustomerCount();
List<String> getSettlePermissionForB(@Param("userId")String userId);
}
......@@ -29,4 +29,6 @@ public interface MSetttleCustomerUserService extends IService<MSetttleCustomerUs
Map<String,String> getCustomerUser(List<Integer> userIdList);
Integer getCustomerCount();
List<String> getSettlePermissionForB(String userId);
}
......@@ -3,11 +3,15 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.archives.entity.MSetttleCustomerUser;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.MSetttleCustomerUserMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.MSetttleCustomerUserService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.MSetttleCustomerUserVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import org.springframework.stereotype.Service;
import java.util.HashMap;
......@@ -51,4 +55,12 @@ public class MSetttleCustomerUserServiceImpl extends ServiceImpl<MSetttleCustome
public Integer getCustomerCount() {
return baseMapper.getCustomerCount();
}
@Override
public List<String> getSettlePermissionForB(String userId) {
if (Common.isNotNull(userId)){
return baseMapper.getSettlePermissionForB(userId);
}
return null;
}
}
......@@ -51,5 +51,7 @@
<select id="getCustomerCount" resultType="java.lang.Integer">
SELECT count(DISTINCT customer_id) from m_setttle_customer_user a ;
</select>
<select id="getSettlePermissionForB" resultType="java.lang.String">
SELECT DISTINCT settle_id from m_setttle_customer_user a where a.user_id=#{userId}
</select>
</mapper>
......@@ -64,7 +64,7 @@
<select id="getNotLeaveExtendList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from hrms.t_business_employee_extend_info a
from t_business_employee_extend_info a
<where>
1=1
and a.BUSINESS_WORKING_STATUS <![CDATA[<>]]> '1'
......@@ -108,8 +108,8 @@
a.BUSINESS_WORKING_STATUS,
a.DOCUMENT_TYPE,
a.ARCHIVES_ADDR
from hrms.t_business_employee_extend_info a
left join hrms.t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
from t_business_employee_extend_info a
left join t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
where 1=1
and a.EMP_IDCARD = #{empIdcard}
and b.DELETE_FLAG = '0'
......@@ -136,8 +136,8 @@
a.BUSINESS_WORKING_STATUS,
a.DOCUMENT_TYPE,
a.ARCHIVES_ADDR
from hrms.t_business_employee_extend_info a
left join hrms.t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
from t_business_employee_extend_info a
left join t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
where 1=1
and a.ID = #{extendId}
and b.DELETE_FLAG = '0'
......
......@@ -24,12 +24,12 @@ public class AddVacationMonitorClearLogDTO implements Serializable {
*/
@NotNull(message = "年假监控id不能为空")
@Schema(description = "年假监控id")
Integer vacationMonitorId;
private String vacationMonitorId;
/**
* 清零说明
*/
@Schema(description = "清零说明")
String clearNote;
private String clearNote;
}
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -14,6 +15,7 @@ import java.time.LocalDateTime;
import java.util.List;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
......@@ -75,6 +77,8 @@ public class TBusDept extends Model<TBusDept> {
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
@ExcelAttribute(name = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
......
......@@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
......@@ -70,6 +72,8 @@ public class TBusLable extends Model<TBusLable> {
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
@ExcelAttribute(name = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
......
......@@ -91,12 +91,12 @@ public class TVacationInfo implements Serializable {
/**
* 创建人id
*/
private Integer createUserId;
private String createUserId;
/**
* 更新人id
*/
private Integer updateUserId;
private String updateUserId;
/**
* 假勤状态 0待休 1休假中 2到期待销假 3已销假
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
......@@ -17,11 +18,12 @@ import java.time.LocalDateTime;
@TableName(value ="t_vacation_monitor")
@Data
public class TVacationMonitor extends Model<TVacationMonitor> {
/**
* 主键
*/
@TableId(type = IdType.AUTO)
private Integer id;
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "")
private String id;
/**
* 年份
......
......@@ -46,7 +46,7 @@ public class TVacationMonitorClearLog extends Model<TVacationMonitorClearLog> {
/**
* 清零人id
*/
private Integer clearUserId;
private String clearUserId;
/**
* 清零时间
......@@ -56,7 +56,7 @@ public class TVacationMonitorClearLog extends Model<TVacationMonitorClearLog> {
/**
* 年假监控id
*/
private Integer vacationMonitorId;
private String vacationMonitorId;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
......
......@@ -20,11 +20,11 @@ import java.time.LocalDateTime;
@TableName(value ="t_vacation_rule_config")
@Data
public class TVacationRuleConfig extends Model<TVacationRuleConfig> {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
private Integer id;
/**
*
*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 假期类型 1年假
......
......@@ -24,7 +24,7 @@ public class TVacationMonitorVO implements Serializable {
* 主键
*/
@Schema(description = "主键")
private Integer id;
private String id;
/**
* 年份
......
......@@ -22,7 +22,7 @@ public class VacationRuleConfigVO implements Serializable {
* 主键
*/
@Schema(description = "主键")
private Integer id;
private String id;
/**
* 假期类型 1年假
......
package com.yifu.cloud.plus.v1.business.controller.vacation;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import com.yifu.cloud.plus.v1.business.service.vacation.TBusLeaveService;
......@@ -169,9 +170,22 @@ public class TBusLeaveController {
}
int i = 1;
List<TBusLeave> updateLsit = new ArrayList<>();
TBusLeave tBusLeaveExit;
for (TBusLeave tBusLeave : leaveList) {
i++;
if (Common.isEmpty(tBusLeave.getLeaveDate()) || Common.isEmpty(tBusLeave.getLeavePostDate())
if (Common.isNotNull(tBusLeave.getTeleNo())) {
tBusLeaveExit = tBusLeaveService.getOne(Wrappers.<TBusLeave>query().lambda()
.eq(TBusLeave::getTeleNo, tBusLeave.getTeleNo())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tBusLeaveExit)) {
errorList.add(new ErrorMessage(i, "已存在对应电信工号'" + tBusLeave.getTeleNo() + "'的离职数据!"));
continue;
}
} else {
errorList.add(new ErrorMessage(i, "'" + "'电信工号不可为空!"));
continue;
}
if (Common.isEmpty(tBusLeave.getLeaveDate()) || Common.isEmpty(tBusLeave.getLeavePostDate())
|| Common.isEmpty(tBusLeave.getLeaveReason()) || tBusLeave.getLeaveReason().length() > 200) {
// 判断并拦截
this.judgeLeave(errorList, i, tBusLeave);
......@@ -182,6 +196,9 @@ public class TBusLeaveController {
}
// 更新人员信息
this.batchUpdateEmpInfo(updateLsit);
if (errorList.isEmpty()) {
errorList = null;
}
return R.ok(errorList,"操作成功");
}
......@@ -244,16 +261,11 @@ public class TBusLeaveController {
tBusLeave.setCreateUserName(userName);
tBusLeaveService.save(tBusLeave);
updateLsit.add(tBusLeave);
error = "导入成功!";
errorList.add(new ErrorMessage(i, error));
}
} else {
error = "电信工号未匹配到人员附属信息:'" + tBusLeave.getTeleNo() + "'";
errorList.add(new ErrorMessage(i, error));
}
} else {
error = "电信工号不可为空!";
errorList.add(new ErrorMessage(i, error));
}
}
......
......@@ -21,8 +21,8 @@ import java.util.List;
/**
* 假勤信息表 controller
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
@RestController
@RequiredArgsConstructor
......@@ -36,8 +36,8 @@ public class TVacationInfoController {
* 分页查询: 条件分页查询
* @param query 查询条件
* @return: R<IPage<TVacationInfoVO>>
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/getListByPage")
......@@ -49,8 +49,8 @@ public class TVacationInfoController {
* 导入: 通过json串格式导入假勤信息
* @param jsonStr json字符串数据
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "导入: 通过json串格式导入假勤信息", description = "导入: 通过json串格式导入假勤信息")
@PostMapping("/batchImportByJsonStr")
......@@ -62,8 +62,8 @@ public class TVacationInfoController {
* 查询:根据条件出列表
* @param query 查询条件
* @return: IPage<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.TVacationInfoVO>>
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "查询:根据条件出列表", description = "查询:根据条件出列表")
@GetMapping("/getList")
......@@ -75,8 +75,8 @@ public class TVacationInfoController {
* 查询-详情:根据id查询数据
* @param id
* @return: R<TVacationInfoVO>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "查询-详情:根据id查询数据", description = "查询-详情:根据id查询数据")
@GetMapping("/{id}")
......@@ -88,8 +88,8 @@ public class TVacationInfoController {
* 添加:新增-单条-添加一条记录
* @param dto
* @return: R<TVacationInfo>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "添加:新增-单条-添加一条记录", description = "添加:新增-单条-添加一条记录")
@PostMapping
......@@ -101,8 +101,8 @@ public class TVacationInfoController {
* 销假:单条-根据id更新记录
* @param dto dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "销假:单条-根据id更新", description = "销假:单条-根据id更新")
@PostMapping("/vacationEnd/{id}")
......@@ -114,8 +114,8 @@ public class TVacationInfoController {
* 删除-单条:根据id删除记录
* @param id
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "根据id删除记录", description = "根据id删除记录")
@DeleteMapping("/{id}")
......@@ -124,9 +124,9 @@ public class TVacationInfoController {
}
/**
* @author wangweiguo
* @description 更新假勤信息中的冗余信息
* @date 20:32 2021/8/24
* @author: huyc
* @date: 2023/1/13
* @param dtoList 更新冗余字段dto集合
* @return com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
**/
......
......@@ -15,8 +15,8 @@ import java.util.List;
/**
* @description: 假期监控清零日志表 controller
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
@RestController
@AllArgsConstructor
......@@ -30,12 +30,12 @@ public class TVacationMonitorClearLogController {
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "查询-列表: 查询当前年假所有清零记录", description = "查询-列表: 查询当前年假所有清零记录")
@GetMapping("/getList")
public R<List<TVacationMonitorClearLogVO>> getList(@RequestParam("vacationMonitorId") @Parameter(description = "年假监控id", required = true) Integer vacationMonitorId) {
public R<List<TVacationMonitorClearLogVO>> getList(@RequestParam("vacationMonitorId") @Parameter(description = "年假监控id", required = true) String vacationMonitorId) {
return this.tVacationMonitorClearLogService.getList(vacationMonitorId);
}
......@@ -43,8 +43,8 @@ public class TVacationMonitorClearLogController {
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "清零说明: 记录年假清零说明", description = "清零说明: 记录年假清零说明")
@PostMapping("/clearNote")
......
......@@ -18,8 +18,8 @@ import java.util.List;
/**
* @description: 假期监控表 controller
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
@Slf4j
@RestController
......@@ -34,8 +34,8 @@ public class TVacationMonitorController {
* @description: 分页查询: 条件分页查询
* @param query 查询条件
* @return: R<IPage<TVacationMonitorVO>>
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "分页查询: 条件分页查询", description = "分页查询: 条件分页查询")
@GetMapping("/getListByPage")
......@@ -47,8 +47,8 @@ public class TVacationMonitorController {
* @description: 导出:根据查询条件导出
* @param query 查询条件
* @return: R<List<TVacationMonitorVO>>
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "导出:根据查询条件导出", description = "导出:根据查询条件导出")
@GetMapping("/exportByParams")
......@@ -60,8 +60,8 @@ public class TVacationMonitorController {
* @description: 查询-剩余年假:根据身份证号查询剩余年假
* @param idcard
* @return: com.yifu.cloud.v1.common.core.util.R<java.math.BigDecimal>
* @author: wangweiguo
* @date: 2021/8/17
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "查询-剩余年假:根据身份证号查询剩余年假", description = "查询-剩余年假:根据身份证号查询剩余年假")
@GetMapping("getNotUsedVacationDurationByIdCard")
......@@ -72,8 +72,8 @@ public class TVacationMonitorController {
/**
* @description: 定时任务:内部服务调用,每天初始化员工年假信息
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/17
* @author: huyc
* @date: 2023/1/13
*/
@Inner
@PostMapping("/inner/buildMonitorDataForCurrentYear")
......@@ -84,8 +84,8 @@ public class TVacationMonitorController {
/**
* @description: 冗余更新:更新监控表中冗余的员工信息,电信工号和岗位
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/23
* @author: huyc
* @date: 2023/1/13
*/
@Inner
@PostMapping("/inner/updateRedundancyEmployeeFields")
......
......@@ -16,8 +16,8 @@ import javax.validation.Valid;
/**
* @description: 假期配置controller
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@AllArgsConstructor
@RequestMapping("/vacationRule")
......@@ -30,8 +30,8 @@ public class TVacationRuleConfigController {
/**
* @description: 获取年假配置规则
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.VacationRuleConfigVO>
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "获取年假配置规则", description = "获取年假配置规则")
@GetMapping("/getVacationRuleConfig")
......@@ -47,8 +47,8 @@ public class TVacationRuleConfigController {
* @description:
* @param dto
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@Operation(summary = "新增或保存假期配置规则", description = "新增或保存假期配置规则")
@PostMapping("/addOrSave")
......
......@@ -91,4 +91,6 @@ public interface TBusWarningEmployeeMapper extends BaseMapper<TBusWarningEmploye
**/
String getVacationInfoEmpName();
String getVacationEmpName();
}
......@@ -13,8 +13,8 @@ import java.util.List;
/**
* @description: 假勤信息表 mapper
* @Entity com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationInfo
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
@Mapper
public interface TVacationInfoMapper extends BaseMapper<TVacationInfo> {
......@@ -23,8 +23,8 @@ public interface TVacationInfoMapper extends BaseMapper<TVacationInfo> {
* @description: 分页查询: 条件分页查询
* @param query 查询条件
* @return: R<IPage<TVacationInfoVO>>
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
Page<TVacationInfoVO> getListByPage(Page<TVacationInfoVO> page, @Param("query") TVacationInfoQuery query);
......@@ -32,8 +32,8 @@ public interface TVacationInfoMapper extends BaseMapper<TVacationInfo> {
* @description: 列表查询查询: 条件列表查询
* @param query 查询条件
* @return: List<TVacationInfoVO>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
List<TVacationInfoVO> getListByPage(@Param("query") TVacationInfoQuery query);
......
......@@ -8,8 +8,8 @@ import org.apache.ibatis.annotations.Mapper;
/**
* @description: 假期监控清零日志表 mapper
* @Entity com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationMonitorClearLog
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
@Mapper
public interface TVacationMonitorClearLogMapper extends BaseMapper<TVacationMonitorClearLog> {
......
......@@ -14,8 +14,8 @@ import java.util.List;
/**
* @description: 假期监控表 mapper
* @Entity generator.domain.TVacationMonitor
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
@Mapper
public interface TVacationMonitorMapper extends BaseMapper<TVacationMonitor> {
......
......@@ -7,8 +7,8 @@ import org.apache.ibatis.annotations.Mapper;
/**
* @description: 假期配置表mapper
* @Entity generator.domain.TVacationRuleConfig
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@Mapper
public interface TVacationRuleConfigMapper extends BaseMapper<TVacationRuleConfig> {
......
......@@ -543,6 +543,14 @@ public class TCertInfoServiceImpl extends ServiceImpl<TCertInfoMapper, TCertInfo
if (null == cert) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
TCertInfo certTemp = baseMapper.selectOne(Wrappers.<TCertInfo>query().lambda()
.eq(TCertInfo::getCertNum, cert.getCertNum())
.eq(TCertInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.ne(TCertInfo::getId,certInfo.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(certTemp)) {
return R.failed("已存在对应证件编号的信息!");
}
certInfo.setCreateTime(cert.getCreateTime());
certInfo.setCreateUser(cert.getCreateUser());
certInfo.setPost(cert.getPost());
......
......@@ -15,7 +15,9 @@ import com.yifu.cloud.plus.v1.business.vo.BusFileVo;
import com.yifu.cloud.plus.v1.business.vo.settle.SettleAdditionTypeEnum;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RandomUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.AllArgsConstructor;
......@@ -101,11 +103,13 @@ public class TBusSettleServiceImpl extends ServiceImpl<TBusSettleMapper, TBusSet
File etractFile = null;
try {
String fileType = FileTypeUtil.getType(file.getInputStream());
if (!StringUtils.equalsIgnoreCase(fileType, CommonConstants.ZIP_TYPE)) {
if (!StringUtils.equalsIgnoreCase(fileType, CommonConstants.JAR_TYPE)) {
return R.failed("导入的文件格式不正确");
}
String[] destoryName = StringUtils.split(StringUtils.removeEndIgnoreCase(file.getOriginalFilename()
.replace(".jar","")
.replace(".zip","")
, CommonConstants.SPOT.concat(fileType)), CommonConstants.DOWN_LINE_CHAR);
if (null != destoryName && destoryName.length == 2) {
TBusSettle busSettle = this.lambdaQuery()
......@@ -130,25 +134,26 @@ public class TBusSettleServiceImpl extends ServiceImpl<TBusSettleMapper, TBusSet
if (!busSettle.getSettleMonth().matches(SETTLE_MONTH_MATCH)) {
return R.failed(FILE_NAME_DATE_FORMAT_ERROR);
}
boolean saveBusSettleSuccess = this.save(busSettle);
if (!saveBusSettleSuccess) {
return R.failed(SAVE_SETTLE_ERROR);
}
busSettle.setId(DateUtil.getCurrentDateString() + RandomUtil.getSix());
List<File> files = FileUtil.loopFiles(unzip);
for (File fl : files) {
String fileName = FileUtil.getName(fl);
SettleAdditionTypeEnum settleAdditionTypeEnum = SettleAdditionTypeEnum.getTypeEnumByFileName(fileName);
if (null == settleAdditionTypeEnum) {
runTimeExceptionDiy(fileName + ":" + FILE_NAME_ERROT);
return R.failed(fileName + ":" + FILE_NAME_ERROT);
}
R<BusFileVo> busFileVoR = this.busAttaInfoService.uploadFile(fileCovertMultipartFile(fl)
, HRB_SETTLE_FILE_PATH, settleAdditionTypeEnum.getType(), busSettle.getId());
if (!R.isSuccess(busFileVoR)) {
runTimeExceptionDiy(busFileVoR.getMsg());
return R.failed(busFileVoR.getMsg());
}
}
boolean saveBusSettleSuccess = this.save(busSettle);
if (!saveBusSettleSuccess) {
return R.failed(SAVE_SETTLE_ERROR);
}
} else {
return R.failed(ZIP_FILE_NAME_VALID_FAILD);
}
......
......@@ -93,4 +93,6 @@ public interface TBusWarningEmployeeService extends IService<TBusWarningEmployee
**/
String getVacationInfoEmpName();
String getVacationEmpName();
}
......@@ -179,5 +179,15 @@ public class TBusWarningEmployeeServiceImpl extends ServiceImpl<TBusWarningEmplo
return baseMapper.getVacationInfoEmpName();
}
/**
* @Description: 获取假期结束人员姓名
* @Author: hgw
* @Date: 2021/8/24 17:54
* @return: int
**/
@Override
public String getVacationEmpName() {
return baseMapper.getVacationEmpName();
}
}
......@@ -188,7 +188,7 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
empList = busWarningEmployeeService.getByBizId(bizId);
// 1添加复审、到期、年假系统消息
this.getRemindInfo(empList, sysBus);
this.getRemindInfo(empList, sysBus, monthDay);
si.setEmpList(empList);
siList.add(si);
}
......@@ -197,9 +197,19 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
return siList;
}
private void getRemindInfo(List<TBusWarningEmployee> empList, TBusWarning sysBus) {
if (empList != null && !empList.isEmpty()) {
TBusWarningMessage message = new TBusWarningMessage();
private void getRemindInfo(List<TBusWarningEmployee> empList, TBusWarning sysBus, String monthDay) {
TBusWarningMessage message = new TBusWarningMessage();
if (sysBus.getRemindType() == 2 && Common.isNotNull(sysBus.getSendDate()) && sysBus.getSendDate().equals(monthDay)) {
String name = busWarningEmployeeService.getVacationEmpName();
if (Common.isNotNull(name)) {
message.setRemindContent(name + sysBus.getRemindTemplate());
message.setRemindObject(sysBus.getRemindObject());
message.setRemindType(sysBus.getRemindType());
message.setWarningId(sysBus.getId());
message.setCreateDate(LocalDateTime.now());
busWarningMessageService.save(message);
}
} else if (empList != null && !empList.isEmpty()) {
message.setRemindContent(empList.get(0).getEmpName() + sysBus.getRemindTemplate());
message.setRemindObject(sysBus.getRemindObject());
message.setRemindType(sysBus.getRemindType());
......
......@@ -11,8 +11,8 @@ import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
* @author: huyc
* @date: 2023/1/13
*/
public interface TBusLeaveService extends IService<TBusLeave> {
......
......@@ -15,8 +15,8 @@ import java.util.List;
/**
* 假勤信息表 service层
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
public interface TVacationInfoService extends IService<TVacationInfo> {
......@@ -24,8 +24,8 @@ public interface TVacationInfoService extends IService<TVacationInfo> {
* 分页查询: 条件分页查询
* @param query 查询条件
* @return: R<IPage<TVacationInfoVO>>
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
R<IPage<TVacationInfoVO>> getListByPage(TVacationInfoQuery query);
......@@ -33,8 +33,8 @@ public interface TVacationInfoService extends IService<TVacationInfo> {
* 查询:根据条件出列表
* @param query 查询条件
* @return: IPage<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.TVacationInfoVO>>
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
R<List<TVacationInfoVO>> getList(TVacationInfoQuery query);
......@@ -42,8 +42,8 @@ public interface TVacationInfoService extends IService<TVacationInfo> {
* 查询-详情:根据id查询数据
* @param id
* @return: R<TVacationInfoVO>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
R<TVacationInfoVO> getDataById(String id);
......@@ -51,8 +51,8 @@ public interface TVacationInfoService extends IService<TVacationInfo> {
* 销假:单条-根据id更新记录
* @param dto dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
R<Boolean> vacationEnd(ChangeVacationStatusDTO dto);
......@@ -60,8 +60,8 @@ public interface TVacationInfoService extends IService<TVacationInfo> {
* 导入: 通过json串格式导入假勤信息
* @param jsonStr json字符串数据
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
R<List<ErrorMessage>> batchImportByJsonStr(String jsonStr);
......@@ -69,8 +69,8 @@ public interface TVacationInfoService extends IService<TVacationInfo> {
* 删除-单条:根据id删除记录
* @param id
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
R<Boolean> removeDataById(String id);
......@@ -78,15 +78,15 @@ public interface TVacationInfoService extends IService<TVacationInfo> {
* 添加:新增-单条-添加一条记录
* @param dto
* @return: R<TVacationInfo>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
R<TVacationInfo> saveData(AddOrUpdateTVacationInfoDTO dto);
/**
* @author wangweiguo
* @description 更新假勤信息中的冗余信息
* @date 20:32 2021/8/24
* @author: huyc
* @date: 2023/1/13
* @param dtoList 更新冗余字段dto集合
* @return com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
**/
......
......@@ -11,8 +11,8 @@ import java.util.List;
/**
* @description: 假期监控清零日志表 service层
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
public interface TVacationMonitorClearLogService extends IService<TVacationMonitorClearLog> {
......@@ -20,17 +20,17 @@ public interface TVacationMonitorClearLogService extends IService<TVacationMonit
* @description: 查询-列表: 查询当前年假所有清零记录
* @param vacationMonitorId 年假监控id
* @return: R<List<TVacationMonitorClearLogVO>>
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
R<List<TVacationMonitorClearLogVO>> getList(Integer vacationMonitorId);
R<List<TVacationMonitorClearLogVO>> getList(String vacationMonitorId);
/**
* @description: 清零说明: 记录年假清零说明
* @param dto
* @return: R<Boolean>
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
R<Boolean> clearNote(AddVacationMonitorClearLogDTO dto);
}
......@@ -13,8 +13,8 @@ import java.util.List;
/**
* @description: 假期监控表 service层
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
public interface TVacationMonitorService extends IService<TVacationMonitor> {
......@@ -22,8 +22,8 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @description: 分页查询: 条件分页查询
* @param query 查询条件
* @return: R<IPage<TVacationMonitorVO>>
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
R<IPage<TVacationMonitorVO>> getListByPage(TVacationMonitorQuery query);
......@@ -31,8 +31,8 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @description: 导出:根据查询条件导出
* @param query 查询条件
* @return: R<List<TVacationMonitorVO>>
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
R<List<TVacationMonitorVO>> exportByParams(TVacationMonitorQuery query);
......@@ -40,8 +40,8 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @description: 保存或者更新监控记录
* @param entity
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/16
* @author: huyc
* @date: 2023/1/13
*/
boolean saveOrUpdateData(TVacationMonitor entity);
......@@ -49,8 +49,8 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @description: 批量保存 OR 新增
* @param list
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/16
* @author: huyc
* @date: 2023/1/13
*/
boolean batchSaveOrUpdateData(List<TVacationMonitor> list);
......@@ -58,24 +58,24 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @description: 查询:根据身份证号查询剩余年假
* @param idcard
* @return: com.yifu.cloud.v1.common.core.util.R<java.math.BigDecimal>
* @author: wangweiguo
* @date: 2021/8/17
* @author: huyc
* @date: 2023/1/13
*/
R<BigDecimal> getNotUsedVacationDurationByIdCard(String idcard);
/**
* @description: 定时任务:内部服务调用,每天初始化员工年假信息
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/17
* @author: huyc
* @date: 2023/1/13
*/
R<Boolean> buildMonitorData();
/**
* @description: 冗余更新:更新监控表中冗余的员工信息,电信工号和岗位
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/23
* @author: huyc
* @date: 2023/1/13
*/
R<Boolean> updateRedundancyEmployeeFields(List<UpdateVacationRedundancyDTO> dtoList);
......@@ -85,8 +85,8 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @param vacationDuration 假期时长
* @param year 年份
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
boolean releaseVacationDuration(String empIdcard, BigDecimal vacationDuration, String year);
......@@ -96,8 +96,8 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @param vacationDuration 假期时长
* @param year 年份
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
boolean consumeVacationDuration(String empIdcard, BigDecimal vacationDuration, String year);
......@@ -106,8 +106,8 @@ public interface TVacationMonitorService extends IService<TVacationMonitor> {
* @param empIdcard 身份证号
* @param year 假勤年份
* @return: com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationMonitor
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
TVacationMonitor getMonitorByEmpIdcardAndYear(String empIdcard, String year);
}
......@@ -11,16 +11,16 @@ import java.time.LocalDateTime;
/**
* @description: 假期配置 service
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
public interface TVacationRuleConfigService extends IService<TVacationRuleConfig> {
/**
* @description: 获取年假配置规则
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.VacationRuleConfigVO>
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
R<VacationRuleConfigVO> getVacationRuleConfig();
......@@ -29,8 +29,8 @@ public interface TVacationRuleConfigService extends IService<TVacationRuleConfig
* @param user
* @param dto
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
R<Boolean> addOrSave(YifuUser user, AddOrSaveVacationRuleDTO dto);
......@@ -38,8 +38,8 @@ public interface TVacationRuleConfigService extends IService<TVacationRuleConfig
* @description: 根据入职时间返回年假天数
* @param enjoinDate 入职时间
* @return: java.lang.Integer 年假天数
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
Integer annualLeaveCalculationFormula(LocalDateTime enjoinDate);
}
......@@ -14,8 +14,8 @@ import java.util.List;
/**
* B端离职信息表
*
* @author hgw
* @date 2021-08-17 17:02:47
* @author: huyc
* @date: 2023/1/13
*/
@Service("tBusLeaveService")
public class TBusLeaveServiceImpl extends ServiceImpl<TBusLeaveMapper, TBusLeave> implements TBusLeaveService {
......
......@@ -47,8 +47,8 @@ import java.util.concurrent.locks.ReentrantLock;
/**
* @description: 假勤信息表 service实现层
* @author: wangweiguo
* @date: 2021-08-20
* @author: huyc
* @date: 2023/1/13
*/
@AllArgsConstructor
@Service
......@@ -69,8 +69,8 @@ implements TVacationInfoService {
* @description: 分页查询: 条件分页查询
* @param query 查询条件
* @return: R<IPage<TVacationInfoVO>>
* @author: wangweiguo
* @date: 2021-08-24
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<IPage<TVacationInfoVO>> getListByPage(TVacationInfoQuery query) {
......@@ -84,8 +84,8 @@ implements TVacationInfoService {
* @description: 查询:根据条件出列表
* @param query 查询条件
* @return: IPage<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.TVacationInfoVO>>
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<List<TVacationInfoVO>> getList(TVacationInfoQuery query) {
......@@ -130,7 +130,7 @@ implements TVacationInfoService {
entity.setVacationNote(dto.getVacationNote());
entity.setActuralVacationEndTime(dto.getActuralVacationEndTime());
entity.setUpdateUser(user.getNickname());
entity.setUpdateUserId(Integer.valueOf(user.getId()));
entity.setUpdateUserId(user.getId());
entity.setUpdateTime(LocalDateTime.now());
boolean isSuccess = this.updateById(entity);
return R.ok(isSuccess,CommonConstants.RESULT_DATA_SUCESS);
......@@ -239,7 +239,7 @@ implements TVacationInfoService {
LocalDate vacationStart = dto.getVacationStartTime();
BeanUtil.copyProperties(dto, entity, CopyOptions.create().setIgnoreNullValue(true).setIgnoreProperties("vacationEndTime", "vacationStartTime"));
entity.setCreateUser(user.getNickname());
entity.setCreateUserId(Integer.valueOf(user.getId()));
entity.setCreateUserId(user.getId());
entity.setBusinessPost(businessEmployeeExtend.getBusinessPost());
entity.setEmpName(businessEmployeeExtend.getEmpName());
entity.setEmpIdcard(businessEmployeeExtend.getEmpIdcard());
......@@ -351,7 +351,7 @@ implements TVacationInfoService {
TVacationInfo entity = new TVacationInfo();
BeanUtil.copyProperties(dto, entity);
entity.setCreateUser(user.getNickname());
entity.setCreateUserId(Integer.valueOf(user.getId()));
entity.setCreateUserId(user.getId());
entity.setCreateTime(LocalDateTime.now());
if (StringUtils.equals(BusinessCommonContants.YEAR_VACATION_VALUE, entity.getVacationType())) {
String vacationYear = String.valueOf(dto.getVacationStartTime().getYear());
......
......@@ -25,8 +25,8 @@ import static com.yifu.cloud.plus.v1.business.util.BusinessResultErrorMsg.*;
/**
* @description: 假期监控清零日志表 service实现层
* @author: wangweiguo
* @date: 2021-08-16
* @author: huyc
* @date: 2023/1/13
*/
@Service
@AllArgsConstructor
......@@ -43,7 +43,7 @@ implements TVacationMonitorClearLogService {
* @Date: 2023/1/6 11:14
*/
@Override
public R<List<TVacationMonitorClearLogVO>> getList(Integer vacationMonitorId) {
public R<List<TVacationMonitorClearLogVO>> getList(String vacationMonitorId) {
if (vacationMonitorId == null) {
return R.ok(null,VACATION_MONITOR_ID_IS_NOT_NULL);
}
......@@ -90,7 +90,7 @@ implements TVacationMonitorClearLogService {
log.setVacationYear(vacationMonitor.getVacationYear());
log.setClearDuration(vacationMonitor.getNotUsedVacationDuration());
log.setClearUser(user.getNickname());
log.setClearUserId(Integer.valueOf(user.getId()));
log.setClearUserId(user.getId());
log.setClearTime(LocalDateTime.now());
boolean isSuccess = this.save(log);
......
......@@ -34,8 +34,8 @@ import java.util.stream.Collectors;
/**
* @description: 假期监控表 service实现层
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
@Service
@AllArgsConstructor
......@@ -50,8 +50,8 @@ implements TVacationMonitorService {
* @description: 分页查询: 条件分页查询
* @param query 查询条件
* @return: R<IPage<TVacationMonitorVO>>
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<IPage<TVacationMonitorVO>> getListByPage(TVacationMonitorQuery query) {
......@@ -68,8 +68,8 @@ implements TVacationMonitorService {
* @description: 导出:根据查询条件导出
* @param query 查询条件
* @return: R<List<TVacationMonitorVO>>
* @author: wangweiguo
* @date: 2021-08-13
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<List<TVacationMonitorVO>> exportByParams(TVacationMonitorQuery query) {
......@@ -82,8 +82,8 @@ implements TVacationMonitorService {
* @description: 保存或者更新监控记录
* @param entity
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/16
* @author: huyc
* @date: 2023/1/13
*/
@Override
public boolean saveOrUpdateData(TVacationMonitor entity) {
......@@ -95,8 +95,8 @@ implements TVacationMonitorService {
* @description: 批量保存 OR 新增
* @param list
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/16
* @author: huyc
* @date: 2023/1/13
*/
@Override
public boolean batchSaveOrUpdateData(List<TVacationMonitor> list) {
......@@ -113,8 +113,8 @@ implements TVacationMonitorService {
* @description: 查询-剩余年假:根据身份证号查询剩余年假
* @param idcard
* @return: com.yifu.cloud.v1.common.core.util.R<java.math.BigDecimal>
* @author: wangweiguo
* @date: 2021/8/17
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<BigDecimal> getNotUsedVacationDurationByIdCard(String idcard) {
......@@ -132,8 +132,8 @@ implements TVacationMonitorService {
/**
* @description: 定时任务:内部服务调用,每天初始化员工年假信息
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/17
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<Boolean> buildMonitorData() {
......@@ -144,7 +144,7 @@ implements TVacationMonitorService {
if (R.isSuccess(listR) && Common.isNotNull(listR.getData()) && Common.isNotNull(listR.getData().getExtendVO())) {
List<BusinessEmployeeExtendVO> list = listR.getData().getExtendVO();
List<TVacationMonitor> collect = list.stream().map(vo -> {
TVacationMonitor monitor = null;
TVacationMonitor monitor;
if (null != vo.getBusinessEnjoinDate()) {
String curentYear = String.valueOf(LocalDate.now().getYear());
monitor = this.lambdaQuery()
......@@ -175,8 +175,8 @@ implements TVacationMonitorService {
/**
* @description: 冗余更新:更新监控表中冗余的员工信息,电信工号和岗位
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/23
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<Boolean> updateRedundancyEmployeeFields(List<UpdateVacationRedundancyDTO> dtoList) {
......@@ -198,8 +198,8 @@ implements TVacationMonitorService {
* @param vacationDuration 假期时长
* @param year 年份
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
@Override
public boolean releaseVacationDuration(String empIdcard, BigDecimal vacationDuration, String year) {
......@@ -214,8 +214,8 @@ implements TVacationMonitorService {
* @param vacationDuration 假期时长
* @param year 年份
* @return: boolean
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
@Override
public boolean consumeVacationDuration(String empIdcard, BigDecimal vacationDuration, String year) {
......@@ -229,8 +229,8 @@ implements TVacationMonitorService {
* @param empIdcard 身份证号
* @param year 假勤年份
* @return: com.yifu.cloud.v1.hrobusiness.api.entity.vacation.TVacationMonitor
* @author: wangweiguo
* @date: 2021/8/24
* @author: huyc
* @date: 2023/1/13
*/
@Override
public TVacationMonitor getMonitorByEmpIdcardAndYear(String empIdcard, String year) {
......@@ -244,8 +244,8 @@ implements TVacationMonitorService {
* @description: 保存前,属性赋值
* @param entity
* @return: void
* @author: wangweiguo
* @date: 2021/8/16
* @author: huyc
* @date: 2023/1/13
*/
private void beforeSaveInit(TVacationMonitor entity) {
if (null != entity) {
......
......@@ -21,8 +21,8 @@ import java.time.temporal.TemporalAdjusters;
/**
* @description: 假期配置 service实现层
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@Service
public class TVacationRuleConfigServiceImpl extends ServiceImpl<TVacationRuleConfigMapper, TVacationRuleConfig>
......@@ -33,8 +33,8 @@ implements TVacationRuleConfigService {
/**
* @description: 获取年假配置规则
* @return: com.yifu.cloud.v1.common.core.util.R<com.yifu.cloud.v1.hrobusiness.api.vo.vacation.VacationRuleConfigVO>
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<VacationRuleConfigVO> getVacationRuleConfig() {
......@@ -50,8 +50,8 @@ implements TVacationRuleConfigService {
* @param user
* @param dto
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.Boolean>
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@Override
public R<Boolean> addOrSave(YifuUser user, AddOrSaveVacationRuleDTO dto) {
......@@ -80,8 +80,8 @@ implements TVacationRuleConfigService {
* @description: 根据入职时间返回年假天数
* @param enjoinDate 入职时间
* @return: java.lang.Integer 年假天数
* @author: wangweiguo
* @date: 2021/8/13
* @author: huyc
* @date: 2023/1/13
*/
@Override
public Integer annualLeaveCalculationFormula(LocalDateTime enjoinDate) {
......
......@@ -46,7 +46,12 @@ mybatis-plus:
spring:
application:
name: @artifactId@
servlet:
multipart:
#所有上传文件最大大小
max-request-size: 100MB
#单个文件最大大小
max-file-size: 100MB
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
......
......@@ -199,6 +199,17 @@
GROUP BY c.id
</insert>
<!--假期结束提醒-->
<select id="getVacationEmpName" resultType="java.lang.String">
SELECT c.EMP_NAME
FROM t_vacation_monitor c
where c.NOT_USED_VACATION_DURATION>0 and DATE_FORMAT(now(),'%Y') = c.VACATION_YEAR
and not exists (
select 1 from t_bus_leave l where l.tele_no = c.business_telecom_number
)
limit 1
</select>
<!--假期结束提醒-->
<select id="getVacationInfoEmpName" resultType="java.lang.String">
SELECT c.EMP_NAME
......
......@@ -10,7 +10,7 @@
<result property="clearDuration" column="CLEAR_DURATION" jdbcType="DECIMAL"/>
<result property="vacationYear" column="VACATION_YEAR" jdbcType="CHAR"/>
<result property="clearUser" column="CLEAR_USER" jdbcType="VARCHAR"/>
<result property="clearUserId" column="CLEAR_USER_ID" jdbcType="INTEGER"/>
<result property="clearUserId" column="CLEAR_USER_ID" jdbcType="VARCHAR"/>
<result property="clearTime" column="CLEAR_TIME" jdbcType="TIMESTAMP"/>
<result property="vacationMonitorId" column="VACATION_MONITOR_ID" jdbcType="INTEGER"/>
</resultMap>
......
......@@ -5,7 +5,7 @@
<mapper namespace="com.yifu.cloud.plus.v1.business.mapper.vacation.TVacationRuleConfigMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.business.entity.vacation.TVacationRuleConfig">
<id property="id" column="ID" jdbcType="INTEGER"/>
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="type" column="TYPE" jdbcType="CHAR"/>
<result property="vacationAutoInit" column="VACATION_AUTO_INIT" jdbcType="CHAR"/>
<result property="vacationInitDate" column="VACATION_INIT_DATE" jdbcType="DATE"/>
......
......@@ -334,6 +334,8 @@ public interface CommonConstants {
int EIGHT_INT = 8;
public static final String ZIP_TYPE = "zip";
public static final String JAR_TYPE = "jar";
int BATCH_COUNT = 100;
int BATCH_COUNT1 = 2000;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)";
......
......@@ -14,6 +14,9 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -652,4 +655,9 @@ public class Common {
}
return errorMessageList;
}
public static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) {
Set<Object> seen = ConcurrentHashMap.newKeySet();
return t -> seen.add(keyExtractor.apply(t));
}
}
......@@ -21,9 +21,9 @@ public class HrEquator extends GetterBaseEquator {
@Override
protected boolean isFieldEquals(FieldInfo fieldInfo) {
//空字段空串不更新忽略(单独处理的地方记录)
if(null == fieldInfo.getSecondVal() || (fieldInfo.getSecondVal() instanceof String && "" == ((String) fieldInfo.getSecondVal()).trim())){
/*if(null == fieldInfo.getSecondVal() || (fieldInfo.getSecondVal() instanceof String && "" == ((String) fieldInfo.getSecondVal()).trim())){
return true;
}
}*/
if (fieldInfo.getFirstVal() instanceof BigDecimal) {
BigDecimal first = (BigDecimal) fieldInfo.getFirstVal();
BigDecimal second = (BigDecimal) fieldInfo.getSecondVal();
......
......@@ -369,7 +369,7 @@ public class ArchivesDaprUtil {
* @return
**/
public R<TBusinessDataListVo> getNotLeaveExtendList() {
R<TBusinessDataListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/getNotLeaveExtendList" , "", TBusinessEmployeeExtendInfo.class, SecurityConstants.FROM_IN);
R<TBusinessDataListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/customerBusiness/temployeeBusiness/inner/getNotLeaveExtendList" , "", TBusinessDataListVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取所有非离职员工拓展表信息失败!");
}
......@@ -458,4 +458,18 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @Author fxj
* @Description 获取所有客户单位的项目信息
* @Date 21:18 2022/7/18
* @Param
* @return
**/
public R<TSettleDomainListVo> getSettlePermissionForB(String userId){
R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/msetttlecustomeruser/getSettlePermissionForB",userId, TSettleDomainListVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取B端项目信息失败!");
}
return res;
}
}
......@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import lombok.extern.log4j.Log4j2;
......@@ -29,7 +30,7 @@ public class SalaryDaprUtil {
* @Param
* @return
**/
public void updateSalarySettleStatus(List<EkpSocialViewVo> infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateSalarySettleStatus", JSON.toJSONString(infoVo), Object.class, SecurityConstants.FROM_IN);
public R<Boolean> updateSalarySettleStatus(List<EkpSocialViewVo> infoVo) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateSalarySettleStatus", JSON.toJSONString(infoVo), Boolean.class, SecurityConstants.FROM_IN);
}
}
......@@ -143,8 +143,8 @@ public class SocialDaprUtils {
* @Param
* @return
**/
public void updateSocialSettleStatus(List<EkpSocialViewVo> infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/updateSocialSettleStatus", JSON.toJSONString(infoVo), Object.class, SecurityConstants.FROM_IN);
public R<Boolean> updateSocialSettleStatus(List<EkpSocialViewVo> infoVo) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/updateSocialSettleStatus", JSON.toJSONString(infoVo), Boolean.class, SecurityConstants.FROM_IN);
}
/**
......@@ -154,7 +154,7 @@ public class SocialDaprUtils {
* @Param
* @return
**/
public void updateIncomeSettleStatus(List<EkpInsuranceViewVo> infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateIncomeSettleStatus", JSON.toJSONString(infoVo), Object.class, SecurityConstants.FROM_IN);
public R<Boolean> updateIncomeSettleStatus(List<EkpInsuranceViewVo> infoVo) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/updateIncomeSettleStatus", JSON.toJSONString(infoVo), Boolean.class, SecurityConstants.FROM_IN);
}
}
......@@ -1291,4 +1291,9 @@ public class InsurancesConstants {
*/
public static final String HANDLE_PROVINCE_IS_NULL = "该记录的商险办理地为空";
/**
* 再次同步状态成功
*/
public static final String AGAIN_UPDATE_STATUS = "再次同步状态成功";
}
/*
* 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.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
@Data
@TableName("t_update_status_error")
@EqualsAndHashCode()
@Schema(description = "同步结算状态的错误表")
public class TUpdateStatusError {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 内容
*/
@Schema(description = "内容")
private String title;
/**
* 结算单号
*/
@Schema(description = "结算单号")
private String settleNo;
/**
* 结算单号类型 0 收入 1 支出
*/
@Schema(description = "结算单号类型 0 收入 1 支出")
private String settleType;
/**
* 结算单类型 0 社保 1公积金 2管理费 3风险金 4 商险 5 薪资
*/
@Schema(description = "结算单类型 0 社保 1公积金 2管理费 3风险金 4 商险 5 薪资")
private String typeFlag;
/**
* 创建人时间
*/
@Schema(description = "创建人时间")
private Date createTime;
/**
* 更新状态 0 未更新 1 已更新
*/
@Schema(description = "更新状态 0 未更新 1 已更新")
private Integer status;
}
......@@ -734,4 +734,18 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.updateSalarySettleStatus(vo);
}
/**
* 重新更新结算状态同步失败的数据
*
* @author licancan
* @param
* @return void
*/
@SysLog("重新更新结算状态同步失败的数据")
@Inner
@PostMapping("/inner/updateSettleStatus")
public void updateSettleStatus() {
tInsuranceDetailService.updateSettleStatus();
}
}
/*
* 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.insurances.mapper.insurances;
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.insurances.entity.TUpdateStatusError;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
@Mapper
public interface TUpdateStatusErrorMapper extends BaseMapper<TUpdateStatusError> {
/**
* 同步结算状态的错误表简单分页查询
* @param tUpdateStatusError 同步结算状态的错误表
* @return
*/
IPage<TUpdateStatusError> getTUpdateStatusErrorPage(Page<TUpdateStatusError> page, @Param("tUpdateStatusError") TUpdateStatusError tUpdateStatusError);
}
......@@ -501,4 +501,12 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return: R
**/
R updateSalarySettleStatus(EkpStatusParamVo vo);
/**
* @Description: 重新更新结算状态同步失败的数据
* @Author: huyc
* @Date: 2023/1/11 15:56
* @return:
**/
void updateSettleStatus();
}
/*
* 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.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TUpdateStatusError;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
public interface TUpdateStatusErrorService extends IService<TUpdateStatusError> {
}
......@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetailMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceAreaResService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*;
......@@ -123,6 +124,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private TBusinessOperateService tBusinessOperateService;
@Resource
private TInsuranceAreaResService tInsuranceAreaResService;
@Resource
private TUpdateStatusErrorMapper updateStatusErrorMapper;
/***********************商险办理********************************/
/**
* 每日定时刷新商险到期数据
......@@ -3379,7 +3382,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map<String, List<InsuranceRegisterParam>>}
*/
private List<InsuranceRegisterParam> registeredPolicyPremiumCheck(List<InsuranceRegisterParam> paramList,List<TInsuranceAreaRes> insuranceAreaResList){
for (InsuranceRegisterParam param : paramList.stream().distinct().collect(Collectors.toList())) {
List<InsuranceRegisterParam> distinctList = paramList.stream().distinct().collect(Collectors.toList());
//定义外层循环标识,方便去重的时候跳出
outer:
for (int i = 0; i < distinctList.size(); i++) {
InsuranceRegisterParam param = distinctList.get(i);
// 必填校验
if (StringUtils.isBlank(param.getEmpName())){
param.setErrorMessage(InsurancesConstants.EMP_NAME_NOT_EMPTY);
......@@ -3435,6 +3442,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间、购买标准
for (int j = 0; j < distinctList.size(); j++) {
InsuranceRegisterParam repeat = distinctList.get(j);
if (param.getEmpName().equals(repeat.getEmpName())
&& param.getEmpIdcardNo().equals(repeat.getEmpIdcardNo())
&& param.getInsuranceCompanyName().equals(repeat.getInsuranceCompanyName())
&& param.getInsuranceTypeName().equals(repeat.getInsuranceTypeName())
&& param.getPolicyStart().equals(repeat.getPolicyStart()) && param.getPolicyEnd().equals(repeat.getPolicyEnd())
&& param.getBuyStandard().equals(repeat.getBuyStandard())
&& i != j){
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
continue outer;
}
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, param.getEmpName())
......@@ -3615,7 +3638,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//所有校验通过后设置查到的结果
param.setDetail(detail);
}
return paramList.stream().distinct().collect(Collectors.toList());
return distinctList;
}
/**
......@@ -5637,6 +5660,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd))
.eq(TInsuranceDetail::getBuyStandard,buyStandard)
.orderByDesc(TInsuranceDetail::getUpdateTime)
.eq(TInsuranceDetail::getIsEffect,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL);
List<TInsuranceDetail> list = list(queryWrapper);
if (list.size()>1){
......@@ -7240,12 +7264,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
try {
doJointInsuranceTask.updateSocialSettleStatus(vo);
}catch (Exception e) {
log.error("社保结算状态更新异常", e);
return R.failed("社保结算状态更新异常");
}
doJointInsuranceTask.updateSocialSettleStatus(vo);
return R.ok(); }
@Override
......@@ -7253,12 +7272,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isEmpty(vo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
try {
doJointInsuranceTask.updateIncomeSettleStatus(vo);
}catch (Exception e) {
log.error("收入结算状态更新异常", e);
return R.failed("收入结算状态更新异常");
}
doJointInsuranceTask.updateIncomeSettleStatus(vo);
return R.ok(); }
......@@ -7275,6 +7289,46 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
return R.ok(); }
@Override
public void updateSettleStatus() {
//获取所有结算状态同步失败的数据
long count = updateStatusErrorMapper.selectCount(Wrappers.<TUpdateStatusError>query().lambda()
.eq(TUpdateStatusError::getStatus,CommonConstants.ZERO_INT));
if (count > 0) {
List<TUpdateStatusError> list;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
for (int j = 0; j < i; j++) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
list = updateStatusErrorMapper.selectList(Wrappers.<TUpdateStatusError>query().lambda()
.eq(TUpdateStatusError::getStatus,CommonConstants.ZERO_INT).last(" limit 0,10000"));
synchronized (this) {
if (Common.isNotNull(list)) {
for (TUpdateStatusError t: list) {
//更新商险结算状态
if (CommonConstants.FOUR_STRING.equals(t.getTypeFlag())) {
doJointInsuranceTask.aUpdateInsuranceSettleStatus(t);
}
//更新社保结算状态
if (CommonConstants.ONE_STRING.equals(t.getTypeFlag()) ||
CommonConstants.ZERO_STRING.equals(t.getTypeFlag())) {
doJointInsuranceTask.aUpdateSocialSettleStatus(t);
}
//更新收入结算状态
if (CommonConstants.TWO_STRING.equals(t.getTypeFlag()) ||
CommonConstants.THREE_STRING.equals(t.getTypeFlag())) {
doJointInsuranceTask.aUpdateIncomeSettleStatus(t);
}
//更新薪资结算状态
if (CommonConstants.FIVE_STRING.equals(t.getTypeFlag())) {
doJointInsuranceTask.aUpdateSalarySettleStatus(t);
}
}
}
}
}
}
}
private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
......
/*
* 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.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TUpdateStatusError;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TUpdateStatusErrorService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 同步结算状态的错误表
*
* @author huyc
* @date 2023-01-11 10:26:30
*/
@Log4j2
@Service
public class TUpdateStatusErrorServiceImpl extends ServiceImpl<TUpdateStatusErrorMapper, TUpdateStatusError> implements TUpdateStatusErrorService {
}
......@@ -94,7 +94,8 @@
if(a.earningStatus = '已结算','0',if(a.earningStatus = '结算中','1',if(a.earningStatus = '已冻结','3','2'))) earningStatus,
if(a.receiptStatus = '已收','0',if(a.receiptStatus = '垫付','2','1')) receiptStatus,
if(a.zhichuEarningStatus = '已结算','0',if(a.zhichuEarningStatus = '结算中','1','2')) zhichuEarningStatus,
if(a.payStatus = '已付','0','1') payStatus
if(a.payStatus = '已付','0','1') payStatus,
a.orderType
from
view_funds_info a
where
......
<?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.insurances.mapper.insurances.TUpdateStatusErrorMapper">
<resultMap id="tUpdateStatusErrorMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TUpdateStatusError">
<id property="id" column="ID"/>
<result property="title" column="TITLE"/>
<result property="settleNo" column="SETTLE_NO"/>
<result property="settleType" column="SETTLE_TYPE"/>
<result property="typeFlag" column="TYPE_FLAG"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="status" column="STATUS"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.TITLE,
a.SETTLE_NO,
a.SETTLE_TYPE,
a.TYPE_FLAG,
a.CREATE_TIME,
a.STATUS
</sql>
<sql id="tUpdateStatusError_where">
<if test="tUpdateStatusError != null">
<if test="tUpdateStatusError.id != null and tUpdateStatusError.id.trim() != ''">
AND a.ID = #{tUpdateStatusError.id}
</if>
<if test="tUpdateStatusError.title != null and tUpdateStatusError.title.trim() != ''">
AND a.TITLE = #{tUpdateStatusError.title}
</if>
<if test="tUpdateStatusError.settleNo != null and tUpdateStatusError.settleNo.trim() != ''">
AND a.SETTLE_NO = #{tUpdateStatusError.settleNo}
</if>
<if test="tUpdateStatusError.settleType != null and tUpdateStatusError.settleType.trim() != ''">
AND a.SETTLE_TYPE = #{tUpdateStatusError.settleType}
</if>
<if test="tUpdateStatusError.typeFlag != null and tUpdateStatusError.typeFlag.trim() != ''">
AND a.TYPE_FLAG = #{tUpdateStatusError.typeFlag}
</if>
<if test="tUpdateStatusError.createTime != null">
AND a.CREATE_TIME = #{tUpdateStatusError.createTime}
</if>
<if test="tUpdateStatusError.status != null">
AND a.STATUS = #{tUpdateStatusError.status}
</if>
</if>
</sql>
<!--tUpdateStatusError简单分页查询-->
<select id="getTUpdateStatusErrorPage" resultMap="tUpdateStatusErrorMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_update_status_error a
<where>
1=1
<include refid="tUpdateStatusError_where"/>
</where>
</select>
</mapper>
package com.yifu.cloud.plus.v1.job.compont; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprBusinessProperties;import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.context.properties.EnableConfigurationProperties;import org.springframework.stereotype.Component; /** * @author wangweiguo * @description hrob端微服务定时任务 * @date 22:31 2021/8/17 **/@Component(value = "businessTask")@Slf4j@EnableConfigurationProperties(DaprBusinessProperties.class)public class BusinessTask { @Autowired private DaprBusinessProperties daprBusinessProperties; /** * @Description: 发送短信定时任务 * @Author: huyc * @Date: 2023/1/5 9:35 * @return: void **/ public void buildMonitorData(){ log.info("------------初始化年假信息定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/vacationMonitor/inner/buildMonitorDataForCurrentYear", "", Object.class, SecurityConstants.FROM_IN); log.info("------------初始化年假信息定时任务-结束------------"); } // /** // * @author fxj // * @description 每天更新证件状态 // * @date 2021-08-23 // * @return void // **/ // public void updateCertStatusTask() { // log.info("------------扫描定时任务开始:定时更新B端证据状态信息开始------------"); // remoteBusinessService.updateCertStatusTask(SecurityConstants.FROM_IN); // log.info("------------扫描定时任务开始:定时更新B端证据状态信息结束------------"); // } /** * @Description: 发送短信定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doBatchSendBusSms(){ log.info("------------发送短信定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doBatchSendBusSms", "", Object.class, SecurityConstants.FROM_IN); log.info("------------发送短信定时任务-结束------------"); } /** * @Description: 短信状态更新定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doUpdateSendBusSmsStatus(){ log.info("------------短信状态更新定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doUpdateSendBusSmsStatus", "", Object.class, SecurityConstants.FROM_IN); log.info("------------短信状态更新定时任务-结束------------"); } }
\ No newline at end of file
package com.yifu.cloud.plus.v1.job.compont; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprBusinessProperties;import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.context.properties.EnableConfigurationProperties;import org.springframework.stereotype.Component; /** * @author wangweiguo * @description hrob端微服务定时任务 * @date 22:31 2021/8/17 **/@Component(value = "businessTask")@Slf4j@EnableConfigurationProperties(DaprBusinessProperties.class)public class BusinessTask { @Autowired private DaprBusinessProperties daprBusinessProperties; /** * @Description: 发送短信定时任务 * @Author: huyc * @Date: 2023/1/5 9:35 * @return: void **/ public void buildMonitorData(){ log.info("------------初始化年假信息定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/vacationMonitor/inner/buildMonitorDataForCurrentYear", "", Object.class, SecurityConstants.FROM_IN); log.info("------------初始化年假信息定时任务-结束------------"); } /** * @author fxj * @description 每天更新证件状态 * @date 2021-08-23 * @return void **/ public void updateCertStatusTask() { log.info("------------扫描定时任务开始:定时更新B端证据状态信息开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tcertinfo/inner/updateCertStatusTask", "", Object.class, SecurityConstants.FROM_IN); log.info("------------扫描定时任务开始:定时更新B端证据状态信息结束------------"); } /** * @Description: 发送短信定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doBatchSendBusSms(){ log.info("------------发送短信定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doBatchSendBusSms", "", Object.class, SecurityConstants.FROM_IN); log.info("------------发送短信定时任务-结束------------"); } /** * @Description: 短信状态更新定时任务 * @Author: hgw * @Date: 2021/8/25 9:35 * @return: void **/ public void doUpdateSendBusSmsStatus(){ log.info("------------短信状态更新定时任务-开始------------"); HttpDaprUtil.invokeMethodPost(daprBusinessProperties.getAppUrl(), daprBusinessProperties.getAppId(), "/tbuswarning/inner/doUpdateSendBusSmsStatus", "", Object.class, SecurityConstants.FROM_IN); log.info("------------短信状态更新定时任务-结束------------"); } }
\ No newline at end of file
......
......@@ -33,4 +33,17 @@ public class UpdateOverdueTask {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/updateOverdueByTask","", Void.class, SecurityConstants.FROM_IN);
log.info("------------更新商险到期-定时任务结束------------");
}
/**
* 重新更新结算状态同步失败的数据
*
* @author huyc
* @param
* @return void
*/
public void updateSettleStatus() throws Exception {
log.info("-------------重新更新结算状态同步失败的数据-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/updateSettleStatus","", Void.class, SecurityConstants.FROM_IN);
log.info("------------重新更新结算状态同步失败的数据-定时任务结束------------");
}
}
......@@ -301,7 +301,7 @@ public class TSalaryAccountController {
**/
@Inner
@PostMapping("/inner/updateSalarySettleStatus")
public void updateSalarySettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
tSalaryAccountService.updateSalarySettleStatus(viewVo);
public Boolean updateSalarySettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
return tSalaryAccountService.updateSalarySettleStatus(viewVo);
}
}
......@@ -134,7 +134,7 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @Date: 2022/12/26 17:56
* @return: R
**/
void updateSalarySettleStatus(List<EkpSocialViewVo> viewVo);
Boolean updateSalarySettleStatus(List<EkpSocialViewVo> viewVo);
/**
* @param page 分页
......
......@@ -237,24 +237,30 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
@Override
public void updateSalarySettleStatus(List<EkpSocialViewVo> viewVoList) {
public Boolean updateSalarySettleStatus(List<EkpSocialViewVo> viewVoList) {
TSalaryAccount account;
if (!viewVoList.isEmpty()) {
for (EkpSocialViewVo viewVo: viewVoList) {
//根据明细id更新结算状态
account = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(account)) {
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
account.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
account.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
account.setPaySettleFlag(viewVo.getPaySettleFlag());
account.setPayCollectFlag(viewVo.getPayCollectFlag());
try {
if (!viewVoList.isEmpty()) {
for (EkpSocialViewVo viewVo : viewVoList) {
//根据明细id更新结算状态
account = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(account)) {
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
account.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
account.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
account.setPaySettleFlag(viewVo.getPaySettleFlag());
account.setPayCollectFlag(viewVo.getPayCollectFlag());
}
baseMapper.updateById(account);
}
baseMapper.updateById(account);
}
}
} catch (Exception e) {
log.error("更新薪资结算状态失败", e);
return false;
}
return true;
}
/**
......
......@@ -231,7 +231,7 @@ public class TIncomeController {
**/
@Inner
@PostMapping("/inner/updateIncomeSettleStatus")
public void updateSocialSettleStatus(@RequestBody List<EkpInsuranceViewVo> viewVo) {
tIncomeService.updateIncomeSettleStatus(viewVo);
public Boolean updateSocialSettleStatus(@RequestBody List<EkpInsuranceViewVo> viewVo) {
return tIncomeService.updateIncomeSettleStatus(viewVo);
}
}
......@@ -456,7 +456,7 @@ public class TPaymentInfoController {
**/
@Inner
@PostMapping("/inner/updateSocialSettleStatus")
public void updateSocialSettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
tPaymentInfoService.updateSocialSettleStatus(viewVo);
public Boolean updateSocialSettleStatus(@RequestBody List<EkpSocialViewVo> viewVo) {
return tPaymentInfoService.updateSocialSettleStatus(viewVo);
}
}
......@@ -98,6 +98,6 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/12/26 17:56
* @return:
**/
void updateIncomeSettleStatus(List<EkpInsuranceViewVo> viewVo);
Boolean updateIncomeSettleStatus(List<EkpInsuranceViewVo> viewVo);
}
......@@ -167,7 +167,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
**/
R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo);
void updateSocialSettleStatus(List<EkpSocialViewVo> viewVo);
Boolean updateSocialSettleStatus(List<EkpSocialViewVo> viewVo);
// hgw2023-1-6 10:42:06:以下:B端相关接口:
/**
......
......@@ -802,19 +802,25 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
@Override
public void updateIncomeSettleStatus(List<EkpInsuranceViewVo> viewVoList) {
if (!viewVoList.isEmpty()) {
TIncome income;
for (EkpInsuranceViewVo viewVo : viewVoList) {
//根据明细id更新结算状态
income = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(income)) {
income.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
income.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
baseMapper.updateById(income);
public Boolean updateIncomeSettleStatus(List<EkpInsuranceViewVo> viewVoList) {
try {
if (!viewVoList.isEmpty()) {
TIncome income;
for (EkpInsuranceViewVo viewVo : viewVoList) {
//根据明细id更新结算状态
income = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(income)) {
income.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
income.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
baseMapper.updateById(income);
}
}
}
} catch (Exception e) {
log.error("更新收入结算状态失败", e);
return false;
}
return true;
}
}
......@@ -3273,44 +3273,50 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
@Override
public void updateSocialSettleStatus(List<EkpSocialViewVo> viewVoList) {
public Boolean updateSocialSettleStatus(List<EkpSocialViewVo> viewVoList) {
if (!viewVoList.isEmpty()) {
TPaymentInfo paymentInfo;
TForecastLibrary library;
for (EkpSocialViewVo viewVo: viewVoList) {
//判断预估还是实缴
if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_THR)) {
//根据明细id更新结算状态
paymentInfo = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(paymentInfo)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
paymentInfo.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
paymentInfo.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
paymentInfo.setPaySettleFlag(viewVo.getPaySettleFlag());
paymentInfo.setPayCollectFlag(viewVo.getPayCollectFlag());
try {
for (EkpSocialViewVo viewVo : viewVoList) {
//判断预估还是实缴
if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_THR)) {
//根据明细id更新结算状态
paymentInfo = baseMapper.selectById(viewVo.getId());
if (Common.isNotNull(paymentInfo)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
paymentInfo.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
paymentInfo.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
paymentInfo.setPaySettleFlag(viewVo.getPaySettleFlag());
paymentInfo.setPayCollectFlag(viewVo.getPayCollectFlag());
}
baseMapper.updateStatusById(paymentInfo);
log.info("缴费库实缴费用状态更新");
}
baseMapper.updateStatusById(paymentInfo);
log.info("缴费库实缴费用状态更新");
}
} else if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_ONE)) {
//根据明细id更新结算状态
library = tForecastLibraryMapper.selectById(viewVo.getId());
if (Common.isNotNull(library)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
library.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
library.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
library.setPaySettleFlag(viewVo.getPaySettleFlag());
library.setPayCollectFlag(viewVo.getPayCollectFlag());
} else if (viewVo.getSettleFlag().contains(SocialConstants.DIFF_TYPE_ONE)) {
//根据明细id更新结算状态
library = tForecastLibraryMapper.selectById(viewVo.getId());
if (Common.isNotNull(library)) {
//判断是收入还是支出结算单号
if (CommonConstants.ZERO_STRING.equals(viewVo.getPayFlag())) {
library.setIncomeSettleFlag(viewVo.getIncomeSettleFlag());
library.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
} else {
library.setPaySettleFlag(viewVo.getPaySettleFlag());
library.setPayCollectFlag(viewVo.getPayCollectFlag());
}
tForecastLibraryMapper.updateById(library);
}
tForecastLibraryMapper.updateById(library);
}
}
} catch (Exception e) {
log.error("更新社保结算状态失败", e);
return false;
}
}
return true;
}
/**
......
......@@ -1423,9 +1423,9 @@
a.UNIT_UNEMPLOYMENT_SET,
a.UNIT_INJURY_SET,
a.UNIT_BIRTH_SET,
a.PERSONAL_PENSION_SET,
a.PERSONAL_MEDICAL_SET,
a.PERSONAL_UNEMPLOYMENT_SET,
a.UNIT_PENSION_SET as PERSONAL_PENSION_SET,
a.UNIT_MEDICAL_SET as PERSONAL_MEDICAL_SET,
a.UNIT_UNEMPLOYMENT_SET as PERSONAL_UNEMPLOYMENT_SET,
a.UNIT_PENSION_PER,
a.UNIT_MEDICAL_PER,
a.UNIT_UNEMPLOYMENT_PER,
......@@ -1503,18 +1503,18 @@
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
</if>
<if test="tPaymentInfo.createUser != null and tPaymentInfo.createUser.trim() != ''">
AND a.CREATE_BY = #{tPaymentInfo.createUser}
<if test="tPaymentInfo.createBy != null and tPaymentInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tPaymentInfo.createBy}
</if>
<if test="tPaymentInfo.createTime != null">
AND a.CREATE_TIME = #{tPaymentInfo.createTime}
</if>
<if test="tPaymentInfo.lastUpdateUser != null and tPaymentInfo.lastUpdateUser.trim() != ''">
<!--<if test="tPaymentInfo.lastUpdateUser != null and tPaymentInfo.lastUpdateUser.trim() != ''">
AND a.UPDATE_BY = #{tPaymentInfo.lastUpdateUser}
</if>
<if test="tPaymentInfo.lastUpdateTime != null">
AND a.UPDATE_TIME = #{tPaymentInfo.lastUpdateTime}
</if>
</if>-->
<if test="tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''">
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
</if>
......
......@@ -116,6 +116,5 @@ public class SysMenu extends BaseEntity {
@Schema(description = "是否系统内置")
private String systemFlag;
@NotBlank(message = "所属终端 不能为空")
private String clientId;
}
......@@ -64,7 +64,6 @@ public class SysRole extends BaseEntity {
@Schema(description = "是否是系统内置")
private String systemFlag;
@NotBlank(message = "所属终端 不能为空")
private String clientId;
}
......@@ -22,6 +22,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.ehcache.impl.internal.util.ServiceUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
......@@ -78,6 +79,7 @@ public class BusinessUserController {
@Operation(description = "B端用户分页")
public R<Page<BusinessUserVo>> getBusinessUserPage(Page<BusinessUserVo> page, BusinessUserVo user) {
user.setDeptId(CommonConstants.HR_B_ORG_ID);
user.setType(CommonConstants.TWO_STRING);
Page<BusinessUserVo> businessUserVoPage = userService.getBusinessUserVoPage(page, user);
//获取客户信息
if(Common.isNotNull(businessUserVoPage.getRecords())){
......@@ -121,6 +123,7 @@ public class BusinessUserController {
user.setDelFlag(CommonConstants.ZERO_STRING);
user.setCreateTime(LocalDateTime.now());
user.setDeptName("客户单位");
user.setType(CommonConstants.TWO_STRING);
//使用根节点
user.setDeptId(CommonConstants.HR_B_ORG_ID);
if (Common.isNotNull(user.getPassword())){
......@@ -130,16 +133,26 @@ public class BusinessUserController {
SysUser sysUser = null;
SysUser userTemp = null;
if (null != user && null != user.getUserId()){
sysUser = userService.getOne(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getUsername,user.getUsername()).ne(SysUser::getUserId,user.getUserId())
sysUser = userService.getOne(Wrappers.<SysUser>lambdaQuery()
.eq(SysUser::getUsername,user.getUsername())
.ne(SysUser::getUserId,user.getUserId())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(user.getPhone())){
userTemp = userService.getOne(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getPhone, user.getPhone()).ne(SysUser::getUserId,user.getUserId())
userTemp = userService.getOne(Wrappers.<SysUser>lambdaQuery()
.eq(SysUser::getPhone, user.getPhone())
.ne(SysUser::getUserId,user.getUserId())
.eq(SysUser::getType,CommonConstants.TWO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
}
}else {
sysUser = userService.getOne(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getUsername,user.getUsername()).last(CommonConstants.LAST_ONE_SQL));
sysUser = userService.getOne(Wrappers.<SysUser>lambdaQuery()
.eq(SysUser::getUsername,user.getUsername())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(user.getPhone())){
userTemp = userService.getOne(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getPhone, user.getPhone()).last(CommonConstants.LAST_ONE_SQL));
userTemp = userService.getOne(Wrappers.<SysUser>lambdaQuery()
.eq(SysUser::getPhone, user.getPhone())
.eq(SysUser::getType,CommonConstants.TWO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
}
}
if(null != sysUser){
......@@ -223,19 +236,21 @@ public class BusinessUserController {
Set<SysMenu> all = new HashSet<>();
SecurityUtils.getRolesByClient(ClientNameConstants.CLIENT_B)
.forEach(roleId -> all.addAll(sysMenuService.findMenuByRoleId(roleId)));
List<MenuTreeForVue> menuTreeList;
if (Common.isNotNull(type)) {
menuTreeList = all.stream()
.filter(menuVo -> type.equals(menuVo.getType()))
.map(MenuTreeForVue::new)
.sorted(Comparator.comparingInt(MenuTreeForVue::getSort))
.collect(Collectors.toList());
} else {
menuTreeList = all.stream()
.map(MenuTreeForVue::new)
.sorted(Comparator.comparingInt(MenuTreeForVue::getSort))
.collect(Collectors.toList());
}
List<MenuTreeForVue> menuTreeList = null;
if (Common.isNotNull(all)){
if (Common.isNotNull(type)) {
menuTreeList = all.stream().filter(Common.distinctByKey(SysMenu::getMenuId))
.filter(menuVo -> type.equals(menuVo.getType()))
.map(MenuTreeForVue::new)
.sorted(Comparator.comparingInt(MenuTreeForVue::getSort))
.collect(Collectors.toList());
} else {
menuTreeList = all.stream().filter(Common.distinctByKey(SysMenu::getMenuId))
.map(MenuTreeForVue::new)
.sorted(Comparator.comparingInt(MenuTreeForVue::getSort))
.collect(Collectors.toList());
}
}
return new R<>(TreeUtil.bulid(menuTreeList, -1));
}
/**
......
......@@ -62,6 +62,7 @@ public class MenuController {
*/
@GetMapping("/page")
public R<IPage<List<SysMenu>>> getMenuPage(Page page, SysMenu sysMenu) {
sysMenu.setClientId(ClientNameConstants.CLIENT_MVP);
return R.ok(sysMenuService.getMenuPage(page, sysMenu));
}
......
......@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.RoleVo;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleMenuService;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
......@@ -119,7 +120,9 @@ public class RoleController {
*/
@GetMapping("/list")
public R<List<SysRole>> listRoles() {
return R.ok(sysRoleService.list(Wrappers.emptyWrapper()));
return R.ok(sysRoleService.list(Wrappers.<SysRole>query().lambda()
.eq(SysRole::getClientId,ClientNameConstants.CLIENT_MVP)
.eq(SysRole::getDelFlag, CommonConstants.ZERO_STRING)));
}
/**
......@@ -129,6 +132,7 @@ public class RoleController {
*/
@GetMapping("/page")
public R<IPage<SysRole>> getRolePage(Page page, SysRole sysRole) {
sysRole.setClientId(ClientNameConstants.CLIENT_MVP);
return R.ok(sysRoleService.getSysRoleByPage(page, sysRole));
}
......
......@@ -179,6 +179,7 @@ public class UserController {
@PostMapping
@PreAuthorize("@pms.hasPermission('sys_user_add')")
public R<Boolean> user(@RequestBody UserDTO userDto) {
userDto.setType(CommonConstants.ZERO_STRING);
return R.ok(userService.saveUser(userDto));
}
......@@ -192,6 +193,7 @@ public class UserController {
@PutMapping
@PreAuthorize("@pms.hasPermission('sys_user_edit')")
public R<Boolean> updateUser(@Valid @RequestBody UserDTO userDto) {
userDto.setType(CommonConstants.ZERO_STRING);
return R.ok(userService.updateUser(userDto));
}
......
......@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysMenuMapper;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMenuMapper;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysMenuService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.enums.MenuTypeEnum;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
......@@ -116,7 +117,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
public List<Tree<Long>> treeMenu(boolean lazy, Long parentId) {
if (!lazy) {
List<TreeNode<Long>> collect = baseMapper
.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSortOrder)).stream()
.selectList(Wrappers.<SysMenu>lambdaQuery()
.eq(SysMenu::getClientId, ClientNameConstants.CLIENT_MVP)
.orderByAsc(SysMenu::getSortOrder)).stream()
.map(getNodeFunction()).collect(Collectors.toList());
return TreeUtil.build(collect, CommonConstants.MENU_TREE_ROOT_ID);
......@@ -126,6 +129,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
List<TreeNode<Long>> collect = baseMapper
.selectList(Wrappers.<SysMenu>lambdaQuery().eq(SysMenu::getParentId, parent)
.eq(SysMenu::getClientId, ClientNameConstants.CLIENT_MVP)
.orderByAsc(SysMenu::getSortOrder))
.stream().map(getNodeFunction()).collect(Collectors.toList());
......@@ -218,6 +222,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
if (StrUtil.isNotBlank(sysMenu.getDelFlag())){
wrapper.eq(SysMenu::getDelFlag,sysMenu.getDelFlag());
}
if (StrUtil.isNotBlank(sysMenu.getClientId())){
wrapper.eq(SysMenu::getClientId,sysMenu.getClientId());
}
return wrapper;
}
......
......@@ -167,6 +167,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
if (StrUtil.isNotBlank(sysRole.getRoleName())){
wrapper.likeRight(SysRole::getRoleName,sysRole.getRoleName());
}
if (Common.isNotNull(sysRole.getClientId())){
wrapper.eq(SysRole::getClientId,sysRole.getClientId());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return wrapper;
}
......@@ -217,12 +220,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
}
if (CommonConstants.ZERO_STRING.equals(type)){
if (StrUtil.isNotBlank(sysRole.getRoleName())){
wrapper.likeRight(SysRole::getRoleName,sysRole.getRoleName());
wrapper.eq(SysRole::getRoleName,sysRole.getRoleName());
}
}
if (CommonConstants.ONE_STRING.equals(type)){
if (StrUtil.isNotBlank(sysRole.getRoleCode())){
wrapper.likeRight(SysRole::getRoleCode,sysRole.getRoleCode());
wrapper.eq(SysRole::getRoleCode,sysRole.getRoleCode());
}
}
wrapper.last(CommonConstants.LAST_ONE_SQL);
......
......@@ -162,7 +162,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
);
}
// 结算主体权限
R< TSettleDomainListVo > sdRes = archivesDaprUtil.getPermissionByUserId(sysUser.getUserId());
R< TSettleDomainListVo > sdRes = null;
if (CommonConstants.TWO_STRING.equals(sysUser.getType())){
sdRes = archivesDaprUtil.getSettlePermissionForB(sysUser.getUserId());
}else {
sdRes = archivesDaprUtil.getPermissionByUserId(sysUser.getUserId());
}
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData())){
userInfo.setSettleIdList(sdRes.getData().getDeptIds());
}
......@@ -635,6 +640,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
user.setUpdateTime(LocalDateTime.now());
user.setUpdateBy("C端");
}
user.setType(CommonConstants.THREE_STRING);
user.setWxOpenid(openId);
return this.saveOrUpdate(user);
}
......
......@@ -165,7 +165,7 @@
FROM sys_user
LEFT JOIN sys_dept ON sys_dept.dept_id = sys_user.dept_id
<where>
sys_user.del_flag = '0'
sys_user.del_flag = '0' and (sys_user.type = '0' or sys_user.type = '1')
<if test="query.username != null and query.username != ''">
<bind name="usernameLike" value="'%' + query.username + '%'" />
and sys_user.username LIKE #{usernameLike}
......@@ -307,6 +307,9 @@
<if test="query.deptId != null and query.deptId != ''">
and `user`.dept_id = #{query.deptId}
</if>
<if test="query.type != null and query.type != ''">
and `user`.type = #{query.type}
</if>
<if test="query.nickname != null and query.nickname != ''">
and `user`.nickname LIKE CONCAT('%',#{query.nickname},'%')
</if>
......
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