Commit 756da2a1 authored by hongguangwu's avatar hongguangwu

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

parents a4e49e70 f99a7179
...@@ -179,9 +179,9 @@ ...@@ -179,9 +179,9 @@
if(sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) > 0,1,0) as IS_COMPLETE, if(sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) > 0,1,0) as IS_COMPLETE,
sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) as INCOMPLETE_NUM, sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) as INCOMPLETE_NUM,
concat(ROUND((sum(if(PROJECT_STATUS = 0,1,0)) - sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)))*100/sum(if(PROJECT_STATUS = 0,1,0)),2),'%') as COMPLETE_PER, concat(ROUND((sum(if(PROJECT_STATUS = 0,1,0)) - sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)))*100/sum(if(PROJECT_STATUS = 0,1,0)),2),'%') as COMPLETE_PER,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-05-01',1,0)) as AFTER_EMPLOYMENT, sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01',1,0)) as AFTER_EMPLOYMENT,
if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-05-01' and IS_COMPLETE = '0') or '2024-05-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE, if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01' and IS_COMPLETE = '0') or '2024-09-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-05-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM
from t_employee_project where DELETE_FLAG = '0' and PROJECT_STATUS = 0 group by DEPT_NO) a on a.DEPT_NO = b.DEPART_NO from t_employee_project where DELETE_FLAG = '0' and PROJECT_STATUS = 0 group by DEPT_NO) a on a.DEPT_NO = b.DEPART_NO
where b.DELETE_FLAG = '0' where b.DELETE_FLAG = '0'
<if test="deptNo != null and deptNo.trim() != ''"> <if test="deptNo != null and deptNo.trim() != ''">
......
package com.yifu.cloud.plus.v1.ekp.vo;
import lombok.Data;
/**
* @author huych
* @description 入账明细推送
* @date 2024-08-23 16:31:15
*/
@Data
public class EKPEntryPushParam {
/**
* 来款单位
*/
private String fd_recipName;
/**
* 来款银行账号
*/
private String fd_recipAccountNo;
/**
* 来款单位开户行名
*/
private String fd_recipBkName;
/**
* 入账日期
*/
private String fd_date;
/**
* 到款单位
*/
private String fd_receiveBkName;
/**
* 到款银行账号
*/
private String fd_receiveBkNo;
/**
* 财务备注
*/
private String fd_remark;
/**
* 入账金额
*/
private String fd_receiveMoney;
/**
* 入账日期(精确)
*/
private String fd_daReal;
/**
* 数据同步时间
*/
private String fd_daTime;
/**
* 系统交易流水号
*/
private String fd_onlySequence;
}
package com.yifu.cloud.plus.v1.ekp.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
/**
* @author huyc
* @description 入账明细推送接口配置
* @date 2024-08-26 08:57:02
*/
@RefreshScope
@ConfigurationProperties(prefix = "entry")
@Data
public class EkpEntryProperties {
String entryUrl;
String entryFdModelId;
String entryDocStatus;
String entryLoginName;
String entryDocSubject;
String entryFdFlowId;
}
//package com.yifu.cloud.plus.v1.ekp.controller; package com.yifu.cloud.plus.v1.ekp.controller;
//
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
//
///** import javax.servlet.http.HttpServletRequest;
// * 聚富通代发工资相关
// * /**
// * @author huyc * 聚富通代发工资相关
// * @date 2024-05-23 10:24:12 *
// */ * @author huyc
//@RestController * @date 2024-05-23 10:24:12
//@RequiredArgsConstructor */
//@RequestMapping("/icbcIssue" ) @RestController
//@Tag(name = "聚富通代发工资相关") @RequiredArgsConstructor
//public class IcbcTransactionFlowIssueController { @RequestMapping("/icbcIssue" )
// @Tag(name = "聚富通代发工资相关")
// private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService; public class IcbcTransactionFlowIssueController {
//
// /** private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService;
// * 聚富通代发工资确认提交
// * /**
// * @param * 聚富通代发工资确认提交
// * @param *
// * @return * @param
// */ * @param
// @Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口") * @return
// @PostMapping("/submit") */
// public R submitIcbcTransactionFlow() { @Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口")
// return icbcTransactionFlowIssueService.submitIcbcTransactionFlow(); @PostMapping("/submit")
// } public R submitIcbcTransactionFlow() {
// return icbcTransactionFlowIssueService.submitIcbcTransactionFlow();
// /** }
// * 代发工资明细查询
// * /**
// * @param * 代发工资明细查询
// * @param *
// * @return * @param
// */ * @param
// @Operation(summary = "代发工资明细查询", description = "代发工资明细查询") * @return
// @PostMapping("/page") */
// public R selectIcbcTransactionFlowInfo() { @Operation(summary = "代发工资明细查询", description = "代发工资明细查询")
// return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo(); @PostMapping("/page")
// } public R selectIcbcTransactionFlowInfo() {
//} return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo();
}
/**
* 企业会员用户绑定管家卡
*
* @param
* @param
* @return
*/
@Operation(summary = "企业会员用户绑定管家卡", description = "企业会员用户绑定管家卡")
@PostMapping("/business")
public R businessOpen() {
return icbcTransactionFlowIssueService.businessOpen();
}
/**
* 代发工资发放成功异步通知功能
*
* @param
* @param
* @return
*/
@Operation(summary = "代发工资发放成功异步通知功能", description = "代发工资发放成功异步通知功能")
@PostMapping("/notifyUrl")
public R asyncNotice(HttpServletRequest request) throws Exception {
return icbcTransactionFlowIssueService.asyncNotice(request);
}
}
package com.yifu.cloud.plus.v1.ekp.controller; package com.yifu.cloud.plus.v1.ekp.controller;
import com.icbc.api.IcbcApiException;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService; import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -35,6 +36,18 @@ public class IcbcTransactionFlowQueryController { ...@@ -35,6 +36,18 @@ public class IcbcTransactionFlowQueryController {
return icbcTransactionFlowQueryService.getIcbcTransactionFlow(); return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
} }
/**
* 交易流水查询
*
* @param
* @return
*/
@Operation(summary = "交易流水查询", description = "交易流水查询")
@PostMapping("/newPage")
public R getIcbcTransactionFlowNew() throws IcbcApiException {
return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew();
}
/** /**
* 预订单接口 * 预订单接口
* *
...@@ -46,4 +59,18 @@ public class IcbcTransactionFlowQueryController { ...@@ -46,4 +59,18 @@ public class IcbcTransactionFlowQueryController {
public R saveIcbcManagerCard() { public R saveIcbcManagerCard() {
return icbcTransactionFlowQueryService.saveIcbcManagerCard(); return icbcTransactionFlowQueryService.saveIcbcManagerCard();
} }
/**
* 行名行号查询接口
*
* @param
* @param
* @return
*/
@Operation(summary = "行名行号查询接口", description = "行名行号查询接口")
@PostMapping("/querybankinfo")
public R querybankinfo() {
return icbcTransactionFlowQueryService.querybankinfo();
}
} }
...@@ -33,4 +33,11 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> { ...@@ -33,4 +33,11 @@ public interface EkpSocialInfoMapper extends BaseMapper<EkpSocialInfo> {
EkpSocialSumInfoVo getCostSumInfo(@Param("card") String empIdCard, @Param("month") String createMonth); EkpSocialSumInfoVo getCostSumInfo(@Param("card") String empIdCard, @Param("month") String createMonth);
void updateSocialStatus(@Param("sql") String sql); void updateSocialStatus(@Param("sql") String sql);
/**
* 获取所有当天的到账明细的交易流水号
* @param
* @return
*/
List<String> getAllserioNo();
} }
//package com.yifu.cloud.plus.v1.ekp.service; package com.yifu.cloud.plus.v1.ekp.service;
//
//import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
//import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo; import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
///** import javax.servlet.http.HttpServletRequest;
// * 聚富通代发工资相关
// * /**
// * @author huyc * 聚富通代发工资相关
// * @date 2024-05-24 10:55:24 *
// */ * @author huyc
//public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> { * @date 2024-05-24 10:55:24
// */
// R submitIcbcTransactionFlow(); public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> {
//
// R selectIcbcTransactionFlowInfo(); R submitIcbcTransactionFlow();
//
//} R selectIcbcTransactionFlowInfo();
R businessOpen();
R asyncNotice(HttpServletRequest request) throws Exception;
}
package com.yifu.cloud.plus.v1.ekp.service; package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.icbc.api.IcbcApiException;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo; import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -14,6 +15,10 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> ...@@ -14,6 +15,10 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
R getIcbcTransactionFlow(); R getIcbcTransactionFlow();
R getIcbcTransactionFlowNew() throws IcbcApiException;
R saveIcbcManagerCard(); R saveIcbcManagerCard();
R querybankinfo();
} }
...@@ -36,7 +36,9 @@ import java.util.stream.Collectors; ...@@ -36,7 +36,9 @@ import java.util.stream.Collectors;
@Log4j2 @Log4j2
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo> implements EkpSalaryInfoService { public class
EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo> implements EkpSalaryInfoService {
/** /**
//@Description: 工资明细推送至ekp //@Description: 工资明细推送至ekp
......
...@@ -62,3 +62,9 @@ security: ...@@ -62,3 +62,9 @@ security:
- /v3/api-docs - /v3/api-docs
- /actuator/** - /actuator/**
- /swagger-ui/** - /swagger-ui/**
entry:
entryUrl: http://36.7.147.29:27007/api/hro/modelingWebservice/addModel
entryFdModelId: 18050b5cee8b79c234bf64d412294f23
entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口
\ No newline at end of file
...@@ -104,3 +104,11 @@ security: ...@@ -104,3 +104,11 @@ security:
- /v3/api-docs - /v3/api-docs
- /actuator/** - /actuator/**
- /swagger-ui/** - /swagger-ui/**
entry:
entryUrl: http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
entryFdModelId: 18050b5cee8b7f8e56879448e4f23aad
entryFdFlowId: 191919ae533d080b60e6e784c55a3c8b
entryDocStatus: 20
entryLoginName: admin
entryDocSubject: 入账明细推送ekp接口
\ No newline at end of file
...@@ -70,3 +70,9 @@ springdoc: ...@@ -70,3 +70,9 @@ springdoc:
- group: ekp - group: ekp
#按包路径匹配 #按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.ekp.controller packagesToScan: com.yifu.cloud.plus.v1.ekp.controller
#工行生产环境配置
icbc:
appId: 11000000000000019038
appPrivateKey: 4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44
serverUrl: https://gw.open.icbc.com.cn/api/mybank/enterprise/trade/qhisd/V1
\ No newline at end of file
-----BEGIN CERTIFICATE-----
MIIDdDCCAxegAwIBAgIFRjBiNDYwDAYIKoEcz1UBg3UFADBcMQswCQYDVQQGEwJD
TjEwMC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9y
aXR5MRswGQYDVQQDDBJDRkNBIEFDUyBTTTIgT0NBMzEwHhcNMjMwMjE1MDkyMTA5
WhcNMjgwMjE1MDkyMTA5WjCBpTELMAkGA1UEBhMCQ04xGzAZBgNVBAoMEkNGQ0Eg
QUNTIFNNMiBPQ0EzMTETMBEGA1UECwwKQ0ZDQSBPQ0EzMTEZMBcGA1UECwwQT3Jn
YW5pemF0aW9uYWwtMTFJMEcGA1UEAwxAQ0ZDQUDkuK3lm73lt6XllYbpk7booYzo
gqHku73mnInpmZDlhazlj7hATjkxMTAwMDAwMTAwMDAzOTYyVEAxNjBZMBMGByqG
SM49AgEGCCqBHM9VAYItA0IABC7pDFU19+SE4Bog4M7om/nsDbTtXHBlfp5G2e1I
ya4LmFW5ZqOxmmQBysFwl9nDq3svOHMZ53Mpe14Z1m/OYFajggF4MIIBdDBsBggr
BgEFBQcBAQRgMF4wKAYIKwYBBQUHMAGGHGh0dHA6Ly9vY3NwLmNmY2EuY29tLmNu
L29jc3AwMgYIKwYBBQUHMAKGJmh0dHA6Ly9jcmwuY2ZjYS5jb20uY24vb2NhMzEv
b2NhMzEuY2VyMB8GA1UdIwQYMBaAFAjY0SbESH2c7KyY6fF/YrmAzqlFMAwGA1Ud
EwEB/wQCMAAwSAYDVR0gBEEwPzA9BghggRyG7yoBBDAxMC8GCCsGAQUFBwIBFiNo
dHRwOi8vd3d3LmNmY2EuY29tLmNuL3VzL3VzLTE0Lmh0bTA9BgNVHR8ENjA0MDKg
MKAuhixodHRwOi8vY3JsLmNmY2EuY29tLmNuL29jYTMxL1NNMi9jcmwyNzMwLmNy
bDAOBgNVHQ8BAf8EBAMCBsAwHQYDVR0OBBYEFOpEqrs73yvBXqvDQoT33v05FnDI
MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDAMBggqgRzPVQGDdQUAA0kA
MEYCIQCdKpfhUijpAKEQekHxlk4LvnqzzaYmODo3T3qmZUJsUwIhAOaMMH0Ipwef
VTSwJlhrVbmEB5DmoxLo1Xb/1tvfW1l2
-----END CERTIFICATE-----
\ No newline at end of file
-----BEGIN CERTIFICATE-----
MIICSTCCAeygAwIBAgIGAJuAEtYAMAwGCCqBHM9VAYN1BQAwQTELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjEVMBMGA1UEAwwMc20ycm9vdGNhY29yMB4XDTIzMTIyMTA5NTAxNloXDTI4MTIyMTE1NTk1OVowVDELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjENMAsGA1UECwwEMTMwMjEZMBcGA1UEAwwQYWh3eC55LjEzMDIuMDIwMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABGEC1fF2rHTWfipQhOr+8SfvXDBiazIrImcsPH5aGaYMFK2RIXv0AF2xe2ZgAzcWRbgop0cAjaBHXpzSfIlnfl6jgbowgbcwHwYDVR0jBBgwFoAUDD6RRlIIkxjZ0/0x6S8mKdW3D2YwCQYDVR0TBAIwADBdBgNVHR8EVjBUMFKgUKBOpEwwSjEQMA4GA1UEAwwHY3JsNDE3MDEMMAoGA1UECwwDY3JsMRswGQYDVQQKDBJzbTJjb3IuaWNiYy5jb20uY24xCzAJBgNVBAYTAmNuMAsGA1UdDwQEAwIHgDAdBgNVHQ4EFgQUd0LHEI6l7Faq6/9GObNld3SH7xswDAYIKoEcz1UBg3UFAANJADBGAiEA68uRM5zYzMhaheAG+fw3AtkRFE5146+Qw6GVP93WojwCIQDzsIL3duLRtTot8ciVuKUQkI+GrXAg7nWnd2M2o9oRBw==
-----END CERTIFICATE-----
\ No newline at end of file
...@@ -116,4 +116,14 @@ ...@@ -116,4 +116,14 @@
<update id="updateSocialStatus"> <update id="updateSocialStatus">
#{sql} #{sql}
</update> </update>
<!--查询社保明细信息-->
<select id="getAllserioNo" resultType="java.lang.String">
SELECT
fd_3b573843db30ce
from ekp_79c234bf64d412294f23
where fd_3b62f3470beb30 = '1302010109024596014'
and DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(fd_3aa4531d3b86e0, '%Y-%m-%d')
and fd_3b57f8de9df354 = '是'
</select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.*;
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 java.math.BigDecimal;
import java.time.LocalDate;
/**
* @author licancan
* @description 商险明细表 t_insurance_detail
* @date 2022-07-18 16:20:16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_insurance_alert")
@Schema(description = "商险到期提醒表")
public class TInsuranceAlert extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效日期
*/
@Schema(description = "保单生效日期")
private LocalDate policyEffect;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 发票号
*/
@Schema(description = "发票号")
private String invoiceNo;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 结算类型 (0、与薪资合并结算 1、单独结算)
*/
@Schema(description = "结算类型 (0、与薪资合并结算 1、单独结算)")
private Integer settleType;
/**
* 实际保费
*/
@Schema(description = "实际保费")
private BigDecimal actualPremium;
/**
* 预估保费
*/
@Schema(description = "预估保费")
private BigDecimal estimatePremium;
/**
* 是否过期 0未过期 1已过期
*/
@Schema(description = "是否过期 0未过期 1已过期")
private Integer isOverdue;
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 是否删除 0未删除/1删除
*/
@Schema(description = "是否删除 0否/1是")
private Integer deleteFlag;
/**
* 创建人所在部门名称
*/
@Schema(description = "创建人所在部门名称")
private String createUserDeptName;
@Schema(description = "项目名称")
private String deptName;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
/**
* 忽略提醒 0:忽略 1:不忽略
*/
@Schema(description = "有忽略提醒 0:忽略 1:不忽略")
private String expireIgnoreFlag;
/**
* 消息提醒备注
*/
@Schema(description = "消息提醒备注")
private String expireRemark;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -101,11 +101,11 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -101,11 +101,11 @@ public class InsuranceWarnExportVo implements Serializable {
@Schema(name = "实际保费") @Schema(name = "实际保费")
private BigDecimal actualPremium; private BigDecimal actualPremium;
/** /**
* 创建 * 派单申请
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "创建人") @ExcelProperty(value = "派单申请人")
@Schema(name = "创建人") @Schema(name = "派单申请人")
private String createName; private String createName;
/** /**
...@@ -250,8 +250,8 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -250,8 +250,8 @@ public class InsuranceWarnExportVo implements Serializable {
* 是否过期状态 0 未过期 1已过期。主要用于页面查询展示 * 是否过期状态 0 未过期 1已过期。主要用于页面查询展示
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "是否过期") @ExcelProperty(value = "到期状态")
@Schema(name = "是否过期") @Schema(name = "到期状态")
private String isOverdue; private String isOverdue;
/** /**
...@@ -311,4 +311,8 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -311,4 +311,8 @@ public class InsuranceWarnExportVo implements Serializable {
@ExcelProperty(value = "消息提醒备注") @ExcelProperty(value = "消息提醒备注")
private String expireRemark; private String expireRemark;
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description = "是否忽略 0:忽略 1:不忽略")
@ExcelProperty(value = "是否忽略")
private String expireIgnoreFlag;
} }
...@@ -358,7 +358,6 @@ public class TBusinessInsuranceVo implements Serializable { ...@@ -358,7 +358,6 @@ public class TBusinessInsuranceVo implements Serializable {
@Schema(name = "创建人ID") @Schema(name = "创建人ID")
private String createBy; private String createBy;
/** /**
* 忽略提醒 0:忽略 1:不忽略 * 忽略提醒 0:忽略 1:不忽略
*/ */
......
...@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
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.insurances.service.insurance.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceSearchVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -34,6 +36,10 @@ import java.util.List; ...@@ -34,6 +36,10 @@ import java.util.List;
public class TInsurancesWarnController { public class TInsurancesWarnController {
@Resource @Resource
private TInsuranceDetailService insuranceDetailService; private TInsuranceDetailService insuranceDetailService;
@Resource
private TInsuranceWarnService insuranceWarnService;
/** /**
* @Author fxj * @Author fxj
* @Description 商险到期提醒分页查询 * @Description 商险到期提醒分页查询
...@@ -120,4 +126,17 @@ public class TInsurancesWarnController { ...@@ -120,4 +126,17 @@ public class TInsurancesWarnController {
public R<Integer> getExpireInsuranceWarn() { public R<Integer> getExpireInsuranceWarn() {
return insuranceDetailService.getExpireInsuranceWarn(); return insuranceDetailService.getExpireInsuranceWarn();
} }
@Operation(description = "商险到期个人总数提醒")
@PostMapping("/getUserInsuranceMessageWarnCount")
public R<Integer> getUserInsuranceMessageWarnCount(@RequestParam String userName) {
return insuranceDetailService.getUserInsuranceMessageWarnCount(userName);
}
@Operation(description = "每天刷新商险到期提醒信息")
@Inner
@PostMapping("/inner/createInsuranceAlert")
public void createInsuranceAlert() {
insuranceWarnService.createInsuranceAlert();
}
} }
...@@ -303,13 +303,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -303,13 +303,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param, @Param("param")InsuranceSearchVo param,
@Param("domains")List<String> domains); @Param("domains")List<String> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo, List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo);
@Param("domains")List<String> idList);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo);
@Param("domains")List<String> idList);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<String> idList); int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo);
void batchexpireIgnore(@Param("idList")List<String> idList); void batchexpireIgnore(@Param("idList")List<String> idList);
void batchexpireAlertIgnore(@Param("idList")List<String> idList);
void updateExpireAlert(@Param("id") String id,@Param("expireFlag") String expireFlag,@Param("remark") String remark);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author huych
* @description 针对表【t_insurance_alert(商险到期提醒表)】的数据库操作Mapper
* @date 2024-08-26 14:20:16
*/
@Mapper
public interface TInsuranceWarnMapper extends BaseMapper<TInsuranceAlert> {
/**
* 查询商险到期提醒信息
*
* @author huych
* @return {@link List < TInsuranceAlert >}
*/
List<TInsuranceAlert> selectInsuranceAlert();
}
...@@ -525,6 +525,8 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -525,6 +525,8 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R<Integer> getExpireInsuranceWarn(); R<Integer> getExpireInsuranceWarn();
R<Integer> getUserInsuranceMessageWarnCount(String userName);
R<Object> batchexpireIgnore(List<String> ids); R<Object> batchexpireIgnore(List<String> ids);
R<Object> expireIgnore(TBusinessInsuranceVo vo); R<Object> expireIgnore(TBusinessInsuranceVo vo);
......
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.TInsuranceAlert;
/**
* @author huych
* @description 针对表【t_insurance_alert(商险到期提醒表)】的数据库操作Service
* @date 2024-08-26 14:20:16
*/
public interface TInsuranceWarnService extends IService<TInsuranceAlert> {
void createInsuranceAlert();
}
...@@ -7684,23 +7684,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7684,23 +7684,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, InsuranceSearchVo condition) { public IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, InsuranceSearchVo condition) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
condition.setCreateBy(SecurityUtils.getUser().getId()); if ("许瑞玲".equals(user.getNickname()) || "1".equals(user.getId())) {
R<TSettleDomainListVo> sdRes = archivesDaprUtil.getPermissionByUserId(user.getId()); condition.setCreateBy(null);
List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda()
.eq(TInsuranceAreaRes::getUserId, user.getId()).eq(TInsuranceAreaRes::getStatus, CommonConstants.ZERO_STRING));
if (Common.isNotNull(areaRes)) {
List<String> provinces = new ArrayList<>();
List<String> citys = new ArrayList<>();
for (TInsuranceAreaRes res : areaRes) {
if (Common.isEmpty(res.getCity())) {
provinces.add(res.getProvince());
} else { } else {
citys.add(res.getCity()); condition.setCreateBy(user.getId());
} }
} // R<TSettleDomainListVo> sdRes = archivesDaprUtil.getPermissionByUserId(user.getId());
condition.setInsuranceProvinces(provinces); // List<TInsuranceAreaRes> areaRes = insuranceAreaResMapper.selectList(Wrappers.<TInsuranceAreaRes>query().lambda()
condition.setInsuranceCitys(citys); // .eq(TInsuranceAreaRes::getUserId, user.getId()).eq(TInsuranceAreaRes::getStatus, CommonConstants.ZERO_STRING));
} // if (Common.isNotNull(areaRes)) {
// List<String> provinces = new ArrayList<>();
// List<String> citys = new ArrayList<>();
// for (TInsuranceAreaRes res : areaRes) {
// if (Common.isEmpty(res.getCity())) {
// provinces.add(res.getProvince());
// } else {
// citys.add(res.getCity());
// }
// }
// condition.setInsuranceProvinces(provinces);
// condition.setInsuranceCitys(citys);
// }
IPage<TBusinessInsuranceVo> recordsPage = new Page<>(); IPage<TBusinessInsuranceVo> recordsPage = new Page<>();
int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize(); int limitStart = (int)(page.getCurrent()-1)*(int)page.getSize();
int limitEnd = (int)page.getSize(); int limitEnd = (int)page.getSize();
...@@ -7710,13 +7714,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7710,13 +7714,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
recordsPage.setPages(page.getPages()); recordsPage.setPages(page.getPages());
recordsPage.setSize(page.getSize()); recordsPage.setSize(page.getSize());
recordsPage.setCurrent(page.getCurrent()); recordsPage.setCurrent(page.getCurrent());
if (Common.isNotNull(sdRes) && Common.isNotNull(sdRes.getData()) && Common.isNotNull(sdRes.getData().getDeptIds())) { recordsPage.setTotal(baseMapper.noPageCountDiy(condition));
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,sdRes.getData().getDeptIds())); recordsPage.setRecords(baseMapper.pageDiy(condition));
recordsPage.setRecords(baseMapper.pageDiy(condition, sdRes.getData().getDeptIds()));
}else {
recordsPage.setTotal(baseMapper.noPageCountDiy(condition,null));
recordsPage.setRecords(baseMapper.pageDiy(condition, null));
}
return recordsPage; return recordsPage;
} }
...@@ -7726,6 +7725,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7726,6 +7725,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
baseMapper.batchexpireIgnore(ids); baseMapper.batchexpireIgnore(ids);
//更新商险到期提醒表
baseMapper.batchexpireAlertIgnore(ids);
return R.ok(); return R.ok();
} }
...@@ -7814,6 +7815,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7814,6 +7815,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
entity.setExpireIgnoreFlag(CommonConstants.ZERO_STRING); entity.setExpireIgnoreFlag(CommonConstants.ZERO_STRING);
baseMapper.updateById(entity); baseMapper.updateById(entity);
baseMapper.updateExpireAlert(entity.getId(),CommonConstants.ZERO_STRING,null);
return R.ok(); return R.ok();
} }
private void remarkBatchAdd(List<InsurancesWarnUpdateVo> businessInsuranceVoList,List<ErrorMessage> errorMessages) { private void remarkBatchAdd(List<InsurancesWarnUpdateVo> businessInsuranceVoList,List<ErrorMessage> errorMessages) {
...@@ -7908,6 +7910,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7908,6 +7910,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setExpireIgnoreFlag(expireIgnoreFlag); detail.setExpireIgnoreFlag(expireIgnoreFlag);
detail.setExpireRemark(vo.getExpireRemark()); detail.setExpireRemark(vo.getExpireRemark());
this.updateById(detail); this.updateById(detail);
baseMapper.updateExpireAlert(detail.getId(),expireIgnoreFlag,vo.getExpireRemark());
errorMessages.add(new ErrorMessage(line + 2, CommonConstants.UPDATE_SUCCESS)); errorMessages.add(new ErrorMessage(line + 2, CommonConstants.UPDATE_SUCCESS));
} catch (Exception e) { } catch (Exception e) {
log.error("商险批量备注执行异常", e); log.error("商险批量备注执行异常", e);
...@@ -7989,17 +7992,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7989,17 +7992,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
entity.setExpireRemark(vo.getExpireRemark()); entity.setExpireRemark(vo.getExpireRemark());
baseMapper.updateById(entity); baseMapper.updateById(entity);
baseMapper.updateExpireAlert(vo.getId(),null,vo.getExpireRemark());
return R.ok(); return R.ok();
} }
private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) { private List<InsuranceWarnExportVo> noPageDiy(InsuranceSearchVo searchVo) {
List<String> domainIds = getExportCondition(searchVo); // List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageDiy(searchVo,domainIds); return baseMapper.noPageDiy(searchVo);
} }
private int noPageCountDiy(InsuranceSearchVo searchVo) { private int noPageCountDiy(InsuranceSearchVo searchVo) {
List<String> domainIds = getExportCondition(searchVo); // List<String> domainIds = getExportCondition(searchVo);
return baseMapper.noPageCountDiy(searchVo,domainIds); return baseMapper.noPageCountDiy(searchVo);
} }
private List<String> getExportCondition(InsuranceSearchVo searchVo) { private List<String> getExportCondition(InsuranceSearchVo searchVo) {
...@@ -8029,7 +8033,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -8029,7 +8033,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override @Override
public R<Integer> getExpireInsuranceWarn() { public R<Integer> getExpireInsuranceWarn() {
InsuranceSearchVo searchVo = new InsuranceSearchVo(); InsuranceSearchVo searchVo = new InsuranceSearchVo();
List<String> domainIds = getExportCondition(searchVo); // List<String> domainIds = getExportCondition(searchVo);
return R.ok(baseMapper.noPageCountDiy(searchVo,domainIds)); return R.ok(baseMapper.noPageCountDiy(searchVo));
}
@Override
public R<Integer> getUserInsuranceMessageWarnCount(String userName) {
InsuranceSearchVo searchVo = new InsuranceSearchVo();
searchVo.setCreateName(userName);
searchVo.setExpireIgnoreFlag(CommonConstants.ONE_STRING);
return R.ok(baseMapper.noPageCountDiy(searchVo));
} }
} }
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.TInsuranceAlert;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceWarnMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceWarnService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author huych
* @description 针对表【t_insurance_alert(商险到期提醒表)】的数据库操作Service实现
* @date 2024-08-26 14:20:16
*/
@Service
public class TInsuranceWarnServiceImpl extends ServiceImpl<TInsuranceWarnMapper, TInsuranceAlert> implements TInsuranceWarnService {
@Override
public void createInsuranceAlert() {
//批量生成或者更新商险到期提醒数据
List<TInsuranceAlert> list = baseMapper.selectInsuranceAlert();
this.saveOrUpdateBatch(list);
}
}
...@@ -1695,7 +1695,8 @@ ...@@ -1695,7 +1695,8 @@
rf.CREATE_TIME as "refundCreateTime", rf.CREATE_TIME as "refundCreateTime",
rf.CREATE_NAME as "refundCreateUser", rf.CREATE_NAME as "refundCreateUser",
a.CREATE_USER_DEPT_NAME, a.CREATE_USER_DEPT_NAME,
a.EXPIRE_REMARK a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG
</sql> </sql>
<sql id="expire_export_sql_param"> <sql id="expire_export_sql_param">
select select
...@@ -1734,19 +1735,21 @@ ...@@ -1734,19 +1735,21 @@
r.fromEmpName, r.fromEmpName,
r.toEmpName, r.toEmpName,
r.REPLACE_TIME as "toReplaceTime", r.REPLACE_TIME as "toReplaceTime",
case when a.IS_OVERDUE = 0 then "未过期" case when a.IS_OVERDUE = 0 then "期"
when a.IS_OVERDUE = 1 then "过期" when a.IS_OVERDUE = 1 then "过期"
else null end as "IS_OVERDUE" , else null end as "IS_OVERDUE" ,
a.ESTIMATE_PREMIUM, a.ESTIMATE_PREMIUM,
rf.REFUND_MONEY, rf.REFUND_MONEY,
rf.CREATE_TIME as "refundCreateTime", rf.CREATE_TIME as "refundCreateTime",
rf.CREATE_NAME as "refundCreateUser", rf.CREATE_NAME as "refundCreateUser",
a.CREATE_USER_DEPT_NAME, a.CREATE_USER_DEPT_NAME,
a.EXPIRE_REMARK a.EXPIRE_REMARK,
case when a.EXPIRE_IGNORE_FLAG = 0 then "是"
when a.EXPIRE_IGNORE_FLAG = 1 then "否"
else null end as "EXPIRE_IGNORE_FLAG"
</sql> </sql>
<sql id="expire_sql_where"> <sql id="expire_sql_where">
<where> <where>
<if test="param != null"> <if test="param != null">
<if test="param.empName != null and param.empName.trim() != ''"> <if test="param.empName != null and param.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%') AND a.EMP_NAME like CONCAT('%' , #{param.empName},'%')
...@@ -1760,6 +1763,18 @@ ...@@ -1760,6 +1763,18 @@
<if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''"> <if test="param.insuranceHandleCityName != null and param.insuranceHandleCityName.trim() != ''">
AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%') AND a.INSURANCE_HANDLE_CITY_NAME like CONCAT(#{param.insuranceHandleCityName},'%')
</if> </if>
<if test="param.createName != null and param.createName.trim() != ''">
AND a.CREATE_NAME = #{param.createName}
</if>
<if test="param.expireIgnoreFlag != null and param.expireIgnoreFlag.trim() != ''">
AND a.EXPIRE_IGNORE_FLAG = #{param.expireIgnoreFlag}
</if>
<if test="param.isOverdue != null and param.isOverdue.trim() != ''">
AND a.IS_OVERDUE = #{param.isOverdue}
</if>
<if test="param.createBy != null and param.createBy.trim() != ''">
and a.CREATE_BY = #{param.createBy}
</if>
<if test="param.idList != null and param.idList.size() > 0"> <if test="param.idList != null and param.idList.size() > 0">
and a.id in and a.id in
<foreach collection="param.idList" item="param" index="index" open="(" close=")" <foreach collection="param.idList" item="param" index="index" open="(" close=")"
...@@ -1771,7 +1786,7 @@ ...@@ -1771,7 +1786,7 @@
</where> </where>
</sql> </sql>
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo"> <select id="getInsuranceExpireWarnVoPageHistory" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME <include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from from
(select * from (select * from
...@@ -1830,7 +1845,20 @@ ...@@ -1830,7 +1845,20 @@
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<select id="getInsuranceExpireWarnVoPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>
,a.INSURANCE_HANDLE_CITY_NAME
from
t_insurance_alert a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/>
order by a.CREATE_TIME desc
</select>
<select id="pageDiyHistory" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
<include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME <include refid="expire_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from from
(select * from (select * from t_insurance_detail a (select * from (select * from t_insurance_detail a
...@@ -1890,123 +1918,46 @@ ...@@ -1890,123 +1918,46 @@
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</select> </select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>,a.INSURANCE_HANDLE_CITY_NAME
from
(select * from (select * from t_insurance_detail a
where
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if> <select id="pageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo">
</if> <include refid="expire_sql_param"/>
<if test="param.insuranceCitys != null"> ,a.INSURANCE_HANDLE_CITY_NAME
<if test="param.insuranceCitys.size() > 0"> from
or a.INSURANCE_HANDLE_CITY in t_insurance_alert a
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")" LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
separator=","> LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
#{param} LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null"> <if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd} limit #{param.limitStart},#{param.limitEnd}
</if> </if>
)a </select>
<select id="noPageDiy" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceWarnExportVo">
<include refid="expire_export_sql_param"/>
,a.INSURANCE_HANDLE_CITY_NAME
from
t_insurance_alert a
LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id
<include refid="expire_sql_where"/>
group by a.id group by a.id
order by a.CREATE_TIME desc
<if test="param != null and param.limitStart != null">
limit #{param.limitStart},#{param.limitEnd}
</if>
</select> </select>
<select id="noPageCountDiy" resultType="java.lang.Integer"> <select id="noPageCountDiy" resultType="java.lang.Integer">
select select
count(1) count(1)
from (select * from t_insurance_detail a from
where t_insurance_alert a
<!-- info.AUDIT_STATUS='0' and t.STATUS = 5 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)-->
<!--一个月内的,没有再续买商险的数据-->
a.BUY_HANDLE_STATUS ='3'
and a.EXPIRE_IGNORE_FLAG='1'
and (
date_add(curdate() - day(curdate()) + 1, interval 3 month) >
a.POLICY_END
)
<if test="param != null">
<if test="param.insuranceProvinces == null and param.insuranceCitys == null and domains == null">
and a.CREATE_BY = #{param.createBy}
</if>
and (1 = 2
<if test="param.insuranceProvinces != null">
<if test="param.insuranceProvinces.size() > 0">
or a.INSURANCE_HANDLE_PROVINCE in
<foreach collection="param.insuranceProvinces" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<if test="param.insuranceCitys != null">
<if test="param.insuranceCitys.size() > 0">
or a.INSURANCE_HANDLE_CITY in
<foreach collection="param.insuranceCitys" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
</if>
<!--数据权限判断-->
or a.CREATE_BY = #{param.createBy}
<if test="domains != null">
<if test="domains.size() > 0">
or a.DEPT_ID in
<foreach collection="domains" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</if>
)
</if>
) a
<!--LEFT JOIN view_insurance_replace r on a.id=r.TO_INSURANCE_DETAIL_ID
LEFT JOIN view_insurance_replace r2 on a.id=r2.FROM_INSURANCE_DETAIL_ID
LEFT JOIN t_insurance_refund rf on rf.INS_DETAIL_ID=a.id-->
<include refid="expire_sql_where"/> <include refid="expire_sql_where"/>
</select> </select>
<update id="batchexpireIgnore"> <update id="batchexpireIgnore">
<if test="idList != null and idList.size() > 0"> <if test="idList != null and idList.size() > 0">
update t_insurance_detail a update t_insurance_detail a
...@@ -2019,6 +1970,27 @@ ...@@ -2019,6 +1970,27 @@
</if> </if>
</update> </update>
<update id="batchexpireAlertIgnore">
<if test="idList != null and idList.size() > 0">
update t_insurance_alert a
set a.EXPIRE_IGNORE_FLAG = '0'
where
a.id in
<foreach collection="idList" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
</update>
<update id="updateExpireAlert">
update t_insurance_alert
<trim prefix="set" suffixOverrides=",">
<if test="expireFlag != null">EXPIRE_IGNORE_FLAG=#{expireFlag},</if>
<if test="remark != null">EXPIRE_REMARK=#{remark},</if>
</trim>
where id = #{id}
</update>
<select id="selectPushList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"> <select id="selectPushList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT SELECT
* *
......
<?xml version="1.0" encoding="UTF-8"?>
<!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.TInsuranceWarnMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/>
<result property="empIdcardNo" column="EMP_IDCARD_NO" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="post" column="POST" jdbcType="VARCHAR"/>
<result property="insuranceCompanyName" column="INSURANCE_COMPANY_NAME" jdbcType="VARCHAR"/>
<result property="insuranceTypeName" column="INSURANCE_TYPE_NAME" jdbcType="VARCHAR"/>
<result property="buyStandard" column="BUY_STANDARD" jdbcType="VARCHAR"/>
<result property="medicalQuota" column="MEDICAL_QUOTA" jdbcType="VARCHAR"/>
<result property="dieDisableQuota" column="DIE_DISABLE_QUOTA" jdbcType="VARCHAR"/>
<result property="policyNo" column="POLICY_NO" jdbcType="VARCHAR"/>
<result property="policyStart" column="POLICY_START" jdbcType="DATE"/>
<result property="policyEnd" column="POLICY_END" jdbcType="DATE"/>
<result property="policyEffect" column="POLICY_EFFECT" jdbcType="DATE"/>
<result property="settleMonth" column="SETTLE_MONTH" jdbcType="VARCHAR"/>
<result property="invoiceNo" column="INVOICE_NO" jdbcType="VARCHAR"/>
<result property="insuranceProvinceName" column="INSURANCE_PROVINCE_NAME" jdbcType="VARCHAR"/>
<result property="insuranceCityName" column="INSURANCE_CITY_NAME" jdbcType="VARCHAR"/>
<result property="insuranceHandleProvinceName" column="INSURANCE_HANDLE_PROVINCE_NAME" jdbcType="VARCHAR"/>
<result property="insuranceHandleCityName" column="INSURANCE_HANDLE_CITY_NAME" jdbcType="VARCHAR"/>
<result property="settleType" column="SETTLE_TYPE" jdbcType="TINYINT"/>
<result property="actualPremium" column="ACTUAL_PREMIUM" jdbcType="DECIMAL"/>
<result property="estimatePremium" column="ESTIMATE_PREMIUM" jdbcType="DECIMAL"/>
<result property="isEffect" column="IS_EFFECT" jdbcType="TINYINT"/>
<result property="isOverdue" column="IS_OVERDUE" jdbcType="TINYINT"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="unitName" column="UNIT_NAME" jdbcType="VARCHAR"/>
<result property="unitNo" column="UNIT_NO" jdbcType="VARCHAR"/>
<result property="expireIgnoreFlag" column="EXPIRE_IGNORE_FLAG" jdbcType="VARCHAR"/>
<result property="expireRemark" column="EXPIRE_REMARK" jdbcType="VARCHAR"/>
</resultMap>
<select id="selectInsuranceAlert" resultMap="BaseResultMap">
SELECT
a.ID,
a.EMP_NAME,
a.EMP_IDCARD_NO,
a.DEPT_NO,
a.DEPT_NAME,
a.POST,
a.INSURANCE_COMPANY_NAME,
a.INSURANCE_TYPE_NAME,
a.INSURANCE_CITY_NAME,
a.INSURANCE_HANDLE_CITY_NAME,
a.INSURANCE_HANDLE_PROVINCE_NAME,
a.INSURANCE_PROVINCE_NAME,
a.BUY_STANDARD,
a.UNIT_NAME,
a.UNIT_NO,
a.SETTLE_TYPE,
a.POLICY_EFFECT,
a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG,
a.SETTLE_MONTH,
a.POLICY_START,
a.POLICY_END,
a.ACTUAL_PREMIUM,
a.ESTIMATE_PREMIUM,
a.INVOICE_NO,
a.MEDICAL_QUOTA,
a.DIE_DISABLE_QUOTA,
a.DEPT_ID,
a.POLICY_NO,
if(a.POLICY_END >= curdate(),0,1) IS_OVERDUE,
a.REMARK,
a.CREATE_BY,
a.DELETE_FLAG,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.IS_EFFECT,
a.CREATE_USER_DEPT_NAME
FROM
t_insurance_detail a
WHERE
a.id IN (
SELECT
h.id
FROM
(
SELECT
b.ID,
max( b.POLICY_END ) endTime
FROM
t_insurance_detail b
WHERE
b.POLICY_START >= date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
AND b.IS_EFFECT = 0
AND NOT EXISTS (
SELECT
1
FROM
t_insurance_detail ea
WHERE
ea.POLICY_START >= date_sub( date_add( curdate(), INTERVAL 1 DAY ), INTERVAL 1 YEAR )
AND ea.IS_EFFECT = 0
AND ea.POLICY_END >= date_add( curdate(), INTERVAL 1 MONTH )
AND ea.EMP_IDCARD_NO = b.EMP_IDCARD_NO
)
GROUP BY
b.EMP_IDCARD_NO,
b.INSURANCE_COMPANY_NAME,
b.INSURANCE_TYPE_NAME
) h
INNER JOIN t_insurance_detail l ON h.id = l.id
AND h.endTime = l.POLICY_END
WHERE
l.EXPIRE_IGNORE_FLAG = '1'
)
</select>
</mapper>
...@@ -24,6 +24,14 @@ public class ArchiveTask { ...@@ -24,6 +24,14 @@ public class ArchiveTask {
@Autowired @Autowired
private DaprArchivesProperties daprArchivesProperties; private DaprArchivesProperties daprArchivesProperties;
public void updateEmployeeAgeTask() {
log.info("-------------每年1月1号刷新在职和离职人员的年龄信息-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/updateEmployeeAgeTask", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每年1月1号刷新在职和离职人员的年龄信息-定时任务结束------------");
}
/** /**
* @Author hgw * @Author hgw
* @Description 每月1号清理人员档案、项目档案的薪资状态 * @Description 每月1号清理人员档案、项目档案的薪资状态
......
...@@ -59,4 +59,17 @@ public class UpdateOverdueTask { ...@@ -59,4 +59,17 @@ public class UpdateOverdueTask {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/pushActualPremium","", Void.class, SecurityConstants.FROM_IN); HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/pushActualPremium","", Void.class, SecurityConstants.FROM_IN);
log.info("------------推送商险待结算数据-定时任务结束------------"); log.info("------------推送商险待结算数据-定时任务结束------------");
} }
/**
* 每天刷新商险到期提醒信息
* @author huych
* @param
* @return void
*/
public void everyDayCreateInsuranceAlert() {
log.info("-------------每天刷新商险到期提醒信息------------");
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId(),
"/insuranceWarn/inner/createInsuranceAlert","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天刷新商险到期提醒信息-定时任务开始------------");
}
} }
...@@ -2582,7 +2582,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2582,7 +2582,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (empVo.getHignEducation().equals("7")) { if (empVo.getHignEducation().equals("7")) {
excel.setEducationName("硕士"); excel.setEducationName("硕士");
} }
if (excel.getEducationName().equals("8")) { if (empVo.getHignEducation().equals("8")) {
excel.setEducationName("博士"); excel.setEducationName("博士");
} }
if (empVo.getHignEducation().equals("9")) { if (empVo.getHignEducation().equals("9")) {
......
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