Commit 3f843c34 authored by fangxinjiang's avatar fangxinjiang

合同续签-fxj

parent 6c708757
......@@ -350,7 +350,6 @@ public class TEmpContractAlert extends BaseEntity {
/**
* 前端客服
*/
@TableField(exist = false)
@ExcelAttribute(name = "前端客服" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("前端客服")
......@@ -360,7 +359,6 @@ public class TEmpContractAlert extends BaseEntity {
/**
* 前端客服
*/
@TableField(exist = false)
@ExcelAttribute(name = "前端客服" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("前端客服")
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
import java.util.List;
......@@ -27,6 +31,12 @@ public class ContractAlertSearchVo extends TEmpContractAlert {
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* 预计合同发起时间区间 [开始时间,结束时间]
*/
@Schema(description = "预计合同发起时间区间")
private LocalDateTime[] startEndTimecreate;
/**
* @Author fxj
* 查询数据起
......@@ -51,12 +61,12 @@ public class ContractAlertSearchVo extends TEmpContractAlert {
/**
* @Author fxj
* 合同截止时间区间查询--开始
* 合同预计发起时间区间查询--开始
**/
private LocalDateTime expectedCollectionTimeStart;
/**
* @Author fxj
* 合同截止时间区间查询--截止
* 合同预计发起时间区间查询--截止
**/
private LocalDateTime expectedCollectionTimeEnd;
......@@ -75,6 +85,15 @@ public class ContractAlertSearchVo extends TEmpContractAlert {
/**
* 合同IDS
*/
@TableField(exist = false)
@Schema(description = "合同IDS")
private List<String> idList;
@Schema(description = "处理状态数组")
@TableField(exist = false)
private List<String> statusList;
@TableField(exist = false)
@Schema(description = "前端客服")
private String customerUserLoginname;
}
......@@ -37,7 +37,7 @@ public class TEmployeeContractPreNewSearchVo extends TEmployeeContractPreNew {
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
private List<String> ids;
/**
* 创建时间区间 [开始时间,结束时间]
......
......@@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractPreNewService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistRevokeVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
......@@ -75,8 +72,8 @@ public class TEmployeeContractPreNewController {
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/getDetailList")
public R<List<TEmployeeContractPreNewDetailVo>> getDetailList( TEmployeeContractPreNewSearchVo tEmployeeContractPreNew) {
@PostMapping("/getDetailList")
public R<List<TEmployeeContractPreNewDetailVo>> getDetailList(@RequestBody ContractAlertSearchVo tEmployeeContractPreNew) {
return tEmployeeContractPreNewService.getDetailList(tEmployeeContractPreNew);
}
/**
......@@ -87,8 +84,8 @@ public class TEmployeeContractPreNewController {
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/getDetailListCount")
public R<Integer> getDetailListCount( TEmployeeContractPreNewSearchVo tEmployeeContractPreNew) {
@PostMapping("/getDetailListCount")
public R<Integer> getDetailListCount(@RequestBody ContractAlertSearchVo tEmployeeContractPreNew) {
return tEmployeeContractPreNewService.getDetailListCount(tEmployeeContractPreNew);
}
......
......@@ -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.TEmployeeContractPreNew;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewSearchVo;
......@@ -47,9 +48,9 @@ public interface TEmployeeContractPreNewMapper extends BaseMapper<TEmployeeContr
List<EmployeeContractVO> getDisPatcherContractListRenew(@Param("idList") List<String> idList,@Param("statusList") List<String> statusList,@Param("type") String type);
List<TEmployeeContractPreNewDetailVo> getDetailList(@Param("tEmployeeContractPreNew")TEmployeeContractPreNewSearchVo tEmployeeContractPreNew);
List<TEmployeeContractPreNewDetailVo> getDetailList(@Param("tEmpContractAlert") ContractAlertSearchVo tEmployeeContractPreNew);
List<String> getUnDispatchList();
int getDetailListCount(@Param("tEmployeeContractPreNew")TEmployeeContractPreNewSearchVo tEmployeeContractPreNew);
int getDetailListCount(@Param("tEmpContractAlert") ContractAlertSearchVo tEmployeeContractPreNew);
}
......@@ -23,12 +23,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPreNew;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistRevokeVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
......@@ -71,7 +68,7 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra
R<TEmployeeContractPreNew> getInfoByPreId(String preId);
R<List<TEmployeeContractPreNewDetailVo>> getDetailList(TEmployeeContractPreNewSearchVo tEmployeeContractPreNew);
R<List<TEmployeeContractPreNewDetailVo>> getDetailList(ContractAlertSearchVo tEmployeeContractPreNew);
R<TEmployeeContractInfo> getRenewContractByPreId(String preId);
......@@ -79,7 +76,7 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra
void pushDisConfrimContracts();
R<Integer> getDetailListCount(TEmployeeContractPreNewSearchVo tEmployeeContractPreNew);
R<Integer> getDetailListCount(ContractAlertSearchVo tEmployeeContractPreNew);
R getContractTerm(String startDate, String endDate);
}
......@@ -52,6 +52,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -1088,11 +1089,16 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
@Override
public IPage<ContractAlertAutoVo> getTEmpContractAlertAutoPage(Page<TEmpContractAlert> page, ContractAlertSearchVo tEmpContractAlert){
// 如果查询条件续签状态为空默认查询 非已完成 状态数据
if (Common.isNotNull(tEmpContractAlert.getProcessStatusList())){
if (!Common.isNotNull(tEmpContractAlert.getProcessStatusList())){
tEmpContractAlert.setProcessStatusList(Stream.of("0","1","2","3","4","5","6","7","8","10","11").collect(Collectors.toList()));
}
//初始化客服的项目权限 ,管理员及SSC 全量
initSearchVo(tEmpContractAlert);
if (ArrayUtil.isNotEmpty(tEmpContractAlert.getStartEndTimecreate())
&& tEmpContractAlert.getStartEndTimecreate().length == 2) {
tEmpContractAlert.setExpectedCollectionTimeStart(tEmpContractAlert.getStartEndTimecreate()[0]);
tEmpContractAlert.setExpectedCollectionTimeEnd(tEmpContractAlert.getStartEndTimecreate()[1]);
}
return baseMapper.getTEmpContractAlertAutoPage(page,tEmpContractAlert);
}
......
......@@ -59,6 +59,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.text.ParseException;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*;
......@@ -187,7 +188,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
@Override
public List<TEmployeeContractPreNew> noPageDiy(TEmployeeContractPreNewSearchVo searchVo) {
LambdaQueryWrapper<TEmployeeContractPreNew> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
List<String> idList =searchVo.getIds();
if (Common.isNotNull(idList)) {
wrapper.in(TEmployeeContractPreNew::getId, idList);
}
......@@ -200,7 +201,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
private Long noPageCountDiy(TEmployeeContractPreNewSearchVo searchVo) {
LambdaQueryWrapper<TEmployeeContractPreNew> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
List<String> idList = searchVo.getIds();
if (Common.isNotNull(idList)) {
wrapper.in(TEmployeeContractPreNew::getId, idList);
}
......@@ -405,7 +406,16 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
//续签合同发起时间类型 :0 上一份合同到期前一个月
if (null != rule && CommonConstants.ZERO_STRING.equals(rule.getRenewalDateType()) && null != contract.getContractEnd()){
pre.setExpectedCollectionTime(DateUtil.addDayByDate(DateUtil.addMonthByDate(contract.getContractEnd(),-1),-1));
Date dateTemp = null;
try {
dateTemp = DateUtil.parseDate(DateUtil.dateToString(
contract.getContractEnd(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE);
} catch (ParseException e) {
dateTemp = new Date();
}
if (null!=dateTemp){
pre.setExpectedCollectionTime(DateUtil.addDayByDate(DateUtil.addMonthByDate(dateTemp,-1),-1));
}
}
preList.add(pre);
}
......@@ -1508,21 +1518,35 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
@Override
public R<List<TEmployeeContractPreNewDetailVo>> getDetailList(TEmployeeContractPreNewSearchVo tEmployeeContractPreNew) {
public R<List<TEmployeeContractPreNewDetailVo>> getDetailList(ContractAlertSearchVo tEmployeeContractPreNew) {
//系统会自动拉取当前客服且“预计合同发起时间”为空的或为今日及今日之前的,续签状态为“待发起、发起失败、审核不通过、签署失败”的合同信息
//续签状态,0待确认,1待发起,2线下签待审核,3线下签审核不通过4线下签待归档5发起失败6签署中7签署失败8电子待归档9(已归档-电子签+线下签)已完结10撤销签署
List<String> statusList = new ArrayList<>();
statusList.add(CommonConstants.FIVE_STRING);
statusList.add(CommonConstants.ONE_STRING);
statusList.add(CommonConstants.FIVE_STRING);
statusList.add(CommonConstants.TEN_STRING);
statusList.add(CommonConstants.ELEVEN_STRING);
statusList.add(CommonConstants.SEVEN_STRING);
statusList.add(CommonConstants.THREE_STRING);
tEmployeeContractPreNew.setStatusList(statusList);
initSearchVo(tEmployeeContractPreNew);
if (ArrayUtil.isNotEmpty(tEmployeeContractPreNew.getStartEndTimecreate())
&& tEmployeeContractPreNew.getStartEndTimecreate().length == 2) {
tEmployeeContractPreNew.setExpectedCollectionTimeStart(tEmployeeContractPreNew.getStartEndTimecreate()[0]);
tEmployeeContractPreNew.setExpectedCollectionTimeEnd(tEmployeeContractPreNew.getStartEndTimecreate()[1]);
}
return R.ok(baseMapper.getDetailList(tEmployeeContractPreNew));
}
@Override
public R<Integer> getDetailListCount(TEmployeeContractPreNewSearchVo tEmployeeContractPreNew) {
public R<Integer> getDetailListCount(ContractAlertSearchVo tEmployeeContractPreNew) {
//系统会自动拉取当前客服且“预计合同发起时间”为空的或为今日及今日之前的,续签状态为“待发起、发起失败、审核不通过、签署失败”的合同信息
List<String> statusList = new ArrayList<>();
statusList.add(CommonConstants.FIVE_STRING);
statusList.add(CommonConstants.ONE_STRING);
statusList.add(CommonConstants.FIVE_STRING);
statusList.add(CommonConstants.TEN_STRING);
statusList.add(CommonConstants.ELEVEN_STRING);
statusList.add(CommonConstants.SEVEN_STRING);
statusList.add(CommonConstants.THREE_STRING);
tEmployeeContractPreNew.setStatusList(statusList);
initSearchVo(tEmployeeContractPreNew);
return R.ok(baseMapper.getDetailListCount(tEmployeeContractPreNew));
......@@ -1537,7 +1561,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return R.ok( term);
}
public void initSearchVo(TEmployeeContractPreNewSearchVo searchVo) {
public void initSearchVo(ContractAlertSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
......@@ -1561,6 +1585,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
public R<TEmployeeContractInfo> getRenewContractByPreId(String preId) {
return R.ok(contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreId, preId)
.orderByDesc(BaseEntity::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)));
}
......
......@@ -156,6 +156,8 @@ public class DoFascTask {
|| fddEvent.equals("sign-task-fill-rejected")) {
// 3:签署任务参与方签署失败事件
preNew.setProcessStatus(CommonConstants.dingleDigitStrArray[7]);
preNew.setErrorInfo(terminationNote);
preNew.setErrorTime(new Date());
preNew.setRequestId("");
tEmployeeContractPreNewService.updateById(preNew);
......
......@@ -347,6 +347,12 @@
<if test="tEmpContractAlert.expectedCollectionTimeEnd != null">
AND b.EXPECTED_COLLECTION_TIME <![CDATA[ <= ]]> #{tEmpContractAlert.expectedCollectionTimeEnd}
</if>
<if test="tEmpContractAlert.contractEndStart != null">
AND a.CONTRACT_END <![CDATA[ >= ]]> #{tEmpContractAlert.contractEndStart}
</if>
<if test="tEmpContractAlert.contractEndEnd != null">
AND a.CONTRACT_END <![CDATA[ <= ]]> #{tEmpContractAlert.contractEndEnd}
</if>
<if test="tEmpContractAlert.csLoginName != null and tEmpContractAlert.csLoginName.trim() != ''">
AND a.CS_LOGIN_NAME = #{tEmpContractAlert.csLoginName}
</if>
......
......@@ -198,6 +198,183 @@
a.create_time,
a.update_by
</sql>
<sql id="tEmpContractAlert_where">
<if test="tEmpContractAlert != null">
<if test="tEmpContractAlert.id != null and tEmpContractAlert.id.trim() != ''">
AND a.ID = #{tEmpContractAlert.id}
</if>
<if test="tEmpContractAlert.empName != null and tEmpContractAlert.empName.trim() != ''">
AND a.EMP_NAME = #{tEmpContractAlert.empName}
</if>
<if test="tEmpContractAlert.empId != null and tEmpContractAlert.empId.trim() != ''">
AND a.EMP_ID = #{tEmpContractAlert.empId}
</if>
<if test="tEmpContractAlert.deptId != null and tEmpContractAlert.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmpContractAlert.deptId}
</if>
<if test="tEmpContractAlert.project != null and tEmpContractAlert.project.trim() != ''">
AND a.PROJECT = #{tEmpContractAlert.project}
</if>
<if test="tEmpContractAlert.deptNoList != null and tEmpContractAlert.deptNoList.size > 0">
AND a.PROJECT in
<foreach item="idStr" index="index" collection="tEmpContractAlert.deptNoList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmpContractAlert.idList != null and tEmpContractAlert.idList.size > 0">
AND a.id in
<foreach item="id" index="index" collection="tEmpContractAlert.idList" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="tEmpContractAlert.projectNo != null and tEmpContractAlert.projectNo.trim() != ''">
AND a.PROJECT_NO = #{tEmpContractAlert.projectNo}
</if>
<if test="tEmpContractAlert.empIdcard != null and tEmpContractAlert.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmpContractAlert.empIdcard}
</if>
<if test="tEmpContractAlert.empCode != null and tEmpContractAlert.empCode.trim() != ''">
AND a.EMP_CODE = #{tEmpContractAlert.empCode}
</if>
<if test="tEmpContractAlert.contractStart != null">
AND a.CONTRACT_START = #{tEmpContractAlert.contractStart}
</if>
<if test="tEmpContractAlert.contractEnd != null">
AND a.CONTRACT_END = #{tEmpContractAlert.contractEnd}
</if>
<if test="tEmpContractAlert.fileProvince != null and tEmpContractAlert.fileProvince.trim() != ''">
AND a.FILE_PROVINCE = #{tEmpContractAlert.fileProvince}
</if>
<if test="tEmpContractAlert.fileCity != null and tEmpContractAlert.fileCity.trim() != ''">
AND a.FILE_CITY = #{tEmpContractAlert.fileCity}
</if>
<if test="tEmpContractAlert.fileTown != null and tEmpContractAlert.fileTown.trim() != ''">
AND a.FILE_TOWN = #{tEmpContractAlert.fileTown}
</if>
<if test="tEmpContractAlert.empType != null and tEmpContractAlert.empType.trim() != ''">
AND a.EMP_TYPE = #{tEmpContractAlert.empType}
</if>
<if test="tEmpContractAlert.contractType != null and tEmpContractAlert.contractType.trim() != ''">
AND a.CONTRACT_TYPE = #{tEmpContractAlert.contractType}
</if>
<if test="tEmpContractAlert.contractTerm != null and tEmpContractAlert.contractTerm.trim() != ''">
AND a.CONTRACT_TERM = #{tEmpContractAlert.contractTerm}
</if>
<if test="tEmpContractAlert.daysDue != null">
AND a.DAYS_DUE = #{tEmpContractAlert.daysDue}
</if>
<if test="tEmpContractAlert.dueFlag != null and tEmpContractAlert.dueFlag.trim() != ''">
AND a.DUE_FLAG = #{tEmpContractAlert.dueFlag}
</if>
<if test="tEmpContractAlert.daysOver != null">
AND a.DAYS_OVER = #{tEmpContractAlert.daysOver}
</if>
<if test="tEmpContractAlert.firstAlertTime != null">
AND a.FIRST_ALERT_TIME = #{tEmpContractAlert.firstAlertTime}
</if>
<if test="tEmpContractAlert.alertPerson != null and tEmpContractAlert.alertPerson.trim() != ''">
AND a.ALERT_PERSON = #{tEmpContractAlert.alertPerson}
</if>
<if test="tEmpContractAlert.createBy != null and tEmpContractAlert.createBy.trim() != ''">
AND a.CREATE_BY = #{tEmpContractAlert.createBy}
</if>
<if test="tEmpContractAlert.updateBy != null and tEmpContractAlert.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tEmpContractAlert.updateBy}
</if>
<if test="tEmpContractAlert.createName != null and tEmpContractAlert.createName.trim() != ''">
AND a.CREATE_NAME = #{tEmpContractAlert.createName}
</if>
<if test="tEmpContractAlert.createTime != null">
AND a.CREATE_TIME = #{tEmpContractAlert.createTime}
</if>
<if test="tEmpContractAlert.updateTime != null">
AND a.UPDATE_TIME = #{tEmpContractAlert.updateTime}
</if>
<if test="tEmpContractAlert.handleStatus != null and tEmpContractAlert.handleStatus.trim() != ''">
AND a.HANDLE_STATUS = #{tEmpContractAlert.handleStatus}
</if>
<if test="tEmpContractAlert.contractId != null and tEmpContractAlert.contractId.trim() != ''">
AND a.CONTRACT_ID = #{tEmpContractAlert.contractId}
</if>
<if test="tEmpContractAlert.auditTime != null">
AND a.AUDIT_TIME = #{tEmpContractAlert.auditTime}
</if>
<if test="tEmpContractAlert.unitId != null and tEmpContractAlert.unitId.trim() != ''">
AND a.UNIT_ID = #{tEmpContractAlert.unitId}
</if>
<if test="tEmpContractAlert.unitName != null and tEmpContractAlert.unitName.trim() != ''">
AND a.UNIT_NAME = #{tEmpContractAlert.unitName}
</if>
<if test="tEmpContractAlert.unitNo != null and tEmpContractAlert.unitNo.trim() != ''">
AND a.UNIT_NO = #{tEmpContractAlert.unitNo}
</if>
<if test="tEmpContractAlert.empPhone != null and tEmpContractAlert.empPhone.trim() != ''">
AND a.EMP_PHONE = #{tEmpContractAlert.empPhone}
</if>
<if test="tEmpContractAlert.isFeedback != null">
AND a.IS_FEEDBACK = #{tEmpContractAlert.isFeedback}
</if>
<if test="tEmpContractAlert.feedbackPerson != null and tEmpContractAlert.feedbackPerson.trim() != ''">
AND a.FEEDBACK_PERSON = #{tEmpContractAlert.feedbackPerson}
</if>
<if test="tEmpContractAlert.feedbackTime != null">
AND a.FEEDBACK_TIME = #{tEmpContractAlert.feedbackTime}
</if>
<if test="tEmpContractAlert.feedbackReason != null and tEmpContractAlert.feedbackReason.trim() != ''">
AND a.FEEDBACK_REASON = #{tEmpContractAlert.feedbackReason}
</if>
<if test="tEmpContractAlert.feedbackDetail != null and tEmpContractAlert.feedbackDetail.trim() != ''">
AND a.FEEDBACK_DETAIL = #{tEmpContractAlert.feedbackDetail}
</if>
<if test="tEmpContractAlert.applyNo != null and tEmpContractAlert.applyNo.trim() != ''">
AND a.APPLY_NO = #{tEmpContractAlert.applyNo}
</if>
<if test="tEmpContractAlert.post != null and tEmpContractAlert.post.trim() != ''">
AND a.POST = #{tEmpContractAlert.post}
</if>
<if test="tEmpContractAlert.workingHours != null and tEmpContractAlert.workingHours.trim() != ''">
AND a.WORKING_HOURS = #{tEmpContractAlert.workingHours}
</if>
<if test="tEmpContractAlert.expectedCollectionTime != null">
AND b.EXPECTED_COLLECTION_TIME = #{tEmpContractAlert.expectedCollectionTime}
</if>
<if test="tEmpContractAlert.signType != null">
AND b.SIGN_TYPE = #{tEmpContractAlert.signType}
</if>
<if test="tEmpContractAlert.processStatus != null and tEmpContractAlert.processStatus.trim() != ''">
AND IFNULL(b.PROCESS_STATUS,'0') = #{tEmpContractAlert.processStatus}
</if>
<if test="tEmpContractAlert.processStatusList != null and tEmpContractAlert.processStatusList.size>0">
AND IFNULL(b.PROCESS_STATUS,'0') IN
<foreach collection="tEmpContractAlert.processStatusList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tEmpContractAlert.csName != null and tEmpContractAlert.csName.trim() != ''">
AND a.CS_NAME like CONCAT('%',#{tEmpContractAlert.csName},'%')
</if>
<if test="tEmpContractAlert.expectedCollectionTimeStart != null">
AND b.EXPECTED_COLLECTION_TIME <![CDATA[ >= ]]> #{tEmpContractAlert.expectedCollectionTimeStart}
</if>
<if test="tEmpContractAlert.expectedCollectionTimeEnd != null">
AND b.EXPECTED_COLLECTION_TIME <![CDATA[ <= ]]> #{tEmpContractAlert.expectedCollectionTimeEnd}
</if>
<if test="tEmpContractAlert.contractEndStart != null">
AND a.CONTRACT_END <![CDATA[ >= ]]> #{tEmpContractAlert.contractEndStart}
</if>
<if test="tEmpContractAlert.contractEndEnd != null">
AND a.CONTRACT_END <![CDATA[ <= ]]> #{tEmpContractAlert.contractEndEnd}
</if>
<if test="tEmpContractAlert.csLoginName != null and tEmpContractAlert.csLoginName.trim() != ''">
AND a.CS_LOGIN_NAME = #{tEmpContractAlert.csLoginName}
</if>
<if test="tEmpContractAlert.autoFlag != null and tEmpContractAlert.autoFlag.trim() != ''">
AND a.AUTO_FLAG = #{tEmpContractAlert.autoFlag}
</if>
</if>
</sql>
<sql id="tEmployeeContractPreNew_where">
<if test="tEmployeeContractPreNew != null">
<if test="tEmployeeContractPreNew.id != null and tEmployeeContractPreNew.id.trim() != ''">
......@@ -481,7 +658,7 @@
a.emp_idcard empIdcard,
a.dept_no deptNo,
a.situation,
a.contract_name contractName,
a.contract_type contractName,
a.contract_term contractType,
a.CONTRACT_SUB_NAME contractSubName,
null reason,
......@@ -520,116 +697,123 @@
SELECT
a.id
FROM t_employee_contract_pre_new a
where a.process_status in('3','4','7') and (a.expected_collection_time is null or a.expected_collection_time <![CDATA[ <= ]]> now())
where a.process_status in('3','5','7') and (a.expected_collection_time is null or a.expected_collection_time <![CDATA[ <= ]]> now())
</select>
<!--tEmployeeContractPreNew简单分页查询-->
<select id="getDetailList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractPreNewDetailVo">
SELECT
a.id,
a.dept_name,
a.dept_no,
a.dept_id,
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.employee_nature,
a.position,
a.customer_username,
a.customer_user_loginname,
a.sign_type,
a.contract_content,
a.fadada_template,
a.data_source,
a.process_status,
a.config_name,
a.update_flag,
a.contract_type,
a.signatory,
a.expected_confirm_time,
a.expected_collection_time,
a.situation,
a.contract_term,
case when a.CONTRACT_TYPE = 5 then a.internship_period_start
else a.contract_start end as "CONTRACT_START",
case when a.CONTRACT_TYPE = 5 then a.internship_period_end
else a.contract_end end as "CONTRACT_END",
a.post_type,
a.post,
a.working_dept,
a.work_address,
a.working_hours,
a.salary_type,
a.other_wage,
a.default_amount,
a.contract_duration_year,
a.contract_duration_month,
a.labor_cost,
a.risk_buy_desc,
a.salary_standard_per_hour,
a.salary_standard_per_piece,
a.config_id,
a.work_type,
a.work_day_count,
a.work_day,
a.work_hours,
a.settlement_cycle,
a.payment_time,
a.payment_type,
a.working_company,
a.dispatch_period_year,
a.dispatch_period_month,
a.dispatch_period_start,
a.dispatch_period_end,
a.other_work_day,
a.internship_period,
a.internship_period_start,
a.internship_period_end,
a.sign_flag,
a.error_info,
a.contract_id,
a.revoke_reason,
a.error_time,
a.contract_end_type,
a.confirm_emp_select,
a.timeout_elec_sign,
a.task,
a.task_type,
a.task_end_standard,
a.contract_flag,
a.CONTRACT_SUB_NAME,
a.fadada_template_id,
a.request_id,
a.request_msg,
a.over_flag,
a.change_type_reason,
a.change_type_user,
a.change_type_time,
a.is_urg,
a.working_reward,
a.update_time,
a.create_by,
a.create_name,
a.create_time,
a.update_by,
b.CONTRACT_START as "CONTRACT_START_PRE",
b.CONTRACT_END as "CONTRACT_END_PRE"
FROM t_employee_contract_pre_new a
LEFT JOIN t_employee_contract_info b on b.id=a.contract_id
b.id,
b.dept_name,
b.dept_no,
b.dept_id,
b.employee_name,
b.emp_idcard,
b.emp_phone,
b.employee_nature,
b.position,
b.customer_username,
b.customer_user_loginname,
b.sign_type,
b.contract_content,
b.fadada_template,
b.data_source,
b.process_status,
b.config_name,
b.update_flag,
b.contract_type,
b.signatory,
b.expected_confirm_time,
b.expected_collection_time,
b.situation,
b.contract_term,
case when b.CONTRACT_TYPE = 5 then b.internship_period_start
else b.contract_start end as "CONTRACT_START",
case when b.CONTRACT_TYPE = 5 then b.internship_period_end
else b.contract_end end as "CONTRACT_END",
b.post_type,
b.post,
b.working_dept,
b.work_address,
b.working_hours,
b.salary_type,
b.other_wage,
b.default_amount,
b.contract_duration_year,
b.contract_duration_month,
b.labor_cost,
b.risk_buy_desc,
b.salary_standard_per_hour,
b.salary_standard_per_piece,
b.config_id,
b.work_type,
b.work_day_count,
b.work_day,
b.work_hours,
b.settlement_cycle,
b.payment_time,
b.payment_type,
b.working_company,
b.dispatch_period_year,
b.dispatch_period_month,
b.dispatch_period_start,
b.dispatch_period_end,
b.other_work_day,
b.internship_period,
b.internship_period_start,
b.internship_period_end,
b.sign_flag,
b.error_info,
b.contract_id,
b.revoke_reason,
b.error_time,
b.contract_end_type,
b.confirm_emp_select,
b.timeout_elec_sign,
b.task,
b.task_type,
b.task_end_standard,
b.contract_flag,
b.CONTRACT_SUB_NAME,
b.fadada_template_id,
b.request_id,
b.request_msg,
b.over_flag,
b.change_type_reason,
b.change_type_user,
b.change_type_time,
b.is_urg,
b.working_reward,
b.update_time,
b.create_by,
b.create_name,
b.create_time,
b.update_by,
a.CONTRACT_START as "CONTRACT_START_PRE",
a.CONTRACT_END as "CONTRACT_END_PRE"
FROM t_employee_contract_pre_new b
LEFT JOIN t_emp_contract_alert a on b.contract_id=a.contract_id
<where>
1=1 AND (a.expected_collection_time is null or a.expected_collection_time <![CDATA[ <= ]]> concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if test="tEmployeeContractPreNew != null">
<if test="tEmployeeContractPreNew.statusList != null and tEmployeeContractPreNew.statusList.size>0">
AND a.process_status IN
<foreach collection="tEmployeeContractPreNew.statusList" item="item" index="index" open="(" separator="," close=")">
1=1 AND (b.expected_collection_time is null or b.expected_collection_time <![CDATA[ <= ]]> concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if test="tEmpContractAlert != null">
<if test="tEmpContractAlert.statusList != null and tEmpContractAlert.statusList.size>0">
AND b.process_status IN
<foreach collection="tEmpContractAlert.statusList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tEmployeeContractPreNew.customerUserLoginname != null and tEmployeeContractPreNew.customerUserLoginname.trim() != ''">
AND a.customer_user_loginname = #{tEmployeeContractPreNew.customerUserLoginname}
<if test="tEmpContractAlert.customerUserLoginname != null and tEmpContractAlert.customerUserLoginname.trim() != ''">
AND a.CS_LOGIN_NAME = #{tEmpContractAlert.customerUserLoginname}
</if>
<if test="tEmpContractAlert.idList != null and tEmpContractAlert.idList.size > 0">
AND a.id in
<foreach item="id" index="index" collection="tEmpContractAlert.idList" open="(" separator=","
close=")">
#{id}
</foreach>
</if>
</if>
<include refid="tEmployeeContractPreNew_where"/>
<include refid="tEmpContractAlert_where"/>
</where>
limit 2000
</select>
......@@ -637,21 +821,29 @@
<select id="getDetailListCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_contract_pre_new a
FROM t_employee_contract_pre_new b
LEFT JOIN t_emp_contract_alert a on b.contract_id=a.contract_id
<where>
1=1 AND (a.expected_collection_time is null or a.expected_collection_time <![CDATA[ <= ]]> concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if test="tEmployeeContractPreNew != null">
<if test="tEmployeeContractPreNew.statusList != null and tEmployeeContractPreNew.statusList.size>0">
AND a.process_status IN
<foreach collection="tEmployeeContractPreNew.statusList" item="item" index="index" open="(" separator="," close=")">
1=1 AND (b.expected_collection_time is null or b.expected_collection_time <![CDATA[ <= ]]> concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if test="tEmpContractAlert != null">
<if test="tEmpContractAlert.statusList != null and tEmpContractAlert.statusList.size>0">
AND b.process_status IN
<foreach collection="tEmpContractAlert.statusList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tEmployeeContractPreNew.customerUserLoginname != null and tEmployeeContractPreNew.customerUserLoginname.trim() != ''">
AND a.customer_user_loginname = #{tEmployeeContractPreNew.customerUserLoginname}
<if test="tEmpContractAlert.customerUserLoginname != null and tEmpContractAlert.customerUserLoginname.trim() != ''">
AND a.CS_LOGIN_NAME = #{tEmpContractAlert.customerUserLoginname}
</if>
<if test="tEmpContractAlert.idList != null and tEmpContractAlert.idList.size > 0">
AND a.id in
<foreach item="id" index="index" collection="tEmpContractAlert.idList" open="(" separator=","
close=")">
#{id}
</foreach>
</if>
</if>
<include refid="tEmployeeContractPreNew_where"/>
<include refid="tEmpContractAlert_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