环保检查隐患指派

pull/4/head
fangjiakai 2024-02-22 17:33:39 +08:00
parent 0daa256c35
commit e2045a7a9a
1 changed files with 37 additions and 0 deletions

View File

@ -1942,6 +1942,43 @@ public class HiddenController extends BaseController {
return map;
}
/**
// * 安全环保检查隐患指派
// *
// * @param
// * @throws Exception
// */
@RequestMapping(value = "/assign")
// @RequiresPermissions("hidden:add")
@ResponseBody
public Object assign() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
// PageData hidden = hiddenService.findById(pd);
pd.put("STATE", pd.getString("HIDDEN_STATUS"));
List<PageData> list = hiddenService.listOtherNotAssign(pd);
PageData inspection = new PageData();
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
inspection.put("OPERATOR", Jurisdiction.getUSER_ID());
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
if ("-2".equals(pd.getString("HIDDEN_STATUS"))) {
pd.put("ISCONFIRM", "0"); //
pd.put("CONFIRM_TIME", DateUtil.date2Str(new Date()));
if (list.size() == 0) {
inspection.put("INSPECTION_STATUS", "5"); // 指派完成
} else {
inspection.put("INSPECTION_STATUS", "4"); // 指派中
}
safetyenvironmentalService.editStatus(inspection);
}
hiddenService.assign(pd);
map.put("result", errInfo);
map.put("pd", pd);
return map;
}
/**
*
*