Commit 3b08fc13 authored by hongguangwu's avatar hongguangwu

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

parents d584d619 4eca183f
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
<module>yifu-order</module> <module>yifu-order</module>
<module>yifu-mail</module> <module>yifu-mail</module>
<module>yifu-business</module> <module>yifu-business</module>
<module>yifu-msg</module>
</modules> </modules>
<dependencyManagement> <dependencyManagement>
......
...@@ -145,6 +145,14 @@ public class ArchivesConstants { ...@@ -145,6 +145,14 @@ public class ArchivesConstants {
* 处理状态 * 处理状态
*/ */
public static final String HANDLE_FLAG_TWO= "已处理-未处理"; public static final String HANDLE_FLAG_TWO= "已处理-未处理";
/**
* 处理状态
*/
public static final String HANDLE_FLAG_THREE= "未处理-未处理";
/**
* 处理状态
*/
public static final String HANDLE_FLAG_FOUR= "已处理-已处理";
public static final int MYEAR_MONTH=-717; public static final int MYEAR_MONTH=-717;
......
...@@ -168,9 +168,9 @@ public class TEmployeeRetirementExportVo{ ...@@ -168,9 +168,9 @@ public class TEmployeeRetirementExportVo{
* 项目编码 * 项目编码
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户编码") @ExcelProperty("项目编码")
@ExcelAttribute(name = "客户编码") @ExcelAttribute(name = "项目编码")
@Schema(description = "客户编码") @Schema(description = "项目编码")
private String deptNo; private String deptNo;
/** /**
......
...@@ -109,4 +109,6 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac ...@@ -109,4 +109,6 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo); void updateContractChange(@Param("idCard")String empIdcard, @Param("deptNo")String deptNo, @Param("oldDeptNo")String odlDeptNo);
String getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId); String getContractByEmpIdCardAndDeptId(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
void updateContractEnd( @Param("tEmployeeContractInfo")TEmployeeContractInfo tEmployeeContractInfo);
} }
...@@ -416,7 +416,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -416,7 +416,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
&& vo.getChangeItems().indexOf(CommonConstants.TWO_STRING) >= CommonConstants.ZERO_INT){ && vo.getChangeItems().indexOf(CommonConstants.TWO_STRING) >= CommonConstants.ZERO_INT){
return R.failed("人员在原项目中存在在途的公积金,请先终止后,再进行划转"); return R.failed("人员在原项目中存在在途的公积金,请先终止后,再进行划转");
} }
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda() TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, vo.getNewDeptNo()) .eq(TSettleDomain::getDepartNo, vo.getNewDeptNo())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING) .eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING)
...@@ -472,48 +471,63 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -472,48 +471,63 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updatesf.setUnitName(updateTEmployeeProject.getUnitName()); updatesf.setUnitName(updateTEmployeeProject.getUnitName());
// 处理社保 目标项目档案已有项目档案不做处理 // 处理社保 目标项目档案已有项目档案不做处理
if (vo.getChangeItems().indexOf(CommonConstants.ONE_STRING) >= CommonConstants.ZERO_INT) { if (vo.getChangeItems().indexOf(CommonConstants.ONE_STRING) >= CommonConstants.ZERO_INT) {
if (Common.isEmpty(newEmpProject.getSocialStatus()) if (Common.isEmpty(oldEmpProject.getSocialStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getSocialStatus()){ || CommonConstants.ZERO_INT == oldEmpProject.getSocialStatus()){
newEmpProject.setSocialStatus(oldEmpProject.getSocialStatus()); resStr.append("社保项不存在,无法划转! <br>");
newEmpProject.setSocialProvince(oldEmpProject.getSocialProvince());
newEmpProject.setSocialCity(oldEmpProject.getSocialCity());
newEmpProject.setSocialTown(oldEmpProject.getSocialTown());
updatesf.setFlag(CommonConstants.ZERO_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updatesf);
oldEmpProject.setSocialStatus(CommonConstants.ZERO_INT);
oldEmpProject.setSocialProvince(null);
oldEmpProject.setSocialCity(null);
oldEmpProject.setSocialTown(null);
resStr.append("社保划转成功! <br>");
}else { }else {
resStr.append("目标项目档案存在社保数据,社保划转失败! <br>"); if (Common.isEmpty(newEmpProject.getSocialStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getSocialStatus()){
newEmpProject.setSocialStatus(oldEmpProject.getSocialStatus());
newEmpProject.setSocialProvince(oldEmpProject.getSocialProvince());
newEmpProject.setSocialCity(oldEmpProject.getSocialCity());
newEmpProject.setSocialTown(oldEmpProject.getSocialTown());
updatesf.setFlag(CommonConstants.ZERO_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updatesf);
oldEmpProject.setSocialStatus(CommonConstants.ZERO_INT);
oldEmpProject.setSocialProvince(null);
oldEmpProject.setSocialCity(null);
oldEmpProject.setSocialTown(null);
resStr.append("社保划转成功! <br>");
}else {
resStr.append("目标项目档案存在社保数据,社保划转失败! <br>");
}
} }
} }
// 处理公积金 如果目标项目档案已存在公积金 不划转 // 处理公积金 如果目标项目档案已存在公积金 不划转
if (vo.getChangeItems().indexOf(CommonConstants.TWO_STRING) >= CommonConstants.ZERO_INT) { if (vo.getChangeItems().indexOf(CommonConstants.TWO_STRING) >= CommonConstants.ZERO_INT) {
if (Common.isEmpty(newEmpProject.getFundStatus()) if (Common.isEmpty(oldEmpProject.getFundStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getFundStatus()){ || CommonConstants.ZERO_INT == oldEmpProject.getFundStatus()){
newEmpProject.setFundStatus(oldEmpProject.getFundStatus()); resStr.append("公积金项不存在,无法划转! <br>");
updatesf.setFlag(CommonConstants.ONE_STRING); }else{
socialDaprUtils.updateSocialAndFoundInfo(updatesf); if (Common.isEmpty(newEmpProject.getFundStatus())
oldEmpProject.setFundStatus(CommonConstants.ZERO_INT); || CommonConstants.ZERO_INT == newEmpProject.getFundStatus()){
resStr.append("公积金划转成功! <br>"); newEmpProject.setFundStatus(oldEmpProject.getFundStatus());
}else { updatesf.setFlag(CommonConstants.ONE_STRING);
resStr.append("目标项目档案存在公积金数据,公积金划转失败! <br>"); socialDaprUtils.updateSocialAndFoundInfo(updatesf);
oldEmpProject.setFundStatus(CommonConstants.ZERO_INT);
resStr.append("公积金划转成功! <br>");
}else {
resStr.append("目标项目档案存在公积金数据,公积金划转失败! <br>");
}
} }
} }
// 处理員工合同 目标 已有合同状态 不在处理合同划转 // 处理員工合同 目标 已有合同状态 不在处理合同划转
if (vo.getChangeItems().indexOf(CommonConstants.ZERO_STRING) >= CommonConstants.ZERO_INT){ if (vo.getChangeItems().indexOf(CommonConstants.ZERO_STRING) >= CommonConstants.ZERO_INT){
if (Common.isEmpty(newEmpProject.getContractStatus()) if (Common.isEmpty(oldEmpProject.getContractStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getContractStatus()){ || CommonConstants.ZERO_INT == oldEmpProject.getContractStatus()){
newEmpProject.setContractStatus(oldEmpProject.getContractStatus()); resStr.append("员工合同不存在,无法划转! <br>");
newEmpProject.setContractType(oldEmpProject.getContractType());
// 合同同步划转---只划转在用合同 fxj 2023-03-06
contractInfoMapper.updateContractChange(updateTEmployeeProject.getEmpIdcard(),updateTEmployeeProject.getDeptNo(),updateTEmployeeProject.getOldDeptNo());
oldEmpProject.setContractStatus(CommonConstants.ZERO_INT);
resStr.append("员工合同划转成功! <br>");
}else { }else {
resStr.append("目标项目档案存在员工合同数据,员工合同划转失败! <br>"); if (Common.isEmpty(newEmpProject.getContractStatus())
|| CommonConstants.ZERO_INT == newEmpProject.getContractStatus()){
newEmpProject.setContractStatus(oldEmpProject.getContractStatus());
newEmpProject.setContractType(oldEmpProject.getContractType());
// 合同同步划转---只划转在用合同 fxj 2023-03-06
contractInfoMapper.updateContractChange(updateTEmployeeProject.getEmpIdcard(),updateTEmployeeProject.getDeptNo(),updateTEmployeeProject.getOldDeptNo());
oldEmpProject.setContractStatus(CommonConstants.ZERO_INT);
resStr.append("员工合同划转成功! <br>");
}else {
resStr.append("目标项目档案存在员工合同数据,员工合同划转失败! <br>");
}
} }
} }
// 变更老的项目档案 // 变更老的项目档案
......
...@@ -93,7 +93,14 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper; ...@@ -93,7 +93,14 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper;
if (changeHandleFlagAllVo.getHandleFlag() == 0) { if (changeHandleFlagAllVo.getHandleFlag() == 0) {
tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagAllVo.getIds()[i]); tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagAllVo.getIds()[i]);
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_ONE); TEmployeeRetirement tEmployeeRetirement=tEmployeeRetirementMapper.selectById(changeHandleFlagAllVo.getIds()[i]);
if(tEmployeeRetirement.getHandleFlag()==0){
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_THREE);
}
else {
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_TWO);
}
tEmployeeRetirementFlagDetail.setCreateBy(user.getId()); tEmployeeRetirementFlagDetail.setCreateBy(user.getId());
tEmployeeRetirementFlagDetail.setCreateName(user.getNickname()); tEmployeeRetirementFlagDetail.setCreateName(user.getNickname());
tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now()); tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now());
...@@ -103,7 +110,15 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper; ...@@ -103,7 +110,15 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper;
if (changeHandleFlagAllVo.getHandleFlag() == 1) { if (changeHandleFlagAllVo.getHandleFlag() == 1) {
tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagAllVo.getIds()[i]); tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagAllVo.getIds()[i]);
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_TWO); TEmployeeRetirement tEmployeeRetirement=tEmployeeRetirementMapper.selectById(changeHandleFlagAllVo.getIds()[i]);
if(tEmployeeRetirement.getHandleFlag()==1){
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_FOUR);
}
else {
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_ONE);
}
tEmployeeRetirementFlagDetail.setCreateBy(user.getId()); tEmployeeRetirementFlagDetail.setCreateBy(user.getId());
tEmployeeRetirementFlagDetail.setCreateName(user.getNickname()); tEmployeeRetirementFlagDetail.setCreateName(user.getNickname());
tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now()); tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now());
...@@ -122,7 +137,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper; ...@@ -122,7 +137,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper;
TEmployeeRetirementFlagDetail tEmployeeRetirementFlagDetail = new TEmployeeRetirementFlagDetail(); TEmployeeRetirementFlagDetail tEmployeeRetirementFlagDetail = new TEmployeeRetirementFlagDetail();
if(changeHandleFlagVo.getHandleFlag()==0){ if(changeHandleFlagVo.getHandleFlag()==0){
tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagVo.getId()); tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagVo.getId());
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_ONE); tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_TWO);
tEmployeeRetirementFlagDetail.setCreateBy(user.getId()); tEmployeeRetirementFlagDetail.setCreateBy(user.getId());
tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now()); tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now());
tEmployeeRetirementFlagDetail.setCreateName(user.getNickname()); tEmployeeRetirementFlagDetail.setCreateName(user.getNickname());
...@@ -130,7 +145,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper; ...@@ -130,7 +145,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper;
} }
if(changeHandleFlagVo.getHandleFlag()==1){ if(changeHandleFlagVo.getHandleFlag()==1){
tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagVo.getId()); tEmployeeRetirementFlagDetail.setDatailId(changeHandleFlagVo.getId());
tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_TWO); tEmployeeRetirementFlagDetail.setContext(ArchivesConstants.HANDLE_FLAG_ONE);
tEmployeeRetirementFlagDetail.setCreateBy(user.getId()); tEmployeeRetirementFlagDetail.setCreateBy(user.getId());
tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now()); tEmployeeRetirementFlagDetail.setCreateTime(DateTime.now());
tEmployeeRetirementFlagDetail.setCreateName(user.getNickname()); tEmployeeRetirementFlagDetail.setCreateName(user.getNickname());
...@@ -170,7 +185,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper; ...@@ -170,7 +185,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper;
String fileProvince = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getFileProvince()); String fileProvince = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getFileProvince());
String fileCity = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getFileCity()); String fileCity = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getFileCity());
String fileTown = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getFileTown()); String fileTown = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getFileTown());
if (null != fileProvince && null != fileCity && null != fileTown) { if (null != fileProvince && null != fileCity) {
if (null != fileCity && null == fileTown) { if (null != fileCity && null == fileTown) {
tEmployeeRetirementExportVo.setFileAddress(fileProvince + "/" + fileCity); tEmployeeRetirementExportVo.setFileAddress(fileProvince + "/" + fileCity);
} else { } else {
...@@ -180,7 +195,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper; ...@@ -180,7 +195,7 @@ private TEmployeeRetirementFlagDetailMapper tEmployeeRetirementFlagDetailMapper;
String socialProvince = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getSocialProvince()); String socialProvince = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getSocialProvince());
String socialCity = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getSocialCity()); String socialCity = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getSocialCity());
String socailTown = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getSocialTown()); String socailTown = baseMapper.selectByIdd(tEmployeeRetirementExportVo.getSocialTown());
if (null != socialProvince && null != socialCity && null != socailTown) { if (null != socialProvince && null != socialCity ) {
if (null != socialCity && null == socailTown) { if (null != socialCity && null == socailTown) {
tEmployeeRetirementExportVo.setSocialAddress(socialProvince + "/" + socialCity); tEmployeeRetirementExportVo.setSocialAddress(socialProvince + "/" + socialCity);
} else { } else {
......
...@@ -806,6 +806,11 @@ ...@@ -806,6 +806,11 @@
where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0'; where a.EMP_IDCARD = #{idCard} and a.DEPT_NO = #{oldDeptNo} and b.DEPART_NO= #{deptNo} and b.DELETE_FLAG='0';
</update> </update>
<update id="updateContractEnd">
update t_employee_contract_info a
set a.CONTRACT_END=#{tEmployeeContractInfo.contractEnd}
where a.ID=#{tEmployeeContractInfo.id}
</update>
<select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.String"> <select id="getContractByEmpIdCardAndDeptId" resultType="java.lang.String">
select select
e.CONTRACT_START e.CONTRACT_START
......
...@@ -25,5 +25,6 @@ ...@@ -25,5 +25,6 @@
SELECT a.ID,a.DATAIL_ID,a.CREATE_NAME,a.CREATE_BY,a.CREATE_TIME,a.CONTEXT SELECT a.ID,a.DATAIL_ID,a.CREATE_NAME,a.CREATE_BY,a.CREATE_TIME,a.CONTEXT
FROM t_employee_retirement_flag_detail a FROM t_employee_retirement_flag_detail a
where a.DATAIL_ID=#{id} where a.DATAIL_ID=#{id}
ORDER BY a.CREATE_TIME DESC
</select> </select>
</mapper> </mapper>
...@@ -579,4 +579,8 @@ public interface CommonConstants { ...@@ -579,4 +579,8 @@ public interface CommonConstants {
String START = "启用"; String START = "启用";
String STOP = "停用"; String STOP = "停用";
String CONTRACT_TYPE_TWO="无固定期限";
String CONTRACT_TYPE_ZERO="已完成一定工作任务为期限";
} }
# 忽略匹配下列规则的Git 提交 V2.1.0
### gradle ###
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
### STS ###
.settings/
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
*.lock
rebel.xml
### NetBeans ###
nbproject/private/
build/
nbbuild/
nbdist/
.nb-gradle/
### maven ###
target/
*.war
*.ear
*.zip
*.tar
*.tar.gz
### logs ####
/logs/
*.log
### temp ignore ###
*.cache
*.diff
*.patch
*.tmp
*.java~
*.properties~
*.xml~
### system ignore ###
.DS_Store
Thumbs.db
Servers
.metadata
upload
gen_code
### node ###
node_modules
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>yifu</artifactId>
<groupId>com.yifu.cloud.plus.v1</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yifu-msg</artifactId>
<description>EKP消息服务</description>
<packaging>pom</packaging>
<!--项目子模块-->
<modules>
<module>yifu-msg-api</module>
<module>yifu-msg-biz</module>
</modules>
</project>
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>yifu-msg-api</artifactId>
<packaging>jar</packaging>
<description>身份证+手机号验证模块</description>
<dependencies>
<!-- core 工具类 -->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-core</artifactId>
</dependency>
<!--swagger 注解-->
<!--<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>-->
<!--feign 注解依赖-->
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<optional>true</optional>
</dependency>-->
<!--mybatis 依赖-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-mybatis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
</dependencies>
</project>
package com.yifu.cloud.plus.v1.msg.entity;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.Data;
/**
* @Author fxj
* @Description EKP 消息提醒服务
* @Date 11:18 2023/5/30
* @Param
* @return
**/
@Data
public class Message extends BaseEntity {
private String title;
private String url;
private String content;
}
/*
* 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.msg.entity;
import cn.hutool.core.date.DateTime;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
/**
* @author fxj
* @date 2023-06-01 10:41:25
*/
@Data
@TableName("msg_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "EKP 消息提醒")
public class MsgInfo extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* orderId
*/
@ExcelAttribute(name = "orderId", maxLength = 50)
@Length(max = 50, message = "orderId不能超过50个字符")
@ExcelProperty("orderId")
@Schema(description = "orderId")
private String orderId;
/**
* 订单号
*/
@ExcelAttribute(name = "订单号", maxLength = 200)
@Length(max = 200, message = "订单号不能超过200个字符")
@ExcelProperty("订单号")
@Schema(description = "订单号")
private String url;
/**
* 提交人
*/
@ExcelAttribute(name = "提交人", maxLength = 50)
@Length(max = 50, message = "提交人不能超过50个字符")
@ExcelProperty("提交人")
@Schema(description = "提交人")
private String orderNo;
/**
* 0 接单 1 超时 2变更
*/
@ExcelAttribute(name = "0 接单 1 超时 2变更", maxLength = 1)
@Length(max = 1, message = "0 接单 1 超时 2变更不能超过1个字符")
@ExcelProperty("0 接单 1 超时 2变更")
@Schema(description = "0 接单 1 超时 2变更")
private String alertType;
/**
* 0 未阅 1 已阅
*/
@ExcelAttribute(name = "0 未阅 1 已阅", maxLength = 1)
@Length(max = 1, message = "0 未阅 1 已阅不能超过1个字符")
@ExcelProperty("0 未阅 1 已阅")
@Schema(description = "0 未阅 1 已阅")
private String read;
/**
* 提醒人
*/
@ExcelAttribute(name = "提醒人", maxLength = 1)
@Length(max = 1, message = "提醒人不能超过1个字符")
@ExcelProperty("提醒人")
@Schema(description = "提醒人")
private String alertUser;
}
package com.yifu.cloud.plus.v1.msg.utils;
/**
* @author hgw2
* @description 测试身份证
* @date 2022/5/7
*/
public class EkpMsgUtil {
}
package com.yifu.cloud.plus.v1.msg.utils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpStatus;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.RequestBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.nio.charset.Charset;
import java.util.Map;
/**
* @author hgw2
* @description 发送
* @date 2022/5/7
*/
public class HttpUtils {
private static final int REQUEST_TIMEOUT = 3 * 1000; // 设置请求超时10秒钟
private static final int CONNECT_TIMEOUT = 5 * 1000; // 连接超时时间
private static final int SO_TIMEOUT = 10 * 1000; // 数据传输超时
private static final String ENCODING = "UTF-8";
// 务必单例
private static CloseableHttpClient client;
static {
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(CONNECT_TIMEOUT)
.setConnectionRequestTimeout(REQUEST_TIMEOUT)
.setSocketTimeout(SO_TIMEOUT)
.build();
client = HttpClients.custom().setDefaultRequestConfig(requestConfig).setMaxConnTotal(50).build();
}
public static String get(String url, Map<String, String> paramsMap) {
return send(RequestBuilder.get(url), paramsMap);
}
public static String post(String url, Map<String, String> paramsMap) {
return send(RequestBuilder.post(url), paramsMap);
}
public static String send(RequestBuilder requestBuilder, Map<String, String> paramsMap) {
requestBuilder.setCharset(Charset.forName(ENCODING));
String responseText = "";
if (paramsMap != null) {
for (Map.Entry<String, String> param : paramsMap.entrySet()) {
requestBuilder.addParameter(param.getKey(), param.getValue());
}
CloseableHttpResponse response = null;
try {
response = client.execute(requestBuilder.build());
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
HttpEntity entity = response.getEntity();
if (entity != null) {
responseText = EntityUtils.toString(entity, ENCODING);
}
}
} catch (Exception e) {
e.printStackTrace();//正式项目中请改为log打印
} finally {
try {
response.close();
} catch (Exception e) {
e.printStackTrace();//正式项目中请改为log打印
}
}
}
return responseText;
}
}
package com.yifu.cloud.plus.v1.msg.vo;
import lombok.Data;
/**
* @Author fxj
* @Date 2023/5/30
* @Description
* @Version 1.0
*/
@Data
public class EkpAlertVo {
/**
* 类型 0 接单 1 超时 2变更
**/
private String type;
/**
* 订单号
**/
private String orderId;
/**
* 表单类型:0 项目订单
**/
private String item;
/**
* 提醒人
**/
private String alertUser;
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.msg.utils.EkpMsgUtil
\ No newline at end of file
FROM moxm/java:1.8-full
RUN mkdir -p /yifu-mes-biz
WORKDIR yifu-mes-biz
ARG JAR_FILE=target/yifu-mes-biz.jar
COPY ${JAR_FILE} app.jar
EXPOSE 5022
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
CMD sleep 60; java -jar app.jar $JAVA_OPTS
#!/usr/bin/env bash
mvn clean package -Pprd -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Ptest -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>yifu-msg-biz</artifactId>
<packaging>jar</packaging>
<description>身份证+手机号验证模块</description>
<dependencies>
<!--选配: 依赖seata模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-seata</artifactId>
</dependency>
<!-- email -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.6.7</version>
</dependency>
<!--必备: 依赖api模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-mail-api</artifactId>
<version>1.0.0</version>
</dependency>
<!--必备:安全模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-security</artifactId>
</dependency>
<!--必备:日志处理-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-log</artifactId>
</dependency>
<!--必备:swagger-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-swagger</artifactId>
</dependency>
<!--必备:undertow容器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-msg-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<serverId>docker-hub</serverId>
<!--指定生成的镜像名-->
<imageName>${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}/</dockerDirectory>
<!--指定远程 docker api地址-->
<!--<dockerHost>http://172.16.66.232:2375</dockerHost>-->
<!-- 这里是复制 jar 包到 docker 容器指定目录配置-->
<resources>
<resource>
<targetPath>/</targetPath>
<!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<directory>${project.build.directory}</directory>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<forceTags>true</forceTags>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.yifu.cloud.plus.v1.msg;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.EnableYifuResourceServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author pig archetype
* <p>
* 项目启动类
*/
@EnableYifuResourceServer
@SpringBootApplication
public class MsgApplication {
public static void main(String[] args) {
SpringApplication.run(MsgApplication.class, args);
}
}
package com.yifu.cloud.plus.v1.msg.constant;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* @Author fxj
* @Date 2022/6/21
* @Description
* @Version 1.0
*/
@Component
@PropertySource("classpath:application.yml")
@ConfigurationProperties(value = "ekp", ignoreInvalidFields = false)
public interface MesConstants {
/**
* 項目订单URL
**/
String orderUrl ="";
}
/*
* 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.msg.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.msg.entity.MsgInfo;
import com.yifu.cloud.plus.v1.msg.service.MsgInfoService;
import com.yifu.cloud.plus.v1.msg.vo.EkpAlertVo;
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;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
*
*
* @author fxj
* @date 2023-06-01 10:41:25
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/msg" )
@Tag(name = "消息生成及查询")
public class MsgInfoController {
private final MsgInfoService msgInfoService;
/**
* 简单分页查询
* @param page 分页对象
* @param msgInfo
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<MsgInfo>> getMsgInfoPage(Page<MsgInfo> page, MsgInfo msgInfo) {
return new R<>(msgInfoService.getMsgInfoPage(page,msgInfo));
}
/**
* @Author fxj
* @Description 触发消息提醒--EKP调用接口
* @Date 10:52 2023/6/1
* @Param
* @return
**/
@Operation(summary = "触发消息提醒--EKP调用接口", description = "触发消息提醒--EKP调用接口")
@SysLog("触发消息提醒--EKP调用接口")
@PostMapping("/createMsg")
public R<Boolean> createMsg(EkpAlertVo vo) {
return msgInfoService.createMsg(vo);
}
/**
* @Author fxj
* @Description 每29分钟刷新 超时待办提醒
* @Date 20:05 2023/5/30
* @Param
* @return
**/
@Operation(summary = "每29分钟刷新 超时待办提醒", description = "每29分钟刷新 超时待办提醒")
@Inner
@PostMapping("/inner/updateOverTimeMsg")
public void everyMonthUpdateSalaryStatus() {
msgInfoService.updateOverTimeMsg();
}
}
/*
* 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.msg.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.msg.entity.MsgInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
*
* @author fxj
* @date 2023-06-01 10:41:25
*/
@Mapper
public interface MsgInfoMapper extends BaseMapper<MsgInfo> {
/**
* 简单分页查询
* @param msgInfo
* @return
*/
IPage<MsgInfo> getMsgInfoPage(Page<MsgInfo> page, @Param("msgInfo") MsgInfo msgInfo);
/*MsgInfo getMsgByOrderId(@Param("orderId")String orderId);
List<MsgInfo> getMsgByTask();*/
}
/*
* 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.msg.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.msg.entity.MsgInfo;
import com.yifu.cloud.plus.v1.msg.vo.EkpAlertVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/**
*
*
* @author fxj
* @date 2023-06-01 10:41:25
*/
public interface MsgInfoService extends IService<MsgInfo> {
/**
* 简单分页查询
* @param msgInfo
* @return
*/
IPage<MsgInfo> getMsgInfoPage(Page<MsgInfo> page, MsgInfo msgInfo);
R<Boolean> createMsg(EkpAlertVo vo);
void updateOverTimeMsg();
}
/*
* 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.msg.service.impl;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.msg.constant.MesConstants;
import com.yifu.cloud.plus.v1.msg.entity.MsgInfo;
import com.yifu.cloud.plus.v1.msg.mapper.MsgInfoMapper;
import com.yifu.cloud.plus.v1.msg.service.MsgInfoService;
import com.yifu.cloud.plus.v1.msg.vo.EkpAlertVo;
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 lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
*
*
* @author fxj
* @date 2023-06-01 10:41:25
*/
@Log4j2
@Service
public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> implements MsgInfoService {
/**
* 简单分页查询
* @param msgInfo
* @return
*/
@Override
public IPage<MsgInfo> getMsgInfoPage(Page<MsgInfo> page, MsgInfo msgInfo){
return baseMapper.getMsgInfoPage(page,msgInfo);
}
/**
* @Author fxj
* @Description 生成 待办 变更 提醒数据
* @Date 19:36 2023/5/30
* @Param
* @return
**/
@Override
public R<Boolean> createMsg(EkpAlertVo vo) {
if (Common.isNotNull(vo)){
if (Common.isEmpty(vo.getItem())
|| Common.isEmpty(vo.getType())
|| Common.isEmpty(vo.getOrderId())
|| Common.isEmpty(vo.getAlertUser())){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
MsgInfo save = null;
// 项目订单处理
if (CommonConstants.ZERO_STRING.equals(vo.getItem())){
// 接单提醒
if (CommonConstants.ZERO_STRING.equals(vo.getType())){
//save = baseMapper.getMsgByOrderId(vo.getOrderId());
if (Common.isNotNull(save)){
save.setCreateTime(LocalDateTime.now());
save.setUrl(MesConstants.orderUrl+vo.getOrderId());
baseMapper.insert(save);
}
}
// 变更提醒
if (CommonConstants.TWO_STRING.equals(vo.getType())){
//save = baseMapper.getMsgByOrderId(vo.getOrderId());
if (Common.isNotNull(save)){
save.setCreateTime(LocalDateTime.now());
save.setUrl(MesConstants.orderUrl+save.getOrderId());
save.setAlertType(CommonConstants.TWO_STRING);
baseMapper.insert(save);
}
}
}
return R.ok();
}else {
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
}
/**
* @Author fxj
* @Description 定时刷新待办任务
* @Date 20:07 2023/5/30
* @Param
* @return
**/
@Override
public void updateOverTimeMsg() {
List<MsgInfo> msgInfos =null; //= baseMapper.getMsgByTask();
if (Common.isNotNull(msgInfos)){
//1.先删除
baseMapper.delete(Wrappers.<MsgInfo>query().lambda().eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING));
//2. 重新生成
for (MsgInfo ms:msgInfos){
ms.setCreateTime(LocalDateTime.now());
ms.setUrl(MesConstants.orderUrl+ms.getOrderId());
}
this.saveBatch(msgInfos);
}
}
}
# 数据源配置
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: dev
redis:
host: 127.0.0.1
password: '@yf_2017'
mail:
host: smtp.exmail.qq.com
port: 465
username: information@wanxin-holdings.com
password: QmdCaQSPmCAQEddd
protocol: smtp
default-encoding: UTF-8
properties:
mail.smtp.auth: true
mail.smtp.starttls.enable: true
mail.smtp.starttls.required: true
mail.smtp.socketFactory.port: 465
mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback: false
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: ll_mysql
url: jdbc:mysql://192.168.1.106:22306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
- /sendMail/**
\ No newline at end of file
# 数据源配置
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: ll_mysql
url: jdbc:mysql://192.168.1.106:22306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
\ No newline at end of file
server:
port: 5026
# 加解密根密码
jasypt:
encryptor:
password: yifu #根密码
# 暴露监控端点
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
# mybaits-plus配置
mybatis-plus:
mapper-locations: classpath:/mapper/*Mapper.xml
global-config:
banner: false
db-config:
id-type: auto
table-underline: true
logic-delete-value: 1
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
spring:
application:
name: @artifactId@
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
# @Tag(name = “接口类描述”) Controller 类上
# @Operation(summary =“接口方法描述”) Controller 方法上
# @Parameters Controller 方法上
# @Parameter(description=“参数描述”) Controller 方法上 @Parameters 里
# @Parameter(description=“参数描述”) Controller 方法的参数上
# @Parameter(hidden = true) 或 @Hidden --
# @Schema DTO类上
# @Schema DTO属性上
springdoc:
api-docs:
#是否开启文档功能
enabled: true
#swagger后端请求地址
path: /api-docs
swagger-ui:
#自定义swagger前端请求路径,输入http:127.0.0.1:8080/test会自动重定向到swagger页面
path: /api
#包扫描路径
packages-to-scan: com.yifu.cloud.plus.v1.msg.controller
#这里定义了两个分组,可定义多个,也可以不定义
group-configs:
#分组名
#- group: admin
#按路径匹配
# pathsToMatch: /admin/**
#分组名
- group: mail
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.msg.controller
ekp:
orderUrl: http://36.7.147.19:28080/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
<property name="log.path" value="logs/${spring.application.name}"/>
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN"
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
<conversionRule conversionWord="wex"
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
<conversionRule conversionWord="wEx"
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- Log file debug output -->
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
</appender>
<!-- Log file error output -->
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
</root>
</configuration>
<?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.msg.mapper.MsgInfoMapper">
<resultMap id="msgInfoMap" type="com.yifu.cloud.plus.v1.msg.entity.MsgInfo">
<id property="id" column="ID"/>
<result property="orderId" column="ORDER_ID"/>
<result property="url" column="URL"/>
<result property="orderNo" column="ORDER_NO"/>
<result property="alertType" column="ALERT_TYPE"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="read" column="READ"/>
<result property="alertUser" column="ALERT_USER"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.ORDER_ID,
a.URL,
a.ORDER_NO,
a.ALERT_TYPE,
a.CREATE_TIME,
a.READ,
a.ALERT_USER
</sql>
<sql id="msgInfo_where">
<if test="msgInfo != null">
<if test="msgInfo.id != null and msgInfo.id.trim() != ''">
AND a.ID = #{msgInfo.id}
</if>
<if test="msgInfo.orderId != null and msgInfo.orderId.trim() != ''">
AND a.ORDER_ID = #{msgInfo.orderId}
</if>
<if test="msgInfo.url != null and msgInfo.url.trim() != ''">
AND a.URL = #{msgInfo.url}
</if>
<if test="msgInfo.orderNo != null and msgInfo.orderNo.trim() != ''">
AND a.ORDER_NO = #{msgInfo.orderNo}
</if>
<if test="msgInfo.alertType != null and msgInfo.alertType.trim() != ''">
AND a.ALERT_TYPE = #{msgInfo.alertType}
</if>
<if test="msgInfo.createTime != null">
AND a.CREATE_TIME = #{msgInfo.createTime}
</if>
<if test="msgInfo.read != null and msgInfo.read.trim() != ''">
AND a.READ = #{msgInfo.read}
</if>
<if test="msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''">
AND a.ALERT_USER = #{msgInfo.alertUser}
</if>
</if>
</sql>
<!--msgInfo简单分页查询-->
<select id="getMsgInfoPage" resultMap="msgInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM msg_info a
<where>
1=1
<include refid="msgInfo_where"/>
</where>
</select>
<!--
<select id="getMsgByOrderId" resultType="com.yifu.cloud.plus.v1.msg.entity.MsgInfo">
SELECT
p.fd_name alertUser,
a.fd_3ac901c5184274 orderNo,
a.fd_id orderId,
'0' as alertType
FROM
ekp_ea33075576149bb8a4f5 a
LEFT JOIN sys_org_element p on a.fd_3b0aff6781fa86 = p.fd_id
WHERE
a.ORDER_ID = #{orderId} limit 1
</select>
<select id="getMsgByTask" resultType="com.yifu.cloud.plus.v1.msg.entity.MsgInfo">
select
o.fd_name alertUser,
b1.fd_3ac901c5184274 orderNo,
b1.fd_id orderId,
'1' as alertType
FROM lbpm_workitem a
LEFT JOIN lbpm_node e on e.fd_id= a.fd_node_id
LEFT JOIN lbpm_process p on p.fd_id=e.fd_process_id
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 on p.fd_model_id=b1.fd_id
LEFT JOIN sys_org_element o on o.fd_id=fd_expected_id
where
e.fd_fact_node_id='N5' and b1.fd_id is not null;
and DATE_ADD(NOW(),INTERVAL 30 MINUTE) > IF(b1.fd_3b779ba2168eea=1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea=4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR)))
</select>-->
</mapper>
...@@ -71,13 +71,13 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -71,13 +71,13 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
private String settleDomainName; private String settleDomainName;
/** /**
* 社保缴纳地 * 生成月份
*/ */
@ExcelAttribute(name = "社保缴纳地" ) @ExcelAttribute(name = "生成月份")
@Schema(description ="社保缴纳地") @Schema(description ="生成月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地") @ExcelProperty("生成月份")
private String socialPayAddr; private String socialCreateMonth;
/** /**
* 缴纳月份 * 缴纳月份
...@@ -89,13 +89,22 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -89,13 +89,22 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
private String socialPayMonth; private String socialPayMonth;
/** /**
* 生成月份 * 社保户
*/ */
@ExcelAttribute(name = "生成月份") @ExcelAttribute(name = "社保户" )
@Schema(description ="生成月份") @Schema(description ="社保户")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生成月份") @ExcelProperty("社保户")
private String socialCreateMonth; private String socialHousehold;
/**
* 社保缴纳地
*/
@ExcelAttribute(name = "社保缴纳地" )
@Schema(description ="社保缴纳地")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地")
private String socialPayAddr;
/** /**
* 养老金额 * 养老金额
...@@ -147,14 +156,6 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable { ...@@ -147,14 +156,6 @@ public class TPaymentInfoNewExportVo extends RowIndex implements Serializable {
@ExcelProperty("补缴利息") @ExcelProperty("补缴利息")
private BigDecimal accrualSum; private BigDecimal accrualSum;
/**
* 社保户
*/
@ExcelAttribute(name = "社保户" )
@Schema(description ="社保户")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保户")
private String socialHousehold;
/** /**
* 社保合计 * 社保合计
......
...@@ -13,4 +13,5 @@ public class PaymentConstants { ...@@ -13,4 +13,5 @@ public class PaymentConstants {
public static final String MEDICAL = "医疗"; public static final String MEDICAL = "医疗";
public static final String EXPORT = "缴费库合并导出"; public static final String EXPORT = "缴费库合并导出";
public static final String SEARCH_EXPORT = "缴费库查询合并导出"; public static final String SEARCH_EXPORT = "缴费库查询合并导出";
public static final String PAYMENT_SEARCH_EXPORT = "实缴查询批量导出";
} }
...@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; ...@@ -27,6 +27,7 @@ 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.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
...@@ -66,6 +67,8 @@ public class TPaymentInfoController { ...@@ -66,6 +67,8 @@ public class TPaymentInfoController {
private final TPaymentInfoService tPaymentInfoService; private final TPaymentInfoService tPaymentInfoService;
private final MenuUtil menuUtil;
/** /**
* 简单分页查询 * 简单分页查询
* *
...@@ -89,6 +92,16 @@ public class TPaymentInfoController { ...@@ -89,6 +92,16 @@ public class TPaymentInfoController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/newPage") @GetMapping("/newPage")
public R<IPage<TPaymentInfoNewVo>> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { public R<IPage<TPaymentInfoNewVo>> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tPaymentInfo);
if (Common.isNotNull(tPaymentInfo.getAuthSql())) {
if (tPaymentInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN_ID"));
}
if (tPaymentInfo.getAuthSql().contains("1=2 EXISTS")) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
return new R<>(tPaymentInfoService.getTPaymentInfoNewPage(page, tPaymentInfo)); return new R<>(tPaymentInfoService.getTPaymentInfoNewPage(page, tPaymentInfo));
} }
...@@ -101,6 +114,16 @@ public class TPaymentInfoController { ...@@ -101,6 +114,16 @@ public class TPaymentInfoController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/newPageInfo") @GetMapping("/newPageInfo")
public R<TPaymentInfoNewVo> getTPaymentInfoNewPageInfo(TPaymentInfoSearchVo tPaymentInfo) { public R<TPaymentInfoNewVo> getTPaymentInfoNewPageInfo(TPaymentInfoSearchVo tPaymentInfo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tPaymentInfo);
if (Common.isNotNull(tPaymentInfo.getAuthSql())) {
if (tPaymentInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN_ID"));
}
if (tPaymentInfo.getAuthSql().contains("1=2 EXISTS")) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
return R.ok(tPaymentInfoService.getTPaymentInfoNewPageInfo(tPaymentInfo)); return R.ok(tPaymentInfoService.getTPaymentInfoNewPageInfo(tPaymentInfo));
} }
...@@ -313,6 +336,16 @@ public class TPaymentInfoController { ...@@ -313,6 +336,16 @@ public class TPaymentInfoController {
@PostMapping("/sumSearchExport") @PostMapping("/sumSearchExport")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_export')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_export')")
public void sumSearchExport(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) { public void sumSearchExport(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql())) {
if (searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN_ID"));
}
if (searchVo.getAuthSql().contains("1=2 EXISTS")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
tPaymentInfoService.sumSearchExport(response, searchVo); tPaymentInfoService.sumSearchExport(response, searchVo);
} }
......
...@@ -298,7 +298,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -298,7 +298,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
*/ */
@Override @Override
public void sumSearchExport(HttpServletResponse response, TPaymentInfoSearchVo searchVo) { public void sumSearchExport(HttpServletResponse response, TPaymentInfoSearchVo searchVo) {
String fileName = PaymentConstants.SEARCH_EXPORT + DateUtil.getThisTime() + CommonConstants.XLSX; String fileName = PaymentConstants.PAYMENT_SEARCH_EXPORT + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表 //获取要导出的列表
List<TPaymentInfoNewExportVo> list = new ArrayList<>(); List<TPaymentInfoNewExportVo> list = new ArrayList<>();
Integer count = baseMapper.selectCountPaymentSearchInfo(searchVo); Integer count = baseMapper.selectCountPaymentSearchInfo(searchVo);
......
...@@ -809,6 +809,9 @@ ...@@ -809,6 +809,9 @@
AND a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' AND a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<if test="tPaymentInfo.authSql != null and tPaymentInfo.authSql.trim() != ''">
${tPaymentInfo.authSql}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj --> <!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
</if> </if>
</if> </if>
...@@ -827,6 +830,25 @@ ...@@ -827,6 +830,25 @@
</if> </if>
</sql> </sql>
<sql id="tPaymentInfo_export_socialFund_where1">
<if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null">
<if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
AND k.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
<if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
AND k.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
<if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
AND k.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
</if>
<if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
AND k.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
</if>
</if>
</if>
</sql>
<sql id="tPaymentInfo_export_fund_where"> <sql id="tPaymentInfo_export_fund_where">
<if test="tPaymentInfo != null"> <if test="tPaymentInfo != null">
<if test="tPaymentInfo.idList == null"> <if test="tPaymentInfo.idList == null">
...@@ -878,6 +900,9 @@ ...@@ -878,6 +900,9 @@
AND a.FUND_TOWN = '${tPaymentInfo.socialTown}' AND a.FUND_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<if test="tPaymentInfo.authSql != null and tPaymentInfo.authSql.trim() != ''">
${tPaymentInfo.authSql}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj --> <!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
</if> </if>
</if> </if>
...@@ -1176,6 +1201,54 @@ ...@@ -1176,6 +1201,54 @@
<!--tPaymentInfo简单分页查询--> <!--tPaymentInfo简单分页查询-->
<select id="getTPaymentInfoNewPageInfo" resultMap="tPaymentInfoNewMap"> <select id="getTPaymentInfoNewPageInfo" resultMap="tPaymentInfoNewMap">
SELECT SELECT
k.EMP_IDCARD,
k.EMP_NAME,
k.UNIT_NAME,
k.SETTLE_DOMAIN_NAME,
k.SOCIAL_HOUSEHOLD,
k.SOCIAL_SECURITY_NO,
k.SOCIAL_PAY_ADDR,
k.SOCIAL_PAY_MONTH,
k.SOCIAL_CREATE_MONTH,
k.PERSONAL_PROVIDENT_SUM,
k.SUM_ALL,
k.PROVIDENT_HOUSEHOLD,
k.PROVIDENT_PAY_ADDR,
k.SOCIAL_SUM,
k.UNIT_SOCIAL_SUM,
k.SOCIAL_SECURITY_PERSONAL_SUM,
k.PROVIDENT_SUM,
k.COMPANY_ACCRUAL,
k.PERSONAL_ACCRUAL,
k.UNIT_PENSION_SET,
k.UNIT_MEDICAL_SET,
k.UNIT_UNEMPLOYMENT_SET,
k.UNIT_INJURY_SET,
k.UNIT_BIRTH_SET,
k.UNIT_PENSION_MONEY,
k.UNIT_MEDICAL_MONEY,
k.UNIT_UNEMPLOYMENT_MONEY,
k.UNIT_INJURY_MONEY,
k.UNIT_BIRTH_MONEY,
k.UNIT_BIGMAILMENT_MONEY,
k.PERSONAL_PENSION_MONEY,
k.PERSONAL_MEDICAL_MONEY,
k.PERSONAL_UNEMPLOYMENT_MONEY,
k.PERSONAL_BIGMAILMENT_MONEY,
k.PENSION_MONEY_SUM,
k.MEDICAL_MONEY_SUM,
k.UNEMPLOYMENT_MONEY_SUM,
k.BIGMAILMENT_MONEY_SUM,
k.ACCRUAL_SUM,
k.PROVIDENT_NO,
k.PERSONAL_PROIDENT_SET,
k.UNIT_PROVIDENT_SET,
k.PROVIDENT_PERCENT,
k.SOCIAL_FUND_PERSONAL_SUM,
k.UNIT_SOCIAL_FUND_SUM,
k.UNIT_PROVIDENT_SUM
from (
select
w.keyGroup, w.keyGroup,
w.EMP_IDCARD, w.EMP_IDCARD,
w.EMP_NAME, w.EMP_NAME,
...@@ -1225,7 +1298,7 @@ ...@@ -1225,7 +1298,7 @@
SUM( w.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM SUM( w.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM
FROM ( FROM (
(SELECT (SELECT
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH ) AS keyGroup, CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
a.UNIT_NAME, a.UNIT_NAME,
...@@ -1279,7 +1352,7 @@ ...@@ -1279,7 +1352,7 @@
) )
union all union all
(SELECT (SELECT
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH ) AS keyGroup, CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH, '_', a.SETTLE_DOMAIN_CODE ) AS keyGroup,
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
a.UNIT_NAME, a.UNIT_NAME,
...@@ -1332,7 +1405,11 @@ ...@@ -1332,7 +1405,11 @@
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH,a.SETTLE_DOMAIN_CODE
) )
) w ) w
GROUP BY w.keyGroup GROUP BY w.keyGroup) k
<where>
1 = 1
<include refid="tPaymentInfo_export_socialFund_where1"/>
</where>
</select> </select>
<!--tPaymentInfo数量查询--> <!--tPaymentInfo数量查询-->
......
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