优化BUG 人员类型不显示

dev
xiepeng 2024-05-23 10:32:45 +08:00
parent baf00e296e
commit eae9b520d2
12 changed files with 76 additions and 26 deletions

View File

@ -745,7 +745,7 @@ public class UsersController extends BaseController {
pd = this.getPageData();
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = userInfoService.getUserCardId(pd);
if (pd != null && !StringUtils.isEmpty(pd.getString("ENTRY_DATE"))) {
if (pd != null && !StringUtils.isEmpty(pd.getString("ENTRY_DATE")) && !"".equals(pd.getString("ENTRY_DATE"))) {
map.put("pd", pd);
}
map.put("result", errInfo); //返回结果
@ -2555,11 +2555,15 @@ public class UsersController extends BaseController {
PageData data = new PageData();
data.put("USER_ID", pd.getString("USER_ID"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
PageData userReviewInfo = userCorpReviewService.findByUserId(data);
List<PageData> dataInfoList = userCorpService.findByUserId(data);
dataInfoList = dataInfoList.stream()
.filter(userCorpData -> StringUtils.equals(userCorpData.getString("ISDELETE"), "0"))
.collect(Collectors.toList());
System.out.println("dataInfoList = " + dataInfoList);
map.put("pd", pd);
map.put("statusInfo", dataInfoList.get(0));
map.put("userCerList", userCerList);
map.put("certificateList", certificateList);
map.put("statusInfo", userReviewInfo);
map.put("result", errInfo);
return map;
}
@ -3017,6 +3021,15 @@ public class UsersController extends BaseController {
if(!CollectionUtil.isEmpty(userCorpList)) {
if(StringUtils.equals(userCorpList.get(0).getString("APPLY_STATUS"), "-1")) {
userCorpList.get(0).put("APPLY_STATUS", "0");
userCorpList.get(0).put("TITLE", pd.getString("TITLE"));
userCorpList.get(0).put("DUTIES", pd.getString("DUTIES"));
userCorpList.get(0).put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
userCorpList.get(0).put("POST_ID", pd.getString("POST_ID"));
userCorpList.get(0).put("ENTRY_DATE", pd.getString("ENTRY_DATE"));
userCorpList.get(0).put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE"));
userCorpList.get(0).put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO"));
}
}
userCorpService.edit(userCorpList.get(0));

View File

@ -76,5 +76,7 @@ public interface UserCorpMapper {
* @throws Exception
*/
void setPractitionerCorpInvalid(PageData pd);
List<PageData> findByUserId(PageData data);
}

View File

@ -55,6 +55,5 @@ public interface UserCorpReviewMapper {
*/
void deleteAll(String[] ArrayDATA_IDS);
PageData findByUserId(PageData data);
}

View File

@ -55,6 +55,5 @@ public interface UserCorpReviewService {
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
PageData findByUserId(PageData data);
}

View File

@ -84,5 +84,7 @@ public interface UserCorpService {
void setPractitionerCorpInvalid(PageData pd) throws Exception;
Object setPractitionerConfirmByUser(PageData pd) throws Exception;
List<PageData> findByUserId(PageData data);
}

View File

@ -81,9 +81,5 @@ public class UserCorpReviewServiceImpl implements UserCorpReviewService {
userCorpReviewMapper.deleteAll(ArrayDATA_IDS);
}
@Override
public PageData findByUserId(PageData data) {
return userCorpReviewMapper.findByUserId(data);
}
}

View File

@ -182,6 +182,30 @@ public class UserCorpServiceImpl implements UserCorpService {
userInfo.put("INCUMBENCY", "bd4d802e94354230b1bb19cfabd7f810"); // 在职
userInfoService.setPractitionerReview(userInfo);
} else {
//补充人员关联信息(企业、部门、岗位、排班)
PageData user = new PageData();
Warden.initData(user, "app", pd);
user.put("USER_ID", pd.getString("USER_ID"));
user.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
user.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
user.put("POST_ID", pd.getString("POST_ID"));
user.put("SHIFTDUTYONE", pd.getString("SHIFTDUTYONE"));
user.put("SHIFTDUTYTWO", pd.getString("SHIFTDUTYTWO"));
user.put("DURATION", pd.getString("DURATION"));
user.put("WORKSTATUS", pd.getString("WORKSTATUS"));
user.put("WORKPERIOD", pd.getString("WORKPERIOD"));
usersService.setPractitionerConfirm(user);
//补充人员附加信息(工种、入职时间、职务、职称、在职状态)
PageData userInfo = new PageData();
Warden.initData(userInfo, "app", pd);
userInfo.put("USER_ID", pd.getString("USER_ID"));
userInfo.put("TYPE_OF_WORK", pd.getString("POST_ID"));
userInfo.put("ENTRY_DATE", pd.getString("ENTRY_DATE"));
userInfo.put("DUTIES", pd.getString("DUTIES"));
userInfo.put("TITLE", pd.getString("TITLE"));
userInfo.put("INCUMBENCY", "bd4d802e94354230b1bb19cfabd7f810"); // 在职
userInfoService.setPractitionerReview(userInfo);
pd.put("ISDELETE", "2");
}
userCorpMapper.edit(pd);
@ -234,5 +258,9 @@ public class UserCorpServiceImpl implements UserCorpService {
setPractitionerReviewResignation(uc);
}
@Override
public List<PageData> findByUserId(PageData data) {
return userCorpMapper.findByUserId(data);
}
}

View File

@ -9,6 +9,7 @@ import com.zcloud.mapper.datasource.system.UsersMapper;
import com.zcloud.service.corp.CorpInfoService;
import com.zcloud.service.system.*;
import com.zcloud.util.*;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.crypto.hash.SimpleHash;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -1137,9 +1138,9 @@ public class UsersServiceImpl implements UsersService {
throw new Exception("人脸图像不符合要求,请重新上传");
}
}
if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
/*if (!IdcardUtils.validateCard(pd.getString("USER_ID_CARD"))) {
return ReturnMap.error("身份证号校验不通过,请核对信息");
}
}*/
PageData corp = new PageData();
corp.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
corp = corpInfoService.findById(corp);
@ -1201,7 +1202,11 @@ public class UsersServiceImpl implements UsersService {
dicPd.put("BIANMA", "zhiwu");
dicPd.put("NAME", pd.getString("DUTIESValue"));
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
pd.put("DUTIES", dicPd.getString("DICTIONARIES_ID"));
}else{
pd.put("DUTIES", pd.getString("DUTIES"));
}
}
applyCorp.put("DUTIES", pd.getString("DUTIES")); // 职务
if ("select".equals(pd.getString("letTitleType"))) {
@ -1212,7 +1217,11 @@ public class UsersServiceImpl implements UsersService {
dicPd.put("BIANMA", "zhicheng");
dicPd.put("NAME", pd.getString("letTitleValue"));
dicPd = dictionariesCorpService.saveByZidongxinzeng(dicPd);
if(!StringUtils.isEmpty(dicPd.getString("NAME")) || !"".equals(dicPd.getString("NAME"))) {
pd.put("TITLE", dicPd.getString("DICTIONARIES_ID"));
}else{
pd.put("TITLE", pd.getString("TITLE"));
}
}
applyCorp.put("TITLE", pd.getString("TITLE")); // 职称
userCorpService.save(applyCorp);

View File

@ -268,4 +268,17 @@
where
USER_ID = #{USER_ID} and ISDELETE = '0'
</update>
<select id="findByUserId" resultType="com.zcloud.entity.PageData">
SELECT
<include refid="Field"/>,
ucr.REVIEW_RESULT,
ucr.REVIEW_COMMENTS,
ucr.CREATTIME AS AUDIT_DATE
FROM
<include refid="tableName"/> f
LEFT JOIN sys_user_corp_review ucr on ucr.USER_CORP_ID = f.USER_CORP_ID
WHERE f.USER_ID = #{USER_ID} AND f.CORPINFO_ID = #{CORPINFO_ID}
ORDER BY ucr.CREATTIME DESC
</select>
</mapper>

View File

@ -146,15 +146,4 @@
#{item}
</foreach>
</delete>
<select id="findByUserId" resultType="com.zcloud.entity.PageData">
SELECT
f.*,
suc.APPLY_TYPE
FROM
<include refid="tableName"/> f
LEFT JOIN SYS_USER_CORP suc on suc.USER_ID = f.USER_ID
WHERE f.USER_ID = #{USER_ID} AND f.ISDELETE = '0'
AND suc.ISDELETE = '0' AND suc.CORPINFO_ID = #{CORPINFO_ID}
</select>
</mapper>

View File

@ -281,7 +281,7 @@
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_ID
where f.USER_ID_CARD = #{USER_ID_CARD}
where f.USER_ID_CARD = #{USER_ID_CARD} AND f.ENTRY_DATE != ''
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
and u.CORPINFO_ID != #{CORPINFO_ID}
</if>