forked from integrated_whb/integrated_whb
隐患排查异常修改
parent
25a7c7973f
commit
e4e6942264
|
@ -78,6 +78,8 @@ public class AppHiddenController extends BaseController {
|
|||
@Autowired
|
||||
private MSMLoginService msmloginService;
|
||||
@Autowired
|
||||
private SendMessageUtil sendMessageUtil;
|
||||
@Autowired
|
||||
private HiddenUserService hiddenUserService; // 隐患相关人员信息
|
||||
@Autowired
|
||||
private HiddenExamineService hiddenexamineService; // 隐患意见
|
||||
|
@ -435,6 +437,73 @@ public class AppHiddenController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/riskListCheckAppAdd") // /appAdd
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "手机",menuServer= "隐患",instructionsOperate = "隐患",instructionsType = "新增")
|
||||
public Object riskListCheckAppAdd() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("HIDDEN_ID", this.get32UUID()); // 主键
|
||||
// pd.put("CREATOR", Jurisdiction.getUSER_ID()); //发现人
|
||||
// pd.put("HIDDENFINDDEPT", Jurisdiction.getDEPARTMENT_ID());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 发现时间
|
||||
pd.put("ISDELETE", "0"); // 是否删除 1 删除 0未删除
|
||||
// pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业id
|
||||
if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) {
|
||||
if ("1".equals(pd.get("RECTIFICATIONTYPE").toString())) {
|
||||
pd.put("RECTIFICATIONTIME", DateUtil.getDay()); // 整改时间
|
||||
pd.put("RECTIFICATIONOR", pd.get("CREATOR")); // 整改人
|
||||
pd.put("RECTIFICATIONDEPT", pd.get("HIDDENFINDDEPT"));
|
||||
pd.put("STATE", "4");
|
||||
} else {
|
||||
pd.put("STATE", "1");
|
||||
}
|
||||
}
|
||||
if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) {
|
||||
PageData item = new PageData();
|
||||
item.put("LISTCHECKITEM_ID", pd.get("RISKITEM_ID"));
|
||||
item = this.listcheckitemService.findById(item);
|
||||
pd.put("RISK_UNIT", item.get("RISKUNITNAME"));
|
||||
pd.put("IDENTIFICATION", item.get("PARTSNAME"));
|
||||
pd.put("RISK_DESCR", item.get("RISK_DESCR"));
|
||||
pd.put("RISK_POSITION", item.get("POSITIONNAME"));
|
||||
pd.put("LEVEL", item.get("DNAME5"));
|
||||
}
|
||||
pd.put("ISCONFIRM", "0");
|
||||
hiddenService.save(pd);
|
||||
|
||||
// 发短信
|
||||
if ("2".equals(pd.get("RECTIFICATIONTYPE").toString())) {// 给整改人发送短信,暂时先用发验证码代替
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd.get("RECTIFICATIONOR"));// 收信人userid
|
||||
mes.put("templateCode", "SMS_215820677");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id
|
||||
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "time");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd.get("RECTIFICATIONDEADLINE"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
}
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue