Răsfoiți Sursa

修改人员代码

wks 2 ani în urmă
părinte
comite
4516f5178b

+ 2 - 2
src/main/java/com/ydtech/modules/esm/controller/EsmAgreementCheckController.java

@@ -210,14 +210,14 @@ public class EsmAgreementCheckController extends BaseController {
 //        StringBuffer whereStr = new StringBuffer(" where 1=1");
 //        ArrayList array = new ArrayList();
 
-        List<EsmAgreementCheck> agreeList = new ArrayList<EsmAgreementCheck>();
+        List<EsmAgreementCheck> agreeList = new ArrayList<>();
         //需要处理传入的部门
         List<String> idList = esmAgreementProdfeeCheckService.queryProdfees(status);
 
         int minNum = pageSize * (pageNum - 1);
         int maxNum = pageSize * pageNum;
         if (1 == pageNum) {
-            maxNum = idList.size() > maxNum ? maxNum : idList.size();
+            maxNum = Math.min(idList.size(), maxNum);
         } else {
             maxNum = idList.size() > maxNum ? maxNum : idList.size();
         }

+ 4 - 9
src/main/java/com/ydtech/modules/esm/controller/EsmUserController.java

@@ -71,12 +71,7 @@ public class EsmUserController extends BaseController {
 //        List<String> strings = userRoleList.stream().map(x -> x.getUserId() + "").collect(Collectors.toList());
 
         //用户ID 代理人角色
-        List<String> longs = sysUserRoleService.listObjs(userRoleLqw, new Function<Object, String>() {
-            @Override
-            public String apply(Object userId) {
-                return userId.toString();
-            }
-        });
+        List<String> longs = sysUserRoleService.listObjs(userRoleLqw, Object::toString);
 
         if(CollUtil.isNotEmpty(longs)){
             //获取团队长
@@ -89,7 +84,7 @@ public class EsmUserController extends BaseController {
             List<SysUser> userList= sysUserService.list(lqwUser);
 
 
-            userList.stream().forEach(a ->{
+            userList.forEach(a ->{
 
                 TeamUserVO vo = new TeamUserVO();
                 List<SysUser> oneList = new ArrayList<>();
@@ -104,10 +99,10 @@ public class EsmUserController extends BaseController {
                 //一级
                 esmUserReferrerService.buildLevelList(a,oneList,oneTempList);
 
-                oneList.stream().forEach(b ->{
+                oneList.forEach(b ->{
                     //二级
                     esmUserReferrerService.buildLevelList(b,twoList,twoTempList);
-                    twoList.stream().forEach(c ->{
+                    twoList.forEach(c ->{
                         //三级
                         esmUserReferrerService.buildLevelList(c,threeList,threeTempList);
                     });

+ 1 - 1
src/main/java/com/ydtech/modules/esm/service/impl/EsmUserReferrerServiceImpl.java

@@ -48,7 +48,7 @@ public class EsmUserReferrerServiceImpl extends ServiceImpl<EsmUserReferrerMappe
 
         List<SysUser> oneList = new ArrayList<>();
         List<SysUser> oneTempList = new ArrayList<>();
-        listAll.stream().forEach(a -> {
+        listAll.forEach(a -> {
             SysUser sysUser = sysUserService.getById(a.getId());
             if (sysUser.getStatus() == 1) {
                 oneList.add(sysUser);

+ 3 - 3
src/main/java/com/ydtech/modules/order/components/dajia/DaJiaRequestApiComponents.java

@@ -62,19 +62,19 @@ public class DaJiaRequestApiComponents {
         httpHeaders.set("User-Agent","");
 
         InsuranceLog.infoLog(InsuranceEnum.DJPC.getPinyin(), "\n\t---------> URl: {} \n---------> 保险公司:{} {}\n---------> 请求参数:{}", url, InsuranceEnum.DJPC.getName(), tradeCode.getDesc(), JSONObject.toJSONString(q));
-        String encrypt = AESEncrypt.encrypt(JSONObject.toJSONString(q), encryptKey);
+        String encrypt = AESEncrypt.encrypt(JSON.toJSONString(q), encryptKey);
         HttpEntity<String> httpEntity = new HttpEntity<>(encrypt, httpHeaders);
         ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST,  httpEntity, String.class);
         String body = response.getBody();
         InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> 响应参数:{}", body);
         //统一处理错误
-        JSONObject resultObj = JSONObject.parseObject(body);
+        JSONObject resultObj = JSON.parseObject(body);
         String code = resultObj.getString("code");
         if(!code.equals("2000")) {
             throw new SystemException(resultObj.getString("msg"));
         }
 
-        S s = JSONObject.parseObject(resultObj.getJSONObject("body").toJSONString(),tClass);
+        S s = JSON.parseObject(resultObj.getJSONObject("body").toJSONString(),tClass);
         if (ObjectUtils.isEmpty(s)) {
             throw new SystemException("请求失败");
         }