Commit 323e82e4 authored by fangxinjiang's avatar fangxinjiang

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

parents 39705315 414c3400
......@@ -18,9 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
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.baomidou.mybatisplus.annotation.*;
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;
......@@ -62,6 +60,7 @@ public class TGzArea extends BaseEntity {
@ExcelAttribute(name = "市")
@ExcelProperty("市")
@Schema(description = "市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer city;
/**
* 区县
......@@ -69,6 +68,7 @@ public class TGzArea extends BaseEntity {
@ExcelAttribute(name = "区县")
@ExcelProperty("区县")
@Schema(description = "区县")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer town;
/**
* 皖信地址编码
......
......@@ -1376,4 +1376,9 @@ public class InsurancesConstants {
// 0待确认1待派单 可忽略
public static final Set<String> ALERT_IGNORE_STATUS = new HashSet<>(Arrays.asList("0", "1", "2", "5"));
public static final String REFUND_NO_INS_DETAIL_ID = "退保里的商险ID为空,请联系管理员";
public static final String REFUND_YI_SETTLE = "费用已支出,禁止重复登记";
public static final String REFUND_ZH_SETTLE = "费用支出中,禁止重复登记";
public static final String REFUND_TYPE = "退费";
}
......@@ -22,7 +22,7 @@ public class EkpInsurancesInfo {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "fd_Id")
private String fd_id;
// 预估;实缴;差额;退费
@Schema(description = "单据类型")
private String fd_3adfe6af71a1cc;
......@@ -32,6 +32,10 @@ public class EkpInsurancesInfo {
@Schema(description = "项目名称")
private String fd_3adfe6592b4158;
// //单号,sxdd + 商险id + 标识
// pushParam.setFd_3adfe67a9f6364("SXDD" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.ISO_DATE_FORMAT)
// + param.getDetailId() + code );
// code : 标识:1:预估;2:实缴;3:差额;4:退费
@Schema(description = "单号")
private String fd_3adfe67a9f6364;
......
......@@ -36,7 +36,7 @@ public class TInsuranceRefund extends BaseEntity {
private String orderNo;
/**
* 减员状态
* 减员状态 1待减员 2减员中3减员退回,4减员成功
*/
@Schema(description = "减员状态")
private Integer reduceHandleStatus;
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.EkpInsurancesInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
......@@ -81,4 +82,10 @@ public class RefundMoneyUpdateParam implements Serializable {
@Schema(description = "错误原因")
private String errorMessage;
/**
* EKP中,退费类型的商险明细
*/
@JsonIgnore
private EkpInsurancesInfo ekpInsurancesInfo;
}
......@@ -29,4 +29,10 @@ public interface EkpInsurancesInfoMapper extends BaseMapper<EkpInsurancesInfo> {
//查询未结算的商险记录
List<EkpInsurancesInfo> getEkpInsurancesInfoSettle(@Param("detailId") String detailId);
// 查找退费的商险明细,用来检查状态,是否允许登记退保,并用来新增或更新
EkpInsurancesInfo getEkpInsurancesInfoByRefund(@Param("detailId") String detailId);
// 初始化
EkpInsurancesInfo initEkpInsurancesInfoByRefund(@Param("detailId") String detailId);
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.EkpInsurancesInfo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -82,6 +81,8 @@ public interface EkpSettleMapper {
EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(@Param("deptNo") String deptNo);
List<EkpInsuranceDeptInfoVo> getEkpDeptInfoByDeptNo(@Param("deptNoList") List<String> deptNoList);
void deleteEkpInsuranceDetail(@Param("id")String id);
List<EkpSettleStatusVo> getBalanceByInsuranceId(@Param("id")String id);
......
......@@ -365,4 +365,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
long getInsuranceChangeLogExportCount(@Param("param") InsuredParam param);
// 按身份证查找商险已减员的对应的项目编码,范围可能大了一点,但是不影响查询结果,好过一条一条查项目的BPO信息
List<String> selectDeptNoListByIdCard(@Param("idCardList") List<String> idCardList);
}
......@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import java.util.List;
import java.util.Map;
/**
* @author zhaji
......@@ -28,6 +29,9 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(String deptNo);
// 根据项目编码获取EKP项目信息
Map<String, EkpInsuranceDeptInfoVo> getEkpDeptInfoByDeptNo(List<String> deptNoList);
DeptSettleVo getDeptYgSettle(String id);
/**
......
......@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
......@@ -39,6 +40,17 @@ public class EkpSettleServiceImpl implements EkpSettleService {
public EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(String deptNo) {
return ekpSettleMapper.getInsuranceEkpDeptInfo(deptNo);
}
@Override
public Map<String, EkpInsuranceDeptInfoVo> getEkpDeptInfoByDeptNo(List<String> deptNoList) {
List<EkpInsuranceDeptInfoVo> list = ekpSettleMapper.getEkpDeptInfoByDeptNo(deptNoList);
Map<String, EkpInsuranceDeptInfoVo> returnMap = new HashMap<>();
if (list != null && !list.isEmpty()) {
for (EkpInsuranceDeptInfoVo vo : list) {
returnMap.put(vo.getDeptNo(), vo);
}
}
return returnMap;
}
@Override
public DeptSettleVo getDeptYgSettle(String id) {
......
......@@ -59,6 +59,61 @@
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="Base_Column_List" >
a.fd_id
,a.fd_3adfe6af71a1cc
,a.fd_3adfe658c6229e
,a.fd_3adfe6592b4158
,a.fd_3adfe67a9f6364
,a.fd_3adfe6598281e8
,a.fd_3adfe7a2688902
,a.fd_3adfe67c24dace
,a.fd_3adfe65d759650
,a.fd_3adfe65dbd9f68
,a.fd_3adfe65e0cd094
,a.fd_3adfe65f6599e4
,a.fd_3adfe65ea04728
,a.fd_3adfe65e60e110
,a.fd_3adfe6b7e0ede8
,a.fd_3adfe6b847bfe6
,a.fd_3adfe6d55384c6
,a.fd_3adfe6610c0d2c
,a.fd_3adfe66041a996
,a.fd_3adfe6609aa810
,a.fd_3adfe6e30f2a3c
,a.fd_3adfe6ec6a8cbe
,a.fd_3adfe6ef5dfaac
,a.fd_3adfe79fd04606
,a.fd_3adfe7a117f086
,a.fd_3adfe6e3911ffe
,a.fd_3adfe6eda67236
,a.fd_3adfe6f05531ec
,a.fd_3adfe7a035849c
,a.fd_3adfe7a08eba96
,a.fd_3af9197b31071c
,a.fd_3af9d11088facc
,a.fd_3af9d1441ef7b6
,a.fd_3af9d15f7018fa
,a.fd_3af9d1662141a4
,a.fd_3b0a5743acab7e
,a.fd_3b13b3076af5a0
,a.fd_3b13b2ecc164aa
,a.fd_3b16dfb32778f2_text
,a.fd_3b16dfb32778f2
,a.fd_3b178fab62d196
,a.fd_3b3e4653122c9e
,a.fd_3b5bf1628c5a68
,a.fd_3b5bf17f2fc25c
,a.fd_3b5bf180e08fbe
,a.fd_3b5bf17ae91f9c
,a.fd_3b5bf17c6df310
,a.fd_3b5bf17d9297c2
,a.fd_3b941cbcea3e1a
,a.fd_3c6f0108e05c84
,a.fd_usebpo_settle
,a.create_time
</sql>
<!-- ekpInsurancesInfo简单分页查询 -->
<select id="getEkpInsurancesInfoList" resultMap="ekpInsurancesInfoMap">
SELECT
......@@ -102,4 +157,13 @@
where fd_3adfe6eda67236 = '未结算'
and fd_3b0a5743acab7e = #{detailId}
</select>
<!-- 查找退费的商险明细,用来检查状态,是否允许登记退保,并用来新增或更新 -->
<select id="getEkpInsurancesInfoByRefund" resultMap="ekpInsurancesInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM ekp_insurances_info a
where fd_3adfe6af71a1cc = '退费' and fd_3b0a5743acab7e = #{detailId} limit 1
</select>
</mapper>
......@@ -260,6 +260,24 @@
where a.fd_3a37fe508071fe = #{deptNo}
limit 1
</select>
<!--查询EKP项目信息-->
<select id="getEkpDeptInfoByDeptNo" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceDeptInfoVo">
SELECT
a.fd_id as fdId,
a.fd_3b1480cd9dcb60 as settleType,
a.fd_3b15f64dd59a28 as isBpo,
a.fd_3b13b272078eda as insurancesType,
a.fd_3b1480c328d7b2_text as insurancesTitle,
a.fd_usebpo_settle as bpoSettle,
a.fd_3a37fe508071fe as deptNo
from ekp_24a8e6a7fc143bb8c48a a
where a.fd_3a37fe508071fe in
<foreach item="idStr" index="index" collection="deptNoList" open="(" separator="," close=")">
#{idStr}
</foreach>
GROUP BY a.fd_3a37fe508071fe
</select>
</mapper>
......
......@@ -2624,4 +2624,16 @@
${param.authSql}
</if>
</select>
<select id="selectDeptNoListByIdCard" resultType="java.lang.String">
select
DISTINCT a.DEPT_NO
from
t_insurance_detail a
where a.DEPT_NO is not null and a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 5 and a.REDUCE_HANDLE_STATUS = 4
and a.EMP_IDCARD_NO in
<foreach collection="idCardList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>
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