14132 这几种隐患来源的显示不正确 需要统一

pull/5/head
dearlin 2024-02-28 14:26:41 +08:00
parent 2c3cc96696
commit c70b1d6bf1
2 changed files with 1700 additions and 1696 deletions

View File

@ -292,6 +292,7 @@ public class AppCustomHiddenController extends BaseController {
pd.put("RISK_POSITION", item.get("POSITIONNAME"));
pd.put("LEVEL", item.get("DNAME5"));
}
pd.put("SOURCE", "3");
customHiddenService.save(pd);
// 清除同检查记录合格图片
if(pd.get("CLEARIMG") != null && Tools.notEmpty(pd.get("CLEARIMG").toString()) && "1".equals(pd.get("CLEARIMG").toString())) {
@ -453,6 +454,7 @@ public class AppCustomHiddenController extends BaseController {
}
}
}
pd.put("SOURCE", "3");
customHiddenService.save(pd);
// 发送短信
if(Tools.notEmpty(pd.getString("CONFIRM_USER")) && !pd.getString("STATE").equals("0")){

View File

@ -73,6 +73,7 @@ public class CustomHiddenController extends BaseController {
private Smb smb;
@Autowired
private SafetyEnvironmentalService safetyenvironmentalService;
/**
*
*
@ -82,7 +83,7 @@ public class CustomHiddenController extends BaseController {
@RequestMapping(value = "/add")
// @RequiresPermissions("hidden:add")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单排查",instructionsType = "新增")
@LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单排查", instructionsType = "新增")
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -106,12 +107,11 @@ public class CustomHiddenController extends BaseController {
}
}
if (pd.get("SOURCE").equals("2")) {
pd.put("STATE", "0");
}
pd.put("SOURCE", "3");
customHiddenService.save(pd);
// 立即整改保存检查数据
if("4".equals(pd.get("STATE").toString())) {
if ("4".equals(pd.get("STATE").toString())) {
PageData hc = new PageData();
hc.put("HIDDENCHECK_ID", this.get32UUID());
hc.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
@ -122,7 +122,7 @@ public class CustomHiddenController extends BaseController {
customHiddenCheckService.save(hc);
}
if(pd.get("STATE") != null && Tools.notEmpty(pd.get("STATE").toString()) && !"0".equals(pd.get("STATE").toString())) {
if (pd.get("STATE") != null && Tools.notEmpty(pd.get("STATE").toString()) && !"0".equals(pd.get("STATE").toString())) {
// 发短信
PageData mes = new PageData();
mes.put("RECEIVER_ID", pd.get("RECTIFICATIONOR"));// 收信人userid
@ -181,7 +181,7 @@ public class CustomHiddenController extends BaseController {
*/
@RequestMapping(value = "/listAdd")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "新增其他隐患")
@LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "新增其他隐患")
public Object listAdd() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -203,6 +203,7 @@ public class CustomHiddenController extends BaseController {
}
}
pd.put("ISCONFIRM", "0");
pd.put("SOURCE", "3");
customHiddenService.save(pd);
map.put("result", errInfo);
map.put("pd", pd);
@ -230,7 +231,7 @@ public class CustomHiddenController extends BaseController {
*/
@RequestMapping(value = "/delete")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查情况",instructionsType = "删除")
@LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单检查情况", instructionsType = "删除")
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
@ -311,7 +312,6 @@ public class CustomHiddenController extends BaseController {
}
@RequestMapping(value = "/editHIDDENLEVEL")
@ResponseBody
public Object editHIDDENLEVEL() throws Exception {
@ -324,9 +324,10 @@ public class CustomHiddenController extends BaseController {
map.put("result", errInfo);
return map;
}
@RequestMapping(value = "/editISCONFIRM")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "重大隐患",instructionsType = "确认为重大隐患")
@LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "重大隐患", instructionsType = "确认为重大隐患")
public Object editISCONFIRM() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -348,7 +349,7 @@ public class CustomHiddenController extends BaseController {
@RequestMapping(value = "/rectify")
@ResponseBody
@Transactional
@LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "隐患整改",instructionsType = "整改")
@LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "隐患整改", instructionsType = "整改")
public Object rectify(@RequestParam(value = "rectify_files", required = false) MultipartFile[] rectify_files,
@RequestParam(value = "scheme_files", required = false) MultipartFile[] scheme_files,
@RequestParam(value = "plan_files", required = false) MultipartFile[] plan_files) throws Exception {
@ -388,12 +389,12 @@ public class CustomHiddenController extends BaseController {
String fileName = ""; //执0行上传
if (null != file && !file.isEmpty()) {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
byte[] bytes = file.getBytes();
smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile);
smb.sshSftp(file, fileName, Const.FILEPATHYHTP + ffile);
}
pd.put("IMGFILES_ID", this.get32UUID());
pd.put("FILEPATH", Const.FILEPATHYHTP + ffile+"/"+fileName);
pd.put("FILEPATH", Const.FILEPATHYHTP + ffile + "/" + fileName);
pd.put("TYPE", 4);
pd.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
imgFilesService.save(pd);
@ -409,12 +410,12 @@ public class CustomHiddenController extends BaseController {
String fileName = ""; //执0行上传
if (null != file && !file.isEmpty()) {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
byte[] bytes = file.getBytes();
smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile);
smb.sshSftp(file, fileName, Const.FILEPATHYHTP + ffile);
}
pd.put("IMGFILES_ID", this.get32UUID());
pd.put("FILEPATH", Const.FILEPATHYHTP + ffile+"/"+fileName);
pd.put("FILEPATH", Const.FILEPATHYHTP + ffile + "/" + fileName);
pd.put("TYPE", 8);
pd.put("FOREIGN_KEY", pd.get("HIDDENSCHEME_ID"));
imgFilesService.save(pd);
@ -430,12 +431,12 @@ public class CustomHiddenController extends BaseController {
String fileName = ""; //执0行上传
if (null != file && !file.isEmpty()) {
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
byte[] bytes = file.getBytes();
smb.sshSftp(file, fileName,Const.FILEPATHYHTP + ffile);
smb.sshSftp(file, fileName, Const.FILEPATHYHTP + ffile);
}
pd.put("IMGFILES_ID", this.get32UUID());
pd.put("FILEPATH", Const.FILEPATHYHTP + ffile+"/"+fileName);
pd.put("FILEPATH", Const.FILEPATHYHTP + ffile + "/" + fileName);
pd.put("TYPE", 22);
pd.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
imgFilesService.save(pd);
@ -564,7 +565,7 @@ public class CustomHiddenController extends BaseController {
*/
@RequestMapping(value = "/check")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "隐患验收",instructionsType = "验收")
@LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "隐患验收", instructionsType = "验收")
public Object check() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -599,14 +600,14 @@ public class CustomHiddenController extends BaseController {
hidden.put("OPERATTIME", DateUtil.date2Str(new Date()));
customHiddenService.changeState(hidden);
hidden.put("FOREIGN_KEY",pd.get("HIDDEN_ID"));
hidden.put("TYPE",4);
hidden.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
hidden.put("TYPE", 4);
List<PageData> zgimgs = imgFilesService.listAll(hidden);
hidden.put("TYPE",5);
hidden.put("TYPE", 5);
List<PageData> ysimgs = imgFilesService.listAll(hidden);
hidden.put("TYPE",8);
hidden.put("TYPE", 8);
List<PageData> fsimgs = imgFilesService.listAll(hidden);
hidden.put("TYPE",22);
hidden.put("TYPE", 22);
List<PageData> jsimgs = imgFilesService.listAll(hidden);
List<PageData> imgs = new ArrayList<PageData>();
imgs.addAll(zgimgs);
@ -632,7 +633,7 @@ public class CustomHiddenController extends BaseController {
@RequestMapping(value = "/list")
// @RequiresPermissions("hidden:list")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患治理",instructionsOperate = "隐患整改",instructionsType = "列表")
@LogAnno(menuType = "双重预防", menuServer = "隐患治理", instructionsOperate = "隐患整改", instructionsType = "列表")
public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -692,26 +693,26 @@ public class CustomHiddenController extends BaseController {
pd.put("IS_YEAR", IS_YEAR.trim());
if (Tools.notEmpty(DISPOSESTATE)) {
pd.put("DISPOSESTATE", DISPOSESTATE.trim());
if("-1".equals(DISPOSESTATE.trim())) {
if ("-1".equals(DISPOSESTATE.trim())) {
pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
String DEPTIDS = pd.getString("DEPTIDS");
if(Tools.notEmpty(DEPTIDS)) {
if (Tools.notEmpty(DEPTIDS)) {
String DEPT_IDS[] = DEPTIDS.split(",");
pd.put("DEPT_IDS", DEPT_IDS);
}
pd.put("USER_ID",Jurisdiction.getUSER_ID());
pd.put("USER_ID", Jurisdiction.getUSER_ID());
PageData cpd = new PageData();
cpd = usersService.findById(pd);
pd.put("ISLEADER", cpd.getString("ISLEADER"));
if(cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")){
if (cpd.getString("ISLEADER") != null && cpd.getString("ISLEADER").equals("1")) {
String DEPARTMENT_ID = pd.getString("DEPARTMENT_ID");
String ids = departmentService.getDEPARTMENT_IDS(DEPARTMENT_ID);
ids=pd.getString("DEPARTMENT_ID")+","+ids; //把自己部门插入进去
if(ids!=null && Tools.notEmpty(ids)&& ids.lastIndexOf(",")>-1) {
ids = ids.substring(0,ids.lastIndexOf(","));
ids = pd.getString("DEPARTMENT_ID") + "," + ids; //把自己部门插入进去
if (ids != null && Tools.notEmpty(ids) && ids.lastIndexOf(",") > -1) {
ids = ids.substring(0, ids.lastIndexOf(","));
pd.put("DEPARTMENT_IDS", ids.split(","));
}else {
} else {
pd.put("DEPARTMENT_IDS", DEPARTMENT_ID);
}
}
@ -772,7 +773,7 @@ public class CustomHiddenController extends BaseController {
*/
@RequestMapping(value = "/getOtherHidden")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "获取其他隐患信息列表")
@LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单管理", instructionsType = "获取其他隐患信息列表")
public Object getOtherHidden() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -881,7 +882,7 @@ public class CustomHiddenController extends BaseController {
*/
@RequestMapping(value = "/getCheckHidden")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查记录",instructionsType = "获取检查记录风险点")
@LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单检查记录", instructionsType = "获取检查记录风险点")
public Object getCheckHidden() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -902,7 +903,7 @@ public class CustomHiddenController extends BaseController {
@RequestMapping(value = "/goEdit")
// @RequiresPermissions("hidden:edit")
@ResponseBody
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单检查记录",instructionsType = "查看隐患信息")
@LogAnno(menuType = "双重预防", menuServer = "隐患排查", instructionsOperate = "清单检查记录", instructionsType = "查看隐患信息")
public Object goEdit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -929,10 +930,10 @@ public class CustomHiddenController extends BaseController {
}
List<PageData> pImgs = new ArrayList<PageData>();
if("1".equals(pd.get("HAVEPLAN"))) {
if ("1".equals(pd.get("HAVEPLAN"))) {
PageData pd3 = new PageData();
pd3.put("FOREIGN_KEY", hs.getString("HIDDEN_ID"));
pd3.put("TYPE",22);
pd3.put("TYPE", 22);
pImgs = imgFilesService.listAll(pd3);//方案图片
}
@ -1344,7 +1345,7 @@ public class CustomHiddenController extends BaseController {
pd.put("SELF_USER_ID", Jurisdiction.getUSER_ID());
}
String DEPTIDS = pd.getString("DEPTIDS");
if(Tools.notEmpty(DEPTIDS)) {
if (Tools.notEmpty(DEPTIDS)) {
String DEPT_IDS[] = DEPTIDS.split(",");
pd.put("DEPT_IDS", DEPT_IDS);
}
@ -1397,11 +1398,11 @@ public class CustomHiddenController extends BaseController {
// }
//
List<String> imgIdList = new ArrayList<>();
for(String imgid:imgIds) {
for (String imgid : imgIds) {
imgIdList.add(imgid);
}
PageData imgpd2 = new PageData();
String[] imgId =imgIdList.toArray(new String[imgIdList.size()]);
String[] imgId = imgIdList.toArray(new String[imgIdList.size()]);
imgpd2.put("ArrayDATA_IDS", imgId);
List<PageData> imgList = imgFilesService.listAllByIds(imgpd2);
@ -1647,8 +1648,8 @@ public class CustomHiddenController extends BaseController {
}
@RequestMapping(value = "/excel")
public void exportExcelPro(HttpServletResponse response) throws Exception{
customHiddenService.createExcel(response,this.getPageData());
public void exportExcelPro(HttpServletResponse response) throws Exception {
customHiddenService.createExcel(response, this.getPageData());
}
/**
@ -1659,7 +1660,7 @@ public class CustomHiddenController extends BaseController {
*/
@RequestMapping(value = "/getCountByUserId")
@ResponseBody
@LogAnno(menuType= "首页",menuServer= "首页",instructionsOperate = "首页",instructionsType = "首页获取数量")
@LogAnno(menuType = "首页", menuServer = "首页", instructionsOperate = "首页", instructionsType = "首页获取数量")
public Object getCountByUserId(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -1783,6 +1784,7 @@ public class CustomHiddenController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
* app
*
@ -1791,7 +1793,7 @@ public class CustomHiddenController extends BaseController {
*/
@RequestMapping(value = "/getCountByHiddenType")
@ResponseBody
@LogAnno(menuType= "首页",menuServer= "首页",instructionsOperate = "首页",instructionsType = "首页获取数量")
@LogAnno(menuType = "首页", menuServer = "首页", instructionsOperate = "首页", instructionsType = "首页获取数量")
public Object getCountByHiddenType(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -1802,31 +1804,31 @@ public class CustomHiddenController extends BaseController {
pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE());
pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
String DEPTIDS = pd.getString("DEPTIDS");
if(Tools.notEmpty(DEPTIDS)) {
if (Tools.notEmpty(DEPTIDS)) {
String DEPT_IDS[] = DEPTIDS.split(",");
pd.put("DEPT_IDS", DEPT_IDS);
}
List<PageData> hiddList =customHiddenService.getCountByHiddenType(pd);
List<PageData> hiddList = customHiddenService.getCountByHiddenType(pd);
Map<String,Object> hiddMap = new HashedMap();
for (PageData pageData:hiddList){
if(Tools.isEmpty(pageData.get("HIDDENTYPE"))){
hiddMap.put("hiddenType0006",pageData.get("count").toString());
}else{
hiddMap.put(pageData.get("HIDDENTYPE").toString(),pageData.get("count").toString());
Map<String, Object> hiddMap = new HashedMap();
for (PageData pageData : hiddList) {
if (Tools.isEmpty(pageData.get("HIDDENTYPE"))) {
hiddMap.put("hiddenType0006", pageData.get("count").toString());
} else {
hiddMap.put(pageData.get("HIDDENTYPE").toString(), pageData.get("count").toString());
}
}
List<Dictionaries> dicList = dictionariesService.listSubDictByParentId("3babc15144444bdc8d763d0af2bdfff6");
List valList = new ArrayList();
Map<String,Object> valMap = new HashedMap();
for (Dictionaries dictionaries:dicList){
Map<String, Object> valMap = new HashedMap();
for (Dictionaries dictionaries : dicList) {
valMap = new HashedMap();
if(hiddMap.containsKey(dictionaries.getBIANMA())){
valMap.put("value",hiddMap.get(dictionaries.getBIANMA()));
}else{
valMap.put("value","0");
if (hiddMap.containsKey(dictionaries.getBIANMA())) {
valMap.put("value", hiddMap.get(dictionaries.getBIANMA()));
} else {
valMap.put("value", "0");
}
valMap.put("name",dictionaries.getNAME());
valMap.put("name", dictionaries.getNAME());
valList.add(valMap);
}
map.put("hiddenTypeCount", valList);
@ -1856,25 +1858,25 @@ public class CustomHiddenController extends BaseController {
List<PageData> allHidden = customHiddenService.getHiddenNum(pd);
Map<String, PageData> allMap = new HashMap<>();
for(int i = 0; i < allHidden.size(); i++) {
for (int i = 0; i < allHidden.size(); i++) {
allMap.put(allHidden.get(i).getString("TIME"), allHidden.get(i));
}
pd.put("TYPE", 2);
List<PageData> wzgHidden = customHiddenService.getHiddenNum(pd);
Map<String, PageData> wzgMap = new HashMap<>();
for(int i = 0; i < wzgHidden.size(); i++) {
for (int i = 0; i < wzgHidden.size(); i++) {
wzgMap.put(wzgHidden.get(i).getString("TIME"), wzgHidden.get(i));
}
pd.put("TYPE", 3);
List<PageData> yzgHidden = customHiddenService.getHiddenNum(pd);
Map<String, PageData> yzgMap = new HashMap<>();
for(int i = 0; i < yzgHidden.size(); i++) {
for (int i = 0; i < yzgHidden.size(); i++) {
yzgMap.put(yzgHidden.get(i).getString("TIME"), yzgHidden.get(i));
}
pd.put("TYPE", 4);
List<PageData> yysHidden = customHiddenService.getHiddenNum(pd);
Map<String, PageData> yysMap = new HashMap<>();
for(int i = 0; i < yysHidden.size(); i++) {
for (int i = 0; i < yysHidden.size(); i++) {
yysMap.put(yysHidden.get(i).getString("TIME"), yysHidden.get(i));
}
List<String> names = new ArrayList<String>();
@ -1882,27 +1884,27 @@ public class CustomHiddenController extends BaseController {
List<String> wzg = new ArrayList<String>();
List<String> yzg = new ArrayList<String>();
List<String> yys = new ArrayList<String>();
for(int i = 0; i < dates.size(); i++) {
names.add(dates.get(i).substring(dates.get(i).length()-2, dates.get(i).length())+"月");
if(allMap.containsKey(dates.get(i))){
for (int i = 0; i < dates.size(); i++) {
names.add(dates.get(i).substring(dates.get(i).length() - 2, dates.get(i).length()) + "月");
if (allMap.containsKey(dates.get(i))) {
PageData hidden = allMap.get(dates.get(i));
all.add(hidden.get("NUMBER").toString());
} else {
all.add("0");
}
if(wzgMap.containsKey(dates.get(i))){
if (wzgMap.containsKey(dates.get(i))) {
PageData hidden = wzgMap.get(dates.get(i));
wzg.add(hidden.get("NUMBER").toString());
} else {
wzg.add("0");
}
if(yzgMap.containsKey(dates.get(i))){
if (yzgMap.containsKey(dates.get(i))) {
PageData hidden = yzgMap.get(dates.get(i));
yzg.add(hidden.get("NUMBER").toString());
} else {
yzg.add("0");
}
if(yysMap.containsKey(dates.get(i))){
if (yysMap.containsKey(dates.get(i))) {
PageData hidden = yysMap.get(dates.get(i));
yys.add(hidden.get("NUMBER").toString());
} else {