Commit d495c826 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents f8b35558 a083a228
......@@ -36,6 +36,12 @@ public class ProjectSetInfoVo implements Serializable {
@Schema(description = "项目名称")
private String departName;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
/**
* 所属客户
*/
......@@ -58,7 +64,7 @@ public class ProjectSetInfoVo implements Serializable {
* 商险结算类型:0预估 1 实缴
*/
@Schema(description = "商险结算类型")
private String insuranceSettleType = CommonConstants.ONE_STRING;
private String insuranceSettleType;
/**
* 业务类型一级分类
......
......@@ -239,14 +239,14 @@ public class TSettleDomainController {
/**
* 修改项目表
*
* @param tSettleDomain 项目表
* @param list 项目表
* @return R
*/
@Operation(summary = "修改项目表", description = "修改项目表")
@SysLog("修改项目表")
@PostMapping("/updateProjectInfo")
public R updateProjectInfo(@RequestBody TSettleDomain tSettleDomain) {
return tSettleDomainService.updateProjectInfo(tSettleDomain);
public R updateProjectInfo(@RequestBody List<TSettleDomain> list) {
return tSettleDomainService.updateProjectInfo(list);
}
}
......@@ -70,6 +70,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
**/
List<TSettleDomainSelectVo> selectAllSettleDomainSelectVos();
R updateProjectInfo(TSettleDomain tSettleDomain);
R updateProjectInfo(List<TSettleDomain> list);
}
......@@ -117,32 +117,34 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
@Override
public R updateProjectInfo(TSettleDomain tSettleDomain) {
if (Common.isNotNull(tSettleDomain)) {
public R updateProjectInfo(List<TSettleDomain> list) {
if (Common.isNotNull(list)) {
for (TSettleDomain tSettleDomain:list) {
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
if (null == areaListR || areaListR.getCode() != CommonConstants.SUCCESS) {
return R.failed("获取区域数据失败!");
}
AreaVo areaList = areaListR.getData();
if (null != areaList && !areaList.getSysAreaList().isEmpty()) {
for (SysArea area : areaList.getSysAreaList()) {
if (Common.isNotNull(tSettleDomain.getEProvince()) && area.getAreaName().equals(tSettleDomain.getEProvince())) {
tSettleDomain.setProvince(area.getId());
}
if (Common.isNotNull(tSettleDomain.getECity()) && area.getAreaName().equals(tSettleDomain.getECity())) {
tSettleDomain.setCity(area.getId());
}
if (Common.isNotNull(tSettleDomain.getETown()) && area.getAreaName().equals(tSettleDomain.getETown())) {
tSettleDomain.setTown(area.getId());
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
if (null == areaListR || areaListR.getCode() != CommonConstants.SUCCESS) {
return R.failed("获取区域数据失败!");
}
AreaVo areaList = areaListR.getData();
if (null != areaList && !areaList.getSysAreaList().isEmpty()) {
for (SysArea area : areaList.getSysAreaList()) {
if (Common.isNotNull(tSettleDomain.getEProvince()) && area.getAreaName().equals(tSettleDomain.getEProvince())) {
tSettleDomain.setProvince(area.getId());
}
if (Common.isNotNull(tSettleDomain.getECity()) && area.getAreaName().equals(tSettleDomain.getECity())) {
tSettleDomain.setCity(area.getId());
}
if (Common.isNotNull(tSettleDomain.getETown()) && area.getAreaName().equals(tSettleDomain.getETown())) {
tSettleDomain.setTown(area.getId());
}
}
}
}
TSettleDomain tSettleDomainInfo = baseMapper.selectById(tSettleDomain.getId());
if (Common.isNotNull(tSettleDomainInfo)) {
baseMapper.updateById(tSettleDomain);
} else {
baseMapper.insert(tSettleDomain);
TSettleDomain tSettleDomainInfo = baseMapper.selectById(tSettleDomain.getId());
if (Common.isNotNull(tSettleDomainInfo)) {
baseMapper.updateById(tSettleDomain);
} else {
baseMapper.insert(tSettleDomain);
}
}
return R.ok();
} else {
......
......@@ -234,7 +234,8 @@
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.STOP_FLAG
a.STOP_FLAG,
a.INVOICE_TITLE
FROM t_settle_domain a
LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID
where 1=1
......
......@@ -378,6 +378,16 @@ public interface CommonConstants {
// 日
String DAY = "日";
/**
* 一年365天
*/
int ONE_YEAR = 365;
/**
* 数字70
*/
int SEVENTY = 70;
/**
* 省市
* @Author fxj
......
......@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -30,6 +31,42 @@ public class IdCardUtil {
}
/**
* 根据身份证号计算周岁
* 例如:当前时间是2022-08-22,那么2007-08-22算15周岁,2007-08-23才算16周岁
*
* @author licancan
* @param idNO
* @return {@link int}
*/
public static int getFullAge(String idNO){
Date birthday = getBirthdate(idNO);
// 从Calendar对象中获得一个Date对象
Calendar cal = Calendar.getInstance();
// 把出生日期放入Calendar类型的bir对象中,进行Calendar和Date类型进行转换
Calendar bir = Calendar.getInstance();
bir.setTime(birthday);
// 如果生日大于当前日期,则抛出异常:出生日期不能大于当前日期
if (cal.before(birthday)) {
throw new IllegalArgumentException("The birthday is after Now,It's unbelievable");
}
// 取出当前年月日
int yearNow = cal.get(Calendar.YEAR);
int monthNow = cal.get(Calendar.MONTH);
int dayNow = cal.get(Calendar.DAY_OF_MONTH);
// 取出出生年月日
int yearBirth = bir.get(Calendar.YEAR);
int monthBirth = bir.get(Calendar.MONTH);
int dayBirth = bir.get(Calendar.DAY_OF_MONTH);
// 大概年龄是当前年减去出生年
int age = yearNow - yearBirth;
// 如果出当前月大于出生月,或者当前月等于出生月但是当前日大于出生日,那么年龄age就加一岁
if (monthNow > monthBirth || (monthNow == monthBirth && dayNow > dayBirth)) {
age++;
}
return age;
}
/**
* 提取身份证中的出生日期,身份证非法则返回空
* @param idNum
......
......@@ -185,6 +185,14 @@ public class InsurancesConstants {
* 员工身份证号格式错误
*/
public static final String EMP_IDCARD_NO_NOT_LEGITIMATE = "员工身份证号格式错误";
/**
* 员工年龄需在16岁-70岁之间
*/
public static final String EMP_AGE_NOT_LEGITIMATE = "员工年龄需在16岁-70岁之间";
/**
* 替换员工年龄需在16岁-70岁之间
*/
public static final String REPLACE_EMP_AGE_NOT_LEGITIMATE = "替换员工年龄需在16岁-70岁之间";
/**
* 员工未通过实名认证
*/
......@@ -245,6 +253,10 @@ public class InsurancesConstants {
* 保单结束时间需要大于保单开始时间
*/
public static final String POLICY_START_SHOULD_LESS_THAN_POLICY_END = "保单结束时间需要大于保单开始时间";
/**
* 保单起止时间不能超过365天
*/
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过365天";
/**
* 保单结束时间不能为空
*/
......@@ -810,7 +822,7 @@ public class InsurancesConstants {
/**
* 减员退回的办理意见不能为空
*/
public static final String REFUND_MESSAGE_IS_EMPTY = "减员退回的办理意见不能为空";
public static final String REFUND_MESSAGE_IS_EMPTY = "办理失败意见不能为空";
/**
* 该保单信息已被更新为减员退回
......@@ -844,12 +856,12 @@ public class InsurancesConstants {
/**
* 办理结果类型错误
*/
public static final String HAND_RESULT_ERROR = "办理结果类型错误";
public static final String HAND_RESULT_ERROR = "办理结果请填写成功或者失败";
/**
* 办理结果为空
*/
public static final String HAND_RESULT_IS_EMPTY = "办理结果为空";
public static final String HAND_RESULT_IS_EMPTY = "办理结果不能为空";
/**
* 无该条数据的操作权限
......@@ -885,8 +897,10 @@ public class InsurancesConstants {
*/
public static final String REFUND_STATUS_FOUR_HANDLE_ERROR = "当前为减员退回状态,不可办理";
/**
* 办理意见长度超过50字符限制
*/
public static final String HAND_REMARK_NOT_MORE_THAN_50 = "办理意见长度超过50字符限制";
......
......@@ -52,9 +52,15 @@ public class InsuranceDetailVO implements Serializable {
/**
* 项目编码
*/
@JsonIgnore
@Schema(description = "项目编码")
private String deptNo;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
/**
* 投保岗位
*/
......@@ -167,9 +173,9 @@ public class InsuranceDetailVO implements Serializable {
private Integer buyHandleStatus;
/**
* 减员状态 1待减员 2减员中3减员退回
* 减员状态 1待减员 2减员中 3减员退回 4减员成功
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
@Schema(description = "减员状态 1待减员 2减员中 3减员退回 4减员成功")
private Integer reduceHandleStatus;
/**
......@@ -256,4 +262,78 @@ public class InsuranceDetailVO implements Serializable {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 附件 todo 数据库暂时未关联附件,这个字段没值
*/
@Schema(description = "附件:预留字段,暂时都是空")
private String enclosure;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 计费方式(0:按天,1:按月)
*/
@Schema(description = "计费方式(0:按天,1:按月)")
private Integer billingType;
/**
* 购买周期
*/
@Schema(description = "购买周期")
private String buyCycle;
/**
* 费率
*/
@Schema(description = "费率")
private String rate;
/**
* 派单类型 1新增、3批增、4替换、5减员
*/
@Schema(description = "派单类型:1新增、3批增、4替换、5减员")
private Integer distributeType;
/**
* 派单状态
* 减员状态 1待减员 2减员中 3减员退回 4减员成功
* 办理状态 1待投保 2投保中 3已投保 4投保退回
*/
@Schema(description = "派单状态:派单类型是1、3、4时:1待投保 2投保中 3已投保 4投保退回,派单类型是5时:1待减员 2减员中 3减员退回 4减员成功")
private Integer distributeStatus;
/**
* 被替换人姓名
*/
@Schema(description = "被替换人姓名(替换类型专用字段)")
private String coverEmpName;
/**
* 被替换人身份证号
*/
@Schema(description = "被替换人身份证号(替换类型专用字段)")
private String coverEmpIdcardNo;
/**
* 被替换人项目名称
*/
@Schema(description = "被替换人项目名称(替换类型专用字段)")
private String coverProjectName;
/**
* 退保金额 todo 数据库暂时没有
*/
@Schema(description = "退保金额 :预留字段,暂时都是空(减员类型专用)")
private String surrender;
/**
* 退保结算状态 todo 数据库暂时没有
*/
@Schema(description = "退保结算状态 :预留字段,暂时都是空(减员类型专用)")
private String surrenderSettleStatus;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author licancan
* @description 商险操作(加审批意见)请求参数
* @date 2022-08-22 13:58:58
*/
@Data
@Schema(description = "商险操作(加审批意见)请求参数")
public class InsuranceHandleParam implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商险明细id
*/
@Schema(description = "商险明细id")
@NotBlank(message = "商险明细id不能为空")
private String id;
/**
* 审批意见
*/
@Schema(description = "审批意见")
private String remark;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;
/**
......@@ -75,4 +77,30 @@ public class InsuranceListParam implements Serializable {
*/
@Schema(description = "保单办理人")
private String updateBy;
/**
* 购买类型, 1新增、3批增、4替换
*/
@Schema(description = " 购买类型(派单类型), 1新增、3批增、4替换")
private Integer buyType;
/**
* 创建者-姓名
*/
@Schema(description = "派单人")
private String createName;
/**
* 派单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "派单开始时间")
private LocalDate startDate;
/**
* 派单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "派单结束时间")
private LocalDate endDate;
}
......@@ -2,9 +2,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
......@@ -116,8 +121,6 @@ public class TInsuranceDetailController {
return R.ok(tInsuranceDetailService.getInsuranceList(param));
}
/**
* 商险新增
*
......@@ -198,6 +201,19 @@ public class TInsuranceDetailController {
return R.ok(tInsuranceDetailService.getInsuranceDetailById(id));
}
/**
* 通过商险id查询操作记录
*
* @author licancan
* @param id
* @return {@link R< List<TInsuranceOperate>>}
*/
@Operation(summary = "通过商险id查询操作记录", description = "通过商险id查询操作记录")
@GetMapping("/operate/{id}")
public R<List<TInsuranceOperate>> getInsuranceOperateList(@PathVariable("id") String id) {
return R.ok(tInsuranceDetailService.getInsuranceOperateList(id));
}
/**
* 导出办理
*
......@@ -215,26 +231,34 @@ public class TInsuranceDetailController {
* 投保退回
*
* @author licancan
* @param idList
* @param paramList
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation(summary = "投保退回", description = "投保退回")
@PostMapping("/rollBackInsurance")
public R<List<InsuranceListVO>> rollBackInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<String> idList){
return tInsuranceDetailService.rollBackInsurance(idList);
public R<List<InsuranceListVO>> rollBackInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
return tInsuranceDetailService.rollBackInsurance(user,paramList);
}
/**
* 办理成功
*
* @author licancan
* @param idList
* @param paramList
* @return {@link R<List<InsuranceListVO>>}
*/
@Operation(summary = "办理成功", description = "办理成功")
@PostMapping("/successfulInsurance")
public R<List<InsuranceListVO>> successfulInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<String> idList){
return tInsuranceDetailService.successfulInsurance(idList);
public R<List<InsuranceListVO>> successfulInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
return tInsuranceDetailService.successfulInsurance(user,paramList);
}
/**
......
......@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import java.util.List;
......@@ -129,6 +131,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
InsuranceDetailVO getInsuranceDetailById(String id);
/**
* 通过商险id查询操作记录
*
* @author licancan
* @param id
* @return {@link List<TInsuranceOperate>}
*/
List<TInsuranceOperate> getInsuranceOperateList(String id);
/**
* 导出办理
*
......@@ -142,19 +153,21 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* 投保退回
*
* @author licancan
* @param idList
* @param user
* @param paramList
* @return {@link R<List<InsuranceListVO>>}
*/
R<List<InsuranceListVO>> rollBackInsurance(List<String> idList);
R<List<InsuranceListVO>> rollBackInsurance(YifuUser user, List<InsuranceHandleParam> paramList);
/**
* 办理成功
*
* @author licancan
* @param idList
* @param user
* @param paramList
* @return {@link R<List<InsuranceListVO>>}
*/
R<List<InsuranceListVO>> successfulInsurance(List<String> idList);
R<List<InsuranceListVO>> successfulInsurance(YifuUser user, List<InsuranceHandleParam> paramList);
/**
* 登记保单保费
......@@ -341,5 +354,4 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R}
*/
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard,String deptNo);
}
......@@ -69,7 +69,7 @@
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME
</sql>
<!--投保办理分页查询-->
<!--投保分页查询-->
<select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id,
detail.EMP_NAME as empName,
......@@ -119,6 +119,15 @@
#{item}
</foreach>
</if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
......@@ -171,10 +180,19 @@
<if test="param.updateBy != null and param.updateBy.trim() != ''">
and detail.HANDLED_BY = #{param.updateBy}
</if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保办理不分页查询-->
<!--投保不分页查询-->
<select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id,
detail.EMP_NAME as empName,
......@@ -224,6 +242,15 @@
#{item}
</foreach>
</if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
......@@ -276,7 +303,15 @@
#{item}
</foreach>
</if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO">
......@@ -318,7 +353,10 @@
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.INSURANCE_HANDLE_CITY as insuranceHandleCity,
detail.CREATE_NAME as createName,
detail.CREATE_TIME as createTime
detail.CREATE_TIME as createTime,
detail.REMARK as remark,
detail.BILLING_TYPE as billingType,
detail.RATE as rate
from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id}
......
......@@ -208,6 +208,42 @@ public class TSalaryStandard extends BaseEntity {
@ExcelAttribute(name = "自有员工应发总额")
@ExcelProperty("自有员工应发总额")
private BigDecimal ownMoney;
/**
* 发薪特殊值人数,默认0
*/
@ExcelAttribute(name = "发薪特殊值人数,默认0")
@ExcelProperty("发薪特殊值人数,默认0")
private Integer specialNums;
/**
* 发薪特殊值应发总额
*/
@ExcelAttribute(name = "发薪特殊值应发总额")
@ExcelProperty("发薪特殊值应发总额")
private BigDecimal specialMoney;
/**
* 薪资员工发放稿酬/劳务费人数,默认0
*/
@ExcelAttribute(name = "薪资员工发放稿酬/劳务费人数,默认0")
@ExcelProperty("薪资员工发放稿酬/劳务费人数,默认0")
private Integer salaryNums;
/**
* 薪资员工发放稿酬/劳务费总额
*/
@ExcelAttribute(name = "薪资员工发放稿酬/劳务费总额")
@ExcelProperty("薪资员工发放稿酬/劳务费总额")
private BigDecimal salaryMoney;
/**
* 本月是否重复金额人数,默认0
*/
@ExcelAttribute(name = "本月是否重复金额人数,默认0")
@ExcelProperty("本月是否重复金额人数,默认0")
private Integer repeatNums;
/**
* 本月是否重复金额总额
*/
@ExcelAttribute(name = "本月是否重复金额总额")
@ExcelProperty("本月是否重复金额总额")
private BigDecimal repeatMoney;
/**
* 自有员工强行提交的备注
*/
......
......@@ -1543,6 +1543,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
int ownNum = 0;
// 自有员工应发金额
BigDecimal ownMoney = BigDecimal.ZERO;
// 发薪特殊值人数
int specialNums = 0;
// 发薪特殊值应发总额
BigDecimal specialMoney = BigDecimal.ZERO;
// 薪资员工发放稿酬/劳务费人数
int salaryNums = 0;
// 薪资员工发放稿酬/劳务费总额
BigDecimal salaryMoney = BigDecimal.ZERO;
// 本月是否重复金额人数
int repeatNums = 0;
// 本月是否重复金额总额
BigDecimal repeatMoney = BigDecimal.ZERO;
BigDecimal relaySalary; //工资应发
// 劳务费、稿酬是否含有发薪false:否;true:是
boolean haveSalaryFlag = false;
......@@ -1599,6 +1612,24 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
ownMoney = ownMoney.add(relaySalary);
}
// 发薪特殊值人数以及应发金额
if (Common.isNotNull(a.getHaveSpecialFlag()) && a.getHaveSpecialFlag() == 1) {
specialNums++;
specialMoney = specialMoney.add(relaySalary);
}
// 薪资员工发放稿酬/劳务费人数以及应发金额
if (Common.isNotNull(a.getHaveSalaryFlag()) && a.getHaveSalaryFlag() == 1) {
salaryNums++;
salaryMoney = salaryMoney.add(relaySalary);
}
// 本月是否重复金额人数以及应发金额
if (Common.isNotNull(a.getIsRepeat()) && a.getIsRepeat() == 1) {
repeatNums++;
repeatMoney = repeatMoney.add(relaySalary);
}
//累计扣税list
asList = this.getLaborAsList(itemMap.get(a.getEmpIdcard()), a.getSettlementMonth());
......
......@@ -63,7 +63,13 @@
<result property="unitName" column="UNIT_NAME"/>
<result property="sendTime" column="SEND_TIME"/>
<result property="sendMonth" column="SEND_MONTH"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="specialNums" column="SPECIAL_NUMS"/>
<result property="specialMoney" column="SPECIAL_MONEY"/>
<result property="salaryNums" column="SALARY_NUMS"/>
<result property="salaryMoney" column="SALARY_MONEY"/>
<result property="repeatMoney" column="REPEAT_MONEY"/>
<result property="repeatNums" column="REPEAT_NUMS"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -106,6 +112,12 @@
a.UNIT_NO,
a.SEND_TIME,
a.SEND_MONTH,
a.SPECIAL_NUMS,
a.SPECIAL_MONEY,
a.SALARY_NUMS,
a.SALARY_MONEY,
a.REPEAT_MONEY,
a.REPEAT_NUMS,
a.INVOICE_TITLE
</sql>
<sql id="tSalaryStandard_where">
......@@ -182,6 +194,24 @@
<if test="tSalaryStandard.ownMoney != null">
AND a.OWN_MONEY = #{tSalaryStandard.ownMoney}
</if>
<if test="tSalaryStandard.specialNums != null">
AND a.SPECIAL_NUMS = #{tSalaryStandard.specialNums}
</if>
<if test="tSalaryStandard.specialMoney != null">
AND a.SPECIAL_MONEY = #{tSalaryStandard.specialMoney}
</if>
<if test="tSalaryStandard.salaryNums != null">
AND a.SALARY_NUMS = #{tSalaryStandard.salaryNums}
</if>
<if test="tSalaryStandard.salaryMoney != null">
AND a.SALARY_MONEY = #{tSalaryStandard.salaryMoney}
</if>
<if test="tSalaryStandard.repeatMoney != null">
AND a.REPEAT_MONEY = #{tSalaryStandard.repeatMoney}
</if>
<if test="tSalaryStandard.repeatNums != null">
AND a.REPEAT_NUMS = #{tSalaryStandard.repeatNums}
</if>
<if test="tSalaryStandard.ownRemark != null and tSalaryStandard.ownRemark.trim() != ''">
AND a.OWN_REMARK = #{tSalaryStandard.ownRemark}
</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