Commit 971f71e9 authored by huyuchen's avatar huyuchen

Merge branch 'develop'

# Conflicts:
#	yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
parents e7d14807 47988d23
......@@ -44,7 +44,7 @@ public class EmpProjectDispatchVo implements Serializable {
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull(message = "员工类型不能为空")
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 2,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
private String empNatrue;
......
......@@ -22,7 +22,6 @@ 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 javax.validation.constraints.Past;
......@@ -38,7 +37,7 @@ import java.util.List;
*/
@Data
@ColumnWidth(15)
public class EmployeeProjectExportVO extends BaseEntity {
public class EmployeeProjectExportVO {
private static final long serialVersionUID = 1L;
......
......@@ -47,7 +47,7 @@ public class EmployeeProjectUpdateVO extends RowIndex implements Serializable {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
@ExcelAttribute(name = "员工类型",maxLength = 2,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelAttribute(name = "员工类型",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
private String empNatrue;
/**
......
......@@ -46,7 +46,7 @@ public class EmployeeProjectVO extends RowIndex implements Serializable {
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull(message = "员工类型不能为空")
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 2,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
private String empNatrue;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Date 2022-10-21 09:50:08
* @Description 通用Vo
* @Version 1.0
*/
@Data
public class IdNameNoVo implements Serializable {
private String id;
private String name;
private String no;
}
......@@ -19,6 +19,7 @@ public class EmployeeConstants {
public static final String CONTACT_ADDRESS = "通信地址必填!";
public static final String EMP_NATRUE_ZERO = "派遣";
public static final String EMP_NATRUE_ONE = "外包";
public static final String EMP_NATRUE_THREE = "内部员工";
public static final String HIGN_EDUCATION = "最高学历必填";
public static final String SCHOOL = "学校必填";
public static final String MAJOR = "专业必填";
......
......@@ -125,8 +125,9 @@ public class TEmpChangeInfoController {
*/
@Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page,String departName) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName));
public R<IPage<TSettleDomain>> getItemNamePage(Page page,@RequestParam(required = false) String departName
, @RequestParam(required = false) String customerId) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, customerId));
}
/**
......
......@@ -22,7 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
......@@ -262,7 +262,7 @@ public class TEmployeeProjectController {
**/
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestParam(name = "idstr", required = false)String idstr,
@RequestBody List<String> exportFields, EmployeeProjectExportVO projectDTO) {
@RequestBody List<String> exportFields, EmployeeProjectExportParamVO projectDTO) {
YifuUser user = SecurityUtils.getUser();
if (user != null && Common.isNotNull(user.getId())) {
menuUtil.setAuthSql(user, projectDTO);
......
......@@ -21,10 +21,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
......@@ -272,4 +274,15 @@ public class TSettleDomainController {
return tSettleDomainService.updateProjectInfo(list);
}
/**
* 分页查询 客户信息
* @return
*/
@Operation(summary = "分页查询客户信息", description = "分页查询客户信息")
@GetMapping("/getUnitPage")
public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) {
return R.ok(tSettleDomainService.getUnitPage(page, idNameNo));
}
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -57,5 +58,5 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
* @param tEmployeeProject
* @return
*/
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject")EmployeeProjectExportVO tEmployeeProject);
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject);
}
......@@ -21,6 +21,7 @@ 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.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import org.apache.ibatis.annotations.Mapper;
......@@ -38,6 +39,8 @@ import java.util.List;
public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, @Param("tSettleDomain") TSettleDomain tSettleDomain);
IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, @Param("idNameNoVo") IdNameNoVo idNameNoVo);
/**
* @param departNo
* @Author: wangan
......
......@@ -68,5 +68,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/
R<List<TCustomerInfo>> getAllUint();
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId);
}
......@@ -23,7 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
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.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -96,7 +96,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R deleteEmpPro(TEmployeeProject tEmployeeProject);
/**
* @param list
* @param inputStream
* @Description: 批量减项
* @Author: huyc
* @Date: 2022/6/21 10:30
......@@ -163,7 +163,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
* @Date: 2022/6/23 10:30
* @return: R
**/
void listExportProject(HttpServletResponse response, EmployeeProjectExportVO projectDTO,
void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO projectDTO,
String idstr, List<String> exportFields);
/**
* @param employeeInfo
......
......@@ -21,6 +21,7 @@ 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.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -38,6 +39,16 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain);
/**
* @param page
* @param idNameNoVo
* @Description: 获取客户单位单位
* @Author: hgw
* @Date: 2022/10/21 10:01
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo>
**/
IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNoVo);
/**
* 清除userId的项目权限缓存
*
......
......@@ -304,16 +304,19 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @Date 2022-07-26
*/
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName);
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, customerId);
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(String deptName) {
private LambdaQueryWrapper buildQueryWrapper(String deptName, String customerId) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(deptName)) {
wrapper.like(TSettleDomain::getDepartName, deptName);
}
if (Common.isNotNull(customerId)) {
wrapper.eq(TSettleDomain::getCustomerId, customerId);
}
wrapper.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING);
wrapper.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING);
return wrapper;
......
......@@ -293,7 +293,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
&& project.getProjectStatus().intValue()== CommonConstants.ONE_INT)
|| (
!CommonConstants.ZERO_STRING.equals(project.getEmpNatrue())
&& !CommonConstants.ONE_STRING.equals(project.getEmpNatrue()))
&& !CommonConstants.ONE_STRING.equals(project.getEmpNatrue())
&& !CommonConstants.THREE_STRING.equals(project.getEmpNatrue()))
)){
return;
}
......
......@@ -84,7 +84,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private final TEmpEducationService tEmpEducationService;
private final TSettleDomainService tSettleDomainService;
private final TEmployeeContractAuditMapper contractAuditMapper;
private final TEmployeeContractAuditMapper contractAuditMapper;
private final TEmployeeContractInfoService contractServicer;
......@@ -793,8 +793,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMsg.add("员工类型必填!");
errorMsgMap.put(lineNum, new ErrorMessage("员工类型必填!"));
} else if (EmployeeConstants.EMP_NATRUE_ZERO.equals(employeeInfo.getEmpNatrue())
|| EmployeeConstants.EMP_NATRUE_ONE.equals(employeeInfo.getEmpNatrue())) {
// 2.员工类型为外包和派遣,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
|| EmployeeConstants.EMP_NATRUE_ONE.equals(employeeInfo.getEmpNatrue())
|| EmployeeConstants.EMP_NATRUE_THREE.equals(employeeInfo.getEmpNatrue())) {
// 2.员工类型为外包和派遣和内部员工,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
if (Common.isEmpty(employeeInfo.getValidityStart())) {
errorMsg.add(EmployeeConstants.VALIDITY_START);
errorMsgMap.put(lineNum, new ErrorMessage(EmployeeConstants.VALIDITY_START));
......@@ -1893,7 +1894,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private void judgeNull(Set<String> errorMsg, TEmployeeInfo employeeInfo) {
if (Common.isNotNull(employeeInfo.getEmpNatrue())
&& (CommonConstants.ZERO_STRING.equals(employeeInfo.getEmpNatrue())
|| CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue()))) {
|| CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue())
|| CommonConstants.THREE_STRING.equals(employeeInfo.getEmpNatrue()))) {
// 2.员工类型为外包和派遣,额外必填项有:身份证开始日期、身份证截止日期、民族、户籍所在(省市县)、户口性质、档案所在地(省市县)、是否大专及以上、通信地址
if (Common.isEmpty(employeeInfo.getValidityStart())) {
errorMsg.add(EmployeeConstants.VALIDITY_START);
......@@ -2152,24 +2154,30 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.eq(TEmployeeContractInfo::getDispatchFlag,CommonConstants.ONE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(c)){
TEmployeeContractAudit contractAudit = new TEmployeeContractAudit();
contractAudit.setLinkId(c.getId());
contractAudit.setLinkType(CommonConstants.ONE_INT);
contractAudit.setCreateBy(c.getCreateBy());
contractAudit.setCreateName(c.getCreateName());
contractAudit.setCreateTime(LocalDateTime.now());
//审核通过
if (CommonConstants.ZERO_STRING.equals(vo.getType())){
c.setAuditStatus(CommonConstants.TWO_INT);
c.setInUse(CommonConstants.ZERO_STRING);
c.setAuditTimeLast(LocalDateTime.now());
TEmployeeContractAudit contractAudit = new TEmployeeContractAudit();
contractAudit.setAuditStatus("审核通过");
contractAudit.setRemark("派单审核通过,同步审核通过合同");
contractAudit.setLinkId(c.getId());
contractAudit.setLinkType(CommonConstants.ONE_INT);
contractAudit.setRootName("合同审核-派单审核通过");
contractAuditMapper.insert(contractAudit);
contractServicer.updateInUseStatusById(c.getEmpId(),c.getDeptNo(),c.getId());
//审核不同
//审核不同
}else if (CommonConstants.ONE_STRING.equals(vo.getType())){
c.setAuditStatus(CommonConstants.THREE_INT);
c.setInUse(CommonConstants.ONE_STRING);
contractAudit.setAuditStatus("审核不通过");
contractAudit.setRemark("派单审核不通过,同步审核不通过合同");
contractAudit.setRootName("合同审核-派单审核不通过");
}
contractAuditMapper.insert(contractAudit);
contractServicer.updateById(c);
}
......
......@@ -277,7 +277,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//从剩下的项目档案中查找员工类型并更新
if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.THREE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.THREE_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
......@@ -758,7 +760,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
idCard = excel.getEmpIdcard();
deptNo = excel.getDeptNo();
if (excel.getEmpNatrue().equals(CommonConstants.ZERO_STRING) || excel.getEmpNatrue().equals(CommonConstants.ONE_STRING)) {
if (excel.getEmpNatrue().equals(CommonConstants.ZERO_STRING)
|| excel.getEmpNatrue().equals(CommonConstants.ONE_STRING)
|| excel.getEmpNatrue().equals(CommonConstants.THREE_STRING)) {
if (excel.getContractType().equals(CommonConstants.ONE_STRING) && Common.isEmpty(excel.getWorkingHours())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "工时制不能为空!"));
}
......@@ -1174,7 +1178,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
* @Date 10:55 2022/6/23
**/
@Override
public void listExportProject(HttpServletResponse response, EmployeeProjectExportVO projectDTO, String idstr, List<String> exportFields) {
public void listExportProject(HttpServletResponse response, EmployeeProjectExportParamVO projectDTO, String idstr, List<String> exportFields) {
String fileName = "项目档案批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
// 根据用户传入确定要导出的字段
......@@ -1256,7 +1260,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/**
* 获取导出的项目档案列表
*/
private List<EmployeeProjectExportVO> gettEmpProInfoExportVos(String idstr, EmployeeProjectExportVO projectDTO) {
private List<EmployeeProjectExportVO> gettEmpProInfoExportVos(String idstr, EmployeeProjectExportParamVO projectDTO) {
List<EmployeeProjectExportVO> list;
if (!Common.isEmpty(idstr)) {
projectDTO.setIdList(Common.initStrToList(idstr, CommonConstants.COMMA_STRING));
......
......@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
......@@ -71,6 +72,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return baseMapper.getPage(page, tSettleDomain);
}
@Override
public IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNoVo) {
return baseMapper.getUnitPage(page, idNameNoVo);
}
/**
* @Author fxj
* @Description 清除项目缓存
......
......@@ -217,6 +217,24 @@
</if>
</select>
<select id="getUnitPage" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo">
SELECT
a.CUSTOMER_ID as id,
a.CUSTOMER_NAME as name,
a.CUSTOMER_NO as no
FROM t_settle_domain a
WHERE 1=1
<if test="idNameNoVo != null">
<if test="idNameNoVo.name != null and idNameNoVo.name.trim() != ''">
and a.CUSTOMER_NAME like concat('%', #{idNameNoVo.name} ,'%')
</if>
<if test="idNameNoVo.no != null and idNameNoVo.no.trim() != ''">
and a.CUSTOMER_NO = #{idNameNoVo.no}
</if>
</if>
group by a.CUSTOMER_ID
</select>
<select id="selectSettleDomainSelectVosById"
resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
SELECT
......
......@@ -506,4 +506,15 @@ public class TSalaryAccount extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "年终奖单独扣税税费")
private BigDecimal annualBonusTax;
/**
* 工资月份-起
*/
@TableField(exist = false)
private String salaryMonthStart;
/**
* 工资月份-止
*/
@TableField(exist = false)
private String salaryMonthEnd;
}
......@@ -107,4 +107,10 @@ public class TSalaryAccountItem extends Model<TSalaryAccountItem> {
@TableField(exist = false)
private String formType;
/**
* 工资月
*/
@TableField(exist = false)
private String salaryMonth;
}
......@@ -21,6 +21,7 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -395,4 +396,14 @@ public class TSalaryStandard extends BaseEntity {
@ExcelIgnore
private String bpoFlag;
/**
* 工资月份-起
*/
@TableField(exist = false)
private String salaryMonthStart;
/**
* 工资月份-止
*/
@TableField(exist = false)
private String salaryMonthEnd;
}
......@@ -108,6 +108,8 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
List<TSalaryAccount> getAccountListBySalaryId(@Param("searchVo") TSalaryAccountSearchVo searchVo);
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
......
......@@ -57,6 +57,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
List<TSalaryAccount> noPageDiy(TSalaryAccountSearchVo searchVo);
/**
* @param searchVo
* @Description: 无需权限仅按照工资id查询报账
* @Author: hgw
* @Date: 2022/10/24 16:36
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
List<TSalaryAccount> getAccountListBySalaryId(TSalaryAccountSearchVo searchVo);
/**
* @param settleId
* @param settleMonth
......
......@@ -1376,22 +1376,19 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryAtta> attaList = null;
if (salary.getType() == null || salary.getType() != CommonConstants.ONE_INT) {
//报账表
TSalaryAccount salaryAccount = new TSalaryAccount();
TSalaryAccountSearchVo salaryAccount = new TSalaryAccountSearchVo();
salaryAccount.setSalaryFormId(salaryFormId);
QueryWrapper<TSalaryAccount> queryWrapperSa = new QueryWrapper<>();
queryWrapperSa.setEntity(salaryAccount);
List<TSalaryAccount> salaryAccountList = tSalaryAccountService.list(queryWrapperSa);
salaryAccount.setSalaryMonthStart(salary.getSalaryMonth());
List<TSalaryAccount> salaryAccountList = tSalaryAccountService.getAccountListBySalaryId(salaryAccount);
//报账表明细
if (salaryAccountList != null && salaryAccountList.size() > CommonConstants.ZERO_INT) {
TSalaryAccountItem item;
QueryWrapper<TSalaryAccountItem> queryWrapperAi;
List<TSalaryAccountItem> itemList;
for (TSalaryAccount a : salaryAccountList) {
item = new TSalaryAccountItem();
item.setSalaryAccountId(a.getId());
queryWrapperAi = new QueryWrapper<>();
queryWrapperAi.setEntity(item);
itemList = tSalaryAccountItemService.list(queryWrapperAi);
item.setSalaryMonth(salary.getSalaryMonth());
itemList = tSalaryAccountItemService.getTSalaryAccountItemNoPage(item);
a.setSaiList(itemList);
}
}
......
......@@ -35,6 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import lombok.extern.log4j.Log4j2;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
......@@ -151,6 +152,11 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
return baseMapper.noPageDiy(searchVo,searchVo.getIdList());
}
@Override
public List<TSalaryAccount> getAccountListBySalaryId(TSalaryAccountSearchVo searchVo) {
return baseMapper.getAccountListBySalaryId(searchVo);
}
private int noPageCountDiy(TSalaryAccountSearchVo searchVo) {
return baseMapper.noPageCountDiy(searchVo,searchVo.getIdList());
}
......
......@@ -286,18 +286,19 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
checkIdCard.setBankNo(employee.getBankNo());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", checkIdCard, CheckBankNoVo.class, SecurityConstants.FROM_IN);
String pre = "姓名与卡号验证:";
if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo = checkListR.getData();
TCheckBankNo check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (Common.isEmpty(vo)) {
return SalaryConstants.CHECK_NO_RESPONSE;
return pre + SalaryConstants.CHECK_NO_RESPONSE;
} else if (!CommonConstants.SUCCESS.equals(vo.getRes().getCode())) {
return vo.getRes().getMsg();
return pre + vo.getRes().getMsg();
} else if (check != null && !check.getResult().equals(CommonConstants.ZERO_ONE)) {
return check.getRemark();
return pre + check.getRemark();
}
} else {
return SalaryConstants.CHECK_NO_RESPONSE;
return pre + SalaryConstants.CHECK_NO_RESPONSE;
}
}
// if (Common.isNotNull(employee.getBankNo())) {
......@@ -323,14 +324,15 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
checkMobile.setMobile(employee.getEmpPhone());
R<TCheckMobile> a = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckmobile/inner/checkOneMobile", checkMobile, TCheckMobile.class, SecurityConstants.FROM_IN);
String pre = "手机号验证:";
if (a != null && a.getData() != null) {
checkMobile = a.getData();
if (checkMobile != null && Common.isNotNull(checkMobile.getStatus())) {
if (!CommonConstants.ONE_STRING.equals(checkMobile.getStatus())) {
return checkMobile.getMessage();
return pre + checkMobile.getMessage();
}
} else {
return "校验服务未找到手机号,请联系管理员!";
return pre + "校验服务未找到手机号,请联系管理员!";
}
}
}
......
......@@ -38,7 +38,13 @@
SALARY_MONEY,
TEXT_VALUE,
IS_TAX
FROM t_salary_account_item
FROM
<if test="tSalaryAccountItem.salaryMonth == null or tSalaryAccountItem.salaryMonth.trim() >= '202201'">
t_salary_account_item a
</if>
<if test="tSalaryAccountItem.salaryMonth != null and tSalaryAccountItem.salaryMonth.trim() &lt; '202201' ">
t_salary_account_item_hro_2021 a
</if>
<where>
<if test="tSalaryAccountItem.id != null and tSalaryAccountItem.id.trim() != ''">
AND ID = #{tSalaryAccountItem.id}
......
......@@ -253,6 +253,12 @@
<if test="tSalaryAccount.salaryMonth != null and tSalaryAccount.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryAccount.salaryMonth}
</if>
<if test="tSalaryAccount.salaryMonthStart != null and tSalaryAccount.salaryMonthStart.trim() != ''">
AND a.SALARY_MONTH >= #{tSalaryAccount.salaryMonthStart}
</if>
<if test="tSalaryAccount.salaryMonthEnd != null and tSalaryAccount.salaryMonthEnd.trim() != ''">
AND a.SALARY_MONTH <![CDATA[<=]]> #{tSalaryAccount.salaryMonthEnd}
</if>
<if test="tSalaryAccount.empId != null and tSalaryAccount.empId.trim() != ''">
AND a.EMP_ID = #{tSalaryAccount.empId}
</if>
......@@ -373,7 +379,13 @@
<select id="getTSalaryAccountPage" resultMap="tSalaryAccountMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_account a
FROM
<if test="tSalaryAccount.salaryMonthStart == null or tSalaryAccount.salaryMonthStart.trim() >= '202201' ">
t_salary_account a
</if>
<if test="tSalaryAccount.salaryMonthStart != null and tSalaryAccount.salaryMonthStart.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0
and not EXISTS (
......@@ -605,7 +617,13 @@
<select id="noPageDiy" resultMap="tSalaryAccountMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_account a
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'">
t_salary_account a
</if>
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
......@@ -624,6 +642,20 @@
</select>
<select id="getAccountListBySalaryId" resultMap="tSalaryAccountMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount">
SELECT
<include refid="Base_Column_List"/>
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'">
t_salary_account a
</if>
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
where a.SALARY_FORM_ID = #{searchVo.salaryFormId}
ORDER BY a.CREATE_TIME desc
</select>
<!-- 计算收入需要的报账明细 -->
<select id="getListByIncome" resultMap="tSalaryAccountMap">
SELECT
......@@ -645,7 +677,13 @@
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_salary_account a
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201' ">
t_salary_account a
</if>
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
......@@ -676,6 +714,12 @@
<if test="searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{searchVo.salaryMonth}
</if>
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() != ''">
AND a.SALARY_MONTH >= #{searchVo.salaryMonthStart}
</if>
<if test="searchVo.salaryMonthEnd != null and searchVo.salaryMonthEnd.trim() != ''">
AND a.SALARY_MONTH <![CDATA[<=]]> #{searchVo.salaryMonthEnd}
</if>
<if test="searchVo.empId != null and searchVo.empId.trim() != ''">
AND a.EMP_ID = #{searchVo.empId}
</if>
......
......@@ -169,6 +169,12 @@
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if test="tSalaryStandard.salaryMonthStart != null and tSalaryStandard.salaryMonthStart.trim() != ''">
AND a.SALARY_MONTH >= #{tSalaryStandard.salaryMonthStart}
</if>
<if test="tSalaryStandard.salaryMonthEnd != null and tSalaryStandard.salaryMonthEnd.trim() != ''">
AND a.SALARY_MONTH <![CDATA[<=]]> #{tSalaryStandard.salaryMonthEnd}
</if>
<if test="tSalaryStandard.moneyFrom != null">
AND a.MONEY_FROM = #{tSalaryStandard.moneyFrom}
</if>
......@@ -265,7 +271,13 @@
<select id="getTSalaryStandardPage" resultMap="tSalaryStandardMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_standard a
FROM
<if test="tSalaryStandard.salaryMonthStart == null or tSalaryStandard.salaryMonthStart.trim() >= '202201' ">
t_salary_standard a
</if>
<if test="tSalaryStandard.salaryMonthStart != null and tSalaryStandard.salaryMonthStart.trim() &lt; '202201' ">
t_salary_standard_hro_2021 a
</if>
left join t_dept_see d on a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0
......@@ -282,7 +294,13 @@
<select id="getTSalaryStandardPageApply" resultMap="tSalaryStandardMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_standard a
FROM
<if test="tSalaryStandard.salaryMonthStart == null or tSalaryStandard.salaryMonthStart.trim() >= '202201' ">
t_salary_standard a
</if>
<if test="tSalaryStandard.salaryMonthStart != null and tSalaryStandard.salaryMonthStart.trim() &lt; '202201' ">
t_salary_standard_hro_2021 a
</if>
<where>
a.DELETE_FLAG = 0
<!-- 薪资是否可查看 0 是 1否-->
......@@ -351,7 +369,13 @@
a.SALARY_MONTH,
a.FORM_TYPE,
a.CREATE_TIME
FROM t_salary_standard a
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201' ">
t_salary_standard a
</if>
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() &lt; '202201' ">
t_salary_standard_hro_2021 a
</if>
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
......@@ -371,7 +395,13 @@
<select id="getSalaryStandardExportCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_salary_standard a
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201' ">
t_salary_standard a
</if>
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() &lt; '202201' ">
t_salary_standard_hro_2021 a
</if>
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where>
a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
......@@ -417,6 +447,12 @@
<if test="searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{searchVo.salaryMonth}
</if>
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() != ''">
AND a.SALARY_MONTH >= #{searchVo.salaryMonthStart}
</if>
<if test="searchVo.salaryMonthEnd != null and searchVo.salaryMonthEnd.trim() != ''">
AND a.SALARY_MONTH <![CDATA[<=]]> #{searchVo.salaryMonthEnd}
</if>
<!--<if test="searchVo.status == null">
AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
</if>-->
......
......@@ -409,8 +409,8 @@ public class TPreDispatchUpdateVo extends TPreDispatchInfo {
/**
* 员工类型
*/
@Length(max = 2, message = "员工类型不能超过2个字符")
@ExcelAttribute(name = "员工类型", maxLength = 2)
@Length(max = 5, message = "员工类型不能超过2个字符")
@ExcelAttribute(name = "员工类型", maxLength = 5)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
private String empTypeAdd;
......
......@@ -116,7 +116,7 @@ public class TSocialFundInfoExportVo extends RowIndex implements Serializable {
@ExcelProperty("身份证所在地")
private String idCardAddress;
@ExcelAttribute(name = "档案-省")
@ExcelAttribute(name = "档案-省", isArea = true)
@Schema(description = "档案-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("档案-省")
......@@ -522,7 +522,7 @@ public class TSocialFundInfoExportVo extends RowIndex implements Serializable {
@ExcelProperty("公积金户")
private String providentHouseholdName;
@ExcelAttribute(name = "公积金缴纳地-省", maxLength = 32)
@ExcelAttribute(name = "公积金缴纳地-省", isArea = true, maxLength = 32)
@Schema(description = "公积金缴纳地-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地-省")
......
......@@ -3139,7 +3139,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
StringBuilder temp = new StringBuilder();
// 预估库同步社保还是公积金的标志,0:全部;1仅社保;2仅公积金
int forecastFlag = CommonConstants.ZERO_INT;
// auditFlag 表示社保办理无办理项是不保存
boolean auditFlag = true;
for (TDispatchInfo dis : disList) {
auditFlag = true;
if (CommonConstants.ZERO_STRING.equals(typeSub)) {
forecastFlag = CommonConstants.ONE_INT;
} else if (CommonConstants.ONE_STRING.equals(typeSub)) {
......@@ -3189,21 +3192,24 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialMapper.updateById(socialInfo);
dis.setSocialHandleRemark(ServiceUtil.ifNullToEmpty(handleRemark));
auditInfo.setType(CommonConstants.ONE_STRING);
if (CommonConstants.ZERO_INT == flag) {
temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(Common.isNullToString(socialTypeRemark));
temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.THREE_STRING, user, temp.toString(), remark);
} else {
temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(Common.isNullToString(socialTypeRemark));
temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.FOUR_STRING, user, temp.toString(), remark);
auditFlag = Common.isNotNull(Common.isNullToString(socialTypeRemark));
if (auditFlag){
auditInfo.setType(CommonConstants.ONE_STRING);
if (CommonConstants.ZERO_INT == flag) {
temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(Common.isNullToString(socialTypeRemark));
temp.append(DispatchConstants.DISPATCH_HANDLE_SUCCESS);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.THREE_STRING, user, temp.toString(), remark);
} else {
temp.setLength(CommonConstants.ZERO_INT);
temp.append(DispatchConstants.DISPATCH_SOCIAL_ADD);
temp.append(Common.isNullToString(socialTypeRemark));
temp.append(DispatchConstants.DISPATCH_HANDLE_FAIL);
initAuditInfo(auditInfo, ( temp + ServiceUtil.ifNullToEmpty(handleRemark)), CommonConstants.FOUR_STRING, user, temp.toString(), remark);
}
auditInfo.setSocialId(dis.getId());
}
auditInfo.setSocialId(dis.getId());
} else {
errorList.add(new ErrorMessage(-1, "找不到对应员工社保派增派单数据:" + dis.getEmpName()));
continue;
......@@ -3422,7 +3428,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//新增办理记录信息
auditInfo.setDispatchInfoId(dis.getId());
auditInfo.setEmpIdcard(dis.getEmpIdcard());
auditInfoMapper.insert(auditInfo);
if (auditFlag){
auditInfoMapper.insert(auditInfo);
}
baseMapper.updateById(dis);
socialFundMapper.updateById(sf);
//1.派增办理失败 刷新预估数据
......
......@@ -256,6 +256,9 @@
<result property="fundSum" column="FUND_SUM"/>
<result property="trustRemark" column="TRUST_REMARK"/>
<result property="empNational" column="EMP_NATIONAL"/>
<result property="empRegisType" column="EMP_REGIS_TYPE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -1035,7 +1038,9 @@
a.UNEMPLOY_HANDLE,
a.WORK_INJURY_HANDLE,
a.BIRTH_HANDLE,
a.BIGAILMENT_HANDLE
a.BIGAILMENT_HANDLE,
d.EMP_NATIONAL,
d.EMP_REGIS_TYPE
from t_social_fund_info a
left join t_dispatch_info d on a.DISPATCH_ID=d.ID
<where>
......
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