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