Commit 4c9cb524 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/develop'

# Conflicts:
#	yifu-common/yifu-common-ekp/src/main/resources/ekpFundConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpIncomeConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpInsuranceConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpOrderConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpSalaryConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpSocialConfig.properties
#	yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
#	yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
#	yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TInsuranceDetailService.java
#	yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
#	yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPreDispatchInfo.java
#	yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPreDispatchReduceVo.java
#	yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPreDispatchUpdateVo.java
#	yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
parents 079d5d70 e40b839f
......@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* @Author fxj
......@@ -14,7 +15,8 @@ import java.time.LocalDateTime;
*/
@Data
public class CertRecordSearchVo extends TCertRecord {
private String ids;
private List<String> idList;
/**
* 创建时间区间 [开始时间,结束时间]
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 人员档案表excel导出对应的实体
*
* @author hgw
* @date 2022-6-24 15:15:24
*/
@Data
@ColumnWidth(10)
public class EmployeeLeaveExportVO {
private static final long serialVersionUID = 1L;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工主码")
private String empCode;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工姓名")
private String empName;
@ColumnWidth(20)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "身份证号")
private String empIdcard;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "手机号码")
private String empPhone;
@ExcelAttribute(name = "档案所在省", isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在省")
private String fileProvince;
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在市")
private String fileCity;
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在县")
private String fileTown;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "单位名称")
private String unitName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "项目名称")
private String deptName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "项目编码")
private String deptNo;
@ExcelAttribute(name = "员工类型", isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工类型")
private String empNatrue;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "减档人")
private String leaveUserName;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "减档时间")
private LocalDateTime leaveTime;
}
......@@ -502,4 +502,6 @@ public class EmployeeProjectExportParamVO extends BaseEntity {
*/
@Schema(description = "导出IDS")
private String ids;
private List<String> exportFields;
}
......@@ -18,6 +18,8 @@ public class UpdateEmpVo implements Serializable {
String projectNo;
// 合同ID
String contractId;
// 备注
String remarkTemp;
// type 0 审核通过 2.审核不通过
String type;
......
......@@ -108,7 +108,7 @@ public class FileUploadController {
public R<List<TAttaInfo>> ossFileUrl(@PathVariable String id) {
List<TAttaInfo> attas = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId,id));
if (Common.isEmpty(attas)) {
return R.failed("无对应附件信息");
return new R<>(attas);
}
for (TAttaInfo atta:attas){
URL url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
......
......@@ -51,7 +51,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/tcertrecord" )
@Tag(name = "证明开具记录表管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TCertRecordController {
private final TCertRecordService tCertRecordService;
......@@ -87,9 +86,9 @@ public class TCertRecordController {
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@GetMapping("/noPage" )
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
public R<List<TCertRecord>> getTCertRecordNoPage(CertRecordSearchVo searchVo) {
public R<List<TCertRecord>> getTCertRecordNoPage(@RequestBody CertRecordSearchVo searchVo) {
setAuth(searchVo);
return R.ok(tCertRecordService.getTCertRecordNoPage(searchVo));
}
......
......@@ -55,8 +55,8 @@ public class TCutsomerDataPermissonController {
* @return
*/
@Operation(description = "导出的list")
@GetMapping("/getList")
public R<List<TCutsomerDataPermisson>> getTCutsomerDataPermissonList(TCutsomerDataPermisson tCutsomerDataPermisson) {
@PostMapping("/getList")
public R<List<TCutsomerDataPermisson>> getTCutsomerDataPermissonList(@RequestBody TCutsomerDataPermisson tCutsomerDataPermisson) {
return new R<>(tCutsomerDataPermissonService.getTCutsomerDataPermissonList(tCutsomerDataPermisson));
}
......
......@@ -326,7 +326,7 @@ public class TEmployeeInfoController {
@SysLog("批量导出离职档案信息")
// @ResponseExcel
@PostMapping("/exportLeaveEmployee")
public void exportLeaveEmployee(@RequestBody(required = false) TEmployeeInfo employeeInfo, HttpServletResponse response) {
public void exportLeaveEmployee(@RequestBody(required = false) EmployeeInfoSearchVo employeeInfo, HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, employeeInfo);
......
......@@ -240,34 +240,30 @@ public class TEmployeeProjectController {
/**
* 通过id批量删除项目档案
* @param ids
* @return R
*/
@Operation(summary = "通过id批量删除项目档案", description = "通过id批量删除项目档案")
@SysLog("通过id批量删除项目档案" )
@PostMapping("/deletebyIds" )
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_batchdel')" )
public R<List<ErrorMessage>> removeByIds(@RequestParam String ids) {
return tEmployeeProjectService.batchRemoveByIds(ids);
public R<List<ErrorMessage>> removeByIds(@RequestBody List<String> idList) {
return tEmployeeProjectService.batchRemoveByIds(idList);
}
/**
* 批量导出项目档案信息
* @param projectDTO
* @param idstr
* @param exportFields
* @return R<List>
* @Author huyc
* @Date 2022-06-21
**/
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestParam(name = "idstr", required = false)String idstr,
@RequestBody List<String> exportFields, EmployeeProjectExportParamVO projectDTO) {
public void export(HttpServletResponse response, @RequestBody EmployeeProjectExportParamVO projectDTO) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, projectDTO);
}
tEmployeeProjectService.listExportProject(response,projectDTO,idstr,exportFields);
tEmployeeProjectService.listExportProject(response,projectDTO,projectDTO.getExportFields());
}
/**
......
......@@ -185,6 +185,7 @@ public class TSettleDomainController {
List<TSettleDomainSelectVo> list = new ArrayList<>();
TSettleDomain tSettleDomain = tSettleDomainService.getById(tSettleDomainSelectVo.getId());
BeanUtils.copyProperties(tSettleDomain,tSettleDomainSelectVo);
tSettleDomainSelectVo.setCustomerCode(tSettleDomain.getCustomerNo());
list.add(tSettleDomainSelectVo);
TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list);
......@@ -205,6 +206,7 @@ public class TSettleDomainController {
.eq(TSettleDomain::getDepartNo, tSettleDomainSelectVo.getDepartNo())
.last(CommonConstants.LAST_ONE_SQL));
BeanUtils.copyProperties(tSettleDomain,tSettleDomainSelectVo);
tSettleDomainSelectVo.setCustomerCode(tSettleDomain.getCustomerNo());
list.add(tSettleDomainSelectVo);
TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list);
......
......@@ -81,4 +81,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
int noPageCountDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchVo);
// 同 getTEmployeeExportList 方法
List<EmployeeExportVO> noPageDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchVo);
List<EmployeeLeaveExportVO> noPageLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV);
int noPageCountLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV);
}
......@@ -177,7 +177,7 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
* @Author: hgw
* @Date: 2022-6-24 09:35:54
**/
void exportLeaveEmployee(TEmployeeInfo employeeVo, HttpServletResponse response);
void exportLeaveEmployee(EmployeeInfoSearchVo employeeVo, HttpServletResponse response);
Map<String,DispatchEmpVo> getDispatchEmpVo(DispatchCheckVo checkVo);
......
......@@ -150,21 +150,19 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
* @Date: 2022/6/22 12:30
* @return: R
**/
R<List<ErrorMessage>> batchRemoveByIds(String ids);
R<List<ErrorMessage>> batchRemoveByIds(List<String> ids);
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, TEmployeeProject vo);
/**
* @param projectDTO
* @param idstr
* @param exportFields
* @Description: 批量导出项目档案
* @Author: huyc
* @Date: 2022/6/23 10:30
* @return: R
**/
void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO projectDTO,
String idstr, List<String> exportFields);
void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO projectDTO, List<String> exportFields);
/**
* @param employeeInfo
* @Description: 新增项目档案
......
......@@ -137,9 +137,8 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
@Override
public List<TCertRecord> getTCertRecordNoPage(CertRecordSearchVo searchVo) {
LambdaQueryWrapper<TCertRecord> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TCertRecord::getId,idList);
if (Common.isNotNull(searchVo.getIdList())){
wrapper.in(TCertRecord::getId,searchVo.getIdList());
}
if (Common.isNotNull(searchVo.getAuthSql())) {
if (Common.isNotNull(searchVo.getAuthSql()) && searchVo.getAuthSql().contains("a.")) {
......
......@@ -2069,41 +2069,78 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
* 获取导出的离职档案列表
*/
@Override
public void exportLeaveEmployee(TEmployeeInfo employeeInfo, HttpServletResponse response) {
if (employeeInfo != null && employeeInfo.getExportFields() != null && !employeeInfo.getExportFields().isEmpty()) {
public void exportLeaveEmployee(EmployeeInfoSearchVo searchVo, HttpServletResponse response) {
if (searchVo != null && searchVo.getExportFields() != null && !searchVo.getExportFields().isEmpty()) {
String fileName = "离职档案批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
employeeInfo.setFileStatus(CommonConstants.ONE_INT);
List<EmployeeExportVO> list = baseMapper.getTEmployeeLeaveExportList(employeeInfo);
List<EmployeeLeaveExportVO> list = new ArrayList<>();
//获取要导出的列表
searchVo.setFileStatus(CommonConstants.ONE_INT);
long count = noPageCountLeaveDiy(searchVo);
// baseMapper.getTEmployeeLeaveExportList(employeeInfo);
ServletOutputStream out = null;
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
try {
ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeExportVO.class).includeColumnFiledNames(employeeInfo.getExportFields())
.sheet("离职档案").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeLeaveExportVO.class).includeColumnFieldNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeLeaveExportVO.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<EmployeeLeaveExportVO> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageLeaveDiy(searchVo);
/*if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeLeaveExportVO.class);
for (EmployeeLeaveExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}*/
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("离职档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("离职档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
} catch (Exception e) {
log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
} finally {
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}finally {
try {
if (out != null) {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error(EmployeeConstants.FILE_EXPORT_EXCEPTION, e);
log.error("执行异常", e);
}
}
}
}
private List<EmployeeLeaveExportVO> noPageLeaveDiy(EmployeeInfoSearchVo searchVo) {
return baseMapper.noPageLeaveDiy(searchVo);
}
private long noPageCountLeaveDiy(EmployeeInfoSearchVo searchVo) {
return baseMapper.noPageCountLeaveDiy(searchVo);
}
@Override
......@@ -2206,7 +2243,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
c.setInUse(CommonConstants.ZERO_STRING);
c.setAuditTimeLast(LocalDateTime.now());
contractAudit.setAuditStatus("审核通过");
contractAudit.setRemark("派单审核通过,同步审核通过合同");
contractAudit.setRemark(vo.getRemarkTemp());
contractAudit.setRootName("合同审核");
contractServicer.updateInUseStatusById(c.getEmpId(),c.getDeptNo(),c.getId());
//审核不同
......@@ -2214,7 +2251,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
c.setAuditStatus(CommonConstants.THREE_INT);
c.setInUse(CommonConstants.ONE_STRING);
contractAudit.setAuditStatus("审核不通过");
contractAudit.setRemark("派单审核不通过,同步审核不通过合同");
contractAudit.setRemark(vo.getRemarkTemp());
contractAudit.setRootName("合同审核");
}
contractAuditMapper.insert(contractAudit);
......@@ -2246,6 +2283,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
TEmployeeContractInfo contract;
EmpAddDispatchVo emp;
EmpProjectDispatchVo project;
TEmployeeContractAudit audit;
for (Map.Entry<String, EmpContractDispatchVo> entry : contractsMap.entrySet()) {
contractAdd = entry.getValue();
try {
......@@ -2274,6 +2312,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
contract.setDispatchFlag(CommonConstants.ONE_STRING);
contract.setType(CommonConstants.ZERO_STRING);
contractServicer.save(contract);
audit = new TEmployeeContractAudit();
addContractAudit(contract, audit);
contractAdd.setId(contract.getId());
contractAdd.setEmpNo(contract.getEmpNo());
contractsMap.put(contractAdd.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + contractAdd.getDeptNo(), contractAdd);
......@@ -2286,6 +2326,18 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
private void addContractAudit(TEmployeeContractInfo contract, TEmployeeContractAudit audit) {
audit.setCreateBy(contract.getCreateBy());
audit.setCreateName(contract.getCreateName());
audit.setCreateTime(LocalDateTime.now());
audit.setUpdateBy(contract.getUpdateBy());
audit.setUpdateTime(LocalDateTime.now());
audit.setLinkId(contract.getId());
audit.setLinkType(CommonConstants.ONE_INT);
audit.setRootName("提交申请");
contractAuditMapper.insert(audit);
}
private void saveEmp(Map<String, EmpAddDispatchVo> empAddsMap) {
if (Common.isNotNull(empAddsMap)) {
EmpAddDispatchVo empAdd;
......
......@@ -1107,22 +1107,19 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override
@Transactional
public R<List<ErrorMessage>> batchRemoveByIds(String ids) {
public R<List<ErrorMessage>> batchRemoveByIds(List<String> ids) {
List<ErrorMessage> errorList = new ArrayList<>();
List<TEmployeeProject> updList = new ArrayList<>();
List<TEmployeeInfo> infoUpdList = new ArrayList<>();
List<String> idsList;
if (!Common.isEmpty(ids)) {
idsList = Common.initStrToList(ids, CommonConstants.COMMA_STRING);
} else {
if (Common.isEmpty(ids)) {
return R.failed(ErrorCodes.PARAM_NOT_EMPTY);
}
List<TEmployeeProject> list = new ArrayList<>();
if (Common.isNotEmpty(idsList)) {
list = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda().in(TEmployeeProject::getId, idsList)
if (Common.isNotEmpty(ids)) {
list = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda().in(TEmployeeProject::getId, ids)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
}
if (Common.isNotEmpty(list)) {
......@@ -1176,8 +1173,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
* @Date 10:55 2022/6/23
**/
@Override
public void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO searchVo, String idstr, List<String> exportFields) {
searchVo.setIdList(Common.getList(idstr));
public void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO searchVo, List<String> exportFields) {
String fileName = "项目档案批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
// 根据用户传入确定要导出的字段
Set<String> includeColumnFiledNames = new HashSet<>(exportFields);
......
......@@ -125,6 +125,22 @@
<result property="leaveRemark" column="LEAVE_REMARK"/>
<result property="status" column="STATUS"/>
</resultMap>
<resultMap id="tEmployeeLeaveExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeLeaveExportVO">
<result property="empCode" column="EMP_CODE"/>
<result property="empNatrue" column="EMP_NATRUE"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empPhone" column="EMP_PHONE"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="leaveUserName" column="LEAVE_USER_NAME"/>
<result property="leaveTime" column="LEAVE_TIME"/>
</resultMap>
<resultMap id="dispatchEmpVoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.DispatchEmpVo">
<id property="id" column="ID"/>
<result property="empCode" column="EMP_CODE"/>
......@@ -798,8 +814,12 @@
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_USER_NAME
,a.LEAVE_REASON
,a.LEAVE_REASON,
p.IS_PROJECTS ,
p.DEPT_NAME,
p.DEPT_NO,p.UNIT_NAME
from t_employee_info a
LEFT JOIN view_project_leave p on a.EMP_IDCARD=p.EMP_IDCARD
<!--left join (
select
b.EMP_ID,
......@@ -974,4 +994,92 @@
)
</if>
</sql>
<!--tEmployeeInfo离职档案导出查询-->
<select id="noPageLeaveDiy" resultMap="tEmployeeLeaveExportMap">
SELECT
a.EMP_CODE,
CASE WHEN a.EMP_NATRUE='0' THEN "外包"
WHEN a.EMP_NATRUE='1' THEN "派遣"
WHEN a.EMP_NATRUE='2' THEN "代理"
WHEN a.EMP_NATRUE='3' THEN "内部员工"
ELSE "" END as "EMP_NATRUE",
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_PHONE,
a.EMP_EMAIL,
a1.area_name as "FILE_PROVINCE",
a2.area_name as "FILE_CITY",
a3.area_name as "FILE_TOWN",
a.LEAVE_TIME,
a.LEAVE_USER_NAME,
p.DEPT_NAME,
p.DEPT_NO,
p.UNIT_NAME
from t_employee_info a
LEFT JOIN view_project_leave p on a.EMP_IDCARD=p.EMP_IDCARD
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.FILE_CITY
LEFT JOIN sys_area a3 on a3.id=a.FILE_TOWN
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
<if test="tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''">
AND p.UNIT_NAME like concat('%',#{tEmployeeInfo.unitName},'%')
</if>
<if test="tEmployeeInfo.deptName != null and tEmployeeInfo.deptName.trim() != ''">
AND p.DEPT_NAME like concat('%',#{tEmployeeInfo.deptName},'%')
</if>
<if test="tEmployeeInfo.deptNo != null and tEmployeeInfo.deptNo.trim() != ''">
AND p.DEPT_NO like concat('%',#{tEmployeeInfo.deptNo},'%')
</if>
</where>
order by a.CREATE_TIME desc
<if test="tEmployeeInfo != null">
<if test="tEmployeeInfo.limitStart != null">
limit #{tEmployeeInfo.limitStart},#{tEmployeeInfo.limitEnd}
</if>
</if>
</select>
<!--tEmployeeInfo离职档案导出查询-->
<select id="noPageCountLeaveDiy" resultType="java.lang.Integer">
select count(1)
from t_employee_info a
LEFT JOIN view_project_leave p on a.EMP_IDCARD=p.EMP_IDCARD
<where>
a.DELETE_FLAG = '0'
<include refid="employeeInfo_where"/>
<if test="tEmployeeInfo.authSql != null and tEmployeeInfo.authSql.trim() != ''">
and
a.id in (
select b.emp_id from t_employee_project b
where
b.DELETE_FLAG = '0'
${tEmployeeInfo.authSql}
)
</if>
<if test="tEmployeeInfo.unitName != null and tEmployeeInfo.unitName.trim() != ''">
AND p.UNIT_NAME like concat('%',#{tEmployeeInfo.unitName},'%')
</if>
<if test="tEmployeeInfo.deptName != null and tEmployeeInfo.deptName.trim() != ''">
AND p.DEPT_NAME like concat('%',#{tEmployeeInfo.deptName},'%')
</if>
<if test="tEmployeeInfo.deptNo != null and tEmployeeInfo.deptNo.trim() != ''">
AND p.DEPT_NO like concat('%',#{tEmployeeInfo.deptNo},'%')
</if>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.TypeReference;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
......@@ -12,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
......@@ -141,6 +143,25 @@ public class ArchivesDaprUtil {
return res;
}
/**
* @param deptNo 部门编码
* @Description: 获取部门信息
* @Author: hgw
* @Date: 2022/11/16 14:50
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
**/
public TSettleDomainSelectVo selectDeptByNo(String deptNo){
TSettleDomainSelectVo dept = new TSettleDomainSelectVo();
dept.setDepartNo(deptNo);
R<TSettleDomainListVo> listVo = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl()
, daprArchivesProperties.getAppId(),"/tsettledomain/selectSettleDomainSelectVoByNo"
, dept, TSettleDomainListVo.class, SecurityConstants.FROM_IN);
if (Common.isNotNull(listVo) && listVo.getData() != null && listVo.getData().getListSelectVO() != null && !listVo.getData().getListSelectVO().isEmpty()) {
dept = listVo.getData().getListSelectVO().get(0);
}
return dept;
}
public R<EmpDispatchAddVo> addDispatchInfo(EmpDispatchAddVo addVo) {
R<EmpDispatchAddVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/addDispatchInfo" , JSON.toJSONString(addVo), EmpDispatchAddVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
......@@ -205,7 +226,7 @@ public class ArchivesDaprUtil {
* @Param type 0 审核通过 1 审核不通过
* @return
**/
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractId,String type){
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractId,String type,String remarkTemp){
if (Common.isEmpty(empIdCard)
|| Common.isEmpty(projectNo)
|| Common.isEmpty(type)){
......@@ -215,6 +236,7 @@ public class ArchivesDaprUtil {
vo.setEmpIdCard(empIdCard);
vo.setProjectNo(projectNo);
vo.setContractId(contractId);
vo.setRemarkTemp(remarkTemp);
vo.setType(type);
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
/**
* @Author hgw
* @Date 2022-11-17 10:16:59
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties(DaprInsurancesProperties.class)
public class InsuranceDaprUtil {
@Autowired
private DaprInsurancesProperties daprInsurancesProperties;
/**
* @Author hgw
* @Description ekp费用划转,商险划转项目
* @Date 2022-11-17 11:03:08
* @Param
* @return
**/
public void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo){
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl()
, daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/ekpUpdateInsuranceDept" , changeDeptVo
, Object.class, SecurityConstants.FROM_IN);
}
}
......@@ -4,4 +4,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
......@@ -13,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -625,6 +626,19 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.getOrderInsuredListPage(page,param);
}
/**
* @param changeDeptVo
* @Description: ekp费用划转,商险划转项目
* @Author: hgw
* @Date: 2022/11/17 10:56
* @return: void
**/
@Operation(summary = "ekp费用划转,商险划转项目", description = "ekp费用划转,商险划转项目")
@Inner
@PostMapping("/inner/ekpUpdateInsuranceDept")
public void ekpUpdateInsuranceDept(@RequestBody ChangeDeptVo changeDeptVo) {
tInsuranceDetailService.ekpUpdateInsuranceDept(changeDeptVo);
}
/**
* 每日定时刷新商险到期数据
*
......
......@@ -3,12 +3,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* @author licancan
......@@ -224,5 +226,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
IPage<InsuredOrderListVo> getOrderInsuredListPage(Page<InsuredOrderListVo> page, @Param("param") InsuredOrderParam param);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-商险
* @Author: hgw
* @Date: 2022/11/17 11:01
* @return: int
**/
int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
List<TInsuranceDetail> selectPushList();
}
......@@ -9,6 +9,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
......@@ -399,5 +400,14 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
SettleVo getInsuranceDetailSettleStatus(String detailId, String defaultSettleId);
/**
* @param changeDeptVo
* @Description: ekp费用划转,商险划转项目
* @Author: hgw
* @Date: 2022/11/17 10:56
* @return: void
**/
void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo);
void pushActualPremium ();
}
......@@ -34,6 +34,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
......@@ -6406,4 +6408,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
@Override
public void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo) {
Set<String> detailIdSet = new HashSet<>();
for (ChangeDeptDetailVo vo : changeDeptVo.getShangxian()) {
if (Common.isNotNull(vo.getId())) {
detailIdSet.add(vo.getId().split(CommonConstants.DOWN_LINE_STRING)[0]);
}
}
if (!detailIdSet.isEmpty()) {
baseMapper.ekpUpdateInsuranceDept(detailIdSet, changeDeptVo.getDept());
}
}
}
......@@ -1169,6 +1169,23 @@
)
order by createTime desc
</select>
<!-- ekp费用划转-商险-->
<update id="ekpUpdateInsuranceDept">
update t_insurance_detail p
set
p.DEPT_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.UNIT_NO = #{dept.customerCode}
where p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<select id="selectPushList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT
*
......
......@@ -57,9 +57,9 @@ public class OrderController {
* @return {@link R<List<OrderListVO>>}
*/
@Operation(summary = "订单列表不分页查询", description = "订单列表不分页查询")
@GetMapping("/getOrderList")
@PostMapping("/getOrderList")
@PreAuthorize("@pms.hasPermission('order:order_getOrderList')")
public R<List<OrderListVO>> getOrderList(OrderListParam param) {
public R<List<OrderListVO>> getOrderList(@RequestBody OrderListParam param) {
return tOrderService.getOrderList(param);
}
......
......@@ -114,7 +114,7 @@ public class TSalaryAttaController {
public R ossFileUrl(@PathVariable String id) {
TSalaryAtta salaryAtta = tSalaryAttaService.getById(id);
if (null == salaryAtta) {
return R.failed("无对应附件信息");
return new R<>(salaryAtta);
}
URL url = ossUtil.getObjectUrl(null, salaryAtta.getAttaSrc());
salaryAtta.setAttaUrl(url.toString().replace("http","https"));
......
......@@ -1531,10 +1531,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
TSalaryAccountItem sai;
for (int i = CommonConstants.ZERO_INT; i < size; i++) {
a = new TSalaryAccount();
// 本次实发
BigDecimal actualSalarySumNow = BigDecimal.ZERO;
// 当月实发合计
BigDecimal actualSalarySum = BigDecimal.ZERO;
try {
SalaryAccountUtil.reflectionAttr(savList.get(i), a);
if (!haveSalaryFlag && a.getHaveSalaryFlag() != null && a.getHaveSalaryFlag() == CommonConstants.ONE_INT) {
......@@ -1549,11 +1545,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
for (int j = 0; j < savList.get(i).getSaiList().size(); j++) {
sai = new TSalaryAccountItem();
SalaryAccountUtil.reflectionAttr(savList.get(i).getSaiList().get(j), sai);
//个人实发合计
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(sai.getJavaFiedName())) {
actualSalarySum = actualSalarySum.add(sai.getSalaryMoney());
actualSalarySumNow = actualSalarySumNow.add(sai.getSalaryMoney());
}
saiList.add(sai);
}
}
......@@ -1645,7 +1636,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2022/3/3 11:30
* @return: java.math.BigDecimal
**/
private static BigDecimal calculationLabor(List<TSalaryAccountItem> itemList, List<TSalaryAccountItem> itemHistoryList,
private BigDecimal calculationLabor(List<TSalaryAccountItem> itemList, List<TSalaryAccountItem> itemHistoryList,
List<TSalaryAccountItem> saiList, TSalaryAccount a) {
// B7 = 当月实发合计
// 税=ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
......@@ -1655,12 +1646,17 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal actualSalarySumT;
// 当月实发合计
BigDecimal actualSalarySum = BigDecimal.ZERO;
// 历史个税合计
BigDecimal sumTax = BigDecimal.ZERO;
// 个人承担部分历史个税合计
BigDecimal sumOtherTax;
BigDecimal sumOtherTax = BigDecimal.ZERO;
// 历史应发合计
BigDecimal sumSalaryTax = BigDecimal.ZERO;
List<TSalaryAccount> list = tSalaryAccountService.list(Wrappers.<TSalaryAccount>query().lambda()
.eq(TSalaryAccount::getEmpIdcard,a.getEmpIdcard())
.eq(TSalaryAccount::getFormType,CommonConstants.THREE_STRING)
.eq(TSalaryAccount::getSalaryMonth,a.getSalaryMonth())
.eq(TSalaryAccount::getDeleteFlag,CommonConstants.ZERO_INT));
// 本次实发
for (TSalaryAccountItem item : itemList) {
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
......@@ -1668,17 +1664,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
actualSalarySumNow = actualSalarySumNow.add(item.getSalaryMoney());
}
}
// 历史实发、个税
for (TSalaryAccountItem item : itemHistoryList) {
if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) {
sumTax = sumTax.add(item.getSalaryMoney());
}
if (SalaryConstants.RELAY_SALARY_JAVA.equals(item.getJavaFiedName())) {
sumSalaryTax = sumSalaryTax.add(item.getSalaryMoney());
}
if (SalaryConstants.ACTUAL_SALARY_SUM_JAVA.equals(item.getJavaFiedName())) {
actualSalarySum = actualSalarySum.add(item.getSalaryMoney());
}
for (TSalaryAccount account: list) {
sumOtherTax = sumOtherTax.add(BigDecimalUtils.safeAdd(account.getSalaryTax(),account.getSalaryTaxUnit()));
sumSalaryTax = sumSalaryTax.add(account.getRelaySalaryUnit());
actualSalarySum = actualSalarySum.add(account.getRelaySalary());
}
//个人承担部分税费
BigDecimal nowTaxT;
......@@ -1689,17 +1678,15 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 1个人承担部分
if (SalaryConstants.IS_PERSON_TAX_ARR[1].equals(a.getIsPersonTax())) {
nowTaxT = getNowTax(actualSalarySumNow);
if (actualSalarySum.compareTo(actualSalarySumNow) != 0) {
//计算历史税费
sumOtherTax = getNowTaxNew(sumSalaryTax);
//计算本月实发合计
if (sumSalaryTax.compareTo(BigDecimal.ZERO) != 0) {
//计算本月应发合计
actualSalarySumT = BigDecimalUtils.safeAdd(nowTaxT, sumSalaryTax, actualSalarySumNow).setScale(SalaryConstants.PLACES, RoundingMode.HALF_UP);
//累计税费
nowTaxY = getNowTaxNew(actualSalarySumT);
if (sumOtherTax.compareTo(BigDecimal.ZERO) != 0) {
nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumOtherTax).setScale(SalaryConstants.PLACES, RoundingMode.HALF_UP);
nowTaxY = BigDecimalUtils.safeSubtract(false,nowTaxY, sumOtherTax).setScale(SalaryConstants.PLACES, RoundingMode.HALF_UP);
}
salaryTax = BigDecimalUtils.safeSubtract(nowTaxY, nowTaxT);
salaryTax = BigDecimalUtils.safeSubtract(false,nowTaxY, nowTaxT);
} else {
nowTaxY = nowTaxT;
}
......@@ -1708,15 +1695,14 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
a.setSalaryTax(salaryTax);
a.setSalaryTaxUnit(nowTaxT);
a.setActualSalary(BigDecimalUtils.safeSubtract(actualSalarySumNow, salaryTax));
a.setActualSalary(BigDecimalUtils.safeSubtract(false,actualSalarySumNow, salaryTax));
} else if (SalaryConstants.IS_PERSON_TAX_ARR[0].equals(a.getIsPersonTax())) {
// 0公司承担全部
nowTaxY = getNowTax(actualSalarySum);
a.setActualSalary(actualSalarySumNow);
if (sumSalaryTax.compareTo(BigDecimal.ZERO) != 0) {
if (sumOtherTax.compareTo(BigDecimal.ZERO) != 0) {
//历史应发税费
sumOtherTax = getNowTax(sumSalaryTax);
nowTaxY = BigDecimalUtils.safeSubtract(nowTaxY, sumOtherTax).setScale(SalaryConstants.PLACES, RoundingMode.HALF_UP);
nowTaxY = BigDecimalUtils.safeSubtract(false,nowTaxY, sumOtherTax).setScale(SalaryConstants.PLACES, RoundingMode.HALF_UP);
}
a.setSalaryTaxUnit(nowTaxY);
relaySalary = BigDecimalUtils.safeAdd(actualSalarySumNow, nowTaxY).setScale(SalaryConstants.PLACES, RoundingMode.HALF_UP);
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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 java.util.Date;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
@Data
@TableName("t_ekp_change_dept_log")
@Schema(description = "EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)")
public class TEkpChangeDeptLog {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 创建人-EKP传过来的
*/
@ExcelAttribute(name = "创建人-EKP传过来的", maxLength = 50)
@Length(max = 50, message = "创建人-EKP传过来的不能超过50个字符")
@ExcelProperty("创建人-EKP传过来的")
@Schema(description = "创建人-EKP传过来的")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@ExcelProperty("创建时间")
@Schema(description = "创建时间")
private Date createTime;
/**
* 老项目名称
*/
@ExcelAttribute(name = "老项目名称", maxLength = 50)
@Length(max = 50, message = "老项目名称不能超过50个字符")
@ExcelProperty("老项目名称")
@Schema(description = "老项目名称")
private String preDeptName;
/**
* 老项目编码
*/
@ExcelAttribute(name = "老项目编码", maxLength = 32)
@Length(max = 32, message = "老项目编码不能超过32个字符")
@ExcelProperty("老项目编码")
@Schema(description = "老项目编码")
private String preDeptNo;
/**
* 新项目名称
*/
@ExcelAttribute(name = "新项目名称", maxLength = 50)
@Length(max = 50, message = "新项目名称不能超过50个字符")
@ExcelProperty("新项目名称")
@Schema(description = "新项目名称")
private String newDeptName;
/**
* 新项目编码
*/
@ExcelAttribute(name = "新项目编码", maxLength = 32)
@Length(max = 32, message = "新项目编码不能超过32个字符")
@ExcelProperty("新项目编码")
@Schema(description = "新项目编码")
private String newDeptNo;
/**
* 划转类型:类型1;类型2;类型3
*/
@ExcelAttribute(name = "划转类型:类型1;类型2;类型3", maxLength = 32)
@Length(max = 32, message = "划转类型:类型1;类型2;类型3不能超过32个字符")
@ExcelProperty("划转类型:类型1;类型2;类型3")
@Schema(description = "划转类型:类型1;类型2;类型3")
private String transferType;
/**
* 缴费库预估库id(社保)
*/
@ExcelAttribute(name = "缴费库预估库id(社保)", maxLength = 2000)
@Length(max = 2000, message = "缴费库预估库id(社保)不能超过2000个字符")
@ExcelProperty("缴费库预估库id(社保)")
@Schema(description = "缴费库预估库id(社保)")
private String socialId;
/**
* 缴费库预估库id(公积金)
*/
@ExcelAttribute(name = "缴费库预估库id(公积金)", maxLength = 2000)
@Length(max = 2000, message = "缴费库预估库id(公积金)不能超过2000个字符")
@ExcelProperty("缴费库预估库id(公积金)")
@Schema(description = "缴费库预估库id(公积金)")
private String fundId;
/**
* 收入id(管理费)
*/
@ExcelAttribute(name = "收入id(管理费)", maxLength = 2000)
@Length(max = 2000, message = "收入id(管理费)不能超过2000个字符")
@ExcelProperty("收入id(管理费)")
@Schema(description = "收入id(管理费)")
private String manageId;
/**
* 收入id(风险金)
*/
@ExcelAttribute(name = "收入id(风险金)", maxLength = 2000)
@Length(max = 2000, message = "收入id(风险金)不能超过2000个字符")
@ExcelProperty("收入id(风险金)")
@Schema(description = "收入id(风险金)")
private String riskId;
/**
* 商险id
*/
@ExcelAttribute(name = "商险id", maxLength = 2000)
@Length(max = 2000, message = "商险id不能超过2000个字符")
@ExcelProperty("商险id")
@Schema(description = "商险id")
private String insuranceId;
}
......@@ -185,12 +185,12 @@ public class TPaymentInfo extends BaseEntity {
private String socialCreateMonth;
/**
* 锁定状态 0 未锁定 1 锁定
* 确认无误状态 0 未确认 1 已确认
*/
@ExcelAttribute(name = "锁定状态 0 未锁定 1 锁定" )
@Schema(description ="锁定状态 0 未锁定 1 锁定")
@ExcelAttribute(name = "确认无误状态 0 未确认 1 已确认" )
@Schema(description ="确认无误状态 0 未确认 1 已确认")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("锁定状态 0 未锁定 1 锁定")
@ExcelProperty("确认无误状态 0 未确认 1 已确认")
private String lockStatus;
/**
......
......@@ -408,7 +408,7 @@ public class TPreDispatchInfo extends BaseEntity {
* 小合同名称
*/
@Schema(description ="小合同名称")
@ExcelAttribute(name = "小合同名称", maxLength = 50)
@ExcelAttribute(name = "小合同名称", maxLength = 100)
private String contractMinorName;
/**
......
package com.yifu.cloud.plus.v1.yifu.social.util;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.ReadConverterContext;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
/**
* @author hgw
* @description easyExcel金额转换类
* @date 2022-11-15 11:29:08
*/
public class BigDecimalConverter implements Converter<BigDecimal> {
@Override
public Class<BigDecimal> supportJavaTypeKey() {
return BigDecimal.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
/**
* 这里读的时候会调用
* @return
*/
@Override
public BigDecimal convertToJavaData(ReadConverterContext<?> context) {
BigDecimal value = context.getReadCellData().getNumberValue();
if (null == value) {
if (null != context.getReadCellData().getStringValue()) {
value = new BigDecimal(context.getReadCellData().getStringValue());
} else {
return null;
}
}
return value.setScale(2, BigDecimal.ROUND_HALF_UP);
}
@Override
public BigDecimal convertToJavaData(ReadCellData cellData, ExcelContentProperty contentProperty
, GlobalConfiguration globalConfiguration) {
return new BigDecimal(cellData.getStringValue()).round(new MathContext(10, RoundingMode.HALF_UP));
}
@Override
public WriteCellData<String> convertToExcelData(BigDecimal value, ExcelContentProperty contentProperty
,GlobalConfiguration globalConfiguration) {
return new WriteCellData<>(String.valueOf(value));
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 费用划转明细vo
* @author hgw
* @date 2022-11-16 10:35:30
*/
@Data
public class ChangeDeptDetailVo implements Serializable {
// id
private String id;
// 姓名
private String name;
// 身份证号
private String idCard;
// 订单类型
private String orderType;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 费用划转vo
* @author hgw
* @date 2022-11-16 10:35:30
*/
@Data
public class ChangeDeptVo implements Serializable {
// 申请人账号
private String creator;
// 划转前项目名称
private String preProjectname;
// 划转前项目编码
private String preProjectno;
// 划转前客户名称
private String preCustomername;
// 划转前客户编码
private String preCustomerno;
// 划转后项目名称
private String nowProjectname;
// 划转后项目编码
private String nowProjectno;
// 划转后客户名称
private String nowCustomername;
// 划转后客户编码
private String nowCustomerno;
// 划转类型:类型1;类型2;类型3
private String transferType;
// 社保明细
private List<ChangeDeptDetailVo> shebao;
// 公积金明细
private List<ChangeDeptDetailVo> gongjijin;
// 商险明细
private List<ChangeDeptDetailVo> shangxian;
// 管理费明细
private List<ChangeDeptDetailVo> guanlifei;
// 风险金明细
private List<ChangeDeptDetailVo> fenxianjin;
// 商险使用的项目信息
private TSettleDomainSelectVo dept;
}
......@@ -359,7 +359,7 @@ public class TPreDispatchReduceVo {
* 小合同名称
*/
@Schema(description ="小合同名称")
@ExcelAttribute(name = "小合同名称", maxLength = 50)
@ExcelAttribute(name = "小合同名称", maxLength = 100)
private String contractMinorName;
/**
......
......@@ -284,8 +284,8 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 小合同名称
*/
@Length(max = 50, message = "小合同名称不能超过50个字符")
@ExcelAttribute(name = "小合同名称", maxLength = 50)
@Length(max = 100, message = "小合同名称不能超过100个字符")
@ExcelAttribute(name = "小合同名称", maxLength = 100)
private String contractMinorName;
/**
* 唯一号
......
......@@ -171,12 +171,7 @@ public class SysBaseSetInfoController {
@PostMapping("/disableOrEnableById")
@PreAuthorize("@pms.hasPermission('social_sysbasesetinfo_enable')")
public R<Boolean> disableOrEnableById(@RequestParam String id, @RequestParam Integer status) {
SysBaseSetInfo baseSetInfo = sysBaseSetInfoService.getById(id);
if (null == baseSetInfo){
return R.failed("无对应ID的数据!");
}
baseSetInfo.setStatus(status);
return new R<>(sysBaseSetInfoService.updateById(baseSetInfo));
return sysBaseSetInfoService.updateByIdAsso(id,status);
}
}
......@@ -107,7 +107,7 @@ public class SysHouseHoldInfoController {
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_syshouseholdinfo_edit')" )
public R<Boolean> updateById(@RequestBody SysHouseHoldInfo sysHouseHoldInfo) {
return R.ok(sysHouseHoldInfoService.updateById(sysHouseHoldInfo));
return sysHouseHoldInfoService.updateByIdAsso(sysHouseHoldInfo);
}
/**
......
......@@ -384,17 +384,16 @@ public class TDispatchInfoController {
@Operation(description = "派单申请批量审核,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyAudit') auditStatus:1审核通过 2审核不通过")
@PostMapping("/addApplyAudit")
//@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')")
public R<List<ErrorMessage>> addApplyAudit(@RequestParam(name = "ids", required = true) String ids,
public R<List<ErrorMessage>> addApplyAudit(@RequestBody List<String> idList,
@RequestParam(name = "auditStatus", required = true) String auditStatus,
@RequestParam(name = "auditRemark", required = false) String auditRemark,
@RequestParam(name = "remark", required = false) String remark) {
return tDispatchInfoService.addApplyAudit(ids,auditStatus,auditRemark,remark);
return tDispatchInfoService.addApplyAudit(idList,auditStatus,auditRemark,remark);
}
/**
* 派单申请办理
* hgw社保办理
* @param ids
* @param handleStatus 1 办理成功 2 办理失败
* @param handleRemark
* @param typeSub 0 社保 1 公积金
......@@ -406,13 +405,13 @@ public class TDispatchInfoController {
@Operation(description = "派单批量办理,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyHandle') handleStatus 1 办理成功 2 办理失败")
@PostMapping("/addApplyHandle")
//@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyHandle')")
public R<List<ErrorMessage>> addApplyHandle(@RequestParam(name = "ids", required = true) String ids,
public R<List<ErrorMessage>> addApplyHandle(@RequestBody List<String> idList,
@RequestParam(name = "typeSub", required = true) String typeSub,
@RequestParam(name = "handleStatus", required = true) String handleStatus,
@RequestParam(name = "handleRemark", required = false) String handleRemark,
@RequestParam(name = "socialType", required = false) String socialType,
@RequestParam(name = "remark", required = false) String remark) {
return tDispatchInfoService.addApplyHandle(ids,typeSub,handleStatus,handleRemark,socialType,remark);
return tDispatchInfoService.addApplyHandle(idList,typeSub,handleStatus,handleRemark,socialType,remark);
}
/**
......
......@@ -29,14 +29,13 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -54,7 +53,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/tpaymentinfo" )
@Tag(name = "缴费库管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TPaymentInfoController {
private final TPaymentInfoService tPaymentInfoService;
......@@ -408,4 +406,16 @@ public class TPaymentInfoController {
tPaymentInfoService.pushPaymentSocialFundInfo();
return R.ok(null,"需要推送请联系系统管理员");
}
/**
* 费用划转,EKP通知MVP跟着一起划转
* @author hgw
* @return R
*/
@Operation(summary = "费用划转--EKP调用接口", description = "费用划转--EKP调用接口")
@SysLog("费用划转--EKP调用接口")
@PostMapping("/changeDeptByEkp")
public R<String> changeDeptByEkp(@RequestBody ChangeDeptVo changeDeptVo) {
return tPaymentInfoService.changeDeptByEkp(changeDeptVo);
}
}
......@@ -215,8 +215,8 @@ public class TPreDispatchInfoController {
@Operation(summary = "一键派单:按创建人查找正常未派单的数据", description = "一键派单:按创建人查找正常未派单的数据")
@PostMapping("/oneKeyToDispatch")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_dispatch')")
public R oneKeyToDispatch(@RequestParam String idStr) {
return tPreDispatchInfoService.oneKeyToDispatch(idStr);
public R oneKeyToDispatch(@RequestBody List<String> idList) {
return tPreDispatchInfoService.oneKeyToDispatch(idList);
}
/**
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog;
import org.apache.ibatis.annotations.Mapper;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
@Mapper
public interface TEkpChangeDeptLogMapper extends BaseMapper<TEkpChangeDeptLog> {
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
......@@ -28,6 +29,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 预估费用
......@@ -77,4 +79,16 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
* @return
**/
int updatePushStatus(@Param("idList") List<String> idList);
int checkForecastChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
* @Description: 修改缴费库
* @Author: hgw
* @Date: 2022-11-16 17:51:41
* @return: int
**/
int changeForecastDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
......@@ -27,6 +28,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 收入明细表
......@@ -71,4 +73,24 @@ public interface TIncomeMapper extends BaseMapper<TIncome> {
**/
int deleteIncomeDetailByApplyNo(@Param("applyNo") String applyNo);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-收入
* @Author: hgw
* @Date: 2022/11/17 9:43
* @return: int
**/
int changeIncomeDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-明细
* @Author: hgw
* @Date: 2022/11/17 9:43
* @return: int
**/
int changeIncomeDetailDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
}
......@@ -20,9 +20,11 @@ package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
......@@ -30,6 +32,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 缴费库
......@@ -143,4 +146,22 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
int updatePushStatus(@Param("idList") List<String> idList);
/**
* @param idSet
* @Description: 校验缴费库是否有已结算的数据,有,则不允许ekp费用划转
* @Author: hgw
* @Date: 2022/11/16 17:32
* @return: int
**/
int checkPaymentChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
* @Description: 修改缴费库
* @Author: hgw
* @Date: 2022-11-16 17:51:41
* @return: int
**/
int changePaymentDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
}
......@@ -67,4 +67,5 @@ public interface SysBaseSetInfoService extends IService<SysBaseSetInfo> {
**/
Map<String, SysBaseSetInfo> getSysBaseSetInfoMap(String baseType);
R<Boolean> updateByIdAsso(String id,int status);
}
......@@ -44,4 +44,6 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
* @return R
*/
R<Boolean> saveInfo (SysHouseHoldInfo sysHouseHoldInfo);
R<Boolean> updateByIdAsso(SysHouseHoldInfo sysHouseHoldInfo);
}
......@@ -74,9 +74,9 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
List<ErrorMessage> addBatchApplyAudit(List<String> idsList, YifuUser user, int flag, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyAudit(String ids, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyAudit(List<String> ids, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyHandle(String ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark);
R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
public interface TEkpChangeDeptLogService extends IService<TEkpChangeDeptLog> {
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.social.entity.TIncome;
......@@ -29,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Set;
/**
* 收入明细表
......@@ -76,4 +78,14 @@ public interface TIncomeService extends IService<TIncome> {
**/
void deleteIncomeAndDetailByApplyNo(String applyNo);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-收入
* @Author: hgw
* @Date: 2022/11/17 9:42
* @return: void
**/
void changeIncomeAndDetailDept(Set<String> idSet, TSettleDomainSelectVo dept);
}
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
......@@ -149,4 +150,13 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
void pushPaymentSocialFundInfo();
/**
* @param changeDeptVo
* @Description: 费用划转-ekp同步hro
* @Author: hgw
* @Date: 2022/11/16 10:38
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo);
}
......@@ -88,8 +88,9 @@ public interface TPreDispatchInfoService extends IService<TPreDispatchInfo> {
* @Author huyc
* @Date 2022-07-18
* @return
**/
R oneKeyToDispatch(String idStr);
*
* @param idStr*/
R oneKeyToDispatch(List<String> idStr);
/**
* 修改预派单记录
......
......@@ -27,8 +27,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysPayProportion;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
......@@ -55,8 +57,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
private final SysPayProportionService sysPayProportionService;
private final TForecastLibraryService tForecastLibraryService;
private final SysHouseHoldInfoMapper sysHouseHoldInfoMapper;
/**
* 基数设置表简单分页查询
*
......@@ -267,4 +268,25 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
}
return setInfoMap;
}
@Override
public R<Boolean> updateByIdAsso(String id ,int status) {
SysBaseSetInfo baseSetInfo = baseMapper.selectById(id);
if (null == baseSetInfo){
return R.failed("无对应ID的数据!");
}
if (CommonConstants.ZERO_INT == status){
SysHouseHoldInfo holdInfo = sysHouseHoldInfoMapper.selectById(baseSetInfo.getDepartId());
if (Common.isNotNull(holdInfo) && CommonConstants.ONE_STRING.equals(holdInfo.getDelFlag())){
return R.failed("对应户已禁用,禁止启用基数!");
}
}
baseSetInfo.setStatus(status);
int res = baseMapper.updateById(baseSetInfo);
if (res >= 0){
return R.ok();
}else {
return R.failed(CommonConstants.RESULT_DATA_FAIL);
}
}
}
......@@ -21,8 +21,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import lombok.RequiredArgsConstructor;
......@@ -37,6 +41,8 @@ import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMapper, SysHouseHoldInfo> implements SysHouseHoldInfoService {
private final SysBaseSetInfoMapper baseSetInfoMapper;
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
......@@ -65,5 +71,37 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
baseMapper.insert(sysHouseHoldInfo);
return R.ok();
}
/**
* @Author fxj
* @Description 修改社保户公积金户数据
* @Date 16:08 2022/11/14
**/
@Override
public R<Boolean> updateByIdAsso(SysHouseHoldInfo hold) {
if (Common.isEmpty(hold.getId())){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
SysHouseHoldInfo holdInfo = baseMapper.selectById(hold.getId());
if (Common.isEmpty(holdInfo)){
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
if (CommonConstants.ONE_STRING.equals(hold.getDelFlag())
&& baseSetInfoMapper.selectCount(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, holdInfo.getType())
.le(SysBaseSetInfo::getApplyStartDate, DateUtil.getCurrentDateTime())
.in(SysBaseSetInfo::getDepartId,holdInfo.getId())
.eq(SysBaseSetInfo::getStatus,CommonConstants.ZERO_STRING)
.eq(SysBaseSetInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.and(obj-> obj.isNull(SysBaseSetInfo::getApplyEndDate).or()
.ge(SysBaseSetInfo::getApplyEndDate,DateUtil.getCurrentDateTime()))) > CommonConstants.ZERO_INT){
return R.failed("户下存在可用基数配置,请禁用可用基数配置后禁用户配置!");
}
int res = baseMapper.updateById(hold);
if (res >= 0){
return R.ok();
}else {
return R.failed(CommonConstants.SAVE_FAILED);
}
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TEkpChangeDeptLogMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
@Log4j2
@Service
public class TEkpChangeDeptLogServiceImpl extends ServiceImpl<TEkpChangeDeptLogMapper, TEkpChangeDeptLog> implements TEkpChangeDeptLogService {
}
......@@ -28,6 +28,7 @@ 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.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
......@@ -48,6 +49,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
......@@ -1059,4 +1061,17 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
baseMapper.deleteIncomeDetailByApplyNo(applyNo);
}
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-收入
* @Author: hgw
* @Date: 2022/11/17 9:42
* @return: void
**/
public void changeIncomeAndDetailDept(Set<String> idSet, TSettleDomainSelectVo dept) {
baseMapper.changeIncomeDept(idSet, dept);
baseMapper.changeIncomeDetailDept(idSet, dept);
}
}
......@@ -39,6 +39,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
......@@ -53,13 +54,11 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -130,6 +129,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
private TSendEkpErrorService tSendEkpErrorService;
@Autowired
private TForecastLibraryMapper tForecastLibraryMapper;
@Autowired
private InsuranceDaprUtil insuranceDaprUtil;
@Autowired
private TEkpChangeDeptLogService tEkpChangeDeptLogService;
/**
* 缴费库简单分页查询
*
......@@ -756,7 +764,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
} else {
if (rowNumber >= 100) {
......@@ -765,7 +772,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
}
redisUtil.set(importSuccessKey, maerialRatio, 360L);
......@@ -1890,7 +1896,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
} else {
if (rowNumber >= 100) {
......@@ -1899,7 +1904,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.set(sumNumKey, bfInt, 360L);
} else {
maerialRatio = "100";
redisUtil.remove(sumNumKey);
}
}
redisUtil.set(importSuccessKey, maerialRatio, 360L);
......@@ -3266,4 +3270,128 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
sb.insert(4, "-");
return sb.toString();
}
/**
* @param changeDeptVo 变更主体数据
* @Description: 费用划转-ekp同步hro
* @Author: hgw
* @Date: 2022/11/16 10:39
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo) {
// 获取项目信息:
TSettleDomainSelectVo dept = archivesDaprUtil.selectDeptByNo(changeDeptVo.getNowProjectno());
if (dept != null && dept.getId() != null) {
changeDeptVo.setDept(dept);
// 变更数据的主键id
Set<String> idSet;
// 存储日志使用的
StringBuilder socialId = new StringBuilder();
StringBuilder fundId = new StringBuilder();
StringBuilder manageId = new StringBuilder();
StringBuilder riskId = new StringBuilder();
StringBuilder insuranceId = new StringBuilder();
// 如果选择了社保公积金信息要划转,则校验。
// 否则跳过这一步,直接划转
if ((changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty())
|| (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty())) {
idSet = new HashSet<>();
if (changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getShebao()) {
idSet.add(vo.getId());
socialId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getGongjijin()) {
idSet.add(vo.getId());
fundId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (!idSet.isEmpty()) {
// 查询是否允许划转缴费库、预估库 的 社保、公积金
boolean flag = this.checkChange(idSet);
if (!flag) {
return R.failed("社保公积金已被结算,请先退回并删除工资表!");
}
// 1划转缴费率、预估库的项目(社保公积金)
baseMapper.changePaymentDept(idSet, dept);
tForecastLibraryMapper.changeForecastDept(idSet, dept);
}
}
// 2划转管理费、风险金
if ((changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty())
|| (changeDeptVo.getFenxianjin() != null && !changeDeptVo.getFenxianjin().isEmpty())) {
idSet = new HashSet<>();
if (changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getGuanlifei()) {
idSet.add(vo.getId());
manageId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (changeDeptVo.getFenxianjin() != null && !changeDeptVo.getFenxianjin().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getFenxianjin()) {
idSet.add(vo.getId());
riskId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (!idSet.isEmpty()) {
incomeService.changeIncomeAndDetailDept(idSet, dept);
}
}
// 3划转商险
if (changeDeptVo.getShangxian() != null && !changeDeptVo.getShangxian().isEmpty()) {
idSet = new HashSet<>();
for (ChangeDeptDetailVo vo : changeDeptVo.getShangxian()) {
idSet.add(vo.getId());
insuranceId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
if (!idSet.isEmpty()) {
insuranceDaprUtil.ekpUpdateInsuranceDept(changeDeptVo);
}
}
// 4 记录日志
TEkpChangeDeptLog log = new TEkpChangeDeptLog();
log.setCreateName(changeDeptVo.getCreator());
log.setCreateTime(new Date());
log.setPreDeptName(changeDeptVo.getPreProjectname());
log.setPreDeptNo(changeDeptVo.getPreProjectno());
log.setNewDeptName(changeDeptVo.getNowProjectname());
log.setNewDeptNo(changeDeptVo.getNowProjectno());
log.setTransferType(changeDeptVo.getTransferType());
log.setSocialId(socialId.toString());
log.setFundId(fundId.toString());
log.setManageId(manageId.toString());
log.setRiskId(riskId.toString());
log.setInsuranceId(insuranceId.toString());
// 4记录费用划转日志
tEkpChangeDeptLogService.save(log);
return R.ok();
} else {
return R.failed("根据新编码未获取到项目信息");
}
}
/**
* @param idSet
* @Description: 校验是否存在已结算薪资的数据
* @Author: hgw
* @Date: 2022/11/16 17:30
* @return: boolean
**/
private boolean checkChange(Set<String> idSet) {
int settleCount = baseMapper.checkPaymentChange(idSet);
if (settleCount == 0) {
settleCount = tForecastLibraryMapper.checkForecastChange(idSet);
return settleCount == 0;
} else {
return false;
}
}
}
......@@ -505,13 +505,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/**
* 一键派单
* @param idStr
* @return
* @Author huyc
* @Date 2022-07-18
**/
@Override
public R oneKeyToDispatch(String idStr) {
public R oneKeyToDispatch(List<String> idList) {
YifuUser user = SecurityUtils.getUser();
if (null == user || null == user.getId()) {
return R.failed(CommonConstants.USER_FAIL);
......@@ -535,7 +534,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
initSettleDomainMaps(settleDomainR, settleDomainNameMap, customerNameMap, settleIdAndCustomerIdMap);
// 获取当前创建人 截止到当前时间的 正常未派单 未删除的预派单数据
List<TPreDispatchInfo> preList;
if (Common.isEmpty(idStr)) {
if (Common.isEmpty(idList)) {
preList = baseMapper.selectList(Wrappers.<TPreDispatchInfo>query().lambda()
.eq(TPreDispatchInfo::getCreateBy, user.getId())
.le(TPreDispatchInfo::getCreateTime, LocalDateTime.now())
......@@ -543,7 +542,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
.eq(TPreDispatchInfo::getDispatchFlag, CommonConstants.ZERO_STRING)
.eq(TPreDispatchInfo::getPreStatus, CommonConstants.ZERO_STRING));
} else {
List<String> idList = Common.initStrToList(idStr, ",");
preList = baseMapper.selectList(Wrappers.<TPreDispatchInfo>query().lambda()
.in(TPreDispatchInfo::getId, idList)
.eq(TPreDispatchInfo::getCreateBy, user.getId())
......
......@@ -105,32 +105,60 @@
</resultMap>
<!-- 派单导出vo -->
<resultMap id="exportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo">
<id property="id" column="ID"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="empNo" column="EMP_NO"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empType" column="EMP_TYPE"/>
<result property="typeSub" column="TYPE_SUB"/>
<result property="belongUnitName" column="BELONG_UNIT_NAME"/>
<result property="settleDomainName" column="SETTLE_DOMAIN_NAME"/>
<result property="settleDomainCode" column="SETTLE_DOMAIN_CODE"/>
<result property="type" column="TYPE"/>
<result property="dispatchItem" column="DISPATCH_ITEM"/>
<result property="socialHouseholdName" column="SOCIAL_HOUSEHOLD_NAME"/>
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="status" column="STATUS"/>
<result property="socialHandleStatus" column="SOCIAL_HANDLE_STATUS"/>
<result property="pensionHandle" column="PENSION_HANDLE"/>
<result property="medicalHandle" column="MEDICAL_HANDLE"/>
<result property="unemployHandle" column="UNEMPLOY_HANDLE"/>
<result property="workInjuryHandle" column="WORK_INJURY_HANDLE"/>
<result property="birthHandle" column="BIRTH_HANDLE"/>
<result property="fundReduceDate" column="FUND_REDUCE_DATE"/>
<result property="bigailmentHandle" column="BIGAILMENT_HANDLE"/>
<result property="fundHandleStatus" column="FUND_HANDLE_STATUS"/>
<result property="createName" column="CREATE_NAME"/>
<result property="organName" column="ORGAN_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="contractType" column="CONTRACT_TYPE"/>
<result property="contractSubName" column="CONTRACT_SUB_NAME"/>
<result property="contractTerm" column="CONTRACT_TERM"/>
<result property="contractStart" column="CONTRACT_START"/>
<result property="contractEnd" column="CONTRACT_END"/>
<result property="auditUserName" column="AUDIT_USER_NAME"/>
<result property="auditRemark" column="AUDIT_REMARK"/>
<result property="trustRemark" column="TRUST_REMARK"/>
<result property="leaveDate" column="LEAVE_DATE"/>
<result property="reduceReason" column="REDUCE_REASON"/>
<result property="status" column="STATUS"/>
<result property="auditUser" column="AUDIT_USER"/>
<result property="auditTime" column="AUDIT_TIME"/>
<result property="fundHandleRemark" column="FUND_HANDLE_REMARK"/>
<result property="socialHandleRemark" column="SOCIAL_HANDLE_REMARK"/>
<result property="providentStart" column="PROVIDENT_START"/>
<result property="fundAuditStatus" column="FUND_AUDIT_STATUS"/>
<result property="fundAuditUser" column="FUND_AUDIT_USER"/>
<result property="fundHandleUser" column="FUND_HANDLE_USER"/>
<result property="fundHandleTime" column="FUND_HANDLE_TIME"/>
<result property="auditStatus" column="AUDIT_STATUS"/>
<result property="socialStartDate" column="SOCIAL_START_DATE"/>
<result property="socialReduceDate" column="SOCIAL_REDUCE_DATE"/>
<result property="recordBase" column="RECORD_BASE"/>
<result property="handleUser" column="HANDLE_USER"/>
<result property="handleTime" column="HANDLE_TIME"/>
<result property="unitPensionCardinal" column="UNIT_PENSION_CARDINAL"/>
<result property="unitMedicalCardinal" column="UNIT_MEDICAL_CARDINAL"/>
<result property="unitUnemploymentCardinal" column="UNIT_UNEMPLOYMENT_CARDINAL"/>
<result property="unitBigailmentCardinal" column="UNIT_BIGAILMENT_CARDINAL"/>
<result property="unitWorkInjuryCardinal" column="UNIT_WORK_INJURY_CARDINAL"/>
<result property="unitBirthCardinal" column="UNIT_BIRTH_CARDINAL"/>
</resultMap>
<resultMap id="fundSupplementaryMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo">
......@@ -546,7 +574,6 @@
1=1
<include refid="tDispatchInfo_where"/>
</where>
order by a.APPLY_NO desc
</select>
......@@ -568,34 +595,61 @@
<!-- 派单导出 -->
<select id="exportDispatch" resultMap="exportMap">
select
a.ID,
a.APPLY_NO,
a.EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
a.TYPE_SUB,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SETTLE_DOMAIN_CODE,
a.TYPE,
a.DISPATCH_ITEM,
a.SOCIAL_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD_NAME,
a.STATUS,
a.SOCIAL_HANDLE_STATUS,
s.PENSION_HANDLE,
s.MEDICAL_HANDLE,
s.UNEMPLOY_HANDLE,
s.WORK_INJURY_HANDLE,
s.BIRTH_HANDLE,
s.BIGAILMENT_HANDLE,
IF(a.TYPE='0',s.PENSION_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as PENSION_HANDLE,
IF(a.TYPE='0',s.MEDICAL_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as MEDICAL_HANDLE,
IF(a.TYPE='0',s.UNEMPLOY_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as UNEMPLOY_HANDLE,
IF(a.TYPE='0',s.WORK_INJURY_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as WORK_INJURY_HANDLE,
IF(a.TYPE='0',s.BIRTH_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as BIRTH_HANDLE,
IF(a.TYPE='0',s.BIGAILMENT_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as BIGAILMENT_HANDLE,
a.FUND_HANDLE_STATUS,
a.CREATE_NAME,
a.ORGAN_NAME,
a.CREATE_TIME
a.CREATE_TIME,
a.CONTRACT_NAME AS CONTRACT_TYPE,
a.CONTRACT_SUB_NAME,
a.CONTRACT_TERM,
a.CONTRACT_START,
a.CONTRACT_END,
a.AUDIT_REMARK,
a.TRUST_REMARK,
a.LEAVE_DATE,
a.REDUCE_REASON,
a.STATUS,
a.AUDIT_USER_NAME as AUDIT_USER,
a.AUDIT_TIME,
a.FUND_HANDLE_REMARK,
a.SOCIAL_HANDLE_REMARK,
a.FUND_REDUCE_DATE,
c.PROVIDENT_START,
if(a.FUND_ID = NULL,'',a.STATUS) as FUND_AUDIT_STATUS,
c.AUDIT_USER as FUND_AUDIT_USER,
c.HANDLE_USER as FUND_HANDLE_USER,
c.HANDLE_TIME as FUND_HANDLE_TIME,
s.AUDIT_USER as AUDIT_USER_NAME,
if(a.SOCIAL_ID =NULL,'',a.STATUS) as AUDIT_STATUS,
s.SOCIAL_START_DATE,
a.SOCIAL_REDUCE_DATE,
s.RECORD_BASE,
s.HANDLE_USER,
s.HANDLE_TIME,
s.UNIT_PENSION_CARDINAL,
s.UNIT_MEDICAL_CARDINAL,
s.UNIT_UNEMPLOYMENT_CARDINAL,
s.UNIT_BIGAILMENT_CARDINAL,
s.UNIT_WORK_INJURY_CARDINAL,
s.UNIT_BIRTH_CARDINAL
from t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund c on c.id=a.FUND_ID
<where>
a.DELETE_FLAG = '0'
<include refid="tDispatchInfo_where"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.TEkpChangeDeptLogMapper">
<resultMap id="tEkpChangeDeptLogMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog">
<id property="id" column="ID"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="preDeptName" column="PRE_DEPT_NAME"/>
<result property="preDeptNo" column="PRE_DEPT_NO"/>
<result property="newDeptName" column="NEW_DEPT_NAME"/>
<result property="newDeptNo" column="NEW_DEPT_NO"/>
<result property="transferType" column="TRANSFER_TYPE"/>
<result property="socialId" column="SOCIAL_ID"/>
<result property="fundId" column="FUND_ID"/>
<result property="manageId" column="MANAGE_ID"/>
<result property="riskId" column="RISK_ID"/>
<result property="insuranceId" column="INSURANCE_ID"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.CREATE_NAME,
a.CREATE_TIME,
a.PRE_DEPT_NAME,
a.PRE_DEPT_NO,
a.NEW_DEPT_NAME,
a.NEW_DEPT_NO,
a.TRANSFER_TYPE,
a.SOCIAL_ID,
a.FUND_ID,
a.MANAGE_ID,
a.RISK_ID,
a.INSURANCE_ID
</sql>
<sql id="tEkpChangeDeptLog_where">
<if test="tEkpChangeDeptLog != null">
<if test="tEkpChangeDeptLog.id != null and tEkpChangeDeptLog.id.trim() != ''">
AND a.ID = #{tEkpChangeDeptLog.id}
</if>
<if test="tEkpChangeDeptLog.createName != null and tEkpChangeDeptLog.createName.trim() != ''">
AND a.CREATE_NAME = #{tEkpChangeDeptLog.createName}
</if>
<if test="tEkpChangeDeptLog.createTime != null">
AND a.CREATE_TIME = #{tEkpChangeDeptLog.createTime}
</if>
<if test="tEkpChangeDeptLog.preDeptName != null and tEkpChangeDeptLog.preDeptName.trim() != ''">
AND a.PRE_DEPT_NAME = #{tEkpChangeDeptLog.preDeptName}
</if>
<if test="tEkpChangeDeptLog.preDeptNo != null and tEkpChangeDeptLog.preDeptNo.trim() != ''">
AND a.PRE_DEPT_NO = #{tEkpChangeDeptLog.preDeptNo}
</if>
<if test="tEkpChangeDeptLog.newDeptName != null and tEkpChangeDeptLog.newDeptName.trim() != ''">
AND a.NEW_DEPT_NAME = #{tEkpChangeDeptLog.newDeptName}
</if>
<if test="tEkpChangeDeptLog.newDeptNo != null and tEkpChangeDeptLog.newDeptNo.trim() != ''">
AND a.NEW_DEPT_NO = #{tEkpChangeDeptLog.newDeptNo}
</if>
<if test="tEkpChangeDeptLog.transferType != null and tEkpChangeDeptLog.transferType.trim() != ''">
AND a.TRANSFER_TYPE = #{tEkpChangeDeptLog.transferType}
</if>
<if test="tEkpChangeDeptLog.socialId != null and tEkpChangeDeptLog.socialId.trim() != ''">
AND a.SOCIAL_ID = #{tEkpChangeDeptLog.socialId}
</if>
<if test="tEkpChangeDeptLog.fundId != null and tEkpChangeDeptLog.fundId.trim() != ''">
AND a.FUND_ID = #{tEkpChangeDeptLog.fundId}
</if>
<if test="tEkpChangeDeptLog.manageId != null and tEkpChangeDeptLog.manageId.trim() != ''">
AND a.MANAGE_ID = #{tEkpChangeDeptLog.manageId}
</if>
<if test="tEkpChangeDeptLog.riskId != null and tEkpChangeDeptLog.riskId.trim() != ''">
AND a.RISK_ID = #{tEkpChangeDeptLog.riskId}
</if>
<if test="tEkpChangeDeptLog.insuranceId != null and tEkpChangeDeptLog.insuranceId.trim() != ''">
AND a.INSURANCE_ID = #{tEkpChangeDeptLog.insuranceId}
</if>
</if>
</sql>
</mapper>
......@@ -689,4 +689,27 @@
</foreach>
</update>
<!-- 校验预估库库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkForecastChange" resultType="java.lang.Integer">
select count(1) from t_forecast_library p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!-- ekp费用划转 -->
<update id="changeForecastDept">
update t_forecast_library p
set p.SETTLE_DOMAIN_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
......@@ -268,4 +268,35 @@
<delete id="deleteIncomeDetailByApplyNo">
delete from t_income where APPLY_NO = #{applyNo}
</delete>
<!-- ekp费用划转-收入 -->
<update id="changeIncomeDept">
update t_income p
set p.DEPT_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.UNIT_NO = #{dept.customerCode}
where p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<!-- ekp费用划转-明细 -->
<update id="changeIncomeDetailDept">
update t_income_detail p
set p.DEPT_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.UNIT_NO = #{dept.customerCode}
where p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
......@@ -118,12 +118,6 @@
<result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
<result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/>
<result property="providentPayAddr" column="PROVIDENT_PAY_ADDR"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="socialSum" column="SOCIAL_SUM"/>
<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
<result property="socialSecurityPersonalSum" column="SOCIAL_SECURITY_PERSONAL_SUM"/>
......@@ -604,9 +598,6 @@
<result property="personalMedicalMoney" column="PERSONAL_MEDICAL_MONEY"/>
<result property="personalUnemploymentMoney" column="PERSONAL_UNEMPLOYMENT_MONEY"/>
<result property="personalBigmailmentMoney" column="PERSONAL_BIGMAILMENT_MONEY"/>
<result property="socialSum" column="SOCIAL_SUM"/>
<result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
<result property="socialSecurityPersonalSum" column="SOCIAL_SECURITY_PERSONAL_SUM"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
......@@ -622,7 +613,6 @@
<result property="unitProvidentSum" column="UNIT_PROVIDENT_SUM"/>
<result property="personalProidentSet" column="PERSONAL_PROIDENT_SET"/>
<result property="personalProvidentSum" column="PERSONAL_PROVIDENT_SUM"/>
<result property="providentSum" column="PROVIDENT_SUM"/>
<result property="fundProvince" column="FUND_PROVINCE"/>
<result property="fundCity" column="FUND_CITY"/>
<result property="fundTown" column="FUND_TOWN"/>
......@@ -663,9 +653,52 @@
</select>
<!--tPaymentInfo不分页查询-->
<select id="getTPaymentInfoNoPage" resultMap="tPaymentInfoMap">
<select id="getTPaymentInfoNoPage" resultMap="tPaymentInfoMap" resultType="com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo">
SELECT
<include refid="Base_Column_List"/>
a.EMP_NAME,
a.EMP_NO,
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_SECURITY_NO,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
a.SUM_ALL,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
a.PROVIDENT_HOUSEHOLD,
a.SOCIAL_SUM,
a.UNIT_SOCIAL_SUM,
a.SOCIAL_PAY_ADDR,
a.SOCIAL_SECURITY_PERSONAL_SUM,
a.PROVIDENT_SUM,
a.INAUGURAL_TEAM,
a.COMPANY_ACCRUAL,
a.PERSONAL_ACCRUAL,
a.UNIT_PENSION_SET,
a.UNIT_MEDICAL_SET,
a.UNIT_UNEMPLOYMENT_SET,
a.UNIT_INJURY_SET,
a.UNIT_BIRTH_SET,
a.PROVIDENT_PAY_ADDR,
a.UNIT_PENSION_MONEY,
a.UNIT_MEDICAL_MONEY,
a.UNIT_UNEMPLOYMENT_MONEY,
a.UNIT_INJURY_MONEY,
a.UNIT_BIRTH_MONEY,
a.UNIT_BIGMAILMENT_MONEY,
a.PERSONAL_PENSION_MONEY,
a.PERSONAL_MEDICAL_MONEY,
a.PERSONAL_UNEMPLOYMENT_MONEY,
a.PERSONAL_BIGMAILMENT_MONEY,
a.PROVIDENT_NO,
a.UNIT_PROVIDENT_SET,
a.PROVIDENT_PERCENT,
a.UNIT_PROVIDENT_SUM,
a.PERSONAL_PROIDENT_SET,
a.PERSONAL_PROVIDENT_SUM,
a.CREATE_TIME
FROM t_payment_info a
<where>
1=1
......@@ -707,12 +740,6 @@
MAX( w.PROVIDENT_CREATE_MONTH ) AS PROVIDENT_CREATE_MONTH,
MAX( w.PROVIDENT_HOUSEHOLD ) AS PROVIDENT_HOUSEHOLD,
MAX( w.PROVIDENT_PAY_ADDR ) AS PROVIDENT_PAY_ADDR,
MAX( w.FUND_PROVINCE ) AS FUND_PROVINCE,
MAX( w.FUND_CITY ) AS FUND_CITY,
MAX( w.FUND_TOWN ) AS FUND_TOWN,
w.SOCIAL_PROVINCE,
w.SOCIAL_CITY,
w.SOCIAL_TOWN,
w.SOCIAL_SUM,
w.UNIT_SOCIAL_SUM,
w.SOCIAL_SECURITY_PERSONAL_SUM,
......@@ -764,12 +791,6 @@
a.PROVIDENT_CREATE_MONTH,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
SUM( a.SOCIAL_SUM ) AS SOCIAL_SUM,
SUM( a.UNIT_SOCIAL_SUM ) AS UNIT_SOCIAL_SUM,
SUM( a.SOCIAL_SECURITY_PERSONAL_SUM ) AS SOCIAL_SECURITY_PERSONAL_SUM,
......@@ -828,12 +849,6 @@
a.PROVIDENT_CREATE_MONTH,
a.PROVIDENT_HOUSEHOLD,
a.PROVIDENT_PAY_ADDR,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.SOCIAL_SUM,
a.UNIT_SOCIAL_SUM,
a.SOCIAL_SECURITY_PERSONAL_SUM,
......@@ -1150,4 +1165,28 @@
</foreach>
</update>
<!-- 校验缴费库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkPaymentChange" resultType="java.lang.Integer">
select count(1) from t_payment_info p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!-- ekp费用划转-->
<update id="changePaymentDept">
update t_payment_info p
set
p.SETTLE_DOMAIN_ID = #{dept.id}
,p.SETTLE_DOMAIN_NAME = #{dept.departName}
,p.SETTLE_DOMAIN_CODE = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</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