Commit e689122c authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents d38aa048 a1172bf7
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
......@@ -12,9 +13,10 @@ import java.io.Serializable;
*/
@Data
public class UpProjectSocialFundVo implements Serializable {
// 社保状态
// 社保状态 社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
@Schema(name = "社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减")
String socialStatus;
// 公积金状态
// 公积金状态 社保状态(字典): 0 无社保 1 处理中 2.正常 3.已派减
String fundStatus;
// 项目编码
String departNo;
......
......@@ -484,4 +484,8 @@ public interface ErrorCodes {
* 派增异常: 已存在对应手机号码的在用员工档案
*/
String EMP_DISPATCH_EMP_MOBILE_REPEAT = "emp.dispatch.emp.mobile.repeat";
/**
* 派增异常: 同一身份证不可分多行派单
*/
String EMP_DISPATCH_EXIST = "emp_dispatch_exist";
}
......@@ -185,6 +185,8 @@ emp.dispatch.social.diy.injury.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5355\u6D3E
emp.dispatch.emp.mobile.repeat=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5DF2\u5B58\u5728\u5BF9\u5E94\u624B\u673A\u53F7\u7801\u7684\u5728\u7528\u5458\u5DE5\u6863\u6848
emp_dispatch_exist=\u6D3E\u589E\u5F02\u5E38\uFF1A \u540C\u4E00\u8EAB\u4EFD\u8BC1\u4E0D\u53EF\u5206\u591A\u884C\u6D3E\u5355
......
......@@ -365,7 +365,7 @@ public class TInsuranceDetailController {
@Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList")
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundHandlingList(param));
return tInsuranceDetailService.getInsuranceRefundHandlingList(param);
}
/**
......
......@@ -189,4 +189,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, @Param("idCard") String idCard);
List<TInsuranceDetail> selectListByempIdcardNo(String empIdcardNo);
TInsuranceDetail selectByregionSQL(@Param("regionSql") String regionSQL,@Param("id") String id);
}
......@@ -231,7 +231,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数
* @return {@link List< RefundExportListVo >}
*/
List<RefundExportListVo> getInsuranceRefundHandlingList(RefundExportListParam param);
R<List<RefundExportListVo>> getInsuranceRefundHandlingList(RefundExportListParam param);
/**
* 减员办理
......
......@@ -2406,17 +2406,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间
TInsuranceDetail detailByRegionSQL = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, param.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, param.getEmpIdcardNo())
.eq(TInsuranceDetail::getInsuranceCompanyName, param.getInsuranceCompanyName())
.eq(TInsuranceDetail::getInsuranceTypeName, param.getInsuranceTypeName())
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(regionSQL+CommonConstants.LAST_ONE_SQL)
);
//查数据是否存在权限范围内
TInsuranceDetail detailByRegionSQL = this.baseMapper.selectByregionSQL(regionSQL, detail.getId());
if (!Optional.ofNullable(detailByRegionSQL).isPresent()){
param.setErrorMessage(InsurancesConstants.NO_UPDATE_DETAIL_JURISDICTION);
listResult.add(param);
......@@ -2866,7 +2857,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
@Transactional(rollbackFor = Exception.class)
public List<RefundExportListVo> getInsuranceRefundHandlingList(RefundExportListParam param){
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(RefundExportListParam param){
YifuUser user = SecurityUtils.getUser();
List<RefundExportListVo> refundExportList;
......@@ -2876,6 +2867,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
refundExportList = baseMapper.getRefundExportListBySelect(param.getIdList());
for (RefundExportListVo refundExportListVo : refundExportList) {
if(null != refundExportListVo.getReduceHandleStatus() && CommonConstants.ONE_INT != refundExportListVo.getReduceHandleStatus()){
return R.failed(InsurancesConstants.CHANGE_ERROR);
}
}
}else {
refundExportList = baseMapper.getRefundExportList(param);
}
......@@ -2913,7 +2909,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//批量更新
if (CollectionUtils.isNotEmpty(detailList)){
this.saveOrUpdateBatch(detailList);
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
for (TInsuranceDetail s : detailList) {
updateWrapper.eq(TInsuranceDetail :: getId,s.getId())
.set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT)
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper);
}
}
//批量更新
if (CollectionUtils.isNotEmpty(refundList)){
......@@ -2924,7 +2927,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//操作记录
addOperate(detailList,user,InsurancesConstants.INSURANCE_REFUND_EXPORT);
}
return refundExportList;
return R.ok(refundExportList);
}
/**
......@@ -2943,6 +2946,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
YifuUser user = SecurityUtils.getUser();
List<String> insuranceDetailList = insuranceDetail.getInsuranceDetailList();
if (CollectionUtils.isEmpty(insuranceDetailList)){
return R.failed("减员办理列表为空");
}
List<RefundErrorVo> errorList = new ArrayList<>();
List<TInsuranceDetail> successList = new ArrayList<>();
List<TInsuranceDetail> tInsuranceDetails = this.listByIds(insuranceDetailList);
......@@ -2967,6 +2973,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail.setReduceHandleStatus(refundType);
if(CommonConstants.FOUR_INT == refundType){
tInsuranceDetail.setIsOverdue(null);
tInsuranceDetail.setIsEffect(null);
tInsuranceDetail.setBuyHandleStatus(CommonConstants.FIVE_INT);
}else {
tInsuranceDetail.setBuyHandleStatus(CommonConstants.THREE_INT);
......
......@@ -803,6 +803,7 @@
detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.REMARK as remark
from
t_insurance_detail detail
......@@ -903,4 +904,17 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<select id="selectByregionSQL" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT
<include refid="Base_Column_List"/>
FROM
t_insurance_detail detail
<where>
detail.ID = #{id}
<if test="regionSql != null and regionSql.trim() != ''">
and ${regionSql}
</if>
</where>
ORDER BY CREATE_TIME desc
</select>
</mapper>
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
......@@ -46,6 +47,7 @@ public class TSalaryEmployee extends BaseEntity {
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelIgnore
@ExcelProperty("主键")
private String id;
/**
......@@ -70,7 +72,15 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "客户id", maxLength = 32)
@Length(max = 32, message = "客户id不能超过32个字符")
@ExcelProperty("客户id")
@ExcelIgnore
private String unitId;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 客户名称
*/
......@@ -84,6 +94,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Length(max = 32, message = "客户编码不能超过32个字符")
@ExcelProperty("客户编码")
@ExcelIgnore
private String unitNo;
/**
* 项目id
......@@ -91,6 +102,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "项目id", maxLength = 32)
@Length(max = 32, message = "项目id不能超过32个字符")
@ExcelProperty("项目id")
@ExcelIgnore
private String deptId;
/**
* 项目名称
......@@ -113,6 +125,18 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省")
@ExcelProperty("开户行省")
private Integer bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市")
@ExcelProperty("开户行市")
private Integer bankCity;
/**
* 开户行支行
*/
......@@ -127,25 +151,6 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符")
@ExcelProperty("银行卡号")
private String bankNo;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省")
@ExcelProperty("开户行省")
private Integer bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市")
@ExcelProperty("开户行市")
private Integer bankCity;
/**
* 手机号码
*/
......
......@@ -255,5 +255,11 @@ public class TSalaryStandard extends BaseEntity {
@Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符")
@ExcelProperty("推送月份(YYYYMM)")
private String sendMonth;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Date 2022/8/8
* @Description
* @Version 1.0
*/
@Data
public class TSalaryStandardExportVo implements Serializable {
/**
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)
*/
@ExcelAttribute(name = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)")
@NotBlank(message = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空")
@ExcelProperty("状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)")
private Integer status;
/**
* 推送月份(YYYYMM)
*/
@ExcelAttribute(name = "推送月份", isNotEmpty = true, errorInfo = "推送月份(YYYYMM)不能为空", maxLength = 6)
@NotBlank(message = "推送月份(YYYYMM)不能为空")
@Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符")
@ExcelProperty("推送月份")
private String sendMonth;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称",errorInfo = "项目名称不能为空", maxLength = 50)
@NotBlank(message = "项目名称不能为空")
@Length(max = 50, message = "部门名称不能超过50个字符")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Length(max = 32, message = "项目编码不能超过32个字符")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 项目金额
*/
@ExcelAttribute(name = "项目金额")
@ExcelProperty("项目金额")
private BigDecimal settlementAmount;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
/**
* 工资月份(YYYYMM)
*/
@ExcelAttribute(name = "工资月份(YYYYMM)", isNotEmpty = true, errorInfo = "工资月份(YYYYMM)不能为空", maxLength = 6)
@NotBlank(message = "工资月份(YYYYMM)不能为空")
@Length(max = 6, message = "工资月份(YYYYMM)不能超过6个字符")
@ExcelProperty("薪酬月份")
private String salaryMonth;
/**
* 表单类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬
*/
@ExcelAttribute(name = "表单类型", isDataId = true, readConverterExp = "0=薪资,1=绩效,2=其他,3=劳务费,4=稿酬")
@NotBlank(message = "表单类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬不能为空")
@Length(max = 32, message = "表单类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬不能超过32个字符")
@ExcelProperty("表单类型")
private String formType;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
......@@ -132,7 +132,7 @@ public class TSalaryEmployeeController {
/**
* 薪酬人员表 批量导出
*
* @author hgw
* @author fxj
* @date 2022-08-05 11:40:14
**/
@Operation(description = "导出薪酬人员表 hasPermission('salary_tsalaryemployee-export')")
......
......@@ -118,7 +118,7 @@ public class TSalaryStandardController {
/**
* 标准薪酬工资表 批量导出
*
* @author hgw
* @author fxj
* @date 2022-08-05 11:40:14
**/
@Operation(description = "导出标准薪酬工资表 hasPermission('salary_tsalarystandard-export')")
......
......@@ -19,10 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 标准薪酬工资表
*
......@@ -44,4 +49,8 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
* @return
*/
IPage<TSalaryStandard> getTSalaryStandardAuditPage(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard);
List<TSalaryStandardExportVo> getSalaryStandardExport( @Param("tSalaryStandard") TSalaryStandardSearchVo searchVo);
int getSalaryStandardExportCount(TSalaryStandardSearchVo searchVo);
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
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.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import javax.servlet.http.HttpServletResponse;
......@@ -47,7 +48,7 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
void listExport(HttpServletResponse response, TSalaryStandardSearchVo searchVo);
List<TSalaryStandard> noPageDiy(TSalaryStandardSearchVo searchVo);
List<TSalaryStandardExportVo> noPageDiy(TSalaryStandardSearchVo searchVo);
/**
* 标准薪酬工资表审核页面简单分页查询
......
......@@ -76,7 +76,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
*/
@Override
public void listExport(HttpServletResponse response, TSalaryEmployeeSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "薪酬人员表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSalaryEmployee> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
......@@ -167,6 +167,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TSalaryEmployee::getCreateName, entity.getCreateName());
}
if (Common.isNotNull(entity.getEmpName())) {
wrapper.eq(TSalaryEmployee::getEmpName, entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())) {
wrapper.eq(TSalaryEmployee::getEmpIdcard, entity.getEmpIdcard());
}
return wrapper;
}
......
......@@ -36,6 +36,7 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo;
import lombok.extern.log4j.Log4j2;
......@@ -76,9 +77,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
*/
@Override
public void listExport(HttpServletResponse response, TSalaryStandardSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx";
String fileName = "标准薪酬工资表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSalaryStandard> list = new ArrayList<>();
List<TSalaryStandardExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
......@@ -88,7 +89,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryStandard.class).build();
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryStandardExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) {
......@@ -97,8 +98,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TSalaryStandard> util = new ExcelUtil<>(TSalaryStandard.class);
for (TSalaryStandard vo : list) {
ExcelUtil<TSalaryStandardExportVo> util = new ExcelUtil<>(TSalaryStandardExportVo.class);
for (TSalaryStandardExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
......@@ -135,39 +136,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
@Override
public List<TSalaryStandard> noPageDiy(TSalaryStandardSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandard> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandard::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
public List<TSalaryStandardExportVo> noPageDiy(TSalaryStandardSearchVo searchVo) {
return baseMapper.getSalaryStandardExport(searchVo);
}
private Long noPageCountDiy(TSalaryStandardSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandard> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandard::getId, idList);
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TSalaryStandardSearchVo entity) {
LambdaQueryWrapper<TSalaryStandard> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TSalaryStandard::getCreateTime, entity.getCreateTimes()[0])
.le(TSalaryStandard::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TSalaryStandard::getCreateName, entity.getCreateName());
}
return wrapper;
private int noPageCountDiy(TSalaryStandardSearchVo searchVo) {
return baseMapper.getSalaryStandardExportCount(searchVo);
}
@Override
......
......@@ -58,6 +58,7 @@
<result property="unitName" column="UNIT_NAME"/>
<result property="sendTime" column="SEND_TIME"/>
<result property="sendMonth" column="SEND_MONTH"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -94,7 +95,8 @@
a.UNIT_NAME,
a.UNIT_NO,
a.SEND_TIME,
a.SEND_MONTH
a.SEND_MONTH,
a.INVOICE_TITLE
</sql>
<sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null">
......@@ -219,23 +221,60 @@
FROM t_salary_standard a
<where>
1=1
<if test="tSalaryStandard != null">
<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
AND a.DEPT_NAME like concat(#{'%',#{tSalaryStandard.deptName},'%')
</if>
<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
AND a.DEPT_NO = #{tSalaryStandard.deptNo}
</if>
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if test="tSalaryStandard.status == null">
AND a.STATUS = 1 OR a.STATUS = 2
</if>
<if test="tSalaryStandard.status != null">
AND a.STATUS = #{tSalaryStandard.status}
</if>
</if>
<include refid="where_page"/>
</where>
</select>
<!--tSalaryStandard简单分页查询-->
<select id="getSalaryStandardExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo">
SELECT
a.STATUS,
a.SEND_MONTH,
a.DEPT_NAME,
a.DEPT_NO,
a.SETTLEMENT_AMOUNT,
a.ID,
a.DEPT_ID,
a.BELONG_DEPT_ID,
a.BELONG_DEPT_CODE,
a.SETTLEMENT_MONTH,
a.INVOICE_TITLE,
a.CREATE_NAME,
a.SALARY_MONTH,
a.FORM_TYPE,
a.CREATE_TIME
FROM t_salary_standard a
<where>
1=1
<include refid="where_page"/>
</where>
</select>
<!--tSalaryStandard简单分页查询-->
<select id="getSalaryStandardExportCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_salary_standard a
<where>
1=1
<include refid="where_page"/>
</where>
</select>
<sql id="where_page">
<if test="tSalaryStandard != null">
<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
AND a.DEPT_NAME like concat(#{'%',#{tSalaryStandard.deptName},'%')
</if>
<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
AND a.DEPT_NO = #{tSalaryStandard.deptNo}
</if>
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if test="tSalaryStandard.status == null">
AND a.STATUS = 1 OR a.STATUS = 2
</if>
<if test="tSalaryStandard.status != null">
AND a.STATUS = #{tSalaryStandard.status}
</if>
</if>
</sql>
</mapper>
......@@ -100,7 +100,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
/**
* 委托备注
*/
@ExcelAttribute(name = "委托备注")
@ExcelAttribute(name = "委托备注" , maxLength = 200)
@Schema(description = "委托备注" )
@ExcelProperty("委托备注" )
private String trustRemark;
......
......@@ -1693,11 +1693,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
if (Common.isNotNull(library.getId())) {
baseMapper.updateById(library);
isSaveAndUpdate = true;
} else {
library.setCreateTime(LocalDateTime.now());
baseMapper.insert(library);
if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT
|| BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) {
library.setCreateTime(LocalDateTime.now());
baseMapper.insert(library);
isSaveAndUpdate = true;
}
}
isSaveAndUpdate = true;
}
if (isSaveAndUpdate) {
return R.ok(null, "执行成功!");
......@@ -1810,7 +1814,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//起缴月份在要生成的月份前不处理 || 截止月份在要生成的月份后不处理
if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(minStartDate)
|| (Common.isNotNull(tSocialInfo.getSocialReduceDate())
&& Integer.parseInt(payMonth) > DateUtil.formatDateInt(tSocialInfo.getSocialReduceDate()))) {
&& Integer.parseInt(payMonth) >= DateUtil.formatDateInt(tSocialInfo.getSocialReduceDate()))) {
continue;
}
flag = CommonConstants.ZERO_STRING.equals(tSocialInfo.getCanOverpay()) && (null == tSocialInfo.getOverpayNumber() || null == tSocialInfo.getHaveThisMonth() || null == minStartDate);
......
......@@ -551,10 +551,10 @@
AND a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain}
</if>
<if test="tSocialFundInfo.settleDomainName != null and tSocialFundInfo.settleDomainName.trim() != ''">
AND (a.SETTLE_DOMAIN_NAME = #{tSocialFundInfo.settleDomainName} or a.SETTLE_DOMAIN_NAME_FUND = #{tSocialFundInfo.settleDomainName})
AND (a.SETTLE_DOMAIN_NAME like concat('%',#{tSocialFundInfo.settleDomainName},'%') or a.SETTLE_DOMAIN_NAME_FUND like concat('%',#{tSocialFundInfo.settleDomainName},'%'))
</if>
<if test="tSocialFundInfo.unitName != null and tSocialFundInfo.unitName.trim() != ''">
AND (a.UNIT_NAME = #{tSocialFundInfo.unitName} or a.UNIT_NAME_FUND = #{tSocialFundInfo.unitName})
AND (a.UNIT_NAME like concat('%',#{tSocialFundInfo.unitName},'%') or a.UNIT_NAME_FUND like concat('%',#{tSocialFundInfo.unitName},'%'))
</if>
<if test="tSocialFundInfo.unitId != null and tSocialFundInfo.unitId.trim() != ''">
AND a.UNIT_ID = #{tSocialFundInfo.unitId}
......@@ -563,7 +563,7 @@
AND a.SOCIAL_HOUSEHOLD = #{tSocialFundInfo.socialHousehold}
</if>
<if test="tSocialFundInfo.socialHouseholdName != null and tSocialFundInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tSocialFundInfo.socialHouseholdName}
AND a.SOCIAL_HOUSEHOLD_NAME like concat('%',#{tSocialFundInfo.socialHouseholdName},'%')
</if>
<if test="tSocialFundInfo.socialProvince != null and tSocialFundInfo.socialProvince.trim() != ''">
AND a.SOCIAL_PROVINCE = #{tSocialFundInfo.socialProvince}
......@@ -578,7 +578,7 @@
AND a.PROVIDENT_HOUSEHOLD = #{tSocialFundInfo.providentHousehold}
</if>
<if test="tSocialFundInfo.providentHouseholdName != null and tSocialFundInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tSocialFundInfo.providentHouseholdName}
AND a.PROVIDENT_HOUSEHOLD_NAME like concat('%',#{tSocialFundInfo.providentHouseholdName},'%')
</if>
<if test="tSocialFundInfo.fundProvince != null and tSocialFundInfo.fundProvince.trim() != ''">
AND a.FUND_PROVINCE = #{tSocialFundInfo.fundProvince}
......@@ -865,6 +865,12 @@
<if test="tSocialFundInfo.latestCardinalityFund != null and tSocialFundInfo.latestCardinalityFund.trim() != ''">
AND a.LATEST_CARDINALITY_FUND = #{tSocialFundInfo.latestCardinalityFund}
</if>
<if test="tSocialFundInfo.socialStatus != null and tSocialFundInfo.socialStatus.trim() != ''">
AND a.SOCIAL_STATUS = #{tSocialFundInfo.socialStatus}
</if>
<if test="tSocialFundInfo.fundStatus != null and tSocialFundInfo.fundStatus.trim() != ''">
AND a.FUND_STATUS = #{tSocialFundInfo.fundStatus}
</if>
</if>
</sql>
<!--tSocialFundInfo简单分页查询-->
......@@ -876,15 +882,16 @@
1=1
<include refid="tSocialFundInfo_where"/>
</where>
order by a.CREATE_TIME desc
</select>
<!--获取在用社保-->
<!--获取在用社保 #a.SOCIAL_ADD_STATUS != '4' and a.SOCIAL_REDUCE_STATUS != '2' -->
<select id="getSocialList" resultMap="tSocialFundInfoMap">
SELECT
<include refid="Other_Base_Column_List"/>
FROM t_social_fund_info a
<where>
a.SOCIAL_ADD_STATUS != '4' and a.SOCIAL_REDUCE_STATUS != '2'
1=1
<if test="empIdCard != null">
and a.EMP_IDCARD = #{empIdCard}
</if>
......@@ -896,13 +903,13 @@
</if>
</where>
</select>
<!--获取在用公积金-->
<!--获取在用公积金 a.FUND_ADD_STATUS != '4' and a.FUND_REDUCE_STATUS != '2' -->
<select id="getFundList" resultMap="tSocialFundInfoMap">
SELECT
<include refid="Other_Base_Column_List"/>
FROM t_social_fund_info a
<where>
a.FUND_ADD_STATUS != '4' and a.FUND_REDUCE_STATUS != '2'
1=1
<if test="empIdCard != null">
and a.EMP_IDCARD = #{empIdCard}
</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