Commit 67506bc9 authored by fangxinjiang's avatar fangxinjiang

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

parents daff768f 1169719f
......@@ -244,8 +244,9 @@ public class TEmployeeInfo extends BaseEntity {
/**
* 人员档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
* 1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入
*/
@Schema(description = "人员档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)")
@Schema(description = "人员档案来源(字典:1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入)")
private String fileSource;
/**
......@@ -306,29 +307,34 @@ public class TEmployeeInfo extends BaseEntity {
* 减档操作人id
*/
@Schema(description = "减档操作人id")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveUser;
/**
* 减档操作人姓名
*/
@Schema(description = "离职操作姓名")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveUserName;
/**
* 离职时间
*/
@Schema(description = "离职时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime leaveTime;
/**
* 离职原因
*/
@Schema(description = "离职原因")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveReason;
/**
* 离职备注
*/
@Schema(description = "离职备注")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveRemark;
/**
......
......@@ -16,10 +16,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.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -110,24 +107,28 @@ public class TEmployeeProject extends BaseEntity {
* 减项操作人id
*/
@Schema(description ="减项操作人id")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveUser;
/**
* 减项时间
*/
@Schema(description ="减项时间")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime leaveTime;
/**
* 减项原因
*/
@Schema(description ="减项原因")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveReason;
/**
* 减项备注
*/
@Schema(description ="减项备注")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String leaveRemark;
/**
......
......@@ -17,6 +17,7 @@
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.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
......@@ -55,9 +56,11 @@ public class EmployeeExportVO extends BaseEntity {
private String empIdcard;
@ExcelProperty(value = "身份证开始日期")
@DateTimeFormat("yyyy-MM-dd")
private LocalDateTime validityStart;
@ExcelProperty(value = "身份证截止日期")
@DateTimeFormat("yyyy-MM-dd")
private LocalDateTime validityEnd;
@ExcelAttribute(name = "婚姻状况", isDataId = true,dataType = ExcelAttributeConstants.EMP_MARRIED)
......@@ -121,18 +124,21 @@ public class EmployeeExportVO extends BaseEntity {
private String major;
@ExcelProperty(value = "入学时间")
@DateTimeFormat("yyyy-MM-dd")
private LocalDateTime admissionDate;
@ExcelProperty(value = "毕业时间")
@DateTimeFormat("yyyy-MM-dd")
private LocalDateTime gradutionDate;
@ExcelProperty(value = "档案备注")
private String remark;
/**
* 人员档案来源(字典:4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
* 人员档案来源(字典:4档案新增、5项目档案新建、1社保/公积金、3商险、2薪酬)
* 档案新建、批量导入、社保/公积金派单、商险派单、人员发薪
*/
@ExcelAttribute(name = "人员档案来源", readConverterExp = "1=社保公积金,2=薪酬,3=商险,4=人员档案新建")
@ExcelAttribute(name = "人员档案来源", readConverterExp = "1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入")
@ExcelProperty(value = "人员档案来源")
private String fileSource;
......@@ -183,12 +189,6 @@ public class EmployeeExportVO extends BaseEntity {
@ExcelProperty(value = "近3个月发薪")
private String salaryStatus;
@ExcelProperty(value = "创建人")
private String createName;
@ExcelProperty(value = "创建时间")
private LocalDateTime proCreateTime;
@ExcelProperty(value = "减档操作人")
private String leaveUserName;
......
......@@ -21,7 +21,6 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
......@@ -42,7 +41,6 @@ public class EmployeeVO implements Serializable {
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull(message = "员工类型不能为空")
@ExcelProperty(value = "员工类型")
private String empNatrue;
......
......@@ -80,5 +80,5 @@ public class EmployeeXProjectVO extends RowIndex implements Serializable {
@ExcelProperty(value ="是否同步减档")
@NotNull(message = "是否同步减档不能为空")
@ExcelAttribute(name = "是否同步减档",isNotEmpty = true, errorInfo = "是否同步减档不能为空",maxLength = 1)
private Integer isLeaveEmployee;
private String isLeaveEmployee;
}
......@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import lombok.Data;
import javax.validation.constraints.NotNull;
......@@ -38,14 +39,16 @@ public class TEmpChangeInfoVO implements Serializable {
/**
* 员工姓名
*/
@NotNull(message = "员工姓名不可为空")
@NotNull(message = "员工姓名不能为空")
@ExcelAttribute(name = "员工姓名",isNotEmpty = true, errorInfo = "员工姓名不能为空",maxLength = 20)
@ExcelProperty(value ="员工姓名")
private String empName;
/**
* 身份证号
*/
@NotNull(message = "身份证号不可为空")
@NotNull(message = "身份证号不能为空")
@ExcelAttribute(name = "身份证号",isNotEmpty = true, errorInfo = "身份证号不能为空",maxLength = 20)
@ExcelProperty(value ="身份证号")
private String empIdcard;
......@@ -53,18 +56,23 @@ public class TEmpChangeInfoVO implements Serializable {
* 原项目编码
*/
@ExcelProperty(value ="原项目编码")
@NotNull(message = "原项目编码不能为空")
@ExcelAttribute(name = "原项目编码",isNotEmpty = true, errorInfo = "原项目编码不能为空",maxLength = 20)
private String oldSettleCode;
/**
* 新项目编码
*/
@ExcelProperty(value ="新项目编码")
@NotNull(message = "新项目编码不能为空")
@ExcelAttribute(name = "新项目编码",isNotEmpty = true, errorInfo = "新项目编码不能为空",maxLength = 20)
private String newSettleCode;
/**
* 已产生未结算费用 0:划转 1:不划转
*/
@ExcelProperty(value ="已产生未结算费用")
@NotNull(message = "已产生未结算费用不能为空")
private String unsettleDeal;
/**
......
......@@ -133,7 +133,7 @@ public class TEmployeeProjectController {
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_del')" )
public R removeById(@PathVariable String id) {
return R.ok(tEmployeeProjectService.removeById(id));
return R.ok(tEmployeeProjectService.removeProjectInfo(id));
}
/**
......
......@@ -50,6 +50,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R updateProject(TEmployeeProject tEmployeeProject);
R removeProjectInfo(String id);
/**
* @param tEmployeeProject
* @Description: 减项
......
......@@ -115,6 +115,26 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
errorMsg = new HashSet<>();
TEmpChangeInfoVO excel = excelVOList.get(i);
Calendar calendar = Calendar.getInstance();
int month = calendar.get(Calendar.MONTH) + 1;
if (excel.getUnsettleDeal().equals(CommonConstants.IS_CHANGE)) {
if (Common.isEmpty(excel.getChangeStartMonth())) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.CHANGE_START_MONTH_EXIT, excel.getNewSettleCode()));
} else if (Integer.parseInt(excel.getChangeStartMonth()) > month ) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.CHANGE_LESS_MONTH_EXIT, excel.getNewSettleCode()));
}
}
//项目编码校验
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, excel.getNewSettleCode())
.eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING));
if (Common.isEmpty(tSettleDomain)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_SEARCH_NOT_EXIST, excel.getNewSettleCode()));
}
//待划转员工已在目标结算主体下不可划转
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getNewSettleCode())
......@@ -129,14 +149,14 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) {
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo,updateTEmployeePro.getDeptNo()).eq(TSettleDomain::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tSettleDomain)) {
if (CommonConstants.ONE_STRING.equals(updateTEmployeePro.getProjectStatus())) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
} else if (Common.isNotNull(tSettleDomain)) {
updateTEmployeePro.setDeptNo(tSettleDomain.getDepartNo());
updateTEmployeePro.setDeptId(tSettleDomain.getId());
updateTEmployeePro.setDeptName(tSettleDomain.getDepartName());
TCustomerInfo tCustomerInfo = tCustomerInfoService.getById(tSettleDomain.getCustomerId());
if(Common.isNotNull(tCustomerInfo)) {;
if (Common.isNotNull(tCustomerInfo)) {
updateTEmployeePro.setUnitId(tCustomerInfo.getId());
updateTEmployeePro.setUnitNo(tCustomerInfo.getCustomerCode());
updateTEmployeePro.setUnitName(tCustomerInfo.getCustomerName());
......@@ -146,6 +166,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeePro.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro);
}
} else {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_SEARCH_EXIT, excel.getOldSettleCode()));
}
} else {
// 数据不合法
......
......@@ -104,9 +104,6 @@
<if test="fddContractAttachInfo.salaryStandardPerPiece != null">
AND a.SALARY_STANDARD_PER_PIECE = #{fddContractAttachInfo.salaryStandardPerPiece}
</if>
<if test="fddContractAttachInfo.createUserId != null and fddContractAttachInfo.createUserId.trim() != ''">
AND a.CREATE_USER_ID = #{fddContractAttachInfo.createUserId}
</if>
<if test="fddContractAttachInfo.fddTemplateId != null and fddContractAttachInfo.fddTemplateId.trim() != ''">
AND a.FDD_TEMPLATE_ID = #{fddContractAttachInfo.fddTemplateId}
</if>
......
......@@ -48,7 +48,7 @@
a.EMP_IDCARD,
b.EMP_NO,
b.UNIT_NAME,
b.deptNo,
b.DEPT_NO,
b.DEPT_NAME,
a.DATA_TYPE,
a.ATTA_INFO,
......@@ -72,9 +72,6 @@
<if test="tElecEmployeeInfo.empIdcard != null and tElecEmployeeInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tElecEmployeeInfo.empIdcard}
</if>
<if test="tElecEmployeeInfo.empCode != null and tElecEmployeeInfo.empCode.trim() != ''">
AND b.EMP_CODE = #{tElecEmployeeInfo.empCode}
</if>
<if test="tElecEmployeeInfo.unitName != null and tElecEmployeeInfo.unitName.trim() != ''">
AND b.UNIT_NAME like concat('%',#{tElecEmployeeInfo.unitName},'%')
</if>
......
......@@ -207,8 +207,8 @@
a.FILE_SOURCE,
if(count(b.id)>1,'是','否') IS_PROJECTS,
a.PROJECT_NUM,
GROUP_CONCAT(b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(b.DEPT_NO) DEPT_NO,
GROUP_CONCAT(DISTINCT b.DEPT_NAME) DEPT_NAME,
GROUP_CONCAT(DISTINCT b.DEPT_NO) DEPT_NO,
a.CONTRACT_STATUS,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
......@@ -426,8 +426,8 @@
SELECT
a.ID,
<include refid="Base_Export_List"/>
,GROUP_CONCAT(b.unit_name) UNIT_NAME
,GROUP_CONCAT(b.unit_no) UNIT_NO
,GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME
,GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_REASON
......@@ -544,8 +544,8 @@
<select id="getTEmployeeLeaveExportList" resultMap="tEmployeeExportMap">
SELECT
<include refid="Base_Export_List"/>
,GROUP_CONCAT(b.unit_name) UNIT_NAME
,GROUP_CONCAT(b.unit_no) UNIT_NO
,GROUP_CONCAT(DISTINCT b.unit_name) UNIT_NAME
,GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_REASON
......
......@@ -595,12 +595,11 @@
ID=#{i.id}
</foreach>
</update>
<insert id="insertExcelEmpProject" parameterType="java.util.List">
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,
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)
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,
DEPT_ID,DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO,EMP_NO,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
<foreach collection="list" item="item" index="index" separator=",">
(
......@@ -615,6 +614,11 @@
#{item.deptNo,jdbcType=VARCHAR},
#{item.contractType,jdbcType=VARCHAR},
#{item.post,jdbcType=VARCHAR},
#{item.deptId,jdbcType=VARCHAR},
#{item.deptName,jdbcType=VARCHAR},
#{item.unitId,jdbcType=VARCHAR},
#{item.unitName,jdbcType=VARCHAR},
#{item.unitNo,jdbcType=VARCHAR},
#{item.empNo,jdbcType=VARCHAR},
#{item.tryPeriod,jdbcType=VARCHAR},
#{item.enjoinDate,jdbcType=DATE},
......
......@@ -317,4 +317,7 @@ public interface CommonConstants {
* @author fxj
*/
int THREE_INT_NEGATE = -3;
// 是否
String IS_CHANGE = "划转";
}
......@@ -295,8 +295,33 @@ public interface ErrorCodes {
* 人员在该项目下存在进行中/未完结的服务
*/
String ARCHIVES_PROJECT_CHANGE_NOT_EXIST = "archives.project.change.not.exist";
/**
* 存在其他草稿/已审核的状态的项目,不允许同步减档
*/
String QT_PROJECT_CHANGE_NOT_EXIST = "qt.project.change.not.exist";
/**
* 未找到对应的项目,请核实
*/
String PROJECT_SEARCH_NOT_EXIST = "project.search.not.exist";
/**
* 不良记录费用损失和其他损失不可同时为空
*/
String ARCHIVES_PROJECT_EMP_LOSE_FEE_NOT_EMPTY = "archives.project.emp.lose.fee.not.empty";
/**
* 划转起始月不能为空
*/
String CHANGE_START_MONTH_EXIT = "change.strat.month.exit";
/**
* 划转起始月要小于等于当前月
*/
String CHANGE_LESS_MONTH_EXIT = "change.less.month.exit";
/**
* 未找到该人员的项目档案,请核实
*/
String PROJECT_PERSON_SEARCH_EXIT = "project.person.search.exit";
/**
* 该人员项目档案已减项,不允许划转
*/
String PROJECT_PERSON_DELETE_EXIT = "project.person.delete.exit";
}
......@@ -98,6 +98,15 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u635F\u5931\u548C\u5176\u4ED6\u635F\u5931\u4E0D\u53EF\u540C\u65F6\u4E3A\u7A7A
qt.project.change.not.exist=\u5B58\u5728\u5176\u4ED6\u8349\u7A3F/\u5DF2\u5BA1\u6838\u7684\u72B6\u6001\u7684\u9879\u76EE\uFF0C\u4E0D\u5141\u8BB8\u540C\u6B65\u51CF\u6863
project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u9879\u76EE\uFF0C\u8BF7\u6838\u5B9E
change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A
change.less.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u8981\u5C0F\u4E8E\u7B49\u4E8E\u5F53\u524D\u6708
project.person.search.exit=\u672A\u627E\u5230\u8BE5\u4EBA\u5458\u7684\u9879\u76EE\u6863\u6848\uFF0C\u8BF7\u6838\u5B9E
project.person.delete.exit=\u8BE5\u4EBA\u5458\u9879\u76EE\u6863\u6848\u5DF2\u51CF\u9879\uFF0C\u4E0D\u5141\u8BB8\u5212\u8F6C
......
......@@ -21,7 +21,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -50,7 +50,7 @@ public class AreaController {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.Integer, java.lang.String>>
**/
@Inner
@GetMapping("/inner/getAreaToId")
@PostMapping("/inner/getAreaToId")
public R<Map<String, String>> getAreaToId() {
return sysAreaService.getAreaToId();
}
......@@ -63,7 +63,7 @@ public class AreaController {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
@Inner
@GetMapping("/inner/getAreaToName")
@PostMapping("/inner/getAreaToName")
public R<Map<String, String>> getAreaToName() {
return sysAreaService.getAreaToName();
}
......
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