八项作业

pull/14/head
dearlin 2023-12-22 09:08:17 +08:00
parent 47a4d549df
commit 43edc5ee1e
1 changed files with 15 additions and 6 deletions

View File

@ -2,6 +2,7 @@ package com.zcloud.controller.gf;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -78,6 +79,7 @@ public class AppGFBreakGroundController extends BaseController {
@RequestMapping(value="/add")
@ResponseBody
@Transactional
@DockAnnotation(hasAnnex = true)
public Object add(
@RequestParam(value="FFILE",required=false) MultipartFile[] files
) throws Exception{
@ -86,6 +88,7 @@ public class AppGFBreakGroundController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
PageData pd2 = new PageData();
ArrayList<String> sendPicturesList = new ArrayList<>();
Calendar calendar = Calendar.getInstance();
DecimalFormat dft=new DecimalFormat("00");
int year = calendar.get(Calendar.YEAR);
@ -104,16 +107,20 @@ public class AppGFBreakGroundController extends BaseController {
pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;");
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName
+"@@"+fileName
);
pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
}
GFbreakGroundService.save(pd);
PageData breakGroundPageData = new PageData();
PageData breakGroundLogPageData = new PageData();
breakGroundPageData.putAll(pd);
if(pd.get("APPLY_STATUS").equals("1")) {
PageData log = new PageData();
log.put("BREAKGROUNDLOG_ID", this.get32UUID());
@ -122,8 +129,8 @@ public class AppGFBreakGroundController extends BaseController {
log.put("CREATOR",pd.get("ACTION_USER"));
log.put("CREATTIME", DateUtil.date2Str(new Date()));
GFbreakGroundLogService.save(log);
breakGroundLogPageData.putAll(log);
List<PageData> paramsList = new ArrayList<PageData>();
// 发短信
PageData mes = new PageData();
mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid
@ -131,7 +138,6 @@ public class AppGFBreakGroundController extends BaseController {
mes.put("SMSCode", "SMS_227245922");// 短信模板编码
mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id
// 参数集合
List<PageData> paramsList = new ArrayList<PageData>();
// 第1个参数
PageData params1 = new PageData();
params1.put("name", "number");// 存入短信模板中的参数名称
@ -155,8 +161,11 @@ public class AppGFBreakGroundController extends BaseController {
paramsList.add(params4);
sendMessageUtil.sendMessages(mes, paramsList);
}
PageData dockData = new PageData();
dockData.put("breakGroundPageData",breakGroundPageData);
dockData.put("breakGroundLogPageData",breakGroundLogPageData);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(dockData));
return map;
}
/**