消防资源
parent
5503a64b6d
commit
e4a311fdb2
|
@ -104,13 +104,14 @@ public class AppHiddenController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private ApplicationContext applicationContext;
|
private ApplicationContext applicationContext;
|
||||||
@Autowired
|
@Autowired
|
||||||
private HiddenCheckApiService hiddenCheckApiService ; //隐患验收人
|
private HiddenCheckApiService hiddenCheckApiService; //隐患验收人
|
||||||
@Autowired
|
@Autowired
|
||||||
private HiddenApiService hiddenApiService;
|
private HiddenApiService hiddenApiService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private HiddenExamineApiService hiddenExamineApiService; //隐患审核 隐患的审核步骤的人员的信息的记录
|
private HiddenExamineApiService hiddenExamineApiService; //隐患审核 隐患的审核步骤的人员的信息的记录
|
||||||
@Autowired
|
@Autowired
|
||||||
private MessageService messageService;
|
private MessageService messageService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app首页获取数量
|
* app首页获取数量
|
||||||
*
|
*
|
||||||
|
@ -186,8 +187,6 @@ public class AppHiddenController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<PageData> creatorHid = hiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息
|
List<PageData> creatorHid = hiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息
|
||||||
for (int i = 0; i < creatorHid.size(); i++) {
|
for (int i = 0; i < creatorHid.size(); i++) {
|
||||||
PageData cre = creatorHid.get(i);
|
PageData cre = creatorHid.get(i);
|
||||||
|
@ -215,7 +214,7 @@ public class AppHiddenController extends BaseController {
|
||||||
hidCount.put("yys", yys);
|
hidCount.put("yys", yys);
|
||||||
hidCount.put("dqr", dqr);
|
hidCount.put("dqr", dqr);
|
||||||
hidCount.put("tscz", tscz);
|
hidCount.put("tscz", tscz);
|
||||||
hidCount.put("yq",yq);
|
hidCount.put("yq", yq);
|
||||||
|
|
||||||
// 待排查数量
|
// 待排查数量
|
||||||
String USER_NAME = pd.getString("USER_NAME");
|
String USER_NAME = pd.getString("USER_NAME");
|
||||||
|
@ -294,40 +293,41 @@ public class AppHiddenController extends BaseController {
|
||||||
pd.put("LEVEL", item.get("DNAME5"));
|
pd.put("LEVEL", item.get("DNAME5"));
|
||||||
}
|
}
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
||||||
for (JSONObject json : list){
|
for (JSONObject json : list) {
|
||||||
PageData hiddenconUserAdd = new PageData();
|
PageData hiddenconUserAdd = new PageData();
|
||||||
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
||||||
hiddenconUserAdd.put("HIDDEN_ID",pd.getString("HIDDEN_ID"));
|
hiddenconUserAdd.put("HIDDEN_ID", pd.getString("HIDDEN_ID"));
|
||||||
hiddenconUserAdd.put("USER_ID",json.get("USER_ID"));
|
hiddenconUserAdd.put("USER_ID", json.get("USER_ID"));
|
||||||
hiddenconUserAdd.put("TYPE","1");
|
hiddenconUserAdd.put("TYPE", "1");
|
||||||
hiddenconUserAdd.put("IS_MAIN","0");
|
hiddenconUserAdd.put("IS_MAIN", "0");
|
||||||
hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
||||||
}
|
}
|
||||||
if(pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")){//判断是否是重大隐患
|
if (pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")) {//判断是否是重大隐患
|
||||||
PageData userpd = new PageData();
|
PageData userpd = new PageData();
|
||||||
userpd.put("USER_ID",pd.getString("CREATOR"));
|
userpd.put("USER_ID", pd.getString("CREATOR"));
|
||||||
userpd.put("DEPARTMENT_ID",usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID
|
userpd.put("DEPARTMENT_ID", usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID
|
||||||
if(departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")){//判断部门级别是不是班组
|
if (departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")) {//判断部门级别是不是班组
|
||||||
userpd.put("DEPARTMENT_ID",departmentService.findById(userpd).getString("DEPARTMENT_ID"));
|
userpd.put("DEPARTMENT_ID", departmentService.findById(userpd).getString("DEPARTMENT_ID"));
|
||||||
if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))){//判断部门是否有负责人
|
if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
map.put("msg", "所在部门未维护部门负责人");
|
||||||
return map;
|
return map;
|
||||||
}else {
|
} else {
|
||||||
userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN"));
|
userpd.put("USER_ID", departmentService.findById(userpd).getString("HEADMAN"));
|
||||||
pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
||||||
mes.put("RECEIVER_ID",usersService.findById(userpd).getString("USER_ID")); // 如果是较大或重大隐患在这里给站内信接收人赋值
|
mes.put("RECEIVER_ID", usersService.findById(userpd).getString("USER_ID")); // 如果是较大或重大隐患在这里给站内信接收人赋值
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
|
if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
map.put("msg", "所在部门未维护部门负责人");
|
||||||
return map;
|
return map;
|
||||||
}{
|
}
|
||||||
userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN"));
|
{
|
||||||
|
userpd.put("USER_ID", departmentService.findById(userpd).getString("HEADMAN"));
|
||||||
userpd.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
userpd.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||||
if (Tools.isEmpty(usersService.findById(userpd))) {
|
if (Tools.isEmpty(usersService.findById(userpd))) {
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
map.put("msg", "所在部门未维护部门负责人");
|
||||||
return map;
|
return map;
|
||||||
}else{
|
} else {
|
||||||
pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,31 +335,31 @@ public class AppHiddenController extends BaseController {
|
||||||
|
|
||||||
}
|
}
|
||||||
PageData before = new PageData();// 添加隐患初始信息
|
PageData before = new PageData();// 添加隐患初始信息
|
||||||
before.put("TYPE","0");
|
before.put("TYPE", "0");
|
||||||
before.put("STATE","2");
|
before.put("STATE", "2");
|
||||||
before.put("HIDDEN_ID",pd.get("HIDDEN_ID"));
|
before.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
|
||||||
before.put("spare1",pd.getString("HIDDENLEVEL"));
|
before.put("spare1", pd.getString("HIDDENLEVEL"));
|
||||||
before.put("spare2",pd.getString("RECTIFICATIONOR"));
|
before.put("spare2", pd.getString("RECTIFICATIONOR"));
|
||||||
before.put("spare3",pd.getString("RECTIFICATIONDEADLINE"));
|
before.put("spare3", pd.getString("RECTIFICATIONDEADLINE"));
|
||||||
before.put("spare4",pd.getString("RECTIFICATIONDEPT"));
|
before.put("spare4", pd.getString("RECTIFICATIONDEPT"));
|
||||||
before.put("CREATOR", pd.getString("loginUserId"));
|
before.put("CREATOR", pd.getString("loginUserId"));
|
||||||
before.put("OPERATOR",pd.getString("loginUserId"));
|
before.put("OPERATOR", pd.getString("loginUserId"));
|
||||||
hiddenExamineService.saveApp(before);
|
hiddenExamineService.saveApp(before);
|
||||||
hiddenService.save(pd);
|
hiddenService.save(pd);
|
||||||
if(!pd.getString("STATE").equals("0")){
|
if (!pd.getString("STATE").equals("0")) {
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_001","友情提示:有一条隐患需要确认",pd.getString("CORPINFO_ID"),pd.getString("CONFIRM_USER"),pd.getString("HIDDEN_ID"),
|
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", pd.getString("CORPINFO_ID"), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"),
|
||||||
pd.getString("HIDDENDESCR"),"隐患确认","确认","","");
|
pd.getString("HIDDENDESCR"), "隐患确认", "确认", "", "");
|
||||||
}
|
}
|
||||||
// 清除同检查记录合格图片
|
// 清除同检查记录合格图片
|
||||||
if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) {
|
if (pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) {
|
||||||
imgFilesService.delete(pd);
|
imgFilesService.delete(pd);
|
||||||
PageData img = new PageData();
|
PageData img = new PageData();
|
||||||
img.put("FOREIGN_KEY", pd.get("RECORDITEM_ID"));
|
img.put("FOREIGN_KEY", pd.get("RECORDITEM_ID"));
|
||||||
img.put("TYPE", "14");
|
img.put("TYPE", "14");
|
||||||
List<PageData> imgs = imgFilesService.listAll(img); //根据ID读取
|
List<PageData> imgs = imgFilesService.listAll(img); //根据ID读取
|
||||||
if(imgs != null && imgs.size() > 0) {
|
if (imgs != null && imgs.size() > 0) {
|
||||||
for(PageData i: imgs) {
|
for (PageData i : imgs) {
|
||||||
File file = new File(PathUtil.getProjectpath()+i.getString("FILEPATH"));
|
File file = new File(PathUtil.getProjectpath() + i.getString("FILEPATH"));
|
||||||
file.delete();
|
file.delete();
|
||||||
imgFilesService.delete(i);
|
imgFilesService.delete(i);
|
||||||
}
|
}
|
||||||
|
@ -379,6 +379,7 @@ public class AppHiddenController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/appAdd")
|
@RequestMapping(value = "/appAdd")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object appAdd() throws Exception {
|
public Object appAdd() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -402,18 +403,21 @@ public class AppHiddenController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageData before = new PageData();// 添加隐患初始信息
|
PageData before = new PageData();// 添加隐患初始信息
|
||||||
before.put("TYPE","0");
|
before.put("TYPE", "0");
|
||||||
before.put("STATE","2");
|
before.put("STATE", "2");
|
||||||
before.put("HIDDEN_ID",pd.get("HIDDEN_ID"));
|
before.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
|
||||||
before.put("spare1",pd.getString("HIDDENLEVEL"));
|
before.put("spare1", pd.getString("HIDDENLEVEL"));
|
||||||
before.put("spare2",pd.getString("RECTIFICATIONOR"));
|
before.put("spare2", pd.getString("RECTIFICATIONOR"));
|
||||||
before.put("spare3",pd.getString("RECTIFICATIONDEADLINE"));
|
before.put("spare3", pd.getString("RECTIFICATIONDEADLINE"));
|
||||||
before.put("spare4",pd.getString("RECTIFICATIONDEPT"));
|
before.put("spare4", pd.getString("RECTIFICATIONDEPT"));
|
||||||
before.put("CREATOR", pd.getString("loginUserId"));
|
before.put("CREATOR", pd.getString("loginUserId"));
|
||||||
before.put("OPERATOR",pd.getString("loginUserId"));
|
before.put("OPERATOR", pd.getString("loginUserId"));
|
||||||
hiddenExamineService.saveApp(before);
|
hiddenExamineService.saveApp(before);
|
||||||
|
PageData hiddenExaminePageData = new PageData();
|
||||||
|
hiddenExaminePageData.putAll(before);
|
||||||
|
|
||||||
if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) {
|
if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) {
|
||||||
if("2".equals(pd.getString("SOURCE"))){
|
if ("2".equals(pd.getString("SOURCE"))) {
|
||||||
PageData item = new PageData();
|
PageData item = new PageData();
|
||||||
item.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID"));
|
item.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID"));
|
||||||
item = this.listcheckitemService.findById(item);
|
item = this.listcheckitemService.findById(item);
|
||||||
|
@ -422,7 +426,7 @@ public class AppHiddenController extends BaseController {
|
||||||
pd.put("RISK_DESCR", item.get("RISK_DESCR")); //存在风险
|
pd.put("RISK_DESCR", item.get("RISK_DESCR")); //存在风险
|
||||||
pd.put("RISK_POSITION", item.get("POSITIONNAME")); // 风险点位置
|
pd.put("RISK_POSITION", item.get("POSITIONNAME")); // 风险点位置
|
||||||
pd.put("LEVEL", item.get("DNAME5")); //风险分级
|
pd.put("LEVEL", item.get("DNAME5")); //风险分级
|
||||||
}else if("6".equals(pd.getString("SOURCE"))){
|
} else if ("6".equals(pd.getString("SOURCE"))) {
|
||||||
// 消防点检 切换为为提交的状态
|
// 消防点检 切换为为提交的状态
|
||||||
// 隐患状态 0-未提交
|
// 隐患状态 0-未提交
|
||||||
// 1- 未整改 2-已整改
|
// 1- 未整改 2-已整改
|
||||||
|
@ -445,7 +449,7 @@ public class AppHiddenController extends BaseController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if("6".equals(pd.getString("SOURCE"))){
|
if ("6".equals(pd.getString("SOURCE"))) {
|
||||||
// 消防点检 切换为为提交的状态
|
// 消防点检 切换为为提交的状态
|
||||||
// 隐患状态 0-未提交
|
// 隐患状态 0-未提交
|
||||||
// 1- 未整改 2-已整改
|
// 1- 未整改 2-已整改
|
||||||
|
@ -466,44 +470,47 @@ public class AppHiddenController extends BaseController {
|
||||||
pd.put("STATE", "0");
|
pd.put("STATE", "0");
|
||||||
}
|
}
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
||||||
for (JSONObject json : list){
|
ArrayList<PageData> hiddenUserList = new ArrayList<>();
|
||||||
|
for (JSONObject json : list) {
|
||||||
PageData hiddenconUserAdd = new PageData();
|
PageData hiddenconUserAdd = new PageData();
|
||||||
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
||||||
hiddenconUserAdd.put("HIDDEN_ID",pd.getString("HIDDEN_ID"));
|
hiddenconUserAdd.put("HIDDEN_ID", pd.getString("HIDDEN_ID"));
|
||||||
hiddenconUserAdd.put("USER_ID",json.get("USER_ID"));
|
hiddenconUserAdd.put("USER_ID", json.get("USER_ID"));
|
||||||
hiddenconUserAdd.put("TYPE","1");
|
hiddenconUserAdd.put("TYPE", "1");
|
||||||
hiddenconUserAdd.put("IS_MAIN","0");
|
hiddenconUserAdd.put("IS_MAIN", "0");
|
||||||
hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
||||||
|
hiddenUserList.add(hiddenconUserAdd);
|
||||||
}
|
}
|
||||||
pd.put("ISCONFIRM", "0");
|
pd.put("ISCONFIRM", "0");
|
||||||
if(pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")){//判断是否是重大隐患
|
if (pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")) {//判断是否是重大隐患
|
||||||
PageData userpd = new PageData();
|
PageData userpd = new PageData();
|
||||||
userpd.put("USER_ID",pd.getString("CREATOR"));
|
userpd.put("USER_ID", pd.getString("CREATOR"));
|
||||||
userpd.put("DEPARTMENT_ID",usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID
|
userpd.put("DEPARTMENT_ID", usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID
|
||||||
if(departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")){//判断部门级别是不是班组
|
if (departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")) {//判断部门级别是不是班组
|
||||||
userpd.put("DEPARTMENT_ID",departmentService.findById(userpd).getString("DEPARTMENT_ID"));
|
userpd.put("DEPARTMENT_ID", departmentService.findById(userpd).getString("DEPARTMENT_ID"));
|
||||||
if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))){//判断部门是否有负责人
|
if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
map.put("msg", "所在部门未维护部门负责人");
|
||||||
return map;
|
return map;
|
||||||
}else {
|
} else {
|
||||||
userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN"));
|
userpd.put("USER_ID", departmentService.findById(userpd).getString("HEADMAN"));
|
||||||
if(Tools.notEmpty(usersService.findById(userpd).getString("USER_ID"))){
|
if (Tools.notEmpty(usersService.findById(userpd).getString("USER_ID"))) {
|
||||||
pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
||||||
}else {
|
} else {
|
||||||
map.put("msg", "未查询到部门负责人");
|
map.put("msg", "未查询到部门负责人");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
|
if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
map.put("msg", "所在部门未维护部门负责人");
|
||||||
return map;
|
return map;
|
||||||
}{
|
}
|
||||||
userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN"));
|
{
|
||||||
|
userpd.put("USER_ID", departmentService.findById(userpd).getString("HEADMAN"));
|
||||||
userpd.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
userpd.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||||
PageData usersPd = usersService.findById(userpd);
|
PageData usersPd = usersService.findById(userpd);
|
||||||
if(usersPd != null && Tools.notEmpty(usersPd.getString("USER_ID"))){
|
if (usersPd != null && Tools.notEmpty(usersPd.getString("USER_ID"))) {
|
||||||
pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID
|
||||||
}else {
|
} else {
|
||||||
map.put("msg", "所在部门未维护部门负责人");
|
map.put("msg", "所在部门未维护部门负责人");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -511,13 +518,18 @@ public class AppHiddenController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hiddenService.save(pd);
|
hiddenService.save(pd);
|
||||||
|
PageData dockData = new PageData();
|
||||||
|
dockData.put("hiddenData", pd);
|
||||||
|
dockData.put("hiddenExaminePageData", hiddenExaminePageData);
|
||||||
|
dockData.put("hiddenUserList", hiddenUserList);
|
||||||
// 发送短信
|
// 发送短信
|
||||||
if(Tools.notEmpty(pd.getString("CONFIRM_USER")) && !pd.getString("STATE").equals("0")){
|
if (Tools.notEmpty(pd.getString("CONFIRM_USER")) && !pd.getString("STATE").equals("0")) {
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_001","友情提示:有一条隐患需要确认",pd.getString("CORPINFO_ID"),pd.getString("CONFIRM_USER"),pd.getString("HIDDEN_ID"),
|
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", pd.getString("CORPINFO_ID"), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"),
|
||||||
pd.getString("HIDDENDESCR"),"隐患确认","确认","","");
|
pd.getString("HIDDENDESCR"), "隐患确认", "确认", "", "");
|
||||||
}
|
}
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
map.put("dockData", JSON.toJSONString(dockData));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -547,7 +559,7 @@ public class AppHiddenController extends BaseController {
|
||||||
@RequestParam(value = "FOREIGN_KEY", required = false) String FOREIGN_KEY) throws Exception {
|
@RequestParam(value = "FOREIGN_KEY", required = false) String FOREIGN_KEY) throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -581,25 +593,27 @@ public class AppHiddenController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/goEditWeui")
|
@RequestMapping(value = "/goEditWeui")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goEditWeui() throws Exception{
|
public Object goEditWeui() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd = hiddenService.findById(pd); //根据ID读取
|
pd = hiddenService.findById(pd); //根据ID读取
|
||||||
PageData pd2 = new PageData();
|
PageData pd2 = new PageData();
|
||||||
pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
|
pd2.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
|
||||||
pd2.put("TYPE",3);
|
pd2.put("TYPE", 3);
|
||||||
List<PageData> hImgs = imgFilesService.listAll(pd2);//隐患图片
|
List<PageData> hImgs = imgFilesService.listAll(pd2);//隐患图片
|
||||||
pd2.put("TYPE",4);
|
pd2.put("TYPE", 4);
|
||||||
List<PageData> rImgs = imgFilesService.listAll(pd2);//整改图片
|
List<PageData> rImgs = imgFilesService.listAll(pd2);//整改图片
|
||||||
pd2.put("TYPE",102);
|
pd2.put("TYPE", 102);
|
||||||
List<PageData> hiddenVideo = imgFilesService.listAll(pd2);//隐患视频
|
List<PageData> hiddenVideo = imgFilesService.listAll(pd2);//隐患视频
|
||||||
/*pd2.put("TYPE",5);
|
/*pd2.put("TYPE",5);
|
||||||
List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片
|
List<PageData> cImgs = imgFilesService.listAll(pd2);//验收图片
|
||||||
|
@ -607,18 +621,18 @@ public class AppHiddenController extends BaseController {
|
||||||
PageData hs = hiddenSchemeService.findByHdId(pd);
|
PageData hs = hiddenSchemeService.findByHdId(pd);
|
||||||
List<PageData> sImgs = new ArrayList<PageData>();
|
List<PageData> sImgs = new ArrayList<PageData>();
|
||||||
|
|
||||||
if(hs != null && hs.getString("HIDDENSCHEME_ID") != null) {
|
if (hs != null && hs.getString("HIDDENSCHEME_ID") != null) {
|
||||||
PageData pd3 = new PageData();
|
PageData pd3 = new PageData();
|
||||||
pd3.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID"));
|
pd3.put("FOREIGN_KEY", hs.getString("HIDDENSCHEME_ID"));
|
||||||
pd3.put("TYPE",8);
|
pd3.put("TYPE", 8);
|
||||||
sImgs = imgFilesService.listAll(pd3);//方案图片
|
sImgs = imgFilesService.listAll(pd3);//方案图片
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PageData> checkList = hiddenCheckService.listAll(pd);
|
List<PageData> checkList = hiddenCheckService.listAll(pd);
|
||||||
if(checkList != null && checkList.size() > 0) {
|
if (checkList != null && checkList.size() > 0) {
|
||||||
PageData pd3 = new PageData();
|
PageData pd3 = new PageData();
|
||||||
pd3.put("TYPE",5);
|
pd3.put("TYPE", 5);
|
||||||
for(PageData check: checkList) {
|
for (PageData check : checkList) {
|
||||||
pd3.put("FOREIGN_KEY", check.get("HIDDENCHECK_ID"));
|
pd3.put("FOREIGN_KEY", check.get("HIDDENCHECK_ID"));
|
||||||
check.put("cImgs", imgFilesService.listAll(pd3));//验收图片
|
check.put("cImgs", imgFilesService.listAll(pd3));//验收图片
|
||||||
}
|
}
|
||||||
|
@ -630,7 +644,7 @@ public class AppHiddenController extends BaseController {
|
||||||
// map.put("cImgs", cImgs);
|
// map.put("cImgs", cImgs);
|
||||||
map.put("sImgs", sImgs);
|
map.put("sImgs", sImgs);
|
||||||
map.put("checkList", checkList);
|
map.put("checkList", checkList);
|
||||||
map.put("hiddenVideo",hiddenVideo);
|
map.put("hiddenVideo", hiddenVideo);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -650,7 +664,7 @@ public class AppHiddenController extends BaseController {
|
||||||
String ip = "";
|
String ip = "";
|
||||||
if (request.getHeader("x-forwarded-for") == null) {
|
if (request.getHeader("x-forwarded-for") == null) {
|
||||||
ip = request.getRemoteAddr();
|
ip = request.getRemoteAddr();
|
||||||
}else{
|
} else {
|
||||||
ip = request.getHeader("x-forwarded-for");
|
ip = request.getHeader("x-forwarded-for");
|
||||||
}
|
}
|
||||||
Map<String, String> map = new HashMap<String, String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
@ -658,8 +672,8 @@ public class AppHiddenController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
hiddenService.delete(pd);
|
hiddenService.delete(pd);
|
||||||
FHLOG.save(pd.getString("loginUserName"), "删除隐患ID:"+pd.getString("HIDDEN_ID"),ip); //记录日志 用户ID 隐患id 时间
|
FHLOG.save(pd.getString("loginUserName"), "删除隐患ID:" + pd.getString("HIDDEN_ID"), ip); //记录日志 用户ID 隐患id 时间
|
||||||
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(),pd.getString("HIDDEN_ID"),"1"));
|
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(), pd.getString("HIDDEN_ID"), "1"));
|
||||||
map.put("result", errInfo); // 返回结果
|
map.put("result", errInfo); // 返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -778,37 +792,42 @@ public class AppHiddenController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/edit")
|
@RequestMapping(value = "/edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object edit() throws Exception {
|
public Object edit() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = this.getPageData();
|
||||||
pd = this.getPageData();
|
|
||||||
|
|
||||||
hiddenUserService.delete(pd); //删除隐患相关人员 -- 隐患发现人
|
hiddenUserService.delete(pd); //删除隐患相关人员 -- 隐患发现人
|
||||||
if(pd.getString("STATE").equals("16")){//如果状态等于16进入此方法肯定是提交过来的,赋值给待确认
|
if (pd.getString("STATE").equals("16")) {//如果状态等于16进入此方法肯定是提交过来的,赋值给待确认
|
||||||
pd.put("STATE","-2");
|
pd.put("STATE", "-2");
|
||||||
if(Tools.notEmpty(pd.getString("POSITIONDESC"))){hiddenService.editInformation(pd);}
|
if (Tools.notEmpty(pd.getString("POSITIONDESC"))) {
|
||||||
|
hiddenService.editInformation(pd);
|
||||||
|
}
|
||||||
hiddenService.editstate(pd);
|
hiddenService.editstate(pd);
|
||||||
}
|
}
|
||||||
hiddenService.editInfo(pd);
|
hiddenService.editInfo(pd);
|
||||||
|
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
|
||||||
for (JSONObject json : list){
|
ArrayList<PageData> hiddenUserList = new ArrayList<>();
|
||||||
|
for (JSONObject json : list) {
|
||||||
PageData hiddenconUserAdd = new PageData();
|
PageData hiddenconUserAdd = new PageData();
|
||||||
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
||||||
hiddenconUserAdd.put("HIDDEN_ID",pd.getString("HIDDEN_ID"));
|
hiddenconUserAdd.put("HIDDEN_ID", pd.getString("HIDDEN_ID"));
|
||||||
hiddenconUserAdd.put("USER_ID",json.get("USER_ID"));
|
hiddenconUserAdd.put("USER_ID", json.get("USER_ID"));
|
||||||
hiddenconUserAdd.put("TYPE","1");
|
hiddenconUserAdd.put("TYPE", "1");
|
||||||
hiddenconUserAdd.put("IS_MAIN","0");
|
hiddenconUserAdd.put("IS_MAIN", "0");
|
||||||
hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
|
||||||
|
hiddenUserList.add(hiddenconUserAdd);
|
||||||
}
|
}
|
||||||
|
PageData dockData = new PageData();
|
||||||
|
dockData.putAll(pd);
|
||||||
|
dockData.put("hiddenUserList",hiddenUserList);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
map.put("dockData", dockData);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
*
|
*
|
||||||
|
@ -904,7 +923,7 @@ public class AppHiddenController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -943,8 +962,8 @@ public class AppHiddenController extends BaseController {
|
||||||
PageData corpinfo = new PageData();
|
PageData corpinfo = new PageData();
|
||||||
corpinfo.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
corpinfo.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||||
corpinfo = corpinfoService.findById(pd);
|
corpinfo = corpinfoService.findById(pd);
|
||||||
pd.put("STATE","2");
|
pd.put("STATE", "2");
|
||||||
pd.put("INVESTMENT_FUNDS",pd.getString("INVEST_FUNDS"));
|
pd.put("INVESTMENT_FUNDS", pd.getString("INVEST_FUNDS"));
|
||||||
hiddenService.rectify(pd);
|
hiddenService.rectify(pd);
|
||||||
|
|
||||||
pd.put("HIDDENSCHEME_ID", this.get32UUID()); // 主键
|
pd.put("HIDDENSCHEME_ID", this.get32UUID()); // 主键
|
||||||
|
@ -959,12 +978,12 @@ public class AppHiddenController extends BaseController {
|
||||||
hiddenSchemeService.save(pd);
|
hiddenSchemeService.save(pd);
|
||||||
}
|
}
|
||||||
this.hiddenCheckService.delete(pd);
|
this.hiddenCheckService.delete(pd);
|
||||||
if(Tools.notEmpty(pd.getString("CHECKOR"))){//判断验收人是否空,否就发送站内信
|
if (Tools.notEmpty(pd.getString("CHECKOR"))) {//判断验收人是否空,否就发送站内信
|
||||||
PageData mes = new PageData();
|
PageData mes = new PageData();
|
||||||
PageData hiddenPd = hiddenService.findById(pd);
|
PageData hiddenPd = hiddenService.findById(pd);
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_004","友情提示:有一条隐患需要验收",
|
messageService.sendMessageByParameter("HIDDEN_MAIL_004", "友情提示:有一条隐患需要验收",
|
||||||
hiddenPd.getString("CORPINFO_ID"),pd.getString("USER_ID"),hiddenPd.getString("HIDDEN_ID"),
|
hiddenPd.getString("CORPINFO_ID"), pd.getString("USER_ID"), hiddenPd.getString("HIDDEN_ID"),
|
||||||
hiddenPd.getString("HIDDENDESCR"),"隐患验收","验收","","");
|
hiddenPd.getString("HIDDENDESCR"), "隐患验收", "验收", "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) {
|
if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) {
|
||||||
|
@ -972,7 +991,7 @@ public class AppHiddenController extends BaseController {
|
||||||
for (JSONObject json : list) {
|
for (JSONObject json : list) {
|
||||||
// if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null
|
// if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null
|
||||||
// && json.get("USER_ID") != "") {
|
// && json.get("USER_ID") != "") {
|
||||||
if(!Tools.isEmpty(json.get("DEPARTMENT_ID")) && !Tools.isEmpty(json.get("USER_ID")) ){
|
if (!Tools.isEmpty(json.get("DEPARTMENT_ID")) && !Tools.isEmpty(json.get("USER_ID"))) {
|
||||||
PageData other = new PageData();
|
PageData other = new PageData();
|
||||||
other.put("HIDDENCHECK_ID", this.get32UUID()); // 主键
|
other.put("HIDDENCHECK_ID", this.get32UUID()); // 主键
|
||||||
other.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
|
other.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
|
||||||
|
@ -981,9 +1000,9 @@ public class AppHiddenController extends BaseController {
|
||||||
other.put("STATUS", "0");
|
other.put("STATUS", "0");
|
||||||
hiddenCheckService.save(other);
|
hiddenCheckService.save(other);
|
||||||
PageData hiddenPd = hiddenService.findById(pd);
|
PageData hiddenPd = hiddenService.findById(pd);
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_004","友情提示:有一条隐患需要验收",
|
messageService.sendMessageByParameter("HIDDEN_MAIL_004", "友情提示:有一条隐患需要验收",
|
||||||
hiddenPd.getString("CORPINFO_ID"),json.get("USER_ID").toString(),hiddenPd.getString("HIDDEN_ID"),
|
hiddenPd.getString("CORPINFO_ID"), json.get("USER_ID").toString(), hiddenPd.getString("HIDDEN_ID"),
|
||||||
hiddenPd.getString("HIDDENDESCR"),"隐患验收","验收","","");
|
hiddenPd.getString("HIDDENDESCR"), "隐患验收", "验收", "", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1055,8 +1074,8 @@ public class AppHiddenController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
if (pd.get("ISQUALIFIED").equals("1")) { //验收合格
|
if (pd.get("ISQUALIFIED").equals("1")) { //验收合格
|
||||||
List<PageData> pd2 = this.hiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息
|
List<PageData> pd2 = this.hiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息
|
||||||
if(pd2.size()>0){
|
if (pd2.size() > 0) {
|
||||||
for(PageData checklist: pd2){
|
for (PageData checklist : pd2) {
|
||||||
pd.put("STATUS", 1);
|
pd.put("STATUS", 1);
|
||||||
pd.put("HIDDENCHECK_ID", checklist.get("HIDDENCHECK_ID"));
|
pd.put("HIDDENCHECK_ID", checklist.get("HIDDENCHECK_ID"));
|
||||||
pd.put("DEPARTMENT_ID", checklist.get("DEPARTMENT_ID"));
|
pd.put("DEPARTMENT_ID", checklist.get("DEPARTMENT_ID"));
|
||||||
|
@ -1075,14 +1094,14 @@ public class AppHiddenController extends BaseController {
|
||||||
for (PageData check : checkList) {
|
for (PageData check : checkList) {
|
||||||
if (check.get("STATUS").toString().equals("0")) {
|
if (check.get("STATUS").toString().equals("0")) {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("code","1000");
|
map.put("code", "1000");
|
||||||
map.put("errorMessage","此次检查还有未合格项,不能验收");
|
map.put("errorMessage", "此次检查还有未合格项,不能验收");
|
||||||
map.put("check", pd);
|
map.put("check", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Tools.isEmpty(pd.getString("CHECKTIME")) && Tools.notEmpty(pd.getString("CHECK_TIME"))){//用于手机端传验收时间,存隐患表20220920
|
if (Tools.isEmpty(pd.getString("CHECKTIME")) && Tools.notEmpty(pd.getString("CHECK_TIME"))) {//用于手机端传验收时间,存隐患表20220920
|
||||||
pd.put("CHECKTIME",pd.getString("CHECK_TIME"));
|
pd.put("CHECKTIME", pd.getString("CHECK_TIME"));
|
||||||
}
|
}
|
||||||
hiddenService.check(pd);
|
hiddenService.check(pd);
|
||||||
if (Tools.notEmpty(pd.getString("INSPECTION_ID"))) { //安全环保检查验收
|
if (Tools.notEmpty(pd.getString("INSPECTION_ID"))) { //安全环保检查验收
|
||||||
|
@ -1098,11 +1117,11 @@ public class AppHiddenController extends BaseController {
|
||||||
}
|
}
|
||||||
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
|
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
|
||||||
inspection.put("OPERATOR", pd.getString("CHECKOR"));
|
inspection.put("OPERATOR", pd.getString("CHECKOR"));
|
||||||
inspection.put("HIDDEN_vector",pd.getString("HIDDEN_ID"));
|
inspection.put("HIDDEN_vector", pd.getString("HIDDEN_ID"));
|
||||||
noticeUtil.SE_ThreeStepUtil(inspection);
|
noticeUtil.SE_ThreeStepUtil(inspection);
|
||||||
}
|
}
|
||||||
// 隐患验收清理点检处的状态
|
// 隐患验收清理点检处的状态
|
||||||
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(),pd.getString("HIDDEN_ID"),"0"));
|
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(), pd.getString("HIDDEN_ID"), "0"));
|
||||||
} else {
|
} else {
|
||||||
PageData pd2 = new PageData(); //验收打回
|
PageData pd2 = new PageData(); //验收打回
|
||||||
pd2.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
|
pd2.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
|
||||||
|
@ -1111,7 +1130,7 @@ public class AppHiddenController extends BaseController {
|
||||||
for (PageData pageData : zgImgs) {
|
for (PageData pageData : zgImgs) {
|
||||||
|
|
||||||
imgFilesService.delete(pageData);
|
imgFilesService.delete(pageData);
|
||||||
if(Tools.notEmpty(pageData.getString("FILEPATH"))) {
|
if (Tools.notEmpty(pageData.getString("FILEPATH"))) {
|
||||||
Smb.deleteFile(pageData.getString("FILEPATH"));
|
Smb.deleteFile(pageData.getString("FILEPATH"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1121,7 +1140,7 @@ public class AppHiddenController extends BaseController {
|
||||||
/** 验收打回 **/
|
/** 验收打回 **/
|
||||||
hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID"));
|
hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID"));
|
||||||
/** 记录打回 **/
|
/** 记录打回 **/
|
||||||
hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"),pd.getString("CONTENT"),pd.getString("CHECKOR"));
|
hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"), pd.getString("CHECKOR"));
|
||||||
}
|
}
|
||||||
hiddenMailService.apphiddneCheckAdopt(pd);
|
hiddenMailService.apphiddneCheckAdopt(pd);
|
||||||
map.put("check", pd);
|
map.put("check", pd);
|
||||||
|
@ -1204,12 +1223,12 @@ public class AppHiddenController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd = hiddenService.findById(pd); // 根据ID读取
|
pd = hiddenService.findById(pd); // 根据ID读取
|
||||||
if(pd.getString("CONFIRM_USER")!=null || pd.getString("CONFIRM_USER").equals("undefined")){
|
if (pd.getString("CONFIRM_USER") != null || pd.getString("CONFIRM_USER").equals("undefined")) {
|
||||||
pd.put("USER_ID",pd.getString("CONFIRM_USER"));
|
pd.put("USER_ID", pd.getString("CONFIRM_USER"));
|
||||||
PageData user = usersService.findById(pd);
|
PageData user = usersService.findById(pd);
|
||||||
if(user!=null){
|
if (user != null) {
|
||||||
pd.put("confirmDeptId",user.getString("DEPARTMENT_ID"));
|
pd.put("confirmDeptId", user.getString("DEPARTMENT_ID"));
|
||||||
pd.put("conUserId",pd.getString("CONFIRM_USER"));
|
pd.put("conUserId", pd.getString("CONFIRM_USER"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageData pd2 = new PageData();
|
PageData pd2 = new PageData();
|
||||||
|
@ -1249,12 +1268,12 @@ public class AppHiddenController extends BaseController {
|
||||||
}
|
}
|
||||||
List<PageData> hiddenExa = hiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息
|
List<PageData> hiddenExa = hiddenExamineService.listAllByHiddenId(pd.getString("HIDDEN_ID")); // 隐患流程信息
|
||||||
List<PageData> repulsecause = hiddenExamineService.findByHiddenId(pd);//确认人打回信息
|
List<PageData> repulsecause = hiddenExamineService.findByHiddenId(pd);//确认人打回信息
|
||||||
for (PageData pageData :hiddenExa){
|
for (PageData pageData : hiddenExa) {
|
||||||
if("0".equals(pageData.getString("TYPE"))){
|
if ("0".equals(pageData.getString("TYPE"))) {
|
||||||
pd.put("editUserName",pageData.get("editUserName"));
|
pd.put("editUserName", pageData.get("editUserName"));
|
||||||
pd.put("editDeptName",pageData.get("editDeptName"));
|
pd.put("editDeptName", pageData.get("editDeptName"));
|
||||||
pd.put("editLevelName",pageData.get("editLevelName"));
|
pd.put("editLevelName", pageData.get("editLevelName"));
|
||||||
pd.put("editRectificationDeadline",pageData.get("spare3"));
|
pd.put("editRectificationDeadline", pageData.get("spare3"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("hiddenExa", hiddenExa); // //特殊审批信息
|
map.put("hiddenExa", hiddenExa); // //特殊审批信息
|
||||||
|
@ -1263,12 +1282,12 @@ public class AppHiddenController extends BaseController {
|
||||||
map.put("hs", hs);
|
map.put("hs", hs);
|
||||||
map.put("hImgs", hImgs);
|
map.put("hImgs", hImgs);
|
||||||
map.put("rImgs", rImgs);
|
map.put("rImgs", rImgs);
|
||||||
map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"),"102"));// 隐患视频
|
map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"), "102"));// 隐患视频
|
||||||
// map.put("cImgs", cImgs);
|
// map.put("cImgs", cImgs);
|
||||||
map.put("sImgs", sImgs);
|
map.put("sImgs", sImgs);
|
||||||
map.put("hiddenFindPeople", hiddenFindPeople); // 隐患相关人员信息
|
map.put("hiddenFindPeople", hiddenFindPeople); // 隐患相关人员信息
|
||||||
map.put("checkList", checkList);
|
map.put("checkList", checkList);
|
||||||
map.put("repulsecause",repulsecause);
|
map.put("repulsecause", repulsecause);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -1328,7 +1347,7 @@ public class AppHiddenController extends BaseController {
|
||||||
int checked = 0;
|
int checked = 0;
|
||||||
int uncheck = 0;
|
int uncheck = 0;
|
||||||
for (PageData hidden : varList) {
|
for (PageData hidden : varList) {
|
||||||
if (hidden.get("STATE").toString().equals("4")||hidden.get("STATE").toString().equals("2")) {
|
if (hidden.get("STATE").toString().equals("4") || hidden.get("STATE").toString().equals("2")) {
|
||||||
checked++;
|
checked++;
|
||||||
} else {
|
} else {
|
||||||
uncheck++;
|
uncheck++;
|
||||||
|
@ -1346,6 +1365,7 @@ public class AppHiddenController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取检查记录风险点
|
* 获取检查记录风险点
|
||||||
*
|
*
|
||||||
|
@ -1364,6 +1384,7 @@ public class AppHiddenController extends BaseController {
|
||||||
map.put("hiddenList", hiddenList);
|
map.put("hiddenList", hiddenList);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表 隐患列表接口
|
* 列表 隐患列表接口
|
||||||
*
|
*
|
||||||
|
@ -1377,7 +1398,7 @@ public class AppHiddenController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
if(Tools.isEmpty(pd.get("loginUserId"))){ // 由我确认的隐患
|
if (Tools.isEmpty(pd.get("loginUserId"))) { // 由我确认的隐患
|
||||||
map.put("varList", new ArrayList<>());
|
map.put("varList", new ArrayList<>());
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", "Error");
|
map.put("result", "Error");
|
||||||
|
@ -1390,15 +1411,15 @@ public class AppHiddenController extends BaseController {
|
||||||
|
|
||||||
3.让我验收的隐患
|
3.让我验收的隐患
|
||||||
*/
|
*/
|
||||||
if("0".equals(pd.getString("stateConfirm"))){ //确认的隐患 stateConfirm:0全部 。1未确认的,2已确认的
|
if ("0".equals(pd.getString("stateConfirm"))) { //确认的隐患 stateConfirm:0全部 。1未确认的,2已确认的
|
||||||
pd.put("CONFIRM_USER",pd.get("loginUserId"));
|
pd.put("CONFIRM_USER", pd.get("loginUserId"));
|
||||||
}
|
}
|
||||||
if("0".equals(pd.getString("stateRectify"))){ //我整改的隐患
|
if ("0".equals(pd.getString("stateRectify"))) { //我整改的隐患
|
||||||
pd.put("RECTIFICATIONOR",pd.get("loginUserId"));
|
pd.put("RECTIFICATIONOR", pd.get("loginUserId"));
|
||||||
pd.put("STATE","1");
|
pd.put("STATE", "1");
|
||||||
}
|
}
|
||||||
if (!Tools.isEmpty(pd.get("corpinfoId"))){
|
if (!Tools.isEmpty(pd.get("corpinfoId"))) {
|
||||||
pd.put("CORPINFO_ID",pd.getString("corpinfoId"));
|
pd.put("CORPINFO_ID", pd.getString("corpinfoId"));
|
||||||
}
|
}
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = hiddenService.listGwj(page); // 列出Hidden列表
|
List<PageData> varList = hiddenService.listGwj(page); // 列出Hidden列表
|
||||||
|
@ -1422,15 +1443,15 @@ public class AppHiddenController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
if(Tools.isEmpty(pd.get("loginUserId"))){ // 由我确认的隐患
|
if (Tools.isEmpty(pd.get("loginUserId"))) { // 由我确认的隐患
|
||||||
map.put("varList", new ArrayList<>());
|
map.put("varList", new ArrayList<>());
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", "Error");
|
map.put("result", "Error");
|
||||||
map.put("msg", "未找到登录人信息,请联系管理员");
|
map.put("msg", "未找到登录人信息,请联系管理员");
|
||||||
}
|
}
|
||||||
pd.put("CONFIRM_USER",pd.getString("loginUserId"));
|
pd.put("CONFIRM_USER", pd.getString("loginUserId"));
|
||||||
if (!Tools.isEmpty(pd.get("corpinfoId"))){
|
if (!Tools.isEmpty(pd.get("corpinfoId"))) {
|
||||||
pd.put("CORPINFO_ID",pd.getString("corpinfoId"));
|
pd.put("CORPINFO_ID", pd.getString("corpinfoId"));
|
||||||
}
|
}
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = hiddenService.listIgnore(page); // 列出Hidden列表
|
List<PageData> varList = hiddenService.listIgnore(page); // 列出Hidden列表
|
||||||
|
@ -1453,12 +1474,12 @@ public class AppHiddenController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
if("1".equals(pd.get("isEmis"))){
|
if ("1".equals(pd.get("isEmis"))) {
|
||||||
errInfo = hiddenService.goEmis(pd);
|
errInfo = hiddenService.goEmis(pd);
|
||||||
if("success".equals(errInfo)){
|
if ("success".equals(errInfo)) {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}else{
|
} else {
|
||||||
map.put("result", "errInfo");
|
map.put("result", "errInfo");
|
||||||
map.put("msg", errInfo);
|
map.put("msg", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -1466,62 +1487,62 @@ public class AppHiddenController extends BaseController {
|
||||||
|
|
||||||
}
|
}
|
||||||
PageData editHidden = new PageData();
|
PageData editHidden = new PageData();
|
||||||
if("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL"))){ // 如果是忽略隐患
|
if ("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL"))) { // 如果是忽略隐患
|
||||||
editHidden.put("STATE","5");
|
editHidden.put("STATE", "5");
|
||||||
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(),pd.getString("HIDDEN_ID"),"0"));
|
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(), pd.getString("HIDDEN_ID"), "0"));
|
||||||
}else if("hiddenLevel2002".equals(pd.getString("HIDDENLEVEL"))){ // 如果是是重大隐患
|
} else if ("hiddenLevel2002".equals(pd.getString("HIDDENLEVEL"))) { // 如果是是重大隐患
|
||||||
editHidden.put("STATE","6");
|
editHidden.put("STATE", "6");
|
||||||
}else {
|
} else {
|
||||||
editHidden.put("STATE","1");
|
editHidden.put("STATE", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
editHidden.put("CONFIRM_USER",pd.get("USER_ID")); // 隐患确认人
|
editHidden.put("CONFIRM_USER", pd.get("USER_ID")); // 隐患确认人
|
||||||
editHidden.put("CONFIRM_TIME",DateUtil.date2Str(new Date())); // 隐患确认时间
|
editHidden.put("CONFIRM_TIME", DateUtil.date2Str(new Date())); // 隐患确认时间
|
||||||
editHidden.put("RECTIFICATIONDEPT",pd.get("RECTIFICATIONDEPT")); // 整改部门
|
editHidden.put("RECTIFICATIONDEPT", pd.get("RECTIFICATIONDEPT")); // 整改部门
|
||||||
editHidden.put("RECTIFICATIONOR",pd.get("RECTIFICATIONOR")); // 整改人
|
editHidden.put("RECTIFICATIONOR", pd.get("RECTIFICATIONOR")); // 整改人
|
||||||
editHidden.put("RECTIFICATIONDEADLINE",pd.get("RECTIFICATIONDEADLINE")); // 整改期限
|
editHidden.put("RECTIFICATIONDEADLINE", pd.get("RECTIFICATIONDEADLINE")); // 整改期限
|
||||||
editHidden.put("HIDDENLEVEL",pd.get("HIDDENLEVEL")); // 隐患级别
|
editHidden.put("HIDDENLEVEL", pd.get("HIDDENLEVEL")); // 隐患级别
|
||||||
editHidden.put("HIDDEN_ID",pd.get("HIDDEN_ID")); // 隐患id
|
editHidden.put("HIDDEN_ID", pd.get("HIDDEN_ID")); // 隐患id
|
||||||
PageData hidden = hiddenService.findById(pd);
|
PageData hidden = hiddenService.findById(pd);
|
||||||
if("1".equals(hidden.get("RECTIFICATIONTYPE").toString())){
|
if ("1".equals(hidden.get("RECTIFICATIONTYPE").toString())) {
|
||||||
editHidden.put("STATE","4");
|
editHidden.put("STATE", "4");
|
||||||
}
|
}
|
||||||
PageData exaPd = new PageData(); // 添加隐患确认信息
|
PageData exaPd = new PageData(); // 添加隐患确认信息
|
||||||
exaPd.put("TYPE","4");
|
exaPd.put("TYPE", "4");
|
||||||
exaPd.put("STATE","2");
|
exaPd.put("STATE", "2");
|
||||||
exaPd.put("HIDDEN_ID",hidden.get("HIDDEN_ID"));
|
exaPd.put("HIDDEN_ID", hidden.get("HIDDEN_ID"));
|
||||||
exaPd.put("spare1",pd.getString("HIDDENLEVEL"));
|
exaPd.put("spare1", pd.getString("HIDDENLEVEL"));
|
||||||
exaPd.put("spare2",pd.getString("RECTIFICATIONOR"));
|
exaPd.put("spare2", pd.getString("RECTIFICATIONOR"));
|
||||||
exaPd.put("spare3",pd.getString("RECTIFICATIONDEADLINE"));
|
exaPd.put("spare3", pd.getString("RECTIFICATIONDEADLINE"));
|
||||||
exaPd.put("spare4",pd.getString("RECTIFICATIONDEPT"));
|
exaPd.put("spare4", pd.getString("RECTIFICATIONDEPT"));
|
||||||
exaPd.put("CREATOR", pd.getString("loginUserId"));
|
exaPd.put("CREATOR", pd.getString("loginUserId"));
|
||||||
exaPd.put("OPERATOR",pd.getString("loginUserId"));
|
exaPd.put("OPERATOR", pd.getString("loginUserId"));
|
||||||
hiddenExamineService.saveApp(exaPd);
|
hiddenExamineService.saveApp(exaPd);
|
||||||
if("1".equals(hidden.get("RECTIFICATIONTYPE").toString())){ //确认时判断是否是立即整改
|
if ("1".equals(hidden.get("RECTIFICATIONTYPE").toString())) { //确认时判断是否是立即整改
|
||||||
if(pd.getString("isTrue").equals("1")){
|
if (pd.getString("isTrue").equals("1")) {
|
||||||
editHidden.put("STATE","4");
|
editHidden.put("STATE", "4");
|
||||||
editHidden.put("CHECKOR",hidden.getString("CREATOR"));
|
editHidden.put("CHECKOR", hidden.getString("CREATOR"));
|
||||||
}else {
|
} else {
|
||||||
editHidden.put("STATE","1");
|
editHidden.put("STATE", "1");
|
||||||
editHidden.put("RECTIFICATIONTYPE","2");
|
editHidden.put("RECTIFICATIONTYPE", "2");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
hiddenService.confirmHidden(editHidden); // 隐患确认
|
hiddenService.confirmHidden(editHidden); // 隐患确认
|
||||||
if(Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")){
|
if (Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")) {
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_002","友情提示:有一条隐患需要整改",
|
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改",
|
||||||
hidden.getString("CORPINFO_ID"),pd.getString("USER_ID"),hidden.getString("HIDDEN_ID"),
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
||||||
hidden.getString("HIDDENDESCR"),"隐患整改","整改","","");
|
hidden.getString("HIDDENDESCR"), "隐患整改", "整改", "", "");
|
||||||
}else if("1".equals(hidden.getString("RECTIFICATIONTYPE"))){
|
} else if ("1".equals(hidden.getString("RECTIFICATIONTYPE"))) {
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_003","友情提示:有一条隐患已验收",
|
messageService.sendMessageByParameter("HIDDEN_MAIL_003", "友情提示:有一条隐患已验收",
|
||||||
hidden.getString("CORPINFO_ID"),pd.getString("USER_ID"),hidden.getString("HIDDEN_ID"),
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
||||||
hidden.getString("HIDDENDESCR"),"通过","整改","","");
|
hidden.getString("HIDDENDESCR"), "通过", "整改", "", "");
|
||||||
}
|
}
|
||||||
List<PageData> repulsecause = hiddenExamineService.findByHiddenId(pd);//确认人打回信息
|
List<PageData> repulsecause = hiddenExamineService.findByHiddenId(pd);//确认人打回信息
|
||||||
if(repulsecause.size()>0){
|
if (repulsecause.size() > 0) {
|
||||||
for(PageData IDS:repulsecause){
|
for (PageData IDS : repulsecause) {
|
||||||
PageData repulse = new PageData();
|
PageData repulse = new PageData();
|
||||||
repulse.put("HIDDENEXAMINE_ID",IDS.getString("HIDDENEXAMINE_ID"));
|
repulse.put("HIDDENEXAMINE_ID", IDS.getString("HIDDENEXAMINE_ID"));
|
||||||
hiddenExamineService.editrepulse(repulse); //有打回记录的隐患信息,把spare5改成1。确认通过后就不显示出来
|
hiddenExamineService.editrepulse(repulse); //有打回记录的隐患信息,把spare5改成1。确认通过后就不显示出来
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1534,16 +1555,17 @@ public class AppHiddenController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取隐患部位列表(菜单管理)
|
* 获取隐患部位列表(菜单管理)
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/getTreehiddenRegionListAll")
|
@RequestMapping(value = "/getTreehiddenRegionListAll")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getTreehiddenRegionListAll()throws Exception{
|
public Object getTreehiddenRegionListAll() throws Exception {
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
JSONArray arr = JSONArray.fromObject(hiddenRegionService.listAll("0" , pd.getString("CORPINFO_ID")));
|
JSONArray arr = JSONArray.fromObject(hiddenRegionService.listAll("0", pd.getString("CORPINFO_ID")));
|
||||||
String json = arr.toString();
|
String json = arr.toString();
|
||||||
json = json.replaceAll("HIDDENREGION_ID", "id")
|
json = json.replaceAll("HIDDENREGION_ID", "id")
|
||||||
.replaceAll("PARENT_ID", "pId")
|
.replaceAll("PARENT_ID", "pId")
|
||||||
|
@ -1594,6 +1616,7 @@ public class AppHiddenController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全环保检查隐患指派
|
* 安全环保检查隐患指派
|
||||||
*
|
*
|
||||||
|
@ -1616,7 +1639,7 @@ public class AppHiddenController extends BaseController {
|
||||||
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||||
if ("-2".equals(pd.getString("HIDDEN_STATUS"))) {
|
if ("-2".equals(pd.getString("HIDDEN_STATUS"))) {
|
||||||
pd.put("ISCONFIRM", "0"); //
|
pd.put("ISCONFIRM", "0"); //
|
||||||
pd.put("CONFIRM_TIME",DateUtil.date2Str(new Date()));
|
pd.put("CONFIRM_TIME", DateUtil.date2Str(new Date()));
|
||||||
if (list.size() == 0) {
|
if (list.size() == 0) {
|
||||||
inspection.put("INSPECTION_STATUS", "5"); // 指派完成
|
inspection.put("INSPECTION_STATUS", "5"); // 指派完成
|
||||||
} else {
|
} else {
|
||||||
|
@ -1625,10 +1648,10 @@ public class AppHiddenController extends BaseController {
|
||||||
safetyenvironmentalService.editStatus(inspection);
|
safetyenvironmentalService.editStatus(inspection);
|
||||||
}
|
}
|
||||||
hiddenService.assign(pd);
|
hiddenService.assign(pd);
|
||||||
if(Tools.notEmpty(pd.getString("CONFIRM_USER"))){
|
if (Tools.notEmpty(pd.getString("CONFIRM_USER"))) {
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_001","友情提示:有一条隐患需要确定",pd.getString("CORPINFO_ID"),
|
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确定", pd.getString("CORPINFO_ID"),
|
||||||
pd.getString("CONFIRM_USER"),"",
|
pd.getString("CONFIRM_USER"), "",
|
||||||
pd.getString("HIDDENDESCR"),"隐患确认","确认","","");
|
pd.getString("HIDDENDESCR"), "隐患确认", "确认", "", "");
|
||||||
}
|
}
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
@ -1670,7 +1693,7 @@ public class AppHiddenController extends BaseController {
|
||||||
for (PageData pageData : zgImgs) {
|
for (PageData pageData : zgImgs) {
|
||||||
|
|
||||||
imgFilesService.delete(pageData);
|
imgFilesService.delete(pageData);
|
||||||
if(Tools.notEmpty(pageData.getString("FILEPATH"))) {
|
if (Tools.notEmpty(pageData.getString("FILEPATH"))) {
|
||||||
Smb.deleteFile(pageData.getString("FILEPATH"));
|
Smb.deleteFile(pageData.getString("FILEPATH"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1686,8 +1709,8 @@ public class AppHiddenController extends BaseController {
|
||||||
inspection.put("INSPECTION_STATUS", "3"); // 安全环保检查打回到归档,隐患待指派
|
inspection.put("INSPECTION_STATUS", "3"); // 安全环保检查打回到归档,隐患待指派
|
||||||
safetyenvironmentalService.editStatus(inspection);
|
safetyenvironmentalService.editStatus(inspection);
|
||||||
|
|
||||||
inspection.put("SENDER_ID",pd.getString("FINAL_CHECKOR"));
|
inspection.put("SENDER_ID", pd.getString("FINAL_CHECKOR"));
|
||||||
inspection.put("SENDER_NAME",pd.getString("FINAL_CHECKOR"));
|
inspection.put("SENDER_NAME", pd.getString("FINAL_CHECKOR"));
|
||||||
noticeUtil.SE_Repulse(inspection);
|
noticeUtil.SE_Repulse(inspection);
|
||||||
// hiddenExamineService.deleteByHiddenId(pd); //如果验收打回删除隐患相关信息
|
// hiddenExamineService.deleteByHiddenId(pd); //如果验收打回删除隐患相关信息
|
||||||
// hidden.put("HIDDENEXAMINE_ID",this.get32UUID());
|
// hidden.put("HIDDENEXAMINE_ID",this.get32UUID());
|
||||||
|
@ -1707,6 +1730,7 @@ public class AppHiddenController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 隐患确认打回
|
* 隐患确认打回
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -1721,10 +1745,10 @@ public class AppHiddenController extends BaseController {
|
||||||
hiddenService.editstate(pd);
|
hiddenService.editstate(pd);
|
||||||
pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID());
|
pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID());
|
||||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||||
pd.put("OPERATTIME",DateUtil.date2Str(new Date()));
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||||
hiddenExamineService.saverepulse(pd);
|
hiddenExamineService.saverepulse(pd);
|
||||||
hiddenMailService.reject(pd);
|
hiddenMailService.reject(pd);
|
||||||
map.put("result",errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1747,8 +1771,8 @@ public class AppHiddenController extends BaseController {
|
||||||
page.setTotalResult(Integer.parseInt(pd.get("totalResult").toString()));
|
page.setTotalResult(Integer.parseInt(pd.get("totalResult").toString()));
|
||||||
|
|
||||||
|
|
||||||
pd.put("CORPINFO_ID",pd.getString("CORPINFO_ID"));
|
pd.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||||
pd.put("queryUserId",pd.getString("SELFUSERID"));
|
pd.put("queryUserId", pd.getString("SELFUSERID"));
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = hiddenService.getListForTianzhang(page); // 列出Hidden列表
|
List<PageData> varList = hiddenService.getListForTianzhang(page); // 列出Hidden列表
|
||||||
varList = hiddenUserService.getHiddebFind(varList);
|
varList = hiddenUserService.getHiddebFind(varList);
|
||||||
|
@ -1760,6 +1784,7 @@ public class AppHiddenController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断登录人是否已经验收
|
* 判断登录人是否已经验收
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -1772,16 +1797,16 @@ public class AppHiddenController extends BaseController {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
List<PageData> checkList = hiddenCheckService.findByHidden(pd);
|
List<PageData> checkList = hiddenCheckService.findByHidden(pd);
|
||||||
if(checkList.size()>0){
|
if (checkList.size() > 0) {
|
||||||
for(PageData arr:checkList){
|
for (PageData arr : checkList) {
|
||||||
if(arr.getString("STATUS").equals("1")){
|
if (arr.getString("STATUS").equals("1")) {
|
||||||
map.put("istrue","1");
|
map.put("istrue", "1");
|
||||||
} else if (arr.getString("STATUS").equals("0")){
|
} else if (arr.getString("STATUS").equals("0")) {
|
||||||
map.put("istrue","0");
|
map.put("istrue", "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("result",errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,9 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
|
import com.zcloud.dto.TenCorpDto;
|
||||||
|
import com.zcloud.service.mq.DockSendMessageService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -36,24 +39,29 @@ public class AppImgFilesController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ImgFilesService imgfilesService;
|
private ImgFilesService imgfilesService;
|
||||||
|
@Autowired
|
||||||
|
private DockSendMessageService dockSendMessageService;
|
||||||
|
|
||||||
/**完成
|
/**
|
||||||
|
* 完成
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/add", headers = "content-type=multipart/form-data")
|
@RequestMapping(value = "/add", headers = "content-type=multipart/form-data")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@DockAnnotation(hasAnnex = true)
|
||||||
public Object finish(
|
public Object finish(
|
||||||
@RequestParam(value="FFILE",required=false) MultipartFile[] files,
|
@RequestParam(value = "FFILE", required = false) MultipartFile[] files,
|
||||||
@RequestParam(value="TYPE",required=false) String TYPE,
|
@RequestParam(value = "TYPE", required = false) String TYPE,
|
||||||
@RequestParam(value="FOREIGN_KEY",required=false) String FOREIGN_KEY
|
@RequestParam(value = "FOREIGN_KEY", required = false) String FOREIGN_KEY
|
||||||
) throws Exception{
|
) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
if (files != null && files.length > 0) {
|
if (files != null && files.length > 0) {
|
||||||
for (int i = 0; i < files.length; i++) {
|
for (int i = 0; i < files.length; i++) {
|
||||||
String suffixName = files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"json".equals(suffixName) && !"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"json".equals(suffixName) && !"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -66,7 +74,7 @@ public class AppImgFilesController extends BaseController {
|
||||||
// 保存文件
|
// 保存文件
|
||||||
File tempFile = new File(file.getOriginalFilename());
|
File tempFile = new File(file.getOriginalFilename());
|
||||||
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
||||||
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("102")) {//四色图改为json文件,不用判断类型
|
if (!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("102")) {//四色图改为json文件,不用判断类型
|
||||||
tempFile.delete();
|
tempFile.delete();
|
||||||
map.put("result", "failed");
|
map.put("result", "failed");
|
||||||
map.put("exception", "上传图片格式不正确,请重新上传");
|
map.put("exception", "上传图片格式不正确,请重新上传");
|
||||||
|
@ -76,15 +84,23 @@ public class AppImgFilesController extends BaseController {
|
||||||
tempFile.delete();
|
tempFile.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(TYPE.equals("2") || TYPE.equals("102")) {//先删除原四色图
|
if (TYPE.equals("2") || TYPE.equals("102")) {//先删除原四色图
|
||||||
PageData pd2 = new PageData();
|
PageData pd2 = new PageData();
|
||||||
pd2.put("FOREIGN_KEY",FOREIGN_KEY);
|
pd2.put("FOREIGN_KEY", FOREIGN_KEY);
|
||||||
pd2.put("TYPE",TYPE);
|
pd2.put("TYPE", TYPE);
|
||||||
List<PageData> four = imgfilesService.listAll(pd2);
|
List<PageData> four = imgfilesService.listAll(pd2);
|
||||||
for (PageData pageData : four) {
|
for (PageData pageData : four) {
|
||||||
File old = new File(PathUtil.getProjectpath()+pageData.getString("FILEPATH"));
|
File old = new File(PathUtil.getProjectpath() + pageData.getString("FILEPATH"));
|
||||||
old.delete();
|
old.delete();
|
||||||
imgfilesService.delete(pageData);
|
imgfilesService.delete(pageData);
|
||||||
|
pageData.put("delete","1");
|
||||||
|
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||||
|
tenCorpDto.setMessage("删除文件消息");
|
||||||
|
tenCorpDto.setId(UuidUtil.get32UUID());
|
||||||
|
tenCorpDto.setTopic("docking");
|
||||||
|
tenCorpDto.setProducer_name("qa-prevention-czks");
|
||||||
|
tenCorpDto.setData(pageData);
|
||||||
|
dockSendMessageService.sendMessagePictureDelete(tenCorpDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
|
@ -92,35 +108,36 @@ public class AppImgFilesController extends BaseController {
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
String IMGFILES_ID = this.get32UUID();
|
||||||
|
pd.put("IMGFILES_ID", IMGFILES_ID);
|
||||||
pd.put("IMGFILES_ID", this.get32UUID());
|
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
pd.put("TYPE", TYPE);
|
pd.put("TYPE", TYPE);
|
||||||
pd.put("FOREIGN_KEY", FOREIGN_KEY);
|
pd.put("FOREIGN_KEY", FOREIGN_KEY);
|
||||||
|
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile, IMGFILES_ID, FOREIGN_KEY, TYPE);
|
||||||
imgfilesService.save(pd);
|
imgfilesService.save(pd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**新增
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/add64")
|
@RequestMapping(value = "/add64")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object add64() throws Exception{
|
public Object add64() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
MultipartFile img = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("FILEPATH"));
|
MultipartFile img = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("FILEPATH"));
|
||||||
String suffixName = img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -128,7 +145,7 @@ public class AppImgFilesController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
String fileName = this.get32UUID()+img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(img, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
Smb.sshSftp(img, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
pd.put("IMGFILES_ID", this.get32UUID());
|
pd.put("IMGFILES_ID", this.get32UUID());
|
||||||
|
@ -141,23 +158,25 @@ public class AppImgFilesController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**完成
|
/**
|
||||||
|
* 完成
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/edit", headers = "content-type=multipart/form-data")
|
@RequestMapping(value = "/edit", headers = "content-type=multipart/form-data")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional
|
@Transactional
|
||||||
public Object edit(
|
public Object edit(
|
||||||
@RequestParam(value="FFILE",required=false) MultipartFile[] files,
|
@RequestParam(value = "FFILE", required = false) MultipartFile[] files,
|
||||||
@RequestParam(value="TYPE",required=false) String TYPE,
|
@RequestParam(value = "TYPE", required = false) String TYPE,
|
||||||
@RequestParam(value="FOREIGN_KEY",required=false) String FOREIGN_KEY
|
@RequestParam(value = "FOREIGN_KEY", required = false) String FOREIGN_KEY
|
||||||
) throws Exception{
|
) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
if (files != null && files.length > 0) {
|
if (files != null && files.length > 0) {
|
||||||
for (int i = 0; i < files.length; i++) {
|
for (int i = 0; i < files.length; i++) {
|
||||||
String suffixName = files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
String suffixName = files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".") + 1).toLowerCase();
|
||||||
if (!"json".equals(suffixName) && !"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
if (!"json".equals(suffixName) && !"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -166,11 +185,11 @@ public class AppImgFilesController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageData pd2 = new PageData();
|
PageData pd2 = new PageData();
|
||||||
pd2.put("FOREIGN_KEY",FOREIGN_KEY);
|
pd2.put("FOREIGN_KEY", FOREIGN_KEY);
|
||||||
pd2.put("TYPE",TYPE);
|
pd2.put("TYPE", TYPE);
|
||||||
List<PageData> four = imgfilesService.listAll(pd2);
|
List<PageData> four = imgfilesService.listAll(pd2);
|
||||||
for (PageData pageData : four) {
|
for (PageData pageData : four) {
|
||||||
File old = new File(PathUtil.getProjectpath()+pageData.getString("FILEPATH"));
|
File old = new File(PathUtil.getProjectpath() + pageData.getString("FILEPATH"));
|
||||||
old.delete();
|
old.delete();
|
||||||
imgfilesService.delete(pageData);
|
imgfilesService.delete(pageData);
|
||||||
}
|
}
|
||||||
|
@ -179,7 +198,7 @@ public class AppImgFilesController extends BaseController {
|
||||||
// 保存文件
|
// 保存文件
|
||||||
File tempFile = new File(file.getOriginalFilename());
|
File tempFile = new File(file.getOriginalFilename());
|
||||||
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
|
||||||
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2")) {//四色图改为json文件,不用判断类型
|
if (!FileUpload.isImage(tempFile) && !TYPE.equals("2")) {//四色图改为json文件,不用判断类型
|
||||||
tempFile.delete();
|
tempFile.delete();
|
||||||
map.put("result", "failed");
|
map.put("result", "failed");
|
||||||
map.put("exception", "上传图片格式不正确,请重新上传");
|
map.put("exception", "上传图片格式不正确,请重新上传");
|
||||||
|
@ -193,8 +212,8 @@ public class AppImgFilesController extends BaseController {
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
||||||
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
||||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
|
||||||
|
|
||||||
pd.put("IMGFILES_ID", this.get32UUID());
|
pd.put("IMGFILES_ID", this.get32UUID());
|
||||||
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
|
@ -208,34 +227,38 @@ public class AppImgFilesController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
* @param out
|
* @param out
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/delete")
|
@RequestMapping(value = "/delete")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object delete() throws Exception{
|
public Object delete() throws Exception {
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd = imgfilesService.findById(pd); //根据ID读取
|
pd = imgfilesService.findById(pd); //根据ID读取
|
||||||
File file = new File(PathUtil.getProjectpath()+pd.getString("FILEPATH"));
|
File file = new File(PathUtil.getProjectpath() + pd.getString("FILEPATH"));
|
||||||
file.delete();
|
file.delete();
|
||||||
imgfilesService.delete(pd);
|
imgfilesService.delete(pd);
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**修改
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/edit")
|
@RequestMapping(value = "/edit")
|
||||||
@RequiresPermissions("imgfiles:edit")
|
@RequiresPermissions("imgfiles:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object edit() throws Exception{
|
public Object edit() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -244,20 +267,22 @@ public class AppImgFilesController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
* @param page
|
* @param page
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/list")
|
@RequestMapping(value = "/list")
|
||||||
@RequiresPermissions("imgfiles:list")
|
@RequiresPermissions("imgfiles:list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object list(Page page) throws Exception{
|
public Object list(Page page) throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = imgfilesService.list(page); //列出ImgFiles列表
|
List<PageData> varList = imgfilesService.list(page); //列出ImgFiles列表
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
@ -266,15 +291,17 @@ public class AppImgFilesController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**去修改页面获取数据
|
/**
|
||||||
|
* 去修改页面获取数据
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/goEdit")
|
@RequestMapping(value = "/goEdit")
|
||||||
@RequiresPermissions("imgfiles:edit")
|
@RequiresPermissions("imgfiles:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goEdit() throws Exception{
|
public Object goEdit() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
@ -284,41 +311,45 @@ public class AppImgFilesController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**批量删除
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/deleteAll")
|
@RequestMapping(value = "/deleteAll")
|
||||||
@RequiresPermissions("imgfiles:del")
|
@RequiresPermissions("imgfiles:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object deleteAll() throws Exception{
|
public Object deleteAll() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
String DATA_IDS = pd.getString("DATA_IDS");
|
String DATA_IDS = pd.getString("DATA_IDS");
|
||||||
if(Tools.notEmpty(DATA_IDS)){
|
if (Tools.notEmpty(DATA_IDS)) {
|
||||||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||||
imgfilesService.deleteAll(ArrayDATA_IDS);
|
imgfilesService.deleteAll(ArrayDATA_IDS);
|
||||||
errInfo = "success";
|
errInfo = "success";
|
||||||
}else{
|
} else {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
}
|
}
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**导出到excel
|
/**
|
||||||
|
* 导出到excel
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/excel")
|
@RequestMapping(value = "/excel")
|
||||||
@RequiresPermissions("toExcel")
|
@RequiresPermissions("toExcel")
|
||||||
public ModelAndView exportExcel() throws Exception{
|
public ModelAndView exportExcel() throws Exception {
|
||||||
ModelAndView mv = new ModelAndView();
|
ModelAndView mv = new ModelAndView();
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||||
List<String> titles = new ArrayList<String>();
|
List<String> titles = new ArrayList<String>();
|
||||||
titles.add("路径"); //1
|
titles.add("路径"); //1
|
||||||
titles.add("类型"); //2
|
titles.add("类型"); //2
|
||||||
|
@ -326,7 +357,7 @@ public class AppImgFilesController extends BaseController {
|
||||||
dataMap.put("titles", titles);
|
dataMap.put("titles", titles);
|
||||||
List<PageData> varOList = imgfilesService.listAll(pd);
|
List<PageData> varOList = imgfilesService.listAll(pd);
|
||||||
List<PageData> varList = new ArrayList<PageData>();
|
List<PageData> varList = new ArrayList<PageData>();
|
||||||
for(int i=0;i<varOList.size();i++){
|
for (int i = 0; i < varOList.size(); i++) {
|
||||||
PageData vpd = new PageData();
|
PageData vpd = new PageData();
|
||||||
vpd.put("var1", varOList.get(i).getString("FILEPATH")); //1
|
vpd.put("var1", varOList.get(i).getString("FILEPATH")); //1
|
||||||
vpd.put("var2", varOList.get(i).get("TYPE").toString()); //2
|
vpd.put("var2", varOList.get(i).get("TYPE").toString()); //2
|
||||||
|
@ -335,19 +366,21 @@ public class AppImgFilesController extends BaseController {
|
||||||
}
|
}
|
||||||
dataMap.put("varList", varList);
|
dataMap.put("varList", varList);
|
||||||
ObjectExcelView erv = new ObjectExcelView();
|
ObjectExcelView erv = new ObjectExcelView();
|
||||||
mv = new ModelAndView(erv,dataMap);
|
mv = new ModelAndView(erv, dataMap);
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**查询图片集合
|
/**
|
||||||
|
* 查询图片集合
|
||||||
|
*
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/listImgs")
|
@RequestMapping(value = "/listImgs")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object listImgs() throws Exception{
|
public Object listImgs() throws Exception {
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
|
|
|
@ -118,7 +118,9 @@ public class MfolderController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||||
mfolderService.save(pd); //存入数据库表
|
mfolderService.save(pd); //存入数据库表
|
||||||
//存自己表里的附件 使用文件全路径加文件名的方式 示例
|
//存自己表里的附件 使用文件全路径加文件名的方式 示例
|
||||||
// /uploadFiles/yhtp/8415df13cc4c46f0ac32f579462dbb8f/20231215/d3bc85d1bbe84b75b1e6e8b6182dc547.jpg@@d3bc85d1bbe84b75b1e6e8b6182dc547.jpg
|
// /uploadFiles/yhtp/8415df13cc4c46f0ac32f579462dbb8f/20231215/d3bc85d1bbe84b75b1e6e8b6182dc547.jpg
|
||||||
|
// @@
|
||||||
|
// d3bc85d1bbe84b75b1e6e8b6182dc547.jpg
|
||||||
pictureList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName+
|
pictureList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName+
|
||||||
"@@"
|
"@@"
|
||||||
+fileName);
|
+fileName);
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
package com.zcloud.controller.firemanager;
|
||||||
|
|
||||||
|
import com.zcloud.controller.base.BaseController;
|
||||||
|
import com.zcloud.entity.Page;
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.service.fireresources.FireResourcesService;
|
||||||
|
import com.zcloud.util.DateUtil;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/fireResources")
|
||||||
|
public class FireResourcesController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private FireResourcesService fireResourcesService;
|
||||||
|
@RequestMapping(value = "/list")
|
||||||
|
@ResponseBody
|
||||||
|
public Object page(Page page) {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = this.getPageData();
|
||||||
|
page.setPd(pd);
|
||||||
|
//获取当前人的公司id
|
||||||
|
List<PageData> varList = fireResourcesService.datalistPage(page);
|
||||||
|
map.put("varList", varList);
|
||||||
|
map.put("page", page);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/getById")
|
||||||
|
@ResponseBody
|
||||||
|
public Object getById() {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pddata = this.getPageData();
|
||||||
|
//获取当前人的公司id
|
||||||
|
PageData pd = fireResourcesService.getDataById(pddata);
|
||||||
|
map.put("pd", pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/add")
|
||||||
|
@ResponseBody
|
||||||
|
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = this.getPageData();
|
||||||
|
String FIRERESOURCES_ID = this.get32UUID();
|
||||||
|
pd.put("FIRERESOURCES_ID", FIRERESOURCES_ID);
|
||||||
|
pd.put("CREATIME", DateUtil.date2Str(new Date()));
|
||||||
|
pd.put("OPERATIME", DateUtil.date2Str(new Date()));
|
||||||
|
pd.put("ISDELETE", "0");
|
||||||
|
fireResourcesService.save(pd,files);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
pd.put("OPERATIME", DateUtil.date2Str(new Date()));
|
||||||
|
pd.put("ISDELETE", "0");
|
||||||
|
fireResourcesService.edit(pd,files);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/delete")
|
||||||
|
@ResponseBody
|
||||||
|
public Object delete(Page page) {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
fireResourcesService.delete(pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,12 +1,16 @@
|
||||||
package com.zcloud.controller.firemanager.app;
|
package com.zcloud.controller.firemanager.app;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
|
import com.zcloud.dto.TenCorpDto;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.mapper.datasource.firemanager.FireDeviceMapper;
|
import com.zcloud.mapper.datasource.firemanager.FireDeviceMapper;
|
||||||
import com.zcloud.service.bus.ImgFilesService;
|
import com.zcloud.service.bus.ImgFilesService;
|
||||||
import com.zcloud.service.firemanager.*;
|
import com.zcloud.service.firemanager.*;
|
||||||
|
import com.zcloud.service.mq.DockSendMessageService;
|
||||||
|
import com.zcloud.service.mq.SendMessageService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.InitPageDataUtil;
|
import com.zcloud.util.InitPageDataUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
|
@ -35,7 +39,8 @@ public class AppFireRecordController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ImgFilesService imgFilesService;
|
private ImgFilesService imgFilesService;
|
||||||
|
@Resource
|
||||||
|
private DockSendMessageService dockSendMessageService;
|
||||||
@Resource
|
@Resource
|
||||||
private FireCheckStandardService fireCheckStandardService;
|
private FireCheckStandardService fireCheckStandardService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -47,7 +52,6 @@ public class AppFireRecordController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FirePointService firePointService;
|
private FirePointService firePointService;
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private InitPageDataUtil initPageDataUtil;
|
private InitPageDataUtil initPageDataUtil;
|
||||||
|
|
||||||
|
@ -67,7 +71,7 @@ public class AppFireRecordController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pageData = this.getPageData();
|
PageData pageData = this.getPageData();
|
||||||
pageData.put("TYPE",115);
|
pageData.put("TYPE", 115);
|
||||||
List<PageData> dataList = fireQualifiedPhotosService.getPointQualifiedPhotos(pageData);
|
List<PageData> dataList = fireQualifiedPhotosService.getPointQualifiedPhotos(pageData);
|
||||||
map.put("varList", dataList);
|
map.put("varList", dataList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -134,6 +138,7 @@ public class AppFireRecordController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 清单列表总数
|
* @Description: 清单列表总数
|
||||||
* @Author: dearLin
|
* @Author: dearLin
|
||||||
|
@ -173,6 +178,7 @@ public class AppFireRecordController extends BaseController {
|
||||||
map.put("varList", res);
|
map.put("varList", res);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 所有清单的检查记录最外层
|
* @Description: 所有清单的检查记录最外层
|
||||||
* @Author: dearLin
|
* @Author: dearLin
|
||||||
|
@ -194,6 +200,7 @@ public class AppFireRecordController extends BaseController {
|
||||||
map.put("varList", res);
|
map.put("varList", res);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 清单下的检查记录
|
* @Description: 清单下的检查记录
|
||||||
* @Author: dearLin
|
* @Author: dearLin
|
||||||
|
@ -274,7 +281,7 @@ public class AppFireRecordController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
PageData pageData = this.getPageData();
|
PageData pageData = this.getPageData();
|
||||||
List<PageData>varList = fireRecordService.getDeviceRecordByPoint(pageData);
|
List<PageData> varList = fireRecordService.getDeviceRecordByPoint(pageData);
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -306,41 +313,41 @@ public class AppFireRecordController extends BaseController {
|
||||||
* @Return: java.lang.Object
|
* @Return: java.lang.Object
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/editDeviceCheck")
|
@RequestMapping("/editDeviceCheck")
|
||||||
|
@DockAnnotation
|
||||||
public Object editDeviceCheck() throws Exception {
|
public Object editDeviceCheck() throws Exception {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
List<PageData> list = JSONObject.parseArray(pd.getString("CHECK_DATA"), PageData.class);
|
List<PageData> list = JSONObject.parseArray(pd.getString("CHECK_DATA"), PageData.class);
|
||||||
|
ArrayList<PageData> dataArrayList = new ArrayList<>();
|
||||||
// 点位下设备检查记录
|
// 点位下设备检查记录
|
||||||
list.forEach(itemCheck -> {
|
list.forEach(itemCheck -> {
|
||||||
PageData itemCheckData = new PageData();
|
PageData itemCheckData = new PageData();
|
||||||
itemCheckData.putAll(itemCheck);
|
itemCheckData.putAll(itemCheck);
|
||||||
itemCheckData.put("FOREIGN_KEY", itemCheck.getString("EQUIPMENT_RECORD_ID"));
|
itemCheckData.put("FOREIGN_KEY", itemCheck.getString("EQUIPMENT_RECORD_ID"));
|
||||||
itemCheckData.put("TYPE", "14");
|
itemCheckData.put("TYPE", "14");
|
||||||
List<PageData> data = null;
|
List<PageData> data = imgFilesService.listAll(itemCheckData);
|
||||||
try {
|
|
||||||
data = imgFilesService.listAll(itemCheckData);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
// 不合格
|
// 不合格
|
||||||
if (!"0".equals(itemCheckData.getString("ISNORMAL"))) {
|
if (!"0".equals(itemCheckData.getString("ISNORMAL"))) {
|
||||||
// 删除合格得照片
|
// 删除合格得照片
|
||||||
data.forEach(item -> {
|
data.forEach(item -> {
|
||||||
try {
|
|
||||||
imgFilesService.delete(item);
|
imgFilesService.delete(item);
|
||||||
|
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||||
|
tenCorpDto.setData(item);
|
||||||
|
try {
|
||||||
|
dockSendMessageService.sendMessagePictureDelete(tenCorpDto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
fireRecordService.editDeviceCheckByApp(itemCheckData);
|
fireRecordService.editDeviceCheckByApp(itemCheckData);
|
||||||
|
dataArrayList.add(itemCheckData);
|
||||||
});
|
});
|
||||||
// todo 校验一下有没有点位图片
|
|
||||||
|
|
||||||
// fireRecordService.modifyPointRecord(pd);
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
pd.put("dataArrayList",dataArrayList);
|
||||||
|
map.put("dockData", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,12 +359,14 @@ public class AppFireRecordController extends BaseController {
|
||||||
* @Return: java.lang.Object
|
* @Return: java.lang.Object
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/editDeviceCheckFine")
|
@RequestMapping("/editDeviceCheckFine")
|
||||||
|
@DockAnnotation
|
||||||
public Object editDeviceCheckFine() throws Exception {
|
public Object editDeviceCheckFine() throws Exception {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
fireRecordService.modifyPointRecord(pd);
|
fireRecordService.modifyPointRecord(pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("dockData", pd);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -542,7 +551,7 @@ public class AppFireRecordController extends BaseController {
|
||||||
if (deviceListByPointId.size() > 0) {
|
if (deviceListByPointId.size() > 0) {
|
||||||
deviceListByPointId.forEach(item -> {
|
deviceListByPointId.forEach(item -> {
|
||||||
String[] fireCheckStandardItems = item.getString("FIRE_CHECK_STANDARD_ITEM").split("@@");
|
String[] fireCheckStandardItems = item.getString("FIRE_CHECK_STANDARD_ITEM").split("@@");
|
||||||
item.put("FIRE_CHECK_STANDARD_ITEM",fireCheckStandardItems);
|
item.put("FIRE_CHECK_STANDARD_ITEM", fireCheckStandardItems);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public interface ImgFilesService{
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void delete(PageData pd)throws Exception;
|
public void delete(PageData pd);
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param pd
|
* @param pd
|
||||||
|
@ -47,7 +47,7 @@ public interface ImgFilesService{
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public List<PageData> listAll(PageData pd)throws Exception;
|
public List<PageData> listAll(PageData pd);
|
||||||
|
|
||||||
/**通过id获取数据
|
/**通过id获取数据
|
||||||
* @param pd
|
* @param pd
|
||||||
|
|
|
@ -5,6 +5,8 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zcloud.dto.TenCorpDto;
|
||||||
|
import com.zcloud.service.mq.DockSendMessageService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -28,7 +30,8 @@ public class ImgFilesServiceImpl implements ImgFilesService{
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ImgFilesMapper imgfilesMapper;
|
private ImgFilesMapper imgfilesMapper;
|
||||||
|
@Autowired
|
||||||
|
private DockSendMessageService dockSendMessageService;
|
||||||
/**新增
|
/**新增
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -41,8 +44,10 @@ public class ImgFilesServiceImpl implements ImgFilesService{
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void delete(PageData pd)throws Exception{
|
@Override
|
||||||
|
public void delete(PageData pd){
|
||||||
imgfilesMapper.delete(pd);
|
imgfilesMapper.delete(pd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
|
|
|
@ -6,6 +6,7 @@ public interface DockSendMessageService {
|
||||||
|
|
||||||
void sendMessage(TenCorpDto tenCorpDto) throws Exception;
|
void sendMessage(TenCorpDto tenCorpDto) throws Exception;
|
||||||
void sendMessagePicture(TenCorpDto tenCorpDto) throws Exception;
|
void sendMessagePicture(TenCorpDto tenCorpDto) throws Exception;
|
||||||
|
void sendMessagePictureDelete(TenCorpDto tenCorpDto) throws Exception;
|
||||||
|
|
||||||
void SendDelayQueue(TenCorpDto tenCorpDto);
|
void SendDelayQueue(TenCorpDto tenCorpDto);
|
||||||
void SendDelayQueue(String message);
|
void SendDelayQueue(String message);
|
||||||
|
|
|
@ -84,6 +84,29 @@ public class DockSendMessageServiceImpl implements DockSendMessageService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendMessagePictureDelete(TenCorpDto tenCorpDto) throws Exception {
|
||||||
|
try {
|
||||||
|
PageData log = tenCorpDto.getPd();
|
||||||
|
log.put("MESSAGE_LOG_ID", Warden.get32UUID());
|
||||||
|
log.put("CREATE_TIME", DateUtil.getTime());
|
||||||
|
mqMessageLogMapper.save(log);
|
||||||
|
System.out.println("生产者:" + tenCorpDto.toString());
|
||||||
|
SendResult sendResult = rocketMQTemplate.syncSend(this.dockingPicture, tenCorpDto.toString());
|
||||||
|
if (!sendResult.getSendStatus().equals(SendStatus.SEND_OK)) {
|
||||||
|
throw new RuntimeException("产品入栈失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
PageData log = tenCorpDto.getPd();
|
||||||
|
log.put("MESSAGE_ERROR_LOG_ID", Warden.get32UUID());
|
||||||
|
log.put("ERROR_MESSAGE", e.getMessage());
|
||||||
|
log.put("TYPE", "0");
|
||||||
|
log.put("TIME", DateUtil.getTime());
|
||||||
|
mqErrorMessageLogMapper.save(log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void SendDelayQueue(TenCorpDto tenCorpDto) {
|
public void SendDelayQueue(TenCorpDto tenCorpDto) {
|
||||||
PageData log = tenCorpDto.getPd();
|
PageData log = tenCorpDto.getPd();
|
||||||
|
|
Loading…
Reference in New Issue