add: 定位卡号维护信息

cmt1.0
dearlin 2023-11-28 16:57:13 +08:00
parent 6d238d6cc1
commit c2b835ebfa
5 changed files with 33 additions and 0 deletions

View File

@ -517,6 +517,7 @@ public class UsersController extends BaseController {
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
// if(pd.get("USERAVATARURL")!=null && !pd.getString("USERAVATARURL").equals("")){ // if(pd.get("USERAVATARURL")!=null && !pd.getString("USERAVATARURL").equals("")){
// System.out.println("USERAVATARURL原长度"+pd.getString("USERAVATARURL").length()); // System.out.println("USERAVATARURL原长度"+pd.getString("USERAVATARURL").length());
// String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); // String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
@ -562,6 +563,12 @@ public class UsersController extends BaseController {
if ("true".equals(pd.getString("ISSTUDENT"))) { if ("true".equals(pd.getString("ISSTUDENT"))) {
pd.put("IS_ONLINELEARNING", '1'); pd.put("IS_ONLINELEARNING", '1');
} }
// todo
// 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28)
// 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样
if (Tools.notEmpty(pd.getString("CARDNO"))) {
usersService.resetCardNo(pd);
}
usersService.editUser(pd); //执行修改 usersService.editUser(pd); //执行修改
if ("true".equals(pd.getString("ISSTUDENT"))) { if ("true".equals(pd.getString("ISSTUDENT"))) {
pd.put("IS_ONLINELEARNING", "1"); pd.put("IS_ONLINELEARNING", "1");
@ -909,6 +916,14 @@ public class UsersController extends BaseController {
if ("true".equals(pd.getString("ISSTUDENT"))) { if ("true".equals(pd.getString("ISSTUDENT"))) {
pd.put("IS_ONLINELEARNING", '1'); pd.put("IS_ONLINELEARNING", '1');
} }
// todo
// 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28)
// 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样
if (Tools.notEmpty(pd.getString("CARDNO"))) {
usersService.resetCardNo(pd);
}else {
pd.put("CARDNO",null);
}
usersService.saveUser(pd); usersService.saveUser(pd);
//执行保存 //执行保存
if ("true".equals(pd.getString("ISSTUDENT"))) { if ("true".equals(pd.getString("ISSTUDENT"))) {

View File

@ -290,4 +290,6 @@ public interface UsersMapper {
PageData findByCorpInfoId(PageData pd); PageData findByCorpInfoId(PageData pd);
List<PageData> selectUserListByUserIds(PageData pd); List<PageData> selectUserListByUserIds(PageData pd);
void resetCardNo(PageData pd);
} }

View File

@ -341,4 +341,6 @@ public interface UsersService {
List<PageData> selectUserListByUserIds(PageData selectPageData); List<PageData> selectUserListByUserIds(PageData selectPageData);
void resetCardNo(PageData pd);
} }

View File

@ -429,4 +429,9 @@ public class UsersServiceImpl implements UsersService {
public List<PageData> selectUserListByUserIds(PageData pd) { public List<PageData> selectUserListByUserIds(PageData pd) {
return usersMapper.selectUserListByUserIds(pd); return usersMapper.selectUserListByUserIds(pd);
} }
@Override
public void resetCardNo(PageData pd) {
usersMapper.resetCardNo(pd);
}
} }

View File

@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WORKPERIOD, WORKPERIOD,
JCR, JCR,
CORPINFO_ID, CORPINFO_ID,
CARDNO,
ISDELETE ISDELETE
</sql> </sql>
<!-- 字段 --> <!-- 字段 -->
@ -129,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.WORKPERIOD, f.WORKPERIOD,
f.JCR, f.JCR,
f.CORPINFO_ID, f.CORPINFO_ID,
f.CARDNO,
f.ISDELETE f.ISDELETE
</sql> </sql>
<!-- 字段值 --> <!-- 字段值 -->
@ -165,6 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{WORKPERIOD}, #{WORKPERIOD},
#{JCR}, #{JCR},
#{CORPINFO_ID}, #{CORPINFO_ID},
#{CARDNO},
#{ISDELETE} #{ISDELETE}
</sql> </sql>
@ -381,6 +384,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER}, IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER},
IS_ONLINELEARNING = #{IS_ONLINELEARNING}, IS_ONLINELEARNING = #{IS_ONLINELEARNING},
PHONE = #{PHONE} PHONE = #{PHONE}
<if test="CARDNO != null and CARDNO != ''">
,CARDNO = #{CARDNO}
</if>
<if test="DURATION != null and DURATION != ''"> <if test="DURATION != null and DURATION != ''">
,DURATION = #{DURATION} ,DURATION = #{DURATION}
</if> </if>
@ -1164,6 +1170,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where where
USER_ID = #{USER_ID} USER_ID = #{USER_ID}
</update> </update>
<update id="resetCardNo">
update sys_user set CARDNO = null where CARDNO = #{CARDNO}
</update>
<!-- 通过岗位ID查用户列表--> <!-- 通过岗位ID查用户列表-->
<select id="findByPostId" parameterType="pd" resultType="pd"> <select id="findByPostId" parameterType="pd" resultType="pd">