Commit fe033b35 authored by chenyuxi's avatar chenyuxi

feat: 瓜子档案提交时间调整

parent 4593f2a3
...@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; ...@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -577,4 +578,7 @@ public class TGzEmpInfo extends BaseEntity { ...@@ -577,4 +578,7 @@ public class TGzEmpInfo extends BaseEntity {
@Schema(description = "档案状态(0:已提交,1:暂存)") @Schema(description = "档案状态(0:已提交,1:暂存)")
private String empStatus; private String empStatus;
@Schema(description = "档案提交时间")
private LocalDateTime submitTime;
} }
...@@ -543,10 +543,10 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -543,10 +543,10 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
if (Common.isEmpty(gzEmpId)) { if (Common.isEmpty(gzEmpId)) {
tGzEmpInfo.setCreateBy(user.getId()); tGzEmpInfo.setCreateBy(user.getId());
tGzEmpInfo.setCreateName(user.getNickname()); tGzEmpInfo.setCreateName(user.getNickname());
tGzEmpInfo.setCreateTime(null); tGzEmpInfo.setSubmitTime(null);
// 1.7.14: 档案状态是提交,才存 创建时间(提交时间) // 1.7.14: 档案状态是提交,才存 提交时间
if(CommonConstants.ZERO_STRING.equals(tGzEmpInfoVo.getEmpStatus())){ if(CommonConstants.ZERO_STRING.equals(tGzEmpInfoVo.getEmpStatus())){
tGzEmpInfo.setCreateTime(LocalDateTime.now()); tGzEmpInfo.setSubmitTime(LocalDateTime.now());
} }
this.save(tGzEmpInfo); this.save(tGzEmpInfo);
gzEmpId = tGzEmpInfo.getId(); gzEmpId = tGzEmpInfo.getId();
...@@ -555,7 +555,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -555,7 +555,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
tGzEmpInfo.setUpdateTime(LocalDateTime.now()); tGzEmpInfo.setUpdateTime(LocalDateTime.now());
// 1.7.14: 档案状态是提交,更新 创建时间(提交时间) // 1.7.14: 档案状态是提交,更新 创建时间(提交时间)
if(CommonConstants.ZERO_STRING.equals(tGzEmpInfoVo.getEmpStatus())){ if(CommonConstants.ZERO_STRING.equals(tGzEmpInfoVo.getEmpStatus())){
tGzEmpInfo.setCreateTime(LocalDateTime.now()); tGzEmpInfo.setSubmitTime(LocalDateTime.now());
} }
this.updateById(tGzEmpInfo); this.updateById(tGzEmpInfo);
} }
......
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
<result property="accountProvinceAreaId" column="account_province_area_id"/> <result property="accountProvinceAreaId" column="account_province_area_id"/>
<result property="accountCityAreaId" column="account_city_area_id"/> <result property="accountCityAreaId" column="account_city_area_id"/>
<result property="empStatus" column="emp_status"/> <result property="empStatus" column="emp_status"/>
<result property="submitTime" column="submit_time"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.id, a.id,
...@@ -183,7 +184,8 @@ ...@@ -183,7 +184,8 @@
a.hukou_county_area_id, a.hukou_county_area_id,
a.account_province_area_id, a.account_province_area_id,
a.account_city_area_id, a.account_city_area_id,
a.emp_status a.emp_status,
a.submit_time
</sql> </sql>
<sql id="tGzEmpInfo_where"> <sql id="tGzEmpInfo_where">
<if test="tGzEmpInfo != null"> <if test="tGzEmpInfo != null">
...@@ -216,10 +218,10 @@ ...@@ -216,10 +218,10 @@
</if> </if>
<!--查询提交档案时间--> <!--查询提交档案时间-->
<if test="tGzEmpInfo.createTimeStart != null "> <if test="tGzEmpInfo.createTimeStart != null ">
AND a.create_time &gt;= #{tGzEmpInfo.createTimeStart} AND a.submit_time &gt;= #{tGzEmpInfo.createTimeStart}
</if> </if>
<if test="tGzEmpInfo.createTimeEnd != null "> <if test="tGzEmpInfo.createTimeEnd != null ">
AND a.create_time &lt;= #{tGzEmpInfo.createTimeEnd} AND a.submit_time &lt;= #{tGzEmpInfo.createTimeEnd}
</if> </if>
<if test="tGzEmpInfo.createBy != null and tGzEmpInfo.createBy.trim() != ''"> <if test="tGzEmpInfo.createBy != null and tGzEmpInfo.createBy.trim() != ''">
AND a.create_by = #{tGzEmpInfo.createBy} AND a.create_by = #{tGzEmpInfo.createBy}
...@@ -416,7 +418,7 @@ ...@@ -416,7 +418,7 @@
a.del_flag = '0' a.del_flag = '0'
<include refid="tGzEmpInfo_where"/> <include refid="tGzEmpInfo_where"/>
</where> </where>
ORDER by a.emp_status,a.create_time desc,a.id desc ORDER by a.emp_status,a.submit_time desc,a.id desc
</select> </select>
<!--count--> <!--count-->
...@@ -440,7 +442,7 @@ ...@@ -440,7 +442,7 @@
a.emp_push_status, a.emp_push_status,
a.contract_push_status, a.contract_push_status,
a.contract_atta_push_status, a.contract_atta_push_status,
date_format(a.create_time, '%Y-%m-%d %H:%i:%s') create_time, date_format(a.submit_time, '%Y-%m-%d %H:%i:%s') create_time,
a.create_by, a.create_by,
a.create_name, a.create_name,
a.update_by, a.update_by,
...@@ -523,7 +525,7 @@ ...@@ -523,7 +525,7 @@
<include refid="tGzEmpInfo_where"/> <include refid="tGzEmpInfo_where"/>
</where> </where>
group by a.id group by a.id
ORDER by a.emp_status,a.create_time desc,a.id desc ORDER by a.emp_status,a.submit_time desc,a.id desc
<if test="tGzEmpInfo.limitStart != null"> <if test="tGzEmpInfo.limitStart != null">
limit #{tGzEmpInfo.limitStart},#{tGzEmpInfo.limitEnd} limit #{tGzEmpInfo.limitStart},#{tGzEmpInfo.limitEnd}
</if> </if>
......
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