Commit bf84e99f authored by fangxinjiang's avatar fangxinjiang

Merge branch 'develop'

parents 70b62254 65e19b90
......@@ -69,22 +69,25 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
if (!Common.isNotNull(employeeInfo)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
// 取值最早的合同
TEmployeeContractInfo last = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
// 取值最新审核的合同 2022-10-13 倩倩确认 最早取值审核通过的 最早合同开始时间
TEmployeeContractInfo first = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING)
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.ne(TEmployeeContractInfo::getSituation,"终止")
.ne(TEmployeeContractInfo::getSituation,"作废")
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.orderByDesc(TEmployeeContractInfo::getAuditTimeLast)
.orderByAsc(TEmployeeContractInfo::getContractStart)
.last(CommonConstants.LAST_ONE_SQL));
// 取值最早的合同
TEmployeeContractInfo first = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
// 取值最早审核的合同
TEmployeeContractInfo last = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING)
.eq(TEmployeeContractInfo::getIsObsolete,CommonConstants.ZERO_STRING)
.ne(TEmployeeContractInfo::getSituation,"终止")
.ne(TEmployeeContractInfo::getSituation,"作废")
.eq(TEmployeeContractInfo::getEmpIdcard,employeeInfo.getEmpIdcard())
.orderByAsc(TEmployeeContractInfo::getAuditTimeLast)
.isNotNull(TEmployeeContractInfo::getContractEnd)
.orderByDesc(TEmployeeContractInfo::getContractEnd)
.last(CommonConstants.LAST_ONE_SQL));
TCertRecordVo vo = new TCertRecordVo();
vo.setEmpIdcard(project.getEmpIdcard());
......
......@@ -334,5 +334,8 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description ="客户编码")
private String unitNo;
@Schema(description = "退回原因")
private String backRemark;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -71,7 +71,7 @@ public class InsuranceListParam extends BaseEntity {
private List<String> deptNoList;
/**
* 购买类型, 1新增、3批增、4替换
* 投保类型、购买类型, 1新增、3批增、4替换
*/
@Schema(description = " 购买类型(派单类型), 1新增、3批增、4替换")
private Integer buyType;
......@@ -87,4 +87,11 @@ public class InsuranceListParam extends BaseEntity {
*/
@Schema(description = "派单结束时间")
private String endDate;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回,4减员成功")
private Integer reduceHandleStatus;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -7,6 +11,7 @@ import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @author licancan
......@@ -139,4 +144,19 @@ public class InsuranceListVO implements Serializable {
*/
@Schema(description = "错误信息")
private String errorMessage;
/**
* 审批意见
*/
@Schema(description = "审批意见")
private String remark;
@Schema(description = "退回原因")
private String backRemark;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "派单日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单日期")
private LocalDateTime createTime;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -7,6 +11,7 @@ import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @author zhaji
......@@ -187,4 +192,15 @@ public class InsuranceRefundListVo implements Serializable {
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
@Schema(description = "派单人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单人")
private String createName;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "派单日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单日期")
private LocalDateTime createTime;
}
......@@ -73,4 +73,16 @@ public class InsuranceRefundParam extends BaseEntity implements Serializable {
*/
@Schema(description = "项目编码列表")
private List<String> deptNoList;
/**
* 派单开始时间
*/
@Schema(description = "派单开始时间")
private String startDate;
/**
* 派单结束时间
*/
@Schema(description = "派单结束时间")
private String endDate;
}
......@@ -233,5 +233,11 @@ public class InsuredListVo implements Serializable {
@Schema(description = "创建人所在部门名称")
private String createUserDeptName;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
}
......@@ -114,4 +114,10 @@ public class InsuredParam extends BaseEntity implements Serializable {
@Schema(description = "项目编码列表")
private List<String> deptNoList;
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
@Schema(description = "减员状态 1待减员 2减员中3减员退回,4减员成功")
private Integer reduceHandleStatus;
}
......@@ -234,6 +234,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceList.stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
for (InsuranceListVO listVO : insuranceList) {
if (CommonConstants.FOUR_INT == listVO.getBuyHandleStatus()) {
TInsuranceOperate tInsuranceOperate = tInsuranceOperateService.getOne(Wrappers.<TInsuranceOperate>query().lambda()
.eq(TInsuranceOperate::getInsuranceDetailId,listVO.getId())
.eq(TInsuranceOperate::getDisplayFlag,CommonConstants.ONE_INT)
.orderByDesc(TInsuranceOperate::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Common.isNotNull(tInsuranceOperate)) {
listVO.setRemark(tInsuranceOperate.getRemark());
}
}
}
}
return R.ok(insuranceList);
}
......@@ -843,7 +856,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
ProjectSetInfoVo jsonObject = data.get(insuranceDetailVO.getDeptNo());
if (null != jsonObject){
insuranceDetailVO.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
insuranceDetailVO.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
......@@ -914,7 +926,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (data != null) {
jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
......@@ -974,6 +985,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
vo.setBuyDay(LocalDateUtil.betweenDay(vo.getPolicyStart().toString(),vo.getPolicyEnd().toString()));
vo.setRemark(InsurancesConstants.QUIT);
vo.setBuyType(CommonConstants.FOUR_INT);
vo.setProjectName(vo.getProjectName());
list.add(vo);
}
}
......@@ -989,7 +1001,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for (InsuranceExportListVO record : list) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
......@@ -1023,7 +1034,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R<List<InsuranceListVO>> rollBackInsurance(YifuUser user, List<InsuranceHandleParam> paramList) {
//解析参数里的商险id
List<String> idList = paramList.stream().map(e -> e.getId()).distinct().collect(Collectors.toList());
List<String> idList = new ArrayList<>();
Map<String,String> remarkMap = new HashMap<>();
if (paramList != null) {
for (InsuranceHandleParam param : paramList) {
idList.add(param.getId());
remarkMap.put(param.getId(), param.getRemark());
}
}
//操作日志对象
List<InsuranceHandleParam> operateList = new ArrayList<>();
......@@ -1082,6 +1100,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
detail.setUpdateBy(user.getId());
detail.setUpdateTime(LocalDateTime.now());
detail.setBackRemark(remarkMap.get(detail.getId()));
successList.add(detail);
}
}
......@@ -3354,23 +3373,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceList = this.baseMapper.getInsuredListPage(page, param);
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
//根据项目编码获取项目名称
List<String> collect = insuranceList.getRecords().stream().map(InsuredListVo::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
for (InsuredListVo record : insuranceList.getRecords()) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}
return insuranceList;
}
......@@ -3404,7 +3411,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
}
......@@ -3437,26 +3444,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
IPage<InsuranceRefundListVo> insuranceRefundPageList = this.baseMapper.getInsuranceRefundPageList(page, param);
if (CollectionUtils.isNotEmpty(insuranceRefundPageList.getRecords())){
//根据项目编码获取项目名称
List<String> collect = insuranceRefundPageList.getRecords().stream().map(InsuranceRefundListVo::getDeptNo).distinct().collect(Collectors.toList());
try {
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
for (InsuranceRefundListVo record : insuranceRefundPageList.getRecords()) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}catch (Exception e){
log.error(InsurancesConstants.GET_DEPT_DETAIL_ERROR+e);
}
}
return R.ok(insuranceRefundPageList);
}
......@@ -3489,7 +3484,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
......@@ -3524,22 +3518,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
IPage<RefundExportListVo> insuranceRefundHandlingPageList = this.baseMapper.getInsuranceRefundHandlingPageList(page, param);
if (CollectionUtils.isNotEmpty(insuranceRefundHandlingPageList.getRecords())){
//根据项目编码获取项目名称
List<String> collect = insuranceRefundHandlingPageList.getRecords().stream().map(RefundExportListVo::getDeptNo).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (data != null) {
for (RefundExportListVo record : insuranceRefundHandlingPageList.getRecords()) {
//购买月数
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(), record.getPolicyEnd().toString()));
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}
}
......@@ -3588,7 +3569,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (data != null) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
record.setInvoiceTitle(Optional.ofNullable(jsonObject.getInvoiceTitleInsurance()).orElse(""));
}
}
......
......@@ -99,7 +99,9 @@
a.SETTLE_TYPE as settleType,
a.CREATE_USER_DEPT_NAME as createUserDeptName,
a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName
a.DEPT_NAME as projectName,
a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
a.CREATE_TIME as createTime
from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
......@@ -109,7 +111,7 @@
and a.DEPT_NO = #{param.deptNo}
</if>
<if test="param.orderNo != null and param.orderNo.trim() != ''">
and a.DEPT_NO = #{param.orderNo}
and a.ORDER_NO = #{param.orderNo}
</if>
<if test="param.buyHandleStatus != null">
and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
......@@ -136,11 +138,14 @@
and a.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
and a.CREATE_NAME like concat('%',#{param.createName},'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.reduceHandleStatus != null">
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
......@@ -165,7 +170,10 @@
a.BUY_HANDLE_STATUS as buyHandleStatus,
a.SETTLE_TYPE as settleType,
a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName
a.DEPT_NAME as projectName,
a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
if(a.BUY_HANDLE_STATUS=4,a.BACK_REMARK,'') as backRemark,
a.CREATE_TIME as createTime
from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
......@@ -204,6 +212,9 @@
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.reduceHandleStatus != null">
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
......@@ -283,6 +294,7 @@
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.POST as post,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
......@@ -327,6 +339,7 @@
<select id="getInsuranceExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
......@@ -359,6 +372,7 @@
<select id="getInsuranceExportList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO">
select a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
......@@ -434,6 +448,7 @@
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.POST as post,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
......@@ -444,7 +459,9 @@
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_TYPE_NAME as insuranceTypeName,
a.CREATE_USER_DEPT_NAME as createUserDeptName,
a.BUY_STANDARD as buyStandard
a.BUY_STANDARD as buyStandard,
a.CREATE_TIME as createTime,
a.CREATE_NAME as createName
from
t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''">
......@@ -454,6 +471,15 @@
a.DELETE_FLAG = 0
and
a.BUY_HANDLE_STATUS = 3
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyType != null">
and a.BUY_TYPE = #{param.buyType}
</if>
<if test="param.reduceHandleStatus != null">
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
......@@ -511,6 +537,7 @@
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.POST as post,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
......@@ -542,6 +569,15 @@
a.DELETE_FLAG = 0
and
a.BUY_HANDLE_STATUS = 3
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyType != null">
and a.BUY_TYPE = #{param.buyType}
</if>
<if test="param.reduceHandleStatus != null">
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
......@@ -570,6 +606,12 @@
(a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<if test="param.createStartTime != null and param.createStartTime.trim() != ''">
AND a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.createStartTime}, ' 00:00:00')
</if>
<if test="param.createEndTime != null and param.createEndTime.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59')
</if>
<if test="param.invoiceNo != null and param.invoiceNo.trim() != ''">
and a.INVOICE_NO like concat('%',replace(replace(#{param.invoiceNo},'_','\_'),'%','\%'),'%')
</if>
......@@ -579,12 +621,6 @@
<if test="param.isOverdue != null ">
and a.IS_OVERDUE = #{param.isOverdue}
</if>
<if test="param.createStartTime != null and param.createStartTime.trim() != ''">
AND a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.createStartTime}, ' 00:00:00')
</if>
<if test="param.createEndTime != null and param.createEndTime.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.createEndTime}, ' 23:59:59')
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
......@@ -599,12 +635,15 @@
a.EMP_IDCARD_NO as empIdcardNo,
a.POST as post,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.INSURANCE_COMPANY_NAME as insuranceCompanyName,
a.POLICY_START as policyStart,
a.POLICY_END as policyEnd,
a.POLICY_NO as policyNo,
a.CREATE_NAME as createName,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as refundCreateTime
refund.CREATE_TIME as refundCreateTime,
a.CREATE_TIME as createTime
from
(t_insurance_detail a,
t_insurance_refund refund)
......@@ -617,6 +656,9 @@
a.REFUND_ID = refund.ID
and
a.REDUCE_HANDLE_STATUS = 4
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
......@@ -645,6 +687,12 @@
(a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<if test="param.startDate != null and param.startDate.trim() != ''">
AND a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00')
</if>
<if test="param.endDate != null and param.endDate.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
......@@ -656,6 +704,7 @@
select
a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
......@@ -671,6 +720,7 @@
a.BUY_STANDARD as buyStandard,
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.CREATE_NAME as createName,
refund.CREATE_TIME as refundCreateTime
from
(t_insurance_detail a,
......@@ -684,6 +734,9 @@
a.DELETE_FLAG = 0
and
a.REDUCE_HANDLE_STATUS = 4
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
......@@ -712,6 +765,12 @@
(a.POLICY_END <![CDATA[ >= ]]> concat(#{param.policyStart}, ' 00:00:00') and a.POLICY_END <![CDATA[ <= ]]> concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<if test="param.startDate != null and param.startDate.trim() != ''">
AND a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00')
</if>
<if test="param.endDate != null and param.endDate.trim() != ''">
AND a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
......@@ -727,6 +786,7 @@
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.POST as post,
a.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
a.INSURANCE_CITY_NAME as insuranceCityName,
......@@ -833,6 +893,7 @@
select
a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
......@@ -867,6 +928,7 @@
select
a.id as id,
a.DEPT_NO as deptNo,
a.DEPT_NAME as projectName,
a.EMP_NAME as empName,
a.EMP_IDCARD_NO as empIdcardNo,
a.BUY_TYPE as buyType,
......
......@@ -64,21 +64,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
*/
@Override
public IPage<TSalaryAccount> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) {
long pageCount = baseMapper.getTSalaryAccountPageCountDiy(tSalaryAccount);
page.setTotal(pageCount);
if (pageCount > 0L) {
page.setPages((long) Math.ceil(pageCount / page.getSize()));
}
if (page.getCurrent() < 1) {
page.setCurrent(1L);
}
if (page.getSize() < 1) {
page.setSize(10L);
}
if (pageCount > ((page.getCurrent() - 1) * page.getSize())) {
page.setRecords(baseMapper.getTSalaryAccountPageDiy(tSalaryAccount, (page.getCurrent() - 1) * page.getSize(), page.getSize()));
}
return page;
return baseMapper.getTSalaryAccountPage(page, tSalaryAccount);
}
/**
......
......@@ -526,7 +526,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
//报账表
List<EkpSalaryParamVo> ekpList = salaryAccountService.getEkpSalaryParamList(id);
YifuUser user = SecurityUtils.getUser();
if (user != null && ekpList != null && !ekpList.isEmpty()) {
if (user != null) {
if (ekpList != null && !ekpList.isEmpty()){
boolean sendStatus = true;
String sendBack;
List<TSalaryAccount> accountList = new ArrayList<>();
......@@ -592,6 +593,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
this.saveRecordLog(s, user, CommonConstants.ONE_STRING, "发送数字化平台-失败");
return R.ok("发送失败!");
}
}else {
R.ok("无数据可发送!");
}
} else {
return R.failed("请登录!");
}
......
......@@ -348,9 +348,11 @@
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
a.DELETE_FLAG = 0
and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
<include refid="tSalaryAccount_where"/>
<if test="tSalaryAccount.authSql != null and tSalaryAccount.authSql.trim() != ''">
${tSalaryAccount.authSql}
......@@ -578,9 +580,10 @@
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
......@@ -617,9 +620,10 @@
SELECT
count(1)
FROM t_salary_account a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
)
<include refid="where_export"/>
<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
${searchVo.authSql}
......
......@@ -16,6 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -511,6 +512,14 @@ public class TDispatchInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人" )
private String auditUser;
/**
* 审核人姓名
*/
@Length(max = 32, message = "审核人姓名 不能超过32个字符" )
@Schema(description = "审核人姓名" )
@ExcelIgnore
private String auditUserName;
/**
* 审核时间
*/
......@@ -519,6 +528,7 @@ public class TDispatchInfo extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核时间" )
private Date auditTime;
/**
* 工时制:1标准工时 2 综合工时 3不定时工时制
*/
......
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
......@@ -51,4 +52,19 @@ public class SocialHandleSearchVo extends TDispatchInfo {
private int limitEnd;
private String idStr;
/**
* 审核时间开始时间
*/
@TableField(exist = false)
@Schema(description = "审核时间开始时间" )
@ExcelIgnore
private String auditTimeStart;
/**
* 审核时间截止时间
*/
@TableField(exist = false)
@Schema(description = "审核时间截止时间" )
@ExcelIgnore
private String auditTimeEnd;
}
......@@ -16,6 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.TableField;
......@@ -25,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Set;
......@@ -93,4 +95,19 @@ public class TDispatchInfoSearchVo extends TDispatchInfo {
@ExcelProperty("公积金户名称" )
private String providentHouseholdName;
/**
* 审核时间开始时间
*/
@TableField(exist = false)
@Schema(description = "审核时间开始时间" )
@ExcelIgnore
private String auditTimeStart;
/**
* 审核时间截止时间
*/
@TableField(exist = false)
@Schema(description = "审核时间截止时间" )
@ExcelIgnore
private String auditTimeEnd;
}
......@@ -2915,6 +2915,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
auditInfo.setDispatchInfoId(dis.getId());
auditInfoMapper.insert(auditInfo);
dis.setAuditUser(user.getId());
dis.setAuditUserName(user.getNickname());
dis.setAuditTime(now);
baseMapper.updateById(dis);
......
......@@ -72,6 +72,7 @@
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
<result property="auditUser" column="AUDIT_USER"/>
<result property="auditUserName" column="AUDIT_USER_NAME"/>
<result property="auditTime" column="AUDIT_TIME"/>
<result property="workingHours" column="WORKING_HOURS"/>
<result property="createBy" column="CREATE_BY"/>
......@@ -194,6 +195,7 @@
a.FUND_CITY,
a.FUND_TOWN,
a.AUDIT_USER,
a.AUDIT_USER_NAME,
a.AUDIT_TIME,
a.WORKING_HOURS,
a.CREATE_BY,
......@@ -380,9 +382,19 @@
<if test="tDispatchInfo.auditUser != null and tDispatchInfo.auditUser.trim() != ''">
AND a.AUDIT_USER = #{tDispatchInfo.auditUser}
</if>
<if test="tDispatchInfo.auditUserName != null and tDispatchInfo.auditUserName.trim() != ''">
AND a.AUDIT_USER_NAME like concat('%',#{tDispatchInfo.auditUserName},'%')
</if>
<if test="tDispatchInfo.auditTime != null">
AND a.AUDIT_TIME = #{tDispatchInfo.auditTime}
</if>
<if test="tDispatchInfo.auditTimeStart != null">
AND a.AUDIT_TIME <![CDATA[>=]]> #{tDispatchInfo.auditTimeStart}
</if>
<if test="tDispatchInfo.auditTimeEnd != null">
AND a.AUDIT_TIME <![CDATA[<=]]> #{tDispatchInfo.auditTimeEnd}
</if>
<if test="tDispatchInfo.workingHours != null and tDispatchInfo.workingHours.trim() != ''">
AND a.WORKING_HOURS = #{tDispatchInfo.workingHours}
</if>
......@@ -770,6 +782,15 @@
<if test="tDispatchInfo.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[>=]]> #{tDispatchInfo.createTimeStart}
</if>
<if test="tDispatchInfo.auditTimeStart != null">
AND a.AUDIT_TIME <![CDATA[>=]]> #{tDispatchInfo.auditTimeStart}
</if>
<if test="tDispatchInfo.auditTimeEnd != null">
AND a.AUDIT_TIME <![CDATA[<=]]> #{tDispatchInfo.auditTimeEnd}
</if>
<if test="tDispatchInfo.auditUserName != null and tDispatchInfo.auditUserName.trim() != ''">
AND a.AUDIT_USER_NAME like concat('%',#{tDispatchInfo.auditUserName},'%')
</if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.socialHouseholdName}), '%')
</if>
......@@ -874,6 +895,15 @@
<if test="tDispatchInfo.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[>=]]> #{tDispatchInfo.createTimeStart}
</if>
<if test="tDispatchInfo.auditTimeStart != null">
AND a.AUDIT_TIME <![CDATA[>=]]> #{tDispatchInfo.auditTimeStart}
</if>
<if test="tDispatchInfo.auditTimeEnd != null">
AND a.AUDIT_TIME <![CDATA[<=]]> #{tDispatchInfo.auditTimeEnd}
</if>
<if test="tDispatchInfo.auditUserName != null and tDispatchInfo.auditUserName.trim() != ''">
AND a.AUDIT_USER_NAME like concat('%',#{tDispatchInfo.auditUserName},'%')
</if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.providentHouseholdName}), '%')
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment