设备领用记录

This commit is contained in:
jjLv 2024-08-09 17:26:57 +08:00
parent 8a9c176c68
commit e40e5163fb
4 changed files with 17 additions and 8 deletions

View File

@ -116,7 +116,10 @@ public class PersonMgeController extends BaseController {
if(delhighfile != null) {
for (int i = 0; i < delhighfile.length; i++) {
String high = String.valueOf(delhighfile[i]);
int certicificateId = mapper.getHighId(high);
Integer certicificateId = mapper.getHighId(high);
if(certicificateId==null){
return AjaxResult.error("被删除的高出作业证图片资源无法找到");
}
mapper.delHigh(certicificateId);
mapper.delHighFile(high, certicificateId);
remoteFileService.delFile(high, SecurityConstants.INNER);
@ -125,7 +128,10 @@ public class PersonMgeController extends BaseController {
if(delelectfile != null) {
for (int i = 0; i < delelectfile.length; i++) {
String elect = String.valueOf(delelectfile[i]);
int certicificateId = mapper.getElectId(elect);
Integer certicificateId = mapper.getElectId(elect);
if(certicificateId==null){
return AjaxResult.error("被删除的电工作业证作业证图片资源无法找到");
}
mapper.delElect(certicificateId);
mapper.delElectFile(elect,certicificateId);
remoteFileService.delFile(elect,SecurityConstants.INNER);
@ -134,7 +140,10 @@ public class PersonMgeController extends BaseController {
if(delelsefile != null){
for (int i = 0; i < delelsefile.length; i++) {
String elseFile = String.valueOf(delelsefile[i]);
int certicificateId = mapper.getElseId(elseFile);
Integer certicificateId = mapper.getElseId(elseFile);
if(certicificateId==null){
return AjaxResult.error("被删除的其他作业证作业证图片资源无法找到");
}
mapper.delElse(certicificateId);
mapper.delElseFile(elseFile,certicificateId);
remoteFileService.delFile(elseFile,SecurityConstants.INNER);

View File

@ -142,7 +142,7 @@ public interface PersonMgeMapper {
* @param filepath
* @return
*/
int getHighId(String filepath);
Integer getHighId(String filepath);
/**
* 删除高工证书信息
@ -155,7 +155,7 @@ public interface PersonMgeMapper {
* @param filepath
* @return
*/
int getElectId(String filepath);
Integer getElectId(String filepath);
/**
* 删除电工证书信息
@ -168,7 +168,7 @@ public interface PersonMgeMapper {
* @param filepath
* @return
*/
int getElseId(String filepath);
Integer getElseId(String filepath);
/**
* 删除其他证书信息

View File

@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dict_data sdd on sdd.dict_value = tb.dev_type and sdd.dict_type = 'sys_device_type'
where tw.team_id = #{teamId} and tw.dev_type = 1 and tw.del_flag = 0
union all
select '手环箱' as warnType,'——' as deviceName,tw.warn_time as warnTime,tw.warn_content as warnContent
select '手环箱' as warnType,'\\' as deviceName,tw.warn_time as warnTime,tw.warn_content as warnContent
from tb_warn tw
left join tb_bracelet tbb on tw.dev_id = tbb.id and tbb.del_flag = 0
where tw.team_id = #{teamId} and tw.dev_type = 0 and tw.del_flag = 0

View File

@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND tb.id = -1
</if>
union all
select '手环箱' as warnType,'——' as deviceName,tw.warn_time as warnTime,tw.warn_content as warnContent
select '手环箱' as warnType,'\\' as deviceName,tw.warn_time as warnTime,tw.warn_content as warnContent
from tb_warn tw
left join tb_bracelet tbb on tw.dev_id = tbb.id and tbb.del_flag = 0
where tw.dev_type = 0 and tw.del_flag = 0