可验收

This commit is contained in:
gongjiale 2024-12-02 17:37:47 +08:00
parent 27479a94be
commit 89cdad9212
9 changed files with 25 additions and 27 deletions

View File

@ -36,7 +36,7 @@ public class EquTask {
/**
* 港口原有设备对接
*/
@Scheduled(fixedRate = 100000)
@Scheduled(fixedRate = 3600)
public void equ(){
String hash = "16EA8A305FB58BE0730DD67F04F022F4";
@ -48,7 +48,7 @@ public class EquTask {
JSONObject dataByJson = tokenByJson.getJSONObject("data");
String token = dataByJson.getString("token");
ThDevice thDevice = new ThDevice();
thDevice.setDeptId(5l);
// thDevice.setDeptId(5l);
List<ThDevice> equLists = thDeviceMapper.selectDeviceList(thDevice);
equLists.forEach(e->{
HashMap<String, Object> map = new HashMap<>();

View File

@ -135,7 +135,9 @@ public class DataScopeAspect
}
else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
{
sqlString.append(StringUtils.format(" {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or FIND_IN_SET ( {} ,ancestors ) <> 0 )", deptAlias, user.getDeptId(), user.getDeptId()));
sqlString.append(StringUtils.format(" {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} OR INSTR(',' || ancestors || ',', ',' || {} || ',') > 0 )", deptAlias, user.getDeptId(), user.getDeptId()));
// sqlString.append(StringUtils.format(" {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or FIND_IN_SET ( {} ,ancestors ) <> 0 )", deptAlias, user.getDeptId(), user.getDeptId()));
}
else if (DATA_SCOPE_SELF.equals(dataScope))
{

View File

@ -36,9 +36,9 @@ public interface OilMonitorMapper {
/**
* 删除
* @param ids
* @param id
*/
void deleteOilMonitorByIds(@Param("ids") Long ids);
void deleteOilMonitorByIds(@Param("id") Long id);
/**
* 获取检测地图

View File

@ -18,7 +18,7 @@ public interface IOilMonitorService {
int updateOilMonitor(OilMonitor oilMonitor);
int deleteOilMonitorByIds(Long ids);
int deleteOilMonitorByIds(Long id);
/**
* 查询检测设备地图列表

View File

@ -73,7 +73,7 @@
WHERE d.dept_id IN (SELECT dept_id
FROM sys_dept START WITH dept_id = #{deptId}
CONNECT BY PRIOR dept_id = parent_id))
AND r.REPORT_TIME = TO_DATE(#{date}, 'YYYY-MM-DD')
AND TRUNC(r.REPORT_TIME) = TO_DATE(#{date}, 'YYYY-MM-DD')
group by dp.dept_name
</select>
</mapper>

View File

@ -80,7 +80,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
select count(*) from sys_dept where status = 0 and del_flag = '0' and FIND_IN_SET(#{deptId}, ancestors) <![CDATA[ <> ]]> 0
SELECT count(*)
FROM sys_dept
WHERE status = 0
AND del_flag = '0'
AND INSTR(',' || ancestors || ',', ',' || #{deptId} || ',') > 0;
</select>
<select id="checkDeptNameUnique" resultMap="SysDeptResult">

View File

@ -82,7 +82,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND to_char(u.create_time, 'yyyy-mm-dd') &lt;= #{params.endTime}
</if>
<if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET(#{deptId}, ancestors) <![CDATA[ <> ]]> 0 ))
AND (u.dept_id = #{deptId}
OR u.dept_id IN (
SELECT t.dept_id
FROM sys_dept t
WHERE INSTR(',' || t.ancestors || ',', ',' || #{deptId} || ',') > 0
)
)
</if>
<!-- 数据范围过滤 -->
${params.dataScope}

View File

@ -116,15 +116,7 @@ export default {
dealUser: this.userList[0].userName,
};
addAlarm(data).then((res) => {
if (res.code == 200) {
this.$message.success("分配修复任务成功!");
this.handleClose();
bus.$emit("msgReaded");
} else {
this.$message.success("分配修复任务失败!");
}
});
}
});
},

View File

@ -116,15 +116,7 @@ export default {
dealUser: this.userList[0].userName,
};
addAlarm(data).then((res) => {
if (res.code == 200) {
this.$message.success("分配修复任务成功!");
this.handleClose();
bus.$emit("msgReaded");
} else {
this.$message.success("分配修复任务失败!");
}
});
}
});
},