Commit 0e1dc97d authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.16' into MVP1.7.16

parents 466d8596 63387ef6
......@@ -210,8 +210,12 @@ public class FascUtil {
template.setSignTemplateId(signTemplateId);
template.setSignTemplateName(mainInfo.getSignTemplateName());
template.setSignTemplateStatus(mainInfo.getSignTemplateStatus());
if (Common.isNotNull(mainInfo.getCreateTime())) {
template.setFascCreateTime(LocalDateTimeUtils.coverStringToLDT(mainInfo.getCreateTime()));
template.setUpdateTime(LocalDateTimeUtils.coverStringToLDT(mainInfo.getUpdateTime()));
}
if (Common.isNotNull(mainInfo.getUpdateTime())) {
template.setFascUpdateTime(LocalDateTimeUtils.coverStringToLDT(mainInfo.getUpdateTime()));
}
template.setCompanyId(company.getId());
template.setCompanyName(company.getCompanyName());
......
......@@ -708,6 +708,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//服务类型包含社保购买时
if (preVo.getServerItem().contains("社保") && (null != preVo.getExitSocialInfoList()
|| null != preVo.getDispatchInfoPreVo())) {
if (null != preVo.getExitSocialInfoList() && !preVo.getExitSocialInfoList().isEmpty()) {
preVo.getExitSocialInfoList().forEach(socialPreDetailVo -> socialPreDetailVo.setRegisterId(domainR.getData()));
}
//生成社保待购买或者已购买数据
if (null != preVo.getDispatchInfoPreVo()) {
initSocialPreInfo(registration, preVo.getDispatchInfoPreVo(), user, domainR.getData());
......@@ -1208,8 +1211,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//服务类型包含社保购买时
if (preVo.getServerItem().contains("社保") && (null != preVo.getExitSocialInfoList()
|| null != preVo.getDispatchInfoPreVo())) {
if (null != preVo.getExitSocialInfoList() && !preVo.getExitSocialInfoList().isEmpty()) {
preVo.getExitSocialInfoList().forEach(socialPreDetailVo -> socialPreDetailVo.setRegisterId(domainR.getData()));
}
//生成社保待购买或者已购买数据
if (null != preVo.getDispatchInfoPreVo()) {
initSocialPreInfo(registrationNow, preVo.getDispatchInfoPreVo(), user, domainR.getData());
}
socialDaprUtils.saveSocialPreInfo(preVo);
}
}
......
......@@ -785,7 +785,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialFund) && Common.isNotNull(dispatch)) {
socialFund.setDispatchId(dispatch.getId());
}
initSocialFundAndInsert(emp, social, fund, socialFund, project, dispatchPart, injury,dispatch.getPreId());
initSocialFundAndInsert(emp, social, fund, socialFund, project, dispatchPart, injury,dispatch);
}
// 生成预付数据
if (Common.isNotNull(socialFund) && Common.isNotNull(socialFund.getId())) {
......@@ -965,7 +965,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TProvidentFund fund,
TSocialFundInfo socialFund,
EmpProjectDispatchVo project,
boolean dispatchPart, boolean injury,String preId) {
boolean dispatchPart, boolean injury,TDispatchInfo dispatch) {
if (Common.isNotNull(socialFund)) {
if (Common.isNotNull(project)) {
socialFund.setEmpNo(project.getEmpCode());
......@@ -1141,8 +1141,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFundMapper.insert(socialFund);
}
//派单完成更新社保待购买表的状态
if (Common.isNotNull(preId)) {
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectById(preId);
if (Common.isNotNull(dispatch.getPreId())) {
TDispatchInfoPre dispatchInfoPre = dispatchInfoPreMapper.selectById(dispatch.getPreId());
if (Common.isNotNull(dispatchInfoPre)) {
dispatchInfoPre.setProcessStatus(CommonConstants.THREE_STRING);
dispatchInfoPre.setDispatcherId(socialFund.getDispatchId());
......@@ -4452,7 +4452,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatchInfoPre.setProcessStatus(CommonConstants.SIX_STRING);
dispatchInfoPre.setErrorBackInfo(null);
}
Map<String, String> loginNameMap = new HashMap<>();
if (sf.getSocialStatus().equals(CommonConstants.FOUR_STRING)) {
dispatchInfoPre.setProcessStatus(CommonConstants.NINE_STRING);
......
......@@ -131,7 +131,6 @@
a.WORK_INJURY_CARDINAL,
a.BIRTH_CARDINAL,
a.PAYMENT_TYPE,
a.CONTRACT_STATUS,
a.CONTRACT_ID,
a.CREATE_BY,
a.UPDATE_BY,
......@@ -141,7 +140,7 @@
a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info,a.position,SOCIAL_FUND_ID,a.phone,
a.SOCIAL_PROVINCE_ID,a.SOCIAL_CITY_ID,a.SOCIAL_TOWN_ID
</sql>
<sql id="tDispatchInfoPre_where">
<sql id="tDispatchInfoPre_other_where">
<if test="tDispatchInfoPre != null">
<if test="tDispatchInfoPre.id != null and tDispatchInfoPre.id.trim() != ''">
AND a.ID = #{tDispatchInfoPre.id}
......@@ -226,15 +225,104 @@
</if>
</if>
</sql>
<sql id="tDispatchInfoPre_where">
<if test="tDispatchInfoPre != null">
<if test="tDispatchInfoPre.id != null and tDispatchInfoPre.id.trim() != ''">
AND a.ID = #{tDispatchInfoPre.id}
</if>
<if test="tDispatchInfoPre.idList != null and tDispatchInfoPre.idList.size() > 0">
and a.id in
<foreach collection="tDispatchInfoPre.idList" item="param" index="index" open="(" close=")"
separator=",">
#{param}
</foreach>
</if>
<if test="tDispatchInfoPre.statusList != null and tDispatchInfoPre.statusList.size() > 0">
AND a.process_status in
<foreach item="item" index="index" collection="tDispatchInfoPre.statusList" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
<if test="tDispatchInfoPre.empName != null and tDispatchInfoPre.empName.trim() != ''">
AND a.EMP_NAME like CONCAT('%',#{tDispatchInfoPre.empName},'%')
</if>
<if test="tDispatchInfoPre.empIdcard != null and tDispatchInfoPre.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tDispatchInfoPre.empIdcard}
</if>
<if test="tDispatchInfoPre.processStatus != null and tDispatchInfoPre.processStatus.trim() != ''">
AND a.PROCESS_STATUS = #{tDispatchInfoPre.processStatus}
</if>
<if test="tDispatchInfoPre.deptName != null and tDispatchInfoPre.deptName.trim() != ''">
AND a.DEPT_NAME like CONCAT('%',#{tDispatchInfoPre.deptName},'%')
</if>
<if test="tDispatchInfoPre.deptNo != null and tDispatchInfoPre.deptNo.trim() != ''">
AND a.DEPT_NO = #{tDispatchInfoPre.deptNo}
</if>
<if test="tDispatchInfoPre.providentHouseholdName != null and tDispatchInfoPre.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfoPre.providentHouseholdName}
</if>
<if test="tDispatchInfoPre.socialHouseholdName != null and tDispatchInfoPre.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfoPre.socialHouseholdName}
</if>
<if test="tDispatchInfoPre.typeSub != null and tDispatchInfoPre.typeSub.trim() != ''">
AND a.TYPE_SUB = #{tDispatchInfoPre.typeSub}
</if>
<if test="tDispatchInfoPre.customerUsername != null and tDispatchInfoPre.customerUsername.trim() != ''">
AND a.CUSTOMER_USERNAME = #{tDispatchInfoPre.customerUsername}
</if>
<if test="tDispatchInfoPre.customerUserLoginName != null and tDispatchInfoPre.customerUserLoginName.trim() != ''">
AND a.CUSTOMER_USER_LOGIN_NAME = #{tDispatchInfoPre.customerUsername.customerUserLoginName}
</if>
<if test="tDispatchInfoPre.expectedCollectionTime != null">
AND DATE_FORMAT(a.EXPECTED_COLLECTION_TIME,'%Y-%m-%d') = CURDATE()
</if>
<if test="tDispatchInfoPre.dispatcherTimeStart != null">
AND DATE_FORMAT(a.EXPECTED_COLLECTION_TIME,'%Y-%m-%d') <![CDATA[ >= ]]> #{tDispatchInfoPre.dispatcherTimeStart}
</if>
<if test="tDispatchInfoPre.dispatcherTimeEnd != null">
and DATE_FORMAT(a.EXPECTED_COLLECTION_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> #{tDispatchInfoPre.dispatcherTimeEnd}
</if>
<if test="tDispatchInfoPre.expectedConfirmTime != null">
AND a.EXPECTED_CONFIRM_TIME = #{tDispatchInfoPre.expectedConfirmTime}
</if>
<if test="tDispatchInfoPre.isAutoDis != null and tDispatchInfoPre.isAutoDis.trim() != ''">
AND a.IS_AUTO_DIS = #{tDispatchInfoPre.isAutoDis}
</if>
<if test="tDispatchInfoPre.isCreateDate != null and tDispatchInfoPre.isCreateDate.trim() != ''">
AND a.IS_CREATE_DATE = #{tDispatchInfoPre.isCreateDate}
</if>
<if test="tDispatchInfoPre.contractStatus != null and tDispatchInfoPre.contractStatus.trim() != ''">
AND if(b.id is not null,'0','1') = #{tDispatchInfoPre.contractStatus}
</if>
<if test="tDispatchInfoPre.failType != null and tDispatchInfoPre.failType.trim() != ''">
AND a.error_info is not null
</if>
<if test="tDispatchInfoPre.authSql != null and tDispatchInfoPre.authSql.trim() != ''">
${tDispatchInfoPre.authSql}
</if>
<if test="tDispatchInfoPre.deptNoList != null and tDispatchInfoPre.deptNoList.size > 0">
AND a.dept_no in
<foreach item="idStr" index="index" collection="tDispatchInfoPre.deptNoList" open="(" separator=","
close=")">
#{idStr}
</foreach>
</if>
</if>
</sql>
<!--tDispatchInfoPre简单分页查询-->
<select id="getTDispatchInfoPrePage" resultMap="tDispatchInfoPreMap">
SELECT
<include refid="Base_Column_List"/>
if(b.id is not null,'0','1') as CONTRACT_STATUS
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0'
<include refid="tDispatchInfoPre_where"/>
</where>
group by a.id
order by a.create_time desc
</select>
......@@ -244,7 +332,7 @@
FROM t_dispatch_info_pre a
<where>
1=1
<include refid="tDispatchInfoPre_where"/>
<include refid="tDispatchInfoPre_other_where"/>
</where>
</select>
......@@ -257,7 +345,7 @@
a.SOCIAL_HOUSEHOLD_NAME,
a.RECORD_BASE,
DATE_FORMAT(a.join_leave_date,'%Y-%m-%d') as join_leave_date,
if(a.CONTRACT_STATUS = '0','已签署',if(a.CONTRACT_STATUS = '1','未签署','')) as CONTRACT_STATUS,
if(b.id is not null,'已签署','未签署') as CONTRACT_STATUS,
CASE WHEN a.process_status ='0' THEN "待确认"
WHEN a.process_status='1' THEN "待派单"
WHEN a.process_status ='2' THEN "派单失败"
......@@ -272,6 +360,7 @@
a.expected_collection_time,
a.customer_username
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0'
<include refid="tDispatchInfoPre_where"/>
......@@ -289,7 +378,7 @@
FROM t_dispatch_info_pre a
<where>
a.DELETE_FLAG = '0'
<include refid="tDispatchInfoPre_where"/>
<include refid="tDispatchInfoPre_other_where"/>
</where>
order by a.create_time desc
limit 0,2000
......
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