从业人员管理bug修复

手机端清单排查记录bug修复
dev
wangpeng 2024-07-14 07:04:55 +08:00
parent 42c4359074
commit a6d4f0787d
12 changed files with 88 additions and 160 deletions

View File

@ -368,82 +368,14 @@ public class AppCheckRecordController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String USER_NAME = pd.getString("USER_NAME");
PageData cpd = new PageData();
cpd = usersService.findById(pd);
pd.put("ISLEADER", cpd.getString("ISLEADER"));
PageData dept = new PageData();
dept.put("DEPARTMENT_ID", pd.getString("CHECK_DEPARTMENT_ID"));
dept = departmentService.findById(dept);
if (dept != null && dept.getString("ISSUPERVISE").equals("1")) {
pd.put("SUP_DEPARTMENT_ID", dept.getString("DEPARTMENT_ID"));
pd.put("ISSUPERVISE", dept.getString("ISSUPERVISE"));
} else {
pd.put("DEPARTMENT_ID", pd.getString("CHECK_DEPARTMENT_ID"));
}
if (cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")) {
String DEPARTMENT_ID = pd.getString("CHECK_DEPARTMENT_ID");
String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
ids = pd.getString("CHECK_DEPARTMENT_ID") + "," + ids; //把自己部门插入进去
if (ids != null && Tools.notEmpty(ids) && ids.lastIndexOf(",") > -1) {
ids = ids.substring(0, ids.lastIndexOf(","));
pd.put("DEPARTMENT_IDS", ids.split(","));
} else {
pd.put("DEPARTMENT_IDS", DEPARTMENT_ID);
}
}
pd.put("orderUserId", pd.get("USER_ID"));
if(StringUtils.equals(pd.getString("SUB_DEPARTMENT_IDS"), "undefined")) {
pd.put("SUB_DEPARTMENT_IDS", "");
}
List<PageData> varList = customService.getMyCheckList(pd);//列出ListManager列表
for (PageData list : varList) {
String cycle = list.getString("PERIODNAME");
if (cycle.equals("每日")) {
list.put("START_DATE", DateUtil.getDay());
list.put("END_DATE", DateUtil.getDay());
} else if (cycle.equals("每周")) {
list.put("START_DATE", DateUtil.getWeekStart().substring(0, 10));
list.put("END_DATE", DateUtil.getWeekEnd().substring(0, 10));
} else if (cycle.equals("每旬")) {
//1-10
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01 00:00:00"), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10 23:59:59"))) {
list.put("START_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "01");
list.put("END_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "10");
}
//10-20
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11 00:00:00"), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20 23:59:59"))) {
list.put("START_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "11");
list.put("END_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "20");
}
//20-月底
if (DateUtil.timeCalendar(new Date(), DateUtil.fomatDateTime(DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21 00:00:00"), DateUtil.fomatDateTime(DateUtil.getMonthEndDay() + " 23:59:59"))) {
list.put("START_DATE", DateUtil.getYear() + "-" + DateUtil.getMonth() + "-" + "21");
list.put("END_DATE", DateUtil.getMonthEndDay());
}
String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
if (Tools.notEmpty(KEYWORDS))
pd.put("KEYWORDS", KEYWORDS.trim());
PageData ls = listmanagerService.findById(pd);
} else if (cycle.equals("每月")) {
list.put("START_DATE", DateUtil.getMonthFirstDay());
list.put("END_DATE", DateUtil.getMonthEndDay());
} else if (cycle.equals("每季")) {
list.put("START_DATE", DateUtil.quarterStart());
list.put("END_DATE", DateUtil.quarterEnd());
} else if (cycle.equals("半年")) {
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
if (bmonth <= 6) {
list.put("START_DATE", DateUtil.getYear() + "-01-01");
list.put("END_DATE", DateUtil.getYear() + "-06-30");
} else if (bmonth > 6) {
list.put("START_DATE", DateUtil.getYear() + "-07-01");
list.put("END_DATE", DateUtil.getYear() + "-12-31");
}
} else if (cycle.equals("每年")) {
list.put("START_DATE", DateUtil.getCurrYearFirst());
list.put("END_DATE", DateUtil.getCurrYearLast());
}
}
List<PageData> varList = checkrecordService.appdatalist(pd);
map.put("varList", varList);
/*map.put("ls", ls);*/
map.put("ls", ls);
map.put("result", errInfo);
return map;
}
@ -462,33 +394,20 @@ public class AppCheckRecordController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = checkrecordService.findById(pd); // 根据ID读取
PageData users = checkuserService.getCheckUser(pd);
List<PageData> varList = recordItemService.listAll(pd);
pd.put("USERS", users.get("USERS"));
PageData pd2 = new PageData();
pd2.put("FOREIGN_KEY",pd.get("CHECKRECORD_ID"));
pd2.put("TYPE","13");
List<PageData> qianming = imgFilesService.listAll(pd2);
if(!StringUtils.isEmpty(pd.getString("OPERATION")) || StringUtils.equals(pd.getString("OPERATION"), "1")) {
pd = listmanagerService.findById(pd);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
sdf.parse(pd.getString("CREATTIME"));
pd.put("CREATTIME",sdf.format(sdf.parse(pd.getString("CREATTIME"))));
map.put("pd", pd);
map.put("result", errInfo);
}else{
pd = customService.findById(pd); // 根据ID读取
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
sdf.parse(pd.getString("CREATTIME"));
pd.put("CREATTIME",sdf.format(sdf.parse(pd.getString("CREATTIME"))));
PageData pageData = customCheckRecordService.findByCustomId(pd);
List<PageData> varList = customItemService.listAll(pd);
PageData pd2 = new PageData();
pd2.put("FOREIGN_KEY",pd.get("CHECKRECORD_ID"));
pd2.put("TYPE","13");
List<PageData> qianming = imgFilesService.listAll(pd2);
qianming = qianming.stream().parallel().filter(item -> StringUtils.equals(item.getString("FOREIGN_KEY"), pageData.getString("CHECKRECORD_ID"))).collect(Collectors.toList());
map.put("qianming", qianming);
map.put("varList", varList);
map.put("pd", pd);
map.put("result", errInfo);
}
map.put("qianming", qianming);
map.put("varList", varList);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}

View File

@ -135,11 +135,11 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
String format = sdf.format(date);
Date toDay = DateUtil.fomatDate(format);
Date shippingDate = DateUtil.fomatDate(pd.getString("SHIPPINGDATE"));
if (shippingDate != null && (shippingDate.after(new Date()) || String.valueOf(shippingDate).equals(String.valueOf(toDay)))) {
// if (shippingDate != null && (shippingDate.after(new Date()) || String.valueOf(shippingDate).equals(String.valueOf(toDay)))) {
pd.put("WAYBILLSTATUS", "3");
} else {
pd.put("WAYBILLSTATUS", "1");
}
// } else {
// pd.put("WAYBILLSTATUS", "1");
// }
trafficSecurityWaybillRegistrationService.save(pd);

View File

@ -146,7 +146,6 @@ public class AppUsersController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
String errInfo = "success";
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> byUserId = userCorpService.findByUserId(pd);
PageData pd2 = new PageData();
if(!CollectionUtils.isEmpty(byUserId)) {

View File

@ -2557,9 +2557,9 @@ public class UsersController extends BaseController {
data.put("USER_ID", pd.getString("USER_ID"));
data.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> dataInfoList = userCorpService.findByUserId(data);
dataInfoList = dataInfoList.stream()
.filter(userCorpData -> StringUtils.equals(userCorpData.getString("ISDELETE"), "0"))
.collect(Collectors.toList());
// dataInfoList = dataInfoList.stream()
// .filter(userCorpData -> StringUtils.equals(userCorpData.getString("ISDELETE"), "0"))
// .collect(Collectors.toList());
/*dataInfoList.sort((t1,t2) -> t2.getString("OPERATTIME").compareTo(t1.getString("OPERATTIME")));
dataInfoList.forEach(info -> {
if(StringUtils.equals(info.getString("APPLY_TYPE"), "0") && StringUtils.equals(info.getString("APPLY_STATUS"),"0")) {
@ -3417,16 +3417,16 @@ public class UsersController extends BaseController {
List<PageData> resultList = new ArrayList<>();
List<PageData> userList = usersService.getUserNoCorpinfoListAll(page); // 所有无企业信息的所有用户
Map<String, List<PageData>> dataList = userList.stream().collect(Collectors.groupingBy(data -> data.getString("USER_ID")));
dataList.forEach((key, value) -> {
resultList.add(value.get(0));
});
List<PageData> collect = resultList.stream().filter(data -> StringUtils.equals(data.getString("APPLY_TYPE"), "4") || StringUtils.equals(data.getString("APPLY_TYPE"), "3")).collect(Collectors.toList());
// Map<String, List<PageData>> dataList = userList.stream().collect(Collectors.groupingBy(data -> data.getString("USER_ID")));
// dataList.forEach((key, value) -> {
// resultList.add(value.get(0));
// });
//
// List<PageData> collect = resultList.stream().filter(data -> StringUtils.equals(data.getString("APPLY_TYPE"), "4") || StringUtils.equals(data.getString("APPLY_TYPE"), "3")).collect(Collectors.toList());
/*List<PageData> dimissionList = userCorpService.getDimissionUser();
System.out.println("dimissionList = " + dimissionList);*/
map.put("userList", collect);
map.put("userList", userList);
map.put("page", page);
map.put("pd", pd);

View File

@ -302,7 +302,7 @@ public interface UsersMapper {
List<PageData> getAllUser(PageData pd);
List<PageData> getUserNoCorpinfoListAll(Page page);
List<PageData> getUserNoCorpinfolistPage(Page page);
void editFace(PageData pd);
}

View File

@ -182,29 +182,6 @@ 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("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);

View File

@ -746,6 +746,18 @@ public class UsersServiceImpl implements UsersService {
}
pd.put("ID_PHOTO", idCard.getString("ID_PHOTO_FRONT"));
userInfoService.save(pd);
PageData pdd = new PageData();
pdd.put("USER_ID", pd.getString("USER_ID"));
userInfoService.delUserInfoPersonnelType(pdd);
String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(",");
for (String str : PERSONNEL_TYPES) {
pdd = new PageData();
pdd.put("ID", Warden.get32UUID());
pdd.put("USER_ID", pd.getString("USER_ID"));
pdd.put("PERSONNEL_TYPE", str);
userInfoService.addUserInfoPersonnelType(pdd);
}
idCard.put("USER_CERTIFICATE_ID", Warden.get32UUID());
idCard.put("USER_ID", pd.getString("USER_ID"));
idCard.put("CERTIFICATE_CATEGORY", "1"); // 身份证
@ -1018,7 +1030,19 @@ public class UsersServiceImpl implements UsersService {
@Override
public void editPractitioner(PageData pd, MultipartFile[] files) throws Exception {
usersMapper.editPractitioner(pd);
pd.put("PERSONNEL_TYPE", pd.getString("PERSONNEL_TYPE_NAME"));
PageData pdd = new PageData();
pdd.put("USER_ID", pd.getString("USER_ID"));
userInfoService.delUserInfoPersonnelType(pdd);
String[] PERSONNEL_TYPES = pd.getString("PERSONNEL_TYPE").split(",");
for (String str : PERSONNEL_TYPES) {
pdd = new PageData();
pdd.put("ID", Warden.get32UUID());
pdd.put("USER_ID", pd.getString("USER_ID"));
pdd.put("PERSONNEL_TYPE", str);
userInfoService.addUserInfoPersonnelType(pdd);
}
// pd.put("PERSONNEL_TYPE", pd.getString("PERSONNEL_TYPE_NAME"));
List<String> filePaths = new ArrayList<>();
PageData idCard = new PageData();
@ -1587,7 +1611,7 @@ public class UsersServiceImpl implements UsersService {
@Override
public List<PageData> getUserNoCorpinfoListAll(Page page) {
return usersMapper.getUserNoCorpinfoListAll(page);
return usersMapper.getUserNoCorpinfolistPage(page);
}
}

View File

@ -1,16 +1,16 @@
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no1.url=jdbc:mysql://192.168.0.103:33071/qa-traffic-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.url=jdbc:mysql://192.168.20.230:33070/qa-traffic-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.username=root
datasource.no1.password=Mysql@zcloud33071
datasource.no1.password=Mysql@zcloud33070
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no2.url=jdbc:mysql://192.168.0.103:33071/qa-traffic-admin?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no2.url=jdbc:mysql://192.168.20.230:33070/qa-traffic-admin?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no2.username=root
datasource.no2.password=Mysql@zcloud33071
datasource.no2.password=Mysql@zcloud33070
datasource.no3.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no3.url=jdbc:mysql://192.168.0.103:33071/qa-traffic-education-org?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no3.url=jdbc:mysql://192.168.20.230:33070/qa-traffic-education-org?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no3.username=root
datasource.no3.password=Mysql@zcloud33071
datasource.no3.password=Mysql@zcloud33070
#druid\u8FDE\u63A5\u6C60
spring.datasource.type: com.alibaba.druid.pool.DruidDataSource

View File

@ -101,7 +101,7 @@
r.NAME as CHECKTYPE_NAME
from
BUS_TRAFFIC_DRIVING_TYPE f
left join sys_dictionaries r on r.BIANMA=f.CHECKTYPE_ID
left join sys_dictionaries r on r.BIANMA=f.CHECKTYPE_ID and r.PARENT_ID = '5ef3a19edcb2435f8db94487834bbae3'
where
f.ISDELETE = '0'
group by f.CHECKTYPE_ID

View File

@ -596,7 +596,7 @@
END
) DATEEND,
getCheckedNum(f.CUSTOM_ID) checkCount,
(select count(1) from bus_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') overTimeCount
(select count(1) from bus_hiddendangercheckstandard_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') overTimeCount
from
<include refid="tableName"></include> f
LEFT JOIN BUS_OFFDUTY a on f.USER_ID = a.USER_ID and a.isdelete = '0' and a.STARTTIME &lt;= date_format(now(),'%Y-%m-%d') and a.ENDTIME &gt;= date_format(now(),'%Y-%m-%d')
@ -765,10 +765,10 @@
<if test="pd.OVERTIME != null and pd.OVERTIME != ''"><!-- 关键词检索 -->
<choose>
<when test='pd.OVERTIME=="1"'>
AND (select count(1) from bus_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') &gt; 0
AND (select count(1) from bus_hiddendangercheckstandard_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') &gt; 0
</when>
<when test='pd.OVERTIME=="0"'>
AND (select count(1) from bus_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') = 0
AND (select count(1) from bus_hiddendangercheckstandard_checkrecord cc where cc.CUSTOM_ID = f.CUSTOM_ID and cc.FINISHED ='1' and type ='2') = 0
</when>
<otherwise>
</otherwise>

View File

@ -131,6 +131,9 @@
update
<include refid="tableName"></include>
set
<if test="ISDELETE != null and ISDELETE != ''"><!-- 关键词检索 -->
ISDELETE = #{ISDELETE},
</if>
ENTRY_DATE = #{ENTRY_DATE},
APPLY_STATUS = #{APPLY_STATUS},
DEPARTMENT_ID = #{DEPARTMENT_ID},
@ -280,7 +283,7 @@
<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 f.CREATTIME DESC
ORDER BY f.CREATTIME DESC, ucr.CREATTIME DESC
</select>
<select id="getDimissionUser" parameterType="pd" resultType="pd">

View File

@ -1805,8 +1805,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and dic.BIANMA like '%TRAFFIC_EMPLOYMENT_DRIVE%'
and FIND_IN_SET(dic.DICTIONARIES_ID,info.PERSONNEL_TYPE)) as PERSONNEL_TYPE_NAME
,uc.USER_CORP_ID
,uc.APPLY_TYPE
,uc.APPLY_STATUS
,uc1.APPLY_TYPE
,uc1.APPLY_STATUS
from <include refid="tableName"></include> u
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
@ -1833,6 +1833,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</choose>
</if> AND t2.USER_ID = t1.USER_ID)
) uc on uc.USER_ID = u.USER_ID and uc.ISDELETE = 0
left join (
SELECT t1.USER_CORP_ID, t1.CORPINFO_ID, t1.USER_ID, t1.APPLY_TYPE, t1.APPLY_STATUS, t1.ISDELETE
FROM SYS_USER_CORP t1
WHERE t1.CREATTIME = (
SELECT MAX(t2.CREATTIME)
FROM SYS_USER_CORP t2
WHERE t2.USER_ID = t1.USER_ID)
) uc1 on uc1.USER_ID = u.USER_ID
where u.ISDELETE = 0
and u.USERNAME != 'admin'
<if test="pd.VIPLEVEL != null and pd.VIPLEVEL != ''"> <!-- 角色检索 -->
@ -2006,7 +2014,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by d.LEVEL asc ,d.DEP_ORDER,d.DEPARTMENT_ID asc, u.SORT asc,u.USER_ID
</select>
<select id="getUserNoCorpinfoListAll" parameterType="page" resultType="pd" >
<select id="getUserNoCorpinfolistPage" parameterType="page" resultType="pd" >
SELECT DISTINCT
u.USER_ID,
u.USERNAME,
@ -2042,13 +2050,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.ISHEAD,
u.CARDNO,
u.PLS_ID,
u.ISLEADER,
c.*
u.ISLEADER
FROM
<include refid="tableName"/> u
left join sys_user_corp c on u.USER_ID = c.USER_ID
WHERE
(u.CORPINFO_ID = '' OR u.CORPINFO_ID = NULL)
WHERE u.ISMAIN != '1' and (u.CORPINFO_ID = '' OR u.CORPINFO_ID is NULL)
and u.USER_ID not in (select USER_ID FROM SYS_USER_CORP WHERE ISDELETE = '0')
<if test="pd.NAME != null and pd.NAME != ''">
and u.NAME LIKE CONCAT(CONCAT('%', #{pd.NAME}),'%')
</if>
@ -2058,7 +2064,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="pd.PHONE != null and pd.PHONE != ''">
and u.PHONE LIKE CONCAT(CONCAT('%', #{pd.PHONE}),'%')
</if>
order by c.CREATTIME desc
order by u.NAME desc
</select>
<update id="editFace" parameterType="pd" >