feat:八项作业撤回上一步

0927cmt
dearLin 2024-12-13 13:50:03 +08:00
parent 05a14e2efc
commit f7177dd91d
5 changed files with 1416 additions and 1432 deletions

View File

@ -34,15 +34,17 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
@Resource
private GFConfinedSpaceGasWHService GFconfinedspacegaswhService;
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequestMapping(value = "/add")
@ResponseBody
@DockAnnotation(isAdd = true)
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -50,13 +52,13 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
PageData pd2 = new PageData();
pd2 = GFconfinedspacegaswhService.findById(pd);
if(pd2 != null && pd2.size()>0){
if (pd2 != null && pd2.size() > 0) {
PageData confinedGasPageData = new PageData(); // pd对接数据
confinedGasPageData.putAll(pd);
dockData.put("dockData", JSON.toJSONString(confinedGasPageData));
GFconfinedspacegaswhService.edit(pd);
// map.put("dockData", JSON.toJSONString(dockData));
}else{
} else {
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("CONFINEDSPACEGASWH_ID", this.get32UUID()); //主键
GFconfinedspacegaswhService.save(pd);
@ -70,15 +72,17 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/delete")
@RequestMapping(value = "/delete")
@ResponseBody
@DockAnnotation
public Object delete() throws Exception{
Map<String,String> map = new HashMap<String,String>();
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -93,15 +97,17 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequestMapping(value = "/edit")
@ResponseBody
@DockAnnotation
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -117,19 +123,21 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
return map;
}
/**
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequestMapping(value = "/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
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);
List<PageData> varList = GFconfinedspacegaswhService.list(page); //列出ConfinedSpaceGasWH列表
map.put("varList", varList);
@ -138,14 +146,16 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequestMapping(value = "/goEdit")
@ResponseBody
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object goEdit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -155,15 +165,17 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/deleteAll")
@RequestMapping(value = "/deleteAll")
@ResponseBody
@DockAnnotation
public Object deleteAll() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object deleteAll() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -173,12 +185,12 @@ public class AppGFConfinedSpaceGasWHController extends BaseController {
confinedGasPageData.putAll(pd);
dockData.put("dockData", JSON.toJSONString(confinedGasPageData));
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
if (Tools.notEmpty(DATA_IDS)) {
String ArrayDATA_IDS[] = DATA_IDS.split(",");
GFconfinedspacegaswhService.deleteAll(ArrayDATA_IDS);
map.put("dockData", JSON.toJSONString(dockData));
errInfo = "success";
}else{
} else {
errInfo = "error";
}
map.put("dockData", JSON.toJSONString(dockData));

View File

@ -53,54 +53,58 @@ public class AppGFElectricityController extends BaseController {
@Resource
private SendMessageService mqClient;
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/getCode")
@RequestMapping(value = "/getCode")
@ResponseBody
// @LogAnno(menuType= "手机",menuServer= "高空作业",instructionsOperate = "高空作业",instructionsType = "获取编码")
public Object getCode() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object getCode() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
Calendar calendar = Calendar.getInstance();
DecimalFormat dft=new DecimalFormat("00");
DecimalFormat dft = new DecimalFormat("00");
int year = calendar.get(Calendar.YEAR);
String month = dft.format(calendar.get(Calendar.MONTH) + 1);
String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH));
pd.put("CREATDATE",year + "-" + month + "-" + day);
pd.put("CREATDATE", year + "-" + month + "-" + day);
pd = GFelectricityService.getCode(pd); //根据ID读取
String code = "YD"+year + month + day + dft.format((Integer.parseInt(pd.get("code").toString())+1));
String code = "YD" + year + month + day + dft.format((Integer.parseInt(pd.get("code").toString()) + 1));
map.put("code", code);
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@RequestMapping(value = "/add")
@ResponseBody
@Transactional
@DockAnnotation(isAdd = true)
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData pd2 = new PageData();
Calendar calendar = Calendar.getInstance();
DecimalFormat dft=new DecimalFormat("00");
DecimalFormat dft = new DecimalFormat("00");
int year = calendar.get(Calendar.YEAR);
String month = dft.format(calendar.get(Calendar.MONTH) + 1);
String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH));
pd2.put("CREATDATE",year + "-" + month + "-" + day);
pd2.put("CORPINFO_ID",pd.get("CORPINFO_ID"));
pd2.put("CREATDATE", year + "-" + month + "-" + day);
pd2.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
pd2 = GFelectricityService.getCode(pd2); //根据ID读取
String code = "YD"+year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString())+1));
String code = "YD" + year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString()) + 1));
pd = this.getPageData();
pd.put("CHECK_NO", code);
pd.put("ELECTRICITY_ID", this.get32UUID()); //主键
@ -115,12 +119,12 @@ public class AppGFElectricityController extends BaseController {
dockData.put("dockData", JSON.toJSONString(electricityPageData));
GFelectricityService.save(pd);
if(pd.get("APPLY_STATUS").equals("1")) {
if (pd.get("APPLY_STATUS").equals("1")) {
PageData log = new PageData();
log.put("ELECTRICITYLOG_ID", this.get32UUID());
log.put("ACTION", "提交申请");
log.put("ELECTRICITY_ID", pd.get("ELECTRICITY_ID"));
log.put("CREATOR",pd.get("ACTION_USER"));
log.put("CREATOR", pd.get("ACTION_USER"));
log.put("CREATTIME", DateUtil.date2Str(new Date()));
// map.put("dockDataLog", JSON.toJSONString(log));
PageData electricitydockDataLog = new PageData(); // pd对接数据
@ -158,7 +162,7 @@ public class AppGFElectricityController extends BaseController {
paramsList.add(params4);
sendMessageUtil.sendMessages(mes, paramsList);
}
if("1".equals(pd.get("ISANALYZE"))){
if ("1".equals(pd.get("ISANALYZE"))) {
TenCorpDto tenCorpDto = new TenCorpDto();
tenCorpDto.setMark(pd.getString("ELECTRICITY_ID"));
tenCorpDto.setMark_name("ELECTRICITY_ID");
@ -193,13 +197,14 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
/**
*
*/
@RequestMapping(value="/delete")
@RequestMapping(value = "/delete")
@ResponseBody
@DockAnnotation
public Object delete() throws Exception{
Map<String,String> map = new HashMap<String,String>();
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -214,16 +219,18 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@RequestMapping(value = "/edit")
@ResponseBody
@Transactional
@DockAnnotation
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -234,12 +241,12 @@ public class AppGFElectricityController extends BaseController {
electricityPageData.putAll(pd);
dockData.put("dockData", JSON.toJSONString(electricityPageData));
// map.put("dockData", JSON.toJSONString(pd));
if(pd.get("APPLY_STATUS").equals("1")) {
if (pd.get("APPLY_STATUS").equals("1")) {
PageData log = new PageData();
log.put("ELECTRICITYLOG_ID", this.get32UUID());
log.put("ACTION", "提交申请");
log.put("ELECTRICITY_ID", pd.get("ELECTRICITY_ID"));
log.put("CREATOR",pd.get("ACTION_USER"));
log.put("CREATOR", pd.get("ACTION_USER"));
log.put("CREATTIME", DateUtil.date2Str(new Date()));
// map.put("dockDataLog", JSON.toJSONString(log));
PageData electricitydockDataLog = new PageData(); // pd对接数据
@ -277,7 +284,7 @@ public class AppGFElectricityController extends BaseController {
paramsList.add(params4);
sendMessageUtil.sendMessages(mes, paramsList);
}
if("1".equals(pd.get("ISANALYZE"))){
if ("1".equals(pd.get("ISANALYZE"))) {
TenCorpDto tenCorpDto = new TenCorpDto();
tenCorpDto.setMark(pd.getString("ELECTRICITY_ID"));
tenCorpDto.setMark_name("ELECTRICITY_ID");
@ -292,18 +299,19 @@ public class AppGFElectricityController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/editGuardian")
@RequestMapping(value = "/editGuardian")
@ResponseBody
@Transactional
@DockAnnotation(hasAnnex = true)
public Object editGuardian(
@RequestParam(value="FFILE",required=false) MultipartFile[] files
) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object editGuardian(@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();
@ -321,7 +329,7 @@ public class AppGFElectricityController extends BaseController {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
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);
pictureList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName);
@ -341,18 +349,18 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/editConfess")
@RequestMapping(value = "/editConfess")
@ResponseBody
@Transactional
@DockAnnotation(hasAnnex = true)
public Object editConfess(
@RequestParam(value="FFILE",required=false) MultipartFile[] files
) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object editConfess(@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();
@ -370,7 +378,7 @@ public class AppGFElectricityController extends BaseController {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
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);
pictureList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName);
@ -390,11 +398,13 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/editAcceptconfess")
@RequestMapping(value = "/editAcceptconfess")
@ResponseBody
@Transactional
@DockAnnotation(hasAnnex = true)
@ -417,15 +427,13 @@ public class AppGFElectricityController extends BaseController {
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
ArrayList<String> pictureList = new ArrayList<String>();
Map<String,String> saveImgMap = new HashMap<String,String>();
Map<String, String> saveImgMap = new HashMap<String, String>();
int count = 1;
for (int i = 0; i < SIGNTIME.length; i++) {
signertime = SIGNTIME[i];
fileList.add(request.getFile("file"+i));
fileList.add(request.getFile("file" + i));
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
saveImg(fileList.toArray(fileArr),signertime,pd.getString("ELECTRICITY_ID"),
pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),
pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"),pictureList,saveImgMap,count);
saveImg(fileList.toArray(fileArr), signertime, pd.getString("ELECTRICITY_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_CONFESS_USER_ID"), pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"), pictureList, saveImgMap, count);
fileList.clear();
count += 1;
}
@ -435,18 +443,16 @@ public class AppGFElectricityController extends BaseController {
map.put("result", errInfo);
return map;
}
private void saveImg(MultipartFile[] files,String signertime, String ELECTRICITY_ID,
String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID,
String ACCEPT_CONFESS_DEPARTMENT_ID, ArrayList<String> pictureList,
Map<String,String> saveImgMap,int count) throws Exception{
private void saveImg(MultipartFile[] files, String signertime, String ELECTRICITY_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID, ArrayList<String> pictureList, Map<String, String> saveImgMap, int count) throws Exception {
if (files != null && files.length > 0) {
for (int i = 0; i < files.length; i++) {
PageData pd = new PageData();
pd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName, Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
pd.put("OPERATOR", pd.get("OPERATOR")); //修改人
@ -457,7 +463,7 @@ public class AppGFElectricityController extends BaseController {
pd.put("ELECTRICITY_ID", ELECTRICITY_ID);
pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID);
pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID);
pd.put("ACCEPT_USER_ID","");
pd.put("ACCEPT_USER_ID", "");
pd.put("ACCEPT_DEPARTMENT_ID", "");
saveImgMap.put("other" + count, JSON.toJSONString(pd));
count += 1;
@ -466,16 +472,19 @@ public class AppGFElectricityController extends BaseController {
}
}
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/editAcceptStatus")
@RequestMapping(value = "/editAcceptStatus")
@ResponseBody
@Transactional
@DockAnnotation(hasAnnex = true)
public Object editAcceptStatus(MultipartRequest request) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object editAcceptStatus(MultipartRequest request) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -492,14 +501,13 @@ public class AppGFElectricityController extends BaseController {
log.put("ELECTRICITYLOG_ID", this.get32UUID());
// log.put("ACTION", "审核打回");
log.put("ELECTRICITY_ID", pd.get("ELECTRICITY_ID"));
log.put("CREATOR",pd.get("ACTION_USER"));
log.put("CREATOR", pd.get("ACTION_USER"));
log.put("CREATTIME", DateUtil.date2Str(new Date()));
// map.put("dockData", JSON.toJSONString(pd));
String status = pd.get("STATUS").toString();
if ("2".equals(status) || "3".equals(status) || "4".equals(status)) {
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
pd.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
} else if ("-2".equals(status) || "-3".equals(status) || "-4".equals(status) || "-5".equals(status)) {
@ -515,15 +523,13 @@ public class AppGFElectricityController extends BaseController {
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
ArrayList<String> pictureList = new ArrayList<String>();
Map<String,String> saveAcceptImgMap = new HashMap<String,String>();
Map<String, String> saveAcceptImgMap = new HashMap<String, String>();
int count = 1;
for (int i = 0; i < SIGNTIME.length; i++) {
signertime = SIGNTIME[i];
fileList.add(request.getFile("file"+i));
fileList.add(request.getFile("file" + i));
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("ELECTRICITY_ID"),
pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),
pd.getString("ACCEPT_DEPARTMENT_ID"),pictureList,saveAcceptImgMap,count);
saveAcceptImg(fileList.toArray(fileArr), signertime, pd.getString("ELECTRICITY_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_USER_ID"), pd.getString("ACCEPT_DEPARTMENT_ID"), pictureList, saveAcceptImgMap, count);
fileList.clear();
count++;
}
@ -607,17 +613,15 @@ public class AppGFElectricityController extends BaseController {
return map;
}
private void saveAcceptImg(MultipartFile[] files,String signertime, String ELECTRICITY_ID,
String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID,
ArrayList<String> pictureList,Map<String,String> saveAcceptImgMap,int count) throws Exception{
private void saveAcceptImg(MultipartFile[] files, String signertime, String ELECTRICITY_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID, ArrayList<String> pictureList, Map<String, String> saveAcceptImgMap, int count) throws Exception {
if (files != null && files.length > 0) {
for (int i = 0; i < files.length; i++) {
PageData cpd = new PageData();
cpd = this.getPageData();
MultipartFile file = files[i];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName, Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
cpd.put("ACCEPT_USER_SIGNER_TIME", signertime);
cpd.put("ACCEPT_CONFESS_ID", this.get32UUID());
cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人
@ -639,18 +643,18 @@ public class AppGFElectricityController extends BaseController {
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/editStatus")
@RequestMapping(value = "/editStatus")
@ResponseBody
@Transactional
@DockAnnotation(hasAnnex = true)
public Object editStatus(
@RequestParam(value="FFILE",required=false) MultipartFile[] files
) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object editStatus(@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();
@ -667,14 +671,13 @@ public class AppGFElectricityController extends BaseController {
log.put("ELECTRICITYLOG_ID", this.get32UUID());
// log.put("ACTION", "审核打回");
log.put("ELECTRICITY_ID", pd.get("ELECTRICITY_ID"));
log.put("CREATOR",pd.get("ACTION_USER"));
log.put("CREATOR", pd.get("ACTION_USER"));
log.put("CREATTIME", DateUtil.date2Str(new Date()));
// map.put("dockData", JSON.toJSONString(pd));
String status = pd.get("STATUS").toString();
if ("2".equals(status) || "3".equals(status) || "4".equals(status)) {
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
pd.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
} else if ("-2".equals(status) || "-3".equals(status) || "-4".equals(status) || "-5".equals(status)) {
@ -689,7 +692,7 @@ public class AppGFElectricityController extends BaseController {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
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);
pictureList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName);
@ -723,8 +726,8 @@ public class AppGFElectricityController extends BaseController {
measures.put("STATUS", json.get("STATUS"));
measures.put("CONFIRM_ID", pd.get("OPERATOR"));
measures.put("CONFIRM_NAME", pd.get("ACTION_USER"));
measuresMap.put("other"+measuresCount, JSON.toJSONString(measures));
measuresCount+=1;
measuresMap.put("other" + measuresCount, JSON.toJSONString(measures));
measuresCount += 1;
GFelectricityToMeasuresService.save(measures);
}
PageData electricitydockDatameasures = new PageData(); // pd对接数据
@ -762,7 +765,7 @@ public class AppGFElectricityController extends BaseController {
params4.put("value", "审核");// 存入上面参数名称所传递的值
paramsList.add(params4);
sendMessageUtil.sendMessages(mes, paramsList);
if("1".equals(pd.get("ISANALYZE"))){
if ("1".equals(pd.get("ISANALYZE"))) {
TenCorpDto tenCorpDto = new TenCorpDto();
tenCorpDto.setMark(pd.getString("ELECTRICITY_ID"));
tenCorpDto.setMark_name("ELECTRICITY_ID");
@ -783,7 +786,7 @@ public class AppGFElectricityController extends BaseController {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
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);
pictureList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName);
@ -837,7 +840,7 @@ public class AppGFElectricityController extends BaseController {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
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);
pictureList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName);
@ -891,7 +894,7 @@ public class AppGFElectricityController extends BaseController {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
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);
pictureList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName);
@ -1080,19 +1083,22 @@ public class AppGFElectricityController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value="/jhlist")
@RequestMapping(value = "/jhlist")
@ResponseBody
public Object jhlist(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object jhlist(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
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);
List<PageData> varList = GFelectricityService.jhlist(page); //列出confinedspace列表
map.put("varList", varList);
@ -1100,19 +1106,22 @@ public class AppGFElectricityController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value="/aqlist")
@RequestMapping(value = "/aqlist")
@ResponseBody
public Object aqlist(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object aqlist(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
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);
List<PageData> varList = GFelectricityService.aqlist(page); //列出confinedspace列表
map.put("varList", varList);
@ -1120,19 +1129,22 @@ public class AppGFElectricityController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value="/jslist")
@RequestMapping(value = "/jslist")
@ResponseBody
public Object jslist(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object jslist(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
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);
List<PageData> varList = GFelectricityService.jslist(page); //列出confinedspace列表
map.put("varList", varList);
@ -1140,19 +1152,22 @@ public class AppGFElectricityController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value="/list")
@RequestMapping(value = "/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
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);
List<PageData> varList = GFelectricityService.list(page); //列出electricity列表
map.put("varList", varList);
@ -1161,15 +1176,17 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
* @paramout
/**
*
*
* @throws Exception
* @paramout
*/
@PostMapping(value="/cancel")
@PostMapping(value = "/cancel")
@ResponseBody
@DockAnnotation
public void cancel(@RequestBody PageData pd) throws Exception{
Map<String,String> map = new HashMap<String,String>();
public void cancel(@RequestBody PageData pd) throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
System.out.println(JSONObject.toJSONString(pd));
PageData cpd = new PageData();
@ -1179,7 +1196,7 @@ public class AppGFElectricityController extends BaseController {
electricityPageData.putAll(pd);
dockData.put("dockData", JSON.toJSONString(electricityPageData));
cpd = GFelectricityService.findById(pd);
if(cpd!=null && cpd.size()>0 && cpd.getString("ANALYZE_TIME") != null){
if (cpd != null && cpd.size() > 0 && cpd.getString("ANALYZE_TIME") != null) {
String WORK_START_DATE = pd.getString("WORK_START_DATE");
String ANALYZE_TIME = cpd.getString("ANALYZE_TIME");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
@ -1223,7 +1240,7 @@ public class AppGFElectricityController extends BaseController {
} catch (ParseException e) {
e.printStackTrace();
}
}else{
} else {
PageData electricityPageData1 = new PageData(); // pd对接数据
electricityPageData1.putAll(pd);
dockData.put("dockData", JSON.toJSONString(electricityPageData1));
@ -1232,8 +1249,8 @@ public class AppGFElectricityController extends BaseController {
PageData pd2 = new PageData();
pd2 = GFelectricityService.checkno(pd);
PageData pd3 = new PageData();
pd3.put("CHECK_NO",pd2.getString("CHECK_NO"));
pd3.put("CORPINFO_ID",pd.getString("CORPINFO_ID"));
pd3.put("CHECK_NO", pd2.getString("CHECK_NO"));
pd3.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
PageData electricitydockDatapd3 = new PageData(); // pd对接数据
electricitydockDatapd3.putAll(pd3);
dockData.put("dockDatapd3", JSON.toJSONString(electricitydockDatapd3));
@ -1267,38 +1284,42 @@ public class AppGFElectricityController extends BaseController {
}
map.put("dockData", JSON.toJSONString(dockData));
map.put("result", errInfo); //返回结果
return ;
return;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/goEdit")
@RequestMapping(value = "/goEdit")
@ResponseBody
public Object goEdit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object goEdit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = GFelectricityService.findById(pd); //根据ID读取
map.put("measuresList", GFelectricityService.listAllMeasures(pd));
map.put("gasList", GFelectricityGasService.listAll(pd));
map.put("imgList1",electricityacceptuserService.findById(pd));
map.put("imgList",electricityacceptuserService.findByIds(pd));
map.put("imgList1", electricityacceptuserService.findById(pd));
map.put("imgList", electricityacceptuserService.findByIds(pd));
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/gas/list")
@RequestMapping(value = "/gas/list")
@ResponseBody
public Object gasList() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object gasList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -1308,15 +1329,17 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/gas/delete")
@RequestMapping(value = "/gas/delete")
@ResponseBody
@DockAnnotation
public Object gasDel() throws Exception{
Map<String,String> map = new HashMap<String,String>();
public Object gasDel() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -1331,15 +1354,17 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/gas/save")
@RequestMapping(value = "/gas/save")
@ResponseBody
@DockAnnotation(isAdd = true)
public Object gasSave() throws Exception{
Map<String,String> map = new HashMap<String,String>();
public Object gasSave() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
@ -1357,14 +1382,16 @@ public class AppGFElectricityController extends BaseController {
return map;
}
/**
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value="/countCheck")
@RequestMapping(value = "/countCheck")
@ResponseBody
public Object countCheck() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
public Object countCheck() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();

View File

@ -591,8 +591,8 @@ public class AppGFHighWorkController extends BaseController {
String status = pd.get("STATUS").toString();
String OTHER_PROTECTIVE_MEASURES = pd2.getString("OTHER_PROTECTIVE_MEASURES");
if ("2".equals(status) || "3".equals(status) || "4".equals(status) || "5".equals(status)) {
OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES"))
? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
// pd2.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
// (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"));
// pd2.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") +

View File

@ -7,7 +7,7 @@ showCount=10
;在线管理IP
onlineIp=127.0.0.1
;在线管理端口
onlinePort=8869
onlinePort=18869
;信息提示音
fhsmsSound=m1

View File

@ -1,55 +0,0 @@
import com.alibaba.fastjson.JSONObject;
import com.zcloud.util.HttpRequestUtil;
import com.zcloud.util.Tools;
public class Test {
private static String username = "qinan";
private static String password = "ZBo7pZ6UKDGLXq/xc87WB/J84jk0B7jpujsQZFcGbG4NrNN0CuWSiImfNln0nloVYC0BOp+9bnCq7MEFpzJXy11z2iYnlOA8B7MM5YDi2dpI+bHO0+lfL57eH6IXP7rrSjiKWCBDjNPgYGETkSgXNRVb8L9LnwX6qbHDri4ARTI=";
private static String userName = "n3Q3nVlzQ/8wVC0CObso2H+i8Y3g8q7k0DGZrZY4ofqnAv1wgfFst7AnlTYu7Rw1aJv36cPD/nrWARmNqP+UghX17K5iutwmKLVwC4EZaVmVABQGLjYdCekj2ePHpGjDFyHYaGQrIVJ651WxFZfKtdBexSL7b9sm7FRbpievNmA=";
private static String source = "API";
private static String code = "1";
private static String perLocToken = "4b13428cadd8bafbf9ae7ae2544";
private static String perLocUrl = "http://172.16.130.86/gateway-service";
public static void main(String[] args) throws Exception {
getToken();
}
public static String goToLogin() {
JSONObject request = new JSONObject();
request.put("username", username);
request.put("password", password);
request.put("userName", userName);
request.put("source", source);
request.put("code", code);
String loginResStr = HttpRequestUtil.doPost("http://172.16.130.86/gateway-service" + "/auth/encryptLogin", request.toJSONString());
JSONObject loginResponse = JSONObject.parseObject(loginResStr);
if(Tools.notEmpty(loginResStr) && loginResponse != null
&& loginResponse.get("code") != null && loginResponse.getInteger("code") == 200
&& loginResponse.get("data") != null && loginResponse.getJSONObject("data").getString("token") != null){
return loginResponse.getJSONObject("data").getString("token");
} else { // 登录失败
throw new RuntimeException("人员定位第三方登录失败");
}
}
public static String getToken() throws Exception {
// token 不为空。验证token是否失效
if (Tools.notEmpty(perLocToken)) {
JSONObject request = new JSONObject();
request.put("pageNum", 1);
request.put("pageSize", 10);
String httpResponseStr = HttpRequestUtil.doPost(perLocToken, perLocUrl + "/system/menu/menuTree",request.toJSONString());
JSONObject httpResponse = JSONObject.parseObject(httpResponseStr);
// token 有效
if (Tools.notEmpty(httpResponseStr) && httpResponse != null && httpResponse.get("code") != null && httpResponse.getInteger("code") == 200) {
return perLocToken;
} else { // token 失效 或者报错
perLocToken = goToLogin();
}
} else {
perLocToken = goToLogin();
}
return perLocToken;
}
}