ソースを参照

add:bug更改

caozixuan 1 年間 前
コミット
69ee616e0c

+ 22 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/LoginResult.java

@@ -52,6 +52,12 @@ public class LoginResult implements Serializable {
     @ApiModelProperty(name = "版本号")
     String version;
 
+    @ApiModelProperty(value = "人员档案编号(认证编号)")
+    private String userArchivesCode;
+
+    @ApiModelProperty(value = "电话号码")
+    private String mobileNumber;
+
     public String getVersion() {
         return version;
     }
@@ -149,6 +155,22 @@ public class LoginResult implements Serializable {
         this.time = time;
     }
 
+    public String getUserArchivesCode() {
+        return userArchivesCode;
+    }
+
+    public void setUserArchivesCode(String userArchivesCode) {
+        this.userArchivesCode = userArchivesCode;
+    }
+
+    public String getMobileNumber() {
+        return mobileNumber;
+    }
+
+    public void setMobileNumber(String mobileNumber) {
+        this.mobileNumber = mobileNumber;
+    }
+
     public class OrgNativeBean implements Serializable {
 
         @ApiModelProperty(value = "id")

+ 11 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysUserServiceImpl.java

@@ -16,10 +16,7 @@ import com.qmth.sop.business.bean.result.*;
 import com.qmth.sop.business.cache.CommonCacheService;
 import com.qmth.sop.business.entity.*;
 import com.qmth.sop.business.mapper.SysUserMapper;
-import com.qmth.sop.business.service.SysRoleService;
-import com.qmth.sop.business.service.SysUserRoleService;
-import com.qmth.sop.business.service.SysUserService;
-import com.qmth.sop.business.service.TBSessionService;
+import com.qmth.sop.business.service.*;
 import com.qmth.sop.business.util.AuthUtil;
 import com.qmth.sop.common.contant.SpringContextHolder;
 import com.qmth.sop.common.contant.SystemConstant;
@@ -61,6 +58,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     @Resource
     SysUserRoleService sysUserRoleService;
 
+    @Resource
+    TBUserArchivesService tbUserArchivesService;
+
     @Override
     public LoginResult login(String password, SysUser sysUser, AppSourceEnum appSource) throws NoSuchAlgorithmException {
         //停用
@@ -95,6 +95,13 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         commonCacheService.setUserSession(sessionId, tbSession);
 
         LoginResult loginResult = new LoginResult(sysUser, sessionId, token, Objects.nonNull(roleTypes) && roleTypes.size() > 0 ? roleTypes : roleNamesSet, appSource, SystemConstant.VERSION_VALUE);
+        // 添加档案信息
+        if (UserSourceEnum.ARCHIVES.equals(sysUser.getSource())) {
+            TBUserArchives tbUserArchives = tbUserArchivesService.findByUserId(sysUser.getId());
+            loginResult.setUserArchivesCode(tbUserArchives.getCode());
+            loginResult.setMobileNumber(tbUserArchives.getMobileNumber());
+        }
+
         loginResult.setOrgInfo(Objects.nonNull(authBean.getOrg()) ? loginResult.new OrgNativeBean(authBean.getOrg()) : null);
         return loginResult;
     }

+ 2 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingServiceImpl.java

@@ -22,6 +22,7 @@ import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.io.File;
@@ -227,6 +228,7 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
         return dingStatisticResult;
     }
 
+    @Transactional
     @Override
     public void dingSave(DingSaveParam dingSaveParam, Long userId) throws IOException {
         String sopNo = dingSaveParam.getSopNo();

+ 3 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBUserArchivesServiceImpl.java

@@ -408,7 +408,9 @@ public class TBUserArchivesServiceImpl extends ServiceImpl<TBUserArchivesMapper,
         }
         String mobileNumber = sysUser.getMobileNumber();
 
-        List<TBUserArchives> tbUserArchivesList = this.list(new QueryWrapper<TBUserArchives>().lambda().eq(TBUserArchives::getMobileNumber, mobileNumber));
+        List<TBUserArchives> tbUserArchivesList = this.list(new QueryWrapper<TBUserArchives>().lambda()
+                .eq(TBUserArchives::getMobileNumber, mobileNumber)
+                .eq(TBUserArchives::getEnable, true));
         if (CollectionUtils.isEmpty(tbUserArchivesList)) {
             throw ExceptionResultEnum.ERROR.exception("不存在档案");
         }

+ 8 - 8
sop-business/src/main/resources/mapper/TBUserArchivesAllocationMapper.xml

@@ -81,16 +81,16 @@
                 AND result.serviceUnitId = #{serviceUnitId}
             </if>
             <if test="province != null and province != ''">
-                AND result.province CONCAT('%',#{province},'%')
+                AND result.province LIKE CONCAT('%',#{province},'%')
             </if>
             <if test="city != null and city != ''">
-                AND result.city CONCAT('%',#{city},'%')
+                AND result.city LIKE CONCAT('%',#{city},'%')
             </if>
             <if test="area != null and area != ''">
-                AND result.area CONCAT('%',#{area},'%')
+                AND result.area LIKE CONCAT('%',#{area},'%')
             </if>
             <if test="customName != null and customName != ''">
-                AND result.customName CONCAT('%',#{customName}.'%')
+                AND result.customName LIKE CONCAT('%',#{customName}.'%')
             </if>
             <if test="gap != null">
                 AND (result.coordinatorUnDistributed + result.effectUnDistributed + result.assistantUnDistributed) &lt;= #{gap}
@@ -190,16 +190,16 @@
                 AND result.serviceUnitId = #{serviceUnitId}
             </if>
             <if test="province != null and province != ''">
-                AND result.province CONCAT('%',#{province},'%')
+                AND result.province LIKE CONCAT('%',#{province},'%')
             </if>
             <if test="city != null and city != ''">
-                AND result.city CONCAT('%',#{city},'%')
+                AND result.city LIKE CONCAT('%',#{city},'%')
             </if>
             <if test="area != null and area != ''">
-                AND result.area CONCAT('%',#{area},'%')
+                AND result.area LIKE CONCAT('%',#{area},'%')
             </if>
             <if test="customName != null and customName != ''">
-                AND result.customName CONCAT('%',#{customName}.'%')
+                AND result.customName LIKE CONCAT('%',#{customName}.'%')
             </if>
             <if test="gap != null">
                 AND (result.coordinatorUnDistributed + result.effectUnDistributed + result.assistantUnDistributed) &lt;= #{gap}