Commit 850833ba authored by hongguangwu's avatar hongguangwu

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

parents a00cc274 a91c9b13
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
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.mybatis.base.BaseEntity;
......@@ -249,5 +250,59 @@ public class TEmployeeProject extends BaseEntity {
@Schema(description ="备注")
private String remark;
/**
* 手机号码
*/
@Schema(description = "手机号码")
@TableField(exist = false)
private String empPhone;
/**
* 商险状态(字典)
*/
@Schema(description = "商险状态(字典)")
@TableField(exist = false)
private Integer insuranceStatus;
/**
* 社保状态(字典)
*/
@Schema(description = "社保状态(字典)")
@TableField(exist = false)
private Integer socialStatus;
/**
* 公积金状态(字典)
*/
@Schema(description = "公积金状态(字典)")
@TableField(exist = false)
private Integer fundStatus;
/**
* 近3个月发薪(0否;1是)
*/
@Schema(description = "近3个月发薪(0否;1是)")
@TableField(exist = false)
private Integer salaryStatus;
/**
* 档案-省
*/
@Schema(description = "档案-省")
@TableField(exist = false)
private Integer fileProvince;
/**
* 档案-市
*/
@Schema(description = "档案-市")
@TableField(exist = false)
private Integer fileCity;
/**
* 档案-县
*/
@Schema(description = "档案-县")
@TableField(exist = false)
private Integer fileTown;
}
......@@ -27,7 +27,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -39,10 +38,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
......@@ -137,11 +133,9 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有项目名称", description = "获取所有项目名称")
@SysLog("获取所有项目名称" )
@GetMapping("/getAllDept" )
public R<Map<String,Object>> getAllDept() {
public R<List<TSettleDomain>> getAllDept() {
List<TSettleDomain> list = tSettleDomainService.list(Wrappers.<TSettleDomain>query().lambda().eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL));
Map<String,Object> map = new HashMap<>();
map = list.stream().collect(HashMap::new, (m, v) -> m.put(v.getId(), v.getDepartName()), HashMap::putAll);
return R.ok(map);
return R.ok(list);
}
......@@ -154,11 +148,9 @@ public class TEmpChangeInfoController {
@Operation(summary = "获取所有单位名称", description = "获取所有单位名称")
@SysLog("获取所有单位名称" )
@GetMapping("/getAllUint" )
public R<Map<String,Object>> getAllUint() {
public R<List<TCustomerInfo>> getAllUint() {
List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
Map<String,Object> map = new HashMap<>();
map = list.stream().collect(HashMap::new, (m, v) -> m.put(v.getId(), v.getCustomerName()), HashMap::putAll);
return R.ok(map);
return R.ok(list);
}
/**
......
......@@ -18,7 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
......@@ -73,9 +73,9 @@ public class TEmployeeProjectController {
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_get')" )
public R getTEmployeeProjectPage(Page page, TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.page(page, Wrappers.query(tEmployeeProject)));
// @PreAuthorize("@pms.hasPermission('archives_temployeeproject_get')" )
public R<IPage<TEmployeeProject>> getTEmployeeProjectPage(Page page, TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.getTEmployeeProjectInfoPage(page,tEmployeeProject));
}
......
......@@ -18,6 +18,8 @@
package com.yifu.cloud.plus.v1.yifu.archives.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.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import org.apache.ibatis.annotations.Mapper;
......@@ -47,4 +49,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
*/
String findEmployeeMaxOnlyNoByDepId(@Param("deptNo") String deptNo);
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject);
}
......@@ -18,6 +18,8 @@
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
......@@ -73,4 +75,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
* @return: R
**/
R<List<ErrorMessage>> batchRemoveByIds(String ids);
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, TEmployeeProject vo);
}
......@@ -45,6 +45,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Service;
......@@ -60,6 +61,7 @@ import java.util.*;
*/
@Service
@RequiredArgsConstructor
@EnableConfigurationProperties(DaprUpmsProperties.class)
public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, TEmployeeInfo> implements TEmployeeInfoService {
// 缓存信息
......
......@@ -19,7 +19,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
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.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
......@@ -441,6 +443,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.ok();
}
@Override
public IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, TEmployeeProject tEmployeeProject) {
return baseMapper.getTEmployeeProjectInfoPage(page,tEmployeeProject);
}
/**
* 更新人员档案
*/
......
......@@ -44,8 +44,215 @@
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/>
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="empPhone" column="EMP_PHONE"/>
<result property="salaryStatus" column="SALARY_STATUS"/>
<result property="insuranceStatus" column="INSURANCE_STATUS"/>
<result property="socialStatus" column="SOCIAL_STATUS"/>
<result property="fundStatus" column="FUND_STATUS"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_ID,
a.EMP_CODE,
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_IDCARD,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.LEAVE_USER,
a.LEAVE_TIME,
a.LEAVE_REASON,
a.LEAVE_REMARK,
a.IS_LEAVE_EMPLOYEE,
a.EMP_NO,
a.UNIT_ID,
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_ID,
a.DEPT_NAME,
a.DEPT_NO,
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.CONTRACT_TYPE,
a.WORKING_HOURS,
a.POST,
a.ENJOIN_DATE,
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.TAX_MONTH,
a.STATUS,
a.PROJECT_STATUS,
a.DELETE_FLAG,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.REMARK,
b.EMP_PHONE,
b.INSURANCE_STATUS,
b.SOCIAL_STATUS,
b.FUND_STATUS,
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_TOWN,
b.SALARY_STATUS
</sql>
<sql id="tEmployeeProject_where">
<if test="tEmployeeProject != null">
<if test="tEmployeeProject.id != null and tEmployeeProject.id.trim() != ''">
AND a.ID = #{tEmployeeProject.id}
</if>
<if test="tEmployeeProject.empId != null and tEmployeeProject.empId.trim() != ''">
AND a.EMP_ID = #{tEmployeeProject.empId}
</if>
<if test="tEmployeeProject.empCode != null and tEmployeeProject.empCode.trim() != ''">
AND a.EMP_CODE = #{tEmployeeProject.empCode}
</if>
<if test="tEmployeeProject.empNatrue != null and tEmployeeProject.empNatrue.trim() != ''">
AND a.EMP_NATRUE = #{tEmployeeProject.empNatrue}
</if>
<if test="tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''">
AND a.EMP_NAME = #{tEmployeeProject.empName}
</if>
<if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmployeeProject.empIdcard}
</if>
<if test="tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''">
AND a.BANK_NAME = #{tEmployeeProject.bankName}
</if>
<if test="tEmployeeProject.bankSubName != null and tEmployeeProject.bankSubName.trim() != ''">
AND a.BANK_SUB_NAME = #{tEmployeeProject.bankSubName}
</if>
<if test="tEmployeeProject.bankNo != null and tEmployeeProject.bankNo.trim() != ''">
AND a.BANK_NO = #{tEmployeeProject.bankNo}
</if>
<if test="tEmployeeProject.leaveUser != null and tEmployeeProject.leaveUser.trim() != ''">
AND a.LEAVE_USER = #{tEmployeeProject.leaveUser}
</if>
<if test="tEmployeeProject.leaveTime != null">
AND a.LEAVE_TIME = #{tEmployeeProject.leaveTime}
</if>
<if test="tEmployeeProject.leaveReason != null and tEmployeeProject.leaveReason.trim() != ''">
AND a.LEAVE_REASON = #{tEmployeeProject.leaveReason}
</if>
<if test="tEmployeeProject.leaveRemark != null and tEmployeeProject.leaveRemark.trim() != ''">
AND a.LEAVE_REMARK = #{tEmployeeProject.leaveRemark}
</if>
<if test="tEmployeeProject.isLeaveEmployee != null">
AND a.IS_LEAVE_EMPLOYEE = #{tEmployeeProject.isLeaveEmployee}
</if>
<if test="tEmployeeProject.empNo != null and tEmployeeProject.empNo.trim() != ''">
AND a.EMP_NO = #{tEmployeeProject.empNo}
</if>
<if test="tEmployeeProject.unitId != null and tEmployeeProject.unitId.trim() != ''">
AND a.UNIT_ID = #{tEmployeeProject.unitId}
</if>
<if test="tEmployeeProject.unitName != null and tEmployeeProject.unitName.trim() != ''">
AND a.UNIT_NAME = #{tEmployeeProject.unitName}
</if>
<if test="tEmployeeProject.unitNo != null and tEmployeeProject.unitNo.trim() != ''">
AND a.UNIT_NO = #{tEmployeeProject.unitNo}
</if>
<if test="tEmployeeProject.deptId != null and tEmployeeProject.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmployeeProject.deptId}
</if>
<if test="tEmployeeProject.deptName != null and tEmployeeProject.deptName.trim() != ''">
AND a.DEPT_NAME = #{tEmployeeProject.deptName}
</if>
<if test="tEmployeeProject.deptNo != null and tEmployeeProject.deptNo.trim() != ''">
AND a.DEPT_NO = #{tEmployeeProject.deptNo}
</if>
<if test="tEmployeeProject.businessPrimaryType != null and tEmployeeProject.businessPrimaryType.trim() != ''">
AND a.BUSINESS_PRIMARY_TYPE = #{tEmployeeProject.businessPrimaryType}
</if>
<if test="tEmployeeProject.businessSecondType != null and tEmployeeProject.businessSecondType.trim() != ''">
AND a.BUSINESS_SECOND_TYPE = #{tEmployeeProject.businessSecondType}
</if>
<if test="tEmployeeProject.businessThirdType != null and tEmployeeProject.businessThirdType.trim() != ''">
AND a.BUSINESS_THIRD_TYPE = #{tEmployeeProject.businessThirdType}
</if>
<if test="tEmployeeProject.contractType != null and tEmployeeProject.contractType.trim() != ''">
AND a.CONTRACT_TYPE = #{tEmployeeProject.contractType}
</if>
<if test="tEmployeeProject.workingHours != null and tEmployeeProject.workingHours.trim() != ''">
AND a.WORKING_HOURS = #{tEmployeeProject.workingHours}
</if>
<if test="tEmployeeProject.post != null and tEmployeeProject.post.trim() != ''">
AND a.POST = #{tEmployeeProject.post}
</if>
<if test="tEmployeeProject.enjoinDate != null">
AND a.ENJOIN_DATE = #{tEmployeeProject.enjoinDate}
</if>
<if test="tEmployeeProject.tryPeriod != null and tEmployeeProject.tryPeriod.trim() != ''">
AND a.TRY_PERIOD = #{tEmployeeProject.tryPeriod}
</if>
<if test="tEmployeeProject.projectSource != null and tEmployeeProject.projectSource.trim() != ''">
AND a.PROJECT_SOURCE = #{tEmployeeProject.projectSource}
</if>
<if test="tEmployeeProject.taxMonth != null and tEmployeeProject.taxMonth.trim() != ''">
AND a.TAX_MONTH = #{tEmployeeProject.taxMonth}
</if>
<if test="tEmployeeProject.status != null">
AND a.STATUS = #{tEmployeeProject.status}
</if>
<if test="tEmployeeProject.projectStatus != null">
AND a.PROJECT_STATUS = #{tEmployeeProject.projectStatus}
</if>
<if test="tEmployeeProject.deleteFlag != null and tEmployeeProject.deleteFlag.trim() != ''">
AND a.DELETE_FLAG = #{tEmployeeProject.deleteFlag}
</if>
<if test="tEmployeeProject.createBy != null and tEmployeeProject.createBy.trim() != ''">
AND a.CREATE_BY = #{tEmployeeProject.createBy}
</if>
<if test="tEmployeeProject.createName != null and tEmployeeProject.createName.trim() != ''">
AND a.CREATE_NAME = #{tEmployeeProject.createName}
</if>
<if test="tEmployeeProject.createTime != null">
AND a.CREATE_TIME = #{tEmployeeProject.createTime}
</if>
<if test="tEmployeeProject.updateBy != null and tEmployeeProject.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tEmployeeProject.updateBy}
</if>
<if test="tEmployeeProject.updateTime != null">
AND a.UPDATE_TIME = #{tEmployeeProject.updateTime}
</if>
<if test="tEmployeeProject.remark != null and tEmployeeProject.remark.trim() != ''">
AND a.REMARK = #{tEmployeeProject.remark}
</if>
<if test="tEmployeeProject.empPhone != null and tEmployeeProject.empPhone.trim() != ''">
AND b.EMP_PHONE = #{tEmployeeProject.empPhone}
</if>
<if test="tEmployeeProject.insuranceStatus != null">
AND b.INSURANCE_STATUS = #{tEmployeeProject.insuranceStatus}
</if>
<if test="tEmployeeProject.socialStatus != null">
AND b.SOCIAL_STATUS = #{tEmployeeProject.socialStatus}
</if>
<if test="tEmployeeProject.fundStatus != null">
AND b.FUND_STATUS = #{tEmployeeProject.fundStatus}
</if>
<if test="tEmployeeProject.salaryStatus != null">
AND b.SALARY_STATUS = #{tEmployeeProject.salaryStatus}
</if>
<if test="tEmployeeProject.fileProvince != null">
AND b.FILE_PROVINCE = #{tEmployeeProject.fileProvince}
</if>
<if test="tEmployeeProject.fileCity != null">
AND b.FILE_CITY = #{tEmployeeProject.fileCity}
</if>
<if test="tEmployeeProject.fileTown != null">
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
</if>
</if>
</sql>
<update id="updateExcelEmpProject" parameterType="java.util.List">
update t_employee_project
<trim prefix="set" suffixOverrides=",">
......@@ -225,4 +432,15 @@
EMP_IDCARD=#{i.empIdcard} AND DEPT_NO =#{i.deptNo}
</foreach>
</update>
<!--tEmployeeInfo简单分页查询-->
<select id="getTEmployeeProjectInfoPage" resultMap="tEmployeeProjectMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
<include refid="tEmployeeProject_where"/>
</where>
</select>
</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