parent
3e9f75af65
commit
3cc4a13ad3
|
@ -38,7 +38,7 @@ import java.util.*;
|
|||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/app/electricity")
|
||||
@RequestMapping("c")
|
||||
public class AppElectricityController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import org.springframework.web.multipart.MultipartRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -1693,6 +1694,7 @@ public class AppHotworkCfdController extends BaseController {
|
|||
// created by liu jun 添加(交底人、项目主管部门负责人、安全措施确认人)
|
||||
hotworkCfdService.addInfo(pd);
|
||||
|
||||
//气体检测数据
|
||||
map.put("gasList", hotworkGasCfdService.listAll(pd));
|
||||
// imgList是接受交底人签字
|
||||
List<PageData> acceptConfessList = (List<PageData>) pd.get("acceptConfessList");
|
||||
|
@ -1717,6 +1719,26 @@ public class AppHotworkCfdController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**删除动火操作人图片
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delImg")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "手机",menuServer= "动火作业",instructionsOperate = "动火作业",instructionsType = "删除动火操作人图片")
|
||||
public Object delImg() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = imgFilesService.findById(pd); //根据ID读取
|
||||
File file = new File(PathUtil.getProjectpath()+pd.getString("FILEPATH"));
|
||||
file.delete();
|
||||
imgFilesService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去修改页面获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
|
|
|
@ -254,7 +254,9 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
|
|||
if (approvalInfos.size() > 1) throw new RuntimeException("审批信息异常,请联系管理员");
|
||||
PageData entity = approvalInfos.get(0);
|
||||
entity.put("APPROVAL_STATUS", request.getString("APPROVAL_STATUS"));
|
||||
entity.put("APPROVAL_SIGNATURE", Warden.saveFile(files,request.getString("CORPINFO_ID")));
|
||||
// entity.put("APPROVAL_SIGNATURE", Warden.saveFile(files,request.getString("CORPINFO_ID")));
|
||||
List<String> filePaths = Warden.saveFiles(files, request.getString("CORPINFO_ID"));
|
||||
entity.put("APPROVAL_SIGNATURE", String.join(";", filePaths));
|
||||
entity.put("APPROVAL_SIGNATURE_TIME", DateUtil.getTime());
|
||||
entity.put("APPROVAL_CONTENT",request.getString("APPROVAL_CONTENT"));
|
||||
busHotworkCfdExamineMapper.edit(entity);
|
||||
|
|
|
@ -381,6 +381,19 @@ public class Warden {
|
|||
return saveFile(files, CORPINFO_ID);
|
||||
}
|
||||
|
||||
//保存多图片
|
||||
public static List<String> saveFiles(MultipartFile[] files, String number) throws Exception {
|
||||
if (files.length == 0) throw new RuntimeException("文件为空");
|
||||
List<String> filePaths = new ArrayList<>();
|
||||
for (MultipartFile file : files) {
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + number + "/" + ffile);
|
||||
filePaths.add(Const.FILEPATHFILE + number + "/" + ffile + "/" + fileName);
|
||||
}
|
||||
return filePaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* 压缩文件
|
||||
*/
|
||||
|
@ -479,5 +492,6 @@ public class Warden {
|
|||
}
|
||||
throw new IOException("压缩文件失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -606,7 +606,15 @@
|
|||
bhe.HOTWORK_ID = f.HOTWORK_ID
|
||||
and bhe.TYPE = 1
|
||||
and bhe.IS_DELETE = '0'
|
||||
left join bus_hotwork_acceptuser_cfd bhac on bhac.HOTWORK_ID = f.HOTWORK_ID
|
||||
-- left join bus_hotwork_acceptuser_cfd bhac on bhac.HOTWORK_ID = f.HOTWORK_ID
|
||||
left join (
|
||||
select
|
||||
HOTWORK_ID,
|
||||
GROUP_CONCAT(ACCEPT_USER_SIGNER_PATH SEPARATOR ',') as ACCEPT_USER_SIGNER_PATH,
|
||||
GROUP_CONCAT(ACCEPT_USER_SIGNER_TIME SEPARATOR ',') as ACCEPT_USER_SIGNER_TIME
|
||||
from bus_hotwork_acceptuser_cfd
|
||||
group by HOTWORK_ID
|
||||
) bhac on bhac.HOTWORK_ID = f.HOTWORK_ID
|
||||
where
|
||||
f.HOTWORK_ID = #{HOTWORK_ID}
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue