Commit 4355010c authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents 038410d8 840c989e
...@@ -12,10 +12,7 @@ import java.io.Serializable; ...@@ -12,10 +12,7 @@ import java.io.Serializable;
*/ */
@Data @Data
public class EkpSalaryParam implements Serializable { public class EkpSalaryParam implements Serializable {
/**
* ID
**/
private String fd_id;
/** /**
* 项目编码 * 项目编码
**/ **/
...@@ -121,7 +118,7 @@ public class EkpSalaryParam implements Serializable { ...@@ -121,7 +118,7 @@ public class EkpSalaryParam implements Serializable {
**/ **/
private String fd_3adfee203f86b2; private String fd_3adfee203f86b2;
/** /**
* 发合计 * 发合计
**/ **/
private String fd_3adfee20fe5ba4; private String fd_3adfee20fe5ba4;
/** /**
...@@ -185,23 +182,23 @@ public class EkpSalaryParam implements Serializable { ...@@ -185,23 +182,23 @@ public class EkpSalaryParam implements Serializable {
**/ **/
private String fd_3aeadee1cf1266; private String fd_3aeadee1cf1266;
/** /**
* 发合计应支出 * 发合计应支出
**/ **/
private String fd_3adfeec730ec44; private String fd_3adfeec730ec44;
/** /**
* 工资发结算状态 * 工资发结算状态
**/ **/
private String fd_3adfeef9440ab2; private String fd_3adfeef9440ab2;
/** /**
* 发合计付款状态 * 发合计付款状态
**/ **/
private String fd_3adfeedd5f3cb2; private String fd_3adfeedd5f3cb2;
/** /**
* 发结算单号 * 发结算单号
**/ **/
private String fd_3aeadf17522642; private String fd_3aeadf17522642;
/** /**
* 发付款单号 * 发付款单号
**/ **/
private String fd_3aeadf17b7d03a; private String fd_3aeadf17b7d03a;
/** /**
......
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public class EkpSalaryParamVo extends EkpSalaryParam {
/**
* 报账表id
**/
private String salaryAccountId;
}
ekp.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel ekp.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId='181d7633ff8bc797276d0d3a54e80ad6' ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6
ekp.fdFlowId='182b40249c1bc940d7226b941c7a4183' ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183
ekp.docStatus='20' ekp.docStatus=20
ekp.LoginName='admin' ekp.LoginName=admin
ekp.docSubject='\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3' ekp.docSubject=\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3
...@@ -1009,6 +1009,21 @@ public class InsurancesConstants { ...@@ -1009,6 +1009,21 @@ public class InsurancesConstants {
*/ */
public static final String SETTLE_THREE = "无需结算"; public static final String SETTLE_THREE = "无需结算";
/**
* 订单编号不能为空
*/
public static final String ORDER_NO_IS_EMPTY = "订单编号不能为空";
/**
* 购买类型为空
*/
public static final String BUY_TYPE_IS_EMPTY = "购买类型为空";
/**
* 购买类型错误
*/
public static final String BUY_TYPE_ERROR = "购买类型错误";
......
...@@ -285,5 +285,29 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -285,5 +285,29 @@ public class TInsuranceDetail extends BaseEntity {
@Schema(description = "商险办理时间") @Schema(description = "商险办理时间")
private LocalDateTime handledTime; private LocalDateTime handledTime;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 创建人所在部门
*/
@Schema(description = "创建人所在部门")
private String createUserDeptId;
/**
* 创建人所在部门名称
*/
@Schema(description = "创建人所在部门名称")
private String createUserDeptName;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -32,6 +32,12 @@ public class TInsuranceRefund extends BaseEntity { ...@@ -32,6 +32,12 @@ public class TInsuranceRefund extends BaseEntity {
@Schema(description = "保单信息主键") @Schema(description = "保单信息主键")
private String insDetailId; private String insDetailId;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/** /**
* 减员状态 * 减员状态
*/ */
...@@ -56,7 +62,17 @@ public class TInsuranceRefund extends BaseEntity { ...@@ -56,7 +62,17 @@ public class TInsuranceRefund extends BaseEntity {
@Schema(description = "是否删除 0否/1是") @Schema(description = "是否删除 0否/1是")
private Integer deleteFlag; private Integer deleteFlag;
/**
* 创建人所在部门
*/
@Schema(description = "创建人所在部门")
private String createUserDeptId;
/**
* 创建人所在部门名称
*/
@Schema(description = "创建人所在部门名称")
private String createUserDeptName;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.util.List;
/**
* @author zhaji
* @description TODO
* @date 2022-08-29 11:57:55
*/
@Data
public class InsuranceListOrderParam {
private String orderNo;
private List<InsuranceAddParam> data;
}
...@@ -22,6 +22,12 @@ public class InsuranceListParam implements Serializable { ...@@ -22,6 +22,12 @@ public class InsuranceListParam implements Serializable {
@Schema(description = "项目编码") @Schema(description = "项目编码")
private String deptNo; private String deptNo;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/** /**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员 * 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/ */
......
...@@ -104,6 +104,12 @@ public class InsuranceListVO implements Serializable { ...@@ -104,6 +104,12 @@ public class InsuranceListVO implements Serializable {
@Schema(description = "创建人(派单人)") @Schema(description = "创建人(派单人)")
private String createName; private String createName;
/**
* 创建人部门名称
*/
@Schema(description = "创建人部门名称(派单人)")
private String createUserDeptName;
/** /**
* 创建者 * 创建者
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.util.List;
/**
* @author zhaji
* @description TODO
* @date 2022-08-29 12:13:48
*/
@Data
public class InsuranceOrderBatchParam {
private String orderNo;
private List<InsuranceBatchParam> data;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
/**
* @author zhaji
* @description TODO
* @date 2022-08-29 12:35:52
*/
@Data
public class InsuranceOrderRefundParam {
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
private List<InsuranceRefundCheck> data;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.util.List;
/**
* @author zhaji
* @description TODO
* @date 2022-08-29 12:29:28
*/
@Data
public class InsuranceOrderReplaceParam {
private String orderNo;
private List<InsuranceReplaceParam> data;
}
...@@ -23,6 +23,12 @@ public class InsuranceRefundCheck implements Serializable { ...@@ -23,6 +23,12 @@ public class InsuranceRefundCheck implements Serializable {
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/** /**
* 员工姓名 * 员工姓名
*/ */
......
...@@ -170,6 +170,11 @@ public class InsuranceRefundListVo implements Serializable { ...@@ -170,6 +170,11 @@ public class InsuranceRefundListVo implements Serializable {
*/ */
@Schema(description = "减员状态 1待减员 2减员中3减员退回") @Schema(description = "减员状态 1待减员 2减员中3减员退回")
private Integer reduceHandleStatus; private Integer reduceHandleStatus;
/**
* 创建人所在部门名称
*/
@Schema(description = "创建人所在部门名称")
private String createUserDeptName;
/** /**
* 购买月数 * 购买月数
......
...@@ -232,8 +232,11 @@ public class InsuredListVo implements Serializable { ...@@ -232,8 +232,11 @@ public class InsuredListVo implements Serializable {
@Schema(description = "购买月数") @Schema(description = "购买月数")
private Long buyMonth; private Long buyMonth;
/**
* 创建人所在部门名称
*/
@Schema(description = "创建人所在部门名称")
private String createUserDeptName;
//订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人
} }
package com.yifu.cloud.plus.v1.yifu.insurances.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.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @author zhaji
* @description TODO
* @date 2022-08-29 14:47:46
*/
@Data
public class InsuredOrderListVo implements Serializable {
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 创建人部门名称
*/
@Schema(description = "创建人部门名称(派单人)")
private String createUserDeptName;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回,4减员成功")
private Integer reduceHandleStatus;
/**
* 减员ID
*/
@Schema(description = "减员ID")
private Integer refundId;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaji
* @description 订单商险列表查询
* @date 2022-08-29 14:44:25
*/
@Data
@Tag(name = "订单商险列表查询")
public class InsuredOrderParam implements Serializable {
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 开始日期
*/
@Schema(description = "开始日期")
private String startDate;
/**
* 结束日期
*/
@Schema(description = "结束日期")
private String endDate;
/**
* 项目编码列表
*/
@Schema(description = "项目编码列表")
private List<String> deptNoList;
}
...@@ -119,7 +119,7 @@ public class TInsuranceDetailController { ...@@ -119,7 +119,7 @@ public class TInsuranceDetailController {
@Operation(summary = "投保新增", description = "投保新增") @Operation(summary = "投保新增", description = "投保新增")
@PostMapping("/addInsurance") @PostMapping("/addInsurance")
public R<List<InsuranceAddParam>> addInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceAddParam> paramList){ public R<List<InsuranceAddParam>> addInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceAddParam> paramList){
return tInsuranceDetailService.addInsurance(paramList); return tInsuranceDetailService.addInsurance(paramList,null);
} }
/** /**
...@@ -132,7 +132,7 @@ public class TInsuranceDetailController { ...@@ -132,7 +132,7 @@ public class TInsuranceDetailController {
@Operation(summary = "投保批增", description = "投保批增") @Operation(summary = "投保批增", description = "投保批增")
@PostMapping("/batchInsurance") @PostMapping("/batchInsurance")
public R<List<InsuranceBatchParam>> batchInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceBatchParam> paramList){ public R<List<InsuranceBatchParam>> batchInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceBatchParam> paramList){
return tInsuranceDetailService.batchInsurance(paramList); return tInsuranceDetailService.batchInsurance(paramList,null);
} }
/** /**
...@@ -145,7 +145,7 @@ public class TInsuranceDetailController { ...@@ -145,7 +145,7 @@ public class TInsuranceDetailController {
@Operation(summary = "投保替换", description = "投保替换") @Operation(summary = "投保替换", description = "投保替换")
@PostMapping("/replaceInsurance") @PostMapping("/replaceInsurance")
public R<List<InsuranceReplaceParam>> replaceInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceReplaceParam> paramList){ public R<List<InsuranceReplaceParam>> replaceInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceReplaceParam> paramList){
return tInsuranceDetailService.replaceInsurance(paramList); return tInsuranceDetailService.replaceInsurance(paramList,null);
} }
/** /**
...@@ -288,7 +288,7 @@ public class TInsuranceDetailController { ...@@ -288,7 +288,7 @@ public class TInsuranceDetailController {
*/ */
@PostMapping("/saveInsuranceRefund") @PostMapping("/saveInsuranceRefund")
public R saveInsuranceRefund(@RequestBody @Valid @Size(min = 1,message = "导入减员列表不能为空") List<InsuranceRefundCheck> insuranceRefundCheckList){ public R saveInsuranceRefund(@RequestBody @Valid @Size(min = 1,message = "导入减员列表不能为空") List<InsuranceRefundCheck> insuranceRefundCheckList){
return tInsuranceDetailService.saveInsuranceRefund(insuranceRefundCheckList); return tInsuranceDetailService.saveInsuranceRefund(insuranceRefundCheckList,null);
} }
/** /**
...@@ -353,7 +353,7 @@ public class TInsuranceDetailController { ...@@ -353,7 +353,7 @@ public class TInsuranceDetailController {
*/ */
@Operation(summary = "已减员列表分页查询", description = "已减员列表分页查询") @Operation(summary = "已减员列表分页查询", description = "已减员列表分页查询")
@PostMapping("/getInsuranceRefundPageList") @PostMapping("/getInsuranceRefundPageList")
public R<IPage<InsuranceRefundListVo>> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, @RequestBody InsuranceRefundParam param) { public R getInsuranceRefundPageList(Page<InsuranceRefundParam> page, @RequestBody InsuranceRefundParam param) {
return tInsuranceDetailService.getInsuranceRefundPageList(page,param); return tInsuranceDetailService.getInsuranceRefundPageList(page,param);
} }
...@@ -524,4 +524,71 @@ public class TInsuranceDetailController { ...@@ -524,4 +524,71 @@ public class TInsuranceDetailController {
public R<IPage<InsuranceListByIdCardVo>> getInsuranceListByIdCard(Page page, String idCard,String deptNo) { public R<IPage<InsuranceListByIdCardVo>> getInsuranceListByIdCard(Page page, String idCard,String deptNo) {
return new R<>(tInsuranceDetailService.getInsuranceListByIdCard(page, idCard,deptNo)); return new R<>(tInsuranceDetailService.getInsuranceListByIdCard(page, idCard,deptNo));
} }
/**
* 订单商险新增
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceAddParam>>}
*/
@Operation(summary = "订单商险新增", description = "订单商险新增")
@PostMapping("/addOrderInsurance")
public R<List<InsuranceAddParam>> addOrderInsurance(@RequestBody InsuranceListOrderParam paramList ){
return tInsuranceDetailService.addOrderInsurance(paramList);
}
/**
* 订单商险批增
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceBatchParam>>}
*/
@Operation(summary = "订单商险批增", description = "订单商险批增")
@PostMapping("/batchOrderInsurance")
public R<List<InsuranceBatchParam>> batchOrderInsurance(@RequestBody InsuranceOrderBatchParam paramList){
return tInsuranceDetailService.batchOrderInsurance(paramList);
}
/**
* 订单商险替换
*
* @author zhaji
* @param paramList
* @return {@link R<List<InsuranceReplaceParam>>}
*/
@Operation(summary = "订单商险替换", description = "订单商险替换")
@PostMapping("/replaceOrderInsurance")
public R<List<InsuranceReplaceParam>> replaceOrderInsurance(@RequestBody InsuranceOrderReplaceParam paramList){
return tInsuranceDetailService.replaceOrderInsurance(paramList);
}
/**
* 订单商险减员
* @param paramList 订单商险减员
* @author zhaji
* @date 2022-07-19
* @since v1.0
*/
@PostMapping("/refundOrderInsurance")
public R refundOrderInsurance(@RequestBody InsuranceOrderRefundParam paramList){
return tInsuranceDetailService.refundOrderInsurance(paramList);
}
/**
* 订单商险列表查询
*
* @author zhaji
* @param page 分页参数
* @param param 查询条件
* @return {@link R<IPage<InsuredListVo>>}
*/
@Operation(summary = "订单商险列表查询", description = "订单商险列表查询")
@PostMapping("/getOrderInsuredListPage")
public R getOrderInsuredListPage(Page<InsuredOrderListVo> page, @RequestBody InsuredOrderParam param) {
return tInsuranceDetailService.getOrderInsuredListPage(page,param);
}
} }
...@@ -197,7 +197,44 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -197,7 +197,44 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/ */
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, @Param("idCard") String idCard, @Param("deptNo")String deptNo); IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, @Param("idCard") String idCard, @Param("deptNo")String deptNo);
List<TInsuranceDetail> selectListByempIdcardNo(String empIdcardNo); /**
* 查询所有在保,未出险,未过期,未失效,未减员的保单信息
*
* @author zhaji
* @param empIdcardNo
* @return {@link List< TInsuranceDetail>}
*/
List<TInsuranceDetail> selectListByEmpIdcardNo(String empIdcardNo);
/**
* 查数据是否存在权限范围内
*
* @author zhaji
* @param regionSql
* @param id
* @return {@link TInsuranceDetail}
*/
TInsuranceDetail selectByRegionSql(@Param("regionSql") String regionSql, @Param("id") String id);
/**
* 商险订单投保列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
IPage<InsuredOrderListVo> getOrderInsuredListPage(Page<InsuredOrderListVo> page,@Param("param") InsuredOrderParam param);
/**
* 商险订单减员列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
IPage<InsuredOrderListVo> getOrderRefundInsuredListPage(Page<InsuredOrderListVo> page,@Param("param") InsuredOrderParam param);
TInsuranceDetail selectByregionSQL(@Param("regionSql") String regionSQL,@Param("id") String id);
} }
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* @author Administrator * @author Administrator
...@@ -22,7 +23,7 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> { ...@@ -22,7 +23,7 @@ public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
*/ */
TInsuranceRefund getByInsDetailId(String id); TInsuranceRefund getByInsDetailId(String id);
void updateByInsDetailId(TInsuranceRefund insuranceRefund); void updateByInsDetailId(@Param("param") TInsuranceRefund insuranceRefund);
int updateRefundMoney(TInsuranceRefund insuranceRefund); int updateRefundMoney(TInsuranceRefund insuranceRefund);
} }
...@@ -75,7 +75,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -75,7 +75,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param paramList * @param paramList
* @return {@link R<List<InsuranceAddParam>>} * @return {@link R<List<InsuranceAddParam>>}
*/ */
R<List<InsuranceAddParam>> addInsurance(List<InsuranceAddParam> paramList); R<List<InsuranceAddParam>> addInsurance(List<InsuranceAddParam> paramList,String orderNo);
/** /**
* 商险批增 * 商险批增
...@@ -84,7 +84,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -84,7 +84,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param paramList * @param paramList
* @return {@link R<List<InsuranceBatchParam>>} * @return {@link R<List<InsuranceBatchParam>>}
*/ */
R<List<InsuranceBatchParam>> batchInsurance(List<InsuranceBatchParam> paramList); R<List<InsuranceBatchParam>> batchInsurance(List<InsuranceBatchParam> paramList,String orderNo);
/** /**
* 商险替换 * 商险替换
* *
...@@ -92,7 +92,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -92,7 +92,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param paramList * @param paramList
* @return {@link R<List<InsuranceReplaceParam>>} * @return {@link R<List<InsuranceReplaceParam>>}
*/ */
R<List<InsuranceReplaceParam>> replaceInsurance(List<InsuranceReplaceParam> paramList); R<List<InsuranceReplaceParam>> replaceInsurance(List<InsuranceReplaceParam> paramList,String orderNo);
/** /**
* 通过id删除 * 通过id删除
...@@ -187,7 +187,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -187,7 +187,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param insuranceRefundCheckList 减员表 * @param insuranceRefundCheckList 减员表
* @return {@link R} * @return {@link R}
*/ */
R saveInsuranceRefund(List<InsuranceRefundCheck> insuranceRefundCheckList); R saveInsuranceRefund(List<InsuranceRefundCheck> insuranceRefundCheckList,String orderNo);
/** /**
* 已投保列表分页查询 * 已投保列表分页查询
...@@ -354,4 +354,45 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -354,4 +354,45 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R} * @return {@link R}
*/ */
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard,String deptNo); IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard,String deptNo);
/**
* 新增订单商险
*
* @author zhaji
* @param paramList
* @return {@link R< List< InsuranceReplaceParam>>}
*/
R<List<InsuranceAddParam>> addOrderInsurance(InsuranceListOrderParam paramList);
/**
* 批增订单商险
*
* @author zhaji
* @param paramList
* @return {@link R< List< InsuranceBatchParam>>}
*/
R<List<InsuranceBatchParam>> batchOrderInsurance(InsuranceOrderBatchParam paramList);
/**
* 替换订单商险
*
* @author zhaji
* @param paramList
* @return {@link R< List< InsuranceReplaceParam>>}
*/
R<List<InsuranceReplaceParam>> replaceOrderInsurance(InsuranceOrderReplaceParam paramList);
R refundOrderInsurance(InsuranceOrderRefundParam paramList);
/**
* 订单商险列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
R getOrderInsuredListPage(Page<InsuredOrderListVo> page, InsuredOrderParam param);
SettleVo getInsuranceDetailSettleStatus(String detailId, String defaultSettleId);
} }
...@@ -56,12 +56,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -56,12 +56,14 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
List<TInsuranceEkp> ekpRefundList = this.baseMapper.getEkpRefundList(); List<TInsuranceEkp> ekpRefundList = this.baseMapper.getEkpRefundList();
List<TInsuranceEkp> failList = new ArrayList<>(); List<TInsuranceEkp> failList = new ArrayList<>();
List<TInsuranceEkp> successLit = new ArrayList<>(); List<TInsuranceEkp> successLit = new ArrayList<>();
SettleVo settle = ekpSettleService.getSettle("12345");
String actualStatus = settle.getActualStatus();
log.info("settle:"+settle.toString());
log.info("actualStatus:"+actualStatus);
if (CollectionUtils.isNotEmpty(ekpRefundList)){ if (CollectionUtils.isNotEmpty(ekpRefundList)){
for (TInsuranceEkp tInsuranceEkp : ekpRefundList) { for (TInsuranceEkp tInsuranceEkp : ekpRefundList) {
//结算信息
SettleVo settleVo = tInsuranceDetailService.getInsuranceDetailSettleStatus(tInsuranceEkp.getDetailId(), tInsuranceEkp.getDefaultSettleId());
//实缴结算状态
String actualStatus = settleVo.getActualStatus();
//预缴结算状态
String estimateStatus = settleVo.getEstimateStatus();
Integer pushType = tInsuranceEkp.getPushType(); Integer pushType = tInsuranceEkp.getPushType();
LambdaQueryWrapper<TInsuranceSettle> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TInsuranceSettle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceSettle :: getId,tInsuranceEkp.getDefaultSettleId()); queryWrapper.eq(TInsuranceSettle :: getId,tInsuranceEkp.getDefaultSettleId());
...@@ -80,10 +82,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -80,10 +82,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
} }
EKPInteractiveParam ekpParam = new EKPInteractiveParam(); EKPInteractiveParam ekpParam = new EKPInteractiveParam();
BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam); BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam);
String detailId = ekpParam.getDetailId();
String defaultSettleId = ekpParam.getDefaultSettleId();
//查询当前结算状态
String status = CommonConstants.ONE_STRING;
if(actualStatus.equals(InsurancesConstants.SETTLE_ZERO)){ if(actualStatus.equals(InsurancesConstants.SETTLE_ZERO)){
String s = EKPUtil.sendToEKP(ekpParam); String s = EKPUtil.sendToEKP(ekpParam);
//如果发送成功 //如果发送成功
......
...@@ -53,8 +53,10 @@ ...@@ -53,8 +53,10 @@
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/> <result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
<result property="handledBy" column="HANDLED_BY" jdbcType="VARCHAR"/> <result property="handledBy" column="HANDLED_BY" jdbcType="VARCHAR"/>
<result property="handledTime" column="HANDLED_TIME" jdbcType="TIMESTAMP"/> <result property="handledTime" column="HANDLED_TIME" jdbcType="TIMESTAMP"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="createUserDeptId" column="CREATE_USER_DEPT_ID" jdbcType="VARCHAR"/>
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID,EMP_NAME, ID,EMP_NAME,
EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME, EMP_IDCARD_NO,DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
...@@ -67,7 +69,8 @@ ...@@ -67,7 +69,8 @@
BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS, BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK, IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME, CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME,ORDER_NO,CREATE_USER_DEPT_ID,CREATE_USER_DEPT_NAME
</sql> </sql>
<!--投保分页查询--> <!--投保分页查询-->
<select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
...@@ -86,12 +89,16 @@ ...@@ -86,12 +89,16 @@
detail.CREATE_NAME as createName, detail.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus, detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType, detail.SETTLE_TYPE as settleType,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.SETTLE_MONTH as settleMonth detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail from t_insurance_detail detail
where detail.DELETE_FLAG = 0 where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and detail.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.orderNo != null and param.orderNo.trim() != ''">
and detail.DEPT_NO = #{param.orderNo}
</if>
<if test="param.deptNo == null or param.deptNo.trim() == ''"> <if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in and detail.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
...@@ -130,7 +137,6 @@ ...@@ -130,7 +137,6 @@
</if> </if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
<!--投保不分页查询--> <!--投保不分页查询-->
<select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id, select detail.id as id,
...@@ -192,7 +198,6 @@ ...@@ -192,7 +198,6 @@
</if> </if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
<!--投保办理分页查询--> <!--投保办理分页查询-->
<select id="getInsuranceHandleListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceHandleListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id, select detail.id as id,
...@@ -253,7 +258,6 @@ ...@@ -253,7 +258,6 @@
</if> </if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
<select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"> <select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO">
select select
detail.id as id, detail.id as id,
...@@ -385,13 +389,11 @@ ...@@ -385,13 +389,11 @@
</if> </if>
ORDER BY detail.CREATE_TIME DESC ORDER BY detail.CREATE_TIME DESC
</select> </select>
<update id="updatePolicyNoBatch"> <update id="updatePolicyNoBatch">
<foreach collection="details" index="index" item="item" separator=";"> <foreach collection="details" index="index" item="item" separator=";">
update t_insurance_detail set POLICY_NO = #{item.policyNo} where ID = #{item.id} update t_insurance_detail set POLICY_NO = #{item.policyNo} where ID = #{item.id}
</foreach> </foreach>
</update> </update>
<update id="updateInvoiceNoBatch"> <update id="updateInvoiceNoBatch">
<foreach collection="details" index="index" item="item" separator=";"> <foreach collection="details" index="index" item="item" separator=";">
update t_insurance_detail set INVOICE_NO = #{item.invoiceNo} where ID = #{item.id} update t_insurance_detail set INVOICE_NO = #{item.invoiceNo} where ID = #{item.id}
...@@ -417,6 +419,7 @@ ...@@ -417,6 +419,7 @@
detail.IS_OVERDUE as isOverdue, detail.IS_OVERDUE as isOverdue,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName, detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName, detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.BUY_STANDARD as buyStandard detail.BUY_STANDARD as buyStandard
from from
t_insurance_detail detail t_insurance_detail detail
...@@ -574,6 +577,7 @@ ...@@ -574,6 +577,7 @@
detail.POLICY_START as policyStart, detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd, detail.POLICY_END as policyEnd,
detail.POLICY_NO as policyNo, detail.POLICY_NO as policyNo,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as refundCreateTime refund.CREATE_TIME as refundCreateTime
from from
t_insurance_detail detail, t_insurance_detail detail,
...@@ -900,7 +904,7 @@ ...@@ -900,7 +904,7 @@
</where> </where>
ORDER BY CREATE_TIME desc ORDER BY CREATE_TIME desc
</select> </select>
<select id="selectListByempIdcardNo" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"> <select id="selectListByEmpIdcardNo" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM FROM
...@@ -916,7 +920,8 @@ ...@@ -916,7 +920,8 @@
</where> </where>
ORDER BY CREATE_TIME desc ORDER BY CREATE_TIME desc
</select> </select>
<select id="selectByregionSQL" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"> <!--查数据是否存在权限范围内-->
<select id="selectByRegionSql" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM FROM
...@@ -929,4 +934,130 @@ ...@@ -929,4 +934,130 @@
</where> </where>
ORDER BY CREATE_TIME desc ORDER BY CREATE_TIME desc
</select> </select>
<!--商险订单减员列表查询-->
<select id="getOrderRefundInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo">
(
select
detail.id as id,
detail.BUY_TYPE as buyType,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.CREATE_NAME as createName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.ORDER_NO = #{param.orderNo}
<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.startDate != null and param.startDate.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, '00:00:00')
</if>
<if test="param.endDate != null and param.endDate.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.deptNoList != null">
and detail.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>)
union all(
select
detail.id as id,
detail.BUY_TYPE as buyType,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
refund.CREATE_NAME as createName,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
refund.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
and
refund.ORDER_NO = #{param.orderNo}
<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.startDate != null and param.startDate.trim() != ''">
AND refund.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, '00:00:00')
</if>
<if test="param.endDate != null and param.endDate.trim() != ''">
AND refund.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.deptNoList != null">
and detail.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
)order by createTime desc
</select>
<select id="getOrderInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo">
select
detail.id as id,
detail.BUY_TYPE as buyType,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.CREATE_NAME as createName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.ORDER_NO = #{param.orderNo}
<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.startDate != null and param.startDate.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, '00:00:00')
</if>
<if test="param.endDate != null and param.endDate.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.deptNoList != null">
and detail.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
...@@ -13,26 +13,51 @@ ...@@ -13,26 +13,51 @@
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/> <result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/> <result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/> <result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="orderNo" column="ORDER_NO" jdbcType="VARCHAR"/>
<result property="createUserDeptId" column="CREATE_USER_DEPT_ID" jdbcType="VARCHAR"/>
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID,INS_DETAIL_ID,REDUCE_HANDLE_STATUS, ID,INS_DETAIL_ID,REDUCE_HANDLE_STATUS,
REFUND_MONEY,REMARK,CREATE_TIME, REFUND_MONEY,REMARK,CREATE_TIME,
CREATE_BY,CREATE_NAME CREATE_BY,CREATE_NAME,ORDER_NO,CREATE_USER_DEPT_ID,CREATE_USER_DEPT_NAME
</sql> </sql>
<update id="updateByInsDetailId"> <update id="updateByInsDetailId">
update update
t_insurance_refund t_insurance_refund
set set
REDUCE_HANDLE_STATUS = #{reduceHandleStatus}, <if test="param.createName != null and param.createName.trim() != ''">
REMARK = #{remark}, CREATE_NAME= #{param.createName},
CREATE_NAME= #{createName}, </if>
CREATE_BY = #{createBy}, <if test="param.createBy != null and param.createBy.trim() != ''">
CREATE_TIME = #{createTime}, CREATE_BY = #{param.createBy},
UPDATE_BY = #{createBy}, </if>
UPDATE_TIME = #{createTime} <if test="param.createTime != null">
CREATE_TIME = #{param.createTime},
</if>
<if test="param.updateBy != null and param.updateBy.trim() != ''">
UPDATE_BY = #{param.updateBy},
</if>
<if test="param.updateTime != null ">
UPDATE_TIME = #{param.updateTime},
</if>
<if test="param.createUserDeptName != null and param.createUserDeptName.trim() != ''">
CREATE_USER_DEPT_NAME= #{param.createUserDeptName},
</if>
<if test="param.createUserDeptId != null and param.createUserDeptId.trim() != ''">
CREATE_USER_DEPT_ID = #{param.createUserDeptId},
</if>
<if test="param.orderNo != null and param.orderNo.trim() != ''">
ORDER_NO = #{param.orderNo},
</if>
<if test="param.remark != null and param.remark.trim() != ''">
REMARK = #{param.remark},
</if>
REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
where where
INS_DETAIL_ID = #{insDetailId} INS_DETAIL_ID = #{param.insDetailId}
</update> </update>
<update id="updateRefundMoney"> <update id="updateRefundMoney">
update update
......
...@@ -32,6 +32,7 @@ import org.hibernate.validator.constraints.Length; ...@@ -32,6 +32,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -358,6 +359,30 @@ public class TSalaryAccount extends BaseEntity { ...@@ -358,6 +359,30 @@ public class TSalaryAccount extends BaseEntity {
@ExcelProperty("个税-单位承担") @ExcelProperty("个税-单位承担")
private BigDecimal salaryTaxUnit; private BigDecimal salaryTaxUnit;
@ExcelAttribute(name = "发送状态:0未发送,1已发送")
@ExcelProperty("发送状态:0未发送,1已发送")
private String sendStatus;
@ExcelAttribute(name = "发送月份")
@ExcelProperty("发送月份")
private String sendMonth;
@ExcelAttribute(name = "发送时间")
@ExcelProperty("发送时间")
private Date sendTime;
@ExcelAttribute(name = "发送人id")
@ExcelProperty("发送人id")
private String sendUser;
@ExcelAttribute(name = "发送人姓名")
@ExcelProperty("发送人姓名")
private String sendUserName;
@ExcelAttribute(name = "发送返回的EKPID")
@ExcelProperty("发送返回的EKPID")
private String ekpId;
@TableField(exist = false) @TableField(exist = false)
private List<TSalaryAccountItem> saiList = new ArrayList<>(); //工资组成部分明细 private List<TSalaryAccountItem> saiList = new ArrayList<>(); //工资组成部分明细
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
<groupId>com.yifu.cloud.plus.v1</groupId> <groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-seata</artifactId> <artifactId>yifu-common-seata</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.yifu.cloud.plus.v1</groupId> <groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId> <artifactId>yifu-salary-api</artifactId>
......
...@@ -78,13 +78,13 @@ public class SysMessageSalaryController { ...@@ -78,13 +78,13 @@ public class SysMessageSalaryController {
@Operation(description = "生成最低工资提醒") @Operation(description = "生成最低工资提醒")
@GetMapping("/inner/createSysMessageSalary") @GetMapping("/inner/createSysMessageSalary")
public void createSysMessageSalary() { public void createSysMessageSalary() {
//结算月 //薪资月份
String settleMonth = DateUtil.addMonth(-1); String salaryMonth = DateUtil.addMonth(-1);
//1:删除当前结算月数据: //1:删除当前结算月数据:
sysMessageSalaryService.deleteAllBySettleMonth(settleMonth); sysMessageSalaryService.deleteAllBySettleMonth(salaryMonth);
//2:开始生成: //2:开始生成:
//2.1:普通工资 //2.1:普通工资
sysMessageSalaryService.insertSalaryBySettleMonth(settleMonth); sysMessageSalaryService.insertSalaryBySettleMonth(salaryMonth);
} }
/** /**
...@@ -114,7 +114,7 @@ public class SysMessageSalaryController { ...@@ -114,7 +114,7 @@ public class SysMessageSalaryController {
@Operation(description = "最低工资提醒导出") @Operation(description = "最低工资提醒导出")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, public void export(HttpServletResponse response,
SysMessageSalarySearchVo searchVo) { @RequestBody SysMessageSalarySearchVo searchVo) {
sysMessageSalaryService.listExport(response,searchVo); sysMessageSalaryService.listExport(response,searchVo);
} }
......
...@@ -128,7 +128,7 @@ public class THaveSalaryNosocialController { ...@@ -128,7 +128,7 @@ public class THaveSalaryNosocialController {
@Operation(description = "有工资无社保消息提醒导出") @Operation(description = "有工资无社保消息提醒导出")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, public void export(HttpServletResponse response,
THaveSalaryNosocialSearchVo searchVo) { @RequestBody THaveSalaryNosocialSearchVo searchVo) {
tHaveSalaryNosocialService.listExport(response,searchVo); tHaveSalaryNosocialService.listExport(response,searchVo);
} }
...@@ -159,8 +159,8 @@ public class THaveSalaryNosocialController { ...@@ -159,8 +159,8 @@ public class THaveSalaryNosocialController {
@Inner @Inner
@PostMapping("/inner/generate") @PostMapping("/inner/generate")
public void generate() { public void generate() {
String settleMonth = DateUtil.addMonth(-1); String salaryMonth = DateUtil.addMonth(-1);
tHaveSalaryNosocialService.generate(settleMonth); tHaveSalaryNosocialService.generate(salaryMonth);
} }
} }
...@@ -207,4 +207,17 @@ public class TSalaryStandardController { ...@@ -207,4 +207,17 @@ public class TSalaryStandardController {
return R.failed("请传参!"); return R.failed("请传参!");
} }
} }
/**
* @param id 主键
* @Description: 发送至EKP
* @Author: hgw
* @Date: 2022/8/26 11:40
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R
**/
@Operation(description = "发送至EKP")
@PostMapping("/doSend")
public R<String> doSend(@RequestParam String id) {
return tSalaryStandardService.doSend(id);
}
} }
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
...@@ -89,6 +90,15 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> { ...@@ -89,6 +90,15 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
**/ **/
List<String> getAccountYearCheckList(); List<String> getAccountYearCheckList();
/**
* @param salaryId
* @Description: 获取薪资明细
* @Author: hgw
* @Date: 2022/8/29 16:52
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParamVo> getEkpSalaryParamList(@Param("salaryId") String salaryId);
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo, List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList); @Param("idList")List<String> idList);
......
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
...@@ -86,4 +87,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -86,4 +87,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: * @return:
**/ **/
List<String> getAccountYearCheckMap(); List<String> getAccountYearCheckMap();
/**
* @param salaryId
* @Description: 获取薪资数据
* @Author: hgw
* @Date: 2022/8/29 16:54
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParamVo> getEkpSalaryParamList(String salaryId);
} }
...@@ -74,5 +74,14 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> { ...@@ -74,5 +74,14 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/ **/
R<String> deleteSalaryById(String id); R<String> deleteSalaryById(String id);
/**
* @param id
* @Description: 推送至ekp
* @Author: hgw
* @Date: 2022/8/26 11:56
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> doSend(String id);
IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard); IPage<TSalaryStandard> getTSalaryStandardPageApply(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard);
} }
...@@ -13,18 +13,17 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties; ...@@ -13,18 +13,17 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.*; import com.yifu.cloud.plus.v1.yifu.salary.entity.*;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.*; import com.yifu.cloud.plus.v1.yifu.salary.service.*;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryAccountUtil; import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryAccountUtil;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*; import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.URLDecoder; import java.net.URLDecoder;
......
...@@ -150,12 +150,12 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap ...@@ -150,12 +150,12 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
**/ **/
@Override @Override
public void listExport(HttpServletResponse response, SysMessageSalarySearchVo searchVo) { public void listExport(HttpServletResponse response, SysMessageSalarySearchVo searchVo) {
String fileName = "最低工资提醒查询批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "最低工资提醒批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<SysMessageSalaryExportVo> list = new ArrayList<>(); List<SysMessageSalaryExportVo> list = new ArrayList<>();
// TODO // TODO
List<String> settleDomainIds =null; List<String> settleDomainIds =null;
List<String> ids = null; List<String> ids = Common.getList(searchVo.getIds());
String sql = null; String sql = null;
int count = noPageCountDiy(searchVo,settleDomainIds,ids,sql); int count = noPageCountDiy(searchVo,settleDomainIds,ids,sql);
ServletOutputStream out = null; ServletOutputStream out = null;
......
...@@ -115,17 +115,17 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc ...@@ -115,17 +115,17 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
* * 4.生成记录 * * 4.生成记录
**/ **/
@Override @Override
public void generate(String settleMonth) { public void generate(String salaryMonth) {
//重新跑上月数据 //重新跑上月数据
this.remove(Wrappers.<THaveSalaryNosocial>query().lambda().eq(THaveSalaryNosocial::getSettleMonth,settleMonth)); this.remove(Wrappers.<THaveSalaryNosocial>query().lambda().eq(THaveSalaryNosocial::getMonth,salaryMonth));
List<THaveSalaryNosocial> haveSalaryNosocialList = salaryAccountService.getLastMonthTHaveSalaryNosocial(settleMonth); List<THaveSalaryNosocial> haveSalaryNosocialList = salaryAccountService.getLastMonthTHaveSalaryNosocial(salaryMonth);
if(!Common.isNotEmpty(haveSalaryNosocialList)){ if(!Common.isNotEmpty(haveSalaryNosocialList)){
log.error("获取上月有社保无工资数据为空"); log.error("获取有社保无工资数据为空");
return; return;
} }
//去缴费库查询查询这些人社保是否存在 //去缴费库查询查询这些人社保是否存在
Map<String, TPaymentInfo> empPaymentInfoMap=Maps.newHashMap(); Map<String, TPaymentInfo> empPaymentInfoMap=Maps.newHashMap();
R<HaveSalaryNoSocialVo> noSocialVoR = socialDaprUtils.getPaymentinfoListByEmpdIdCard(Common.listObjectToStrList(haveSalaryNosocialList, "employeeIdCard"), settleMonth); R<HaveSalaryNoSocialVo> noSocialVoR = socialDaprUtils.getPaymentinfoListByEmpdIdCard(Common.listObjectToStrList(haveSalaryNosocialList, "employeeIdCard"), salaryMonth);
if (Common.isNotNull(noSocialVoR)&& Common.isNotNull(noSocialVoR.getData())) { if (Common.isNotNull(noSocialVoR)&& Common.isNotNull(noSocialVoR.getData())) {
for (TPaymentInfo paymentInfo : noSocialVoR.getData().getPaymentInfos()) { for (TPaymentInfo paymentInfo : noSocialVoR.getData().getPaymentInfos()) {
empPaymentInfoMap.put(paymentInfo.getEmpIdcard(),paymentInfo); empPaymentInfoMap.put(paymentInfo.getEmpIdcard(),paymentInfo);
...@@ -191,7 +191,7 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc ...@@ -191,7 +191,7 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
**/ **/
@Override @Override
public void listExport(HttpServletResponse response, THaveSalaryNosocialSearchVo searchVo) { public void listExport(HttpServletResponse response, THaveSalaryNosocialSearchVo searchVo) {
String fileName = "有工资无社保查询批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "有工资无社保批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<THaveSalaryNoSocialExportVo> list = new ArrayList<>(); List<THaveSalaryNoSocialExportVo> list = new ArrayList<>();
// TODO // TODO
......
...@@ -57,7 +57,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -57,7 +57,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if (Common.isEmpty(tMinSalary.getTown())){ if (Common.isEmpty(tMinSalary.getTown())){
query.isNull(TMinSalary::getTown); query.isNull(TMinSalary::getTown);
} }
query.eq(TMinSalary::getStatus, CommonConstants.ONE_INT);
long res = baseMapper.selectCount(query); long res = baseMapper.selectCount(query);
if (res > CommonConstants.ZERO_INT){ if (res > CommonConstants.ZERO_INT){
return R.failed("已存在对应区域在用的配置信息"); return R.failed("已存在对应区域在用的配置信息");
...@@ -88,7 +87,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -88,7 +87,6 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
query.isNull(TMinSalary::getTown); query.isNull(TMinSalary::getTown);
} }
query.ne(TMinSalary::getId,tMinSalary.getId()); query.ne(TMinSalary::getId,tMinSalary.getId());
query.eq(TMinSalary::getStatus, CommonConstants.ONE_INT);
long res = baseMapper.selectCount(query); long res = baseMapper.selectCount(query);
if (res > CommonConstants.ZERO_INT){ if (res > CommonConstants.ZERO_INT){
return R.failed("已存在对应区域在用的配置信息"); return R.failed("已存在对应区域在用的配置信息");
......
...@@ -19,15 +19,14 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl; ...@@ -19,15 +19,14 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
...@@ -192,12 +191,18 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -192,12 +191,18 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
@Override @Override
public List<THaveSalaryNosocial> getLastMonthTHaveSalaryNosocial(String month) { public List<THaveSalaryNosocial> getLastMonthTHaveSalaryNosocial(String month) {
return baseMapper.getLastMonthTHaveSalaryNosocial(month, return baseMapper.getLastMonthTHaveSalaryNosocial(month,
DateUtil.getYearAndMonth(month,CommonConstants.ONE_INT), DateUtil.getYearAndMonth(month,-CommonConstants.ONE_INT),
DateUtil.getYearAndMonth(month,CommonConstants.TWO_INT)); DateUtil.getYearAndMonth(month,-CommonConstants.TWO_INT));
} }
@Override @Override
public List<String> getAccountYearCheckMap() { public List<String> getAccountYearCheckMap() {
return baseMapper.getAccountYearCheckList(); return baseMapper.getAccountYearCheckList();
} }
@Override
public List<EkpSalaryParamVo> getEkpSalaryParamList(String salaryId) {
return baseMapper.getEkpSalaryParamList(salaryId);
}
} }
...@@ -36,7 +36,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -36,7 +36,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants; import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate; import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord; import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
...@@ -46,10 +48,12 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService; ...@@ -46,10 +48,12 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService; import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo; 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.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -60,6 +64,7 @@ import java.io.IOException; ...@@ -60,6 +64,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -85,6 +90,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -85,6 +90,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired @Autowired
private DaprSocialProperties socialProperties; private DaprSocialProperties socialProperties;
@Autowired
private EkpSalaryUtil ekpSalaryUtil;
/** /**
* 标准薪酬工资表简单分页查询 * 标准薪酬工资表简单分页查询
* *
...@@ -402,4 +410,60 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -402,4 +410,60 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return R.failed("id 不可为空"); return R.failed("id 不可为空");
} }
@Override
public R<String> doSend(String id) {
TSalaryStandard s = this.getById(id);
if (s == null) {
return R.failed("未找到工资表");
} else if (s.getStatus() == SalaryConstants.STATUS[2] || s.getStatus() == SalaryConstants.STATUS[10]) {
//报账表
List<EkpSalaryParamVo> ekpList = salaryAccountService.getEkpSalaryParamList(id);
YifuUser user = SecurityUtils.getUser();
if (user != null && ekpList != null && !ekpList.isEmpty()) {
boolean sendStatus = true;
String sendBack;
List<TSalaryAccount> accountList = new ArrayList<>();
TSalaryAccount account;
Date sendTime = new Date();
String nowMonth = DateUtil.addMonth(0);
EkpSalaryParam sendParam;
for (EkpSalaryParamVo sendParamVo : ekpList) {
// 转化报账表的参数
account = new TSalaryAccount();
account.setId(sendParamVo.getSalaryAccountId());
sendParam = new EkpSalaryParam();
BeanUtils.copyProperties(sendParamVo, sendParam);
sendBack = ekpSalaryUtil.sendToEKP(sendParam);
account.setSendTime(sendTime);
account.setSendUser(user.getId());
account.setSendUserName(user.getNickname());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth);
account.setEkpId(sendBack);
} else {
sendStatus = false;
}
accountList.add(account);
}
salaryAccountService.updateBatchById(accountList);
if (sendStatus) {
s.setSendTime(new Date());
s.setSendMonth(DateUtil.addMonth(0));
s.setStatus(SalaryConstants.STATUS[3]);
this.updateById(s);
return R.ok("发送成功!");
} else {
s.setStatus(SalaryConstants.STATUS[10]);
this.updateById(s);
return R.ok("发送失败!");
}
} else {
return R.failed("请登录!");
}
} else {
return R.failed("请刷新后检查薪资表状态!");
}
}
} }
...@@ -269,13 +269,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -269,13 +269,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} }
sumDeductSalary = BigDecimalUtils.safeAdd(sdSum,isTax,costReduction); sumDeductSalary = BigDecimalUtils.safeAdd(sdSum,isTax,costReduction);
//年终奖单独扣税
finalSalaryNoSalary = calculationSalary(annousTax,infoVo.getAnnualBonus());
//年终奖合并扣税 //年终奖合并扣税
if (isSend) { if (isSend) {
//年终奖单独扣税
finalSalaryNoSalary = calculationSalary(annousTax,infoVo.getAnnualBonus());
wSalary = infoVo.getAnnualBonus(); wSalary = infoVo.getAnnualBonus();
finalSalaryWithSalary = finalSalaryNoSalary; finalSalaryWithSalary = finalSalaryNoSalary;
} else { } else {
//年终奖单独扣税
finalSalaryNoSalary = calculationSalary(annousTax,infoVo.getAnnualBonus());
BigDecimal annualTSalary = calculationSalaryT(personTax,infoVo.getAnnualTSalary(),sumTax);
finalSalaryNoSalary = BigDecimalUtils.safeAdd(finalSalaryNoSalary,annualTSalary);
wSalary = BigDecimalUtils.safeAdd(infoVo.getAnnualBonus(), infoVo.getAnnualTSalary()); wSalary = BigDecimalUtils.safeAdd(infoVo.getAnnualBonus(), infoVo.getAnnualTSalary());
finalSalaryWithSalary = calculationSalary(annousTax, wSalary); finalSalaryWithSalary = calculationSalary(annousTax, wSalary);
} }
...@@ -516,6 +520,32 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -516,6 +520,32 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
return anRes; return anRes;
} }
/**
* @param personTax 薪资扣税阶梯表list
* @param annualSalary 年终奖
* @Description: 计算薪资扣税-个税
* @Author: huyc
* @Date: 2022/8/23
* @return: java.math.BigDecimal
**/
private static BigDecimal calculationSalaryT(List<TSalaryTaxConfig> personTax, BigDecimal annualSalary, BigDecimal sumTax) {
//本次年终奖纳税额
BigDecimal res = BigDecimal.ZERO;
//计算年终奖税
//计算个税
for (TSalaryTaxConfig sub : personTax) {
if (annualSalary.compareTo(sub.getMinIncome()) == SalaryConstants.MORE_THAN
&& annualSalary.compareTo(sub.getMaxIncome()) != SalaryConstants.MORE_THAN) {
//annualSalary = realDeduSalary * ((double) ((annualSalary.getTaxRate() * 1.0) / 100)) - sumTax - sub.getQuick();
res = annualSalary.multiply(new BigDecimal(sub.getWithholdingRate()).divide(
SalaryConstants.B_ONEHUNDRED, SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP))
.subtract(sumTax).subtract(sub.getQuickDeducation());// 应纳税额
break;
}
}
return res;
}
@Override @Override
public List<TStatisticsBonus> noPageDiy(TStatisticsBonusSearchVo searchVo) { public List<TStatisticsBonus> noPageDiy(TStatisticsBonusSearchVo searchVo) {
LambdaQueryWrapper<TStatisticsBonus> wrapper = buildQueryWrapper(searchVo); LambdaQueryWrapper<TStatisticsBonus> wrapper = buildQueryWrapper(searchVo);
......
...@@ -274,16 +274,18 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla ...@@ -274,16 +274,18 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
} }
//根据身份证号和申报月份查找申报人员 //根据身份证号和申报月份查找申报人员
TStatisticsDeclarer tStatisticsDeclarer = baseMapper.selectOne(Wrappers.<TStatisticsDeclarer>query().lambda() List<TStatisticsDeclarer> declarerList = baseMapper.selectList(Wrappers.<TStatisticsDeclarer>query().lambda()
.eq(TStatisticsDeclarer::getEmpIdcard, excel.getEmpIdcard()) .eq(TStatisticsDeclarer::getEmpIdcard, excel.getEmpIdcard())
.eq(TStatisticsDeclarer::getDeclareMonth, excel.getDeclareMonth()) .eq(TStatisticsDeclarer::getDeclareMonth, excel.getDeclareMonth())
.last(CommonConstants.LAST_ONE_SQL)); .eq(TStatisticsDeclarer::getEmpName, excel.getEmpName()));
if (Common.isNotNull(tStatisticsDeclarer)) { if (Common.isNotNull(declarerList)) {
for (TStatisticsDeclarer tStatisticsDeclarer: declarerList) {
tStatisticsDeclarer.setIsDeclare(excel.getIsDeclare()); tStatisticsDeclarer.setIsDeclare(excel.getIsDeclare());
if (Common.isNotNull(excel.getUndeclareReason())) { if (Common.isNotNull(excel.getUndeclareReason())) {
tStatisticsDeclarer.setUndeclareReason(excel.getUndeclareReason()); tStatisticsDeclarer.setUndeclareReason(excel.getUndeclareReason());
} }
baseMapper.updateById(tStatisticsDeclarer); baseMapper.updateById(tStatisticsDeclarer);
}
}else { }else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到身份证和申报月份对应的申报人员信息")); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到身份证和申报月份对应的申报人员信息"));
continue; continue;
......
...@@ -33,7 +33,7 @@ public class SalaryConstants { ...@@ -33,7 +33,7 @@ public class SalaryConstants {
* @return: * @return:
**/ **/
public static final Integer[] AUDIT_STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; public static final Integer[] AUDIT_STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
public static final int[] STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; public static final int[] STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
public static final String[] AUDIT_STATUS_STRING = {"待提交", "待审核", "-", "待发放", "已发放", "审核不通过", "确认不通过", "财务退回", "结算单调整待审核", "结算单调整待打印"}; public static final String[] AUDIT_STATUS_STRING = {"待提交", "待审核", "-", "待发放", "已发放", "审核不通过", "确认不通过", "财务退回", "结算单调整待审核", "结算单调整待打印"};
//发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领 //发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领
public static final Integer[] LOST_STATUS = {0, 1, 2, 3}; public static final Integer[] LOST_STATUS = {0, 1, 2, 3};
......
...@@ -178,9 +178,9 @@ ...@@ -178,9 +178,9 @@
province, province,
city, city,
town, town,
DEPART_ID, DEPT_ID,
DEPART_NAME, DEPT_NAME,
DEPART_NO, DEPT_NO,
0 as TYPE 0 as TYPE
FROM FROM
( (
...@@ -189,10 +189,10 @@ ...@@ -189,10 +189,10 @@
a.EMP_ID employee_id, a.EMP_ID employee_id,
a.EMP_IDCARD employee_idnum, a.EMP_IDCARD employee_idnum,
a.EMP_NAME employee_name, a.EMP_NAME employee_name,
s.DEPART_ID, s.DEPT_ID,
s.DEPART_NAME, s.DEPT_NAME,
s.DEPART_NO, s.DEPT_NO,
a.SALARY_DATE salary_month, a.SALARY_MONTH salary_month,
a.SETTLEMENT_MONTH settle_month, a.SETTLEMENT_MONTH settle_month,
sum(i.SALARY_MONEY) AS actual_salary, sum(i.SALARY_MONEY) AS actual_salary,
sum(l.SALARY_MONEY) AS relay_Salary, sum(l.SALARY_MONEY) AS relay_Salary,
...@@ -210,9 +210,10 @@ ...@@ -210,9 +210,10 @@
LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary' LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
WHERE WHERE
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
and s.SEND_MONTH = #{settleMonth} and a.FORM_TYPE='0'
and a.SALARY_MONTH = #{settleMonth}
AND s.STATUS IN (3, 4) AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD,a.SALARY_DATE GROUP BY a.EMP_IDCARD,a.SALARY_MONTH
) b ) b
WHERE b.salary_base > b.actual_salary WHERE b.salary_base > b.actual_salary
</select> </select>
...@@ -273,7 +274,7 @@ ...@@ -273,7 +274,7 @@
<!--生成前,先删除老数据--> <!--生成前,先删除老数据-->
<delete id="deleteAllBySettleMonth"> <delete id="deleteAllBySettleMonth">
delete from sys_message_salary where settle_month = #{settleMonth} delete from sys_message_salary where SALARY_MONTH = #{settleMonth}
</delete> </delete>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<result property="customerName" column="CUSTOMER_NAME"/> <result property="customerName" column="CUSTOMER_NAME"/>
<result property="settlementOrganName" column="SETTLEMENT_ORGAN_NAME"/> <result property="settlementOrganName" column="SETTLEMENT_ORGAN_NAME"/>
<result property="settlementOrganNo" column="SETTLEMENT_ORGAN_NO"/> <result property="settlementOrganNo" column="SETTLEMENT_ORGAN_NO"/>
<result property="feedBack" column="FEEDBACK"/> <result property="feedBack" column="FEED_BACK"/>
<result property="reasonType" column="REASON_TYPE"/> <result property="reasonType" column="REASON_TYPE"/>
<result property="month" column="month"/> <result property="month" column="month"/>
</resultMap> </resultMap>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<result property="month" column="month"/> <result property="month" column="month"/>
<result property="relaySalary" column="RELAY_SALARY"/> <result property="relaySalary" column="RELAY_SALARY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="feedBack" column="FEEDBACK"/> <result property="feedBack" column="FEED_BACK"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
a.month, a.month,
a.SETTLE_MONTH, a.SETTLE_MONTH,
a.relay_salary, a.relay_salary,
a.FEEDBACK, a.FEED_BACK,
a.CREATE_NAME, a.CREATE_NAME,
a.REASON_TYPE a.REASON_TYPE
</sql> </sql>
......
...@@ -99,11 +99,12 @@ ...@@ -99,11 +99,12 @@
#{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT, #{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT,
if(c.FORM_TYPE=0,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE FROM if(c.FORM_TYPE=0,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE FROM
(SELECT s.* FROM t_salary_account s, (SELECT s.* FROM t_salary_account s,
(SELECT a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.INVOICE_TITLE,a.FORM_TYPE,MAX(CREATE_TIME) max_day,a.SETTLEMENT_MONTH (SELECT a.EMP_NAME,a.EMP_IDCARD,a.EMP_PHONE,a.INVOICE_TITLE,a.FORM_TYPE,MAX(CREATE_TIME) max_day,a.SETTLEMENT_MONTH,
if(a.FORM_TYPE=0,'0',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'1','-')) CUPATION_TYPE
FROM t_salary_account a WHERE a.DELETE_FLAG = '0' AND a.SETTLEMENT_MONTH = #{lastMonth} FROM t_salary_account a WHERE a.DELETE_FLAG = '0' AND a.SETTLEMENT_MONTH = #{lastMonth}
GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,a.FORM_TYPE,a.SETTLEMENT_MONTH) b GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,CUPATION_TYPE,a.SETTLEMENT_MONTH) b
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH AND s.FORM_TYPE = b.FORM_TYPE ) c AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
</select> </select>
</mapper> </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