2024-02-29 18:30:26 +08:00
|
|
|
package com.zcloud.controller.comprehensive;
|
|
|
|
|
|
|
|
import com.zcloud.controller.base.BaseController;
|
|
|
|
import com.zcloud.entity.Page;
|
|
|
|
import com.zcloud.entity.PageData;
|
|
|
|
import com.zcloud.service.comprehensive.TrafficSecurityLocationManagementService;
|
|
|
|
import com.zcloud.util.DateUtil;
|
|
|
|
import com.zcloud.util.Jurisdiction;
|
|
|
|
import com.zcloud.util.Tools;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
@RequestMapping("/securitylocation")
|
|
|
|
public class TrafficSecurityLocationManagementController extends BaseController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private TrafficSecurityLocationManagementService locationManagementService;
|
|
|
|
//新增
|
|
|
|
@RequestMapping(value = "/add")
|
|
|
|
@ResponseBody
|
|
|
|
public Object add() throws Exception {
|
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
|
String errInfo = "success";
|
|
|
|
PageData pd = this.getPageData();
|
|
|
|
|
|
|
|
String locationmanagement_id = this.get32UUID();
|
2024-03-01 13:52:43 +08:00
|
|
|
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
2024-02-29 18:30:26 +08:00
|
|
|
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
|
|
|
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
|
|
|
pd.put("LOCATIONMANAGEMENT_ID", locationmanagement_id); // 主键
|
2024-03-22 14:34:59 +08:00
|
|
|
pd.put("LOCATIONNAME_ID", this.get32UUID());
|
|
|
|
pd.put("ADDRESSDETAILS_ID", this.get32UUID());
|
2024-02-29 18:30:26 +08:00
|
|
|
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
|
|
|
pd.put("ISDELETE", "0");
|
|
|
|
|
|
|
|
locationManagementService.save(pd);
|
|
|
|
map.put("result", errInfo);
|
|
|
|
map.put("pd", pd);
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value = "/listForSecurityLocationManagement")
|
|
|
|
@ResponseBody
|
|
|
|
public Object listForSecurityLocationManagement(Page page) throws Exception {
|
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
|
String errInfo = "success";
|
2024-03-01 13:52:43 +08:00
|
|
|
|
2024-02-29 18:30:26 +08:00
|
|
|
PageData pd = new PageData();
|
|
|
|
pd = this.getPageData();
|
|
|
|
|
|
|
|
String LOCATIONTYPE = pd.getString("LOCATIONTYPE"); // 关键词检索条件
|
|
|
|
if (Tools.notEmpty(LOCATIONTYPE))
|
|
|
|
pd.put("LOCATIONTYPE", LOCATIONTYPE.trim());
|
|
|
|
|
|
|
|
String TRANSPORTATIONCOMPANY = pd.getString("TRANSPORTATIONCOMPANY"); // 关键词检索条件
|
|
|
|
if (Tools.notEmpty(TRANSPORTATIONCOMPANY))
|
|
|
|
pd.put("REPLYSTTRANSPORTATIONCOMPANYATUS", TRANSPORTATIONCOMPANY.trim());
|
|
|
|
|
|
|
|
page.setPd(pd);
|
|
|
|
List<PageData> varList = locationManagementService.listForSecurityLocationManagement(page);
|
|
|
|
map.put("varList", varList);
|
|
|
|
map.put("page", page);
|
|
|
|
map.put("result", errInfo);
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
2024-03-21 08:42:15 +08:00
|
|
|
/**
|
|
|
|
* 删除
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
@RequestMapping(value="/delete")
|
|
|
|
@ResponseBody
|
|
|
|
public Object delete() throws Exception{
|
|
|
|
Map<String,String> map = new HashMap<String,String>();
|
|
|
|
String errInfo = "success";
|
|
|
|
PageData pd = new PageData();
|
|
|
|
pd = this.getPageData();
|
|
|
|
pd.put("DELETOR", Jurisdiction.getUSER_ID());//删除人id
|
|
|
|
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
|
|
|
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
|
|
|
locationManagementService.delete(pd);
|
|
|
|
map.put("result", errInfo);
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
2024-02-29 18:30:26 +08:00
|
|
|
}
|