Commit 152357a4 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'develop'

投保导出

See merge request fangxinjiang/yifu!15
parents 9daa3856 f135c17d
......@@ -52,6 +52,19 @@ public class TInsuranceDetailController {
return R.ok(tInsuranceDetailService.getInsuranceListPage(page, param));
}
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation(summary = "投保办理不分页查询", description = "投保办理不分页查询")
@PostMapping("/getInsuranceList")
public R<List<InsuranceListVO>> getInsuranceList(@RequestBody InsuranceListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceList(param));
}
/**
* 商险新增
*
......
......@@ -9,6 +9,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author licancan
* @description 针对表【t_insurance_detail(商险明细表)】的数据库操作Mapper
......@@ -27,5 +29,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
IPage<InsuranceListVO> getInsuranceListPage(Page<InsuranceListVO> page, @Param("param") InsuranceListParam param);
/***********************减员办理********************************/
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link List<InsuranceListVO>}
*/
List<InsuranceListVO> getInsuranceList(@Param("param") InsuranceListParam param);
/***********************减员办理********************************/
}
......@@ -29,6 +29,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
IPage<InsuranceListVO> getInsuranceListPage(Page<InsuranceListVO> page, InsuranceListParam param);
/**
* 投保办理不分页查询
*
* @author licancan
* @param param
* @return {@link List<InsuranceListVO>}
*/
List<InsuranceListVO> getInsuranceList(InsuranceListParam param);
/**
* 商险新增
*
......
......@@ -86,6 +86,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return insuranceList;
}
/**
* 投保办理不分页查询
*
* @param param
* @return {@link List<InsuranceListVO>}
* @author licancan
*/
@Override
public List<InsuranceListVO> getInsuranceList(InsuranceListParam param) {
//todo 根据登录人获取数据权限
List<InsuranceListVO> insuranceList = baseMapper.getInsuranceList(param);
if (CollectionUtils.isNotEmpty(insuranceList)){
//根据项目编码获取项目名称
List<String> collect = insuranceList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<Map> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() != CommonConstants.SUCCESS && MapUtils.isNotEmpty(setInfoByCodes.getData())) {
Map data = setInfoByCodes.getData();
for (InsuranceListVO record : insuranceList) {
JSONObject jsonObject = (JSONObject) data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getString("departName")).orElse(""));
}
}
}
}
return insuranceList;
}
/**
* 商险新增
*
......
......@@ -103,4 +103,41 @@
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.DEPT_NO as deptNo,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
ORDER BY detail.CREATE_TIME DESC
</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