diff --git a/src/main/java/com/zcloud/controller/hidden/HiddenController.java b/src/main/java/com/zcloud/controller/hidden/HiddenController.java index c5b67a1..eab4543 100644 --- a/src/main/java/com/zcloud/controller/hidden/HiddenController.java +++ b/src/main/java/com/zcloud/controller/hidden/HiddenController.java @@ -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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); +// PageData hidden = hiddenService.findById(pd); + pd.put("STATE", pd.getString("HIDDEN_STATUS")); + List 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; + } + /** * 列表 *