liuyongxin 6 bulan lalu
induk
melakukan
982fa7d593

+ 8 - 0
cloud-collect/cloud-collect-biz/src/main/java/com/lutao/cloud/collect/service/impl/CollectDataServiceImpl.java

@@ -213,6 +213,10 @@ public class CollectDataServiceImpl implements CollectDataService {
         if (!JSONUtil.isJsonArray(data)) {
             return MessageInfo.failed("data json 格式错误");
         }
+        JSONArray countJsonArray = JSONUtil.parseArray(data);
+        if (countJsonArray.size() > 50) {
+            return MessageInfo.failed("静态数据数组长度不能超过50!");
+        }
         dataAdd.setData(data);
         //校验sign
         if (!CheckUtil.checkSign(appInfo, dataAdd)) {
@@ -305,6 +309,10 @@ public class CollectDataServiceImpl implements CollectDataService {
         if (!JSONUtil.isJsonArray(data)) {
             return MessageInfo.failed("data json 格式错误");
         }
+        JSONArray arrayCount = JSONUtil.parseArray(data);
+        if (arrayCount.size() > 200) {
+            return MessageInfo.failed("批量数据数组长度不能超过200!");
+        }
         dataAdd.setData(data);
         if (!CheckUtil.checkSign(appInfo, dataAdd)) {
             return MessageInfo.failed("签名错误");

+ 1 - 1
cloud-oil/cloud-oil-biz/src/main/resources/mapper/ContractorManageMapper.xml

@@ -39,7 +39,7 @@
             <where>
                 pi.delete_flag = '0'
                 <if test="true">
-                     contractor_unit_name != ''
+                     and contractor_unit_name != ''
                 </if>
                 <if test="param.appId != null and param.appId != ''">
                     and cm.app_id = #{param.appId}

+ 3 - 3
cloud-oil/cloud-oil-biz/src/main/resources/mapper/EquipmentInfoMapper.xml

@@ -72,7 +72,7 @@
         <where>
             pi.delete_flag = '0'
             <if test="param.platformId != null and param.platformId != ''">
-                ei.platform_code = #{param.platformId}
+                and ei.platform_code = #{param.platformId}
             </if>
             <if test="param.operatingCompany != null and param.operatingCompany != ''">
                 and pi.operating_company = #{param.operatingCompany}
@@ -318,7 +318,7 @@
         <where>
             pi.delete_flag = '0'
             <if test="param.platformId != null and param.platformId != ''">
-                ei.platform_code = #{param.platformId}
+                and ei.platform_code = #{param.platformId}
             </if>
             <if test="param.operatingCompany != null and param.operatingCompany != ''">
                 and pi.operating_company = #{param.operatingCompany}
@@ -389,7 +389,7 @@
         <where>
             pi.delete_flag = '0'
             <if test="param.platformId != null and param.platformId != ''">
-                ei.platform_code = #{param.platformId}
+                and ei.platform_code = #{param.platformId}
             </if>
             <if test="param.operatingCompany != null and param.operatingCompany != ''">
                 and pi.operating_company = #{param.operatingCompany}

+ 1 - 1
cloud-oil/cloud-oil-biz/src/main/resources/mapper/HighRiskOperationMapper.xml

@@ -240,7 +240,7 @@
                 and pi.oil_gas_name = #{param.oilGasName}
             </if>
             <if test="param.startTime != null">
-                and hro.task_end_time &gt;= #{param.startTime}
+                and hro.task_begin_time &gt;= #{param.startTime}
             </if>
             <if test="param.endTime != null">
                 and hro.task_begin_time &lt;= #{param.endTime}

+ 2 - 2
cloud-oil/cloud-oil-biz/src/main/resources/mapper/PlatformInfoMapper.xml

@@ -84,7 +84,7 @@
         FROM platform_info pi
         <where>
             pi.delete_flag = '0'
-            and pi.is_connected_platform = '0'
+            and pi.is_count = '0'
             <if test="appId != null and appId != ''">
                and pi.app_id = #{appId}
             </if>
@@ -102,7 +102,7 @@
         FROM platform_info pi LEFT JOIN app_info ai ON pi.app_id = ai.id
         <where>
             pi.delete_flag = '0'
-            and pi.is_connected_platform = '0'
+            and pi.is_count = '0'
             <if test="param.platformId != null and param.platformId != ''">
                and pi.platform_code = #{param.platformId}
             </if>

+ 5 - 0
cloud-upms/cloud-upms-biz/src/main/java/com/lutao/cloud/admin/service/impl/SysUserServiceImpl.java

@@ -118,6 +118,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 //		if (sysTenant.getEndTime().isBefore(LocalDateTime.now())){
 //			return MessageInfo.failed("租户已到期");
 //		}
+		String username = userDto.getUsername();
+		int count = this.count(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getUsername, username));
+		if (count > 0) {
+			return MessageInfo.failed("用户名已存在");
+		}
 
 		SysUser sysUser = new SysUser();
 		BeanUtils.copyProperties(userDto, sysUser);

+ 1 - 1
cloud-upms/cloud-upms-biz/src/main/resources/mapper/SysUserMapper.xml

@@ -155,7 +155,7 @@
 		sys_user_info  u
 		LEFT JOIN sys_dept  d ON d.dept_id = u.dept_id
 		<where>
-			u.del_flag = '0'
+			u.del_flag = '0' and u.user_from != 4
 			<if test="query.username != null and query.username != ''">
 				AND u.username LIKE CONCAT('%',#{query.username},'%')
 			</if>