Commit 75dd5b31 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent a78fcf4e
...@@ -276,21 +276,18 @@ public class TEmployeeProject extends BaseEntity { ...@@ -276,21 +276,18 @@ public class TEmployeeProject extends BaseEntity {
* 商险状态(字典) * 商险状态(字典)
*/ */
@Schema(description = "商险状态(字典)") @Schema(description = "商险状态(字典)")
@TableField(exist = false)
private Integer insuranceStatus; private Integer insuranceStatus;
/** /**
* 社保状态(字典) * 社保状态(字典)
*/ */
@Schema(description = "社保状态(字典)") @Schema(description = "社保状态(字典)")
@TableField(exist = false)
private Integer socialStatus; private Integer socialStatus;
/** /**
* 公积金状态(字典) * 公积金状态(字典)
*/ */
@Schema(description = "公积金状态(字典)") @Schema(description = "公积金状态(字典)")
@TableField(exist = false)
private Integer fundStatus; private Integer fundStatus;
/** /**
......
...@@ -70,7 +70,6 @@ public class FddContractInfoController { ...@@ -70,7 +70,6 @@ public class FddContractInfoController {
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('demo_fddcontractinfo_get')" )
public R getFddContractInfoPage(Page page, FddContractInfo fddContractInfo) { public R getFddContractInfoPage(Page page, FddContractInfo fddContractInfo) {
return R.ok(fddContractInfoService.page(page, Wrappers.query(fddContractInfo))); return R.ok(fddContractInfoService.page(page, Wrappers.query(fddContractInfo)));
} }
...@@ -82,7 +81,6 @@ public class FddContractInfoController { ...@@ -82,7 +81,6 @@ public class FddContractInfoController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_fddcontractinfo_get')") @Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_fddcontractinfo_get')")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_fddcontractinfo_get')" )
public R getById(@PathVariable("id" ) String id) { public R getById(@PathVariable("id" ) String id) {
return R.ok(fddContractInfoService.getById(id)); return R.ok(fddContractInfoService.getById(id));
} }
......
...@@ -62,7 +62,6 @@ public class FddContractTemplateController { ...@@ -62,7 +62,6 @@ public class FddContractTemplateController {
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('demo_fddcontracttemplate_get')" )
public R getFddContractTemplatePage(Page page, FddContractTemplate fddContractTemplate) throws ApiException { public R getFddContractTemplatePage(Page page, FddContractTemplate fddContractTemplate) throws ApiException {
return R.ok(fddContractTemplateService.getFddContractTemplatePage(page, fddContractTemplate)); return R.ok(fddContractTemplateService.getFddContractTemplatePage(page, fddContractTemplate));
} }
...@@ -74,7 +73,6 @@ public class FddContractTemplateController { ...@@ -74,7 +73,6 @@ public class FddContractTemplateController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_fddcontracttemplate_get')") @Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_fddcontracttemplate_get')")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_fddcontracttemplate_get')" )
public R getById(@PathVariable("id" ) String id) { public R getById(@PathVariable("id" ) String id) {
return R.ok(fddContractTemplateService.getById(id)); return R.ok(fddContractTemplateService.getById(id));
} }
......
...@@ -55,7 +55,6 @@ public class FddContractTemplateFileController { ...@@ -55,7 +55,6 @@ public class FddContractTemplateFileController {
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" ) @GetMapping("/page" )
@PreAuthorize("@pms.hasPermission('demo_fddcontracttemplatefile_get')" )
public R getFddContractTemplateFilePage(Page page, FddContractTemplateFile fddContractTemplateFile) { public R getFddContractTemplateFilePage(Page page, FddContractTemplateFile fddContractTemplateFile) {
return R.ok(fddContractTemplateFileService.page(page, Wrappers.query(fddContractTemplateFile))); return R.ok(fddContractTemplateFileService.page(page, Wrappers.query(fddContractTemplateFile)));
} }
...@@ -68,7 +67,6 @@ public class FddContractTemplateFileController { ...@@ -68,7 +67,6 @@ public class FddContractTemplateFileController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_fddcontracttemplatefile_get')") @Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_fddcontracttemplatefile_get')")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_fddcontracttemplatefile_get')" )
public R getById(@PathVariable("id" ) String id) { public R getById(@PathVariable("id" ) String id) {
return R.ok(fddContractTemplateFileService.getById(id)); return R.ok(fddContractTemplateFileService.getById(id));
} }
......
...@@ -215,6 +215,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -215,6 +215,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
TCustomerInfo tCustomerInfo = tCustomerInfoService.getOne(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getId, settleDomain.getCustomerId())); TCustomerInfo tCustomerInfo = tCustomerInfoService.getOne(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getId, settleDomain.getCustomerId()));
//查询项目档案 //查询项目档案
TEmployeeProject tEmployeeProject = employeeProjectMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda().eq(TEmployeeProject::getDeptId, settleDomain.getId()) TEmployeeProject tEmployeeProject = employeeProjectMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda().eq(TEmployeeProject::getDeptId, settleDomain.getId())
.eq(TEmployeeProject::getDeptNo,settleDomain.getDepartNo())
.eq(TEmployeeProject::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING)); .eq(TEmployeeProject::getEmpIdcard, fddContractAttachInfo.getEmpIdcard()).eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING));
//查询人员档案 //查询人员档案
...@@ -280,6 +281,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -280,6 +281,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
//更新人员档案 //更新人员档案
tEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone()); tEmployeeInfo.setEmpPhone(fddContractAttachInfo.getEmpPhone());
tEmployeeInfo.setEmpNatrue(fddContractTemplate.getType()); tEmployeeInfo.setEmpNatrue(fddContractTemplate.getType());
tEmployeeInfo.setProjectNum(CommonConstants.ONE_INT + employeeInfoCompare.getProjectNum());
employeeInfoService.updateById(tEmployeeInfo); employeeInfoService.updateById(tEmployeeInfo);
//保存操作记录 //保存操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",employeeInfoCompare,tEmployeeInfo); tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],tEmployeeProject.getId(),"",employeeInfoCompare,tEmployeeInfo);
...@@ -321,7 +323,6 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt ...@@ -321,7 +323,6 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
newTEmpProject.setUnitName(tCustomerInfo.getCustomerName()); newTEmpProject.setUnitName(tCustomerInfo.getCustomerName());
newTEmpProject.setUnitNo(tCustomerInfo.getCustomerCode()); newTEmpProject.setUnitNo(tCustomerInfo.getCustomerCode());
newTEmpProject.setContractType(fddContractTemplate.getType()); newTEmpProject.setContractType(fddContractTemplate.getType());
newTEmpProject.setDeleteFlag(CommonConstants.STATUS_NORMAL);
newTEmpProject.setStatus(CommonConstants.dingleDigitIntArray[0]); newTEmpProject.setStatus(CommonConstants.dingleDigitIntArray[0]);
newTEmpProject.setPost(fddContractAttachInfo.getPost()); newTEmpProject.setPost(fddContractAttachInfo.getPost());
newTEmpProject.setEmpNatrue(newEmployeeInfo.getEmpNatrue()); newTEmpProject.setEmpNatrue(newEmployeeInfo.getEmpNatrue());
......
...@@ -40,7 +40,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; ...@@ -40,7 +40,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService; import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; 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.util.*;
...@@ -48,9 +47,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -48,9 +47,6 @@ 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.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
...@@ -565,6 +561,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -565,6 +561,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
* 插入excel Pro * 插入excel Pro
*/ */
private void insertExcelPro(EmployeeProjectVO excel,List<TEmployeeProject> proInsList) { private void insertExcelPro(EmployeeProjectVO excel,List<TEmployeeProject> proInsList) {
TEmployeeProject insTEmployeePro = new TEmployeeProject(); TEmployeeProject insTEmployeePro = new TEmployeeProject();
BeanUtil.copyProperties(excel, insTEmployeePro); BeanUtil.copyProperties(excel, insTEmployeePro);
insTEmployeePro.setId(String.valueOf(UUID.randomUUID()).replaceAll("-","")); insTEmployeePro.setId(String.valueOf(UUID.randomUUID()).replaceAll("-",""));
...@@ -573,6 +570,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -573,6 +570,21 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//人员档案主表id先设置成空,后面更新id //人员档案主表id先设置成空,后面更新id
insTEmployeePro.setEmpId(CommonConstants.EMPTY_STRING); insTEmployeePro.setEmpId(CommonConstants.EMPTY_STRING);
//获取项目和单位信息
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo,insTEmployeePro.getDeptNo()).eq(TSettleDomain::getDeleteFlag,CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tSettleDomain)) {
insTEmployeePro.setDeptId(tSettleDomain.getId());
insTEmployeePro.setDeptName(tSettleDomain.getDepartName());
TCustomerInfo tCustomerInfo = tCustomerInfoMapper.selectById(tSettleDomain.getCustomerId());
if(Common.isNotNull(tCustomerInfo)) {;
insTEmployeePro.setUnitId(tCustomerInfo.getId());
insTEmployeePro.setUnitNo(tCustomerInfo.getCustomerCode());
insTEmployeePro.setUnitName(tCustomerInfo.getCustomerName());
}
}
String empNO = getEmpNo(insTEmployeePro.getDeptNo()); String empNO = getEmpNo(insTEmployeePro.getDeptNo());
insTEmployeePro.setEmpNo(empNO); insTEmployeePro.setEmpNo(empNO);
//员工编码生成规则 //员工编码生成规则
...@@ -705,7 +717,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -705,7 +717,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeProject.setDeptNo(employeeInfo.getDeptNo()); tEmployeeProject.setDeptNo(employeeInfo.getDeptNo());
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo,employeeInfo.getDeptNo()).eq(TSettleDomain::getDeleteFlag,CommonConstants.STATUS_NORMAL)); .eq(TSettleDomain::getDepartNo,employeeInfo.getDeptNo()).eq(TSettleDomain::getDeleteFlag,CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tSettleDomain)) { if (Common.isNotNull(tSettleDomain)) {
tEmployeeProject.setDeptId(tSettleDomain.getId()); tEmployeeProject.setDeptId(tSettleDomain.getId());
tEmployeeProject.setDeptName(tSettleDomain.getDepartName()); tEmployeeProject.setDeptName(tSettleDomain.getDepartName());
......
...@@ -158,9 +158,9 @@ ...@@ -158,9 +158,9 @@
a.REMARK, a.REMARK,
a.CONTRACT_STATUS, a.CONTRACT_STATUS,
b.EMP_PHONE, b.EMP_PHONE,
b.INSURANCE_STATUS, a.INSURANCE_STATUS,
b.SOCIAL_STATUS, a.SOCIAL_STATUS,
b.FUND_STATUS, a.FUND_STATUS,
b.FILE_PROVINCE, b.FILE_PROVINCE,
b.FILE_CITY, b.FILE_CITY,
b.FILE_TOWN, b.FILE_TOWN,
...@@ -194,9 +194,9 @@ ...@@ -194,9 +194,9 @@
b.CREATE_NAME AS PROCREATE_NAME, b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME, b.CREATE_TIME AS PROCREATE_TIME,
b.EMP_PHONE, b.EMP_PHONE,
b.INSURANCE_STATUS, a.INSURANCE_STATUS,
b.SOCIAL_STATUS, a.SOCIAL_STATUS,
b.FUND_STATUS, a.FUND_STATUS,
b.FILE_PROVINCE, b.FILE_PROVINCE,
b.FILE_CITY, b.FILE_CITY,
b.FILE_TOWN, b.FILE_TOWN,
...@@ -349,13 +349,13 @@ ...@@ -349,13 +349,13 @@
AND b.EMP_PHONE = #{tEmployeeProject.empPhone} AND b.EMP_PHONE = #{tEmployeeProject.empPhone}
</if> </if>
<if test="tEmployeeProject.insuranceStatus != null"> <if test="tEmployeeProject.insuranceStatus != null">
AND b.INSURANCE_STATUS = #{tEmployeeProject.insuranceStatus} AND a.INSURANCE_STATUS = #{tEmployeeProject.insuranceStatus}
</if> </if>
<if test="tEmployeeProject.socialStatus != null"> <if test="tEmployeeProject.socialStatus != null">
AND b.SOCIAL_STATUS = #{tEmployeeProject.socialStatus} AND a.SOCIAL_STATUS = #{tEmployeeProject.socialStatus}
</if> </if>
<if test="tEmployeeProject.fundStatus != null"> <if test="tEmployeeProject.fundStatus != null">
AND b.FUND_STATUS = #{tEmployeeProject.fundStatus} AND a.FUND_STATUS = #{tEmployeeProject.fundStatus}
</if> </if>
<if test="tEmployeeProject.salaryStatus != null"> <if test="tEmployeeProject.salaryStatus != null">
AND a.SALARY_STATUS = #{tEmployeeProject.salaryStatus} AND a.SALARY_STATUS = #{tEmployeeProject.salaryStatus}
...@@ -456,13 +456,13 @@ ...@@ -456,13 +456,13 @@
AND b.EMP_PHONE = #{tEmployeeProject.empPhone} AND b.EMP_PHONE = #{tEmployeeProject.empPhone}
</if> </if>
<if test="tEmployeeProject.insuranceStatus != null"> <if test="tEmployeeProject.insuranceStatus != null">
AND b.INSURANCE_STATUS = #{tEmployeeProject.insuranceStatus} AND a.INSURANCE_STATUS = #{tEmployeeProject.insuranceStatus}
</if> </if>
<if test="tEmployeeProject.socialStatus != null"> <if test="tEmployeeProject.socialStatus != null">
AND b.SOCIAL_STATUS = #{tEmployeeProject.socialStatus} AND a.SOCIAL_STATUS = #{tEmployeeProject.socialStatus}
</if> </if>
<if test="tEmployeeProject.fundStatus != null"> <if test="tEmployeeProject.fundStatus != null">
AND b.FUND_STATUS = #{tEmployeeProject.fundStatus} AND a.FUND_STATUS = #{tEmployeeProject.fundStatus}
</if> </if>
<if test="tEmployeeProject.salaryStatus != null"> <if test="tEmployeeProject.salaryStatus != null">
AND a.SALARY_STATUS = #{tEmployeeProject.salaryStatus} AND a.SALARY_STATUS = #{tEmployeeProject.salaryStatus}
...@@ -599,7 +599,8 @@ ...@@ -599,7 +599,8 @@
<insert id="insertExcelEmpProject" parameterType="java.util.List"> <insert id="insertExcelEmpProject" parameterType="java.util.List">
insert into t_employee_project insert into t_employee_project
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,EMP_NO, (ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,EMP_NO,
TRY_PERIOD,ENJOIN_DATE,BANK_NAME,BANK_NO,BANK_SUB_NAME,DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME) TRY_PERIOD,ENJOIN_DATE,BANK_NAME,BANK_NO,BANK_SUB_NAME,DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME,INSURANCE_STATUS
,SOCIAL_STATUS,FUND_STATUS)
VALUES VALUES
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
( (
...@@ -623,7 +624,10 @@ ...@@ -623,7 +624,10 @@
#{item.deleteFlag,jdbcType=VARCHAR}, #{item.deleteFlag,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.createName,jdbcType=VARCHAR}, #{item.createName,jdbcType=VARCHAR},
now() now(),
0,
0,
0
) )
</foreach> </foreach>
</insert> </insert>
......
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